wenlele 2 years ago
parent
commit
b3e3f1aa9a
  1. 2
      api/app/lib/controllers/alarm/app.js
  2. 2
      api/app/lib/controllers/alarm/data.js
  3. 2
      api/app/lib/controllers/alarm/video.js
  4. 2
      web/client/src/sections/problem/components/tableData.jsx

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

@ -403,7 +403,7 @@ async function exportAppAlarms (ctx, listRes) {
exportData.push(item)
}
const fileName = `应用异常列表_${moment().format('YYYYMMDDHHmmss')}` + '.csv'
const fileName = `应用异常列表_${moment().format('YYYYMMDDHHmmss')}` + '.xlsx'
const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName })
const fileData = fs.readFileSync(filePath);
ctx.status = 200;

2
api/app/lib/controllers/alarm/data.js

@ -288,7 +288,7 @@ async function exportDataAlarms(ctx, alarmList, groupId) {
exportData.push(item)
}
let ttype = groupId == '1' ? '数据中断' : groupId == '2' ? '数据异常' : groupId == '3' ? '策略命中' : '设备异常';//数据类告警类别
const fileName = `数据异常列表_${ttype}_${moment().format('YYYYMMDDHHmmss')}` + '.csv'
const fileName = `数据异常列表_${ttype}_${moment().format('YYYYMMDDHHmmss')}` + '.xlsx'
const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName })
const fileData = fs.readFileSync(filePath);
ctx.status = 200;

2
api/app/lib/controllers/alarm/video.js

@ -356,7 +356,7 @@ async function exportVideoAlarms (ctx, alarmList) {
exportData.push(item)
}
const fileName = `视频异常列表_${moment().format('YYYYMMDDHHmmss')}` + '.csv'
const fileName = `视频异常列表_${moment().format('YYYYMMDDHHmmss')}` + '.xlsx'
const filePath = await simpleExcelDown({ data: exportData, header, fileName: fileName })
const fileData = fs.readFileSync(filePath);
ctx.status = 200;

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

@ -179,7 +179,7 @@ const TableData = ({ route, dispatch, actions, collectData, setSetup, exhibition
}
switch (route) {
case 'useAbnormal':
dispatch(problem.getAlarmLnspectionApi({ ...search.current, limit: 1, sustainTimeStart, sustainTimeEnd, pepProjectId: pepProjectId })).then((res) => {
dispatch(problem.getAlarmLnspectionApi({ ...search.current, sustainTimeStart, sustainTimeEnd, pepProjectId: pepProjectId })).then((res) => {
if (res.success) {
if (res.payload.data.count) {
url = `alarm/application/api?token=${user.token}&toExport=1&timestamp=${moment().valueOf()}&keyword=${keyword}&errType=${errType}`

Loading…
Cancel
Save