|
|
@ -10,14 +10,14 @@ import qs from "qs"; |
|
|
|
|
|
|
|
|
|
|
|
const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition, pepProjectId, |
|
|
|
selected, setSelected, setIfBulk, setConfirm, genre, setGenre, query, setQuery, tableData, setTableData, location, user }) => { |
|
|
|
selected, setSelected, setIfBulk, setConfirm, genre, setGenre, query, setQuery, tableData, setTableData, location, user, statusId, setStatusId}) => { |
|
|
|
const { problem } = actions |
|
|
|
|
|
|
|
const [count, setCount] = useState(0) // |
|
|
|
const [checkAll, setCheckAll] = useState(true) //查询 |
|
|
|
const api = useRef(); |
|
|
|
const search = useRef({ |
|
|
|
state: '', keywordTarget: '', keyword: '', kindId: '', groupUnitId: '', |
|
|
|
state: '', keywordTarget: '', keyword: '', kindId: '', groupUnitId: '', statusId:'', |
|
|
|
errType: '', confirmState: '', onlineState: '', sustainTimeStart: '', sustainTimeEnd: '' |
|
|
|
}) |
|
|
|
const kindName = useRef() |
|
|
@ -153,12 +153,17 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition |
|
|
|
setGenre(res.payload.data.map(v => ({ name: v.kind, value: v.id }))) |
|
|
|
} |
|
|
|
}) |
|
|
|
dispatch(problem.getAlarmVideoExceptionStatusId()).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
setStatusId(res.payload.data.map(v => ({ name: v.describe, value: v.statusId }))) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}, []) |
|
|
|
|
|
|
|
const handleExport = () => { |
|
|
|
let url = '' |
|
|
|
let { keywordTarget, keyword = '', errType = '', state = '', kindId = '', groupUnitId = '', confirmState = '', onlineState = '', sustainTimeStart = '', sustainTimeEnd = '' } = search.current |
|
|
|
let { keywordTarget, keyword = '', errType = '', state = '', kindId = '', statusId = '', groupUnitId = '', confirmState = '', onlineState = '', sustainTimeStart = '', sustainTimeEnd = '' } = search.current |
|
|
|
switch (route) { |
|
|
|
case 'useAbnormal': |
|
|
|
url = `alarm/application/api?token=${user.token}&toExport=1×tamp=${moment().valueOf()}&keyword=${keyword}&errType=${errType} |
|
|
@ -166,7 +171,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition |
|
|
|
break; |
|
|
|
case 'videoAbnormal': |
|
|
|
url = `alarm/video/list?token=${user.token}&toExport=1×tamp=${moment().valueOf()}&keywordTarget=${keywordTarget} |
|
|
|
&keyword=${keyword}&kindId=${kindId}&state=${state}&sustainTimeStart=${sustainTimeStart}&sustainTimeEnd=${sustainTimeEnd} |
|
|
|
&keyword=${keyword}&kindId=${kindId}&statusId=${statusId}&state=${state}&sustainTimeStart=${sustainTimeStart}&sustainTimeEnd=${sustainTimeEnd} |
|
|
|
&pepProjectId=${pepProjectId || ''}` |
|
|
|
break; |
|
|
|
default: |
|
|
@ -277,6 +282,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition |
|
|
|
keywordTarget: v.keywordTarget, |
|
|
|
keyword: v.keyword, |
|
|
|
kindId: v.kindId, |
|
|
|
statusId: v.statusId, |
|
|
|
groupUnitId: v.groupUnitId, |
|
|
|
errType: v.errType, |
|
|
|
confirmState: v.confirmState, |
|
|
@ -299,6 +305,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition |
|
|
|
keywordTarget: v.keywordTarget, |
|
|
|
keyword: v.keyword, |
|
|
|
kindId: v.kindId, |
|
|
|
statusId: v.statusId, |
|
|
|
groupUnitId: v.groupUnitId, |
|
|
|
errType: v.errType, |
|
|
|
confirmState: v.confirmState, |
|
|
|