From eff01204d37eeefb26d191f0c3f7271c1cb38d4f Mon Sep 17 00:00:00 2001 From: wenlele Date: Wed, 28 Sep 2022 20:09:53 +0800 Subject: [PATCH] useAbnormal --- .../sections/problem/components/tableData.jsx | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx index 609d175..6ae2bc0 100644 --- a/web/client/src/sections/problem/components/tableData.jsx +++ b/web/client/src/sections/problem/components/tableData.jsx @@ -21,31 +21,31 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition useEffect(() => { switch (route) { case 'useAbnormal': - dispatch(problem.getAlarmLnspectionApi({})).then((res) => { - console.log(res.payload.data) - if (res.success) { - let typeData = { element: "元素异常", apiError: "接口报错 ", timeout: "加载超时" } - setCount(res.payload.data?.count || 0) - 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: '自定义' } : { - name: r.pepProject?.project_name, state: r.pepProject?.construction_status - }))?.filter(c => c), - appName: v.app?.name, - url: v.app?.url, - 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") : "", - alarmContent: v.alarmContent, - screenshot: v.screenshot, - type: v.type ? typeData[v.type] : "", - confirm: v.confirm, - })) - console.log(tableDatas); - setTableData(tableDatas) - } - }) + // dispatch(problem.getAlarmLnspectionApi({})).then((res) => { + // console.log(res.payload.data) + // if (res.success) { + // let typeData = { element: "元素异常", apiError: "接口报错 ", timeout: "加载超时" } + // setCount(res.payload.data?.count || 0) + // 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: '自定义' } : { + // name: r.pepProject?.project_name, state: r.pepProject?.construction_status + // }))?.filter(c => c), + // appName: v.app?.name, + // url: v.app?.url, + // 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") : "", + // alarmContent: v.alarmContent, + // screenshot: v.screenshot, + // type: v.type ? typeData[v.type] : "", + // confirm: v.confirm, + // })) + // console.log(tableDatas); + // setTableData(tableDatas) + // } + // }) break; case 'videoAbnormal': // dispatch(problem.getAlarmDataGroup()).then((res) => {