From 5667e686cd06855143bd01524f5ebf34e6bc12c1 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 11 Sep 2021 09:18:30 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_regulatory

---
 src/views/securityUnitOperation/securityEchart.js |   32 +++++++++-----------------------
 src/views/commandQuery/taskDistribution.vue       |    6 ++++--
 2 files changed, 13 insertions(+), 25 deletions(-)

diff --git a/src/views/commandQuery/taskDistribution.vue b/src/views/commandQuery/taskDistribution.vue
index 17b77b9..2737550 100644
--- a/src/views/commandQuery/taskDistribution.vue
+++ b/src/views/commandQuery/taskDistribution.vue
@@ -170,9 +170,9 @@
                     {
                         label: "接收指令人",
                         prop: "receiveName",
-                        search: true,
+                        // search: true,
+                        // searchSpan: 4,
                         searchLabelWidth: 90,
-                        searchSpan: 4,
                     },
                     {
                         label: "发送指令时间",
@@ -184,6 +184,8 @@
                     {
                         label: "指令内容",
                         prop: "content",
+                        search: true,
+                        searchSpan: 4,
                     },
                     {
                         label: "图片",
diff --git a/src/views/securityUnitOperation/securityEchart.js b/src/views/securityUnitOperation/securityEchart.js
index 2a6812b..3dfa3e3 100644
--- a/src/views/securityUnitOperation/securityEchart.js
+++ b/src/views/securityUnitOperation/securityEchart.js
@@ -405,7 +405,7 @@
       axisLabel: {
         color: "#fff",
         interval: 0,
-        rotate: 40,
+        rotate: 40
       },
       data: [
         "一月",
@@ -441,27 +441,13 @@
 }
 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 qcount = alldata["qcount"] || 0;
+  data.push({ name: "青年", value: qcount });
+  let zcount = alldata["zcount"] || 0;
+  data.push({ name: "中年", value: zcount });
+  let lcount = alldata["lcount"] || 0;
+  data.push({ name: "老年", value: lcount });
+
   let option = {
     tooltip: {
       trigger: "item",
@@ -512,7 +498,7 @@
         type: "pie",
         center: ["33%", "50%"],
         radius: "70%",
-        data:data,
+        data: data,
         label: {
           color: "#fff"
         }

--
Gitblit v1.9.3