scorpio 2 سال پیش
والد
کامیت
44532c8bfd
2فایلهای تغییر یافته به همراه17 افزوده شده و 3 حذف شده
  1. 1 1
      src/views/home/component/dash.vue
  2. 16 2
      src/views/home/component/top-fliter.vue

+ 1 - 1
src/views/home/component/dash.vue

@@ -589,7 +589,7 @@ export default {
       this.option.column[indexLabel].label = '责任股(科)室'
     }
     this.$bus.on('serach', (res, type) => {
-      this.owerQuery = res
+      this.owerQuery = Object.assign(this.owerQuery, res)
       if (res.type === false) {
         this.projectStageQuery.projectStage = ''
         this.active = 0

+ 16 - 2
src/views/home/component/top-fliter.vue

@@ -24,6 +24,7 @@
         class="padding-right"
         style="width: 80%"
         @change="change($event, 2)"
+        @clear="clear($event, 1)"
         clearable
       >
         <el-option
@@ -44,6 +45,7 @@
         class="padding-right"
         style="width: 60%"
         @change="change($event, 3)"
+        @clear="clear($event, 1)"
       >
         <el-option
           v-for="item in types"
@@ -71,6 +73,14 @@
  * 顶部搜索
  */
 export default {
+  watch: {
+    time: {
+      handler(val) {
+        this.change(val, 4)
+      },
+      immediate: true
+    }
+  },
   data() {
     return {
       query: {
@@ -79,7 +89,7 @@ export default {
         timeType: '',
         findTime: ''
       },
-      time: '',
+      time: null,
       years: [],
       dateType: '计划(实际)开工时间',
       types: [
@@ -121,6 +131,9 @@ export default {
         }
       })
     },
+    clear(res, type) {
+      console.log(type)
+    },
     change(res, type) {
       if (type === 1) {
         this.query.projectYear = res
@@ -132,7 +145,8 @@ export default {
           return
         }
       } else {
-        this.query.findTime = this.time.join(',')
+        console.log(this.time)
+        this.query.findTime = this.time === null ? '' : this.time.join(',')
       }
       this.$bus.emit('serach', this.query)
     }