From 5e367440cdb817f0bb1125aba2c41052d14aa1b5 Mon Sep 17 00:00:00 2001
From: wangyunfei <1224056307@qq,com>
Date: Thu, 6 Nov 2025 12:09:02 +0800
Subject: [PATCH] ym
---
src/assets/business_Emergency/bgDrill3.svg | 14 ++
src/assets/business_Emergency/bgMan2.svg | 12 ++
src/assets/business_Emergency/bgMan3.svg | 12 ++
src/assets/business_Emergency/bgMan4.svg | 7 +
src/assets/business_Emergency/bgMan5.svg | 6 +
.../components/EventWarningManagement.js | 121 ++++++++++--------
.../components/EventWarningManagement.less | 95 +++++++-------
7 files changed, 169 insertions(+), 98 deletions(-)
create mode 100644 src/assets/business_Emergency/bgDrill3.svg
create mode 100644 src/assets/business_Emergency/bgMan2.svg
create mode 100644 src/assets/business_Emergency/bgMan3.svg
create mode 100644 src/assets/business_Emergency/bgMan4.svg
create mode 100644 src/assets/business_Emergency/bgMan5.svg
diff --git a/src/assets/business_Emergency/bgDrill3.svg b/src/assets/business_Emergency/bgDrill3.svg
new file mode 100644
index 0000000..30bff28
--- /dev/null
+++ b/src/assets/business_Emergency/bgDrill3.svg
@@ -0,0 +1,14 @@
+
diff --git a/src/assets/business_Emergency/bgMan2.svg b/src/assets/business_Emergency/bgMan2.svg
new file mode 100644
index 0000000..3eb509d
--- /dev/null
+++ b/src/assets/business_Emergency/bgMan2.svg
@@ -0,0 +1,12 @@
+
diff --git a/src/assets/business_Emergency/bgMan3.svg b/src/assets/business_Emergency/bgMan3.svg
new file mode 100644
index 0000000..62db118
--- /dev/null
+++ b/src/assets/business_Emergency/bgMan3.svg
@@ -0,0 +1,12 @@
+
diff --git a/src/assets/business_Emergency/bgMan4.svg b/src/assets/business_Emergency/bgMan4.svg
new file mode 100644
index 0000000..1d6bd8d
--- /dev/null
+++ b/src/assets/business_Emergency/bgMan4.svg
@@ -0,0 +1,7 @@
+
diff --git a/src/assets/business_Emergency/bgMan5.svg b/src/assets/business_Emergency/bgMan5.svg
new file mode 100644
index 0000000..5baa35f
--- /dev/null
+++ b/src/assets/business_Emergency/bgMan5.svg
@@ -0,0 +1,6 @@
+
diff --git a/src/pages/business_emergencyAccident/components/EventWarningManagement.js b/src/pages/business_emergencyAccident/components/EventWarningManagement.js
index 76d55f9..3a6500e 100644
--- a/src/pages/business_emergencyAccident/components/EventWarningManagement.js
+++ b/src/pages/business_emergencyAccident/components/EventWarningManagement.js
@@ -1,9 +1,9 @@
import React, { useState, useEffect, useRef } from 'react';
import { Button, Segmented, Tag } from 'antd';
-import {
- ExclamationCircleOutlined,
- FolderOutlined,
- FileTextOutlined,
+import {
+ ExclamationCircleOutlined,
+ FolderOutlined,
+ FileTextOutlined,
PlusOutlined,
EditOutlined,
EyeOutlined
@@ -12,6 +12,12 @@ import * as echarts from 'echarts';
import StandardTable from '@/components/StandardTable';
import styles from './EventWarningManagement.less';
+// import bgMan1 from '@/assets/business_Emergency/bgMan1.svg';
+import bgMan2 from '@/assets/business_Emergency/bgMan2.svg';
+import bgMan3 from '@/assets/business_Emergency/bgMan3.svg';
+import bgMan4 from '@/assets/business_Emergency/bgMan4.svg';
+import bgMan5 from '@/assets/business_Emergency/bgMan5.svg';
+
const EventWarningManagement = () => {
const [timeType, setTimeType] = useState('month');
const lineChartRef = useRef(null);
@@ -92,16 +98,17 @@ const EventWarningManagement = () => {
grid: {
left: '3%',
right: '4%',
- top: '25%',
+ top: '15%',
bottom: '3%',
containLabel: true
},
legend: {
- data: ['气象灾害', '安全事故', '公共卫生', '社会安全'],
- top: '5%',
+ data: ['气象灾害', '安全事故', '公共卫生'],
+ top: '0%',
left: 'center',
itemGap: 30,
- icon: 'line',
+ itemWidth: 18, // 图例图标宽度
+ itemHeight: 8, // 图例图标高度
textStyle: {
color: '#666666',
fontSize: 12
@@ -161,11 +168,11 @@ const EventWarningManagement = () => {
itemStyle: {
color: '#ffffff',
borderColor: '#8979FF',
- borderWidth: 2
+ borderWidth: 1
},
lineStyle: {
color: '#8979FF',
- width: 2
+ width: 1
},
areaStyle: {
color: {
@@ -185,9 +192,9 @@ const EventWarningManagement = () => {
symbolKeepAspect: true,
emphasis: {
itemStyle: {
- color: '#ffffff',
+ color: '#fff',
borderColor: '#8979FF',
- borderWidth: 2
+ borderWidth: 1
}
}
},
@@ -199,11 +206,11 @@ const EventWarningManagement = () => {
itemStyle: {
color: '#ffffff',
borderColor: '#FF928A',
- borderWidth: 2
+ borderWidth: 1
},
lineStyle: {
color: '#FF928A',
- width: 2
+ width: 1
},
areaStyle: {
color: {
@@ -223,9 +230,9 @@ const EventWarningManagement = () => {
symbolKeepAspect: true,
emphasis: {
itemStyle: {
- color: '#ffffff',
+ color: '#fff',
borderColor: '#FF928A',
- borderWidth: 2
+ borderWidth: 1
}
}
},
@@ -237,11 +244,11 @@ const EventWarningManagement = () => {
itemStyle: {
color: '#ffffff',
borderColor: '#3CC3DF',
- borderWidth: 2
+ borderWidth: 1
},
lineStyle: {
color: '#3CC3DF',
- width: 2
+ width: 1
},
areaStyle: {
color: {
@@ -261,9 +268,9 @@ const EventWarningManagement = () => {
symbolKeepAspect: true,
emphasis: {
itemStyle: {
- color: '#ffffff',
+ color: '#fff',
borderColor: '#3CC3DF',
- borderWidth: 2
+ borderWidth: 1
}
}
}
@@ -302,21 +309,23 @@ const EventWarningManagement = () => {
const option = {
legend: {
orient: 'vertical',
- right: 20,
+ right: 30,
top: 'center',
itemGap: 15,
+ itemWidth: 14,
+ itemHeight: 3,
textStyle: {
color: '#666666',
fontSize: 12
},
- formatter: function(name) {
+ formatter: function (name) {
return name;
}
},
series: [
{
type: 'pie',
- radius: ['40%', '70%'],
+ radius: ['45%', '75%'],
center: ['35%', '50%'],
avoidLabelOverlap: false,
label: {
@@ -326,10 +335,10 @@ const EventWarningManagement = () => {
show: false
},
data: [
- { value: 35, name: '气象灾害', itemStyle: { color: '#4B69F1' } },
- { value: 25, name: '社会安全', itemStyle: { color: '#44BB5F' } },
+ { value: 65, name: '气象灾害', itemStyle: { color: '#4B69F1' } },
+ { value: 10, name: '社会安全', itemStyle: { color: '#44BB5F' } },
{ value: 20, name: '公共卫生', itemStyle: { color: '#A493FB' } },
- { value: 20, name: '社会安全', itemStyle: { color: '#FFD85A' } }
+ { value: 5, name: '安全事故', itemStyle: { color: '#FFD85A' } }
]
}
]
@@ -370,61 +379,68 @@ const EventWarningManagement = () => {
title: '预警编号',
dataIndex: 'alertId',
key: 'alertId',
- width: 180
+ width: 180,
+ align: 'center'
},
{
title: '预警类型',
dataIndex: 'alertType',
key: 'alertType',
- width: 120
- },
- {
- title: '预警级别',
- dataIndex: 'alertLevel',
- key: 'alertLevel',
- width: 100,
- render: (text) => {
- let color = '#ff4d4f';
- if (text === '中级') color = '#ff9800';
- if (text === '低级') color = '#36cfc9';
- return