From fc0c0f84305c45a60d3d3a254099ca1846bdb818 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 04 Jan 2022 15:43:04 +0800
Subject: [PATCH] 保安员派遣情况统计修改为保安员年龄分布情况统计

---
 src/views/securityAnalysis/index.vue |   35 ++++++++++++++++++++---------------
 1 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/src/views/securityAnalysis/index.vue b/src/views/securityAnalysis/index.vue
index 2e9a331..e5f70bf 100644
--- a/src/views/securityAnalysis/index.vue
+++ b/src/views/securityAnalysis/index.vue
@@ -108,6 +108,7 @@
   getinformationstatistics, //保安员考试情况统计
   getExamStatisInfo, //保安员考试情况统计
   getinformationselectDisp, //保安派遣情况
+  getAgeStatistics, //保安员年龄分布情况
   getinformationselectSoil, //社保缴纳情况统计
   getEducationStatistics
 } from "@/api/securityAnalysis/securityAnalysis";
@@ -792,21 +793,30 @@
     },
     getEC5() {
       var that = this;
-      getinformationselectDisp(this.deptid, this.jurisdiction)
+      getAgeStatistics(this.deptid, this.jurisdiction)
         .then((res) => {
-          var a = res.data.data;
-          // console.log(a, "111111");
-          var b = that.changedata(a, "pnum", "wpnum", "已派遣", "未派遣");
-          that.setEC5(b);
-        })
-        .catch((res) => {
-          var b = that.changedata([], "pnum", "wpnum", "已派遣", "未派遣");
-          that.setEC5(b);
+          var data = res.data.data;
+          var a = [
+            {
+              value:data[0],
+              name:"18-30周岁"
+            },
+            {
+              value:data[1],
+              name:"30-45周岁"
+            },
+            {
+              value:data[2],
+              name:"45-60周岁"
+            },
+          ]
+          console.log(a, "111111");
+          this.setEC5(a);
         });
     },
     setEC5(d) {
       var option;
-      d = this.setColor(d, this.colors);
+      // d = this.setColor(d, this.colors);
       option = {
         title: {
           text: "保安员年龄分布情况统计",
@@ -819,17 +829,13 @@
         },
         toolbox: this.gettoolbox("保安员年龄分布情况查询", "保安员年龄分布情况明细", 5),
         legend: {
-          // orient: "vertical",
-          // left: "left",
           x: "center",
           y: "90%",
         },
         series: [
           {
-            // name: "访问来源",
             type: "pie",
             radius: "50%",
-            // data: d,
             data: d,
             emphasis: {
               itemStyle: {
@@ -839,7 +845,6 @@
               },
             },
             label: {
-              // alignTo: "edge",
               formatter: "{b}\n({d}%)",
             },
           },

--
Gitblit v1.9.3