|
|
@ -69,14 +69,20 @@ Page({ |
|
|
|
points: { |
|
|
|
...issue.PatrolRecord.points, |
|
|
|
inspectContent: (() => { |
|
|
|
// 1.1 版本(2023-10-18)之前 dataList.points.inspectContent 为 Object, 1.1版本因增加点位关联设备改为 Array
|
|
|
|
const priorToV1_1 = moment(issue.PatrolRecord.inspectionTime).isBefore(moment('2023-10-18')) |
|
|
|
if (priorToV1_1) { |
|
|
|
let inspectContent = [] |
|
|
|
for (let k in issue.PatrolRecord.points.inspectContent) { |
|
|
|
inspectContent.push({ |
|
|
|
...issue.PatrolRecord.points.inspectContent[k], |
|
|
|
itemName: k |
|
|
|
name: k, |
|
|
|
}) |
|
|
|
} |
|
|
|
return inspectContent |
|
|
|
return [{ checkItems: inspectContent }] |
|
|
|
} else { |
|
|
|
return issue.PatrolRecord.points.inspectContent |
|
|
|
} |
|
|
|
})() |
|
|
|
} |
|
|
|
} |
|
|
@ -88,6 +94,7 @@ Page({ |
|
|
|
isRepair: tabIndex == 0 && (issue.state == 4 || issue.state == 7), |
|
|
|
isCheck: tabIndex == 0 && issue.state == 5, |
|
|
|
}) |
|
|
|
console.log(nextData, 'nextData') |
|
|
|
this.setData({ |
|
|
|
strucFocusUser: { |
|
|
|
...strucUser, |
|
|
@ -215,8 +222,8 @@ Page({ |
|
|
|
|
|
|
|
// 预览图片
|
|
|
|
previewImg: function (e) { |
|
|
|
const { index, itemindex, type } = e.currentTarget.dataset |
|
|
|
const imgs = type == 'point' ? this.data.data.PatrolRecord.points.inspectContent[itemindex].imgs : this.data[type]; |
|
|
|
const { index, itemindex, deviceidx, type } = e.currentTarget.dataset |
|
|
|
const imgs = type == 'point' ? this.data.data.PatrolRecord.points.inspectContent[deviceidx].checkItems[itemindex].imgs : this.data[type]; |
|
|
|
const newImgs = imgs.map(i => this.data.imgServer + i); |
|
|
|
wx.previewImage({ |
|
|
|
current: newImgs[index], |
|
|
|