diff --git a/pages/bus/busDataInfo/form.vue b/pages/bus/busDataInfo/form.vue index dea9e39..5831966 100644 --- a/pages/bus/busDataInfo/form.vue +++ b/pages/bus/busDataInfo/form.vue @@ -59,9 +59,16 @@ {{item.stationId || ''}} + + + + + {{showLand?'收起':'展开'}} + - + + 运行数据 名称: @@ -107,7 +114,7 @@ 人数(万人): - @@ -160,7 +167,7 @@ 班次同比 - {{form.bizBusDataDetailVOList.length == 0 ? '' : form.bizBusDataDetailVOList[landNameIndex].passengerCountYoy === 0 ? form.bizBusDataDetailVOList[landNameIndex].operatingShiftsYoy : form.bizBusDataDetailVOList[landNameIndex].operatingShiftsYoy ? formatDigit(form.bizBusDataDetailVOList[landNameIndex].operatingShiftsYoy) : '--'}}% + {{form.bizBusDataDetailVOList.length == 0 ? '' : form.bizBusDataDetailVOList[landNameIndex].operatingShiftsYoy === 0 ? form.bizBusDataDetailVOList[landNameIndex].operatingShiftsYoy : form.bizBusDataDetailVOList[landNameIndex].operatingShiftsYoy ? formatDigit(form.bizBusDataDetailVOList[landNameIndex].operatingShiftsYoy) : '--'}}% @@ -268,7 +275,7 @@ yestOperatingShifts:'', yestPassengerCount:'', lyVehicleInput:'', - lyOperatingShifts:'', + lyPassengerCount:'', lyOperatingShifts:'' }) }) @@ -321,6 +328,7 @@ }, //环比同比计算 calcYoyMom(landNameIndex) { + console.log('landNameIndex ===>',landNameIndex) if (this.form.reportDate == '' || this.form.statPeriod == '' || this.form .bizBusDataDetailVOList[landNameIndex].landName == '') { return; @@ -334,6 +342,7 @@ .bizBusDataDetailVOList[landNameIndex].busUnit + '&_t=' + Date.parse(new Date()), {}, 'GET') .then(res => { + console.log('res.data ===>',res.data) let yesterdayData = res.data.yesterdayData; let lastYearData = res.data.lastYearData; @@ -348,18 +357,20 @@ lastYearData.passengerCount) ? lastYearData.passengerCount : 0; this.form.bizBusDataDetailVOList[landNameIndex].yestOperatingShifts = checkNotEmpty( - yesterdayData.passengerCount) ? yesterdayData.operatingShifts : 0; - this.form.bizBusDataDetailVOList[landNameIndex].lyPassengerCount = checkNotEmpty( - lastYearData.passengerCount) ? lastYearData.passengerCount : 0; + yesterdayData.operatingShifts) ? yesterdayData.operatingShifts : 0; + this.form.bizBusDataDetailVOList[landNameIndex].lyOperatingShifts = checkNotEmpty( + lastYearData.operatingShifts) ? lastYearData.operatingShifts : 0; + console.log('form==>',this.form) //环比-同比 //环比计算规则 if今天没有值不计算,elseif昨天没有值不计算,elseif昨天===0并且今天===0百分比0,esleif昨天0今天大于0百分比100,else(今天-昨天)/昨天*100 let obj = this.form.bizBusDataDetailVOList[landNameIndex]; + console.log('obj===>',obj) this.form.bizBusDataDetailVOList[landNameIndex].vehicleInputMom = calcMom(obj.vehicleInput,yesterdayData.vehicleInput) // !checkNotEmpty(obj // .vehicleInput) ? '' : !checkNotEmpty(yesterdayData.vehicleInput) ? '' : yesterdayData.vehicleInput === 0 && parseInt(obj // .vehicleInput) === 0 ? 0 : yesterdayData.vehicleInput === 0 && parseInt(obj.vehicleInput) > 0 ? 100 : (parseInt(obj // .vehicleInput) - yesterdayData.vehicleInput) / yesterdayData.vehicleInput * 100; - this.form.bizBusDataDetailVOList[landNameIndex].vehicleInputYoy = calcYoy(obj.vehicleInput,lastYearData.vehicleInput) + this.form.bizBusDataDetailVOList[landNameIndex].vehicleInputYoy = calcYoy(obj.vehicleInput,res.data.lastYearData.vehicleInput) // !checkNotEmpty(obj // .vehicleInput) ? '' : !checkNotEmpty(lastYearData.vehicleInput) ? '' : lastYearData.vehicleInput === 0 && parseInt(obj // .vehicleInput) === 0 ? 0 : lastYearData.vehicleInput === 0 && parseInt(obj.vehicleInput) > 0 ? 100 : (parseInt(obj @@ -371,14 +382,14 @@ // .passengerCount === 0 && parseInt(obj.passengerCount) === 0 ? 0 : yesterdayData.passengerCount === 0 && // parseInt(obj.passengerCount) > 0 ? 100 : (parseInt(obj.passengerCount) - yesterdayData.passengerCount) / // yesterdayData.passengerCount * 100; - this.form.bizBusDataDetailVOList[landNameIndex].passengerCountYoy = calcYoy(obj.passengerCount,lastYearData.passengerCount) + this.form.bizBusDataDetailVOList[landNameIndex].passengerCountYoy = calcYoy(obj.passengerCount,res.data.lastYearData.passengerCount) // !checkNotEmpty(obj // .passengerCount) ? '' : !checkNotEmpty(lastYearData.passengerCount) ? '' : lastYearData // .passengerCount === 0 && parseInt(obj.passengerCount) === 0 ? 0 : lastYearData.passengerCount === 0 && // parseInt(obj.passengerCount) > 0 ? 100 : (parseInt(obj.passengerCount) - lastYearData.passengerCount) / // lastYearData.passengerCount * 100; this.form.bizBusDataDetailVOList[landNameIndex].operatingShiftsMom = calcMom(obj.operatingShifts,yesterdayData.operatingShifts) - this.form.bizBusDataDetailVOList[landNameIndex].operatingShiftsYoy = calcMom(obj.operatingShifts,yesterdayData.operatingShifts) + this.form.bizBusDataDetailVOList[landNameIndex].operatingShiftsYoy = calcMom(obj.operatingShifts,res.data.lastYearData.operatingShifts) console.log('环比同比', this.form.bizBusDataDetailVOList[landNameIndex]) }) }, @@ -475,18 +486,19 @@ let checkAccident = true; if (this.form.bizBusDataDetailVOList.length > 0) { checkAccident = this.form.bizBusDataDetailVOList.every(item => { - return checkNotEmpty(item.landName) && checkNotEmpty(item.passengerCount) && checkNotEmpty( + return checkNotEmpty(item.busUnit) && checkNotEmpty(item.passengerCount) && checkNotEmpty( item.vehicleInput) && checkNotEmpty(item.operatingShifts) }) } if (!checkAccident) { uni.showToast({ - title: '公交详情不能为空', + title: '请填写所有公交运行数据', icon: 'none' }) return; } - console.log(this.form.id) + this.form.bizBusDataBodySaveOrUpdateDTOList = this.form.bizBusDataDetailVOList; + console.log(this.form) uni.showModal({ title: '提示', content: this.form.id == undefined ? '您确认提交该条报送数据?' : '您确认将该条数据进行修改?', @@ -502,6 +514,7 @@ title: '提交中...', mask: true }) + console.log(this.form) this.$request(getApp().globalData.baseUrl + '/api/biz/busdata/saveOrUpdate', this .form, 'POST').then(res => { @@ -514,7 +527,7 @@ if (this.form.id == undefined) { setTimeout(() => { uni.redirectTo({ - url: '/pages/water/waterWay/list' + url:"/pages/bus/busDataInfo/list" }) }, 300) } else { @@ -686,6 +699,13 @@ } } } + //收费站 + .station_act { + color: #2D8CF0; + font-size: 24rpx; + text-align: center; + margin-bottom: 30rpx; + } //收费站 .station_box { @@ -706,7 +726,7 @@ border: 1rpx solid #C1C1C1; padding: 0 20rpx; margin-bottom: 40rpx; - margin-right: 20rpx; + margin-right: 18rpx; &.active { position: relative; diff --git a/pages/portShipping/pilotStation/form.vue b/pages/portShipping/pilotStation/form.vue index 8183fd0..425b425 100644 --- a/pages/portShipping/pilotStation/form.vue +++ b/pages/portShipping/pilotStation/form.vue @@ -1,22 +1,504 @@ - diff --git a/pages/portShipping/pilotStation/list.vue b/pages/portShipping/pilotStation/list.vue index fddae25..8789674 100644 --- a/pages/portShipping/pilotStation/list.vue +++ b/pages/portShipping/pilotStation/list.vue @@ -1,7 +1,62 @@ @@ -9,15 +64,379 @@ export default { data() { return { + listData:[], + hasMore:true, + page:0, + pageSize:10, + timeRange:[], + contentText: { + contentdown: "点击查看更多", + contentrefresh: "正在加载...", + contentnomore: "没有更多数据了", + }, + status: '', } }, + onShow() { + this.page = 0; + this.hasMore = true; + this.listData = []; + this.loadMore() + }, methods: { - + loadMore(){ + if (this.hasMore) { + this.page = this.page + 1; + this.status = 'loading'; + let params = { + page:this.page, + pageSize:this.pageSize, + reportDateStart:this.timeRange.length !== 0 ? this.timeRange[0] : '', + reportDateEnd:this.timeRange.length !== 0 ? this.timeRange[1] : '', + _t:Date.parse(new Date()) + } + this.$request(getApp().globalData.baseUrl + '/api/biz/bizPilotData/list',params,"GET").then(res =>{ + console.log(res) + if(res.code == 200){ + res.data.list.map(item =>{ + item.show = false; + }) + this.listData = this.listData.concat(res.data.list); + if(res.data.list.length == 0 || res.data.list.length < this.size){ + this.hasMore = false; + this.status = 'nomore'; + }else{ + this.status = 'more'; + } + } + }) + } + }, + // 点击查询按钮 + handleSearch(){ + this.$refs.popup.open('bottom') + }, + // 点击筛选弹窗中的筛选按钮 + searchList(){ + this.hasMore = true; + this.page = 0; + this.listData = []; + this.$refs.popup.close() + this.loadMore() + }, + // 点击筛选弹窗中的重置按钮 + searchReset(){ + this.timeRange = []; + this.listData = []; + this.hasMore = true; + this.page = 0; + this.$refs.popup.close() + this.loadMore(); + }, + // 跳转编辑页面 + editItem(row){ + uni.navigateTo({ + // url:"/pages/bus/busDataInfo/form?type=edit&item=" + JSON.stringify(row) + url:"/pages/portShipping/pilotStation/form?type=edit&item=" + JSON.stringify(row) + }) + }, } } - diff --git a/pages/roadTransport/transportData/form.vue b/pages/roadTransport/transportData/form.vue index 63cb841..fcad1f4 100644 --- a/pages/roadTransport/transportData/form.vue +++ b/pages/roadTransport/transportData/form.vue @@ -9,9 +9,16 @@ 基本信息 -

