巴林闲侠 2 years ago
parent
commit
9fe1a6fc5c
  1. 2
      web/client/src/sections/problem/components/tableData.jsx
  2. 12
      web/client/src/sections/problem/containers/dataAlarm.jsx

2
web/client/src/sections/problem/components/tableData.jsx

@ -74,7 +74,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
cameraKindId: v.cameraKindId ? cameraKind?.find(v => v.value == v.cameraKindId)?.name : "",
venderName: v.venderName,
platform: v.platform,
confirm: v.confirmedContent,
confirm: v.confirmContent,
camerOnline: v.camerOnline,
}))
setCount(tableDatas?.length || 0);

12
web/client/src/sections/problem/containers/dataAlarm.jsx

@ -461,7 +461,16 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
if (res.success) {
setConfirm(false)
setSelected([])
setQuery({ limit: query.limit, page: query.page })
let data = tableData?.map(v => {
if (selected.find(vv => vv == v.key)) {
return { ...v, confirm: content, confirmTime: moment().format("YYYY-MM-DD HH:mm:ss"), State: 4 }
} else {
return { ...v }
}
}) || tableData
setTableData(data)
setSelected([])
// setQuery({ limit: query.limit, page: query.page })
}
})
})
@ -478,7 +487,6 @@ const DataAlarm = ({ match, dispatch, actions, user, loading, socket, iotVcmpWeb
}
}) || tableData
setTableData(data)
setConfirm(false)
setSelected([])
// console.log(data)
}

Loading…
Cancel
Save