|
|
@ -31,7 +31,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition |
|
|
|
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 |
|
|
|
}))?.filter(c => c), |
|
|
@ -55,7 +55,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition |
|
|
|
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' } : { |
|
|
|
id: r.id, name: r.pepProject?.projectName, state: r.pepProject?.constructionStatus |
|
|
@ -88,7 +88,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition |
|
|
|
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' } : { |
|
|
|
id: r.id, name: r.pepProject?.projectName, state: r.pepProject?.constructionStatus |
|
|
@ -417,7 +417,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition |
|
|
|
// }, |
|
|
|
onChange: (selectedRowKeys, selectedRows) => { |
|
|
|
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows); |
|
|
|
setSelected(selectedRows?.map(v => v.key)) |
|
|
|
setSelected(selectedRows?.map(v => v.id)) |
|
|
|
}, |
|
|
|
}} |
|
|
|
/> |
|
|
@ -438,11 +438,11 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition |
|
|
|
setSelected((route == 'useAbnormal' || route == 'videoAbnormal' ? tableData.slice(query.page * query.limit, (query.page + 1) * query.limit) || [] : tableData)?.map(v => { |
|
|
|
if (['videoAbnormal', 'useAbnormal'].includes(route)) { |
|
|
|
if (!v.confirmTime) { |
|
|
|
return v.key |
|
|
|
return v.id |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (!(v.State > 2)) { |
|
|
|
return v.key |
|
|
|
return v.id |
|
|
|
} |
|
|
|
} |
|
|
|
})?.filter(v => v)) |
|
|
|