Browse Source

视频项目信息与播放

dev
wenlele 2 years ago
parent
commit
944e43902b
  1. 6
      web/client/src/sections/problem/components/tableData.jsx
  2. 46
      web/client/src/sections/problem/containers/dataAlarm.jsx

6
web/client/src/sections/problem/components/tableData.jsx

@ -54,9 +54,9 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
let tableDatas = res.payload.data?.map(v => ({ let tableDatas = res.payload.data?.map(v => ({
key: v.alarmId, key: v.alarmId,
StructureName: v.struc, StructureName: v.struc,
// projectName: v.pomsProject?.map(r => (r.name ? { name: r.name, state: 'PMOS' } : { projectName: v.pomsProject?.map(r => (r.name ? { name: r.name, state: 'PMOS' } : {
// name: r.pepProject?.projectName, state: r.pepProject?.constructionStatus name: r.pepProject?.projectName, state: r.pepProject?.constructionStatus
// }))?.filter(c => c), }))?.filter(c => c),
createTime: v.createTime ? moment(v.createTime).format("YYYY-MM-DD HH:mm:ss") : "", createTime: v.createTime ? moment(v.createTime).format("YYYY-MM-DD HH:mm:ss") : "",
updateTime: v.updateTime ? moment(v.updateTime).format("YYYY-MM-DD HH:mm:ss") : "", updateTime: v.updateTime ? moment(v.updateTime).format("YYYY-MM-DD HH:mm:ss") : "",
confirmTime: v.confirmTime ? moment(v.confirmTime).format("YYYY-MM-DD HH:mm:ss") : "", confirmTime: v.confirmTime ? moment(v.confirmTime).format("YYYY-MM-DD HH:mm:ss") : "",

46
web/client/src/sections/problem/containers/dataAlarm.jsx

@ -34,6 +34,8 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
const [alarmId, setAlarmId] = useState(false) //alarmId const [alarmId, setAlarmId] = useState(false) //alarmId
const [query, setQuery] = useState({ limit: 10, page: 0 }) // const [query, setQuery] = useState({ limit: 10, page: 0 }) //
const [tableData, setTableData] = useState([]) // const [tableData, setTableData] = useState([]) //
const [videoModal, setVideoModal] = useState(false) //
const [videoData, setVideoData] = useState({}) //
@ -180,7 +182,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
name: '项目名称', sort: 3, value: 'projectName', render: (_, r, index) => { name: '项目名称', sort: 3, value: 'projectName', render: (_, r, index) => {
return <> return <>
{r.projectName?.map((v, index) => { {r.projectName?.map((v, index) => {
return v.name ? <div key={r.id + r.appName + index} style={{ width: 176, marginBottom: 8 }}> return v.name ? <div key={r.id + v.name + index} style={{ width: 176, marginBottom: 8 }}>
{OutHidden({ {OutHidden({
number: 7, number: 7,
name: v.name name: v.name
@ -195,7 +197,6 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
</div> : "" </div> : ""
}) })
} }
</> </>
} }
}, },
@ -310,8 +311,8 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
: route == 'videoAbnormal' ? <> : route == 'videoAbnormal' ? <>
<Button theme='borderless' style={{ width: 65 }} disabled>已派单</Button> <Button theme='borderless' style={{ width: 65 }} disabled>已派单</Button>
<Button theme='borderless' style={{ width: 65 }} onClick={() => { <Button theme='borderless' style={{ width: 65 }} onClick={() => {
// setCheckPop(true) setVideoModal(true)
// setAlarmId(r.key) setVideoData({ channeNo: r.cameraChannelNo, serialNo: r.cameraSerialNo, type: r.platform })
}}>播放</Button> }}>播放</Button>
</> : "" </> : ""
} }
@ -486,6 +487,43 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => {
</div> </div>
</Modal> : ""} </Modal> : ""}
{videoModal ? <Modal
visible={true}
// videoData
width={900}
onCancel={() => setVideoModal(false)}
onOk={() => {
}}
>
<div style={{ width: 800, height: 600 }}>
<iframe
allowFullScreen
src={`http://localhost:5000/video_play_cross?slideDown=true&videoObj=${encodeURIComponent(JSON.stringify({
// channelNo: 1,
// content: ['5442542542', '452345', '234524525'],
// serialNo: "F61504020",
// type: "yingshi",
// yingshiToken: "at.7tj6k9mzcwmn112xag96e23tcdsta8nn-7p2qvqv6zq-1k500nr-tsd9bn01o"
type: 'cascade',
serialNo: '34020000001310000003', //
topSerialNo: '34020000001110000079', //
audio: true,
highDefinition: true,
cloudControl: true,
// playUrlSd: 'wss://221.230.55.27:8082/jessica/34020000001110000079/34020000001310000003.flv', //
playUrlSd: 'wss://221.230.55.27:8082/jessica/34020000001110000075/34020000001110000073.flv', //
}))}`}
style={{ height: "100%", width: "100%" }}
frameBorder={0}
>
<p>你的浏览器不支持 iframe</p>
</iframe>
</div>
</Modal> : ""}
{checkPop ? {checkPop ?
<SideSheets <SideSheets
alarmId={alarmId} alarmId={alarmId}

Loading…
Cancel
Save