|
@ -243,7 +243,7 @@ let header_app = [{ |
|
|
key: "confirmTime", |
|
|
key: "confirmTime", |
|
|
}]; |
|
|
}]; |
|
|
module.exports = function (app, opts) { |
|
|
module.exports = function (app, opts) { |
|
|
async function getExportAlarmHeader(ctx, type) { |
|
|
async function getExportAlarmHeader(type) { |
|
|
try { |
|
|
try { |
|
|
let headerMap = { |
|
|
let headerMap = { |
|
|
"1": headerZD,//数据中断
|
|
|
"1": headerZD,//数据中断
|
|
@ -254,12 +254,8 @@ module.exports = function (app, opts) { |
|
|
app: header_app, |
|
|
app: header_app, |
|
|
} |
|
|
} |
|
|
return headerMap[type] || [] |
|
|
return headerMap[type] || [] |
|
|
} catch (error) { |
|
|
} catch (err) { |
|
|
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); |
|
|
console.log(`获取告警导出表格表头失败, error: ${err}`); |
|
|
ctx.status = 400; |
|
|
|
|
|
ctx.body = { |
|
|
|
|
|
message: typeof error == 'string' ? error : undefined |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|