|
|
|
@ -206,20 +206,15 @@ |
|
|
|
userInfo: {}, |
|
|
|
userInfo: {}, |
|
|
|
yoyMom: {},//同比环比 |
|
|
|
yoyMom: {},//同比环比 |
|
|
|
showStaion: false,//展开收起 |
|
|
|
showStaion: false,//展开收起 |
|
|
|
|
|
|
|
pageType: '', |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
onLoad(options) { |
|
|
|
this.userInfo = uni.getStorageSync('userInfo'); |
|
|
|
this.userInfo = uni.getStorageSync('userInfo'); |
|
|
|
if (options.type == 'add') { |
|
|
|
if (options.type == 'add') { |
|
|
|
|
|
|
|
this.pageType = 'add'; |
|
|
|
let now = new Date(); |
|
|
|
let now = new Date(); |
|
|
|
this.form.statDate = getDateStr(now, -1);//默认前一天 |
|
|
|
this.form.statDate = getDateStr(now, -1);//默认前一天 |
|
|
|
//11:00-13:30 默认选择0-12 |
|
|
|
|
|
|
|
let dateStr = getDateStr(now, 0); |
|
|
|
|
|
|
|
if(new Date(dateStr + ' 11:00').getTime() < new Date().getTime() < new Date(dateStr + ' 13:30').getTime()) { |
|
|
|
|
|
|
|
this.form.statPeriod = '0012'; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.form.statPeriod = '03'; //默认0-24 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.queryYoYMom(); |
|
|
|
this.queryYoYMom(); |
|
|
|
this.queryStation('add'); |
|
|
|
this.queryStation('add'); |
|
|
|
} else if (options.item) { |
|
|
|
} else if (options.item) { |
|
|
|
@ -400,6 +395,20 @@ |
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse( |
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse( |
|
|
|
new Date()), {}, 'GET').then(res => { |
|
|
|
new Date()), {}, 'GET').then(res => { |
|
|
|
this.array = res.data; |
|
|
|
this.array = res.data; |
|
|
|
|
|
|
|
if(this.pageType == 'add') { |
|
|
|
|
|
|
|
let now = new Date(); |
|
|
|
|
|
|
|
//11:00-13:30 默认选择0-12 |
|
|
|
|
|
|
|
let dateStr = getDateStr(now, 0); |
|
|
|
|
|
|
|
if(new Date(dateStr + ' 11:00').getTime() < new Date().getTime() < new Date(dateStr + ' 13:30').getTime()) { |
|
|
|
|
|
|
|
this.form.statPeriod = '0012'; |
|
|
|
|
|
|
|
this.index = this.array.findIndex(item => item.dictValue == '0012'); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.form.statPeriod = '03'; //默认0-24 |
|
|
|
|
|
|
|
this.index = this.array.findIndex(item => item.dictValue == '03'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.index = this.array.findIndex(item => item.dictValue == this.form.statPeriod); |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//确认提交 |
|
|
|
//确认提交 |
|
|
|
|