From b8440d9a6b1671cdf0c8f06cdaba2f80a8dac1e6 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Wed, 13 Nov 2024 14:17:15 +0800
Subject: [PATCH] 退出图标按钮修复
---
src/views/survey/components/box/fireContent.vue | 131 +++++++++++++++----------------------------
1 files changed, 46 insertions(+), 85 deletions(-)
diff --git a/src/views/survey/components/box/fireContent.vue b/src/views/survey/components/box/fireContent.vue
index 6afa14d..0c30979 100644
--- a/src/views/survey/components/box/fireContent.vue
+++ b/src/views/survey/components/box/fireContent.vue
@@ -4,9 +4,9 @@
* @LastEditors: shuishen 1109946754@qq.com
* @LastEditTime: 2024-11-05 17:42:44
* @FilePath: \bigScreen\src\views\survey\components\box\fireContent.vue
- * @Description:
- *
- * Copyright (c) 2024 by shuishen, All Rights Reserved.
+ * @Description:
+ *
+ * Copyright (c) 2024 by shuishen, All Rights Reserved.
-->
<script setup>
import { useEchartsResize } from 'hooks/useEchartsResize'
@@ -27,13 +27,14 @@
{
name: '一般',
itemStyle: {
- color: '#FFFF00'
+ color: '#FFC000'
}
},
{
name: '较大',
itemStyle: {
- color: '#FFC000'
+
+ color: '#F4090F'
}
},
{
@@ -46,105 +47,65 @@
function getRiskSource () {
getRiskSourceStatistic().then(res => {
- let xaxis_data = []
- let yaxis_data = []
- let seriesData = []
- res.data.data.forEach(element => {
- xaxis_data.push(element.riskLevel)
- yaxis_data.push({
- name: element.riskLevel,
- value: element.num
+ let data = res.data.data
+ let dataRsult = []
+ var total = 0;
+ data.forEach(item => {
+ dataRsult.push({
+ name: item.riskLevel,
+ value: item.num,
+ itemStyle: typeLevel.find(i => i.name == item.riskLevel).itemStyle
})
-
- seriesData.push({
- name: element.riskLevel,
- type: 'bar',
- data: [],
- barWidth: '30',
- barGap: '-100%',
- itemStyle: typeLevel.find(i => i.name == element.riskLevel).itemStyle
- })
- })
-
- seriesData = seriesData.map(item => {
- return {
- ...item,
- data: yaxis_data.map(i => {
- return i.name == item.name ? i.value : 0
- })
- }
+ total = total + item.num;
})
myEcharts.setOption({
+ title: {
+ text: "总数",
+ subtext: String(total),
+ textStyle: {
+ fontSize: 16,
+ color: "#fff",
+ lineHeight: 20,
+ },
+ subtextStyle: {
+ fontSize: 28,
+ color: "#fff",
+ },
+ textAlign: "center",
+ right: "43%",
+ top: "36%",
+ },
legend: {
- data: xaxis_data,
- top: "5%",
- right: "5%",
+ orient: "vertical",
+ top: '8%',
+ right: "8%",
textStyle: {
color: '#fff'
}
},
- tooltip: {
- axisPointer: {
- type: 'shadow'
- }
- },
-
grid: {
- top: '16%',
+ top: '6%',
left: '6%',
right: '6%',
bottom: '6%',
containLabel: true
},
- xAxis: [
- {
- type: 'category',
- data: xaxis_data,
- nameTextStyle: {
- color: '#fff'
- },
- axisLine: {
- lineStyle: {
- color: '#fff'
- }
- },
- axisTick: {
- alignWithLabel: true,
- lineStyle: {
- color: '#fff'
- }
- },
- axisLabel: {
- color: '#fff'
- },
- }
- ],
+ tooltip: {
+ trigger: 'item'
+ },
- yAxis: [
+ series: [
{
- type: 'value',
- nameTextStyle: {
- color: '#fff'
- },
- axisLine: {
- lineStyle: {
- color: '#fff'
- }
- },
- axisTick: {
- lineStyle: {
- color: '#fff'
- }
- },
- axisLabel: {
- color: '#fff'
- },
+ // name: 'Access From',
+ type: 'pie',
+ left: '-5%',
+ radius: ['45%', '75%'],
+ data: dataRsult
}
- ],
- series: seriesData
+ ]
})
})
}
@@ -167,4 +128,4 @@
</div>
</template>
-<style lang="scss" scoped></style>
\ No newline at end of file
+<style lang="scss" scoped></style>
--
Gitblit v1.9.3