From 8221fbd90e5d91efd414c5bdc038c165308347bc Mon Sep 17 00:00:00 2001 From: wangyunfei <1224056307@qq,com> Date: Mon, 24 Nov 2025 09:43:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A3=8E=E9=99=A9=E7=AE=A1=E6=8E=A7=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/OnlineMonitoring.js | 48 +++++++++++++++++-- .../components/OnlineMonitoring.less | 10 ++++ .../ResponsibilityImplementation.js | 1 + .../ResponsibilityImplementation.less | 10 ++++ .../components/RiskAssessment.js | 40 +++++++++++++--- 5 files changed, 100 insertions(+), 9 deletions(-) diff --git a/src/pages/safe_majorHazard/components/OnlineMonitoring.js b/src/pages/safe_majorHazard/components/OnlineMonitoring.js index 047b795..2f1cb3a 100644 --- a/src/pages/safe_majorHazard/components/OnlineMonitoring.js +++ b/src/pages/safe_majorHazard/components/OnlineMonitoring.js @@ -1,6 +1,6 @@ import React, { useEffect, useRef, useState } from 'react'; -import { Card, Result, Select, Button } from 'antd'; +import { Card, Result, Select, Button, Modal } from 'antd'; import * as echarts from 'echarts'; import StandardTable from '@/components/StandardTable'; import styles from './OnlineMonitoring.less'; @@ -23,6 +23,7 @@ const OnlineMonitoring = () => { pageSize: 5, total: 0, }); + const [deleteModalVisible, setDeleteModalVisible] = useState(false); useEffect(() => { if (chartRef.current) { @@ -474,8 +475,23 @@ const OnlineMonitoring = () => { // 可以在这里添加提示用户选择行的逻辑 return; } - console.log('批量删除', selectedRowKeys); - // 这里可以添加批量删除逻辑 + // 显示删除确认弹窗 + setDeleteModalVisible(true); + }; + + // 确认删除 + const handleConfirmDelete = () => { + console.log('确认删除', selectedRowKeys); + // 这里可以添加实际的删除逻辑 + // 例如:调用API删除数据,然后更新列表 + setDeleteModalVisible(false); + setSelectedRowKeys([]); + setSelectedRows([]); + }; + + // 取消删除 + const handleCancelDelete = () => { + setDeleteModalVisible(false); }; return ( @@ -708,6 +724,32 @@ const OnlineMonitoring = () => { /> + + {/* 删除确认弹窗 */} + +

确定删除该条报警信息吗?

+
); }; diff --git a/src/pages/safe_majorHazard/components/OnlineMonitoring.less b/src/pages/safe_majorHazard/components/OnlineMonitoring.less index 283ce83..dab582b 100644 --- a/src/pages/safe_majorHazard/components/OnlineMonitoring.less +++ b/src/pages/safe_majorHazard/components/OnlineMonitoring.less @@ -916,4 +916,14 @@ } } +} + +// 删除确认弹窗样式 +.deleteModal { + :global(.ant-modal-content) { + background: linear-gradient(180deg, #EAEEFF 0%, #FFFFFF 20.19%, #FFFFFF 100%); + } + :global(.ant-modal-header) { + background: transparent !important; + } } \ No newline at end of file diff --git a/src/pages/safe_majorHazard/components/ResponsibilityImplementation.js b/src/pages/safe_majorHazard/components/ResponsibilityImplementation.js index 3487abe..5d94214 100644 --- a/src/pages/safe_majorHazard/components/ResponsibilityImplementation.js +++ b/src/pages/safe_majorHazard/components/ResponsibilityImplementation.js @@ -510,6 +510,7 @@ const ResponsibilityImplementation = () => { okText="确定" cancelText="取消" width={800} + wrapClassName={styles.addResponsibleModal} okButtonProps={{ style: { backgroundColor: '#2E4CD4', diff --git a/src/pages/safe_majorHazard/components/ResponsibilityImplementation.less b/src/pages/safe_majorHazard/components/ResponsibilityImplementation.less index 1c7687a..d19246c 100644 --- a/src/pages/safe_majorHazard/components/ResponsibilityImplementation.less +++ b/src/pages/safe_majorHazard/components/ResponsibilityImplementation.less @@ -320,4 +320,14 @@ color: #333333; font-weight: 500; } +} + +// 新增责任人弹窗样式 +.addResponsibleModal { + :global(.ant-modal-content) { + background: linear-gradient(180deg, #EAEEFF 0%, #FFFFFF 20.19%, #FFFFFF 100%); + } + :global(.ant-modal-header) { + background: transparent !important; + } } \ No newline at end of file diff --git a/src/pages/safe_majorHazard/components/RiskAssessment.js b/src/pages/safe_majorHazard/components/RiskAssessment.js index ad4430f..23c8263 100644 --- a/src/pages/safe_majorHazard/components/RiskAssessment.js +++ b/src/pages/safe_majorHazard/components/RiskAssessment.js @@ -46,11 +46,14 @@ const RiskAssessment = () => { data: ['重大风险', '较高风险', '一般风险', '低风险'], top: "-3px", left: "center", - itemGap: 40, // 图例间距 + itemGap: 40, + itemWidth: 20, + itemHeight: 9, textStyle: { fontSize: 10 } }, + grid: { left: '2%', right: '4%', @@ -58,6 +61,7 @@ const RiskAssessment = () => { top: '12%', containLabel: true }, + xAxis: { type: 'category', boundaryGap: false, @@ -97,7 +101,13 @@ const RiskAssessment = () => { ] } }, - symbol: 'none', + symbol: 'none', + symbolSize: 6, + itemStyle: { + color: '#fff', + borderColor: '#FF2526', + borderWidth: 1 + }, data: [8, 15, 12, 22, 18, 26, 20] }, { @@ -122,6 +132,12 @@ const RiskAssessment = () => { } }, symbol: 'none', + symbolSize: 6, + itemStyle: { + color: '#fff', + borderColor: '#FF8800', + borderWidth: 1 + }, data: [5, 8, 6, 12, 10, 15, 13] }, { @@ -146,6 +162,12 @@ const RiskAssessment = () => { } }, symbol: 'none', + symbolSize: 6, + itemStyle: { + color: '#fff', + borderColor: '#FFC403', + borderWidth: 1 + }, data: [12, 18, 15, 25, 22, 24, 26] }, { @@ -170,6 +192,12 @@ const RiskAssessment = () => { } }, symbol: 'none', + symbolSize: 6, + itemStyle: { + color: '#fff', + borderColor: '#65E5F9', + borderWidth: 1 + }, data: [3, 5, 7, 9, 6, 8, 4] } ] @@ -533,8 +561,8 @@ const RiskAssessment = () => {
今日预警次数
65
- - 较昨日 +2 + + 较昨日 -2
@@ -548,8 +576,8 @@ const RiskAssessment = () => {
未处理预警
65
- - 较昨日 +2 + + 与昨日持平