zzy 2 yıl önce
ebeveyn
işleme
85f837f296

+ 27 - 12
src/views/evaluate/c-cpns/BadEvaluateSituation.vue

@@ -70,6 +70,13 @@ export default {
       evaThirdLevel:'evaluateThirdLevel',
       evaTimer:'evaluateTimer',
     }),
+    allChangeLevel:function (){
+      return {
+        first:this.evaFirstLevel,
+        second:this.evaSecondLevel,
+        time:this.evaTimer,
+      }
+    }
   },
   data(){
     return{
@@ -244,29 +251,37 @@ export default {
     }
   },
   mounted() {
-    this.getList()
+    //this.getList()
   },
   destroyed(){
     // 在页面销毁后,清除计时器
     this.clear();
   },
   watch: {
-    evaFirstLevel(){
-      this.clear();
-      this.getList()
-    },
-    evaSecondLevel(){
-      this.clear();
-      this.getList()
+    allChangeLevel:{
+      immediate:true,
+      deep:true,
+      handler(){
+          this.clear();
+          this.getList()
+      }
     },
+    // evaFirstLevel(){
+    //   this.clear();
+    //   this.getList()
+    // },
+    // evaSecondLevel(){
+    //   this.clear();
+    //   this.getList()
+    // },
     evaThirdLevel(){
       this.clear();
       this.showData('');
     },
-    evaTimer(){
-      this.clear();
-      this.getList()
-    },
+    // evaTimer(){
+    //   this.clear();
+    //   this.getList()
+    // },
   }
 }
 </script>

+ 35 - 15
src/views/evaluate/c-cpns/EchartsUnits.vue

@@ -124,9 +124,16 @@ export default {
         }
       }
     }),
+    allChangeLevel:function (){
+      return {
+        first:this.evaFirstLevel,
+        second:this.evaSecondLevel,
+        time:this.evaTimer,
+      }
+    }
   },
   mounted() {
-    this.showData();
+    //this.showData();
     this.$nextTick(function () {
       this.tableHeight = window.innerHeight - this.$refs.unitsTable.$el.offsetTop - 65;
       // 监听窗口大小变化
@@ -339,26 +346,39 @@ export default {
     },
     ...mapEvaluateMutations(['evaluateFirstLevel','evaluateSecondLevel','evaluateThirdLevel','evaluateTimer','evaluateUnit'])
   },
+  destroyed(){
+    // 在页面销毁后,清除计时器
+    this.clear();
+  },
   watch: {
-    evaFirstLevel(){
-      this.clear()
-      this.evaluateUnit('');
-      this.showData()
-    },
-    evaSecondLevel(){
-      this.clear()
-      this.evaluateUnit('');
-      this.showData();
+    allChangeLevel:{
+      immediate:true,
+      deep:true,
+      handler(){
+        this.clear()
+        this.evaluateUnit('');
+        this.showData()
+      }
     },
+    // evaFirstLevel(){
+    //   this.clear()
+    //   this.evaluateUnit('');
+    //   this.showData()
+    // },
+    // evaSecondLevel(){
+    //   this.clear()
+    //   this.evaluateUnit('');
+    //   this.showData();
+    // },
     evaUnit(val){
       this.clear();
       this.showChartData(val)
     },
-    evaTimer(){
-      this.clear()
-      this.evaluateUnit('');
-      this.showData()
-    },
+    // evaTimer(){
+    //   this.clear()
+    //   this.evaluateUnit('');
+    //   this.showData()
+    // },
   }
 }
 </script>