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 (