填报单位

+

填报单位

-

{{roadData.reportingUnitId ? roadData.reportingUnitId : ''}}

+ + + {{roadData.reportingUnitId?roadData.reportingUnitId:'请选择'}} + + + {{roadData.reportingUnitId}}
@@ -47,7 +54,13 @@

负责人及联系电话

- + + + {{peopleName ? peopleName : '请选择'}} + +
客车总量环比 - {{roadData.totalBusIncreaseRatio != '' ? roadData.passengerVolumeRatio == 0 ? 0 : roadData.totalBusIncreaseRatio.toFixed(2) + '%' : '--%'}} + + {{roadData.totalBusIncreaseRatio === 0 ? roadData.totalBusIncreaseRatio : roadData.totalBusIncreaseRatio ? formatDigit(roadData.totalBusIncreaseRatio) : '--'}}% 客车总量同比 - {{roadData.totalBusIncreaseRatio != '' ? roadData.passengerVolumeRatio == 0 ? 0 : roadData.totalBusIncreaseRatio.toFixed(2) + '%' : '--%'}} + {{roadData.totalBusIncreaseRatio === 0 ? roadData.totalBusIncreaseRatio : roadData.totalBusIncreaseRatio ? formatDigit(roadData.totalBusIncreaseRatio) : '--'}}% +
@@ -147,7 +164,7 @@

