From 6d479f9fbc15e96383fe25270575c976e4356e89 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期五, 16 五月 2025 17:23:46 +0800 Subject: [PATCH] 新建工地夜间施工管理页面(待完成) --- src/views/fysp/check/components/CompProblemAddOrUpd.vue | 31 +++++++++++++++---------------- 1 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/views/fysp/check/components/CompProblemAddOrUpd.vue b/src/views/fysp/check/components/CompProblemAddOrUpd.vue index 2cf3bc9..b1e49ff 100644 --- a/src/views/fysp/check/components/CompProblemAddOrUpd.vue +++ b/src/views/fysp/check/components/CompProblemAddOrUpd.vue @@ -167,9 +167,7 @@ <el-button type="primary" @click="onSubmit" v-show="!readonly" >淇濆瓨</el-button > - <el-button @click="onCancel" v-show="!readonly" - >鍙栨秷</el-button - > + <el-button @click="onCancel" v-show="!readonly">鍙栨秷</el-button> </el-form-item> </el-form> <ArbitraryPhoto @@ -230,7 +228,7 @@ components: { ArbitraryPhoto, CompDevicePhoto, - CompLedgerPhoto, + CompLedgerPhoto }, props: { readonly: { @@ -424,7 +422,7 @@ districtCode: this.topTask.districtcode }; problemApi.fetchProblemType(data).then((res) => { - this.problemTypeList = res.data; + this.problemTypeList = res; if (this.type == 1) { let currProName = String(this.problem.problemname); @@ -586,8 +584,8 @@ return true; }, onCancel() { - this.$emit("cancel") - this.$emit('update:visible', false) + this.$emit('cancel'); + this.$emit('update:visible', false); }, onSubmit() { this.$refs.formRef.validate((valid) => { @@ -616,7 +614,7 @@ }); if (this.type == 1) { let deleteImgCopy = this.deleteImg; - fileUtil.getImageFiles(picUrls, function (files) { + fileUtil.getImageFiles(picUrls, (files) => { data.append('deleteImg', deleteImgCopy); deepCopyPro.advise = deepCopyPro.advice; delete deepCopyPro['advice']; @@ -629,19 +627,19 @@ files.forEach((image) => { data.append('images', image); }); - problemApi.updateProblem(data).then((res) => {}); + problemApi.updateProblem(data).then((res) => { + this.$emit('submit', false); + }); }); - this.$emit('submit', false); } else { const deepCopySubTask = useCloned(this.subtask).cloned.value; - const that = this; - fileUtil.getImageFiles(picUrls, function (files) { + fileUtil.getImageFiles(picUrls, (files) => { deepCopyPro.insGuid = deepCopySubTask.insGuid; delete deepCopyPro['description']; deepCopyPro.proName = deepCopyPro.problemname; delete deepCopyPro['problemname']; - deepCopyPro.ptGuid = that.findProTypeByGuid( - that.currProTypeGuid + deepCopyPro.ptGuid = this.findProTypeByGuid( + this.currProTypeGuid ).guid; deepCopyPro.locationId = deepCopyPro.locationid; delete deepCopyPro['locationid']; @@ -651,9 +649,10 @@ files.forEach((image) => { data.append('images', image); }); - problemApi.newProblem(data).then((res) => {}); + problemApi.newProblem(data).then((res) => { + this.$emit('submit', true); + }); }); - this.$emit('submit', true); } } }); -- Gitblit v1.9.3