wuqun 2 years ago
parent
commit
811928b6fd
  1. 11
      api/app/lib/controllers/alarm/app.js
  2. 4
      api/app/lib/routes/alarm/index.js
  3. 46
      web/client/src/sections/install/containers/system.jsx
  4. 6
      web/client/src/sections/problem/actions/problem.jsx
  5. 2
      web/client/src/sections/problem/components/tableData.jsx
  6. 2
      web/client/src/utils/webapi.js

11
api/app/lib/controllers/alarm/app.js

@ -301,12 +301,13 @@ async function apiErrorList (ctx) {
findOption.where.$or.push(
{
'$app.name$': { $like: `%${keyword}%` }
}
},
)
} else {
findOption.where['$app->projectCorrelations.id$'] = {
$in: pomsProjectIds
}
// findOption.where['$app->projectCorrelations.id$'] = {
// $in: pomsProjectIds
// }
findOption.include[0].include[0].where.id = { $in: pomsProjectIds }
}
if (errType) {
@ -371,7 +372,7 @@ async function apiErrorList (ctx) {
}
}
async function exportAppAlarms(ctx, listRes) {
async function exportAppAlarms (ctx, listRes) {
let typeData = { element: "元素异常", apiError: "接口报错 ", timeout: "加载超时" }
try {
const { utils: { simpleExcelDown, getExportAlarmHeader } } = ctx.app.fs;

4
api/app/lib/routes/alarm/index.js

@ -61,6 +61,6 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/vcmp/auth'] = { content: '获取视频平台应用鉴权token', visible: true };
router.get('/vcmp/auth', videoAlarm.vcmpAppAuthToken);
app.fs.api.logAttr['GET/alarm/video/exception_statusId'] = { content: '查询视频异常类型', visible: true };
router.get('/alarm/video/exception_statusId', videoAlarm.exceptionType);
app.fs.api.logAttr['GET/alarm/video/exceptionType'] = { content: '查询视频异常类型', visible: true };
router.get('/alarm/video/exceptionType', videoAlarm.exceptionType);
};

46
web/client/src/sections/install/containers/system.jsx

@ -61,7 +61,6 @@ const Example = (props) => {
dispatch(install.getProjectAppList(query)).then((res) => {//
setAppList(res.payload.data)
})
console.log('user', user);
}, [])
useEffect(() => {
getProjectPomsList();
@ -225,28 +224,37 @@ const Example = (props) => {
}
},
{
title: '关联时间',
dataIndex: "createTime",
key: 'time',
render: (_, row) => {
return moment(row.createTime).format("YYYY-MM-DD HH:mm:ss")||'无';
}
title: '映射类型',
dataIndex: "mappingClass",
key: 'mappingClass',
render: (_, row) => {
let data = { wisdom: '智慧类', monitor: '监测类', other: '其他' }
return data[row.mappingClass]
}
},
{
title: '关联时间',
dataIndex: "createTime",
key: 'time',
render: (_, row) => {
return moment(row.createTime).format("YYYY-MM-DD HH:mm:ss") || '无';
}
},
{
title: '修改时间',
dataIndex: "updateTime",
key: 'updateTime',
render: (_, row) => {
return (row.updateTime?moment(row.updateTime).format("YYYY-MM-DD HH:mm:ss"):moment(row.createTime).format("YYYY-MM-DD HH:mm:ss"));
}
title: '修改时间',
dataIndex: "updateTime",
key: 'updateTime',
render: (_, row) => {
return (row.updateTime ? moment(row.updateTime).format("YYYY-MM-DD HH:mm:ss") : moment(row.createTime).format("YYYY-MM-DD HH:mm:ss"));
}
},
{
title: '添加人员',
dataIndex: "pepUserName",
key: 'pepUserName',
render: (_, row) => {
return row.pepUserName||'无'
}
title: '添加人员',
dataIndex: "pepUserName",
key: 'pepUserName',
render: (_, row) => {
return row.pepUserName || '无'
}
},
{
title: "管理",

6
web/client/src/sections/problem/actions/problem.jsx

@ -149,12 +149,12 @@ export function getAlarmVideoDeviceKind () { //查询视频设备类型
});
}
export function getAlarmVideoExceptionStatusId () { //
export function getAlarmVideoExceptionType () { //
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
actionType: 'GET_ALARM_VIDEO_EXCEPTION_STATUS_ID',
url: `${ApiTable.getAlarmVideoExceptionStatusId}`,
actionType: 'GET_ALARM_VIDEO_EXCEPTION_TYPE',
url: `${ApiTable.getAlarmVideoExceptionType}`,
msg: { option: '查询视频异常类型' },
reducer: { name: '' }
});

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

@ -153,7 +153,7 @@ 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) => {
dispatch(problem.getAlarmVideoExceptionType()).then((res) => {
if (res.success) {
setStatusId(res.payload.data.map(v => ({ name: v.describe, value: v.statusId })))
}

2
web/client/src/utils/webapi.js

@ -47,7 +47,7 @@ export const ApiTable = {
getAlarmVideoDeviceKind: 'alarm/video/device_kind', //查询视频设备类型
putAlarmVideoConfirm: 'alarm/video/confirm', //确认视频告警信息
getVcmpAuth: 'vcmp/auth', // 获取视频平台应用鉴权token
getAlarmVideoExceptionStatusId: 'alarm/video/exception_statusId', //查询视频设备类型
getAlarmVideoExceptionType: 'alarm/video/exceptionType', //查询视频设备类型
//服务-信鸽服务
getPush: "push", //获取推送配置列表

Loading…
Cancel
Save