班车客运量(万)

- +
@@ -171,17 +188,19 @@

完成客运量(万)

- +
客运量环比 - {{roadData.passengerVolumeRatio != '' ? roadData.passengerVolumeRatio == 0 ? 0 : roadData.passengerVolumeRatio.toFixed(2) + '%' : '--%'}} + {{roadData.passengerVolumeRatio === 0 ? roadData.passengerVolumeRatio : roadData.passengerVolumeRatio ? formatDigit(roadData.passengerVolumeRatio) : '--'}}% + 客运量同比 - {{roadData.passengerVolumeRatio != '' ? roadData.passengerVolumeRatio == 0 ? 0 : roadData.passengerVolumeRatio.toFixed(2) + '%' : '--%'}} + {{roadData.passengerVolumeRatio === 0 ? roadData.passengerVolumeRatio : roadData.passengerVolumeRatio ? formatDigit(roadData.passengerVolumeRatio) : '--'}}% + @@ -288,7 +307,7 @@ @@ -583,9 +636,13 @@ import { checkNotEmpty, getDateStr, lastYearDate } from '../../../common/util' .left{ // margin-left: 30rpx; - min-width: 416rpx; + min-width: 320rpx; color: #666; font-size: 26rpx; + + &.unit{ + min-width: 0; + } } .right{ // margin-right: 30rpx; @@ -630,27 +687,28 @@ import { checkNotEmpty, getDateStr, lastYearDate } from '../../../common/util' margin: 0 auto; background-color: #F6F6F6; border-radius: 30rpx; - margin-top: 30rpx; + margin-top: 15rpx; .content{ width: 576rpx; - padding: 34rpx 32rpx 30rpx 22rpx; + padding: 34rpx 0 30rpx 0; display: flex; justify-content: space-between; align-items: center; + margin: 0 auto; &.top{ - border-bottom: 1rpx solid #FFFFFF; + border-bottom: 1rpx solid #dfdfdf; } .left{ font-size: 24rpx; - color: #C8C8C8; + color: #666; } .right{ - color: #D4D4D4; + color: #333; font-size: 28rpx; &.green{