|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- // package_A/page/alltask/index.js
- Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- list:[],
- current: '/information/getRegisterInformation',
- params: {},
- startTime: '',
- startCurrent: -1,
- endTime: '',
- endCurrent: -1,
- uploadType: ['车辆登记', '访客人员']
- },
-
- onLoad(e) {
-
- },
- onShow() {
-
- },
- /* 更新数据 */
- updateList(e) {
- let list = this.data.list.concat(e.detail || [])
- this.setData({ list })
- },
- /* 重置数据 */
- resetList() {
- this.setData({ list: [] })
- },
-
- /**
- * 选择
- * @param {*} e
- */
-
- selectTime(e) {
- let value = e.detail.value
- let type = e.currentTarget.dataset.type
- if(type === 'start') {
- if(this.data.endTime) {
- this.setData({endTime: '', params: {}})
- }
- this.setData({startTime: value})
- } else if(type === 'end') {
- let params = this.data.params
- this.setData({endTime: value})
- if(this.data.startTime) {
- params.startTime = this.data.startTime
- params.endTime = value
- this.setData({params})
- }
- }
- },
-
- /**
- * 跳转详情页
- * @param {*} e
- */
- showDetail(e) {
- let data = e.currentTarget.dataset.item
- if(data.registerType === 0) {
- wx.navigateTo({
- url: '/package_A/page/upload/index?id=' + data.id,
- })
- } else {
- wx.navigateTo({
- url: '/package_A/page/register/index?id=' + data.id,
- })
- }
- }
- })
|