Sfoglia il codice sorgente

fix:人员管理看板

liujiayin 2 anni fa
parent
commit
e38a0bda26

+ 64 - 46
src/views/component/selectPositions.vue

@@ -1,98 +1,116 @@
 <template>
-  <el-cascader ref="cascader"
-               v-model="selectDatas"
-               :options="options"
-               :props="props"
-               :collapse-tags="true"
-               :filterable="true">
+  <el-cascader
+    ref="cascader"
+    v-model="selectDatas"
+    :options="options"
+    :props="props"
+    :collapse-tags="true"
+    :filterable="true"
+  >
   </el-cascader>
 </template>
   
   <script>
 import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
-import TreeUtils from '@/utils/tree'
+import TreeUtils from "@/utils/tree";
 
 export default {
   data() {
-    const { level, userId, userInfo } = this.$store.getters
+    const { level, userId, userInfo } = this.$store.getters;
     return {
-      level, userId, userInfo,
+      level,
+      userId,
+      userInfo,
       props: {
-        children: 'children',
-        label: 'NAME_',
-        value: 'ID_',
+        children: "children",
+        label: "NAME_",
+        value: "ID_",
         multiple: true,
-        expandTrigger: 'hover',
+        expandTrigger: "hover",
       },
       options: [],
-      selectDatas: []
+      selectDatas: [],
+      iniselectDatas: [],
     };
   },
   mounted() {
-    this.getPositionList()
+    this.getPositionList();
   },
   methods: {
     // 获取本账户所在的部门
     getPositionList() {
-      let positonsSql = ''
+      let positonsSql = "";
       // 金通账号id
-      if (this.userId == '702117247933480960') {
-        positonsSql = `select * from ibps_party_entity where party_type_ = 'position' `
+      if (this.userId == "702117247933480960") {
+        positonsSql = `select * from ibps_party_entity where party_type_ = 'position' `;
       } else {
         // 所属医院的系统管理员
-        let isAdmin = this.userInfo.role.some(so => {
-          return so.name == '系统管理角色'
-        })
+        let isAdmin = this.userInfo.role.some((so) => {
+          return so.name == "系统管理角色";
+        });
         if (isAdmin) {
-          positonsSql = `select * from ibps_party_entity where party_type_ = 'position' and PATH_ like '%${this.level.first}%'  and DEPTH_ > 2`
+          positonsSql = `select * from ibps_party_entity where party_type_ = 'position' and PATH_ like '%${this.level.first}%'  and DEPTH_ > 2`;
         } else {
-          let allPositions = []
+          let allPositions = [];
           for (var i of this.userInfo.positions) {
-            for (var item of i.path.split('.')) {
-              if (item !== '') {
-                allPositions.push(`id_ like '%${item}%'`)
+            for (var item of i.path.split(".")) {
+              if (item !== "") {
+                allPositions.push(`id_ like '%${item}%'`);
               }
             }
           }
           allPositions = [...new Set(allPositions)];
           // 如果是单纯的是普通账户登录,就只显示所属部门的信息
-          positonsSql = `select * from ibps_party_entity where ${allPositions.join(' or ')}`
+          positonsSql = `select * from ibps_party_entity where ${allPositions.join(
+            " or "
+          )}`;
         }
       }
-      curdPost('sql', positonsSql).then((res) => {
+      curdPost("sql", positonsSql).then((res) => {
         if (res.state === 200) {
-          const datas = res.variables.data
-          let positionsValue = []
+          const datas = res.variables.data;
+          let positionsValue = [];
           if (datas.length > 0) {
-            this.options = this.toTree(datas)
+            this.options = this.toTree(datas);
             for (var i of this.options) {
               if (i.children !== undefined) {
-                const getTail = item => item.children && item.children.length > 0 ? item.children.map(m => getTail(m)) : [item]
-                let result = _.flattenDeep(i.children.map(m => getTail(m)))
+                const getTail = (item) =>
+                  item.children && item.children.length > 0
+                    ? item.children.map((m) => getTail(m))
+                    : [item];
+                let result = _.flattenDeep(i.children.map((m) => getTail(m)));
                 for (var item of result) {
-                  let itemArr = item.PATH_.split('.')
-                  itemArr.splice(itemArr.length - 1, 1)
-                  positionsValue.push(itemArr)
+                  let itemArr = item.PATH_.split(".");
+                  itemArr.splice(itemArr.length - 1, 1);
+                  positionsValue.push(itemArr);
                 }
               }
             }
-            this.selectDatas = positionsValue
+            this.selectDatas = positionsValue;
+            if (this.iniselectDatas.length == 0) {
+              this.iniselectDatas = positionsValue;
+            }
           }
         }
-      })
+      });
     },
     toTree(data) {
       return TreeUtils.transformToTreeFormat(data, {
-        idKey: 'ID_',
-        pIdKey: 'PARENT_ID_',
-        childrenKey: 'children'
-      })
-    }
+        idKey: "ID_",
+        pIdKey: "PARENT_ID_",
+        childrenKey: "children",
+      });
+    },
   },
   watch: {
     selectDatas(v) {
-      this.$emit("handleFunc", v);
-    }
-  }
+      if (v.length == 0) {
+        this.selectDatas = this.iniselectDatas;
+        this.$emit("handleFunc", this.iniselectDatas);
+      } else {
+        this.$emit("handleFunc", v);
+      }
+    },
+  },
 };
 </script>

