原始数组:
const result=[
{
"applyDepartmentName": "经济科",
"materialName": "电脑",
"normName": "小",
"applyNum": 1,
"applyAmount": 120,
"supplierName": "联想",
"purchaseNum": 0,
"receiveNum": 0
},
{
"applyDepartmentName": "医学科",
"materialName": "口罩",
"normName": "中",
"applyNum": 3,
"applyAmount": 960,
"supplierName": "N95",
"purchaseNum": 0,
"receiveNum": 0
},
{
"applyDepartmentName": "保卫科",
"materialName": "脉冲器",
"normName": "小",
"applyNum": 2,
"applyAmount": 110,
"supplierName": "小米",
"purchaseNum": 0,
"receiveNum": 2
}
]
期望数组:
const numList= [
{ name: '申请数量', key: 'applyNum', num:6 },
{ name: '申请金额', key: 'applyAmount', num: 1190 },
{ name: '采购数量', key: 'purchaseNum', num: 0 },
{ name: '领用数量', key: 'receiveNum', num: 2 },
],
大佬!!!