|
|
|
@ -145,13 +145,11 @@ |
|
|
|
let now = new Date(); |
|
|
|
let now = new Date(); |
|
|
|
this.form.affiliatedUnit = this.userInfo.organizationName ? this.userInfo.organizationName : ''; |
|
|
|
this.form.affiliatedUnit = this.userInfo.organizationName ? this.userInfo.organizationName : ''; |
|
|
|
this.form.statDate = getDateStr(now, -1); //默认前一天 |
|
|
|
this.form.statDate = getDateStr(now, -1); //默认前一天 |
|
|
|
this.queryYoyMom(); //同比环比 |
|
|
|
|
|
|
|
this.queryTime(); //统计时段 |
|
|
|
this.queryTime(); //统计时段 |
|
|
|
} else if (options.id) { |
|
|
|
} else if (options.id) { |
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/watertransportRunData/find/' + options.id, {}, "GET").then( |
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/watertransportRunData/find/' + options.id, {}, "GET").then( |
|
|
|
res => { |
|
|
|
res => { |
|
|
|
this.form = res.data; |
|
|
|
this.form = res.data; |
|
|
|
this.queryYoyMom(); |
|
|
|
|
|
|
|
this.queryTime(); //统计时段 |
|
|
|
this.queryTime(); //统计时段 |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -162,8 +160,7 @@ |
|
|
|
if (this.form.statDate == '' || this.form.statPeriod == '') { |
|
|
|
if (this.form.statDate == '' || this.form.statPeriod == '') { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
// let _date = getDateStr(new Date(this.form.statDate), -1); |
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/watertransportRunData/getYoYMoM?statDate=' + this.form |
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/bizPilotData/getYoyMom?statDate=' + this.form |
|
|
|
|
|
|
|
.statDate + '&statPeriod=' + this.form.statPeriod + '&_t=' + Date.parse(new Date()), {}, 'GET') |
|
|
|
.statDate + '&statPeriod=' + this.form.statPeriod + '&_t=' + Date.parse(new Date()), {}, 'GET') |
|
|
|
.then(res => { |
|
|
|
.then(res => { |
|
|
|
this.yoyMom = res.data; |
|
|
|
this.yoyMom = res.data; |
|
|
|
@ -182,22 +179,6 @@ |
|
|
|
.voyageWatertransportMomDo) - this.yoyMom.lastYearData.voyageWatertransportMomDo) / this.yoyMom.lastYearData.voyageWatertransportMomDo * 100 : ''; |
|
|
|
.voyageWatertransportMomDo) - this.yoyMom.lastYearData.voyageWatertransportMomDo) / this.yoyMom.lastYearData.voyageWatertransportMomDo * 100 : ''; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
//车站权限列表 |
|
|
|
|
|
|
|
queryStation() { |
|
|
|
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/getCurrentSite?_t=' + Date.parse( |
|
|
|
|
|
|
|
new Date()), {}, 'GET').then(res => { |
|
|
|
|
|
|
|
this.stationList = res.data; |
|
|
|
|
|
|
|
if (this.pageType == 'add') { |
|
|
|
|
|
|
|
this.form.railwayName = res.data[0]; |
|
|
|
|
|
|
|
this.railwayNameIndex = 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//车站选择 |
|
|
|
|
|
|
|
changeRailway(e) { |
|
|
|
|
|
|
|
this.railwayNameIndex = e.detail.value; |
|
|
|
|
|
|
|
this.form.railwayName = this.stationList[e.detail.value]; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//统计时段切换选择 |
|
|
|
//统计时段切换选择 |
|
|
|
changeStatPeriod(e) { |
|
|
|
changeStatPeriod(e) { |
|
|
|
this.index = e.detail.value; |
|
|
|
this.index = e.detail.value; |
|
|
|
@ -234,7 +215,8 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.index = this.array.findIndex(item => item.dictValue == this.form.statPeriod); |
|
|
|
this.index = this.array.findIndex(item => item.dictValue == this.form.statPeriod); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.queryYoyMom(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//确认提交 |
|
|
|
//确认提交 |
|
|
|
|