From b6d9bbb38cc344d1538439750c3db5a4a6b0d79a Mon Sep 17 00:00:00 2001
From: zhengpz <1838927346@qq.com>
Date: Sun, 22 Aug 2021 17:53:53 +0800
Subject: [PATCH] 首页及表完善
---
src/views/securityUnitOperation/securityEchart.js | 113 +++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 94 insertions(+), 19 deletions(-)
diff --git a/src/views/securityUnitOperation/securityEchart.js b/src/views/securityUnitOperation/securityEchart.js
index f88d5c9..9162c8c 100644
--- a/src/views/securityUnitOperation/securityEchart.js
+++ b/src/views/securityUnitOperation/securityEchart.js
@@ -26,15 +26,15 @@
"#96dee8"
],
grid: {
- top: "10%",
+ top: "15%",
left: "3%",
right: "4%",
- bottom: "15%",
+ bottom: "0%",
containLabel: true
},
legend: {
- data: ["趋势"],
- bottom: "0%",
+ data: ["服务对象数量"],
+ top: "0%",
textStyle: {
color: "#fff"
}
@@ -71,7 +71,6 @@
]
},
yAxis: {
- name: "(元)",
type: "value",
axisLabel: {
color: "#fff"
@@ -79,7 +78,7 @@
},
series: [
{
- name: "趋势",
+ name: "服务对象数量",
data: data,
type: "line",
smooth: true,
@@ -113,21 +112,21 @@
"#96dee8"
],
grid: {
- top: "10%",
+ top: "15%",
left: "3%",
right: "4%",
- bottom: "15%",
+ bottom: "0%",
containLabel: true
},
legend: {
- data: ["趋势"],
- bottom: "0%",
+ data: ["保安员数量", "派遣数量", "持证数量"],
+ top: "0%",
textStyle: {
color: "#fff"
}
},
tooltip: {
- trigger: "item",
+ trigger: "axis",
backgroundColor: "#031952",
color: "#fff",
borderWidth: "0", //边框宽度设置1
@@ -158,7 +157,7 @@
]
},
yAxis: {
- name: "(元)",
+ // name: "(元)",
type: "value",
axisLabel: {
color: "#fff"
@@ -166,11 +165,22 @@
},
series: [
{
- name: "趋势",
- data: [10, 20, 14, 15, 16, 17, 24, 15, 3, 7, 11, 23],
+ name: "保安员数量",
type: "line",
- smooth: true,
- areaStyle: {}
+ stack: "总量",
+ data: [120, 132, 101, 134, 90, 230, 210, 113, 221, 42, 152, 111]
+ },
+ {
+ name: "派遣数量",
+ type: "line",
+ stack: "总量",
+ data: [220, 182, 191, 234, 290, 330, 310, 111, 110, 91, 111, 131]
+ },
+ {
+ name: "持证数量",
+ type: "line",
+ stack: "总量",
+ data: [150, 232, 201, 154, 190, 330, 410, 90, 91, 93, 112, 133]
}
]
};
@@ -413,8 +423,72 @@
};
return option;
}
+function bottomOption2(alldata) {
+ let option = {
+ tooltip: {
+ trigger: "item",
+ formatter: "{a}<br>{b}:{c}({d}%)",
+ axisPointer: {
+ type: "shadow"
+ },
+ backgroundColor: "#031952", //设置背景图片 rgba格式
+ color: "#fff",
+ borderWidth: "0", //边框宽度设置1
+ // borderColor: "gray", //设置边框颜色
+ textStyle: {
+ color: "#fff" //设置文字颜色
+ }
+ },
+ // legend: {
+ // data: ["青年", "中年", "老年"],
+ // top: "0%",
+ // itemHeight: 10,
+ // textStyle: {
+ // color: "#fff"
+ // }
+ // },
+ color: [
+ "#73c0de",
+ "#fac858",
+ "#91cc75",
+ "#3ba272",
+ "#fc8452",
+ "#9a60b4",
+ "#3fb1e3",
+ "#6be6c1",
+ "#626c91",
+ "#a0a7e6",
+ "#c4ebad",
+ "#96dee8"
+ ],
+ grid: {
+ top: "10%",
+ left: "5%",
+ right: "30%",
+ bottom: "4%",
+ containLabel: true
+ },
+ series: [
+ {
+ name: "年龄结构",
+ type: "pie",
+ center: ["33%", "50%"],
+ radius: "70%",
+ data: [
+ { value: 1048, name: "青年" },
+ { value: 735, name: "中年" },
+ { value: 580, name: "老年" }
+ ],
+ label: {
+ color: "#fff"
+ }
+ }
+ ]
+ };
+ return option;
+}
-function economicMiddle(data1,data2) {
+function economicMiddle(data1, data2) {
let sbData = [];
let pqData = [];
for (var a in data1) {
@@ -576,7 +650,7 @@
},
data: [
{ value: allData.PCount, name: "已派遣人数" },
- { value: allData.WPCount, name: "未派遣人" }
+ { value: allData.WPCount, name: "未派遣人数" }
]
}
]
@@ -590,5 +664,6 @@
middleOption1,
middleOption2,
economicMiddle,
- economicPieOption
+ economicPieOption,
+ bottomOption2
};
--
Gitblit v1.9.3