From d1ce79c837650689ab47bbf587d076743fcb3a5f Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 19 五月 2025 17:25:38 +0800
Subject: [PATCH] 1. 问题审核界面新增场景信息编辑入口 2. 问题审核界面场景图片查询新增图片类型修改功能

---
 src/views/fysp/check/components/CompProblemAddOrUpd.vue |   43 +++++++++++++++++++++----------------------
 1 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/src/views/fysp/check/components/CompProblemAddOrUpd.vue b/src/views/fysp/check/components/CompProblemAddOrUpd.vue
index 940347a..ad0049c 100644
--- a/src/views/fysp/check/components/CompProblemAddOrUpd.vue
+++ b/src/views/fysp/check/components/CompProblemAddOrUpd.vue
@@ -163,15 +163,13 @@
               </el-col>
             </el-row>
           </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="onSubmit" v-show="!readonly"
-              >淇濆瓨</el-button
-            >
-            <el-button @click="onCancel" v-show="!readonly"
-              >鍙栨秷</el-button
-            >
-          </el-form-item>
         </el-form>
+        <el-row justify="end">
+          <el-button type="primary" @click="onSubmit" v-show="!readonly"
+            >淇濆瓨</el-button
+          >
+          <el-button @click="onCancel" v-show="!readonly">鍙栨秷</el-button>
+        </el-row>
         <ArbitraryPhoto
           :max-select="maxSelectImgCount - fileList.length"
           v-model:dialog-visible="anyPhotoDialog"
@@ -214,7 +212,6 @@
   </CompGenericWrapper>
 </template>
 <script>
-import CompGenericWrapper from './CompGenericWrapper.vue';
 import ArbitraryPhoto from './ArbitraryPhoto.vue';
 import CompLedgerPhoto from './CompLedgerPhoto.vue';
 import CompDevicePhoto from './CompDevicePhoto.vue';
@@ -231,8 +228,7 @@
   components: {
     ArbitraryPhoto,
     CompDevicePhoto,
-    CompLedgerPhoto,
-    CompGenericWrapper
+    CompLedgerPhoto
   },
   props: {
     readonly: {
@@ -263,6 +259,7 @@
   },
   data() {
     return {
+      // fixme 2024.11.20 瀛愮粍浠跺垵濮嬪寲鏃舵満闂
       initPropsCount: 0,
       // 鍒濆棰勮鍥剧墖index
       initialIndex: -1,
@@ -425,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);
@@ -587,7 +584,8 @@
       return true;
     },
     onCancel() {
-      this.$emit("cancel")
+      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