+ 28 - 11
src/views/peopleManages/personComcont/BarChart.vue

@@ -1,9 +1,27 @@
 <template>
   <div class="pieView">
-    <div style="height: 10%;line-height: 30px;text-align: left;padding-left: 10px;width: 100%;color: white;">{{config.title}}</div>
-    <div style="width:100%;height:90%;display: inline-block;overflow: hidden;box-sizing: border-box;">
-      <div :id="config.id"
-           style="width:100%;height:100%;"> </div>
+    <div
+      style="
+        height: 10%;
+        line-height: 30px;
+        text-align: left;
+        padding-left: 10px;
+        width: 100%;
+        color: white;
+      "
+    >
+      {{ config.title }}
+    </div>
+    <div
+      style="
+        width: 100%;
+        height: 90%;
+        display: inline-block;
+        overflow: hidden;
+        box-sizing: border-box;
+      "
+    >
+      <div :id="config.id" style="width: 100%; height: 100%"></div>
     </div>
   </div>
 </template>
@@ -23,25 +41,24 @@ export default {
       type: Object,
       default: {
         title: "title",
-        id: "idSelector"
-      }
-    }
+        id: "idSelector",
+      },
+    },
   },
   mounted() {
     let this_ = this;
     this.$nextTick(() => {
       this_.getMiddleLeft();
-    })
+    });
   },
   methods: {
     getMiddleLeft() {
       var chartDom = document.getElementById(this.config.id);
       var myChart = echarts.init(chartDom);
-      console.log('this.info', this.info)
+      // this.info && myChart.setOption(this.info);
       setTimeout(() => {
         this.info && myChart.setOption(this.info);
-
-      }, 500)
+      }, 500);
     },
   },
 };

+ 217 - 188
src/views/peopleManages/taskStatistics/index.vue

@@ -1,73 +1,103 @@
 <template>
   <div class="personView">
-    <div class="topView"
-         style="width: 100%;height: 11%;">
+    <div class="topView" style="width: 100%; height: 11%">
       <!-- <div class="jbd-title"> 人员管理看板 </div> -->
       <div class="jbd-title">
-        <dv-decoration-8 style="width:20%;height:50px;position: absolute;left: 0px;top: 0px;" />
-        <div style="width:100%">
-          <div style="height:40%;font-size: 22px;margin-top: 10px;">人员管理看板</div>
-          <dv-decoration-5 style="width:30%;height: 50%;margin: 0 auto;" />
+        <dv-decoration-8
+          style="
+            width: 20%;
+            height: 50px;
+            position: absolute;
+            left: 0px;
+            top: 0px;
+          "
+        />
+        <div style="width: 100%">
+          <div style="height: 40%; font-size: 22px; margin-top: 10px">
+            人员管理看板
+          </div>
+          <dv-decoration-5 style="width: 30%; height: 50%; margin: 0 auto" />
         </div>
