Parcourir la source

判断时机调整

gcz il y a 1 an
Parent
commit
a4ca61eb12
1 fichiers modifiés avec 5 ajouts et 14 suppressions
  1. 5 14
      src/views/finance/flowingWaterMr/index.vue

+ 5 - 14
src/views/finance/flowingWaterMr/index.vue

@@ -192,26 +192,17 @@ export default {
   created() {
     this.getList();
   },
-  watch: {
-    'queryParams.incomeExpenses': {
-      handler: function(newValue, oldValue) {
-        // console.log(`The value changed to ${newValue}`);
-        if(newValue=='支出'){
-          this.zhichu=true;
-        }else if(newValue=='收入'){
-          this.zhichu=false;
-        }
-      },
-      deep: true,
-      immediate: false
-    }
-  },
   methods: {
     /** 查询列表 */
     getList() {
       this.loading = true;
       pageList(this.addDateRange(this.queryParams, this.dateRange))
       .then(response => {
+          if(this.queryParams.incomeExpenses=='支出'){
+            this.zhichu=true;
+          }else if(this.queryParams.incomeExpenses=='收入'){
+            this.zhichu=false;
+          }
           this.dataList = response.data.rows;
           this.total = response.data.total;
           this.loading = false;