diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx index 5a3fa4c..d83a2f3 100644 --- a/web/client/src/sections/problem/components/tableData.jsx +++ b/web/client/src/sections/problem/components/tableData.jsx @@ -19,7 +19,6 @@ const TableData = ({alarmDataGroup, route, dispatch, actions, collectData, setSe const groupId = useRef() let title = { dataLnterrupt: "数据中断详情", dataAbnormal: "数据异常详情", strategyHit: "策略命中详情", videoAbnormal: "视频异常详情", useAbnormal: "应用异常详情", deviceAbnormal: "设备异常详情" } const [exportUrl, setExportUrl] = useState('') - useEffect(() => { switch (route) { case 'useAbnormal': @@ -27,6 +26,7 @@ const TableData = ({alarmDataGroup, route, dispatch, actions, collectData, setSe if (res.success) { let typeData = { element: "元素异常", apiError: "接口报错 ", timeout: "加载超时" } let tableDatas = res.payload.data?.rows.map(v => ({ + key: v.id, id: v.id, projectName: v.app?.projectCorrelations?.map(r => (r.name ? { id: r.id, name: r.name, state: 'PMOS' } : { id: r.id, name: r.pepProject?.projectName, state: r.pepProject?.constructionStatus @@ -52,6 +52,7 @@ const TableData = ({alarmDataGroup, route, dispatch, actions, collectData, setSe dispatch(problem.getAlarmVideoList({ ...search.current, pepProjectId: pepProjectId })).then((res) => { if (res.success) { let tableDatas = res.payload.data?.map(v => ({ + key: v.alarmId, id: v.alarmId, StructureName: v.struc, projectName: v.pomsProject?.map(r => (r.name ? { id: r.id, name: r.name, state: 'PMOS' } : { @@ -86,6 +87,7 @@ const TableData = ({alarmDataGroup, route, dispatch, actions, collectData, setSe if (res.success) { setCount(res.payload.data?.count || 0) let tableDatas = res.payload.data?.rows?.map(v => ({ + key: v.AlarmId, id: v.AlarmId, StructureName: v.StructureName, projectName: v.pomsProject?.map(r => (r.name ? { id: r.id, name: r.name, state: 'PMOS' } : { @@ -234,7 +236,6 @@ const TableData = ({alarmDataGroup, route, dispatch, actions, collectData, setSe break; } } - return ( <>