You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
// package/bindTroubleshooting/index.js
|
|
|
|
Page({
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
data: {
|
|
|
|
// hidden: true,
|
|
|
|
currentTab: '0',
|
|
|
|
// 筛选选择
|
|
|
|
structList: ['a', 'b', 'c'],
|
|
|
|
structResult: ['a', 'b'],
|
|
|
|
pointList: ['a', 'b', 'c'],
|
|
|
|
pointResult: ['a', 'b'],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 顶部tab切换
|
|
|
|
clickTab (e) {
|
|
|
|
this.setData({
|
|
|
|
currentTab: e.currentTarget.dataset.current
|
|
|
|
})
|
|
|
|
if (e.currentTarget.dataset.current == '0') {
|
|
|
|
this.setData({
|
|
|
|
page: 0,
|
|
|
|
dataList: []
|
|
|
|
}, () => {
|
|
|
|
// this.getPatrolPlan();
|
|
|
|
})
|
|
|
|
} else if (e.currentTarget.dataset.current == '1') {
|
|
|
|
// this.getPatrolRecord();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
// 筛选选择
|
|
|
|
onStructChange (event) {
|
|
|
|
this.setData({
|
|
|
|
structResult: event.detail,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
structToggle (event) {
|
|
|
|
const { index } = event.currentTarget.dataset;
|
|
|
|
const checkbox = this.selectComponent(`.checkboxes-struct-${index}`);
|
|
|
|
checkbox.toggle();
|
|
|
|
},
|
|
|
|
|
|
|
|
onPointChange (event) {
|
|
|
|
this.setData({
|
|
|
|
pointResult: event.detail,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
pointToggle (event) {
|
|
|
|
const { index } = event.currentTarget.dataset;
|
|
|
|
const checkbox = this.selectComponent(`.checkboxes-point-${index}`);
|
|
|
|
checkbox.toggle();
|
|
|
|
},
|
|
|
|
|
|
|
|
noop () { },
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad (options) {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
*/
|
|
|
|
onReady () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
|
|
|
onShow () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
|
*/
|
|
|
|
onHide () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
|
*/
|
|
|
|
onUnload () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
|
*/
|
|
|
|
onPullDownRefresh () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
*/
|
|
|
|
onReachBottom () {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
*/
|
|
|
|
onShareAppMessage () {
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|