高速、水路岛变更修改接口联调

dev201310
zhangqun 2 years ago
parent ce402ac693
commit 6aed1dbd59
  1. 3
      App.vue
  2. 2
      common/util.js
  3. 133
      pages/highWay/runData/form.vue
  4. 23
      pages/highWay/runData/list.vue
  5. 6
      pages/roadTransport/transportData/list.vue
  6. 123
      pages/water/waterWay/form.vue
  7. 11
      pages/water/waterWay/list.vue

@ -54,7 +54,8 @@
console.log('App Hide')
},
globalData: {
baseUrl: 'http://27.223.104.50:8001',//
// baseUrl: 'http://27.223.104.50:8001',//
baseUrl: 'http://jtxx.qdjtcx.cn:8001',//
mobile: '66007587'
},
methods: {

@ -107,7 +107,7 @@ function calcMom(cur, data) {
}
// 计算同比
function calcYoy(cur, data) {
console.log(cur,"同比==========",data);
// console.log(cur,"同比==========",data);
return !checkNotEmpty(cur) || !checkNotEmpty(data) ? '' : data === 0 && parseInt(cur) === 0 ? 0 : data === 0 && parseInt(cur) > 0 ? 100 : (parseInt(cur) - data) / data * 100;
}

@ -21,21 +21,23 @@
<view class="form_item">
<view class="form_item_label">统计日期</view>
<view class="form_item_input picker">
<picker mode="date" :value="form.statDate" @change="bindDateChange">
<picker v-if="pageType == 'add'" mode="date" :value="form.statDate" @change="bindDateChange">
<text class="picker_select"
:style="form.statDate?'color:#333;':''">{{form.statDate?form.statDate:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
<text v-else>{{form.statDate?form.statDate:''}}</text>
</view>
</view>
<view class="form_item">
<view class="form_item_label">统计时段</view>
<view class="form_item_input picker">
<picker :value="index" :range="array" range-key="dictLabel" @change="changeStatPeriod">
<picker v-if="pageType == 'add'" :value="index" :range="array" range-key="dictLabel" @change="changeStatPeriod">
<text class="picker_select"
:style="index>-1?'color:#333;':''">{{index>-1?array[index].dictLabel:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
<text v-else>{{index>-1?array[index].dictLabel:''}}</text>
</view>
</view>
<view class="form_item">
@ -46,13 +48,13 @@
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ? 'danger' : ''">
:class="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMomSumary.minusDaySummaryData.entranceVehicleCount ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMomSumary.minusDaySummaryData.entranceVehicleCount ?'color: #EB4747':''">
驶入车辆数统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMomSumary.minusDaySummaryData.entranceVehicleCount ?'color: #EB4747':''">
{{formatDigit(form.entranceVehicleCountMom)}}%
</view>
</view>
@ -72,13 +74,13 @@
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ? 'danger' : ''">
:class="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMomSumary.minusDaySummaryData.exitVehicleCount ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMomSumary.minusDaySummaryData.exitVehicleCount ?'color: #EB4747':''">
驶出车辆数统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMomSumary.minusDaySummaryData.exitVehicleCount ?'color: #EB4747':''">
{{formatDigit(form.exitVehicleCountMom)}}%
</view>
</view>
@ -262,6 +264,10 @@
index: 2, //,0-24
userInfo: {},
yoyMom: {}, //
yoyMomSumary: {
minusDaySummaryData: {},
minusYearSummaryData: {}
},//
showStaion: false, //
pageType: '',
deptNameList: [], //
@ -279,10 +285,14 @@
this.pageType = 'add';
let now = new Date();
this.form.statDate = getDateStr(now, -1); //
this.queryStation('add');
// this.queryStation('add');
this.queryTime(); //
}else if(options.item) {
this.btnText = '修改并保存';
let obj = JSON.parse(options.item);
this.queryDetailInfo2(obj.statDate, obj.statPeriod);
}
if (options.id) {
else if (options.id) {
this.btnText = '修改并保存';
this.queryDetailInfo(options.id);
}
@ -319,20 +329,39 @@
this.queryStation();
})
},
//
queryDetailInfo2(statDate, statPeriod) {
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/getSubData?statDate=' + statDate + '&statPeriod=' + statPeriod, {},
'GET').then(res => {
res.data.statDate = statDate;
res.data.statPeriod = statPeriod;
this.form = res.data;
this.queryTime();
this.queryStation();
})
},
//
queryYoYMom() {
if (this.form.statDate && this.form.statPeriod) {
//
this.$request(getApp().globalData.baseUrl +
'/api/biz/highwayParentDataController/getYoYAndMoM?statDate=' + this.form.statDate +
'/api/biz/highwayParentDataController/getSummaryDataYoYAndMoM?statDate=' + this.form.statDate +
'&statPeriod=' + this.form.statPeriod + '&_t=' + Date.parse(new Date()), {}, "GET").then(
res => {
this.yoyMom = res.data;
//
if (this.highwaySubDataList.length > 0 && this.form.highwaySubDataList.length > 0) {
this.highwaySubDataList.map((item, index) => {
this.checkStationInfo(index);
this.yoyMomSumary = res.data;
//
this.$request(getApp().globalData.baseUrl +
'/api/biz/highwayParentDataController/getYoYAndMoM?statDate=' + this.form.statDate +
'&statPeriod=' + this.form.statPeriod + '&_t=' + Date.parse(new Date()), {}, "GET").then(
res2 => {
this.yoyMom = res2.data;
//
if (this.highwaySubDataList.length > 0 && this.form.highwaySubDataList.length > 0) {
this.highwaySubDataList.map((item, index) => {
this.checkStationInfo(index);
})
}
})
}
})
}
},
@ -377,8 +406,8 @@
},
//
checkStationInfo(index) {
this.highwaySubDataList[index].isFinish = this.form.highwaySubDataList[index].entranceVehicleCount != '' &&
this.form.highwaySubDataList[index].exitVehicleCount != '';
this.highwaySubDataList[index].isFinish = checkNotEmpty(this.form.highwaySubDataList[index].entranceVehicleCount) &&
checkNotEmpty(this.form.highwaySubDataList[index].exitVehicleCount);
//
let entranceVehicleCount = 0,
exitVehicleCount = 0;
@ -391,19 +420,17 @@
})
this.form.entranceVehicleCount = entranceVehicleCount;
this.form.exitVehicleCount = exitVehicleCount;
// ifelseifelseif===0===00esleif00100,else(-)/*100
//
this.form.entranceVehicleCountMom = this.$calcMom(this.form.entranceVehicleCount,this.yoyMom.minusDaysEntranceVehicleSum);
this.form.entranceVehicleCountYoy = this.$calcYoy(this.form.entranceVehicleCount, this.yoyMom.minusYearsEntranceVehicleSum);
this.form.entranceVehicleCountMom = this.$calcMom(this.form.entranceVehicleCount,this.yoyMomSumary.minusDaySummaryData.entranceVehicleCount);
this.form.entranceVehicleCountYoy = this.$calcYoy(this.form.entranceVehicleCount, this.yoyMomSumary.minusYearSummaryData.entranceVehicleCount);
//
this.form.exitVehicleCountMom = this.$calcMom(this.form.exitVehicleCount, this.yoyMom.minusDaysExitVehicleSum);
this.form.exitVehicleCountMom = this.$calcMom(this.form.exitVehicleCount, this.yoyMomSumary.minusDaySummaryData.exitVehicleCount);
this.form.exitVehicleCountYoy = this.$calcYoy(this.form.exitVehicleCount, this.yoyMom.minusYearsExitVehicleSum);
this.form.exitVehicleCountYoy = this.$calcYoy(this.form.exitVehicleCount, this.yoyMomSumary.minusYearSummaryData.exitVehicleCount);
//
// if(this.form.highwaySubDataList[index].entranceVehicleCount != '' || this.form.highwaySubDataList[index].exitVehicleCount != ''){
let idx = this.yoyMom.minusDaysList.findIndex(item => {
return item.tollStationName == this.form.highwaySubDataList[index].tollStationName;
});
@ -478,8 +505,7 @@
.stationName;
});
if (idx > -1) {
item.isFinish = arr[idx].entranceVehicleCount != '' && arr[idx]
.exitVehicleCount != '' ? true : false;
item.isFinish = checkNotEmpty(arr[idx].entranceVehicleCount) && checkNotEmpty(arr[idx].exitVehicleCount) ? true : false;
this.form.highwaySubDataList.push(arr[idx]);
} else {
item.isFinish = false;
@ -515,18 +541,42 @@
//
bindDateChange(e) {
this.form.statDate = e.detail.value;
this.queryYoYMom();
if(this.pageType == 'add') {
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/getSubData?statDate=' + this.form.statDate + '&statPeriod=' + this.form.statPeriod, {},
'GET').then(res => {
res.data.statDate = this.form.statDate;
res.data.statPeriod = this.form.statPeriod;
this.form = res.data;
this.queryStation();
this.queryYoYMom();
})
}
else {
this.queryYoYMom();
}
},
//
changeStatPeriod(e) {
this.index = e.detail.value;
this.form.statPeriod = this.array[e.detail.value].dictValue;
console.log('change 时段')
this.queryYoYMom();
console.log('change 时段')
if(this.pageType == 'add') {
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/getSubData?statDate=' + this.form.statDate + '&statPeriod=' + this.form.statPeriod, {},
'GET').then(res => {
res.data.statDate = this.form.statDate;
res.data.statPeriod = this.form.statPeriod;
this.form = res.data;
this.queryStation();
this.queryYoYMom();
})
}
else {
this.queryYoYMom();
}
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=highway_time' + '&_t=' + Date
.parse(
new Date()), {}, 'GET').then(res => {
this.array = res.data;
@ -539,11 +589,28 @@
this.form.statPeriod = '0012';
let idx = this.array.findIndex(item => item.dictValue == '0012');
this.index = idx > -1 ? idx : '';
if(idx > -1) {
this.index = idx;
}else {
//0-12 0-24
this.form.statPeriod = '03'; //0-24
let _idx = this.array.findIndex(item => item.dictValue == '03');
this.index = _idx > -1 ? _idx : '';
}
} else {
this.form.statPeriod = '03'; //0-24
let idx = this.array.findIndex(item => item.dictValue == '03');
this.index = idx > -1 ? idx : '';
}
// -
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/getSubData?statDate=' + this.form.statDate + '&statPeriod=' + this.form.statPeriod, {},
'GET').then(res => {
res.data.statDate = this.form.statDate;
res.data.statPeriod = this.form.statPeriod;
this.form = res.data;
console.log('add == queryTime', this.form)
this.queryStation();
})
} else {
let idx = this.array.findIndex(item => item.dictValue == this.form.statPeriod);
this.index = idx > -1 ? idx : '';
@ -575,7 +642,7 @@
}
uni.showModal({
title: '提示',
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
content: this.pageType == 'add' ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
success: (res) => {
if (res.confirm) {
this.submitForm();
@ -588,7 +655,7 @@
title: '提交中...',
mask: true
})
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/saveOrUpdate', this
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/saveOrUpdateV2', this
.form,
'POST').then(res => {
uni.hideLoading();

@ -1,10 +1,10 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/highway/runData/form?id='+item.id)">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/highway/runData/form', item)">
<view class="list_top">
<view class="unit_tags">报送时间</view>
<view class="unit_name">
{{item.statDate || ''}}<text style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text>
{{item.statDate || ''}}<text style="margin-left:16rpx;">{{renderTime(item.statPeriod)}}</text>
</view>
</view>
<!-- <view class="unit_station">{{item.organizationName || ''}}</view> -->
@ -141,9 +141,14 @@
closeSearch() {
this.$refs.popup.close();
},
//
renderTime(reportPhase) {
let idx = this.array.findIndex(item => item.dictValue == reportPhase);
return idx > -1 ? this.array[idx].dictLabel : '';
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=highway_time' + '&_t=' + Date.parse(
new Date()), {}, 'GET').then(res => {
this.array = res.data;
})
@ -156,14 +161,14 @@
Object.keys(this.query).map(key => {
params = params + '&' + key + '=' + this.query[key]
})
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/list?page=' + this.current +
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/getTimeList?page=' + this.current +
'&pageSize=' + this.size + '&_t=' + Date.parse(new Date()) + params, {}, 'GET').then(res => {
if (res.code == 200) {
res.data.list.map(item => {
item.highwaySubDataList.map(item2 => {
item2.show = false;
})
})
// res.data.list.map(item => {
// item.highwaySubDataList.map(item2 => {
// item2.show = false;
// })
// })
console.log(res.data.list)
this.data = this.data.concat(res.data.list);
if (res.data.list.length == 0 || res.data.totalCount < this.size) {

@ -4,12 +4,12 @@
<view class="top_box">
<view class="list_box">
<view class="list_item" v-for="(item,index) in listData" :key="index">
<view class="list_top">
<view class="list_top" @click="showDetail(index,!item.show)">
<view class="unit_tags">报送时间</view>
<view class="unit_name">{{item.statisticalDate || ''}}<text style="margin-left:16rpx;">{{renderTime(item.reportPhase)}}</text></view>
<view class="unit_arrow">
<uni-icons @click="showDetail(index,false)" v-if="item.show" type="bottom" size="16" color="#666666"></uni-icons>
<uni-icons @click="showDetail(index,true)" v-else type="right" size="16" color="#666666"></uni-icons>
<uni-icons v-if="item.show" type="bottom" size="16" color="#666666"></uni-icons>
<uni-icons v-else type="right" size="16" color="#666666"></uni-icons>
</view>
</view>
<view class="list_cnt" v-if="item.show">

@ -12,75 +12,77 @@
{{form.affiliatedUnit}}
</view>
</view> -->
<view class="form_item" v-if="form.bizWaterwayIslandDataSaveOrUpdateDTOList.length == 1">
<!-- <view class="form_item" v-if="form.bizWaterwayIslandDataSaveOrUpdateDTOList.length == 1">
<view class="form_item_label">陆岛名称</view>
<view class="form_item_input select">
{{form.bizWaterwayIslandDataSaveOrUpdateDTOList.length > 0 ? form.bizWaterwayIslandDataSaveOrUpdateDTOList[landNameIndex].landName : ''}}
</view>
</view>
</view> -->
<view class="form_item">
<view class="form_item_label">统计日期</view>
<view class="form_item_input picker">
<picker mode="date" :value="form.reportDate" @change="bindDateChange">
<picker v-if="pageType == 'add'" mode="date" :value="form.reportDate" @change="bindDateChange">
<text class="picker_select"
:style="form.reportDate?'color:#333;':''">{{form.reportDate?form.reportDate:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
<text v-else>{{form.reportDate?form.reportDate:''}}</text>
</view>
</view>
<view class="form_item">
<view class="form_item_label">统计时段</view>
<view class="form_item_input picker">
<picker :value="index" :range="array" range-key="dictLabel" @change="changeStatPeriod">
<picker v-if="pageType == 'add'" :value="index" :range="array" range-key="dictLabel" @change="changeStatPeriod">
<text class="picker_select"
:style="index>-1?'color:#333;':''">{{index>-1?array[index].dictLabel:'请选择时段'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
</picker>
<text v-else>{{index>-1?array[index].dictLabel:''}}</text>
</view>
</view>
<!-- 汇总统计 -->
<view class="form_item">
<view class="form_item_label">航次统计</view>
<view class="form_item_input">
{{form.entranceVehicleCount === 0 ? form.entranceVehicleCount : form.entranceVehicleCount || ''}}
{{form.voyage === 0 ? form.voyage : form.voyage || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ? 'danger' : ''">
:class="checkNotEmpty(form.voyage) && form.voyage === yoySum.minusDaySummaryData.voyage ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
:style="checkNotEmpty(form.voyage) && form.voyage === yoySum.minusDaySummaryData.voyage ?'color: #EB4747':''">
航次统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.entranceVehicleCount) && form.entranceVehicleCount === yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.entranceVehicleCountMom)}}%
:style="checkNotEmpty(form.voyage) && form.voyage === yoySum.minusDaySummaryData.voyage ?'color: #EB4747':''">
{{formatDigit(form.voyageMom)}}%
</view>
</view>
<view class="line"></view>
<view class="rate_item">
<view class="rate_item_label">航次统计同比</view>
<view class="rate_item_input">
{{formatDigit(form.entranceVehicleCountYoy)}}%
{{formatDigit(form.voyageYoy)}}%
</view>
</view>
</view>
<view class="form_item">
<view class="form_item_label">人数统计</view>
<view class="form_item_input">
{{form.exitVehicleCount === 0 ? form.exitVehicleCount : form.exitVehicleCount || ''}}
{{form.numberOfPeople === 0 ? form.numberOfPeople : form.numberOfPeople || ''}}
</view>
</view>
<!-- 同比环比 -->
<view class="form_item_rate"
:class="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ? 'danger' : ''">
:class="checkNotEmpty(form.numberOfPeople) && form.numberOfPeople === yoySum.minusDaySummaryData.numberOfPeople ? 'danger' : ''">
<view class="rate_item">
<view class="rate_item_label"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
:style="checkNotEmpty(form.numberOfPeople) && form.numberOfPeople === yoySum.minusDaySummaryData.numberOfPeople ?'color: #EB4747':''">
人数统计环比</view>
<view class="rate_item_input"
:style="checkNotEmpty(form.exitVehicleCount) && form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
{{formatDigit(form.exitVehicleCountMom)}}%
:style="checkNotEmpty(form.numberOfPeople) && form.numberOfPeople === yoySum.minusDaySummaryData.numberOfPeople ?'color: #EB4747':''">
{{formatDigit(form.numberOfPeopletMom)}}%
</view>
</view>
<view class="line"></view>
@ -229,6 +231,8 @@
"yesterdayVoyage": '',
"remarks": ''
}],
"numberOfPeople": "",
"voyage": '',
"reportDate": "",
"statPeriod": ""
}, //form
@ -240,7 +244,11 @@
showLand: false,
pageType: '',
btnText: '保存',
mobile: getApp().globalData.mobile
mobile: getApp().globalData.mobile,
yoySum: {
minusDaySummaryData: {},
minusYearSummaryData: {}
},//
}
},
onLoad(options) {
@ -250,13 +258,14 @@
let now = new Date();
this.form.reportDate = getDateStr(now, -1); //
this.queryTime(); //
this.queryLandList(); //
// this.queryLandList(); //
} else if (options.item) {
this.btnText = '修改并保存';
this.form = JSON.parse(options.item);
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList = this.form.bizWaterwayIslandDataVOList;
this.queryLandList(); //
this.queryTime();
// this.form = JSON.parse(options.item);
// this.form.bizWaterwayIslandDataSaveOrUpdateDTOList = this.form.bizWaterwayIslandDataVOList;
// this.queryLandList(); //
// this.queryTime();
this.queryDetailInfo2(options.statDate, options.statPeriod);
} else if (options.id) {
this.btnText = '修改并保存';
this.queryDetailInfo(options.id);
@ -281,10 +290,10 @@
this.landNameIndex = index;
},
//
queryLandList() {
queryLandList(type) {
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/getByCurrentUserId', {}, 'GET').then(res => {
this.landList = res.data;
if (this.pageType == 'add') {
if (type == 'add') {
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList = [];
this.landList.map(item => {
item.isFinish = false;
@ -359,6 +368,17 @@
this.landList[index].isFinish = checkNotEmpty(this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[index].voyage) && checkNotEmpty(this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[index].numberOfPeople) ? true : false;
//
let _voyage = 0;
let _numberOfPeople = 0;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.map(item => {
_voyage = _voyage + (checkNotEmpty(item.voyage) ? parseInt(item.voyage) : 0);
_numberOfPeople = _numberOfPeople + (checkNotEmpty(item.numberOfPeople) ? parseInt(item.numberOfPeople) : 0);
})
this.form.voyage = _voyage;
this.form.numberOfPeople = _numberOfPeople;
//
this.calcSum();
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/getYoyMom?statDate=' + this.form
.reportDate + '&statPeriod=' + this.form.statPeriod + '&landName=' + this.form
.bizWaterwayIslandDataSaveOrUpdateDTOList[index].landName + '&_t=' + Date.parse(new Date()), {},
@ -391,15 +411,50 @@
this.queryLandList();
})
},
//
queryDetailInfo2(statData, statPeriod) {
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/getSubData?statDate=' + statData + '&statPeriod=' + statPeriod, {},
'GET').then(res => {
res.data.reportDate = statData;
res.data.statPeriod = statPeriod;
this.form = res.data;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList = this.form.bizWaterwayIslandDataVOList;
//
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/getSummaryDataYoYAndMoM?statDate=' + statData + '&statPeriod=' + statPeriod + '&_t=' + Date.parse(new Date()), {},
'GET')
.then(res2 => {
res2.data.minusDaySummaryData = res2.data.minusDaySummaryData ? res2.data.minusDaySummaryData : {};
res2.data.minusYearSummaryData = res2.data.minusYearSummaryData ? res2.data.minusYearSummaryData : {};
this.yoySum = res2.data;
this.calcSum();
})
if(this.pageType != 'add') {
this.queryTime(); //
}
this.queryLandList();
})
},
//
calcSum() {
this.form.voyageMom = this.$calcMom(this.form.voyage,this.yoySum.minusDaySummaryData.voyage);
this.form.voyageYoy = this.$calcYoy(this.form.voyage,this.yoySum.minusYearSummaryData.voyage);
this.form.numberOfPeopleMom = this.$calcMom(this.form.numberOfPeople,this.yoySum.minusDaySummaryData.numberOfPeople);
this.form.numberOfPeopleYoy = this.$calcYoy(this.form.numberOfPeople,this.yoySum.minusYearSummaryData.numberOfPeople);
},
//
changeStatPeriod(e) {
this.index = e.detail.value;
this.form.statPeriod = this.array[e.detail.value].dictValue;
console.log('change 时段', this.form)
//
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.map((item, index) => {
this.calcYoyMom(index);
})
if(this.pageType == 'add') {
this.queryDetailInfo2(this.form.reportDate, this.form.statPeriod);
}
else {
//
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.map((item, index) => {
this.calcYoyMom(index);
})
}
},
//
doCancel() {
@ -408,10 +463,15 @@
//
bindDateChange(e) {
this.form.reportDate = e.detail.value;
//
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.map((item, index) => {
this.calcYoyMom(index);
})
if(this.pageType == 'add') {
this.queryDetailInfo2(this.form.reportDate, this.form.statPeriod);
}
else {
//
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList.map((item, index) => {
this.calcYoyMom(index);
})
}
},
//
queryTime() {
@ -434,6 +494,7 @@
let idx = this.array.findIndex(item => item.dictValue == '03');
this.index = idx > -1 ? idx : '';
}
this.queryDetailInfo2(this.form.reportDate, this.form.statPeriod);
} else {
let idx = this.array.findIndex(item => item.dictValue == this.form.statPeriod);
this.index = idx > -1 ? idx : '';

@ -1,10 +1,10 @@
<template>
<view class="page">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/water/waterWay/form?id='+item.id)">
<view class="list_box" v-for="(item,index) in data" :key="index" @click="goPage('/pages/water/waterWay/form', item)">
<view class="list_top">
<view class="unit_tags">报送时间</view>
<view>{{item.reportDate || ''}}<text
style="margin-left:16rpx;">{{item.statPeriodValue || ''}}</text></view>
style="margin-left:16rpx;">{{renderTime(item.statPeriod)}}</text></view>
</view>
</view>
<uni-load-more iconType="circle" :status="status" @clickLoadMore="loadMore"
@ -137,6 +137,11 @@
closeSearch() {
this.$refs.popup.close();
},
//
renderTime(reportPhase) {
let idx = this.array.findIndex(item => item.dictValue == reportPhase);
return idx > -1 ? this.array[idx].dictLabel : '';
},
//
queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse(
@ -152,7 +157,7 @@
Object.keys(this.query).map(key => {
params = params + '&' + key + '=' + this.query[key]
})
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/list?page=' + this.current +
this.$request(getApp().globalData.baseUrl + '/api/biz/waterwayIslandData/getTimeList?page=' + this.current +
'&pageSize=' + this.size + '&_t=' + Date.parse(new Date()) + params, {}, 'GET').then(res => {
if (res.code == 200) {
this.data = this.data.concat(res.data.list);

Loading…
Cancel
Save