|
|
@ -61,7 +61,7 @@ Page({ |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取巡检模板
|
|
|
|
getPatrolTemplate(templateId) { |
|
|
|
getPatrolTemplate (templateId) { |
|
|
|
Request.get(getPatrolTemplate(templateId)).then(res => { |
|
|
|
const checkItems = res.rows[0].checkItems; |
|
|
|
const inspectContent = {}; |
|
|
@ -80,7 +80,7 @@ Page({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
onPickerChange(e) { |
|
|
|
onPickerChange (e) { |
|
|
|
const { key } = e.currentTarget.dataset; |
|
|
|
const { value } = e.detail; |
|
|
|
|
|
|
@ -98,19 +98,19 @@ Page({ |
|
|
|
this.getPatrolTemplate(curPlan.templateId); |
|
|
|
}, |
|
|
|
|
|
|
|
onPickerCancel(e) { |
|
|
|
onPickerCancel (e) { |
|
|
|
const { key } = e.currentTarget.dataset; |
|
|
|
this.setData({ |
|
|
|
[`${key}Visible`]: false, |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
onPlanListPicker() { |
|
|
|
onPlanListPicker () { |
|
|
|
this.setData({ planListVisible: true }); |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取当前位置
|
|
|
|
selfLocation() { |
|
|
|
selfLocation () { |
|
|
|
const that = this |
|
|
|
wx.showLoading({ |
|
|
|
title: '定位中', |
|
|
@ -142,7 +142,7 @@ Page({ |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
handleChangeTwo(e) { |
|
|
|
handleChangeTwo (e) { |
|
|
|
const isNormal = e.detail.value === 'normal'; |
|
|
|
const inspectContent = this.data.inspectContent; |
|
|
|
inspectContent[e.currentTarget.dataset.item].isNormal = isNormal; |
|
|
@ -156,7 +156,7 @@ Page({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
handleChangeThree(e) { |
|
|
|
handleChangeThree (e) { |
|
|
|
const inspectContent = this.data.inspectContent; |
|
|
|
inspectContent[e.currentTarget.dataset.item].level = e.detail.value; |
|
|
|
this.setData({ |
|
|
@ -296,7 +296,7 @@ Page({ |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
bindCancel() { |
|
|
|
bindCancel () { |
|
|
|
if (this.data.scenePointId) { |
|
|
|
wx.switchTab({ url: '/pages/index/index' }) |
|
|
|
} else { |
|
|
@ -379,7 +379,7 @@ Page({ |
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面加载 |
|
|
|
*/ |
|
|
|
onLoad(options) { |
|
|
|
onLoad (options) { |
|
|
|
const that = this; |
|
|
|
const scenePointId = options.scene; |
|
|
|
if (scenePointId) { // 扫小程序码进入
|
|
|
@ -407,49 +407,49 @@ Page({ |
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面初次渲染完成 |
|
|
|
*/ |
|
|
|
onReady() { |
|
|
|
onReady () { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面显示 |
|
|
|
*/ |
|
|
|
onShow() { |
|
|
|
onShow () { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面隐藏 |
|
|
|
*/ |
|
|
|
onHide() { |
|
|
|
onHide () { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 生命周期函数--监听页面卸载 |
|
|
|
*/ |
|
|
|
onUnload() { |
|
|
|
onUnload () { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 页面相关事件处理函数--监听用户下拉动作 |
|
|
|
*/ |
|
|
|
onPullDownRefresh() { |
|
|
|
onPullDownRefresh () { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 页面上拉触底事件的处理函数 |
|
|
|
*/ |
|
|
|
onReachBottom() { |
|
|
|
onReachBottom () { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
* 用户点击右上角分享 |
|
|
|
*/ |
|
|
|
onShareAppMessage() { |
|
|
|
onShareAppMessage () { |
|
|
|
|
|
|
|
} |
|
|
|
}) |