|
|
@ -69,7 +69,7 @@ Page({ |
|
|
|
if (pointDevices.length) { |
|
|
|
pointDevices.forEach(device => { |
|
|
|
inspectContentArr.push({ |
|
|
|
deviceName: device.device.name, |
|
|
|
deviceName: device?.device?.name, |
|
|
|
deviceId: device.deviceId, |
|
|
|
checkItems: checkItems.map(c => ({ |
|
|
|
id: `${device.deviceId}-${c.id}`, |
|
|
@ -327,14 +327,14 @@ Page({ |
|
|
|
address |
|
|
|
} = that.data; |
|
|
|
let alarm = false; |
|
|
|
if (!address) { |
|
|
|
wx.showToast({ |
|
|
|
title: '请获取当前位置', |
|
|
|
icon: 'none', |
|
|
|
duration: 1500 |
|
|
|
}) |
|
|
|
return; |
|
|
|
} |
|
|
|
// if (!address) {
|
|
|
|
// wx.showToast({
|
|
|
|
// title: '请获取当前位置',
|
|
|
|
// icon: 'none',
|
|
|
|
// duration: 1500
|
|
|
|
// })
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
let reportArr = inspectContentArr.map(d => ({ ...d, alarm: false })); |
|
|
|
for (const [index, device] of inspectContentArr.entries()) { |
|
|
|
for (const item of device.checkItems) { |
|
|
@ -396,6 +396,7 @@ Page({ |
|
|
|
*/ |
|
|
|
onLoad(options) { |
|
|
|
const that = this; |
|
|
|
// console.log('inspectContentArr',inspectContentArr)
|
|
|
|
const scenePointId = options.scene; |
|
|
|
if (scenePointId) { // 扫小程序码进入
|
|
|
|
const userInfo = wx.getStorageSync('userInfo'); |
|
|
|