添加异常情况网元展示SN

This commit is contained in:
lai
2023-12-26 11:51:11 +08:00
parent 4f34b3bca9
commit 7e98f35f5b
2 changed files with 3 additions and 1 deletions

View File

@@ -36,6 +36,8 @@ export async function listMain() {
const [key, value] = Object.entries(obj)[0];
const ipAddress = (value as any).ipAddress;
const systemState = (value as any).systemState;
const serialNum = (value as any).serialNum;
const errCode = systemState && systemState['errorCode'];
var time = new Date();
// console.log(key, value);
@@ -53,6 +55,7 @@ export async function listMain() {
version: '-',
refresh: parseDateToStr(time),
ipAddress: ipAddress,
serialNum: serialNum,
name: key.split('/').join('_'),
status: 'Abnormal',
};

View File

@@ -75,7 +75,6 @@ export async function writeSheet(
}
const workSheet = utils.json_to_sheet(data, opts);
console.log(workSheet);
// 设置列宽度,单位厘米
workSheet['!cols'] = Object.keys(data[0]).map(() => {