Ver código fonte

fix:人员管理看板

liujiayin 2 anos atrás
pai
commit
1c3a0cae4b

+ 8 - 7
src/views/component/selectPositions.vue

@@ -1,10 +1,12 @@
 <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>
   
@@ -84,7 +86,6 @@ export default {
                 }
               }
             }
-            console.log('positionsValue',positionsValue)
             this.selectDatas = positionsValue;
             if (this.iniselectDatas.length == 0) {
               this.iniselectDatas = positionsValue;

+ 14 - 10
src/views/peopleManages/personComcont/BarChart.vue

@@ -1,24 +1,27 @@
 <template>
   <div class="pieView">
-    <div style="
+    <div
+      style="
         height: 10%;
         line-height: 30px;
         text-align: left;
         padding-left: 10px;
         width: 100%;
         color: white;
-      ">
+      "
+    >
       {{ config.title }}
     </div>
-    <div style="
+    <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>
@@ -60,11 +63,12 @@ export default {
   watch: {
     info: {
       handler(newVal, oldVal) {
-        this.getMiddleLeft()
+        console.log("11111");
+        this.getMiddleLeft();
       },
-      deep: true
-    }
-  }
+      deep: true,
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 32 - 19
src/views/peopleManages/personComcont/RingChart.vue

@@ -1,9 +1,23 @@
 <template>
   <div class="pieView">
-    <div style="height: 16%;line-height: 30px;text-align: left;padding-left: 10px;color: white;">{{info.config.title||""}}</div>
-    <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
+      style="
+        height: 16%;
+        line-height: 30px;
+        text-align: left;
+        padding-left: 10px;
+        color: white;
+      "
+    >
+      {{ info.config.title || "" }}
+    </div>
+    <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>
   </div>
 </template>
@@ -43,38 +57,38 @@ export default {
         },
         tooltip: {
           trigger: "item",
-          formatter: ''
+          formatter: "",
         },
         color: this.info.color,
         legend: {
           // show: true,
           z: 2,
-          top: '2%',
+          top: "2%",
           // orient: 'vertical',
-          left: 'right',
+          left: "right",
           textStyle: {
-            color: '#fff'
-          }
+            color: "#fff",
+          },
         },
         label: {
-          formatter: '{b}:{d}%'
+          formatter: "{b}:{d}%",
         },
         series: [
           {
             // name: "Access From",
             type: "pie",
             radius: ["40%", "70%"],
-            top: '16%',
+            top: "16%",
             right: "5%",
             left: "5%",
-            bottom: '2%',
+            bottom: "2%",
             avoidLabelOverlap: false,
             label: {
               show: true,
               // fontSize: 20,
               position: "outside",
               fontWeight: "bold",
-              alignTo: 'edge',
+              alignTo: "edge",
               margin: "1px",
               fontSize: 12,
               // color:'#fff'
@@ -88,7 +102,7 @@ export default {
             },
             labelLine: {
               show: false,
-              distanceToLabelLine: 0
+              distanceToLabelLine: 0,
             },
             data: this.info.data,
           },
@@ -100,12 +114,11 @@ export default {
   watch: {
     info: {
       handler(newVal, oldVal) {
-        this.getMiddleLeft()
+        this.getMiddleLeft();
       },
-      deep: true
-    }
-  }
-
+      deep: true,
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>

+ 255 - 266
src/views/peopleManages/taskStatistics/index.vue

@@ -1,86 +1,98 @@
 <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="
+        <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="
+        <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">
+          <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">
+    <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 :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 :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 :info="personInfoData"
-                        title="员工基本信息列表" />
+          <CarouselTabl :info="personInfoData" title="员工基本信息列表" />
         </div>
       </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' }" />
+          <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 :info="optionPerson"
-                    :config="{ title: '任务事宜统计', id: 'taskMatters' }" />
+          <BarChart
+            :info="optionPerson"
+            :config="{ title: '任务事宜统计', id: 'taskMatters' }"
+          />
         </div>
       </div>
     </dv-border-box-1>
@@ -88,17 +100,9 @@
 </template>
 
 <script>
-import * as echarts from "echarts";
 import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
 import pieView from "@/views/system/jbdHome/board/component/getPieView";
 import CarouselTabl from "@/views/system/jbdHome/board/component/CarouselTabl";
-// import { pending, handledTask } from '@/api/platform/office/bpmReceived'
-// import { queryPageList } from '@/api/platform/bpmn/bpmTask'
-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 SelectPositions from "@/views/component/selectPositions";
 
 export default {
@@ -111,12 +115,17 @@ export default {
     BarChart: () => import("../personComcont/BarChart"),
   },
   data() {
-    const { level, userId, userInfo } = this.$store.getters;
     return {
-      level,
-      userId,
-      userInfo,
-      pkKey: "id", // 主键  如果主键不是pk需要传主键
+      monthValues: [],
+      startDate: "2023-03-01",
+      endDate: "",
+      employeeNum: 0,
+      employeeInfo: [],
+      options: [],
+      otherPositions: [], // 用于其他图sql条件查询
+      positions: [], // 用于部门统计信息sql条件查询
+      pisitionsValue: [], // 回填给子组件的部门全值
+      // 日期选择配置
       pickerOptions: {
         shortcuts: [
           {
@@ -147,115 +156,7 @@ export default {
           },
         ],
       },
-      monthValues: [],
-      dialogTableVisible: false,
-      getchart: null,
-      optionPersonShow: false,
-      // 任务事宜统计图配置
-      optionPerson: {
-        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: [],
-          axisLabel: {
-            color: "#fff",
-          },
-          nameTextStyle: {
-            color: "#fff",
-          },
-        },
-        series: [
-          {
-            name: "待办事宜数",
-            type: "bar",
-            data: [],
-            label: {
-              show: true,
-              position: "right",
-              valueAnimation: true,
-            },
-            itemStyle: {
-              normal: {
-                color: ["#7070ff"],
-              },
-            },
-          },
-          {
-            name: "已办事宜数",
-            type: "bar",
-            data: [],
-            label: {
-              show: true,
-              position: "right",
-              valueAnimation: true,
-            },
-            itemStyle: {
-              normal: {
-                color: ["#00CC33"],
-              },
-            },
-          },
-        ],
-        dataZoom: [
-          {
-            type: "inside",
-            xAxisIndex: 0,
-            filterMode: "filter",
-          },
-          {
-            type: "inside",
-            left: "left",
-            yAxisIndex: 0,
-            filterMode: "none",
-          },
-        ],
-      },
-      setParams: {},
-      formData: [],
-      formDataFiiter: [],
-      startDate: "2023-03-01",
-      endDate: "",
-      chartData: [],
-      pagination: { limit: 20, page: 1 },
-      loading: false,
+      // 学位统计图配置
       degreePieData: {
         //学位学历
         data: [
@@ -274,11 +175,12 @@ export default {
           {
             name: "高中",
             value: 0,
-          }
+          },
         ],
         color: ["#FFFF00", "#99CC00", "#6666FF", "#c91f37"],
         config: { title: "学历学位统计", idSelector: "degreeId" },
       },
+      // 职称统计图配置
       ranksPieData: {
         //职称
         data: [
@@ -293,17 +195,13 @@ export default {
           {
             name: "初级",
             value: 0,
-          }
+          },
         ],
         color: ["#FFFF00", "#99CC00", "#6666FF"],
         config: { title: "职称统计", idSelector: "ranksid" },
       },
       // 员工基本信息图配置表
       personInfoData: {
-        //员工基本信息轮播表
-        // header: ["部门", "高中", "本科", "硕士", "博士", "初级职称", "中级职称", "高级职称"],
-        // data: [],
-        // columnWidth: ["140", "80", "80", "80", "80", "80", "80", "80"],
         header: ["姓名", "学历学位", "职称", "员工编号", "入职时间"],
         data: [],
         columnWidth: ["120", "90", "80", "120", "120"],
@@ -432,71 +330,106 @@ export default {
           },
         ],
       },
-      employeeNum: 0,
-      employeeInfo: [],
-      selectData: "",
-      props: {
-        children: "children",
-        label: "NAME_",
-        value: "ID_",
-        multiple: true,
-        expandTrigger: "hover",
+      // 任务事宜统计图配置
+      optionPerson: {
+        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: [],
+          axisLabel: {
+            color: "#fff",
+          },
+          nameTextStyle: {
+            color: "#fff",
+          },
+        },
+        series: [
+          {
+            name: "待办事宜数",
+            type: "bar",
+            data: [],
+            label: {
+              show: true,
+              position: "right",
+              valueAnimation: true,
+            },
+            itemStyle: {
+              normal: {
+                color: ["#7070ff"],
+              },
+            },
+          },
+          {
+            name: "已办事宜数",
+            type: "bar",
+            data: [],
+            label: {
+              show: true,
+              position: "right",
+              valueAnimation: true,
+            },
+            itemStyle: {
+              normal: {
+                color: ["#00CC33"],
+              },
+            },
+          },
+        ],
+        dataZoom: [
+          {
+            type: "inside",
+            xAxisIndex: 0,
+            filterMode: "filter",
+          },
+          {
+            type: "inside",
+            left: "left",
+            yAxisIndex: 0,
+            filterMode: "none",
+          },
+        ],
       },
-      selectPositionsDatas: [],
-      nodeKey: "ID_",
-      clearable: true,
-      value: [],
-      options: [],
-      otherPositions: [], // 用于其他图sql条件查询
-      positions: [], // 用于部门统计信息sql条件查询
-
-      pisitionsValue: [], // 回填给子组件的部门全值
-      degreePieDataShow: false,
-      // 定时器
     };
   },
-  computed: {},
   methods: {
-    /**
-     * 处理按钮事件
-     */
-    handleAction(command, position, selection, data) {
-      switch (command) {
-        case "search": // 查询
-          const params = this.$refs["crud"]
-            ? this.$refs["crud"].getSearcFormData()
-            : {};
-          this.formLoading();
-          break;
-        default:
-          break;
-      }
-    },
-    /**
-     * 处理分页事件
-     */
-    handlePaginationChange(page) {
-      this.pagination = page;
-      this.paginationFunc(this.formData);
-    },
-    /**
-     * 数据分页
-     * par:[]
-     * pagination: { limit: 20, page: 1 },
-     */
-    paginationFunc(par) {
-      this.formDataFiiter = [];
-      for (
-        var i =
-          this.pagination.limit * this.pagination.page - this.pagination.limit;
-        i < this.pagination.limit * this.pagination.page;
-        i++
-      ) {
-        if (i < this.formData.length) {
-          this.formDataFiiter.push(this.formData[i]);
-        }
-      }
-    },
     changeDate(value) {
       let year = value[1].getFullYear();
       let month = value[1].getMonth() + 1;
@@ -523,6 +456,7 @@ export default {
         (value[0].getDate() > 9
           ? value[0].getDate()
           : "0" + value[0].getDate());
+      this.getTtaskMattersData();
     },
     // 人员基本信息 轮播表数据
     async employeeInfoData() {
@@ -570,8 +504,8 @@ export default {
                 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 ee on a.parent_id_= ee.id_ where ee.id_ != '702117247933480960' and (${this.otherPositions.join(
-        " or "
-      )} )`;
+                  " or "
+                )} )`;
       await curdPost("sql", sql).then((res) => {
         data = res.variables.data;
       });
@@ -590,7 +524,6 @@ export default {
       this.ranksPieData.data[2].value = data[0].elementary
         ? data[0].elementary
         : 0;
-      this.degreePieDataShow = true
     },
     // 部门信息统计
     positionsInfoData() {
@@ -605,8 +538,8 @@ export default {
             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`;
+              " or "
+            )}) GROUP BY enName) jh`;
       curdPost("sql", sql).then((res) => {
         const data = res.variables.data;
         // 组装数据集,以学历职称为列,以部门为行:{"高中":['1','2','3']}
@@ -643,6 +576,83 @@ export default {
         }
       });
     },
+    // 个人任务统计
+    async getTtaskMattersData() {
+      let this_ = this;
+      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 ,ee.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 ee on b.executor_ = ee.id_ and
+                ee.STATUS_= 'actived' and ee.ID_ != '1' and ee.ID_ != '-1' and ee.ID_ != '702117247933480960' and (${this.otherPositions.join(
+                  " or "
+                )} ) and  a.CREATE_TIME_  between '${this.startDate}' and '${
+        this.endDate
+      }'
+                and ee.GROUP_ID_ not like '%1041786072788369408%'   GROUP BY  executor_ order by ee.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 ,ee.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 ee on b.executor_ = ee.id_
+                  where now()> SUBDATE(a.create_time_,interval - 3 day) and  ee.STATUS_= 'actived' and (${this.otherPositions.join(
+                    " or "
+                  )} )
+                  and ee.ID_ != '1' and ee.ID_ != '-1' and ee.ID_ != '702117247933480960' and ee.GROUP_ID_ not like '%1041786072788369408%'
+                  GROUP BY  executor_  order by  ee.CREATE_TIME_ asc `;
+      await curdPost("sql", cssql).then((res) => {
+        csData = res.variables.data;
+      });
+      for (let it of csData) {
+        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_,ee.name_,
+                      a.STATUS_,ee.CREATE_TIME_ from IBPS_BPM_APPROVAL as a join ibps_party_employee as ee on a.AUDITOR_ = ee.id_
+                      where  a.CREATE_TIME_  between '${this.startDate}' and '${
+        this.endDate
+      }' and (${this.otherPositions.join(" or ")} ) and
+                                    ee.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_,
+                        ee.name_,a.AUDITOR_,a.STATUS_,ee.CREATE_TIME_ from IBPS_BPM_APPROVAL_HIS as a join ibps_party_employee as ee on a.AUDITOR_ = ee.id_
+                        where  a.CREATE_TIME_  between '${
+                          this.startDate
+                        }' and '${
+        this.endDate
+      }' and ee.id_ and (${this.otherPositions.join(" or ")} )
+                        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)
+            );
+          }
+        }
+      }
+    },
     preDate(dateParameter, num) {
       //往前推算日期
       var translateDate = "",
@@ -672,7 +682,7 @@ export default {
     // 简化部门信息
     simplifyPosition(v) {
       this.positions = []; // 用于sql条件查询
-      this.otherPositions = []
+      this.otherPositions = [];
       for (let i = 0; i < v.length; i++) {
         this.positions.push(`en.path_ like '%${v[i][v[i].length - 1]}%'`);
         this.otherPositions.push(
@@ -680,23 +690,22 @@ export default {
         );
       }
     },
-    handleFunc(e) {
-      this.simplifyPosition(e);
+    handleAllGetFunc() {
       this.positionsInfoData();
       this.employeeInfoData();
       this.degreeGradeInfoData();
+      this.getTtaskMattersData();
+    },
+    handleFunc(e) {
+      this.simplifyPosition(e);
+      this.handleAllGetFunc();
     },
     // 定时任务调用接口,一分钟一次
     intervalHandle() {
       this.interval = setInterval(() => {
-        //your codes
-        this.positionsInfoData();
-        this.employeeInfoData();
-        this.degreeGradeInfoData();
-      }, 180000)
-
-    }
-
+        this.handleAllGetFunc();
+      }, 180000);
+    },
   },
   created() {
     const initendDate = new Date();
@@ -715,10 +724,10 @@ export default {
       new Date(this.startDate),
       new Date(
         initendDate.getFullYear() +
-        "-" +
-        (initendDate.getMonth() + 1) +
-        "-" +
-        initendDate.getDate()
+          "-" +
+          (initendDate.getMonth() + 1) +
+          "-" +
+          initendDate.getDate()
       ),
     ];
   },
@@ -727,7 +736,7 @@ export default {
   },
   beforeDestroy() {
     if (this.interval) {
-      clearInterval(this.interval)
+      clearInterval(this.interval);
     }
   },
 };
@@ -829,25 +838,5 @@ export default {
     top: 55px;
     border: 1px solid rgb(241, 238, 238);
   }
-  // /deep/ .el-dialog {
-  //   height: 80%;
-  //   width: 80%;
-  // }
-
-  // /deep/ .el-dialog__header {
-  //   border: 0;
-  // }
-
-  // /deep/ .el-pagination__rightwrapper1 {
-  //   display: none;
-  // }
-
-  // /deep/ .ibps-container-crud__header {
-  //   margin-top: 55px;
-  // }
-
-  // /deep/ .el-dialog__headerbtn {
-  //   z-index: 9999;
-  // }
 }
 </style>

+ 73 - 44
src/views/system/jbdHome/board/component/getPieView.vue

@@ -1,12 +1,38 @@
 <template>
   <div class="pieView">
-    <div style="height: 14%;line-height: 30px;text-align: left;padding-left: 10px;color: white;">{{info.config.title||""}}</div>
-    <div style="width:100%;height:86%;display: inline-block; overflow: hidden;" v-show="showChart">
-      <div :id="info.config.idSelector"
-           style="width:100%;height:95%;overflow: hidden;"> </div>
+    <div
+      style="
+        height: 14%;
+        line-height: 30px;
+        text-align: left;
+        padding-left: 10px;
+        color: white;
+      "
+    >
+      {{ info.config.title || "" }}
     </div>
-    <div style="background: #061237; width: 100%;height: 70%;display: flex;justify-content: cne;justify-content: center;align-items: center;" v-if="!showChart">
-      <div style="color:#c7c7c7;">目前无数据</div>
+    <div
+      style="width: 100%; height: 86%; display: inline-block; overflow: hidden"
+      v-show="showChart"
+    >
+      <div
+        :id="info.config.idSelector"
+        style="width: 100%; height: 95%; overflow: hidden"
+      ></div>
+    </div>
+    <div
+      style="
+        background: #061237;
+        width: 100%;
+        height: 70%;
+        display: flex;
+        justify-content: cne;
+        justify-content: center;
+        align-items: center;
+      "
+      v-if="!showChart"
+    >
+      <div style="color: #c7c7c7">目前无数据</div>
     </div>
   </div>
 </template>
@@ -16,80 +42,83 @@ import * as echarts from "echarts";
 export default {
   data() {
     return {
-      showChart:true,
-    }
+      showChart: true,
+    };
   },
   props: {
     info: {
       type: Object,
-      default: {}
-    }
+      default: {},
+    },
   },
   mounted() {
     let this_ = this;
     this.$nextTick(() => {
       this_.getMiddleLeft();
-    })
+    });
   },
   methods: {
     getMiddleLeft() {
-      
       let chartDom = document.getElementById(this.info.config.idSelector);
       var myChart = echarts.init(chartDom);
-      const radius = window.innerWidth > 1600 ? '55%' : '45%';
+      const radius = window.innerWidth > 1600 ? "55%" : "45%";
       let inData = this.info.data;
       let num = 0;
-      for(let i in inData){
+      for (let i in inData) {
         num += inData[i].value;
       }
-      if(num == 0){
+      if (num == 0) {
         this.showChart = false;
+      } else {
+        this.showChart = true;
       }
       var option;
       option = {
         title: {
           show: true,
-          left: 'center',
+          left: "center",
           textStyle: {
-            color: '#fff',
+            color: "#fff",
             fontSize: 20,
-            fontWeight: '600'
+            fontWeight: "600",
           },
         },
         color: this.info.color,
         tooltip: {
-          trigger: 'item',
-          formatter: '{d}%'
+          trigger: "item",
+          formatter: "{d}%",
         },
         label: {
-          formatter: '{b}\n({d}%)',
-          edgeDistance: "20%"
+          formatter: "{b}\n({d}%)",
+          edgeDistance: "20%",
         },
 
         legend: {
           show: true,
           z: 3,
-          left: 'right',
+          left: "right",
           textStyle: {
-            color: '#fff'
-          }
-        },
-        series: [{
-          type: 'pie',
-          radius: radius,
-          center: ['50%', '50%'],
-          data: this.info.data,
-          emphasis: {
-            itemStyle: {
-              shadowBlur: 10,
-              shadowOffsetX: 0,
-              shadowColor: 'rgba(0, 0, 0, 0.5)'
-            }
+            color: "#fff",
           },
-          labelLine: {
-            distanceToLabelLine: 0,
+        },
+        series: [
+          {
+            type: "pie",
+            radius: radius,
+            center: ["50%", "50%"],
+            data: this.info.data,
+            emphasis: {
+              itemStyle: {
+                shadowBlur: 10,
+                shadowOffsetX: 0,
+                shadowColor: "rgba(0, 0, 0, 0.5)",
+              },
+            },
+            labelLine: {
+              distanceToLabelLine: 0,
+            },
           },
-        }]
+        ],
       };
       myChart.setOption(option);
     },
@@ -97,11 +126,11 @@ export default {
   watch: {
     info: {
       handler(newVal, oldVal) {
-        this.getMiddleLeft()
+        this.getMiddleLeft();
       },
-      deep: true
-    }
-  }
+      deep: true,
+    },
+  },
 };
 </script>
 <style lang="scss" scoped>