|
@ -256,9 +256,14 @@ Page({ |
|
|
} |
|
|
} |
|
|
const { id, name, departmentId, deptName } = wx.getStorageSync('userInfo'); |
|
|
const { id, name, departmentId, deptName } = wx.getStorageSync('userInfo'); |
|
|
const newData = that.data.data.map((item) => { |
|
|
const newData = that.data.data.map((item) => { |
|
|
|
|
|
let pointDevices=[] |
|
|
|
|
|
item.devices.map(child=>{ |
|
|
|
|
|
const {pointDevice,...newItem } = child; |
|
|
|
|
|
pointDevices.push({device:newItem,deviceId:pointDevice.deviceId}) |
|
|
|
|
|
}) |
|
|
// 使用对象的解构赋值去掉 project 和 devices 属性
|
|
|
// 使用对象的解构赋值去掉 project 和 devices 属性
|
|
|
const { project, devices, ...newItem } = item; |
|
|
const { project, devices, ...newItem } = item; |
|
|
return newItem; |
|
|
return {...newItem,pointDevices} |
|
|
}); |
|
|
}); |
|
|
const nextItemData=newData.find(item=>item.id===pointList[pointIndex].id) |
|
|
const nextItemData=newData.find(item=>item.id===pointList[pointIndex].id) |
|
|
// const curPlan = that.data.planList.find(item=>item.id==patrolTemplate[patrolTemplateIndex].id)
|
|
|
// const curPlan = that.data.planList.find(item=>item.id==patrolTemplate[patrolTemplateIndex].id)
|
|
|