diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx index 62d310c..3921397 100644 --- a/web/client/src/sections/problem/components/tableData.jsx +++ b/web/client/src/sections/problem/components/tableData.jsx @@ -8,7 +8,7 @@ import { emit } from "superagent"; -const TableData = ({ dispatch, actions, route, collectData, setSetup, exhibition, +const TableData = ({ route,dispatch, actions, collectData, setSetup, exhibition, selected, setSelected, setIfBulk, setConfirm, setGenre, query, setQuery }) => { const { problem } = actions @@ -101,13 +101,13 @@ const TableData = ({ dispatch, actions, route, collectData, setSetup, exhibition break; } - }, [route, query, search]) + }, [query, search]) return ( <> -
+
{ - - const [route, setRoute] = useState('') //子页面路由 + let route = match.url.substring(match.url.lastIndexOf("/") + 1, match.url.length) const [abnormalLenght, setAbnormalLenght] = useState(0) //异常数量 const [collect, setCollect] = useState([]) //搜索结构 const [setup, setSetup] = useState(false); //表格设置是否显现 @@ -33,16 +32,6 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { const tableType = { dataLnterrupt: 'dataLnterrupt', dataAbnormal: 'dataAbnormal', strategyHit: 'strategyHit', videoAbnormal: 'videoAbnormal', useAbnormal: 'useAbnormal', deviceAbnormal: 'deviceAbnormal' } const statistic = { dataLnterrupt: '数据中断统计', dataAbnormal: '数据异常统计', strategyHit: '策略命中统计', videoAbnormal: '视频异常统计', useAbnormal: '应用异常统计', deviceAbnormal: '设备异常统计' } - - useEffect(() => { - setRoute(match.url.substring(match.url.lastIndexOf("/") + 1, match.url.length)) - // console.log(match.url) - // console.log(tableType); - - - }, []) - - useEffect(() => { if (route) { @@ -57,7 +46,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { : ""; } attribute(tableType[route], route); - }, [route]) + }, []) //搜索结构 @@ -285,7 +274,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { // } - console.log(data) + // console.log(data) // let TableDisplay = [] let TableDisplay = data?.map(v => { @@ -295,7 +284,7 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket }) => { } }) - console.log(TableDisplay); + // console.log(TableDisplay); TableDisplay.push({ title: '操作',