From fbb67a8f9400a75683ac5f4cc1d62bf791fe2eb1 Mon Sep 17 00:00:00 2001 From: wangyunfei <1224056307@qq,com> Date: Tue, 4 Nov 2025 15:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/EventNotification.js | 401 ++++++++++++++- .../components/EventNotification.less | 480 +++++++++++++++++- .../components/EventWarningManagement.js | 1 + .../components/EventWarningManagement.less | 5 + 4 files changed, 875 insertions(+), 12 deletions(-) diff --git a/src/pages/business_emergencyAccident/components/EventNotification.js b/src/pages/business_emergencyAccident/components/EventNotification.js index 089973f..48d04d2 100644 --- a/src/pages/business_emergencyAccident/components/EventNotification.js +++ b/src/pages/business_emergencyAccident/components/EventNotification.js @@ -1,16 +1,407 @@ -import React from 'react'; +import React, { useState } from 'react'; +import { Input, Select, Button, Checkbox, Tag } from 'antd'; +import { + EditOutlined, + VideoCameraOutlined, + SendOutlined, + ClockCircleOutlined, + LeftOutlined, + PlayCircleOutlined, + InfoCircleOutlined, + RightOutlined +} from '@ant-design/icons'; +import StandardTable from '@/components/StandardTable'; import styles from './EventNotification.less'; +const { TextArea } = Input; +const { Option } = Select; + const EventNotification = () => { + const [eventTitle, setEventTitle] = useState(''); + const [eventType, setEventType] = useState(''); + const [eventLevel, setEventLevel] = useState(''); + const [eventDescription, setEventDescription] = useState(''); + const [location, setLocation] = useState(''); + const [videoRecord, setVideoRecord] = useState(''); + const [pushTargets, setPushTargets] = useState({ + 'director-li': false, + 'captain-zhang': true, + 'professor-wang': true + }); + const [pushMethod, setPushMethod] = useState({ + 'sms': true, + 'email': false + }); + + // 事件列表数据 + const eventListData = [ + { + key: '1', + title: '交通事故(A301国道K125段)', + time: '2023-04-17 14:45', + status: '重大', + statusColor: '#ff4d4f', + currentStatus: '处理中', + id: 'EVT-20230615-008' + }, + { + key: '2', + title: '火灾事故(南城区商业街)', + time: '2023-04-16 09:30', + status: '较大', + statusColor: '#ff9800', + currentStatus: '已解决', + id: 'EVT-20230614-005' + }, + { + key: '3', + title: '化学品泄漏(工业区A区)', + time: '2023-04-15 16:20', + status: '一般', + statusColor: '#36cfc9', + currentStatus: '已解决', + id: 'EVT-20230613-003' + }, + { + key: '4', + title: '自然灾害(台风影响)', + time: '2023-04-14 11:15', + status: '较大', + statusColor: '#ff9800', + currentStatus: '已解决', + id: 'EVT-20230612-001' + } + ]; + + // 推送记录表格数据 + const pushRecordData = { + list: [ + { + key: '1', + eventId: '#ALRT-20230512-001', + eventName: '城南小区火灾事故', + pushTime: '2025-10-20 01:32:25', + recipient: '消防救援支队、社区', + pushMethod: '短信、系统消息', + status: '已送达', + statusType: 'delivered' + }, + { + key: '2', + eventId: '#ALRT-20230512-002', + eventName: '城西路段积水报告', + pushTime: '2025-10-18 21:15:07', + recipient: '市政管理处、交警', + pushMethod: '系统消息', + status: '已送达', + statusType: 'delivered' + }, + { + key: '3', + eventId: '#ALRT-20230512-003', + eventName: '国道交通事故', + pushTime: '2025-10-15 12:24:25', + recipient: '交警、急救中心', + pushMethod: '短信、电话', + status: '发送中', + statusType: 'sending' + } + ], + pagination: { + current: 3, + currentPage: 3, + pageSize: 10, + total: 48, + showSizeChanger: true, + showQuickJumper: true, + showTotal: (total) => `共 ${total} 条` + } + }; + + // 推送记录表格列定义 + const pushRecordColumns = [ + { + title: '事件编号', + dataIndex: 'eventId', + key: 'eventId', + width: 180 + }, + { + title: '事件名称', + dataIndex: 'eventName', + key: 'eventName', + width: 180 + }, + { + title: '推送时间', + dataIndex: 'pushTime', + key: 'pushTime', + width: 180 + }, + { + title: '接收对象', + dataIndex: 'recipient', + key: 'recipient', + width: 200 + }, + { + title: '推送方式', + dataIndex: 'pushMethod', + key: 'pushMethod', + width: 150 + }, + { + title: '状态', + dataIndex: 'status', + key: 'status', + width: 100, + render: (text, record) => { + let color = '#52c41a'; + if (record.statusType === 'sending') color = '#ff9800'; + return {text}; + } + }, + { + title: '操作', + key: 'action', + width: 100, + render: () => ( + + ) + } + ]; + + const handlePushTargetChange = (key, checked) => { + setPushTargets(prev => ({ + ...prev, + [key]: checked + })); + }; + + const handlePushMethodChange = (key, checked) => { + setPushMethod(prev => ({ + ...prev, + [key]: checked + })); + }; + return (
-
-

事件通知

- {/* 这里可以添加具体的内容 */} + {/* A块:顶部区域,高度60%,背景透明 */} +
+ {/* a块:事件信息编辑 */} +
+
+ + 事件信息编辑 +
+
+
+ + setEventTitle(e.target.value)} + /> +
+
+ + +
+
+ + +
+
+ +