From 669c14acc91b18a6c5d148cac25906b8484c260c Mon Sep 17 00:00:00 2001 From: wangyunfei <1224056307@qq,com> Date: Wed, 5 Nov 2025 11:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/business_Emergency/iconAcc1.svg | 10 ++ src/assets/business_Emergency/iconAcc2.svg | 3 + src/assets/business_Emergency/iconAcc3.svg | 10 ++ .../components/EventNotification.js | 117 +++++++++++++----- .../components/EventNotification.less | 93 +++++--------- .../components/testVideo.mp4 | Bin 0 -> 1562971 bytes 6 files changed, 140 insertions(+), 93 deletions(-) create mode 100644 src/assets/business_Emergency/iconAcc1.svg create mode 100644 src/assets/business_Emergency/iconAcc2.svg create mode 100644 src/assets/business_Emergency/iconAcc3.svg create mode 100644 src/pages/business_emergencyAccident/components/testVideo.mp4 diff --git a/src/assets/business_Emergency/iconAcc1.svg b/src/assets/business_Emergency/iconAcc1.svg new file mode 100644 index 0000000..9ddd549 --- /dev/null +++ b/src/assets/business_Emergency/iconAcc1.svg @@ -0,0 +1,10 @@ + diff --git a/src/assets/business_Emergency/iconAcc2.svg b/src/assets/business_Emergency/iconAcc2.svg new file mode 100644 index 0000000..8d01fd0 --- /dev/null +++ b/src/assets/business_Emergency/iconAcc2.svg @@ -0,0 +1,3 @@ + diff --git a/src/assets/business_Emergency/iconAcc3.svg b/src/assets/business_Emergency/iconAcc3.svg new file mode 100644 index 0000000..ecb7f25 --- /dev/null +++ b/src/assets/business_Emergency/iconAcc3.svg @@ -0,0 +1,10 @@ + diff --git a/src/pages/business_emergencyAccident/components/EventNotification.js b/src/pages/business_emergencyAccident/components/EventNotification.js index a5b9e14..50ae9ca 100644 --- a/src/pages/business_emergencyAccident/components/EventNotification.js +++ b/src/pages/business_emergencyAccident/components/EventNotification.js @@ -1,8 +1,8 @@ -import React, { useState } from 'react'; +import React, { useState, useRef } from 'react'; import { Input, Select, Button, Checkbox, Tag } from 'antd'; -import { - EditOutlined, - VideoCameraOutlined, +import { + EditOutlined, + VideoCameraOutlined, SendOutlined, ClockCircleOutlined, LeftOutlined, @@ -13,16 +13,23 @@ import { import StandardTable from '@/components/StandardTable'; import styles from './EventNotification.less'; +import iconAcc1 from '@/assets/business_Emergency/iconAcc1.svg'; +import iconAcc2 from '@/assets/business_Emergency/iconAcc2.svg'; +import iconAcc3 from '@/assets/business_Emergency/iconAcc3.svg'; +import testVideo from './testVideo.mp4'; + const { TextArea } = Input; const { Option } = Select; const EventNotification = () => { const [eventTitle, setEventTitle] = useState(''); - const [eventType, setEventType] = useState(''); - const [eventLevel, setEventLevel] = useState(''); + const [eventType, setEventType] = useState(undefined); + const [eventLevel, setEventLevel] = useState(undefined); const [eventDescription, setEventDescription] = useState(''); const [location, setLocation] = useState(''); const [videoRecord, setVideoRecord] = useState(''); + const [videoPlaying, setVideoPlaying] = useState(false); + const videoRef = useRef(null); const [pushTargets, setPushTargets] = useState({ 'director-li': false, 'captain-zhang': true, @@ -185,6 +192,31 @@ const EventNotification = () => { })); }; + // 视频播放控制 + const handlePlayPause = () => { + if (videoRef.current) { + if (videoPlaying) { + videoRef.current.pause(); + } else { + videoRef.current.play(); + } + setVideoPlaying(!videoPlaying); + } + }; + + const handleVideoLoaded = () => { + if (videoRef.current) { + // 视频加载完成后可以设置默认行为 + } + }; + + const handlePlayLiveVideo = () => { + if (videoRef.current) { + videoRef.current.play(); + setVideoPlaying(true); + } + }; + return (