Browse Source

feat:fix 主动上报不显示设备bug

master
zhaobing’ 1 year ago
parent
commit
a53d92f6b1
  1. 7
      weapp/package/report/report.js

7
weapp/package/report/report.js

@ -256,9 +256,14 @@ Page({
}
const { id, name, departmentId, deptName } = wx.getStorageSync('userInfo');
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 属性
const { project, devices, ...newItem } = item;
return newItem;
return {...newItem,pointDevices}
});
const nextItemData=newData.find(item=>item.id===pointList[pointIndex].id)
// const curPlan = that.data.planList.find(item=>item.id==patrolTemplate[patrolTemplateIndex].id)

Loading…
Cancel
Save