Kaynağa Gözat

fix:人员管理看板调整

liujiayin 2 yıl önce
ebeveyn
işleme
36349b47bb

+ 5 - 3
src/views/component/selectPositions.vue

@@ -62,6 +62,7 @@ export default {
       curdPost('sql', positonsSql).then((res) => {
         if (res.state === 200) {
           const datas = res.variables.data
+          let positionsValue = []
           if (datas.length > 0) {
             this.options = this.toTree(datas)
             for (var i of this.options) {
@@ -71,10 +72,11 @@ export default {
                 for (var item of result) {
                   let itemArr = item.PATH_.split('.')
                   itemArr.splice(itemArr.length - 1, 1)
-                  this.selectDatas.push(itemArr)
+                  positionsValue.push(itemArr)
                 }
               }
             }
+            this.selectDatas = positionsValue
           }
         }
       })
@@ -85,11 +87,11 @@ export default {
         pIdKey: 'PARENT_ID_',
         childrenKey: 'children'
       })
-    },
+    }
   },
   watch: {
     selectDatas(v) {
-      this.$emit("change-data", v);
+      this.$emit("handleFunc", v);
     }
   }
 };

+ 17 - 13
src/views/peopleManages/personComcont/BarChart.vue

@@ -1,8 +1,9 @@
 <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="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 :id="config.id"
+           style="width:100%;height:100%;"> </div>
     </div>
   </div>
 </template>
@@ -18,26 +19,29 @@ export default {
       type: Object,
       default: {},
     },
-    config:{
-      type:Object,
-      default:{
-        title:"title",
-        id:"idSelector"
+    config: {
+      type: Object,
+      default: {
+        title: "title",
+        id: "idSelector"
       }
     }
   },
   mounted() {
     let this_ = this;
-    this.$nextTick(()=>{
+    this.$nextTick(() => {
       this_.getMiddleLeft();
-  })
-},
+    })
+  },
   methods: {
     getMiddleLeft() {
       var chartDom = document.getElementById(this.config.id);
       var myChart = echarts.init(chartDom);
-      // var option;
-      this.info && myChart.setOption(this.info);
+      console.log('this.info', this.info)
+      setTimeout(() => {
+        this.info && myChart.setOption(this.info);
+
+      }, 500)
     },
   },
 };
@@ -50,6 +54,6 @@ export default {
   box-sizing: border-box;
   overflow: hidden;
   color: white;
-  background-color: rgba(6,30,93,.5);
+  background-color: rgba(6, 30, 93, 0.5);
 }
 </style>

+ 221 - 335
src/views/peopleManages/taskStatistics/index.vue

@@ -19,13 +19,7 @@
         <dv-border-box-8 class="date"
                          style="margin-right:10%; display: flex; align-items: center;">
           <!-- 部门选择 -->
-          <!-- <el-cascader v-model="value"
-                       :options="options"
-                       :props="props"
-                       :collapse-tags="true"
-                       :filterable="true"
-                       @change="handleChange"></el-cascader> -->
-          <SelectPositions @change-data="changeData" />
+          <SelectPositions @handleFunc="handleFunc" />
           <div style="width:30%;display: inline-block;margin-right: 3px;">统计时间:</div>
           <el-date-picker style="width:75%;"
                           v-model="monthValues"
@@ -64,48 +58,17 @@
       </div>
       <dv-decoration-10 style="height:2%;width:96%; margin: 0 auto;" />
       <div class="bottomView">
+        <div class="detectionTask">
+          <BarChart :info="PositionsOption"
+                    :config="{title:'部门信息统计',id:'positionsId'}" />
+        </div>
+        <dv-decoration-2 :reverse="true"
+                         style="width:2%;height: 100%;" />
         <div class="taskMatters">
           <BarChart v-if="optionPersonShow"
                     :info="optionPerson"
                     :config="{title:'任务事宜统计',id:'taskMatters'}" />
         </div>