-        <dv-decoration-8 :reverse="true"
-                         style="width:20%;height:50px;position:absolute;right: 0px;top: 0px;" />
+        <dv-decoration-8
+          :reverse="true"
+          style="
+            width: 20%;
+            height: 50px;
+            position: absolute;
+            right: 0px;
+            top: 0px;
+          "
+        />
       </div>
       <div class="contain">
-        <dv-decoration-11 class="personNum"
-                          style="margin-left:10%"><i class="el-icon-user"
-             style="color:#4ea5d6;margin-right: 3px;"></i> 员工数量:{{ employeeNum   }}人</dv-decoration-11>
-        <dv-border-box-8 class="date"
-                         style="margin-right:10%; display: flex; align-items: center;">
+        <dv-decoration-11 class="personNum" style="margin-left: 10%"
+          ><i
+            class="el-icon-user"
+            style="color: #4ea5d6; margin-right: 3px"
+          ></i>
+          员工数量:{{ employeeNum }}人</dv-decoration-11
+        >
+        <dv-border-box-8
+          class="date"
+          style="margin-right: 10%; display: flex; align-items: center"
+        >
           <!-- 部门选择 -->
           <SelectPositions @handleFunc="handleFunc" />
-          <div style="width:30%;display: inline-block;margin-right: 3px;">统计时间:</div>
-          <el-date-picker style="width:75%;"
-                          v-model="monthValues"
-                          type="monthrange"
-                          align="right"
-                          unlink-panels
-                          range-separator="至"
-                          start-placeholder="开始月份"
-                          end-placeholder="结束月份"
-                          :picker-options="pickerOptions"
-                          @change="changeDate">
+          <div style="width: 30%; display: inline-block; margin-right: 3px">
+            统计时间:
+          </div>
+          <el-date-picker
+            style="width: 75%"
+            v-model="monthValues"
+            type="monthrange"
+            align="right"
+            unlink-panels
+            range-separator="至"
+            start-placeholder="开始月份"
+            end-placeholder="结束月份"
+            :picker-options="pickerOptions"
+            @change="changeDate"
+          >
           </el-date-picker>
         </dv-border-box-8>
       </div>
     </div>
-    <dv-border-box-1 style="width:100%;height:89%; box-sizing: border-box; overflow: hidden;">
-      <div style="height:3%"></div>
+    <dv-border-box-1
+      style="width: 100%; height: 89%; box-sizing: border-box; overflow: hidden"
+    >
+      <div style="height: 3%"></div>
       <div class="middleView">
         <div class="viewLeft">
-          <pieView v-if="degreePieData.data[0].value"
-                   :info="degreePieData" />
+          <pieView v-if="degreePieData.data[0].value" :info="degreePieData" />
         </div>
-        <dv-decoration-2 :reverse="true"
-                         style="width:2%;height: 100%;" />
+        <dv-decoration-2 :reverse="true" style="width: 2%; height: 100%" />
         <div class="viewCenter">
-          <RingChart v-if="ranksPieData.data[2].value"
-                     :info="ranksPieData" />
+          <RingChart v-if="ranksPieData.data[2].value" :info="ranksPieData" />
         </div>
-        <dv-decoration-2 :reverse="true"
-                         style="width:2%;height: 100%;" />
+        <dv-decoration-2 :reverse="true" style="width: 2%; height: 100%" />
         <div class="viewRight">
-          <CarouselTabl v-if="personInfoData.data.length"
-                        :info="personInfoData"
-                        title="员工基本信息列表" />
+          <CarouselTabl
+            v-if="personInfoData.data.length"
+            :info="personInfoData"
+            title="员工基本信息列表"
+          />
         </div>
       </div>
-      <dv-decoration-10 style="height:2%;width:96%; margin: 0 auto;" />
+      <dv-decoration-10 style="height: 2%; width: 96%; margin: 0 auto" />
       <div class="bottomView">
         <div class="detectionTask">
-          <BarChart :info="PositionsOption"
-                    :config="{title:'部门信息统计',id:'positionsId'}" />
+          <BarChart
+            :info="PositionsOption"
+            :config="{ title: '部门信息统计', id: 'positionsId' }"
+          />
         </div>
