diff --git a/web/client/src/sections/problem/actions/problem.jsx b/web/client/src/sections/problem/actions/problem.jsx index d1007ff..680078d 100644 --- a/web/client/src/sections/problem/actions/problem.jsx +++ b/web/client/src/sections/problem/actions/problem.jsx @@ -146,4 +146,16 @@ export function getAlarmVideoDeviceKind () { //查询视频设备类型 msg: { option: '查询视频设备类型' }, reducer: { name: '' } }); -} \ No newline at end of file +} + +// export function putAlarmdataConfirm (data) { //确认数据告警 +// return dispatch => basicAction({ +// type: 'put', +// dispatch: dispatch, +// data, +// actionType: 'PUT-AIARM-DATA-CONFIRM', +// url: `${ApiTable.putAlarmdataConfirm}`, +// msg: { option: '确认数据告警' }, +// reducer: { name: '' } +// }); +// } diff --git a/web/client/src/sections/problem/components/inspection.jsx b/web/client/src/sections/problem/components/inspection.jsx index acb1929..c99bf08 100644 --- a/web/client/src/sections/problem/components/inspection.jsx +++ b/web/client/src/sections/problem/components/inspection.jsx @@ -25,7 +25,7 @@ const Inspection = ({ dispatch, actions, user, route, statistic }) => { const api = useRef(); const unfoldApi = useRef(false); - // console.log(actions); + // console.log(pictureData); useEffect(() => { diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx index 1fb0a3e..4bce85b 100644 --- a/web/client/src/sections/problem/components/tableData.jsx +++ b/web/client/src/sections/problem/components/tableData.jsx @@ -16,12 +16,12 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition const [search, setSearch] = useState({}) //查询 const [checkAll, setCheckAll] = useState(true) //查询 const api = useRef(); - let title = { dataLnterrupt: "数据中断详情", dataAbnormal: "数据异常详情", strategyHit: "策略命中详情", ideoAbnormal: "视频异常详情", useAbnormal: "应用异常详情", deviceAbnormal: "设备异常详情" } + let title = { dataLnterrupt: "数据中断详情", dataAbnormal: "数据异常详情", strategyHit: "策略命中详情", videoAbnormal: "视频异常详情", useAbnormal: "应用异常详情", deviceAbnormal: "设备异常详情" } useEffect(() => { switch (route) { case 'useAbnormal': - dispatch(problem.getAlarmLnspectionApi({})).then((res) => { + dispatch(problem.getAlarmLnspectionApi({ ...search, pepProjectId: '' })).then((res) => { console.log(res.payload.data) if (res.success) { let typeData = { element: "元素异常", apiError: "接口报错 ", timeout: "加载超时" } @@ -29,7 +29,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition let tableDatas = res.payload.data?.rows.map(v => ({ key: v.id, // serialNumber: v.serialNumber, - projectName: v.app?.projectCorrelations?.map(r => (r.name ? { name: r.name, state: '自定义' } : { + projectName: v.app?.projectCorrelations?.map(r => (r.name ? { name: r.name, state: 'PMOS' } : { name: r.pepProject?.project_name, state: r.pepProject?.construction_status }))?.filter(c => c), appName: v.app?.name, @@ -42,7 +42,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition type: v.type ? typeData[v.type] : "", confirm: v.confirm, })) - console.log(tableDatas); + // console.log(tableDatas); setTableData(tableDatas) } }) @@ -53,23 +53,28 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition console.log(res); let tableDatas = res.payload.data?.map(v => ({ key: v.alarmId, - // StructureName: v.StructureName, + StructureName: v.struc, // projectName: v.pomsProject?.map(r => (r.name ? { name: r.name, state: 'PMOS' } : { // name: r.pepProject?.projectName, state: r.pepProject?.constructionStatus // }))?.filter(c => c), - createTime: v.createTime ? moment(v.createTime).format("YYYY-MM-DD HH:mm:ss") : "无", - updateTime: v.updateTime ? moment(v.updateTime).format("YYYY-MM-DD HH:mm:ss") : "无", - confirmTime: v.confirmTime ? moment(v.confirmTime).format("YYYY-MM-DD HH:mm:ss") : "无", - // SourceName: v.SourceName, + createTime: v.createTime ? moment(v.createTime).format("YYYY-MM-DD HH:mm:ss") : "", + updateTime: v.updateTime ? moment(v.updateTime).format("YYYY-MM-DD HH:mm:ss") : "", + confirmTime: v.confirmTime ? moment(v.confirmTime).format("YYYY-MM-DD HH:mm:ss") : "", + SourceName: v.cameraName, // 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 : "", // AlarmCodeName: v.AlarmCodeName, // CurrentLevel: v.CurrentLevel, // detailCount: v.detailCount, - // AlarmContent: v.AlarmContent, + AlarmContent: v.statusDescribe, // State: v.State, - // alarmType: v.alarmType, + station: v.station, + resolve: v.resolve, + cameraChannelNo: v.cameraChannelNo, + cameraSerialNo: v.cameraSerialNo, + cameraKindId: v.cameraKindId, + venderName: v.venderName, platform: v.platform, confirm: v.confirmedContent, camerOnline: v.camerOnline, @@ -116,7 +121,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition name: r.pepProject?.projectName, state: r.pepProject?.constructionStatus }))?.filter(c => c), createTime: v.StartTime ? moment(v.StartTime).format("YYYY-MM-DD HH:mm:ss") : "", - updateTime: v.EndTime ? moment(v.EndTime).format("YYYY-MM-DD HH:mm:ss") : "", + updateTime: v.EndTime ? moment(v.EndTime).format("YYYY-MM-DD HH:mm:ss") : "无", confirmTime: v.confirmedTime ? moment(v.confirmedTime).format("YYYY-MM-DD HH:mm:ss") : "", SourceName: v.SourceName, AlarmGroupUnit: v.AlarmGroupUnit ? genreData.find(r => r.value == v.AlarmGroupUnit)?.name : "", @@ -143,7 +148,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition }, [query, search]) - // console.log(query); + // console.log(tableData.slice(query.page * query.limit, (query.page + 1) * query.limit)); return ( <> @@ -168,14 +173,25 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition let frame = [] collectData[route]?.map((v, index) => { if (index == 0) { - frame.push(