接口联调

main
张群 2 years ago
parent a566dcaad5
commit 4ecf346e93
  1. 3
      pages/highWay/runData/form.vue
  2. 10
      pages/railway/runStatus/form.vue
  3. 22
      pages/water/TransportData/form.vue

@ -216,11 +216,9 @@
this.pageType = 'add';
let now = new Date();
this.form.statDate = getDateStr(now, -1);//
this.queryYoYMom();
this.queryStation('add');
this.queryTime();//
} if(options.id) {
this.queryYoYMom();
this.queryDetailInfo(options.id);
}
this.queryPerson();
@ -409,6 +407,7 @@
let idx = this.array.findIndex(item => item.dictValue == this.form.statPeriod);
this.index = idx > -1 ? idx : '';
}
this.queryYoYMom();
})
},
//

@ -102,7 +102,6 @@
} if (options.id) {
this.$request(getApp().globalData.baseUrl+'/api/biz/railwayRunSituation/find//'+options.id,{},"GET").then(res => {
this.form = res.data;
this.queryYoyMom();
this.queryTime(); //
this.queryStation(); //
});
@ -161,13 +160,16 @@
let dateStr = getDateStr(now, 0);
if(new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() < new Date(dateStr + ' 13:30').getTime()) {
this.form.statPeriod = '0012';
this.index = this.array.findIndex(item => item.dictValue == '0012');
let idx = this.array.findIndex(item => item.dictValue == '0012');
this.index = idx > -1 ? idx : idx;
}else{
this.form.statPeriod = '03'; //0-24
this.index = this.array.findIndex(item => item.dictValue == '03');
let idx = this.array.findIndex(item => item.dictValue == '03');
this.index = idx > -1 ? idx : idx;
}
}else{
this.index = this.array.findIndex(item => item.dictValue == this.form.statPeriod);
let idx = this.array.findIndex(item => item.dictValue == this.form.statPeriod);
this.index = idx > -1 ? idx : idx;
}
})
},

@ -145,13 +145,11 @@
let now = new Date();
this.form.affiliatedUnit = this.userInfo.organizationName ? this.userInfo.organizationName : '';
this.form.statDate = getDateStr(now, -1); //
this.queryYoyMom(); //
this.queryTime(); //
} else if (options.id) {
this.$request(getApp().globalData.baseUrl + '/api/biz/watertransportRunData/find/' + options.id, {}, "GET").then(
res => {
this.form = res.data;
this.queryYoyMom();
this.queryTime(); //
});
}
@ -162,8 +160,7 @@
if (this.form.statDate == '' || this.form.statPeriod == '') {
return;
}
// let _date = getDateStr(new Date(this.form.statDate), -1);
this.$request(getApp().globalData.baseUrl + '/api/biz/bizPilotData/getYoyMom?statDate=' + this.form
this.$request(getApp().globalData.baseUrl + '/api/biz/watertransportRunData/getYoYMoM?statDate=' + this.form
.statDate + '&statPeriod=' + this.form.statPeriod + '&_t=' + Date.parse(new Date()), {}, 'GET')
.then(res => {
this.yoyMom = res.data;
@ -182,22 +179,6 @@
.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) {
this.index = e.detail.value;
@ -235,6 +216,7 @@
}else{
this.index = this.array.findIndex(item => item.dictValue == this.form.statPeriod);
}
this.queryYoyMom();
})
},
//

Loading…
Cancel
Save