From d356332a2003d00ca803b4e73dc404b9643b60d5 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 08 Sep 2021 08:27:53 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_regulatory

---
 src/views/securityUnitOperation/securityEchart.js |   70 ++++++++++++++++++++++++++---------
 1 files changed, 52 insertions(+), 18 deletions(-)

diff --git a/src/views/securityUnitOperation/securityEchart.js b/src/views/securityUnitOperation/securityEchart.js
index 9162c8c..2a6812b 100644
--- a/src/views/securityUnitOperation/securityEchart.js
+++ b/src/views/securityUnitOperation/securityEchart.js
@@ -33,7 +33,7 @@
       containLabel: true
     },
     legend: {
-      data: ["服务对象数量"],
+      data: ["服务客户数量"],
       top: "0%",
       textStyle: {
         color: "#fff"
@@ -89,6 +89,22 @@
   return option;
 }
 function bottomOption1(alldata) {
+  let baoan = [];
+  let chiz = [];
+  let paiq = [];
+  alldata.forEach(item => {
+    for (var i in item) {
+      for (var j in item[i]) {
+        if (i === "baoan") {
+          baoan.push(item[i][j]);
+        } else if (i === "chiz") {
+          chiz.push(item[i][j]);
+        } else if (i === "paiq") {
+          paiq.push(item[i][j]);
+        }
+      }
+    }
+  });
   let option = {
     // title: {
     //   text: "公司运营趋势",
@@ -98,7 +114,6 @@
     // },
     color: [
       "#73c0de",
-
       "#fac858",
       "#91cc75",
       "#3ba272",
@@ -168,19 +183,19 @@
         name: "保安员数量",
         type: "line",
         stack: "总量",
-        data: [120, 132, 101, 134, 90, 230, 210, 113, 221, 42, 152, 111]
+        data: baoan
       },
       {
         name: "派遣数量",
         type: "line",
         stack: "总量",
-        data: [220, 182, 191, 234, 290, 330, 310, 111, 110, 91, 111, 131]
+        data: paiq
       },
       {
         name: "持证数量",
         type: "line",
         stack: "总量",
-        data: [150, 232, 201, 154, 190, 330, 410, 90, 91, 93, 112, 133]
+        data: chiz
       }
     ]
   };
@@ -308,12 +323,12 @@
         barWidth: 9,
         data: chiz
       },
-      {
-        name: "过考保安数",
-        type: "bar",
-        barWidth: 9,
-        data: []
-      },
+      // {
+      //   name: "过考保安数",
+      //   type: "bar",
+      //   barWidth: 9,
+      //   data: []
+      // },
       {
         name: "缴纳社保保安数",
         type: "bar",
@@ -381,7 +396,7 @@
       top: "10%",
       left: "10%",
       right: "2%",
-      bottom: "22%",
+      bottom: "25%",
       containLabel: false
     },
     xAxis: {
@@ -389,7 +404,8 @@
       boundaryGap: true,
       axisLabel: {
         color: "#fff",
-        interval: 0
+        interval: 0,
+        rotate: 40,
       },
       data: [
         "一月",
@@ -424,6 +440,28 @@
   return option;
 }
 function bottomOption2(alldata) {
+  let data = [];
+  for (var key in alldata) {
+    let obj = null;
+    if (key === "lcount") {
+      obj = {
+        name: "老年",
+        value: alldata[key]
+      };
+    } else if (key === "zcount") {
+      obj = {
+        name: "中年",
+        value: alldata[key]
+      };
+    }
+    else if (key === "qcount") {
+      obj = {
+        name: "青年",
+        value: alldata[key]
+      };
+    }
+    data.push(obj);
+  }
   let option = {
     tooltip: {
       trigger: "item",
@@ -474,11 +512,7 @@
         type: "pie",
         center: ["33%", "50%"],
         radius: "70%",
-        data: [
-          { value: 1048, name: "青年" },
-          { value: 735, name: "中年" },
-          { value: 580, name: "老年" }
-        ],
+        data:data,
         label: {
           color: "#fff"
         }

--
Gitblit v1.9.3