|
|
@ -116,6 +116,8 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
const [pollingTime, setPollingTime] = useState(1) //轮询时间 |
|
|
|
const [reminder, setReminder] = useState(false); //提醒弹框 |
|
|
|
const [formWidth, setFormWidth] = useState(840); |
|
|
|
const [multiScreen, setMultiScreen] = useState(''); |
|
|
|
|
|
|
|
|
|
|
|
const api = useRef(); |
|
|
|
const pageRef = useRef(page); |
|
|
@ -158,6 +160,7 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
api.current?.reset() |
|
|
|
}, [treeData, filterGroup]) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
console.log(queryValue); |
|
|
|
if (treeData && queryValue.includes('全部')) { |
|
|
@ -293,11 +296,12 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
|
|
|
|
//确定查询条件下视频总数 |
|
|
|
const videoData = (d, v) => { |
|
|
|
console.log(d, v); |
|
|
|
let playVideo = [] |
|
|
|
let videos = v.map(item => d.find(vv => vv.value == item)) |
|
|
|
let videos = d.filter(item => v.some(vv => vv == item.value)) |
|
|
|
const playVideoData = (data) => { |
|
|
|
data.map(c => { |
|
|
|
if (c.videoData) playVideo.push(c) |
|
|
|
if (c.camera) playVideo.push(c) |
|
|
|
if (c.children) playVideoData(c.children) |
|
|
|
}) |
|
|
|
|
|
|
@ -322,12 +326,18 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
setPageSize(4) |
|
|
|
break; |
|
|
|
case "6分屏": |
|
|
|
setPageSize(6) |
|
|
|
if (remind == 'false') setReminder(true) |
|
|
|
if (remind == 'false') { |
|
|
|
setReminder(true) |
|
|
|
} else { |
|
|
|
setPageSize(6) |
|
|
|
} |
|
|
|
break; |
|
|
|
case "12分屏": |
|
|
|
setPageSize(12) |
|
|
|
if (remind == 'false') setReminder(true) |
|
|
|
if (remind == 'false') { |
|
|
|
setReminder(true) |
|
|
|
} else { |
|
|
|
setPageSize(12) |
|
|
|
} |
|
|
|
break; |
|
|
|
default: |
|
|
|
break |
|
|
@ -517,6 +527,8 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
api.current.validate().then((v) => { |
|
|
|
let aa = JSON.stringify(v); |
|
|
|
setSearchs(JSON.parse(aa)) |
|
|
|
setPage(1) |
|
|
|
pageRef.current = 1 |
|
|
|
// setQuery({ limit: 10, page: 0 }) |
|
|
|
}); |
|
|
|
}} |
|
|
@ -591,7 +603,7 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
case '宫格设置': |
|
|
|
return <div style={{ height: 69, 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)')}`, display: 'flex', justifyContent: 'space-evenly', alignItems: 'center' }}> |
|
|
|
{v.screen.map((item) => { |
|
|
|
return <div key={item.img} onClick={() => flipScreens(item.value)}> |
|
|
|
return <div key={item.img} onClick={() => { flipScreens(item.value); setMultiScreen(item.value) }}> |
|
|
|
<img src={`/assets/images/application/${item.img}.png`} alt="" style={{ width: 40, height: 40, }} /> |
|
|
|
<div style={{ width: 40, fontWeight: 400, color: mould('#D9D9D9', '#615E5E', '#D9D9D9'), fontSize: 12, textAlign: 'center' }}>{item.value}</div> |
|
|
|
</div> |
|
|
@ -641,9 +653,12 @@ const VideoScreen = ({ treeData, filterGroup, videoPlay, template, headerName, s |
|
|
|
USER={GONGGESCREEN} |
|
|
|
onOk={() => { |
|
|
|
setReminder(false) |
|
|
|
if (multiScreen == "6分屏") setPageSize(6) |
|
|
|
if (multiScreen == "12分屏") setPageSize(12) |
|
|
|
}} |
|
|
|
close={() => { |
|
|
|
setReminder(false) |
|
|
|
setPageSize(pageSize) |
|
|
|
}} |
|
|
|
/> |
|
|
|
</> |
|
|
|