捡起历史的垃圾
This commit is contained in:
		| @@ -14,6 +14,7 @@ export default { | ||||
|       colConfigs: [ | ||||
|         {prop: "appId", label: "应用编号"}, | ||||
|         {prop: "appName", label: "应用名称", width: 200}, | ||||
|         {prop: "status", label: "状态", width: 100, dict: "assessmentStartStatus"}, | ||||
|       ], | ||||
|       dialog: false, | ||||
|       form: {} | ||||
| @@ -39,7 +40,8 @@ export default { | ||||
|       }) | ||||
|     }, | ||||
|     handleAdd(row = {}) { | ||||
|       this.form = this.$copy(row) | ||||
|       const {appIconUrl: url, fileId} = row | ||||
|       this.form = this.$copy({...row, appIconUrl: [{url, fileId}]}) | ||||
|       this.dialog = true | ||||
|       // this.$router.push({hash: "#add", query: {id}}) | ||||
|     }, | ||||
| @@ -71,7 +73,8 @@ export default { | ||||
|     }, | ||||
|     submit() { | ||||
|       this.$refs.form.validate().then(() => { | ||||
|         this.instance.post("/app/appaiconfiginfo/addOrUpdate", this.form).then(res => { | ||||
|         const {appIconUrl} = this.form, {url, fileId} = appIconUrl.at(0) || {} | ||||
|         this.instance.post("/app/appaiconfiginfo/addOrUpdate", {...this.form, appIconUrl: url, fileId}).then(res => { | ||||
|           if (res?.code == '0') { | ||||
|             this.$message.success("提交成功!") | ||||
|             this.getTableData() | ||||
| @@ -82,7 +85,7 @@ export default { | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.$dict.load("copilotAbility") | ||||
|     this.$dict.load("copilotAbility", "assessmentStartStatus") | ||||
|     this.getTableData() | ||||
|   }, | ||||
| } | ||||
| @@ -129,7 +132,7 @@ export default { | ||||
|           <ai-select v-model="form.ability" dict="copilotAbility"/> | ||||
|         </el-form-item> | ||||
|         <el-form-item label="应用图标" prop="appIconUrl"> | ||||
|           <ai-uploader v-model="form.appIconUrl" :instance="instance" :limit="1" valueIsUrl/> | ||||
|           <ai-uploader v-model="form.appIconUrl" :instance="instance" :limit="1"/> | ||||
|         </el-form-item> | ||||
|       </el-form> | ||||
|     </ai-dialog> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user