|
|
@ -10,7 +10,7 @@ let timing |
|
|
|
let projectScrollbar; |
|
|
|
const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, showHeader }) => { |
|
|
|
// console.log({ 视频: treeData }); |
|
|
|
console.log(filterGroup); |
|
|
|
// console.log(filterGroup); |
|
|
|
// console.log(headerName); |
|
|
|
// console.log(videoPlay); |
|
|
|
// console.log(template); |
|
|
@ -129,7 +129,6 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
|
|
|
|
const resize_ = () => { |
|
|
|
setFormWidth(document.getElementById('formSearch').scrollWidth) |
|
|
|
console.log(document.getElementById('formSearch').scrollWidth) |
|
|
|
} |
|
|
|
resize_() |
|
|
|
window.addEventListener('resize', resize_); |
|
|
@ -241,7 +240,7 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(videoData); |
|
|
|
// console.log(videoData); |
|
|
|
|
|
|
|
if (searchs?.name) { |
|
|
|
videoData = videoData?.filter(v => v.label.includes(searchs.name)) |
|
|
@ -261,7 +260,7 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
if (searchs.hasOwnProperty('field4')) { |
|
|
|
videoData = videoData?.filter(({ cameraId }) => filterGroup[4].filters.find(v => v.num == searchs?.field4).cameraIds.some(v => v == cameraId)) |
|
|
|
} |
|
|
|
console.log(videoData); |
|
|
|
// console.log(videoData); |
|
|
|
setPlayData(videoData) |
|
|
|
|
|
|
|
}, [searchs]) |
|
|
@ -272,7 +271,7 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
useEffect(() => { |
|
|
|
let pollingTimes = pollingTime || 1 |
|
|
|
if (timing) clearInterval(timing) |
|
|
|
if (polling) { |
|
|
|
if (pollingTime && polling) { |
|
|
|
timing = setInterval(() => { |
|
|
|
let pages = pageRef.current + 1 |
|
|
|
if (pages > Math.ceil(playData?.length / pageSize)) { |
|
|
@ -451,8 +450,6 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
{filterGroup?.map(v => { |
|
|
|
let nameLength = 2 |
|
|
|
let OptionWidth = 75 |
|
|
|
console.log(formWidth); |
|
|
|
console.log(filterGroup.filter(v => v.forbidden).length); |
|
|
|
if (formWidth > 910) { |
|
|
|
switch (filterGroup.filter(v => v.forbidden).length) { |
|
|
|
case 1: |
|
|
@ -601,15 +598,19 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
})} |
|
|
|
</div> |
|
|
|
case '轮询设置': |
|
|
|
return <div style={{ height: 48, background: mould('#01185F', 'linear-gradient(245deg, #FFFFFF 0%, #EAEBEC 100%)', 'linear-gradient(197deg, rgba(38,38,38,0.65) 0%, #101010 100%)'), boxShadow: `inset 0px 0px 5px 1px ${mould('rgba(28,96,254,0.2500)', 'rgba(97,94,94,0.39)', 'rgba(132,132,132,0.5)')}`, color: ' #D9D9D9', display: 'flex', justifyContent: 'space-evenly', alignItems: 'center' }}> |
|
|
|
return <div style={{ height: 48, background: mould('#01185F', 'linear-gradient(245deg, #FFFFFF 0%, #EAEBEC 100%)', 'linear-gradient(197deg, rgba(38,38,38,0.65) 0%, #101010 100%)'), boxShadow: `inset 0px 0px 5px 1px ${mould('rgba(28,96,254,0.2500)', 'rgba(97,94,94,0.39)', 'rgba(132,132,132,0.5)')}`, color: mould("#D9D9D9", '', "#D9D9D9"), display: 'flex', justifyContent: 'space-evenly', alignItems: 'center' }}> |
|
|
|
<Switch onChange={(v, e) => { |
|
|
|
console.log(v); |
|
|
|
setPolling(v) |
|
|
|
}} aria-label="a switch for demo" style={{ border: ' 1px solid #D9D9D9', backgroundColor: polling ? mould('#2f53ea') : '' }} checked={polling} /> |
|
|
|
}} aria-label="a switch for demo" style={{ border: ' 1px solid #D9D9D9', backgroundColor: polling ? mould('#2F53EA', '#4B4B4B', '#555F6D') : mould('#E8F0FF', '#C2C2C2', '#D7D7D7') }} checked={polling} /> |
|
|
|
轮询间隔 |
|
|
|
<Input value={pollingTime} disabled={polling ? false : true} style={{ width: 80, color: "#D9D9D9", border: ' 1px solid #D9D9D9', backgroundColor: polling ? "" : 'rgb(217, 217, 217)' }} |
|
|
|
<Input value={pollingTime} disabled={polling ? false : true} style={{ width: 80, color: mould("#D9D9D9", '', "#D9D9D9"), border: ' 1px solid #D9D9D9', backgroundColor: polling ? "" : 'rgb(217, 217, 217)' }} |
|
|
|
onChange={(value) => { |
|
|
|
if (value) { |
|
|
|
setPollingTime(Number(value.replace(/[^0-9]/ig, ''))) |
|
|
|
} else { |
|
|
|
setPollingTime(null) |
|
|
|
} |
|
|
|
}} /> |
|
|
|
分钟 |
|
|
|
</div> |
|
|
|