scorpio 2 жил өмнө
parent
commit
e30b35d1fa

+ 7 - 2
src/views/invest/components/amount.vue

@@ -15,8 +15,7 @@
         :option="option"
         :data="data"
         ref="crud"
-        v-model="form"
-        @on-load="onLoad">
+        v-model="form">
     </avue-crud>
   </div>
 </template>
@@ -40,6 +39,12 @@ export default {
         this.initOption(val)
       },
       immediate: true
+    },
+    deptId: {
+      handler (val) {
+        this.onLoad()
+      },
+      immediate: true
     }
   },
   data () {

+ 5 - 1
src/views/invest/components/left.vue

@@ -2,7 +2,7 @@
   <div>
     <div class="flex flex-col flex-center">
       <span class="font-16 grey-6 bold">年度资金管理</span>
-      <base-button class="mt-20" title="全县投资情况" icon=""/>
+      <base-button class="mt-20" title="全县投资情况" icon="" :type='active === -1 ? "1" :"2" '  @click='viewAll'/>
       <div class='full-width flex flex-center mt-20'>
         <el-tabs v-model="activeName" class="font-16" @tab-change="getOrg">
           <el-tab-pane label="住建局" name="1"/>
@@ -52,6 +52,10 @@ export default {
     change (index) {
       this.active = index
       this.$emit('change', this.deptList[index])
+    },
+    viewAll () {
+      this.active = -1
+      this.$emit('change', null)
     }
   }
 }

+ 4 - 1
src/views/invest/index.vue

@@ -53,7 +53,10 @@ export default {
   },
   methods: {
     changeDept (res) {
-      console.log(res)
+      if (res === null) {
+        this.dept = ''
+        return
+      }
       this.dept = res.id
     },
     change (index) {