Explorar el Código

app完成驾驶舱添加机构ID参数

coys hace 1 año
padre
commit
822a695200

+ 2 - 2
src/api/cockpit.js

@@ -2,12 +2,12 @@
 import request from '@/utils/request'
 
 // 获取驾驶舱总览
-export function getOverview() {
+export function getOverview(query) {
   return request({
     url: '/core/cockpit/app/overview',
 
     method: 'get',
-    
+    params: query
   })
 }
 // 获取基础信息

+ 2 - 2
src/views/menu/cockpit/baseInfoMixins.js

@@ -14,8 +14,8 @@ export const baseInfoApi = {
   },
   methods: {
     //获取基础信息
-    getBaseInfoHandler() {
-      getAllbaseInfo().then(res => {
+    getBaseInfoHandler(data) {
+      getAllbaseInfo(data).then(res => {
         let { code, data } = res
         if (code == 200) {
           this.baseData = data

+ 24 - 10
src/views/menu/cockpit/components/comprehensiveData.vue

@@ -278,7 +278,9 @@ export default {
   },
   name: 'SocAppComprehensiveData',
   mixins: [baseInfoApi],
-
+  props: {
+    orgId: ''
+  },
   data() {
     return {
       active: 1,
@@ -310,17 +312,29 @@ export default {
       otherEdu: null //教育培训
     }
   },
+  watch: {
+    orgId() {
+      //履职
+      this.getsynthesisResumptionfo({ month: this.month, orgId: this.orgId })
+      //问题整改
+      this.getSyntheticQuestionHandler({ month: this.questionMonth, orgId: this.orgId })
+      // 安全检查
+      this.getSafetycheck({ month: this.safetyCheckMonth, orgId: this.orgId })
+      // 其他
+      this.getQtHandler({ date: this.otherValMonth, orgId: this.orgId })
+    }
+  },
   created() {
     //设置默认月份
     this.otherValMonth = this.safetyCheckMonth = this.questionMonth = this.month = newDateMonth()
     //履职
-    this.getsynthesisResumptionfo({ month: this.month })
+    this.getsynthesisResumptionfo({ month: this.month  ,orgId: this.orgId})
     //问题整改
-    this.getSyntheticQuestionHandler({ month: this.questionMonth })
+    this.getSyntheticQuestionHandler({ month: this.questionMonth ,orgId: this.orgId })
     // 安全检查
-    this.getSafetycheck({ month: this.safetyCheckMonth })
+    this.getSafetycheck({ month: this.safetyCheckMonth ,orgId: this.orgId })
     // 其他
-    this.getQtHandler({ date: this.otherValMonth })
+    this.getQtHandler({ date: this.otherValMonth ,orgId: this.orgId })
   },
   mounted() {},
 
@@ -334,7 +348,7 @@ export default {
           } else {
             this.month = newDateMonth(new Date(), 1)
           }
-          this.getsynthesisResumptionfo({ month: this.month })
+          this.getsynthesisResumptionfo({ month: this.month ,orgId: this.orgId})
           break
         case '2': //问题整改
           this.questionVal = val
@@ -343,7 +357,7 @@ export default {
           } else {
             this.questionMonth = newDateMonth(new Date(), 1)
           }
-          this.getSyntheticQuestionHandler({ month: this.questionMonth })
+          this.getSyntheticQuestionHandler({ month: this.questionMonth ,orgId: this.orgId})
           break
 
         case '3': //安全检查
@@ -353,7 +367,7 @@ export default {
           } else {
             this.safetyCheckMonth = newDateMonth(new Date(), 1)
           }
-          this.getSafetycheck({ month: this.safetyCheckMonth })
+          this.getSafetycheck({ month: this.safetyCheckMonth ,orgId: this.orgId})
           break
         case '4': //其他
           this.otherVal = val
@@ -362,7 +376,7 @@ export default {
           } else {
             this.otherValMonth = newDateMonth(new Date(), 1)
           }
-          this.getQtHandler({ date: this.otherValMonth })
+          this.getQtHandler({ date: this.otherValMonth ,orgId: this.orgId})
           break
         default:
           break
@@ -443,7 +457,7 @@ export default {
   font-size: 28px;
   padding: 20px;
 }
-.tabsCard{
+.tabsCard {
   margin-top: 20px;
 }
 </style>

+ 10 - 3
src/views/menu/cockpit/components/overviewCom.vue

@@ -109,7 +109,9 @@ import { getOverview } from '@/api/cockpit.js'
 export default {
   name: 'SocAppOverviewCom',
   components: {},
-
+  props:{
+    orgId:''
+  },
   data() {
     return {
       list: [
@@ -167,11 +169,16 @@ export default {
     //获取基础信息
   },
   mounted() {},
-
+  watch:{
+    orgId(){
+        this.getAllList()
+    }
+  },
   methods: {
+    
     // 获取总览数据
     getAllList() {
-      getOverview().then(res => {
+      getOverview({orgId:this.orgId}).then(res => {
         let { data } = res
         this.allData = data
         this.allData.bankingCount = this.remedyZero(this.allData.bankingCount)

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

@@ -7,10 +7,10 @@
       </van-col>
     </van-row>
     <div>
-      <van-tabs  color="#008cd6">
+      <van-tabs color="#008cd6">
         <van-tab title="总览">
           <!-- 总览组件 -->
-          <overview></overview>
+          <overview :orgId="cascaderValue"></overview>
         </van-tab>
         <van-tab title="基础信息">
           <!-- 安全防范改造情况 -->
@@ -111,7 +111,7 @@
           </div>
         </van-tab>
         <van-tab title="综合数据">
-          <compreDataCom ref="compreDataCom"></compreDataCom>
+          <compreDataCom ref="compreDataCom" :orgId="cascaderValue"></compreDataCom>
         </van-tab>
         <van-tab title="履职情况"
           ><div class="boxCard">
@@ -209,7 +209,7 @@ export default {
   },
   mounted() {
     this.cascaderValue = JSON.parse(window.sessionStorage.getItem('SET_USER_ORGID')) + ''
-    this.getBaseInfoHandler()
+    this.getBaseInfoHandler({ orgId: this.cascaderValue })
     //设置默认排序
 
     if (this.lvVal == '升序' || this.lvVal == '履职排名') {
@@ -219,10 +219,15 @@ export default {
     }
     //设置默认月份
     this.month = newDateMonth()
-    this.getResumptionfoHandler({ desc: this.desc, month: this.month })
+    this.getResumptionfoHandler({ desc: this.desc, month: this.month, orgId: this.cascaderValue })
   },
   methods: {
-    getDataList() {},
+    getDataList(data) {
+      
+      this.cascaderValue=data.id
+      this.getResumptionfoHandler({ desc: this.desc, month: this.month, orgId: this.cascaderValue })
+      this.getBaseInfoHandler({ orgId: this.cascaderValue })
+    },
     onConfirm(val) {
       this.monthVal = val
       if (val == '本月') {