From 0e4d44c2f5a7511d2eee72deecb76b5ba67358cd Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 04 Jan 2022 17:39:41 +0800
Subject: [PATCH] 智能分析查询明细样式调整

---
 src/views/securityAnalysis/index.vue |   89 +++++++++++++++++++++++++-------------------
 1 files changed, 50 insertions(+), 39 deletions(-)

diff --git a/src/views/securityAnalysis/index.vue b/src/views/securityAnalysis/index.vue
index 3ce72e1..51d9507 100644
--- a/src/views/securityAnalysis/index.vue
+++ b/src/views/securityAnalysis/index.vue
@@ -40,7 +40,7 @@
     </div>
     <div class="securityAnalysisright">
       <div class="dispatchSecurity" ref="ech5">
-        <!-- 保安派遣情况统计
+        <!-- 保安员年龄分布情况统计
         <div>饼图</div> -->
       </div>
       <div class="socialSecurity" ref="ech6">
@@ -50,12 +50,13 @@
     </div>
     <div>
       <el-dialog
-        width="90%"
+        width="80%"
         :title="titles"
         append-to-body
         :visible.sync="dialogVisible"
-        top="8vh"
-        height="70%"
+        lock-scroll="false"
+        top="1vh"
+        center
       >
         <situation
           :card="{ deptId: deptid, jurisdiction: jurisdiction }"
@@ -108,6 +109,7 @@
   getinformationstatistics, //保安员考试情况统计
   getExamStatisInfo, //保安员考试情况统计
   getinformationselectDisp, //保安派遣情况
+  getAgeStatistics, //保安员年龄分布情况
   getinformationselectSoil, //社保缴纳情况统计
   getEducationStatistics
 } from "@/api/securityAnalysis/securityAnalysis";
@@ -616,6 +618,12 @@
     // },
     //后改,考试数据统计
     setEC3(data) {
+      //获取年份
+      // let year = new Date().getFullYear();
+      // var timeData = [];
+      // for (let index = 1; index < 13; index++) {
+      //   timeData.push(year+"-"+ index );
+      // }
       const seriesdata = [];
       data.forEach((item) => {
         if (item.type == 1) {
@@ -641,6 +649,20 @@
           });
         }
       });
+      var datetime = [
+              "1月",
+              "2月",
+              "3月",
+              "4月",
+              "5月",
+              "6月",
+              "7月",
+              "8月",
+              "9月",
+              "10月",
+              "11月",
+              "12月",
+            ]
       //echarts 图表数据
       var option = {
         title: {
@@ -672,20 +694,7 @@
         xAxis: [
           {
             type: "category",
-            data: [
-              "1月",
-              "2月",
-              "3月",
-              "4月",
-              "5月",
-              "6月",
-              "7月",
-              "8月",
-              "9月",
-              "10月",
-              "11月",
-              "12月",
-            ],
+            data: datetime
           },
         ],
         yAxis: [
@@ -782,7 +791,6 @@
         },
         series: [
           {
-            // data: dd,
             data: data,
             type: "bar",
           },
@@ -792,24 +800,33 @@
     },
     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: "保安派遣情况统计",
+          text: "保安员年龄分布情况统计",
           // subtext: "纯属虚构",
           top: 25,
           left: "center",
@@ -817,19 +834,15 @@
         tooltip: {
           trigger: "item",
         },
-        toolbox: this.gettoolbox("派遣情况查询", "保安员派遣情况明细", 5),
+        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 +852,6 @@
               },
             },
             label: {
-              // alignTo: "edge",
               formatter: "{b}\n({d}%)",
             },
           },
@@ -861,15 +873,14 @@
       // d = this.setColor(d, this.colors);
       option = {
         title: {
-          text: "保安员学历分布统计",
-          // subtext: "纯属虚构",
+          text: "保安员学历分布情况统计",
           top: 25,
           left: "center",
         },
         tooltip: {
           trigger: "item",
         },
-        toolbox: this.gettoolbox("社保缴纳查询", "保安员社保缴纳明细", 6),
+        toolbox: this.gettoolbox("保安员学历分布情况查询", "保安员学历分布情况明细", 6),
         legend: {
           // orient: "vertical",
           // left: "left",

--
Gitblit v1.9.3