diff --git a/web/client/assets/images/problem/banner.gif b/web/client/assets/images/problem/banner.gif
new file mode 100644
index 0000000..37cc8f6
Binary files /dev/null and b/web/client/assets/images/problem/banner.gif differ
diff --git a/web/client/src/sections/problem/components/inspection.jsx b/web/client/src/sections/problem/components/inspection.jsx
index 9d567e5..18d2d8a 100644
--- a/web/client/src/sections/problem/components/inspection.jsx
+++ b/web/client/src/sections/problem/components/inspection.jsx
@@ -48,28 +48,31 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
useEffect(() => {
if (projectScrollbar) projectScrollbar.destroy()
const domEquipment = document.getElementById("inspection");
- if (unfold) {
- projectScrollbar = new PerfectScrollbar("#inspection", {
- suppressScrollY: true,
- });
- if (domEquipment && projectScrollbar) projectScrollbar.update()
- } else {
- projectScrollbar = new PerfectScrollbar("#inspection", {
- suppressScrollX: true,
- })
- if (domEquipment && projectScrollbar) projectScrollbar.update()
+ if (domEquipment) {
+ if (unfold) {
+ projectScrollbar = new PerfectScrollbar("#inspection", {
+ suppressScrollY: true,
+ });
+ if (domEquipment && projectScrollbar) projectScrollbar.update()
+ } else {
+ projectScrollbar = new PerfectScrollbar("#inspection", {
+ suppressScrollX: true,
+ })
+ if (domEquipment && projectScrollbar) projectScrollbar.update()
+ }
}
+
})
useEffect(() => {
dispatch(problem.getAlarmLnspection(checkPatrol)).then((res) => {
- // console.log(res.payload.data);
+ // console.log(res.payload.data)
if (res.success) {
setPatrolAbnormal(res.payload.data)
setNotRead(res.payload.data.filter(v => !v.notedTime).length)
}
})
- }, [checkPatrol]);
+ }, [checkPatrol])
useEffect(() => {
@@ -91,7 +94,7 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
return (
-
+
@@ -192,118 +195,132 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => {
-
document.getElementById('unfold').style.display = 'none'}
- onMouseOut={() => document.getElementById('unfold').style.display = 'block'}
- id="inspection" style={{ width: 'calc(100% - 20px)', marginLeft: 10, height: unfold ? 280 : 600, whiteSpace: unfold ? 'nowrap' : '', position: "relative", }}>
- {patrolAbnormal?.map((v, i) =>
-
{
- setPicturePop(true)
- setPictureId(i);
- setPictureData(patrolAbnormal[i])
- }}
- >
-
-
- 获取时间:{moment(v.createTime).format("YYYY-MM-DD HH:mm:ss")}
- {v.app?.name}
-
- {v.notedPepUser ?
: ""}
-
)}
+ {patrolAbnormal?.length > 0 ?
+
document.getElementById('unfold').style.display = 'none'}
+ onMouseOut={() => document.getElementById('unfold').style.display = 'block'}
+ id="inspection" style={{ width: 'calc(100% - 20px)', marginLeft: 10, height: unfold ? 280 : 600, whiteSpace: unfold ? 'nowrap' : '', position: "relative", }}>
+ {patrolAbnormal?.map((v, i) =>
+
{
+ setPicturePop(true)
+ setPictureId(i);
+ setPictureData(patrolAbnormal[i])
+ }}
+ >
+
+
+ 获取时间:{moment(v.createTime).format("YYYY-MM-DD HH:mm:ss")}
+ {v.app?.name}
+
+ {v.notedPepUser ?
: ""}
+
)}
-
-
e.stopPropagation()}
- onMouseOut={(e) => e.stopPropagation()}
- onClick={() => setUnfold(!unfold)}
- style={{
- width: 'calc(100% - 20px)', marginLeft: 10, height: 24,
- 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%)',
- borderRadius: 3,
- lineHeight: '24px',
- fontSize: 12,
- zIndex: 100,
- position: 'relative',
- top: unfold ? -20 : 6,
- left: 0,
- textAlign: 'center',
- color: unfold ? 'rgba(0,90,189,0.7)' : '#969799',
- cursor: 'pointer',
- }}>{unfold ? '展开更多' : '收起'}
-
- {picturePop ?
{pictureData?.app?.name}
-
- 未阅 {notRead}/{patrolAbnormal.length}
-
- }
- hasCancel={false}
- footer={
-
-
-
-
-
-
-
-
-
}
- visible={true}
- onOk={() => {
+
+ :
+ 当前应用暂无自动巡检计划
+
+ }
+ {patrolAbnormal?.length > 0 ?
+
e.stopPropagation()}
+ onMouseOut={(e) => e.stopPropagation()}
+ onClick={() => setUnfold(!unfold)}
+ style={{
+ width: 'calc(100% - 20px)', marginLeft: 10, height: 24,
+ 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%)',
+ borderRadius: 3,
+ lineHeight: '24px',
+ fontSize: 12,
+ zIndex: 100,
+ position: 'relative',
+ top: unfold ? -20 : 14,
+ left: 0,
+ textAlign: 'center',
+ color: unfold ? 'rgba(0,90,189,0.7)' : '#969799',
+ cursor: 'pointer',
+ }}>{unfold ? '展开更多' : '收起'}
+
: ""}
+ {
+ picturePop ?
{pictureData?.app?.name}
+
+ 未阅 {notRead}/{patrolAbnormal.length}
+
+ }
+ hasCancel={false}
+ footer={
+
+
+
+
+
+
+
+
+
}
+ visible={true}
+ onOk={() => {
- }}
- width={837}
- onCancel={() => {
- setPicturePop(false)
- setPictureId('')
- if (timer) clearTimeout(timer)
- }}
- >
-
- {pictureData.notedTime ?
核验信息:{pictureData.notedPepUser} {moment(pictureData.notedTime).format("YYYY-MM-DD HH:mm:ss")} : ""}
-
截取时间:{moment(pictureData.createTime).format("YYYY-MM-DD HH:mm:ss")}
-
{
- console.log(pictureData);
- copy(pictureData?.router || "无相关地址");
- Notification.success({
- content: "复制成功",
- duration: 2,
- })
- }}
+ }}
+ width={837}
+ onCancel={() => {
+ setPicturePop(false)
+ setPictureId('')
+ if (timer) clearTimeout(timer)
+ }}
+ >
+
+ {pictureData.notedTime ?
核验信息:{pictureData.notedPepUser} {moment(pictureData.notedTime).format("YYYY-MM-DD HH:mm:ss")} : ""}
+
截取时间:{moment(pictureData.createTime).format("YYYY-MM-DD HH:mm:ss")}
+
{
+ console.log(pictureData);
+ copy(pictureData?.router || "无相关地址");
+ Notification.success({
+ content: "复制成功",
+ duration: 2,
+ })
+ }}
+ />
+
+
-
-
-
- : ""
+
+ : ""
}
diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx
index a9652ee..8ec8f7c 100644
--- a/web/client/src/sections/problem/components/tableData.jsx
+++ b/web/client/src/sections/problem/components/tableData.jsx
@@ -48,6 +48,14 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
})
break;
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) => {
if (res.success) {
// console.log(res);
@@ -64,11 +72,11 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
yingshiToken: v.yingshiToken,
AlarmContent: v.statusDescribe,
// State: v.State,
- station: v.station,
- resolve: v.resolve,
+ station: v.station || [],
+ resolve: v.resolve || [],
cameraChannelNo: v.cameraChannelNo,
cameraSerialNo: v.cameraSerialNo,
- cameraKindId: v.cameraKindId,
+ cameraKindId: v.cameraKindId ? cameraKind?.find(v => v.value == v.cameraKindId)?.name : "",
venderName: v.venderName,
platform: v.platform,
confirm: v.confirmedContent,
@@ -79,11 +87,6 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
setTableData(tableDatas)
}
})
- dispatch(problem.getAlarmVideoDeviceKind()).then((res) => {
- if (res.success) {
- setGenre(res.payload.data.map(v => ({ name: v.kind, value: v.id })))
- }
- })
break;
default:
dispatch(problem.getAlarmDataGroup()).then((res) => {
@@ -106,7 +109,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
setGenre(genreData)
if (data && data[0]?.id) {
dispatch(problem.getAlarmDataList({ ...query, ...search, groupId: data.map(v => v.id).join(), pepProjectId: '' })).then((res) => {
- // console.log(res);
+ console.log(res);
if (res.success) {
setCount(res.payload.data?.count || 0)
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 : "",
Strategy: 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,
CurrentLevel: v.CurrentLevel,
detailCount: v.detailCount,
@@ -129,6 +133,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
State: v.State,
alarmType: v.alarmType,
confirm: v.confirmedContent,
+ station: v.StructureLongitude && v.StructureLatitude ? v.StructureLongitude + '. ' + v.StructureLatitude : "",
}))
// console.log(tableDatas);
setTableData(tableDatas)
@@ -254,7 +259,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
state: v.state,
keywordTarget: v.keywordTarget,
keyword: v.keyword,
- kindId:v.kindId,
+ kindId: v.kindId,
groupUnitId: v.groupUnitId,
errType: v.errType,
confirmState: v.confirmState,
diff --git a/web/client/src/sections/problem/containers/dataAlarm.jsx b/web/client/src/sections/problem/containers/dataAlarm.jsx
index e4699fb..59cb6a5 100644
--- a/web/client/src/sections/problem/containers/dataAlarm.jsx
+++ b/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'],
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'],
- 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 = {
@@ -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: 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) => {r.confirmTime ? r.confirmTime : "无"}
},
@@ -279,11 +279,9 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
return '当前'
}
},
- { name: '位置信息', sort: 11, value: 'station', render: (_, r, index) => r.station?.map(v => {v.position}
) },
+ { name: '位置信息', sort: 11, value: 'station', render: (_, r, index) => route == 'deviceAbnormal' ? r.station : r.station?.map(v => {v.position}
) },
{
- 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.1, value: 'cameraChannelNo' },
@@ -307,7 +305,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
{
name: '操作', sort: 25, value: 'text', render: (_, r, index) => {
return
- {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 ?
: ""
- })()}
+ })() : ""}
: ""}