let pageData = [
{
cardNumber: '25',
cardType: '0',
cardTypeStr: '普通卡',
createTime: '2018-01-25',
createUser: 1,
endDate: '2028-01-25',
id: 10,
memo: '11',
owner: 'Test',
ownerId: 1,
startDate: '2018-01-25',
state: '0',
stateStr: '正常',
},
{
cardNumber: '26',
cardType: '0',
cardTypeStr: '普通卡',
createTime: '2018-05-21',
createUser: 2,
endDate: '2028-05-21',
id: 11,
memo: '11',
owner: 'Test2',
ownerId: 2,
startDate: '2018-05-21',
state: '0',
stateStr: '正常',
},
{
cardNumber: '40',
cardType: '2',
cardTypeStr: '临时卡',
createTime: '2018-01-22',
createUser: 3,
endDate: '2028-01-22',
id: 17,
memo: '11',
owner: 'Test3',
ownerId: 3,
startDate: '2018-01-22',
state: '0',
stateStr: '正常',
},
{
cardNumber: '33',
cardType: '2',
cardTypeStr: '临时卡',
createTime: '2018-01-22',
createUser: 6,
endDate: '2028-01-22',
id: 15,
memo: '11',
owner: 'Test4',
ownerId: 6,
startDate: '2018-01-22',
state: '2',
stateStr: '注销',
},
],
const {
data: { pageData, },
} = res
// let ownerTypeStr =row[0].ownerTypeStr
// // let {ownerTypeStr} =row
// console.log(ownerTypeStr)
let newObj=pageData.map((item, index) =>
Object.assign(item.id)
)
console