-        <el-dialog :visible.sync="dialogTableVisible">
-          <div class="dialogbox">
-            <div class="jbd-title-cont"> {{ setParams.seriesName }}-{{ setParams.name }} </div>
-            <div class="ibps">
-              <ibps-crud key="istree"
-                         ref="crud"
-                         :data="formDataFiiter"
-                         :toolbars="listConfig.toolbars"
-                         :search-form="listConfig.searchForm"
-                         :pk-key="pkKey"
-                         :columns="listConfig.columns"
-                         :loading="loading"
-                         @action-event="handleAction"
-                         :pagination="pagination"
-                         @pagination-change="handlePaginationChange">
-                <template slot="jianceyuan"
-                          slot-scope="scope">
-                  <ibps-user-selector :value="scope.row.jian_ce_yuan_"
-                                      type="user"
-                                      :multiple="true"
-                                      :disabled="true"
-                                      readonly-text="text"
-                                      @callback="data => formId = data.id" />
-                </template>
-                <template slot="fuheyuan"
-                          slot-scope="scope">
-                  <ibps-user-selector :value="scope.row.fu_he_yuan_"
-                                      type="user"
-                                      :multiple="true"
-                                      :disabled="true"
-                                      readonly-text="text"
-                                      @callback="data => formId = data.id" />
-                </template>
-              </ibps-crud>
-            </div>
-          </div>
-        </el-dialog>
       </div>
     </dv-border-box-1>
   </div>
@@ -135,9 +98,10 @@ export default {
     RingChart: () => import("../personComcont/RingChart"),
     BarChart: () => import("../personComcont/BarChart"),
   },