-        <dv-decoration-2 :reverse="true"
-                         style="width:2%;height: 100%;" />
+        <dv-decoration-2 :reverse="true" style="width: 2%; height: 100%" />
         <div class="taskMatters">
-          <BarChart v-if="optionPersonShow"
-                    :info="optionPerson"
-                    :config="{title:'任务事宜统计',id:'taskMatters'}" />
+          <BarChart
+            v-if="optionPersonShow"
+            :info="optionPerson"
+            :config="{ title: '任务事宜统计', id: 'taskMatters' }"
+          />
         </div>
       </div>
     </dv-border-box-1>
@@ -85,10 +115,9 @@ import ActionUtils from "@/utils/action";
 import { sync } from "@/api/platform/mail/outMail";
 import data from "@/components/ibps-icon-select/data";
 // import ibpsTreeSelect from '@/components/ibps-tree-select'
-import TreeUtils from '@/utils/tree'
+import TreeUtils from "@/utils/tree";
 import SelectPositions from "@/views/component/selectPositions";
 
-
 export default {
   name: "checkBoard1",
   components: {
@@ -99,9 +128,11 @@ export default {
     BarChart: () => import("../personComcont/BarChart"),
   },
   data() {
-    const { level, userId, userInfo } = this.$store.getters
+    const { level, userId, userInfo } = this.$store.getters;
     return {
-      level, userId, userInfo,
+      level,
+      userId,
+      userInfo,
       pkKey: "id", // 主键  如果主键不是pk需要传主键
       pickerOptions: {
         shortcuts: [
@@ -218,7 +249,7 @@ export default {
                 color: ["#00CC33"],
               },
             },
-          }
+          },
         ],
         dataZoom: [
           {
@@ -257,6 +288,10 @@ export default {
             name: "本科",
             value: 0,
           },
+          {
+            name: "高中",
+            value: 0,
+          },
         ],
         color: ["#FFFF00", "#99CC00", "#6666FF"],
         config: { title: "学历学位统计", idSelector: "degreeId" },
@@ -276,10 +311,6 @@ export default {
             name: "初级",
             value: 0,
           },
-          {
-            name: "其他",
-            value: 0,
-          }
         ],
         color: ["#FFFF00", "#99CC00", "#6666FF", "#FF6666"],
         config: { title: "职称统计", idSelector: "ranksid" },
@@ -301,150 +332,146 @@ export default {
       PositionsOption: {
         animation: true,
         tooltip: {
-          trigger: 'axis',
+          trigger: "axis",
           axisPointer: {
-            type: 'shadow'
-          }
+            type: "shadow",
+          },
         },
 
         legend: {
           textStyle: {
-            color: "rgba(251, 251, 251, 1)"
-          }
+            color: "rgba(251, 251, 251, 1)",
+          },
         },
         grid: {
-          left: '3%',
-          right: '4%',
-          bottom: '3%',
-          containLabel: true
+          left: "3%",
+          right: "4%",
+          bottom: "3%",
+          containLabel: true,
         },
         xAxis: [
           {
-            type: 'category',
+            type: "category",
             data: [],
             nameTextStyle: {
               color: "rgba(251, 251, 251, 1)",
-
             },
             axisLabel: {
               textStyle: {
-                color: "rgba(251, 251, 251, 1)"
-
-              }
-            }
-          }
+                color: "rgba(251, 251, 251, 1)",
+              },
+            },
+          },
         ],
         yAxis: [
           {
-            name: '个数(人)',
-            type: 'value',
+            name: "个数(人)",
+            type: "value",
             nameTextStyle: {
-              color: "rgba(251, 251, 251, 1)"
+              color: "rgba(251, 251, 251, 1)",
             },
             axisLabel: {
               textStyle: {
-                color: "rgba(251, 251, 251, 1)"
-
-              }
-            }
-          }
+                color: "rgba(251, 251, 251, 1)",
+              },
+            },
+          },
         ],
         // "高中", "本科", "硕士", "博士", "初级职称", "中级职称", "高级职称"
         series: [
           {
-            name: '高中',
-            type: 'bar',
+            name: "高中",
+            type: "bar",
             emphasis: {
-              focus: 'series'
+              focus: "series",
             },
-            data: []
+            data: [],
           },
           {
-            name: '本科',
-            type: 'bar',
-            stack: 'Ad',
+            name: "本科",
+            type: "bar",
+            stack: "Ad",
             emphasis: {
-              focus: 'series'
+              focus: "series",
             },
-            data: []
+            data: [],
           },
           {
-            name: '硕士',
-            type: 'bar',
-            stack: 'Ad',
+            name: "硕士",
+            type: "bar",
+            stack: "Ad",
             emphasis: {
-              focus: 'series'
+              focus: "series",
             },
-            data: []
+            data: [],
           },
           {
-            name: '博士',
-            type: 'bar',
-            stack: 'Ad',
+            name: "博士",
+            type: "bar",
+            stack: "Ad",
             emphasis: {
-              focus: 'series'
+              focus: "series",
             },
-            data: []
+            data: [],
           },
           {
-            name: '初级职称',
-            type: 'bar',
+            name: "初级职称",
+            type: "bar",
             data: [],
             emphasis: {
-              focus: 'series'
+              focus: "series",
             },
             markLine: {
               lineStyle: {
-                type: 'dashed'
+                type: "dashed",
               },
-              data: [[{ type: 'min' }, { type: 'max' }]]
-            }
+              data: [[{ type: "min" }, { type: "max" }]],
+            },
           },
           {
-            name: '中级职称',
-            type: 'bar',
+            name: "中级职称",
+            type: "bar",
             barWidth: 5,
-            stack: 'Search Engine',
+            stack: "Search Engine",
             emphasis: {
-              focus: 'series'
+              focus: "series",
             },
-            data: []
+            data: [],
           },
           {
-            name: '高级职称',
-            type: 'bar',
-            stack: 'Search Engine',
+            name: "高级职称",
+            type: "bar",
+            stack: "Search Engine",
             emphasis: {
-              focus: 'series'
+              focus: "series",
             },
-            data: []
-          }
-        ]
+            data: [],
+          },
+        ],
       },
       employeeNum: 0,
       employeeInfo: [],
