From 69e20202ea640e6887c6c82441dde50a4d40841f Mon Sep 17 00:00:00 2001 From: wuqun Date: Thu, 17 Nov 2022 17:29:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?(*)=E5=BA=94=E7=94=A8=E5=91=8A=E8=AD=A6?= =?UTF-8?q?=E5=AF=BC=E5=87=BA,=E5=85=88=E5=8E=BB=E6=8E=89limit:1=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/problem/components/tableData.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/src/sections/problem/components/tableData.jsx b/web/client/src/sections/problem/components/tableData.jsx index 848c4af..5eb1177 100644 --- a/web/client/src/sections/problem/components/tableData.jsx +++ b/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×tamp=${moment().valueOf()}&keyword=${keyword}&errType=${errType}` From 00e4e2dadc51ba1c6e2958a40a9a40e4db83b61d Mon Sep 17 00:00:00 2001 From: wuqun Date: Fri, 18 Nov 2022 11:31:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?(*)=E5=91=8A=E8=AD=A6=E5=AF=BC=E5=87=BA=20?= =?UTF-8?q?=E5=90=8E=E7=BC=80=E6=94=B9=E4=B8=BA.xlsx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/alarm/app.js | 2 +- api/app/lib/controllers/alarm/data.js | 2 +- api/app/lib/controllers/alarm/video.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/app/lib/controllers/alarm/app.js b/api/app/lib/controllers/alarm/app.js index c035bbe..265e99c 100644 --- a/api/app/lib/controllers/alarm/app.js +++ b/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; diff --git a/api/app/lib/controllers/alarm/data.js b/api/app/lib/controllers/alarm/data.js index 8357c68..ca1204a 100644 --- a/api/app/lib/controllers/alarm/data.js +++ b/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; diff --git a/api/app/lib/controllers/alarm/video.js b/api/app/lib/controllers/alarm/video.js index ce69e26..ab2cff1 100644 --- a/api/app/lib/controllers/alarm/video.js +++ b/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;