|
|
@ -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) |
|
|
|
} |
|
|
|