let obj = {
"项目": "一、账面原值",
"办公设备": null,
"房屋及建筑物": null,
"机器设备": null,
"其他设备": null,
"运输设备": null
}
export const columnsDevGrid = [
{
dataField: "项目",
caption: "项目",
width: 200,
alignment: "left",
id:'1'
},
{
dataField: "办公设备",
caption: "办公设备",
width: 200,
alignment: "left",
},
{
dataField: "房屋及建筑物",
dataType: "string",
caption: "房屋及建筑物",
width: 200,
alignment: "left",
},
{
dataField: "机器设备",
dataType: "string",
caption: "机器设备",
width: 80,
alignment: "center",
},
{
dataField: "其他设备",
dataType: "string",
caption: "其他设备",
width: 170,
alignment: "right",
},
{
dataField: "运输设备",
dataType: "string",
caption: "运输设备",
width: 170,
alignment: "right",
},
];
let obj = {
"项目": "一、账面原值",
"办公设备": null,
"房屋及建筑物": null,
"机器设备": null,
"其他设备": null,
"运输设备": null
};
let arr=[]
for(let i=0;i<Object.keys(obj).length;i++){
arr.push({dataField:Object.keys(baseData[0])[i],caption:Object.keys(baseData[0])[i]})
}
console.log(arr);