-  //   props: {},
   data() {
+    const { level, userId, userInfo } = this.$store.getters
     return {
+      level, userId, userInfo,
       pkKey: "id", // 主键  如果主键不是pk需要传主键
       pickerOptions: {
         shortcuts: [
@@ -172,135 +136,8 @@ export default {
       monthValues: [],
       dialogTableVisible: false,
       getchart: null,
-      option: {
-        title: {
-          text: "",
-        },
-        textAlign: "left",
-        tooltip: {
-          trigger: "axis",
-          axisPointer: {
-            type: "shadow",
-          },
-        },
-        legend: {
-          // show: true,
-          right: "0%",
-          itemGap: 2,
-          itemWidth: 16,
-          textStyle: {
-            color: "#fff",
-          },
-        },
-        grid: {
-          left: "2%",
-          right: "10%",
-          bottom: "3%",
-          containLabel: true,
-        },
-        xAxis: {
-          type: "value",
-          name: "任务数量",
-          nameTextStyle: {
-            color: "#fff",
-          },
-          axisLabel: {
-            formatter: function (v) {
-              return parseInt(v); //表示整数。其他数值类型以此类推
-            },
-            color: "#fff",
-          },
-        },
-        yAxis: {
-          type: "category",
-          name: "检测人员",
-          data: [],
-          color: "#ffffff",
-          axisLabel: {
-            color: "#fff",
-          },
-          nameTextStyle: {
-            color: "#fff",
-          },
-        },
-        series: [
-          {
-            name: "检测未完成数",
-            type: "bar",
-            data: [],
-            label: {
-              show: true,
-              position: "right",
-              valueAnimation: true,
-              color: "#ffff00",
-            },
-            itemStyle: {
-              normal: {
-                color: ["#CC0000"],
-              },
-            },
-          },
-          {
-            name: "检测已完成数",
-            type: "bar",
-            data: [],
-            label: {
-              show: true,
-              position: "right",
-              valueAnimation: true,
-            },
-            itemStyle: {
-              normal: {
-                color: ["#99cc00"],
-              },
-            },
-          },
-          {
-            name: "复核未完成数",
-            type: "bar",
-            data: [],
-            label: {
-              show: true,
-              position: "right",
-              valueAnimation: true,
-            },
-            itemStyle: {
-              normal: {
-                color: ["#FFFF00"],
-              },
-            },
-          },
-          {
-            name: "复核已完成数",
-            type: "bar",
-            data: [],
-            label: {
-              show: true,
-              position: "right",
-              valueAnimation: true,
-            },
-            itemStyle: {
-              normal: {
-                color: ["#7070ff"],
-              },
-            },
-          },
-        ],
-        dataZoom: [
-          {
-            type: "inside",
-            xAxisIndex: 0,
-            filterMode: "filter",
-          },
-          {
-            type: "inside",
-            left: "left",
-            yAxisIndex: 0,
-            filterMode: "none",
-          },
-        ],
-      },
       optionPersonShow: false,
+      // 任务事宜统计图配置
       optionPerson: {
         title: {
           text: "",
@@ -381,22 +218,7 @@ export default {
                 color: ["#00CC33"],
               },
             },
-          },
-          {
-            name: "逾期未完成数",
-            type: "bar",
-            data: [],
-            label: {
-              show: true,
-              position: "right",
-              valueAnimation: true,
-            },
-            itemStyle: {
-              normal: {
-                color: ["#faff72"],
-              },
-            },
-          },
+          }
         ],
         dataZoom: [
           {
@@ -415,31 +237,6 @@ export default {
       setParams: {},
       formData: [],
       formDataFiiter: [],
-      listConfig: {
-        // 工具栏
-        toolbars: [{ key: "search" }],
-        // 查询条件
-        searchForm: {
-          forms: [
-            { prop: "yang_pin_bian_hao", label: "样品编号" },
-            { prop: "yang_pin_ming_che", label: "样品名称" },
-            { prop: "yang_pin_lei_xing", label: "样品类型" },
-            { prop: "shi_fou_he_ge_", label: "是否合格" },
-          ],
-        },
-        // 表格字段配置
-        columns: [
-          { prop: "wei_tuo_lei_xing_", label: "委托类型" },
-          { prop: "jian_ce_zhuang_ta", label: "检测状态" },
-          { prop: "yang_pin_lei_xing", label: "样品类型" },
-          { prop: "yang_pin_bian_hao", label: "样品编号" },
-          { prop: "yang_pin_ming_che", label: "样品名称" },
-          { prop: "ji_lu_bian_hao_", label: "记录编号" },
-          { prop: "shi_fou_he_ge_", label: "是否合格" },
-          { prop: "jian_ce_yuan_", label: "检测员", slotName: "jianceyuan" },
-          { prop: "fu_he_yuan_", label: "复核员", slotName: "fuheyuan" },
-        ],
-      },
       startDate: "2023-03-01",
       endDate: "",
       chartData: [],
@@ -487,89 +284,166 @@ export default {
         color: ["#FFFF00", "#99CC00", "#6666FF", "#FF6666"],
         config: { title: "职称统计", idSelector: "ranksid" },
       },
+      // 员工基本信息图配置表
       personInfoData: {
         //员工基本信息轮播表
+        // header: ["部门", "高中", "本科", "硕士", "博士", "初级职称", "中级职称", "高级职称"],
+        // data: [],
+        // columnWidth: ["140", "80", "80", "80", "80", "80", "80", "80"],
         header: ["姓名", "学历学位", "职称", "员工编号", "入职时间"],
         data: [],
-        columnWidth: ["140", "90", "80", "120", "120"],
+        columnWidth: ["90", "90", "80", "120", "120"],
         rowNum: 7,
         align: "center",
         hoverPause: true,
       },
+      // 部门信息统计配置表
+      PositionsOption: {
+        animation: true,
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow'
+          }
+        },
+
+        legend: {
+          textStyle: {
+            color: "rgba(251, 251, 251, 1)"
+          }
+        },
+        grid: {
+          left: '3%',
+          right: '4%',
+          bottom: '3%',
+          containLabel: true
+        },
+        xAxis: [
+          {
+            type: 'category',
+            data: [],
+            nameTextStyle: {
+              color: "rgba(251, 251, 251, 1)",
+
+            },
+            axisLabel: {
+              textStyle: {
+                color: "rgba(251, 251, 251, 1)"
+
+              }
+            }
+          }
+        ],
+        yAxis: [
+          {
+            name: '个数(人)',
+            type: 'value',
+            nameTextStyle: {
+              color: "rgba(251, 251, 251, 1)"
+            },
+            axisLabel: {
+              textStyle: {
+                color: "rgba(251, 251, 251, 1)"
+
+              }
+            }
+          }
+        ],
+        // "高中", "本科", "硕士", "博士", "初级职称", "中级职称", "高级职称"
+        series: [
+          {
+            name: '高中',
+            type: 'bar',
+            emphasis: {
+              focus: 'series'
+            },
+            data: []
+          },
+          {
+            name: '本科',
+            type: 'bar',
+            stack: 'Ad',
+            emphasis: {
+              focus: 'series'
+            },
+            data: []
+          },
+          {
+            name: '硕士',
+            type: 'bar',
+            stack: 'Ad',
+            emphasis: {
+              focus: 'series'
+            },
+            data: []
+          },
+          {
+            name: '博士',
+            type: 'bar',
+            stack: 'Ad',
+            emphasis: {
+              focus: 'series'
+            },
+            data: []
+          },
+          {
+            name: '初级职称',
+            type: 'bar',
+            data: [],
+            emphasis: {
+              focus: 'series'
+            },
+            markLine: {
+              lineStyle: {
+                type: 'dashed'
+              },
+              data: [[{ type: 'min' }, { type: 'max' }]]
+            }
+          },
+          {
+            name: '中级职称',
+            type: 'bar',
+            barWidth: 5,
+            stack: 'Search Engine',
+            emphasis: {
+              focus: 'series'
+            },
+            data: []
+          },
+          {
+            name: '高级职称',
+            type: 'bar',
+            stack: 'Search Engine',
+            emphasis: {
+              focus: 'series'
+            },
+            data: []
+          }
+        ]
+      },
       employeeNum: 0,
       employeeInfo: [],
       selectData: '',
       props: {
         children: 'children',
         label: 'NAME_',
+        value: 'ID_',
         multiple: true,
         expandTrigger: 'hover',
-
       },
+      selectPositionsDatas: [],
       nodeKey: 'ID_',
       clearable: true,
       value: [],
-      options: []
+      options: [],
+      positions: [], // 用于sql条件查询
+      pisitionsValue: [] // 回填给子组件的部门全值
     };
   },
   computed: {},
   methods: {
     async getTtaskMattersData() {
-      let this_ = this;
-      this.optionPersonShow = false;
-      this_.optionPerson.yAxis.data = [];
-      this_.optionPerson.series[0].data = [];
-      this_.optionPerson.series[1].data = [];
-      let create_by_ = "";
-      let data = [];
-      let csData = [];
-      let yibanData1 = [];
-      let yibanData2 = [];
-      let personIds = "";
-      for (let item of this.employeeInfo) {
-        create_by_ += create_by_ + "," + item.id_;
-      }
-      create_by_ = create_by_.slice(0, create_by_.length - 1);
-      let sql = `select  executor_,count(executor_) as num ,c.name_ FROM  IBPS_BPM_TASKS as a join IBPS_BPM_TASK_ASSIGN as b  on a.task_id_ = b.task_id_ join ibps_party_employee as c on b.executor_ = c.id_ and  c.STATUS_= 'actived' and c.ID_ != '1' and c.ID_ != '-1' and c.ID_ != '702117247933480960' and c.GROUP_ID_ not like '%1041786072788369408%'   GROUP BY  executor_ order by c.CREATE_TIME_ asc `;
-      await curdPost("sql", sql).then((res) => {
-        data = res.variables.data;
-      });
-      for (let item of data) {
-        this_.optionPerson.yAxis.data.push(item.name_);
-        this_.optionPerson.series[0].data.push(item.num);
-      }
-      //超时
-      let cssql = `select  executor_ ,count(executor_) as num ,c.name_,a.create_time_ FROM  IBPS_BPM_TASKS as a join IBPS_BPM_TASK_ASSIGN as b  on a.task_id_ = b.task_id_ join ibps_party_employee as c on b.executor_ = c.id_
-                  where now()> SUBDATE(a.create_time_,interval - 3 day) and  c.STATUS_= 'actived' and c.ID_ != '1' and c.ID_ != '-1' and c.ID_ != '702117247933480960' and c.GROUP_ID_ not like '%1041786072788369408%'  GROUP BY  executor_  order by  c.CREATE_TIME_ asc `;
-      await curdPost("sql", cssql).then((res) => {
-        csData = res.variables.data;
-      });
-      for (let it of csData) {
-        this_.optionPerson.series[2].data.push(it.num);
-        personIds += "'" + it.executor_ + "',";
-      }
-      personIds = personIds.slice(0, personIds.length - 1);
-      let yibansql1 = `select count(AUDITOR_) as num,AUDITOR_,name_,STATUS_,CREATE_TIME_ from (select a.AUDITOR_,b.name_,a.STATUS_,b.CREATE_TIME_ from IBPS_BPM_APPROVAL as a join ibps_party_employee as b on a.AUDITOR_ = b.id_
-                      where  a.CREATE_TIME_ > '${this.startDate}' and a.CREATE_TIME_ < '${this.endDate}' and b.id_ in(${personIds})   group by a.PROC_inst_ID_) as zz  group by AUDITOR_  order by  CREATE_TIME_ asc `;
-      await curdPost("sql", yibansql1).then((res) => {
-        yibanData1 = res.variables.data;
-      });
-      let yibansql2 = `select count(AUDITOR_) as num,AUDITOR_,name_,STATUS_,CREATE_TIME_ from (select a.PROC_inst_ID_,b.name_,a.AUDITOR_,a.STATUS_,b.CREATE_TIME_ from IBPS_BPM_APPROVAL_HIS as a join ibps_party_employee as b on a.AUDITOR_ = b.id_
-                        where  a.CREATE_TIME_ > '${this.startDate}' and  a.CREATE_TIME_ < '${this.endDate}' and b.id_ in(${personIds})  group by a.PROC_inst_ID_) as bb  group by AUDITOR_ order by  CREATE_TIME_ asc `;
-      await curdPost("sql", yibansql2).then((res) => {
-        yibanData2 = res.variables.data;
-      });
 
-      for (let items of yibanData1) {
-        for (let el of yibanData2) {
-          if (items.AUDITOR_ == el.AUDITOR_) {
-            this_.optionPerson.series[1].data.push(
-              Number(items.num) + Number(el.num)
-            );
-          }
-        }
-      }
-      this.optionPersonShow = true;
     },
     /**
      * 处理按钮事件
@@ -593,65 +467,6 @@ export default {
       this.pagination = page;
       this.paginationFunc(this.formData);
     },
-    // 图表数据加载
-    async chartLoading() {
-      //   // 获取所有检测人员任务统计
-      //   let this_ = this;
-      //   const sql = `select  *FROM (SELECT ie.ID_ AS jcId,ie.NAME_ AS jcName,COUNT(tj.zhuang_tai_ = '待数据输入' OR NULL) AS jianCeWeiWanCheng,COUNT(tj.zhuang_tai_ = '待数据校验' OR tj.zhuang_tai_ = '已完成' OR NULL) AS jianCeYiWanCheng FROM
-      //                       t_lhjczb tj,ibps_party_employee ie
-      //                       WHERE ie.positions_ like '%1040709034740547584%' and tj.jian_ce_yuan_ = ie.ID_ AND tj.update_time_ BETWEEN '${this.startDate}' AND '${this.endDate}' GROUP BY jian_ce_yuan_
-      //                       ) jc  LEFT JOIN
-      //                       (
-      //                       SELECT ie.ID_ AS fhId,ie.NAME_ AS fhName,COUNT(tj.zhuang_tai_ = '待数据校验' OR NULL) AS fuHeWeiWanCheng,COUNT(tj.zhuang_tai_ = '已完成' OR NULL) AS fuHeYiWanCheng FROM
-      //                       t_lhjczb tj,ibps_party_employee ie
-      //                       WHERE ie.positions_ like '%1040709034740547584%' and tj.fu_he_yuan_ = ie.ID_ AND tj.update_time_ BETWEEN  '${this.startDate}' AND '${this.endDate}' GROUP BY fu_he_yuan_
-      //                       ) fh ON jc.jcName = fh.fhName
-      //                       UNION (
-      //                       SELECT  *FROM (SELECT ie.ID_ AS jcId, ie.NAME_ AS jcName,COUNT(tj.zhuang_tai_ = '待数据输入' OR NULL) AS jianCeWeiWanCheng,COUNT(tj.zhuang_tai_ = '待数据校验' OR tj.zhuang_tai_ = '已完成' OR NULL) AS jianCeYiWanCheng FROM
-      //                       t_lhjczb tj,ibps_party_employee ie
-      //                       WHERE tj.jian_ce_yuan_ = ie.ID_ AND tj.update_time_ BETWEEN  '${this.startDate}' AND '${this.endDate}' GROUP BY jian_ce_yuan_
-      //                       ) jc  RIGHT JOIN
-      //                       (
-      //                       SELECT ie.ID_ AS fhId,ie.NAME_ AS fhName,COUNT(tj.zhuang_tai_ = '待数据校验' OR NULL) AS fuHeWeiWanCheng,COUNT(tj.zhuang_tai_ = '已完成' OR NULL) AS fuHeYiWanCheng FROM
-      //                       t_lhjczb tj,ibps_party_employee ie
-      //                       WHERE ie.positions_ like '%1040709034740547584%' and tj.fu_he_yuan_ = ie.ID_ AND tj.update_time_ BETWEEN  '${this.startDate}' AND '${this.endDate}' GROUP BY fu_he_yuan_
-      //                       ) fh ON jc.jcName = fh.fhName
-      //                       )`;
-      //   // console.log(sql,"sql")
-      //   this.option.yAxis.data = [];
-      //   this.option.series[0].data = [];
-      //   this.option.series[1].data = [];
-      //   this.option.series[2].data = [];
-      //   this.option.series[3].data = [];
-      //   this.chartData = [];
-      //   await curdPost("sql", sql)
-      //     .then((res) => {
-      //       const data = res.variables.data;
-      //       for (let i of data) {
-      //         this_.option.yAxis.data.push(i.jcName ? i.jcName : i.fhName);
-      //         // 检测未完成数
-      //         this_.option.series[0].data.push(
-      //           i.jianCeWeiWanCheng ? i.jianCeWeiWanCheng : 0
-      //         );
-      //         // 检测已完成数
-      //         this_.option.series[1].data.push(
-      //           i.jianCeYiWanCheng ? i.jianCeYiWanCheng : 0
-      //         );
-      //         // 复核未完成数
-      //         this_.option.series[2].data.push(
-      //           i.fuHeWeiWanCheng ? i.fuHeWeiWanCheng : 0
-      //         );
-      //         // 复核已完成数
-      //         this_.option.series[3].data.push(
-      //           i.fuHeYiWanCheng ? i.fuHeYiWanCheng : 0
-      //         );
-      //         this_.chartData.push(i);
-      //       }
-      //     })
-      //     .catch((error) => {
-      //       console.log(error);
-      //     });
-    },
     /**
      * 数据分页
      * par:[]
@@ -696,10 +511,9 @@ export default {
         (value[0].getDate() > 9
           ? value[0].getDate()
           : "0" + value[0].getDate());
-      this.chartLoading();
       this.getTtaskMattersData();
     },
-    //员工基本信息 轮播表数据
+    //部门基本信息 轮播表数据
     async employeeInfoData() {
       let this_ = this;
       this.personInfoData.data = [];
@@ -745,6 +559,46 @@ export default {
       this.ranksPieData.data[2].value = data[0].elementary;
       this.ranksPieData.data[3].value = data[0].other;
     },
+    // 部门信息统计
+    positionsInfoData() {
+      let sql = `select jh.*from (select  en.id_ ,en.name_ AS enName,  
+            sum(gy.zui_gao_xue_li_x_ = '博士') AS doctor_,
+            sum(gy.zui_gao_xue_li_x_ = '硕士') AS Master_,
+            sum(gy.zui_gao_xue_li_x_ = '本科') AS undergraduate_,
+            sum(gy.zui_gao_xue_li_x_ = '高中') AS senior_,
+            sum(gy.zhi_cheng_deng_ji = '初级') AS elementary_,
+            sum(gy.zhi_cheng_deng_ji = '中级') AS middleRank_,
+            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`
+      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
+
+        if (data.length !== 0) {
+          console.log('data', data)
+          // 跟《部门信息统计配置表》排列顺序一致
+          let shuZuList = ["senior_", "undergraduate_", "Master_", "doctor_", "elementary_", "middleRank_", "seniorZ_"]
+          for (let t = 0; t < data.length; t++) {
+            xAxisDatas.push(data[t].enName)
+            for (let i = 0; i < seriesDatas.length; 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)
+        }
+
+
+      });
+
+    },
     preDate(dateParameter, num) {
       //往前推算日期
       var translateDate = "",
@@ -771,9 +625,37 @@ export default {
       dateString = newDate.getFullYear() + "-" + monthString + "-" + dayString;
       return dateString;
     },
-    changeData(v) {
-      console.log('changeDataVVVV',v)
+    // 简化部门信息
+    simplifyPosition(v) {
+      this.positions = [] // 用于sql条件查询
+      for (let i = 0; i < v.length; i++) {
+        this.positions.push(`en.path_ 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()
+    },
+    /**
+        * 使用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();
@@ -798,12 +680,16 @@ export default {
         initendDate.getDate()
       ),
     ];
-    this.chartLoading();
+
     this.employeeInfoData();
     this.degreeGradeInfoData();
     this.getTtaskMattersData();
+
   },
   mounted() {
+    // this.initData()
+    // this.positionsInfoData()
+
     // this.initChart();
   },
 };