coys 1 rok pred
rodič
commit
c451afa434

+ 4 - 4
src/views/menu/cockpit/components/overviewCom.vue

@@ -170,14 +170,14 @@ export default {
   },
   mounted() {},
   watch: {
-    orgId() {
-      this.getAllList()
+    orgId(val) {
+      this.getAllList(val)
     }
   },
   methods: {
     // 获取总览数据
-    getAllList() {
-      getOverview({ orgId: this.orgId }).then(res => {
+    getAllList(val) {
+      getOverview({ orgId: val?val:this.orgId }).then(res => {
         let { data } = res
         this.allData = data
         // this.allData.bankingCount = this.remedyZero(this.allData.bankingCount)

+ 11 - 2
src/views/menu/cockpit/index.vue

@@ -184,9 +184,18 @@ export default {
   computed: {
     ...mapGetters(['orgTree','orgTreeHangshe'])
   },
+  watch:{
+    orgTreeHangshe(val){
+      this.cascaderValue =val[0].id
+      
+      this.getBaseInfoHandler({ orgId: this.cascaderValue })
+      this.getResumptionfoHandler({ desc: this.desc, month: this.month, orgId: this.cascaderValue })
+    },
+    
+  },
   mounted() {
-    console.log(this.orgTreeHangshe,'.....');
-    this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
+
+    // this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
     this.getBaseInfoHandler({ orgId: this.cascaderValue })
     //设置默认排序