diff --git a/web/client/src/sections/problem/actions/problem.jsx b/web/client/src/sections/problem/actions/problem.jsx index 5789fe3..dbe4e3f 100644 --- a/web/client/src/sections/problem/actions/problem.jsx +++ b/web/client/src/sections/problem/actions/problem.jsx @@ -121,4 +121,29 @@ export function putAlarmdataConfirm (data) { //确认数据告警 msg: { error: '确认数据告警失败' }, reducer: { name: '' } }); +} + +export function getAlarmVideoList (query) { //查询视频告警列表 + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + query, + actionType: 'GET_ALARM_VIDEO_LIST', + url: `${ApiTable.getAlarmVideoList}`, + msg: { error: '查询视频告警列表失败' }, + reducer: { name: '' } + }); +} + + + +export function getAlarmVideoDeviceKind () { //查询视频设备类型 + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + actionType: 'GET_ALARM_VIDEO_DEVICE_KIND', + url: `${ApiTable.getAlarmVideoDeviceKind}`, + msg: { error: '查询视频设备类型失败' }, + reducer: { name: '' } + }); } \ No newline at end of file diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx index 6ae2bc0..7033ded 100644 --- a/web/client/src/sections/problem/components/tableData.jsx +++ b/web/client/src/sections/problem/components/tableData.jsx @@ -48,11 +48,16 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition // }) break; case 'videoAbnormal': - // dispatch(problem.getAlarmDataGroup()).then((res) => { - - - // if (res.success) { } - // }) + dispatch(problem.getAlarmVideoList({})).then((res) => { + if (res.success) { + // console.log(res); + } + }) + dispatch(problem.getAlarmVideoDeviceKind()).then((res) => { + if (res.success) { + setGenre(res.payload.data.map(v => ({ name: v.kind, value: v.id }))) + } + }) break; default: dispatch(problem.getAlarmDataGroup()).then((res) => { @@ -71,11 +76,11 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition genreData.push({ name: vv.name, value: vv.id }) }) }) - console.log(genreData); + // console.log(genreData); setGenre(genreData) if (data && data[0]?.id) { dispatch(problem.getAlarmDataList({ ...query, ...search, groupId: data.map(v => v.id).join(), pepProjectId: '' })).then((res) => { - console.log(res); + // console.log(res); if (res.success) { setCount(res.payload.data?.count || 0) let tableDatas = res.payload.data?.rows?.map(v => ({ @@ -112,8 +117,8 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition }, [query, search]) +// console.log(query); -console.log(query); return ( <>