添加异常情况网元展示SN
This commit is contained in:
@@ -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',
|
||||
};
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user