|
|
|
|
@ -115,7 +115,7 @@ |
|
|
|
|
<view class="content top"> |
|
|
|
|
<view class="left">客车总量环比</view> |
|
|
|
|
<!-- <view class="right">{{roadData.totalBusIncreaseRatio != '' ? roadData.passengerVolumeRatio == 0 ? 0 : roadData.totalBusIncreaseRatio.toFixed(2) + '%' : '--%'}}</view> --> |
|
|
|
|
<view class="right">{{roadData.totalBusIncreaseRatio === 0 ? roadData.totalBusIncreaseRatio : roadData.totalBusIncreaseRatio ? formatDigit(roadData.totalBusIncreaseRatio) : '--'}}%</view> |
|
|
|
|
<view class="right">{{roadData.totalBusIncreaseYesterdayRatio === 0 ? roadData.totalBusIncreaseYesterdayRatio : roadData.totalBusIncreaseYesterdayRatio ? formatDigit(roadData.totalBusIncreaseYesterdayRatio) : '--'}}%</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="content"> |
|
|
|
|
<view class="left">客车总量同比</view> |
|
|
|
|
@ -198,7 +198,7 @@ |
|
|
|
|
<view class="per_con"> |
|
|
|
|
<view class="content top"> |
|
|
|
|
<view class="left">客运量环比</view> |
|
|
|
|
<view class="right">{{roadData.passengerVolumeRatio === 0 ? roadData.passengerVolumeRatio : roadData.passengerVolumeRatio ? formatDigit(roadData.passengerVolumeRatio) : '--'}}%</view> |
|
|
|
|
<view class="right">{{roadData.passengerVolumeYesterdayRatio === 0 ? roadData.passengerVolumeYesterdayRatio : roadData.passengerVolumeYesterdayRatio ? formatDigit(roadData.passengerVolumeYesterdayRatio) : '--'}}%</view> |
|
|
|
|
<!-- <view class="right">{{roadData.passengerVolumeRatio != '' ? roadData.passengerVolumeRatio == 0 ? 0 : roadData.passengerVolumeRatio.toFixed(2) + '%' : '--%'}}</view> --> |
|
|
|
|
</view> |
|
|
|
|
<view class="content"> |
|
|
|
|
@ -538,7 +538,8 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
selectId:'', |
|
|
|
|
selectName:'', |
|
|
|
|
selectId1:'', |
|
|
|
|
mobile: getApp().globalData.mobile |
|
|
|
|
mobile: getApp().globalData.mobile, |
|
|
|
|
unitName:'' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad(options){ |
|
|
|
|
@ -604,10 +605,12 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
this.$refs.unitPopup.close() |
|
|
|
|
}, |
|
|
|
|
getPeople(){ |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/user/getByDeptId/' + this.unitId,{},"GET").then(res =>{ |
|
|
|
|
console.log('unitName ==>',this.unitName) |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/user/getByDeptName/' + this.unitName,{},"GET").then(res =>{ |
|
|
|
|
// this.$request(getApp().globalData.baseUrl + '/api/user/getByDeptId/' + this.unitId,{},"GET").then(res =>{ |
|
|
|
|
console.log('人员列表 ===>',res) |
|
|
|
|
res.data.map(item =>{ |
|
|
|
|
this.peopleList.push({id:item.id,people:item.username + ',' + item.mobile}) |
|
|
|
|
this.peopleList.push({id:item.id,people:item.nickname + ',' + item.mobile}) |
|
|
|
|
}) |
|
|
|
|
if(this.pageType == 'edit'){ |
|
|
|
|
console.log('deptNameList ===>',this.peopleList) |
|
|
|
|
@ -623,12 +626,20 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/dept/getCurrentAndSubordinateDept',{},"GET").then(res =>{ |
|
|
|
|
console.log('单位===>',res) |
|
|
|
|
this.treeData = res.data; |
|
|
|
|
this.unitId = this.deptNameList.length > 0 ? this.deptNameList[0].deptId : res.data[0].deptId; |
|
|
|
|
this.getPeople() |
|
|
|
|
if(this.pageType == 'add'){ |
|
|
|
|
this.unitId = this.deptNameList.length > 0 ? this.deptNameList[0].deptId : res.data[0].deptId; |
|
|
|
|
this.unitName = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : res.data[0].deptName; |
|
|
|
|
this.roadData.reportingUnitId = this.deptNameList.length > 0 ? this.deptNameList[0].deptName : ''; |
|
|
|
|
this.roadData.reportingUnitIdIndex = this.deptNameList.length > 0 ? 0 : ''; |
|
|
|
|
this.selectId1 = this.unitId |
|
|
|
|
this.selectId1 = this.unitId; |
|
|
|
|
this.getPeople() |
|
|
|
|
}else if(this.pageType == 'edit'){ |
|
|
|
|
console.log('reportingUnitId===>',this.roadData.reportingUnitId) |
|
|
|
|
console.log('treeData ==>',this.treeData) |
|
|
|
|
this.unitId = this.roadData.responsiblePersonId; |
|
|
|
|
this.unitName = this.roadData.reportingUnitId; |
|
|
|
|
this.selectId1 = this.unitId; |
|
|
|
|
this.getPeople() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
@ -662,16 +673,16 @@ import { calcMom, calcYoy, checkNotEmpty, getDateStr, lastYearDate } from '../.. |
|
|
|
|
// 2、今日数据有值且不为0,去年数据无值为-,去年数据为0时为100; |
|
|
|
|
// 3、今日数据无值,去年数据无论有值或为0,同比为- |
|
|
|
|
// 4、今日、去年今日都有值且都不为0时,按照公式计算(今日-去年今日)/去年今日 * 100; |
|
|
|
|
this.roadData.passengerVolumeRatio = calcMom(checkNotEmpty(this.roadData.totalPassengerVolume) ? this.roadData.totalPassengerVolume * 10000 : this.roadData.totalPassengerVolume,checkNotEmpty(this.lastData.passengerVolumeYesterday) ? this.lastData.passengerVolumeYesterday * 10000 : this.lastData.passengerVolumeYesterday) |
|
|
|
|
this.roadData.passengerVolumeRatio = calcMom(checkNotEmpty(this.roadData.totalPassengerVolume) ? this.roadData.totalPassengerVolume * 10000 : this.roadData.totalPassengerVolume,checkNotEmpty(this.lastData.passengerVolumeLastYear) ? this.lastData.passengerVolumeLastYear * 10000 : this.lastData.passengerVolumeLastYear) |
|
|
|
|
this.roadData.passengerVolumeYesterdayRatio = calcMom(checkNotEmpty(this.roadData.totalPassengerVolume) ? this.roadData.totalPassengerVolume * 10000 : this.roadData.totalPassengerVolume,checkNotEmpty(this.lastData.passengerVolumeYesterday) ? this.lastData.passengerVolumeYesterday * 10000 : this.lastData.passengerVolumeYesterday) |
|
|
|
|
this.roadData.passengerVolumeRatio = calcYoy(checkNotEmpty(this.roadData.totalPassengerVolume) ? this.roadData.totalPassengerVolume * 10000 : this.roadData.totalPassengerVolume,checkNotEmpty(this.lastData.passengerVolumeLastYear) ? this.lastData.passengerVolumeLastYear * 10000 : this.lastData.passengerVolumeLastYear) |
|
|
|
|
|
|
|
|
|
// (checkNotEmpty(this.roadData.totalPassengerVolume) && this.roadData.totalPassengerVolume != 0 && checkNotEmpty(this.lastData.totalPassengerVolume) && this.lastData.totalPassengerVolume === 0) ? 100 : |
|
|
|
|
// (checkNotEmpty(this.roadData.totalPassengerVolume) && checkNotEmpty(this.lastData.totalPassengerVolume) && this.roadData.totalPassengerVolume != 0 && this.lastData.totalPassengerVolume != 0) ? |
|
|
|
|
// (this.roadData.totalPassengerVolume - this.lastData.totalPassengerVolume) / this.lastData.totalPassengerVolume * 100 : |
|
|
|
|
// (this.roadData.totalPassengerVolume == 0 && this.lastData.totalPassengerVolume == 0) ? 0 : '' |
|
|
|
|
// // 客车总量同比上升 |
|
|
|
|
this.roadData.totalBusIncreaseRatio = calcMom(this.roadData.capacityTotalBus,this.lastData.totalBusYesterday) |
|
|
|
|
this.roadData.totalBusIncreaseRatio = calcMom(this.roadData.capacityTotalBus,this.lastData.totalBusLastYear) |
|
|
|
|
this.roadData.totalBusIncreaseYesterdayRatio = calcMom(this.roadData.capacityTotalBus,this.lastData.totalBusYesterday) |
|
|
|
|
this.roadData.totalBusIncreaseRatio = calcYoy(this.roadData.capacityTotalBus,this.lastData.totalBusLastYear) |
|
|
|
|
|
|
|
|
|
// (checkNotEmpty(this.roadData.capacityTotalBus) && this.roadData.capacityTotalBus != 0 && checkNotEmpty(this.lastData.capacityTotalBus) && this.lastData.capacityTotalBus === 0) ? 100 : |
|
|
|
|
// (checkNotEmpty(this.roadData.capacityTotalBus) && checkNotEmpty(this.lastData.capacityTotalBus) && this.roadData.capacityTotalBus != 0 && this.lastData.capacityTotalBus != 0) ? |
|
|
|
|
|