Эх сурвалжийг харах

【bug-8486】培训统计看板部门筛选有误

shenQiLong 1 долоо хоног өмнө
parent
commit
ddd7354e40

+ 14 - 4
src/views/business/trainManagement/indexV2.vue

@@ -12,7 +12,8 @@
             <el-button type="text" size="mini">部门</el-button>
           </el-row>
           <dv-border-box-8>
-            <el-select
+            <SelectPositions @handleFunc="handleFunc" />
+            <!-- <el-select
               v-model="deptVal"
               :clearable="false"
               placeholder="请选择部门"
@@ -24,7 +25,7 @@
                 :label="item.positionName"
                 :value="item.positionId"
               />
-            </el-select>
+            </el-select> -->
           </dv-border-box-8>
         </div>
         <div :class="$style.daterange" style="right: 65%">
@@ -172,7 +173,8 @@ export default {
     JobPlanChart: () => import('./components/jobPlanChart.vue'),
     TrainingStaffChart: () => import('./components/trainingStaffChart.vue'),
     PieChart: () => import('./components/pieChart.vue'),
-    PreWorkChart: () => import('./components/preWorkChart.vue')
+    PreWorkChart: () => import('./components/preWorkChart.vue'),
+    SelectPositions: () => import('@/views/component/selectPositions')
   },
   data() {
     const d = new Date()
@@ -237,7 +239,8 @@ export default {
           title: '岗前培训',
           numData: data.preData
         }
-      ]
+      ],
+      updateAllGo: false
     }
   },
   computed: {
@@ -258,6 +261,7 @@ export default {
     this.dateValM = this.getYearMonth('m')
     this.dateValY = this.getYearMonth('y')
     this.updateAll()
+    this.updateAllGo = true
   },
   beforeDestroy() {
     if (screenfull.isFullscreen) {
@@ -266,6 +270,12 @@ export default {
     this.clenUp()
   },
   methods: {
+    handleFunc(e) {
+      if (this.updateAllGo) {
+        this.deptVal = e.selection
+        this.updateAll(this.deptVal)
+      }
+    },
     initializeData() {
       const w = window.innerWidth
       const { first = '', second = '' } = this.$store.getters.level || {}