Browse Source

feat:fix bugs

master
zhaobing’ 1 year ago
parent
commit
8f39471722
  1. 19
      weapp/package/inspectionInput/inspectionInput.js

19
weapp/package/inspectionInput/inspectionInput.js

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

Loading…
Cancel
Save