From dc9a330c08865f901f7527f98d4bcfcdf03ba93e Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Mon, 25 Nov 2024 09:35:34 +0800
Subject: [PATCH] 代码优化
---
src/views/survey/components/box/fireContent.vue | 33 +++++++++++++++++++++------------
1 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/src/views/survey/components/box/fireContent.vue b/src/views/survey/components/box/fireContent.vue
index 0c30979..f8ae271 100644
--- a/src/views/survey/components/box/fireContent.vue
+++ b/src/views/survey/components/box/fireContent.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-11-04 16:32:04
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-05 17:42:44
+ * @LastEditTime: 2024-11-19 15:33:32
* @FilePath: \bigScreen\src\views\survey\components\box\fireContent.vue
* @Description:
*
@@ -27,13 +27,13 @@
{
name: '一般',
itemStyle: {
- color: '#FFC000'
+ color: '#FFC000'
}
},
{
name: '较大',
itemStyle: {
-
+
color: '#F4090F'
}
},
@@ -45,18 +45,18 @@
}
]
-function getRiskSource () {
+function getRiskSource() {
getRiskSourceStatistic().then(res => {
let data = res.data.data
let dataRsult = []
- var total = 0;
+ var total = 0
data.forEach(item => {
dataRsult.push({
name: item.riskLevel,
value: item.num,
itemStyle: typeLevel.find(i => i.name == item.riskLevel).itemStyle
})
- total = total + item.num;
+ total = total + item.num
})
myEcharts.setOption({
@@ -73,16 +73,18 @@
color: "#fff",
},
textAlign: "center",
- right: "43%",
+ left: "62%",
+ // right: "43%",
top: "36%",
},
+
legend: {
orient: "vertical",
- top: '8%',
- right: "8%",
+ top: "40%",
+ left: "5%",
textStyle: {
- color: '#fff'
- }
+ color: "#fff",
+ },
},
grid: {
@@ -103,7 +105,14 @@
type: 'pie',
left: '-5%',
radius: ['45%', '75%'],
- data: dataRsult
+ data: dataRsult,
+ left: "25%",
+ label: {
+ show: false,
+ },
+ labelLine: {
+ show: false,
+ },
}
]
})
--
Gitblit v1.9.3