From 2f3ed8493285728d0f83d50f3a342dbad5a06f9f Mon Sep 17 00:00:00 2001
From: hcong <1050828145@qq.com>
Date: 星期二, 22 十月 2024 10:38:27 +0800
Subject: [PATCH] 问题修改乱码bug

---
 src/views/fysp/check/components/CompProblemAddOrUpd.vue |   30 ++++++++++++++----------------
 1 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/src/views/fysp/check/components/CompProblemAddOrUpd.vue b/src/views/fysp/check/components/CompProblemAddOrUpd.vue
index d901b6a..eaad334 100644
--- a/src/views/fysp/check/components/CompProblemAddOrUpd.vue
+++ b/src/views/fysp/check/components/CompProblemAddOrUpd.vue
@@ -22,7 +22,7 @@
             v-for="item in descriptionOptions"
             :key="item.guid"
             :label="item.description"
-            :value="item.guid"
+            :value="item.description"
           />
         </el-select>
       </el-form-item>
@@ -232,7 +232,6 @@
   watch: {
     fileList: {
       handler(newFileList, oldFileList) {
-        console.log('newFileList', newFileList);
         // 鍥剧墖鏍¢獙
         this.pictureValidate();
       },
@@ -262,10 +261,7 @@
     },
     adviseOptions() {
       var problemGuid = this.currProTypeGuid || this.problem.guid;
-      console.log("problemGuid", problemGuid);
-      
       var array = this.suggestions.filter((item) => item.adProblemtypeguid == problemGuid);
-      console.log("array", array);
       return array;
     }
   },
@@ -286,8 +282,7 @@
       // 灏嗕竴涓猨s瀵硅薄涓墍鏈塪i锛寃i锛宲i寮�澶寸殑灞炴�у叏閮ㄦ敼鎴愬幓鎺夎繖浜涘墠缂�骞朵笖閲嶆柊鍙樹负椹煎嘲寮忓懡鍚�
       const newObj = {};
       for (const key in obj) {
-        if (obj.hasOwnProperty(key)) {
-          let newKey = key;
+        let newKey = key;
           if (key.startsWith('di')) {
             newKey = key.substring(2);
           } else if (key.startsWith('wi')) {
@@ -297,7 +292,6 @@
           }
           newKey = newKey.charAt(0).toLowerCase() + newKey.slice(1);
           newObj[newKey] = obj[key];
-        }
       }
       return newObj;
     },
@@ -350,8 +344,6 @@
                     this.saveStatus(newDevice, statusItem);
                     newDevice.dlLocation = statusItem.dlLocation;
                     newDevice.topTypeId = topTypeId;
-                    console.log('newDevice.topTypeId', newDevice.topTypeId);
-                    console.log('newDevice', newDevice);
 
                     this.deviceImgObjList.push(newDevice);
                   }
@@ -364,7 +356,6 @@
     },
     initOptions() {
       if (this.problem == undefined || this.problem == null) {
-        this.problem = {};
         this.deepCopyProblem = {};
       } else {
         this.deepCopyProblem = useCloned(this.problem).cloned.value;
@@ -472,7 +463,7 @@
       return result;
     },
     changeProblemname() {
-      if (this.proRemark == null || this.proRemark == '') {
+      if (!this.proRemark || this.proRemark == null || this.proRemark == '') {
         this.deepCopyProblem.problemname = this.deepCopyProblem.description;
       } else {
         this.deepCopyProblem.problemname =
@@ -486,10 +477,19 @@
       this.deepCopyProblem.description = '';
       this.deepCopyProblem.advise = '';
     },
+    findProByProDesName(name) {
+      let result
+      this.problemTypeList.forEach(item=>{
+        if (item.description == name) {
+          result = item;
+        }
+      })
+      return result
+    },
     onProDesChange(value) {
-      let currPro = this.findProTypeByGuid(value);
+      let currPro = this.findProByProDesName(value)
       this.deepCopyProblem.advise = '';
-      this.currProTypeGuid = value;
+      this.currProTypeGuid = currPro.guid;
       // this.deepCopyProblem.description = currPro.description;
       this.changeProblemname();
       this.deepCopyProblem.advise = '';
@@ -549,7 +549,6 @@
           }
           exclude = false;
           // picUrls.push(item)
-        } else {
         }
       });
       if (this.type == 1) {
@@ -568,7 +567,6 @@
         const deepCopySubTask = useCloned(this.subtask).cloned.value;
         const that = this;
         fileUtil.getImageFiles(picUrls, function (files) {
-          console.log('deepCopySubTask', deepCopySubTask);
           deepCopyPro.insGuid = deepCopySubTask.insGuid;
           delete deepCopyPro['advise'];
           delete deepCopyPro['description'];

--
Gitblit v1.9.3