巴林闲侠 2 years ago
parent
commit
c16d0e4309
  1. 18
      web/client/src/sections/problem/components/inspection.jsx
  2. 8
      web/client/src/sections/problem/containers/dataAlarm.jsx

18
web/client/src/sections/problem/components/inspection.jsx

@ -86,7 +86,6 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
dispatch(problem.putAlarmApplicationNoted({ inspectionId: patrolAbnormal[pictureId].id }))
}
}, 2000)
setPictureData(patrolAbnormal[pictureId])
}
}, [pictureId]);
@ -103,19 +102,6 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
<div style={{ flex: 1, position: 'relative' }}>
<Form
onSubmit={(v) => {
// console.log({
// appId: v.appId,
// noted: v.noted,
// projectId: v.projectId,
// timeStart: v.time == 'true' ?
// moment().startOf('day').format('YYYY-MM-DD HH:mm:ss') :
// v.time == 'false' ?
// moment().day(moment().day() - 1).startOf('day').format('YYYY-MM-DD HH:mm:ss') : "",
// timeEnd: v.time == 'true' ?
// moment().endOf('day').format('YYYY-MM-DD HH:mm:ss') :
// v.time == 'false' ?
// moment().day(moment().day() - 1).endOf('day').format('YYYY-MM-DD HH:mm:ss') : "",
// });
setCheckPatrol({
appId: v.appId,
noted: v.noted,
@ -223,6 +209,7 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
onClick={() => {
setPicturePop(true)
setPictureId(i);
setPictureData(patrolAbnormal[i])
}}
>
<img src={`/_file-server/${v.screenshot}`} style={{ width: 400, height: 182 }} />
@ -254,7 +241,7 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
}}>{unfold ? '展开更多' : '收起'}<img style={{ width: 17, paddingTop: 8, marginLeft: 3 }} src={`/assets/images/problem/${unfold ? "dropDown" : 'pullUp'}.png`} />
</div>
{picturePop ? <Modal
title={<div style={{}}>{pictureData.app?.name}
title={<div style={{}}>{pictureData?.app?.name}
<span style={{
width: 80, height: 20, display: 'inline-block',
background: 'url(/assets/images/problem/preview.png)',
@ -292,6 +279,7 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
width={837}
onCancel={() => {
setPicturePop(false)
setPictureId('')
if (timer) clearTimeout(timer)
}}
>

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

@ -60,9 +60,11 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
attribute(tableType[route], route);
//token
dispatch(problem.getVcmpAuth({})).then((res) => {
if (res.success) setVideoToken(res.payload.data?.token)
})
if (route == 'videoAbnormal') {
dispatch(problem.getVcmpAuth({})).then((res) => {
if (res.success) setVideoToken(res.payload.data?.token)
})
}
}, [])
// console.log(videoData);

Loading…
Cancel
Save