Browse Source

应用巡检调整

dev
wenlele 2 years ago
parent
commit
66b91e57a3
  1. BIN
      web/client/assets/images/problem/banner.gif
  2. 259
      web/client/src/sections/problem/components/inspection.jsx
  3. 25
      web/client/src/sections/problem/components/tableData.jsx
  4. 22
      web/client/src/sections/problem/containers/dataAlarm.jsx

BIN
web/client/assets/images/problem/banner.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

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

@ -48,28 +48,31 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
useEffect(() => { useEffect(() => {
if (projectScrollbar) projectScrollbar.destroy() if (projectScrollbar) projectScrollbar.destroy()
const domEquipment = document.getElementById("inspection"); const domEquipment = document.getElementById("inspection");
if (unfold) { if (domEquipment) {
projectScrollbar = new PerfectScrollbar("#inspection", { if (unfold) {
suppressScrollY: true, projectScrollbar = new PerfectScrollbar("#inspection", {
}); suppressScrollY: true,
if (domEquipment && projectScrollbar) projectScrollbar.update() });
} else { if (domEquipment && projectScrollbar) projectScrollbar.update()
projectScrollbar = new PerfectScrollbar("#inspection", { } else {
suppressScrollX: true, projectScrollbar = new PerfectScrollbar("#inspection", {
}) suppressScrollX: true,
if (domEquipment && projectScrollbar) projectScrollbar.update() })
if (domEquipment && projectScrollbar) projectScrollbar.update()
}
} }
}) })
useEffect(() => { useEffect(() => {
dispatch(problem.getAlarmLnspection(checkPatrol)).then((res) => { dispatch(problem.getAlarmLnspection(checkPatrol)).then((res) => {
// console.log(res.payload.data); // console.log(res.payload.data)
if (res.success) { if (res.success) {
setPatrolAbnormal(res.payload.data) setPatrolAbnormal(res.payload.data)
setNotRead(res.payload.data.filter(v => !v.notedTime).length) setNotRead(res.payload.data.filter(v => !v.notedTime).length)
} }
}) })
}, [checkPatrol]); }, [checkPatrol])
useEffect(() => { useEffect(() => {
@ -91,7 +94,7 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
return ( return (
<div style={{ width: 'clac(100%)', backgroundColor: 'white', margin: "8px 12px", padding: "20px 20px 0" }}> <div style={{ width: 'clac(100%)', height: unfold ? 420 : 760, backgroundColor: 'white', margin: "8px 12px", padding: "20px 20px 0" }}>
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', marginLeft: 10 }}> <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', marginLeft: 10 }}>
<div style={{ width: 450, }}> <div style={{ width: 450, }}>
<span style={{ width: 0, height: 20, display: "inline-block", margin: "0 8px 0 0", borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></span> <span style={{ width: 0, height: 20, display: "inline-block", margin: "0 8px 0 0", borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></span>
@ -192,118 +195,132 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
</Form> </Form>
</div> </div>
</div> </div>
<div {patrolAbnormal?.length > 0 ?
onMouseMove={() => document.getElementById('unfold').style.display = 'none'} <div
onMouseOut={() => document.getElementById('unfold').style.display = 'block'} onMouseMove={() => document.getElementById('unfold').style.display = 'none'}
id="inspection" style={{ width: 'calc(100% - 20px)', marginLeft: 10, height: unfold ? 280 : 600, whiteSpace: unfold ? 'nowrap' : '', position: "relative", }}> onMouseOut={() => document.getElementById('unfold').style.display = 'block'}
{patrolAbnormal?.map((v, i) => id="inspection" style={{ width: 'calc(100% - 20px)', marginLeft: 10, height: unfold ? 280 : 600, whiteSpace: unfold ? 'nowrap' : '', position: "relative", }}>
<div key={'name' + v.id} {patrolAbnormal?.map((v, i) =>
style={{ <div key={'name' + v.id}
width: 400, height: 238, style={{
display: 'inline-block', width: 400, height: 238,
margin: '8px 20px 8px 0', display: 'inline-block',
boxShadow: ' 0px 2px 12px 1px #F2F3F5', margin: '8px 20px 8px 0',
borderRadius: 2, border: '1px solid rgba(220,222,224,0.2)', boxShadow: ' 0px 2px 12px 1px #F2F3F5',
position: 'relative', borderRadius: 2, border: '1px solid rgba(220,222,224,0.2)',
}} position: 'relative',
onClick={() => { }}
setPicturePop(true) onClick={() => {
setPictureId(i); setPicturePop(true)
setPictureData(patrolAbnormal[i]) setPictureId(i);
}} setPictureData(patrolAbnormal[i])
> }}
<img src={`/_file-server/${v.screenshot}`} style={{ width: 400, height: 182 }} /> >
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end', margin: '10px 6px 0', color: '#005ABD' }}> <img src={`/_file-server/${v.screenshot}`} style={{ width: 400, height: 182 }} />
<span style={{ fontSize: 12 }}>获取时间{moment(v.createTime).format("YYYY-MM-DD HH:mm:ss")}</span> <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-end', margin: '10px 6px 0', color: '#005ABD' }}>
<span style={{ color: '#4A4A4A', fontWeight: 500 }}>{v.app?.name}</span> <span style={{ fontSize: 12 }}>获取时间{moment(v.createTime).format("YYYY-MM-DD HH:mm:ss")}</span>
</div> <span style={{ color: '#4A4A4A', fontWeight: 500 }}>{v.app?.name}</span>
{v.notedPepUser ? <img src="/assets/images/problem/tick.png" style={{ width: 19, position: "absolute", top: -6, right: -10 }} /> : ""} </div>
</div>)} {v.notedPepUser ? <img src="/assets/images/problem/tick.png" style={{ width: 19, position: "absolute", top: -6, right: -10 }} /> : ""}
</div>)}
</div> </div>
<div id="unfold" : <div style={{
onMouseMove={(e) => e.stopPropagation()} width: 'calc(100% - 20px)', marginLeft: 10, height: 280,
onMouseOut={(e) => e.stopPropagation()} background: 'url(/assets/images/problem/banner.gif)',
onClick={() => setUnfold(!unfold)} backgroundSize: '100% 100%',
style={{ fontSize: 32, fontFamily: 'YouSheBiaoTiHei',
width: 'calc(100% - 20px)', marginLeft: 10, height: 24, fontWeight: 500, color: '#005ABD', textIndent: 80,
background: unfold ? 'linear-gradient(180deg, rgba(36,139,255,0) 0%, rgba(36,139,255,0.09) 100%)' : 'linear-gradient(180deg, rgba(218,218,218,0) 0%, rgba(212,212,212,0.38) 100%)', lineHeight: "260px"
borderRadius: 3, }}>
lineHeight: '24px', 当前应用暂无自动巡检计划
fontSize: 12, </div>
zIndex: 100, }
position: 'relative', {patrolAbnormal?.length > 0 ?
top: unfold ? -20 : 6, <div id="unfold"
left: 0, onMouseMove={(e) => e.stopPropagation()}
textAlign: 'center', onMouseOut={(e) => e.stopPropagation()}
color: unfold ? 'rgba(0,90,189,0.7)' : '#969799', onClick={() => setUnfold(!unfold)}
cursor: 'pointer', style={{
}}>{unfold ? '展开更多' : '收起'}<img style={{ width: 17, paddingTop: 8, marginLeft: 3 }} src={`/assets/images/problem/${unfold ? "dropDown" : 'pullUp'}.png`} /> width: 'calc(100% - 20px)', marginLeft: 10, height: 24,
</div> background: unfold ? 'linear-gradient(180deg, rgba(36,139,255,0) 0%, rgba(36,139,255,0.09) 100%)' : 'linear-gradient(180deg, rgba(218,218,218,0) 0%, rgba(212,212,212,0.38) 100%)',
{picturePop ? <Modal borderRadius: 3,
title={<div style={{}}>{pictureData?.app?.name} lineHeight: '24px',
<span style={{ fontSize: 12,
width: 80, height: 20, display: 'inline-block', zIndex: 100,
background: 'url(/assets/images/problem/preview.png)', position: 'relative',
backgroundRepeat: 'no-repeat', top: unfold ? -20 : 14,
backgroundSize: '100% 100%', left: 0,
color: '#FFFFFF', fontSize: 12, textAlign: 'center',
textAlign: 'center', lineHeight: '20px', marginLeft: 10, color: unfold ? 'rgba(0,90,189,0.7)' : '#969799',
}}> cursor: 'pointer',
未阅 {notRead}/{patrolAbnormal.length} }}>{unfold ? '展开更多' : '收起'}<img style={{ width: 17, paddingTop: 8, marginLeft: 3 }} src={`/assets/images/problem/${unfold ? "dropDown" : 'pullUp'}.png`} />
</span> </div> : ""}
</div>} {
hasCancel={false} picturePop ? <Modal
footer={<div style={{ width: 425, margin: 'auto', display: "flex", justifyContent: 'space-around', }}> title={<div style={{}}>{pictureData?.app?.name}
<Button style={{ width: 92, height: 32, border: '1px solid rgba(0,0,0,0.15)', borderRadius: 2 }} <span style={{
onClick={() => { width: 80, height: 20, display: 'inline-block',
if (!pictureId == 0) setPictureId(pictureId - 1) background: 'url(/assets/images/problem/preview.png)',
}} backgroundRepeat: 'no-repeat',
>上一张</Button> backgroundSize: '100% 100%',
<a href={`/_file-server/${pictureData.screenshot + '?filename=' + encodeURIComponent(pictureData.app?.name)}.png`}> color: '#FFFFFF', fontSize: 12,
<Button style={{ width: 92, height: 32, color: '#005ABD', border: '1px solid #005ABD', borderRadius: 2 }}>图片下载</Button> textAlign: 'center', lineHeight: '20px', marginLeft: 10,
</a> }}>
<a href={pictureData.app?.url} target="_blank"> 未阅 {notRead}/{patrolAbnormal.length}
<Button style={{ width: 92, height: 32, color: '#FFFFFF', background: '#005ABD', border: '1px solid rgba(0,0,0,0.15)', borderRadius: 2 }}>进入系统</Button> </span>
</a> </div>}
<Button style={{ width: 92, height: 32, border: '1px solid rgba(0,0,0,0.15)', borderRadius: 2 }} hasCancel={false}
onClick={() => { footer={<div style={{ width: 425, margin: 'auto', display: "flex", justifyContent: 'space-around', }}>
if (pictureId < patrolAbnormal.length - 1) setPictureId(pictureId + 1) <Button style={{ width: 92, height: 32, border: '1px solid rgba(0,0,0,0.15)', borderRadius: 2 }}
}} onClick={() => {
>下一张</Button> if (!pictureId == 0) setPictureId(pictureId - 1)
</div>} }}
visible={true} >上一张</Button>
onOk={() => { <a href={`/_file-server/${pictureData.screenshot + '?filename=' + encodeURIComponent(pictureData.app?.name)}.png`}>
<Button style={{ width: 92, height: 32, color: '#005ABD', border: '1px solid #005ABD', borderRadius: 2 }}>图片下载</Button>
</a>
<a href={pictureData.app?.url} target="_blank">
<Button style={{ width: 92, height: 32, color: '#FFFFFF', background: '#005ABD', border: '1px solid rgba(0,0,0,0.15)', borderRadius: 2 }}>进入系统</Button>
</a>
<Button style={{ width: 92, height: 32, border: '1px solid rgba(0,0,0,0.15)', borderRadius: 2 }}
onClick={() => {
if (pictureId < patrolAbnormal.length - 1) setPictureId(pictureId + 1)
}}
>下一张</Button>
</div>}
visible={true}
onOk={() => {
}} }}
width={837} width={837}
onCancel={() => { onCancel={() => {
setPicturePop(false) setPicturePop(false)
setPictureId('') setPictureId('')
if (timer) clearTimeout(timer) if (timer) clearTimeout(timer)
}} }}
> >
<div style={{ marginBottom: 12 }}> <div style={{ marginBottom: 12 }}>
{pictureData.notedTime ? <span style={{ marginRight: 14 }}>核验信息{pictureData.notedPepUser}&nbsp;{moment(pictureData.notedTime).format("YYYY-MM-DD HH:mm:ss")}</span> : ""} {pictureData.notedTime ? <span style={{ marginRight: 14 }}>核验信息{pictureData.notedPepUser}&nbsp;{moment(pictureData.notedTime).format("YYYY-MM-DD HH:mm:ss")}</span> : ""}
<span>截取时间:{moment(pictureData.createTime).format("YYYY-MM-DD HH:mm:ss")}</span> <span>截取时间:{moment(pictureData.createTime).format("YYYY-MM-DD HH:mm:ss")}</span>
<img src={`/assets/images/problem/link.png`} <img src={`/assets/images/problem/link.png`}
style={{ width: 16, height: 16, marginLeft: 6 }} style={{ width: 16, height: 16, marginLeft: 6 }}
onClick={() => { onClick={() => {
console.log(pictureData); console.log(pictureData);
copy(pictureData?.router || "无相关地址"); copy(pictureData?.router || "无相关地址");
Notification.success({ Notification.success({
content: "复制成功", content: "复制成功",
duration: 2, duration: 2,
}) })
}} }}
/>
</div>
<img src={`/_file-server/${pictureData.screenshot}`}
style={{ width: 789, height: 359 }}
/> />
</div>
<img src={`/_file-server/${pictureData.screenshot}`}
style={{ width: 789, height: 359 }}
/>
</Modal> </Modal>
: "" : ""
} }
</div > </div >

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

@ -48,6 +48,14 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
}) })
break; break;
case 'videoAbnormal': case 'videoAbnormal':
let cameraKind = []
dispatch(problem.getAlarmVideoDeviceKind()).then((res) => {
if (res.success) {
cameraKind = res.payload.data.map(v => ({ name: v.kind, value: v.id }))
setGenre(res.payload.data.map(v => ({ name: v.kind, value: v.id })))
}
})
dispatch(problem.getAlarmVideoList({ ...search, pepProjectId: '' })).then((res) => { dispatch(problem.getAlarmVideoList({ ...search, pepProjectId: '' })).then((res) => {
if (res.success) { if (res.success) {
// console.log(res); // console.log(res);
@ -64,11 +72,11 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
yingshiToken: v.yingshiToken, yingshiToken: v.yingshiToken,
AlarmContent: v.statusDescribe, AlarmContent: v.statusDescribe,
// State: v.State, // State: v.State,
station: v.station, station: v.station || [],
resolve: v.resolve, resolve: v.resolve || [],
cameraChannelNo: v.cameraChannelNo, cameraChannelNo: v.cameraChannelNo,
cameraSerialNo: v.cameraSerialNo, cameraSerialNo: v.cameraSerialNo,
cameraKindId: v.cameraKindId, cameraKindId: v.cameraKindId ? cameraKind?.find(v => v.value == v.cameraKindId)?.name : "",
venderName: v.venderName, venderName: v.venderName,
platform: v.platform, platform: v.platform,
confirm: v.confirmedContent, confirm: v.confirmedContent,
@ -79,11 +87,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
setTableData(tableDatas) setTableData(tableDatas)
} }
}) })
dispatch(problem.getAlarmVideoDeviceKind()).then((res) => {
if (res.success) {
setGenre(res.payload.data.map(v => ({ name: v.kind, value: v.id })))
}
})
break; break;
default: default:
dispatch(problem.getAlarmDataGroup()).then((res) => { dispatch(problem.getAlarmDataGroup()).then((res) => {
@ -106,7 +109,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
setGenre(genreData) setGenre(genreData)
if (data && data[0]?.id) { if (data && data[0]?.id) {
dispatch(problem.getAlarmDataList({ ...query, ...search, groupId: data.map(v => v.id).join(), pepProjectId: '' })).then((res) => { dispatch(problem.getAlarmDataList({ ...query, ...search, groupId: data.map(v => v.id).join(), pepProjectId: '' })).then((res) => {
// console.log(res); console.log(res);
if (res.success) { if (res.success) {
setCount(res.payload.data?.count || 0) setCount(res.payload.data?.count || 0)
let tableDatas = res.payload.data?.rows?.map(v => ({ let tableDatas = res.payload.data?.rows?.map(v => ({
@ -122,6 +125,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
AlarmGroupUnit: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "", AlarmGroupUnit: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "",
Strategy: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "", Strategy: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "",
type: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "", type: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "",
cameraKindId: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "",
AlarmCodeName: v.AlarmCodeName, AlarmCodeName: v.AlarmCodeName,
CurrentLevel: v.CurrentLevel, CurrentLevel: v.CurrentLevel,
detailCount: v.detailCount, detailCount: v.detailCount,
@ -129,6 +133,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
State: v.State, State: v.State,
alarmType: v.alarmType, alarmType: v.alarmType,
confirm: v.confirmedContent, confirm: v.confirmedContent,
station: v.StructureLongitude && v.StructureLatitude ? v.StructureLongitude + '. ' + v.StructureLatitude : "",
})) }))
// console.log(tableDatas); // console.log(tableDatas);
setTableData(tableDatas) setTableData(tableDatas)
@ -254,7 +259,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
state: v.state, state: v.state,
keywordTarget: v.keywordTarget, keywordTarget: v.keywordTarget,
keyword: v.keyword, keyword: v.keyword,
kindId:v.kindId, kindId: v.kindId,
groupUnitId: v.groupUnitId, groupUnitId: v.groupUnitId,
errType: v.errType, errType: v.errType,
confirmState: v.confirmState, confirmState: v.confirmState,

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

@ -165,7 +165,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
strategyHit: ['index', 'projectName', 'StructureName', 'SourceName', 'Strategy', 'State', 'createTime', 'sustainTime', 'AlarmContent', 'CurrentLevel', 'updateTime', 'detailCount', 'confirm', 'confirmTime'], strategyHit: ['index', 'projectName', 'StructureName', 'SourceName', 'Strategy', 'State', 'createTime', 'sustainTime', 'AlarmContent', 'CurrentLevel', 'updateTime', 'detailCount', 'confirm', 'confirmTime'],
videoAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', 'station', 'cameraKindId', 'venderName', 'point', 'cameraSerialNo', 'cameraChannelNo', 'platform', 'AlarmContent', 'resolve', 'createTime', 'updateTime', 'confirm', 'confirmTime', 'camerOnline'], videoAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', 'station', 'cameraKindId', 'venderName', 'point', 'cameraSerialNo', 'cameraChannelNo', 'platform', 'AlarmContent', 'resolve', 'createTime', 'updateTime', 'confirm', 'confirmTime', 'camerOnline'],
useAbnormal: ['index', 'projectName', 'appName', 'url', 'type', 'alarmContent', 'createTime', 'updateTime', 'confirm', 'confirmTime'], useAbnormal: ['index', 'projectName', 'appName', 'url', 'type', 'alarmContent', 'createTime', 'updateTime', 'confirm', 'confirmTime'],
deviceAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', 'station', 'alarmContent', 'venderName', 'AlarmContent', 'AlarmCodeName', 'createTime', 'updateTime', 'confirm', 'confirmTime'], deviceAbnormal: ['index', 'projectName', 'StructureName', 'SourceName', 'station', 'alarmContent', 'cameraKindId', 'venderName', 'AlarmContent', 'AlarmCodeName', 'createTime', 'updateTime', 'confirm', 'confirmTime'],
} }
// //
const columns = { const columns = {
@ -250,7 +250,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
{ name: '产生次数', sort: 19, value: 'detailCount', render: (_, r, index) => r.detailCount + '次' }, { name: '产生次数', sort: 19, value: 'detailCount', render: (_, r, index) => r.detailCount + '次' },
{ {
name: '确认信息', sort: 20, value: 'confirm', render: (_, r, index) => { name: '确认信息', sort: 20, value: 'confirm', render: (_, r, index) => {
return r.State == 3 ? '无' : r.State == 4 ? r.confirm : r.confirm || '未确认' return r.State == 3 ? '无' : r.State == 4 ? r.confirm || '无' : r.confirm || '未确认'
} }
}, },
{ name: '确认/恢复时间', sort: 21, value: 'confirmTime', render: (_, r, index) => <div style={{ width: 130 }}>{r.confirmTime ? r.confirmTime : "无"}</div> }, { name: '确认/恢复时间', sort: 21, value: 'confirmTime', render: (_, r, index) => <div style={{ width: 130 }}>{r.confirmTime ? r.confirmTime : "无"}</div> },
@ -279,11 +279,9 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
return '当前' return '当前'
} }
}, },
{ name: '位置信息', sort: 11, value: 'station', render: (_, r, index) => r.station?.map(v => <div key={v.resolve + v.id} style={{ lineHeight: "22px" }}>{v.position}</div>) }, { name: '位置信息', sort: 11, value: 'station', render: (_, r, index) => route == 'deviceAbnormal' ? r.station : r.station?.map(v => <div key={v.resolve + v.id} style={{ lineHeight: "22px" }}>{v.position}</div>) },
{ {
name: '设备类型', sort: 6, value: 'cameraKindId', render: (_, r, index) => { name: '设备类型', sort: 6, value: 'cameraKindId',
}
}, },
{ name: '设备厂家', sort: 10, value: 'venderName', render: (_, r, index) => r.platform ? '未知' : r.venderName }, { name: '设备厂家', sort: 10, value: 'venderName', render: (_, r, index) => r.platform ? '未知' : r.venderName },
{ name: '通道号', sort: 10.1, value: 'cameraChannelNo' }, { name: '通道号', sort: 10.1, value: 'cameraChannelNo' },
@ -307,7 +305,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
{ {
name: '操作', sort: 25, value: 'text', render: (_, r, index) => { name: '操作', sort: 25, value: 'text', render: (_, r, index) => {
return <div style={{ width: 195 }}> return <div style={{ width: 195 }}>
{r.State && r.State >= 0 && r.State < 3 || route && ['videoAbnormal', 'useAbnormal'].includes(route) && !r.confirmTime ? {r.State < 3 || route && ['videoAbnormal', 'useAbnormal'].includes(route) && !r.confirmTime ?
<Button theme='borderless' style={{ width: 65 }} onClick={() => { <Button theme='borderless' style={{ width: 65 }} onClick={() => {
setConfirm(true) setConfirm(true)
setSelected([r.key]) setSelected([r.key])
@ -316,12 +314,12 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
<Button theme='borderless' style={{ width: 65 }} disabled>自动恢复</Button> : <Button theme='borderless' style={{ width: 65 }} disabled>自动恢复</Button> :
<Button theme='borderless' style={{ width: 65 }} disabled>已确认</Button> <Button theme='borderless' style={{ width: 65 }} disabled>已确认</Button>
} }
{route && ['dataLnterrupt', 'dataAbnormal', 'strategyHit'].includes(route) ? <> {route && ['dataLnterrupt', 'dataAbnormal', 'strategyHit', 'deviceAbnormal'].includes(route) ? <>
<Button theme='borderless' style={{ width: 65 }} disabled>已派单</Button> <Button theme='borderless' style={{ width: 65 }} disabled>已派单</Button>
<Button theme='borderless' style={{ width: 65 }} onClick={() => { {route == 'deviceAbnormal' ? "" : <Button theme='borderless' style={{ width: 65 }} onClick={() => {
setCheckPop(true) setCheckPop(true)
setAlarmId(r.key) setAlarmId(r.key)
}}>查看</Button> }}>查看</Button>}
</> </>
: route == 'videoAbnormal' ? <> : route == 'videoAbnormal' ? <>
<Button theme='borderless' style={{ width: 65 }} disabled>已派单</Button> <Button theme='borderless' style={{ width: 65 }} disabled>已派单</Button>
@ -501,7 +499,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
field='textData' field='textData'
onChange={(e) => setContent(e)} /> onChange={(e) => setContent(e)} />
</Form> </Form>
{(() => { {route == 'videoAbnormal' ? (() => {
let data let data
if (selected.length == 1) { if (selected.length == 1) {
data = tableData.find(v => v.key == selected[0]) data = tableData.find(v => v.key == selected[0])
@ -514,7 +512,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
return v.name return v.name
} }
})}中被多次绑定可能拥有不同的名称确认后该设备的同类型告警也会被一同确认</div> : "" })}中被多次绑定可能拥有不同的名称确认后该设备的同类型告警也会被一同确认</div> : ""
})()} })() : ""}
</div> </div>
</Modal> : ""} </Modal> : ""}

Loading…
Cancel
Save