-      selectData: '',
+      selectData: "",
       props: {
-        children: 'children',
-        label: 'NAME_',
-        value: 'ID_',
+        children: "children",
+        label: "NAME_",
+        value: "ID_",
         multiple: true,
-        expandTrigger: 'hover',
+        expandTrigger: "hover",
       },
       selectPositionsDatas: [],
-      nodeKey: 'ID_',
+      nodeKey: "ID_",
       clearable: true,
       value: [],
       options: [],
-      positions: [], // 用于sql条件查询
-      pisitionsValue: [] // 回填给子组件的部门全值
+      otherPositions: [], // 用于其他图sql条件查询
+      positions: [], // 用于部门统计信息sql条件查询
+
+      pisitionsValue: [], // 回填给子组件的部门全值
     };
   },
   computed: {},
   methods: {
-    async getTtaskMattersData() {
-
-    },
     /**
      * 处理按钮事件
      */
@@ -511,16 +538,18 @@ export default {
         (value[0].getDate() > 9
           ? value[0].getDate()
           : "0" + value[0].getDate());
-      this.getTtaskMattersData();
     },
-    //部门基本信息 轮播表数据
+    // 人员基本信息 轮播表数据
     async employeeInfoData() {
       let this_ = this;
       this.personInfoData.data = [];
       let data = [];
       let personInfo = [];
       // let ranksObj = {};
-      let sql = `select a.id_,a.parent_id_,b.name_,a.zui_gao_xue_li_x_,a.zhi_cheng_deng_ji,b.jian_ding_zi_ge_z,a.ru_zhi_shi_jian_ from  t_ryjbqk as a join  ibps_party_employee as b on a.parent_id_= b.id_ where a.id_ !='861622496187645952'`;
+      let sql = `select a.id_,a.parent_id_,ee.name_,a.zui_gao_xue_li_x_,a.zhi_cheng_deng_ji,ee.jian_ding_zi_ge_z,a.ren_zhi_shi_jian_,
+      a.ru_zhi_shi_jian_ from  t_ryjbqk as a join  ibps_party_employee as ee on a.parent_id_= ee.id_ where a.id_ !='861622496187645952' and (${this.otherPositions.join(
+        " or "
+      )})`;
       await curdPost("sql", sql).then((res) => {
         data = res.variables.data;
       });
@@ -532,32 +561,47 @@ export default {
         personInfo.push(item.zui_gao_xue_li_x_ || `   `);
         personInfo.push(item.zhi_cheng_deng_ji || `   `);
         personInfo.push(item.jian_ding_zi_ge_z || `   `);
-        personInfo.push(item.ru_zhi_shi_jian_ || `   `);
+        personInfo.push(item.ren_zhi_shi_jian_ || `   `);
         this.personInfoData.data.push(personInfo || `   `);
       }
     },
     //饼图 环形图数据
     async degreeGradeInfoData() {
+      // this.degreePieData.data = [];
+      // this.ranksPieData.data = [];
       let data = [];
       let sql = `select
                 sum(a.zui_gao_xue_li_x_ = '博士') as doctor,
                 sum(a.zui_gao_xue_li_x_ = '硕士') as Master,
                 sum(a.zui_gao_xue_li_x_ = '本科') as undergraduate,
+                sum(a.zui_gao_xue_li_x_ = '高中') as gaoZhong,
                 sum(a.zhi_cheng_deng_ji = '初级') as elementary,
                 sum(a.zhi_cheng_deng_ji = '中级') as middleRank,
                 sum(a.zhi_cheng_deng_ji = '高级') as senior,
-                sum(a.zhi_cheng_deng_ji = ''||a.zhi_cheng_deng_ji is null) as other
-                from t_ryjbqk as a join  ibps_party_employee as b on a.parent_id_= b.id_ where b.id_ != '702117247933480960'`;
+                sum(a.zhi_cheng_deng_ji = '' || a.zhi_cheng_deng_ji is null) as other
+                from t_ryjbqk as a join  ibps_party_employee as ee on a.parent_id_= ee.id_ where ee.id_ != '702117247933480960' and (${this.otherPositions.join(
+                  " or "
+                )} )`;
       await curdPost("sql", sql).then((res) => {
         data = res.variables.data;
       });
-      this.degreePieData.data[0].value = data[0].doctor;
-      this.degreePieData.data[1].value = data[0].Master;
-      this.degreePieData.data[2].value = data[0].undergraduate;
-      this.ranksPieData.data[0].value = data[0].senior;
-      this.ranksPieData.data[1].value = data[0].middleRank;
-      this.ranksPieData.data[2].value = data[0].elementary;
-      this.ranksPieData.data[3].value = data[0].other;
+      this.degreePieData.data[0].value = data[0].doctor ? data[0].doctor : "";
+      this.degreePieData.data[1].value = data[0].Master ? data[0].Master : "";
+      this.degreePieData.data[2].value = data[0].undergraduate
+        ? data[0].undergraduate
+        : "";
+      this.degreePieData.data[3].value = data[0].gaoZhong
+        ? data[0].gaoZhong
+        : "";
+      this.ranksPieData.data[0].value = data[0].senior ? data[0].senior : "";
+      this.ranksPieData.data[1].value = data[0].middleRank
+        ? data[0].middleRank
+        : "";
+      this.ranksPieData.data[2].value = data[0].elementary
+        ? data[0].elementary
+        : "";
+      // console.log("this.ranksPieData", this.ranksPieData);
+      // console.log("this.degreePieData", this.degreePieData);
     },
     // 部门信息统计
     positionsInfoData() {
@@ -571,33 +615,38 @@ export default {
             sum(gy.zhi_cheng_deng_ji = '高级') AS seniorZ_ FROM (SELECT
             ee.id_ AS eeID,ee.name_ AS eeName,ee.positions_,ry.zui_gao_xue_li_x_,ry.zhi_cheng_deng_ji
             FROM t_ryjbqk AS ry JOIN  ibps_party_employee AS ee ON ry.parent_id_= ee.id_ WHERE ee.id_ != '702117247933480960'
-            )gy LEFT JOIN   ibps_party_entity en ON FIND_IN_SET(en.id_,gy.positions_)  where (${this.positions.join(' or ')}) GROUP BY enName) jh`;
-      //   console.log('sql', sql)
-      //   let sql = `select *from ibps_party_entity`
+            )gy LEFT JOIN   ibps_party_entity en ON FIND_IN_SET(en.id_,gy.positions_)  where (${this.positions.join(
+              " or "
+            )}) GROUP BY enName) jh`;
       curdPost("sql", sql).then((res) => {
         const data = res.variables.data;
         // 组装数据集,以学历职称为列,以部门为行:{"高中":['1','2','3']}
-        let xAxisDatas = this.PositionsOption.xAxis[0].data
-        let seriesDatas = this.PositionsOption.series
+        let xAxisDatas = this.PositionsOption.xAxis[0].data;
+        let seriesDatas = this.PositionsOption.series;
+        this.PositionsOption.xAxis[0].data = [];
+        this.PositionsOption.series = [];
 
         if (data.length !== 0) {
-          console.log('data', data)
           // 跟《部门信息统计配置表》排列顺序一致
-          let shuZuList = ["senior_", "undergraduate_", "Master_", "doctor_", "elementary_", "middleRank_", "seniorZ_"]
+          let shuZuList = [
+            "senior_",
+            "undergraduate_",
+            "Master_",
+            "doctor_",
+            "elementary_",
+            "middleRank_",
+            "seniorZ_",
+          ];
           for (let t = 0; t < data.length; t++) {
-            xAxisDatas.push(data[t].enName)
+            xAxisDatas.push(data[t].enName);
             for (let i = 0; i < seriesDatas.length; i++) {
-              seriesDatas[i].data[t] = data[t][shuZuList[i]]
+              seriesDatas[i].data[t] = data[t][shuZuList[i]];
             }
           }
-          this.PositionsOption.xAxis[0].data = xAxisDatas
-          this.PositionsOption.series = seriesDatas
-          console.log('this.PositionsOption.series',this.PositionsOption.series)
+          this.PositionsOption.xAxis[0].data = xAxisDatas;
+          this.PositionsOption.series = seriesDatas;
         }
-
-
       });
-
     },
     preDate(dateParameter, num) {
       //往前推算日期
@@ -627,35 +676,20 @@ export default {
     },
     // 简化部门信息
     simplifyPosition(v) {
-      this.positions = [] // 用于sql条件查询
+      this.positions = []; // 用于sql条件查询
       for (let i = 0; i < v.length; i++) {
-        this.positions.push(`en.path_ like '%${v[i][v[i].length - 1]}%'`)
+        this.positions.push(`en.path_ like '%${v[i][v[i].length - 1]}%'`);
+        this.otherPositions.push(
+          `ee.positions_ like '%${v[i][v[i].length - 1]}%'`
+        );
       }
     },
-    transfer(oldArr) {
-      const newArr = oldArr[0].map((col, i) => oldArr.map(row => row[i]));
-      return newArr;
-    },
     handleFunc(e) {
-      this.simplifyPosition(e)
-      this.positionsInfoData()
+      this.simplifyPosition(e);
+      this.positionsInfoData();
+      this.employeeInfoData();
+      this.degreeGradeInfoData();
     },
-    /**
-        * 使用match方法实现模糊查询
-        * @param  {Array}  list     进行查询的数组
-        * @param  {String} keyWord  查询的关键词
-        * @return {Array}           查询的结果
-        */
-    fuzzyQuery(list, keyWord) {
-      var arr = [];
-      for (var i = 0; i < list.length; i++) {
-        if (list[i].match(keyWord) != null) {
-          arr.push(list[i]);
-        }
-      }
-      return arr.length == o ? false : true;
-    }
-
   },
   created() {
     const initendDate = new Date();
@@ -674,22 +708,17 @@ export default {
       new Date(this.startDate),
       new Date(
         initendDate.getFullYear() +
-        "-" +
-        (initendDate.getMonth() + 1) +
-        "-" +
-        initendDate.getDate()
+          "-" +
+          (initendDate.getMonth() + 1) +
+          "-" +
+          initendDate.getDate()
       ),
     ];
-
-    this.employeeInfoData();
-    this.degreeGradeInfoData();
-    this.getTtaskMattersData();
-
   },
   mounted() {
+    // this.handleFunc();
     // this.initData()
     // this.positionsInfoData()
-
     // this.initChart();
   },
 };