diff --git a/pages.json b/pages.json
index 31b3644..7edacfb 100644
--- a/pages.json
+++ b/pages.json
@@ -2,7 +2,7 @@
"pages": [{
"path": "pages/home/home",
"style": {
- "navigationBarTitleText": "首页"
+ "navigationBarTitleText": "交通运输报送系统"
}
},
{
@@ -14,7 +14,7 @@
{
"path": "pages/login/login",
"style": {
- "navigationBarTitleText": "",
+ "navigationBarTitleText": "交通运输报送系统",
"navigationBarBackgroundColor": "#2D8CF0"
}
},
@@ -144,7 +144,8 @@
{
"path": "pages/portShipping/waterInternational/list",
"style": {
- "navigationBarTitleText": "水路国际客运"
+ "navigationBarTitleText": "水路国际客运",
+ "enablePullDownRefresh": true
}
},
{
@@ -156,7 +157,8 @@
{
"path": "pages/metro/subwayPage/list",
"style": {
- "navigationBarTitleText": "地铁客流量"
+ "navigationBarTitleText": "地铁客流量",
+ "enablePullDownRefresh": true
}
},
{
diff --git a/pages/airport/airport-runData/form.vue b/pages/airport/airport-runData/form.vue
index 10e342e..210ccaa 100644
--- a/pages/airport/airport-runData/form.vue
+++ b/pages/airport/airport-runData/form.vue
@@ -529,7 +529,7 @@
if (this.pageType == 'add') {
let now = new Date();
//11:00-13:30 默认选择0-12
- let dateStr = getDateStr(now, 0);
+ let dateStr = getDateStr(now, 0).replaceAll('-','/');
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() <
new Date(dateStr +
' 13:30').getTime()) {
diff --git a/pages/airport/airport-runData/list.vue b/pages/airport/airport-runData/list.vue
index 0c7cf9e..daac5be 100644
--- a/pages/airport/airport-runData/list.vue
+++ b/pages/airport/airport-runData/list.vue
@@ -312,7 +312,7 @@
display: flex;
// justify-content: space-around;
background-color: #F8F8F8;
- padding: 20rpx 30rpx 40px;
+ padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
diff --git a/pages/airport/airport-runStatus/form.vue b/pages/airport/airport-runStatus/form.vue
index f971139..1ef837c 100644
--- a/pages/airport/airport-runStatus/form.vue
+++ b/pages/airport/airport-runStatus/form.vue
@@ -139,7 +139,7 @@
if(this.pageType == 'add') {
let now = new Date();
//11:00-13:30 默认选择0-12
- let dateStr = getDateStr(now, 0);
+ let dateStr = getDateStr(now, 0).replaceAll('-','/');
if(new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() < new Date(dateStr + ' 13:30').getTime()) {
this.form.statPeriod = '0012';
let idx = this.array.findIndex(item => item.dictValue == '0012');
diff --git a/pages/airport/airport-runStatus/list.vue b/pages/airport/airport-runStatus/list.vue
index 1d0d4de..7cd0fb9 100644
--- a/pages/airport/airport-runStatus/list.vue
+++ b/pages/airport/airport-runStatus/list.vue
@@ -312,7 +312,7 @@
display: flex;
// justify-content: space-around;
background-color: #F8F8F8;
- padding: 20rpx 30rpx 40px;
+ padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
diff --git a/pages/highWay/runData/form.vue b/pages/highWay/runData/form.vue
index 4a2222b..3415b7e 100644
--- a/pages/highWay/runData/form.vue
+++ b/pages/highWay/runData/form.vue
@@ -529,7 +529,7 @@
if (this.pageType == 'add') {
let now = new Date();
//11:00-13:30 默认选择0-12
- let dateStr = getDateStr(now, 0);
+ let dateStr = getDateStr(now, 0).replaceAll('-','/');
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() <
new Date(dateStr + ' 13:30').getTime()) {
this.form.statPeriod = '0012';
diff --git a/pages/highWay/runData/list.vue b/pages/highWay/runData/list.vue
index 88f11f1..e265a71 100644
--- a/pages/highWay/runData/list.vue
+++ b/pages/highWay/runData/list.vue
@@ -320,7 +320,7 @@
right: 0;
bottom: 0;
background-color: #F8F8F8;
- padding: 20px 30rpx 40px;
+ padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
diff --git a/pages/highWay/runStatusData/form.vue b/pages/highWay/runStatusData/form.vue
index 57d9413..91f626b 100644
--- a/pages/highWay/runStatusData/form.vue
+++ b/pages/highWay/runStatusData/form.vue
@@ -506,7 +506,7 @@
if (this.pageType == 'add') {
let now = new Date();
//11:00-13:30 默认选择0-12
- let dateStr = getDateStr(now, 0);
+ let dateStr = getDateStr(now, 0).replaceAll('-','/');
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() < new Date(dateStr +
' 13:30').getTime()) {
this.form.statPeriod = '0012';
diff --git a/pages/highWay/runStatusData/list.vue b/pages/highWay/runStatusData/list.vue
index 2743686..57475f0 100644
--- a/pages/highWay/runStatusData/list.vue
+++ b/pages/highWay/runStatusData/list.vue
@@ -312,7 +312,7 @@
right: 0;
bottom: 0;
background-color: #F8F8F8;
- padding: 20px 30rpx 40px;
+ padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
diff --git a/pages/metro/subwayPage/form.vue b/pages/metro/subwayPage/form.vue
index 42e03e8..d799d2b 100644
--- a/pages/metro/subwayPage/form.vue
+++ b/pages/metro/subwayPage/form.vue
@@ -47,52 +47,52 @@
车次:
-
-
+
-
+
总车次环比
-
- {{formatDigit(form.inRailwayYomDo)}}%
+
+ {{formatDigit(form.trainNumberDod)}}%
总车次同比
- {{formatDigit(form.inRailwayMomDo)}}%
+ {{formatDigit(form.trainNumberYoy)}}%
总客流量(人):
-
-
+
-
+
总客流量人数环比
-
- {{formatDigit(form.inRailwayYomDo)}}%
+
+ {{formatDigit(form.passengerFlowDod)}}%
- 总客流量人数
+ 总客流量人数同比
- {{formatDigit(form.inRailwayMomDo)}}%
+ {{formatDigit(form.passengerFlowYoy)}}%
@@ -122,12 +122,15 @@
data() {
return {
form: {
- "children": [{
- "dataDetails": ""
- }],
- "carName": "",
- "statDate": "",
- "statPeriod": ""
+ "organizationName" : "",
+ "passengerFlow" : "",
+ "passengerFlowDod" : "",
+ "passengerFlowYoy" : "",
+ "statDate" : "",
+ "statPeriod" : "",
+ "trainNumber" : "",
+ "trainNumberDod" : "",
+ "trainNumberYoy" : ""
}, //登录form
array: [], //时段选择列表
index: 2, //时段选择,默认0-24
@@ -135,7 +138,8 @@
pageType: '',
btnText: '保存',
mobile: getApp().globalData.mobile,
- deptNameList: []
+ deptNameList: [],
+ momYoy: {}
}
},
onLoad(options) {
@@ -148,27 +152,52 @@
this.pageType = 'add';
let now = new Date();
this.form.statDate = getDateStr(now, -1); //默认前一天
- this.queryTime(); //统计时段
+ this.queryTime(); //统计时段
+ this.queryMom();
}
- if (options.item) {
+ else if (options.item) {
this.btnText = '修改并保存';
this.form = JSON.parse(options.item);
- this.queryTime(); //统计时段
+ this.queryTime(); //统计时段
+ this.queryMom();
}
if (options.id) {
this.btnText = '修改并保存';
- this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunSituation/find//' + options.id, {}, "GET")
+ this.$request(getApp().globalData.baseUrl + '/api/biz/subwayInfo/selectById/' + options.id, {}, "GET")
.then(res => {
this.form = res.data;
if (checkNotEmpty(this.deptNameList)) {
let idx = this.deptNameList.findIndex(item => item.deptName = this.form.organizationName);
this.form.organizationNameIndex = idx > -1 ? idx : '';
}
- this.queryTime(); //统计时段
+ this.queryTime(); //统计时段
+ this.queryMom();
});
}
},
- methods: {
+ methods: {
+ //获取同环比
+ queryMom(type) {
+ if(!checkNotEmpty(this.form.statDate) || !checkNotEmpty(this.form.statPeriod)){
+ return;
+ }
+ this.$request(getApp().globalData.baseUrl + '/api/biz/subwayInfo/getYoYMoM?statDate=' + this.form.statDate + '&statPeriod=' + this.form.statPeriod + '&_t=' + Date.parse(new Date()), {}, "GET")
+ .then(res => {
+ this.momYoy = res.data;
+ if(type == 1) {
+ this.calcMomYoy();
+ }
+ });
+ },
+ //计算环比同比
+ calcMomYoy() {
+ let yesterdayData = this.momYoy.yesterdayData;
+ let lastYearData = this.momYoy.lastYearData;
+ this.form.trainNumberDod = this.$calcMom(this.form.trainNumber, yesterdayData.trainNumber);
+ this.form.trainNumberYoy = this.$calcYoy(this.form.trainNumber, lastYearData.trainNumber);
+ this.form.passengerFlowDod = this.$calcMom(this.form.passengerFlow, yesterdayData.passengerFlow);
+ this.form.passengerFlowYoy = this.$calcYoy(this.form.passengerFlow, lastYearData.passengerFlow);
+ },
//切换管理单位
bindDeptChange(e) {
this.form.organizationNameIndex = e.detail.value;
@@ -191,7 +220,8 @@
changeStatPeriod(e) {
this.index = e.detail.value;
this.form.statPeriod = this.array[e.detail.value].dictValue;
- console.log('change 时段', this.form);
+ console.log('change 时段', this.form);
+ this.queryMom(1);
},
//取消
doCancel() {
@@ -199,7 +229,8 @@
},
//选择统计日期
bindDateChange(e) {
- this.form.statDate = e.detail.value;
+ this.form.statDate = e.detail.value;
+ this.queryMom(1);
},
//时段
queryTime() {
@@ -210,7 +241,7 @@
if (this.pageType == 'add') {
let now = new Date();
//11:00-13:30 默认选择0-12
- let dateStr = getDateStr(now, 0);
+ let dateStr = getDateStr(now, 0).replaceAll('-','/');
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() <
new Date(dateStr + ' 13:30').getTime()) {
this.form.statPeriod = '0012';
@@ -236,6 +267,20 @@
})
return;
}
+ if (!checkNotEmpty(this.form.trainNumber)) {
+ uni.showToast({
+ title: '车次不能为空',
+ icon: 'none'
+ })
+ return;
+ }
+ if (!checkNotEmpty(this.form.passengerFlow)) {
+ uni.showToast({
+ title: '客流量不能为空',
+ icon: 'none'
+ })
+ return;
+ }
uni.showModal({
title: '提示',
content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?',
@@ -251,7 +296,7 @@
title: '提交中...',
mask: true
})
- this.$request(getApp().globalData.baseUrl + '/api/biz/airportRunSituation/saveOrUpdate', this.form,
+ this.$request(getApp().globalData.baseUrl + '/api/biz/subwayInfo/saveOrUpdate', this.form,
'POST').then(res => {
uni.hideLoading();
if (res.code == 200) {
diff --git a/pages/metro/subwayPage/list.vue b/pages/metro/subwayPage/list.vue
index ccd5e14..5d44840 100644
--- a/pages/metro/subwayPage/list.vue
+++ b/pages/metro/subwayPage/list.vue
@@ -1,6 +1,6 @@
-
+
报送时间
{{item.statDate || ''}} {
params = params + '&' + key + '=' + this.query[key]
})
- this.$request(getApp().globalData.baseUrl + '/api/biz/airportRunSituation/list?page=' + this.current +
+ this.$request(getApp().globalData.baseUrl + '/api/biz/subwayInfo/list?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);
@@ -312,7 +312,7 @@
display: flex;
// justify-content: space-around;
background-color: #F8F8F8;
- padding: 20rpx 30rpx 40px;
+ padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
diff --git a/pages/portShipping/waterInternational/form.vue b/pages/portShipping/waterInternational/form.vue
index 2df729b..3593dd1 100644
--- a/pages/portShipping/waterInternational/form.vue
+++ b/pages/portShipping/waterInternational/form.vue
@@ -55,7 +55,7 @@
航线:
- changeRoute(e, index)">
+ changeRoute(e, index)">
{{item.route?item.route:'请选择'}}
@@ -65,7 +65,7 @@
航次:
- changeVoyage(e, index)">
+ changeVoyage(e, index)">
{{item.voyage?item.voyage:'请选择'}}
@@ -121,7 +121,7 @@
航线:
- changeRoute(e, index)">
+ changeRoute(e, index)">
{{item.route?item.route:'请选择'}}
@@ -131,7 +131,7 @@
航次:
- changeVoyage(e, index)">
+ changeVoyage(e, index)">
{{item.voyage?item.voyage:'请选择'}}
@@ -256,7 +256,6 @@
this.$request(getApp().globalData.baseUrl + '/api/biz/internationalPassengerTransportPermissions/findList', {}, "GET").then(res => {
this.shipRouteList = res.data['客班轮'];
this.internationalRouteList = res.data['国际邮轮'];
- console.log(this.shipRouteList)
this.form.passengerShipDTOList.map(item => {
let idx = this.shipRouteList.findIndex(item2 => item2.route == item.route);
item.routeIndex = idx > -1 ? idx : '';
@@ -266,13 +265,14 @@
}
})
this.form.internationalCruiseDTOList.map(item => {
- let idx = this.shipRouteList.findIndex(item2 => item2.route == item.route);
+ let idx = this.internationalRouteList.findIndex(item2 => item2.route == item.route);
item.routeIndex = idx > -1 ? idx : '';
if(idx > -1) {
- let _idx = this.shipRouteList[idx].voyageInfoVOList.findIndex(item2 => item2.voyageCode == item.voyage);
+ let _idx = this.internationalRouteList[idx].voyageInfoVOList.findIndex(item2 => item2.voyageCode == item.voyage);
item.voyageIndex = _idx > -1 ? _idx : '';
}
})
+ console.log(this.form)
})
},
//切换管理单位
@@ -367,13 +367,19 @@
//航线选择
changeRoute(e, index) {
if(this.tabType == 1) {
- //客班轮
+ //客班轮
+ this.form.passengerShipDTOList[index].voyageIndex = this.form.passengerShipDTOList[index].routeIndex != e.detail.value ? '' : this.form.passengerShipDTOList[index].voyageIndex;
+ this.form.passengerShipDTOList[index].voyage = this.form.passengerShipDTOList[index].routeIndex != e.detail.value ? '' : this.form.passengerShipDTOList[index].voyage;
this.form.passengerShipDTOList[index].routeIndex = e.detail.value;
- this.form.passengerShipDTOList[index].route = this.shipRouteList[e.detail.value].route;
+ this.form.passengerShipDTOList[index].route = this.shipRouteList[e.detail.value].route;
+ this.form.passengerShipDTOList[index].direction = this.shipRouteList[e.detail.value].direction;
}else{
- //国际邮轮
+ //国际邮轮
+ this.form.internationalCruiseDTOList[index].voyageIndex = this.form.internationalCruiseDTOList[index].routeIndex != e.detail.value ? '' : this.form.internationalCruiseDTOList[index].voyageIndex;
+ this.form.internationalCruiseDTOList[index].voyage = this.form.internationalCruiseDTOList[index].routeIndex != e.detail.value ? '' : this.form.internationalCruiseDTOList[index].voyage;
this.form.internationalCruiseDTOList[index].routeIndex = e.detail.value;
- this.form.internationalCruiseDTOList[index].route = this.internationalRouteList[e.detail.value].route;
+ this.form.internationalCruiseDTOList[index].route = this.internationalRouteList[e.detail.value].route;
+ this.form.internationalCruiseDTOList[index].direction = this.internationalRouteList[e.detail.value].direction;
}
},
//航次选择
@@ -383,7 +389,7 @@
//判断是否重复选择
let routeIndex = this.form.passengerShipDTOList[index].routeIndex;
let idx = this.form.passengerShipDTOList.findIndex(item => item.voyageIndex == e.detail.value);
- if (idx > -1 && this.form.passengerShipDTOList[index].voyageIndex != idx) {
+ if (idx > -1 && this.form.passengerShipDTOList[index].voyageIndex != idx+'') {
uni.showToast({
title: '客班轮航次不能重复选择',
icon: 'none'
@@ -398,15 +404,18 @@
//判断是否重复选择
let routeIndex = this.form.internationalCruiseDTOList[index].routeIndex;
let idx = this.form.internationalCruiseDTOList.findIndex(item => item.voyageIndex == e.detail.value);
- if (idx > -1 && this.form.internationalCruiseDTOList[index].voyageIndex != idx) {
+ if (idx > -1 && this.form.internationalCruiseDTOList[index].voyageIndex != idx+'') {
uni.showToast({
title: '国际邮轮航次不能重复选择',
icon: 'none'
});
}
- this.form.internationalCruiseDTOList[index].voyageIndex = e.detail.value;
- this.form.internationalCruiseDTOList[index].voyage = this.internationalRouteList[routeIndex].voyageInfoVOList[e.detail.value].voyageCode;
- }
+ else {
+ this.form.internationalCruiseDTOList[index].voyageIndex = e.detail.value;
+ this.form.internationalCruiseDTOList[index].voyage = this.internationalRouteList[routeIndex].voyageInfoVOList[e.detail.value].voyageCode;
+ }
+ }
+ console.log('航次选择',this.form)
},
//统计时段切换选择
changeStatPeriod(e) {
@@ -429,7 +438,7 @@
if (this.pageType == 'add') {
let now = new Date();
//11:00-13:30 默认选择0-12
- let dateStr = getDateStr(now, 0);
+ let dateStr = getDateStr(now, 0).replaceAll('-','/');
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() <
new Date(dateStr +
' 13:30').getTime()) {
diff --git a/pages/portShipping/waterInternational/list.vue b/pages/portShipping/waterInternational/list.vue
index 5297e91..2128b58 100644
--- a/pages/portShipping/waterInternational/list.vue
+++ b/pages/portShipping/waterInternational/list.vue
@@ -310,7 +310,7 @@
right: 0;
bottom: 0;
background-color: #F8F8F8;
- padding: 20px 30rpx 40px;
+ padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
diff --git a/pages/railway/railwayRunData/form.vue b/pages/railway/railwayRunData/form.vue
index 96ba909..f541119 100644
--- a/pages/railway/railwayRunData/form.vue
+++ b/pages/railway/railwayRunData/form.vue
@@ -426,7 +426,7 @@
if (this.pageType == 'add') {
let now = new Date();
//11:00-13:30 默认选择0-12
- let dateStr = getDateStr(now, 0);
+ let dateStr = getDateStr(now, 0).replaceAll('-','/');
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() <
new Date(dateStr +
' 13:30').getTime()) {
diff --git a/pages/railway/railwayRunData/list.vue b/pages/railway/railwayRunData/list.vue
index a8ad6a5..a751ebe 100644
--- a/pages/railway/railwayRunData/list.vue
+++ b/pages/railway/railwayRunData/list.vue
@@ -321,7 +321,7 @@
right: 0;
bottom: 0;
background-color: #F8F8F8;
- padding: 20px 30rpx 40px;
+ padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
diff --git a/pages/railway/runStatus/form.vue b/pages/railway/runStatus/form.vue
index 7ccef84..358dba5 100644
--- a/pages/railway/runStatus/form.vue
+++ b/pages/railway/runStatus/form.vue
@@ -166,7 +166,7 @@
if(this.pageType == 'add') {
let now = new Date();
//11:00-13:30 默认选择0-12
- let dateStr = getDateStr(now, 0);
+ let dateStr = getDateStr(now, 0).replaceAll('-','/');
if(new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() < new Date(dateStr + ' 13:30').getTime()) {
this.form.statPeriod = '0012';
let idx = this.array.findIndex(item => item.dictValue == '0012');
diff --git a/pages/railway/runStatus/list.vue b/pages/railway/runStatus/list.vue
index 46f759d..d707bf8 100644
--- a/pages/railway/runStatus/list.vue
+++ b/pages/railway/runStatus/list.vue
@@ -322,7 +322,7 @@
display: flex;
// justify-content: space-around;
background-color: #F8F8F8;
- padding: 20rpx 30rpx 40px;
+ padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
diff --git a/pages/water/transportation/form.vue b/pages/water/transportation/form.vue
index 61cfcf9..d3e1da3 100644
--- a/pages/water/transportation/form.vue
+++ b/pages/water/transportation/form.vue
@@ -250,7 +250,7 @@
if (this.pageType == 'add') {
let now = new Date();
//11:00-13:30 默认选择0-12
- let dateStr = getDateStr(now, 0);
+ let dateStr = getDateStr(now, 0).replaceAll('-','/');
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() < new Date(dateStr +
' 13:30').getTime()) {
this.form.statPeriod = '0012';
diff --git a/pages/water/transportation/list.vue b/pages/water/transportation/list.vue
index 6afd680..4b51abf 100644
--- a/pages/water/transportation/list.vue
+++ b/pages/water/transportation/list.vue
@@ -310,7 +310,7 @@
right: 0;
bottom: 0;
background-color: #F8F8F8;
- padding: 20px 30rpx 40px;
+ padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;
diff --git a/pages/water/waterWay/list.vue b/pages/water/waterWay/list.vue
index 25e5132..dfd74f8 100644
--- a/pages/water/waterWay/list.vue
+++ b/pages/water/waterWay/list.vue
@@ -310,7 +310,7 @@
right: 0;
bottom: 0;
background-color: #F8F8F8;
- padding: 20px 30rpx 40px;
+ padding: 40rpx 30rpx;
.act_btn {
width: 690rpx;