Przeglądaj źródła

切换数据时,异常数据清空

gaoxiong 1 rok temu
rodzic
commit
53c02b05a5
1 zmienionych plików z 15 dodań i 0 usunięć
  1. 15 0
      src/views/menu/resumption/detail.vue

+ 15 - 0
src/views/menu/resumption/detail.vue

@@ -158,6 +158,7 @@
                     inactive-color="#4fc08d"
                     active-color="#ee0a24"
                     size="18"
+                    @change="changeRes(point)"
                   />
                   <span v-else>
                     <van-tag v-if="point.resValue === 1" type="warning">异常</van-tag>
@@ -520,6 +521,20 @@ export default {
       })
       this.openCollapseItems()
     },
+    changeRes(point){
+      if(point.resValue === 0){
+        for (let i = 0; i < this.checks.length; i++) {
+          for (let j = 0; j < this.checks[i].points.length; j++) {
+            let po =  this.checks[i].points[j] ;
+            if(po.pointId === point.pointId){
+              this.checks[i].points[j].rectificationDeadline = null;
+              this.checks[i].points[j].imgs = [];
+              this.checks[i].points[j].resRemark = null;
+            }
+          }
+        }
+      }
+    },
     changeCurrentSwitch(areaId) {
       this.resumptionData.yesPointNums = this.resumptionData.yesPointNums + 1
       this.resumptionData.noPointNums = this.resumptionData.noPointNums - 1