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 |   45 ++++++++++++++++++++++++++++++++-------------
 1 files changed, 32 insertions(+), 13 deletions(-)

diff --git a/src/views/securityUnitOperation/securityEchart.js b/src/views/securityUnitOperation/securityEchart.js
index 215f700..2a6812b 100644
--- a/src/views/securityUnitOperation/securityEchart.js
+++ b/src/views/securityUnitOperation/securityEchart.js
@@ -323,12 +323,12 @@
         barWidth: 9,
         data: chiz
       },
-      {
-        name: "过考保安数",
-        type: "bar",
-        barWidth: 9,
-        data: []
-      },
+      // {
+      //   name: "过考保安数",
+      //   type: "bar",
+      //   barWidth: 9,
+      //   data: []
+      // },
       {
         name: "缴纳社保保安数",
         type: "bar",
@@ -396,7 +396,7 @@
       top: "10%",
       left: "10%",
       right: "2%",
-      bottom: "22%",
+      bottom: "25%",
       containLabel: false
     },
     xAxis: {
@@ -404,7 +404,8 @@
       boundaryGap: true,
       axisLabel: {
         color: "#fff",
-        interval: 0
+        interval: 0,
+        rotate: 40,
       },
       data: [
         "一月",
@@ -439,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",
@@ -489,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