首页表格新增一列

This commit is contained in:
lai
2024-02-21 14:38:57 +08:00
parent 625b39d901
commit 65696dee09
2 changed files with 6 additions and 2 deletions

View File

@@ -59,12 +59,12 @@ export async function listMain() {
ipAddress, ipAddress,
serialNum, serialNum,
name: key.split('/').join('_'), name: key.split('/').join('_'),
expiryDate:'-',
status: 'Abnormal', status: 'Abnormal',
}; };
} }
return mergedObj; return mergedObj;
}); });
//通过sort进行冒泡排序 //通过sort进行冒泡排序
mergedData.sort((a: any, b: any) => { mergedData.sort((a: any, b: any) => {
const typeA = specificOrder.indexOf(a.name.split('_')[0]); const typeA = specificOrder.indexOf(a.name.split('_')[0]);
@@ -73,7 +73,6 @@ export async function listMain() {
if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面 if (typeB === -1) return -1; // 如果不在特定顺序中,排到后面
return typeA - typeB; return typeA - typeB;
}); });
//console.log(mergedData);
return mergedData; return mergedData;
} }

View File

@@ -73,6 +73,11 @@ let tableColumns: ColumnsType = [
title: t('views.index.serialNum'), title: t('views.index.serialNum'),
dataIndex: 'serialNum', dataIndex: 'serialNum',
align: 'center', align: 'center',
},
{
title: t('views.index.expiryDate'),
dataIndex: 'expiryDate',
align: 'center',
}, },
{ {
title: t('views.index.ipAddress'), title: t('views.index.ipAddress'),