Просмотр исходного кода

补充人员看板切换二级部门的数据变化

cyy 1 год назад
Родитель
Сommit
420cad58f5

+ 3 - 3
src/views/peopleManages/personComcont/GetPieView.vue

@@ -3,12 +3,12 @@
         <div style="  height:14%;line-height:30px;text-align: left;padding-left: 10px;color: white;">
             {{ info.config.title || "" }}
         </div>
-        <div v-show="showChart" style="width: 100%; height: 86%; display: inline-block; overflow: hidden">
+        <div style="width: 100%; height: 86%; display: inline-block; overflow: hidden">
             <div :id="info.config.idSelector" style="width: 100%; height: 95%; overflow: hidden" />
         </div>
-        <div v-if="!showChart" style="background: #061237;width: 100%;height: 70%;display: flex;justify-content: center;align-items: center;">
+        <!-- <div v-if="!showChart" style="background: #061237;width: 100%;height: 70%;display: flex;justify-content: center;align-items: center;">
             <div style="color: #c7c7c7">目前无数据</div>
-        </div>
+        </div> -->
     </div>
 </template>
 

+ 15 - 4
src/views/peopleManages/taskStatistics/index.vue

@@ -849,6 +849,17 @@ export default {
             }
         }
     },
+    watch: {
+        depth3: {
+            handler (newVal, oldVal) {
+                this.positionsInfoData()
+                this.degreeGradeInfoData()
+                this.employeeInfoData()
+            },
+            deep: true,
+            immediate: true
+        }
+    },
     created () {
         const initendDate = new Date()
         // this.endDate =
@@ -957,12 +968,12 @@ export default {
                             and ee.name_ not like '%金通%'
                             and ee.name_ not like '%管理%'
                             and ee.id_ != '702117247933480960'
-                            AND en.PATH_ LIKE '%${this.level}%'`
+                            AND en.PATH_ LIKE '%${this.depth3}%'`
             await curdPost('sql', sql).then((res) => {
                 data = res.variables.data
             })
+            this.employeeNum = data.length
             if (this.initOnLoad === 0) {
-                this.employeeNum = data.length
                 this.initOnLoad = 1
             }
             const personIdsArr = []
@@ -1085,7 +1096,7 @@ export default {
             this.ranksPieData.data[2].value = data[0].fuGao ? data[0].fuGao : 0
         },
         // 部门信息统计
-        positionsInfoData () {
+        async positionsInfoData () {
             // const positionsWhere =
             //     this.positions.length !== 0
             //         ? `(${this.positions.join(' or ')} )`
@@ -1196,7 +1207,7 @@ export default {
                         WHERE
                             b.positions_ IN ( SELECT id_ FROM ibps_party_entity WHERE path_ LIKE '%${this.depth3}%' AND party_type_ = 'position' ))`
 
-            curdPost('sql', sql).then((res) => {
+            await curdPost('sql', sql).then((res) => {
                 const data = res.variables.data
                 // 组装数据集,以学历职称为列,以部门为行:{" 大专":['1','2','3']}
                 const degreeSeriesDatas = this.PositionsDegreeOption.series