环比同比预警优化,水运陆岛联调

main
张群 2 years ago
parent d3368b8c51
commit 37b16b69a6
  1. 27
      pages.json
  2. 225
      pages/highWay/runData/form.vue
  3. 171
      pages/railway/railwayRunData/form.vue
  4. 18
      pages/water/TransportData/form.vue
  5. 20
      pages/water/waterWay/form.vue
  6. BIN
      static/image/bus01.png
  7. BIN
      static/image/railway01.png
  8. BIN
      static/image/roadTransport01.png
  9. BIN
      static/image/water01.png

@ -21,7 +21,8 @@
{ {
"path": "pages/highway/runData/list", "path": "pages/highway/runData/list",
"style": { "style": {
"navigationBarTitleText": "高速运行数据" "navigationBarTitleText": "高速运行数据",
"enablePullDownRefresh": true
} }
}, },
{ {
@ -39,7 +40,8 @@
{ {
"path": "pages/highway/runStatusData/list", "path": "pages/highway/runStatusData/list",
"style": { "style": {
"navigationBarTitleText": "高速运行情况" "navigationBarTitleText": "高速运行情况",
"enablePullDownRefresh": true
} }
}, },
{ {
@ -57,7 +59,8 @@
{ {
"path": "pages/railway/railwayRunData/list", "path": "pages/railway/railwayRunData/list",
"style": { "style": {
"navigationBarTitleText": "铁路运行数据" "navigationBarTitleText": "铁路运行数据",
"enablePullDownRefresh": true
} }
}, },
{ {
@ -75,7 +78,8 @@
{ {
"path": "pages/railway/runStatus/list", "path": "pages/railway/runStatus/list",
"style": { "style": {
"navigationBarTitleText": "铁路运行情况" "navigationBarTitleText": "铁路运行情况",
"enablePullDownRefresh": true
} }
}, },
{ {
@ -87,7 +91,8 @@
{ {
"path": "pages/water/TransportData/list", "path": "pages/water/TransportData/list",
"style": { "style": {
"navigationBarTitleText": "水运运输数据" "navigationBarTitleText": "水运运输数据",
"enablePullDownRefresh": true
} }
}, },
{ {
@ -99,7 +104,8 @@
{ {
"path": "pages/water/waterWay/list", "path": "pages/water/waterWay/list",
"style": { "style": {
"navigationBarTitleText": "水路(陆岛)数据" "navigationBarTitleText": "水路(陆岛)数据",
"enablePullDownRefresh": true
} }
}, },
{ {
@ -111,7 +117,8 @@
{ {
"path": "pages/water/transportation/list", "path": "pages/water/transportation/list",
"style": { "style": {
"navigationBarTitleText": "水运运输情况" "navigationBarTitleText": "水运运输情况",
"enablePullDownRefresh": true
} }
}, },
{ {
@ -178,9 +185,9 @@
], ],
"globalStyle": { "globalStyle": {
"pageOrientation": "portrait", "pageOrientation": "portrait",
"navigationBarTitleText": "Hello uniapp", "navigationBarTitleText": "交通运输局一体化平台",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#007AFF", "navigationBarBackgroundColor": "#ffffff",
"backgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8",
"backgroundColorTop": "#F4F5F6", "backgroundColorTop": "#F4F5F6",
"backgroundColorBottom": "#F4F5F6", "backgroundColorBottom": "#F4F5F6",

@ -39,10 +39,14 @@
</view> </view>
</view> </view>
<!-- 同比环比 --> <!-- 同比环比 -->
<view class="form_item_rate" :class="form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ? 'danger' : ''"> <view class="form_item_rate"
:class="form.entranceVehicleCount && form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ? 'danger' : ''">
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label" :style="form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">收费站入口车辆数汇总环比(%)</view> <view class="rate_item_label"
<view class="rate_item_input" :style="form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''"> :style="form.entranceVehicleCount && form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
收费站入口车辆数汇总环比(%)</view>
<view class="rate_item_input"
:style="form.entranceVehicleCount && form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">
{{form.entranceVehicleCountMom === 0 ? form.entranceVehicleCountMom : form.entranceVehicleCountMom ? form.entranceVehicleCountMom.toFixed(2) : ''}} {{form.entranceVehicleCountMom === 0 ? form.entranceVehicleCountMom : form.entranceVehicleCountMom ? form.entranceVehicleCountMom.toFixed(2) : ''}}
</view> </view>
</view> </view>
@ -61,10 +65,14 @@
</view> </view>
</view> </view>
<!-- 同比环比 --> <!-- 同比环比 -->
<view class="form_item_rate" :class="form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ? 'danger' : ''"> <view class="form_item_rate"
:class="form.exitVehicleCount === yoyMom.minusDaysExitVehicleSum ? 'danger' : ''">
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label" :style="form.exitVehicleCount == yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">收费站入口车辆数汇总环比(%)</view> <view class="rate_item_label"
<view class="rate_item_input" :style="form.exitVehicleCount == yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''"> :style="form.exitVehicleCount == yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
收费站入口车辆数汇总环比(%)</view>
<view class="rate_item_input"
:style="form.exitVehicleCount == yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">
{{form.exitVehicleCountMom === 0 ? form.exitVehicleCountMom : form.exitVehicleCountMom ? form.exitVehicleCountMom.toFixed(2) : ''}} {{form.exitVehicleCountMom === 0 ? form.exitVehicleCountMom : form.exitVehicleCountMom ? form.exitVehicleCountMom.toFixed(2) : ''}}
</view> </view>
</view> </view>
@ -79,19 +87,30 @@
</view> </view>
<!-- 用户权限收费站 --> <!-- 用户权限收费站 -->
<view class="station_box"> <view class="station_box">
<view v-if="index < 9" :style="(index+1)%3 == 0 ? 'margin-right:0;':''" @click="changeStationIndex(index)" class="station_item" :class="[item.isFinish ? 'active' : '',index == stationIndex ? 'choosed' : '']" v-for="(item, index) in highwaySubDataList" :key="item.id"> <view v-if="index < 9" :style="(index+1)%3 == 0 ? 'margin-right:0;':''" @click="changeStationIndex(index)"
<view v-if='item.isFinish' class="tag"><uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons></view> class="station_item" :class="[item.isFinish ? 'active' : '',index == stationIndex ? 'choosed' : '']"
v-for="(item, index) in highwaySubDataList" :key="item.id">
<view v-if='item.isFinish' class="tag">
<uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons>
</view>
{{item.stationName}} {{item.stationName}}
</view> </view>
<view v-if="index >= 9 && showStaion" :style="(index+1)%3 == 0 ? 'margin-right:0;':''" @click="changeStationIndex(index)" class="station_item" :class="[item.isFinish ? 'active' : '',index == stationIndex ? 'choosed' : '']" v-for="(item, index) in highwaySubDataList" :key="item.id"> <view v-if="index >= 9 && showStaion" :style="(index+1)%3 == 0 ? 'margin-right:0;':''"
<view v-if='item.isFinish' class="tag"><uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons></view> @click="changeStationIndex(index)" class="station_item"
:class="[item.isFinish ? 'active' : '',index == stationIndex ? 'choosed' : '']"
v-for="(item, index) in highwaySubDataList" :key="item.id">
<view v-if='item.isFinish' class="tag">
<uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons>
</view>
{{item.stationName}} {{item.stationName}}
</view> </view>
</view> </view>
<view v-if="highwaySubDataList.length > 9" class="station_act" @click="showStaion = !showStaion"> <view v-if="highwaySubDataList.length > 9" class="station_act" @click="showStaion = !showStaion">
<uni-icons v-if="!showStaion" type="bottom" size="14" color="#2D8CF0" style="margin-right:10rpx;"></uni-icons> <uni-icons v-if="!showStaion" type="bottom" size="14" color="#2D8CF0" style="margin-right:10rpx;">
</uni-icons>
<uni-icons v-if="showStaion" type="top" size="14" color="#2D8CF0" style="margin-right:10rpx;"></uni-icons> <uni-icons v-if="showStaion" type="top" size="14" color="#2D8CF0" style="margin-right:10rpx;"></uni-icons>
{{showStaion?'收起':'展开'}}</view> {{showStaion?'收起':'展开'}}
</view>
<view class="form_item_box"> <view class="form_item_box">
<view class="form_item"> <view class="form_item">
<view class="form_item_label">收费站名称</view> <view class="form_item_label">收费站名称</view>
@ -104,63 +123,82 @@
<view class="form_item"> <view class="form_item">
<view class="form_item_label">收费站入口车辆数</view> <view class="form_item_label">收费站入口车辆数</view>
<view class="form_item_input form_input"> <view class="form_item_input form_input">
<uni-easyinput @blur="checkStationInfo(stationIndex)" v-model="form.highwaySubDataList[stationIndex].entranceVehicleCount" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入车辆数" type="number" maxlength="30"></uni-easyinput> <uni-easyinput @blur="checkStationInfo(stationIndex)"
v-model="form.highwaySubDataList[stationIndex].entranceVehicleCount"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入车辆数" type="number"
maxlength="30"></uni-easyinput>
</view> </view>
</view> </view>
<!-- 同比环比 --> <!-- 同比环比 -->
<view class="form_item_rate" :class="form.highwaySubDataList[stationIndex].entranceVehicleCountMom == 0 ? 'danger' : '' "> <view class="form_item_rate"
:class="form.highwaySubDataList[stationIndex].entranceVehicleCountMom === 0 ? 'danger' : '' ">
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label" :style="form.highwaySubDataList[stationIndex].entranceVehicleCountMom == 0 ? 'color: #EB4747' : ''">收费站入口车辆数环比(%)</view> <view class="rate_item_label"
<view class="rate_item_input" :style="form.highwaySubDataList[stationIndex].entranceVehicleCountMom == 0 ? 'color: #EB4747' : ''"> :style="form.highwaySubDataList[stationIndex].entranceVehicleCountMom === 0 ? 'color: #EB4747' : ''">
{{form.highwaySubDataList[stationIndex].entranceVehicleCountMom === 0 ? form.highwaySubDataList[stationIndex].entranceVehicleCountMom : form.highwaySubDataList[stationIndex].entranceVehicleCountMom ? form.highwaySubDataList[stationIndex].entranceVehicleCountMom.toFixed(2) : ''}} 收费站入口车辆数环比(%)</view>
<view class="rate_item_input"
:style="form.highwaySubDataList[stationIndex].entranceVehicleCountMom === 0 ? 'color: #EB4747' : ''">
{{form.highwaySubDataList.length == 0 ? '' : form.highwaySubDataList[stationIndex].entranceVehicleCountMom === 0 ? form.highwaySubDataList[stationIndex].entranceVehicleCountMom : form.highwaySubDataList[stationIndex].entranceVehicleCountMom ? form.highwaySubDataList[stationIndex].entranceVehicleCountMom.toFixed(2) : ''}}
</view> </view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label">收费站入口车辆数同比(%)</view> <view class="rate_item_label">收费站入口车辆数同比(%)</view>
<view class="rate_item_input"> <view class="rate_item_input">
{{form.highwaySubDataList[stationIndex].entranceVehicleCountYoy === 0 ? form.highwaySubDataList[stationIndex].entranceVehicleCountYoy : form.highwaySubDataList[stationIndex].entranceVehicleCountYoy ? form.highwaySubDataList[stationIndex].entranceVehicleCountYoy.toFixed(2) : ''}} {{form.highwaySubDataList.length == 0 ? '' : form.highwaySubDataList[stationIndex].entranceVehicleCountYoy === 0 ? form.highwaySubDataList[stationIndex].entranceVehicleCountYoy : form.highwaySubDataList[stationIndex].entranceVehicleCountYoy ? form.highwaySubDataList[stationIndex].entranceVehicleCountYoy.toFixed(2) : ''}}
</view> </view>
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
<view class="form_item_label">收费站出口车辆数</view> <view class="form_item_label">收费站出口车辆数</view>
<view class="form_item_input form_input"> <view class="form_item_input form_input">
<uni-easyinput @blur="checkStationInfo(stationIndex)" v-model="form.highwaySubDataList[stationIndex].exitVehicleCount" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入车辆数" type="number" maxlength="30"></uni-easyinput> <uni-easyinput @blur="checkStationInfo(stationIndex)"
v-model="form.highwaySubDataList[stationIndex].exitVehicleCount"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入车辆数" type="number"
maxlength="30"></uni-easyinput>
</view> </view>
</view> </view>
<!-- 同比环比 --> <!-- 同比环比 -->
<view class="form_item_rate" :class="form.highwaySubDataList[stationIndex].exitVehicleCountMom == 0 ? 'danger' : '' "> <view class="form_item_rate"
:class="form.highwaySubDataList[stationIndex].exitVehicleCountMom === 0 ? 'danger' : '' ">
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label" :style="form.highwaySubDataList[stationIndex].exitVehicleCountMom == 0 ? 'color: #EB4747' : ''">收费站出口车辆数环比(%)</view> <view class="rate_item_label"
<view class="rate_item_input" :style="form.highwaySubDataList[stationIndex].exitVehicleCountMom == 0 ? 'color: #EB4747' : ''"> :style="form.highwaySubDataList[stationIndex].exitVehicleCountMom === 0 ? 'color: #EB4747' : ''">
{{form.highwaySubDataList[stationIndex].exitVehicleCountMom === 0 ? form.highwaySubDataList[stationIndex].exitVehicleCountMom : form.highwaySubDataList[stationIndex].exitVehicleCountMom ? form.highwaySubDataList[stationIndex].exitVehicleCountMom.toFixed(2) : ''}} 收费站出口车辆数环比(%)</view>
<view class="rate_item_input"
:style="form.highwaySubDataList[stationIndex].exitVehicleCountMom === 0 ? 'color: #EB4747' : ''">
{{form.highwaySubDataList.length == 0 ? '' : form.highwaySubDataList[stationIndex].exitVehicleCountMom === 0 ? form.highwaySubDataList[stationIndex].exitVehicleCountMom : form.highwaySubDataList[stationIndex].exitVehicleCountMom ? form.highwaySubDataList[stationIndex].exitVehicleCountMom.toFixed(2) : ''}}
</view> </view>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label">收费站出口车辆数同比(%)</view> <view class="rate_item_label">收费站出口车辆数同比(%)</view>
<view class="rate_item_input"> <view class="rate_item_input">
{{form.highwaySubDataList[stationIndex].exitVehicleCountYoy === 0 ? form.highwaySubDataList[stationIndex].exitVehicleCountYoy : form.highwaySubDataList[stationIndex].exitVehicleCountYoy ? form.highwaySubDataList[stationIndex].exitVehicleCountYoy.toFixed(2) : ''}} {{form.highwaySubDataList.length == 0 ? '' : form.highwaySubDataList[stationIndex].exitVehicleCountYoy === 0 ? form.highwaySubDataList[stationIndex].exitVehicleCountYoy : form.highwaySubDataList[stationIndex].exitVehicleCountYoy ? form.highwaySubDataList[stationIndex].exitVehicleCountYoy.toFixed(2) : ''}}
</view> </view>
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
<view class="form_item_label">免收通行费车辆数</view> <view class="form_item_label">免收通行费车辆数</view>
<view class="form_item_input form_input"> <view class="form_item_input form_input">
<uni-easyinput v-model="form.highwaySubDataList[stationIndex].tollExemptVehicleCount" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入车辆数" type="number" maxlength="30"></uni-easyinput> <uni-easyinput v-model="form.highwaySubDataList[stationIndex].tollExemptVehicleCount"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入车辆数" type="number"
maxlength="30"></uni-easyinput>
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
<view class="form_item_label">免收通行费金额</view> <view class="form_item_label">免收通行费金额</view>
<view class="form_item_input form_input"> <view class="form_item_input form_input">
<uni-easyinput v-model="form.highwaySubDataList[stationIndex].tollExemptAmount" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入金额" type="digit" maxlength="30"></uni-easyinput> <uni-easyinput v-model="form.highwaySubDataList[stationIndex].tollExemptAmount"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入金额" type="digit"
maxlength="30"></uni-easyinput>
</view> </view>
</view> </view>
<view class="form_item"> <view class="form_item">
<view class="form_item_label">报送人员及联系方式</view> <view class="form_item_label">报送人员及联系方式</view>
<view class="form_item_input picker"> <view class="form_item_input picker">
<picker :value="form.highwaySubDataList[stationIndex].submitPersonnelContact" :range="submitPerson" @change="e => changeSubmitPerson(e, stationIndex)"> <picker :value="form.highwaySubDataList[stationIndex].submitPersonnelContact" :range="submitPerson"
@change="e => changeSubmitPerson(e, stationIndex)">
<text class="picker_select" <text class="picker_select"
:style="form.highwaySubDataList[stationIndex].submitPersonnelContact?'color:#333;':''">{{form.highwaySubDataList[stationIndex].submitPersonnelContact?form.highwaySubDataList[stationIndex].submitPersonnelContact:'请选择报送人'}}</text> :style="form.highwaySubDataList[stationIndex].submitPersonnelContact?'color:#333;':''">{{form.highwaySubDataList[stationIndex].submitPersonnelContact?form.highwaySubDataList[stationIndex].submitPersonnelContact:'请选择报送人'}}</text>
<uni-icons type="right" size="16" color="#D4D4D4"></uni-icons> <uni-icons type="right" size="16" color="#D4D4D4"></uni-icons>
@ -170,7 +208,9 @@
<view class="form_item_remark"> <view class="form_item_remark">
<view class="form_item_label">备注</view> <view class="form_item_label">备注</view>
<view class="form_item_input"> <view class="form_item_input">
<uni-easyinput v-model="form.highwaySubDataList[stationIndex].mark" placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea" maxlength="200" autoHeight></uni-easyinput> <uni-easyinput v-model="form.highwaySubDataList[stationIndex].mark"
placeholderStyle="color: #D4D4D4;font-size:28rpx;" placeholder="请输入备注信息" type="textarea"
maxlength="200" autoHeight></uni-easyinput>
</view> </view>
</view> </view>
</view> </view>
@ -182,7 +222,10 @@
</view> </view>
</template> </template>
<script> <script>
import { checkNotEmpty, getDateStr } from "../../../common/util.js" import {
checkNotEmpty,
getDateStr
} from "../../../common/util.js"
export default { export default {
data() { data() {
return { return {
@ -218,7 +261,8 @@
this.form.statDate = getDateStr(now, -1); // this.form.statDate = getDateStr(now, -1); //
this.queryStation('add'); this.queryStation('add');
this.queryTime(); // this.queryTime(); //
} if(options.id) { }
if (options.id) {
this.queryDetailInfo(options.id); this.queryDetailInfo(options.id);
} }
this.queryPerson(); this.queryPerson();
@ -226,7 +270,8 @@
methods: { methods: {
//id //id
queryDetailInfo(id) { queryDetailInfo(id) {
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/selectById/' + id, {}, 'GET').then(res => { this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/selectById/' + id, {},
'GET').then(res => {
this.form = res.data; this.form = res.data;
this.queryTime(); this.queryTime();
this.queryStation(); this.queryStation();
@ -235,7 +280,10 @@
// //
queryYoYMom() { queryYoYMom() {
if (this.form.statDate && this.form.statPeriod) { if (this.form.statDate && this.form.statPeriod) {
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/getYoYAndMoM?statDate='+this.form.statDate+'&statPeriod='+this.form.statPeriod+'&_t=' + Date.parse(new Date()),{},"GET").then(res => { this.$request(getApp().globalData.baseUrl +
'/api/biz/highwayParentDataController/getYoYAndMoM?statDate=' + this.form.statDate +
'&statPeriod=' + this.form.statPeriod + '&_t=' + Date.parse(new Date()), {}, "GET").then(
res => {
this.yoyMom = res.data; this.yoyMom = res.data;
// //
if (this.highwaySubDataList.length > 0 && this.form.highwaySubDataList.length > 0) { if (this.highwaySubDataList.length > 0 && this.form.highwaySubDataList.length > 0) {
@ -248,7 +296,8 @@
}, },
// //
queryPerson() { queryPerson() {
this.$request(getApp().globalData.baseUrl + '/api/biz/personnelContactInfoController/all?query=&_t=' + Date.parse(new Date()),{},"GET").then(res => { this.$request(getApp().globalData.baseUrl + '/api/biz/personnelContactInfoController/all?query=&_t=' + Date
.parse(new Date()), {}, "GET").then(res => {
let arr = []; let arr = [];
res.data.list.map(item => { res.data.list.map(item => {
arr.push(item.name); arr.push(item.name);
@ -261,7 +310,8 @@
}, },
// //
changeStationIndex(index) { changeStationIndex(index) {
if(this.form.highwaySubDataList[this.stationIndex].entranceVehicleCount != '' && this.form.highwaySubDataList[this.stationIndex].exitVehicleCount != '') { if (this.form.highwaySubDataList[this.stationIndex].entranceVehicleCount != '' && this.form
.highwaySubDataList[this.stationIndex].exitVehicleCount != '') {
this.highwaySubDataList[this.stationIndex].isFinish = true; this.highwaySubDataList[this.stationIndex].isFinish = true;
} else { } else {
this.highwaySubDataList[this.stationIndex].isFinish = false; this.highwaySubDataList[this.stationIndex].isFinish = false;
@ -270,34 +320,56 @@
}, },
// //
checkStationInfo(index) { checkStationInfo(index) {
this.highwaySubDataList[index].isFinish = this.form.highwaySubDataList[index].entranceVehicleCount != '' && this.form.highwaySubDataList[index].exitVehicleCount != ''; this.highwaySubDataList[index].isFinish = this.form.highwaySubDataList[index].entranceVehicleCount != '' &&
this.form.highwaySubDataList[index].exitVehicleCount != '';
// //
let entranceVehicleCount = 0,exitVehicleCount = 0; let entranceVehicleCount = 0,
exitVehicleCount = 0;
this.form.highwaySubDataList.map(item => { this.form.highwaySubDataList.map(item => {
entranceVehicleCount = entranceVehicleCount + (item.entranceVehicleCount ? parseInt(item.entranceVehicleCount) : 0); entranceVehicleCount = entranceVehicleCount + (item.entranceVehicleCount ? parseInt(item
exitVehicleCount = exitVehicleCount + (item.exitVehicleCount ? parseInt(item.exitVehicleCount) : 0); .entranceVehicleCount) : 0);
exitVehicleCount = exitVehicleCount + (item.exitVehicleCount ? parseInt(item
.exitVehicleCount) : 0);
}) })
this.form.entranceVehicleCount = entranceVehicleCount; this.form.entranceVehicleCount = entranceVehicleCount;
this.form.exitVehicleCount = exitVehicleCount; this.form.exitVehicleCount = exitVehicleCount;
// //
this.form.entranceVehicleCountMom = this.form.entranceVehicleCount && this.yoyMom.minusDaysEntranceVehicleSum ? (parseInt(this.form.entranceVehicleCount) - this.yoyMom.minusDaysEntranceVehicleSum ) / this.yoyMom.minusDaysEntranceVehicleSum * 100 : ''; this.form.entranceVehicleCountMom = this.form.entranceVehicleCount && this.yoyMom
this.form.entranceVehicleCountYoy = this.form.entranceVehicleCount && this.yoyMom.minusYearsEntranceVehicleSum ? (parseInt(this.form.entranceVehicleCount) - this.yoyMom.minusYearsEntranceVehicleSum ) / this.yoyMom.minusYearsEntranceVehicleSum * 100 : '';// .minusDaysEntranceVehicleSum ? (parseInt(this.form.entranceVehicleCount) - this.yoyMom
.minusDaysEntranceVehicleSum) / this.yoyMom.minusDaysEntranceVehicleSum * 100 : '';
this.form.entranceVehicleCountYoy = this.form.entranceVehicleCount && this.yoyMom
.minusYearsEntranceVehicleSum ? (parseInt(this.form.entranceVehicleCount) - this.yoyMom
.minusYearsEntranceVehicleSum) / this.yoyMom.minusYearsEntranceVehicleSum * 100 : ''; //
// //
this.form.exitVehicleCountMom = this.form.exitVehicleCount && this.yoyMom.minusDaysExitVehicleSum ? (parseInt(this.form.exitVehicleCount) - this.yoyMom.minusDaysExitVehicleSum) / this.yoyMom.minusDaysExitVehicleSum * 100 : ''; this.form.exitVehicleCountMom = this.form.exitVehicleCount && this.yoyMom.minusDaysExitVehicleSum ? (
this.form.exitVehicleCountYoy = this.form.exitVehicleCount && this.yoyMom.minusYearsExitVehicleSum ? (parseInt(this.form.exitVehicleCount) - this.yoyMom.minusYearsExitVehicleSum) / this.yoyMom.minusYearsExitVehicleSum * 100 : '';// parseInt(this.form.exitVehicleCount) - this.yoyMom.minusDaysExitVehicleSum) / this.yoyMom
.minusDaysExitVehicleSum * 100 : '';
this.form.exitVehicleCountYoy = this.form.exitVehicleCount && this.yoyMom.minusYearsExitVehicleSum ? (
parseInt(this.form.exitVehicleCount) - this.yoyMom.minusYearsExitVehicleSum) / this.yoyMom
.minusYearsExitVehicleSum * 100 : ''; //
// //
if(this.form.highwaySubDataList[index].entranceVehicleCount != '' || this.form.highwaySubDataList[index].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;}); let idx = this.yoyMom.minusDaysList.findIndex(item => {
let idx2 = this.yoyMom.minusYearsList.findIndex(item => {return item.tollStationName == this.form.highwaySubDataList[index].tollStationName;}); return item.tollStationName == this.form.highwaySubDataList[index].tollStationName;
console.log('收费站同比环比',idx,idx2,this.form.highwaySubDataList[index].tollStationName); });
let idx2 = this.yoyMom.minusYearsList.findIndex(item => {
return item.tollStationName == this.form.highwaySubDataList[index].tollStationName;
});
// console.log('', idx, idx2, this.form.highwaySubDataList[index].tollStationName);
if (idx > -1) { if (idx > -1) {
// //
let obj = this.yoyMom.minusDaysList[idx]; let obj = this.yoyMom.minusDaysList[idx];
console.log(obj) console.log(obj)
this.form.highwaySubDataList[index].entranceVehicleCountMom = !checkNotEmpty(obj.entranceVehicleCount) || obj.entranceVehicleCount === 0 ? 100 : obj.entranceVehicleCount ? (parseInt(this.form.highwaySubDataList[index].entranceVehicleCount) - obj.entranceVehicleCount) / obj.entranceVehicleCount * 100 : ''; this.form.highwaySubDataList[index].entranceVehicleCountMom = !checkNotEmpty(this.form
this.form.highwaySubDataList[index].exitVehicleCountMom = !checkNotEmpty(obj.exitVehicleCount) || obj.exitVehicleCount === 0 ? 100 : obj.exitVehicleCount ? (parseInt(this.form.highwaySubDataList[index].exitVehicleCount) - obj.exitVehicleCount) / obj.exitVehicleCount * 100 : ''; .highwaySubDataList[index].entranceVehicleCount) ? '' : !checkNotEmpty(obj
} .entranceVehicleCount) || obj.entranceVehicleCount === 0 ? 100 : (parseInt(this.form
else{ .highwaySubDataList[index].entranceVehicleCount) - obj.entranceVehicleCount) / obj
.entranceVehicleCount * 100;
this.form.highwaySubDataList[index].exitVehicleCountMom = !checkNotEmpty(this.form.highwaySubDataList[
index].exitVehicleCount) ? '' : !checkNotEmpty(obj.exitVehicleCount) || obj
.exitVehicleCount === 0 ? 100 : (parseInt(this.form.highwaySubDataList[index].exitVehicleCount) -
obj.exitVehicleCount) / obj.exitVehicleCount * 100;
} else {
this.form.highwaySubDataList[index].entranceVehicleCountMom = ''; this.form.highwaySubDataList[index].entranceVehicleCountMom = '';
this.form.highwaySubDataList[index].exitVehicleCountMom = ''; this.form.highwaySubDataList[index].exitVehicleCountMom = '';
} }
@ -305,14 +377,21 @@
// //
let obj = this.yoyMom.minusYearsList[idx2]; let obj = this.yoyMom.minusYearsList[idx2];
console.log(obj) console.log(obj)
this.form.highwaySubDataList[index].entranceVehicleCountYoy = !checkNotEmpty(obj.entranceVehicleCount) || obj.entranceVehicleCount === 0 ? 100 : obj.entranceVehicleCount ? (parseInt(this.form.highwaySubDataList[index].entranceVehicleCount) - obj.entranceVehicleCount) / obj.entranceVehicleCount * 100 : ''; this.form.highwaySubDataList[index].entranceVehicleCountYoy = !checkNotEmpty(this.form
this.form.highwaySubDataList[index].exitVehicleCountYoy = !checkNotEmpty(obj.exitVehicleCount) || obj.exitVehicleCount === 0 ? 100 : obj.exitVehicleCount ? (parseInt(this.form.highwaySubDataList[index].exitVehicleCount) - obj.exitVehicleCount) / obj.exitVehicleCount * 100 : ''; .highwaySubDataList[index].entranceVehicleCount) ? '' : !checkNotEmpty(obj
} .entranceVehicleCount) || obj.entranceVehicleCount === 0 ? 100 : (parseInt(this.form
else{ .highwaySubDataList[index].entranceVehicleCount) - obj.entranceVehicleCount) / obj
.entranceVehicleCount * 100;
this.form.highwaySubDataList[index].exitVehicleCountYoy = !checkNotEmpty(this.form.highwaySubDataList[
index].exitVehicleCount) ? this.form.highwaySubDataList[index].exitVehicleCount : !
checkNotEmpty(obj.exitVehicleCount) || obj.exitVehicleCount === 0 ? 100 : (parseInt(this.form
.highwaySubDataList[index].exitVehicleCount) - obj.exitVehicleCount) / obj.exitVehicleCount *
100;
} else {
this.form.highwaySubDataList[index].entranceVehicleCountYoy = ''; this.form.highwaySubDataList[index].entranceVehicleCountYoy = '';
this.form.highwaySubDataList[index].exitVehicleCountYoy = ''; this.form.highwaySubDataList[index].exitVehicleCountYoy = '';
} }
} // }
}, },
// //
queryStation(type) { queryStation(type) {
@ -332,7 +411,8 @@
"exitVehicleCountYoy": '', "exitVehicleCountYoy": '',
"highwayId": "", "highwayId": "",
"highwayName": item.managementUnitName, "highwayName": item.managementUnitName,
"submitPersonnelContact": this.userInfo.realName+','+this.userInfo.mobile, "submitPersonnelContact": this.userInfo.realName + ',' + this
.userInfo.mobile,
"tollExemptAmount": 0.0, "tollExemptAmount": 0.0,
"tollExemptVehicleCount": 0, "tollExemptVehicleCount": 0,
"tollExemptVehicleCountMom": 0.0, "tollExemptVehicleCountMom": 0.0,
@ -346,10 +426,12 @@
this.form.highwaySubDataList = []; this.form.highwaySubDataList = [];
this.highwaySubDataList.map(item => { this.highwaySubDataList.map(item => {
let idx = arr.findIndex(item2 => { let idx = arr.findIndex(item2 => {
return item.highWayLineCode && item2.tollStationName == item.stationName; return item.highWayLineCode && item2.tollStationName == item
.stationName;
}); });
if (idx > -1) { if (idx > -1) {
item.isFinish = arr[idx].entranceVehicleCount != '' && arr[idx].exitVehicleCount != '' ? true : false; item.isFinish = arr[idx].entranceVehicleCount != '' && arr[idx]
.exitVehicleCount != '' ? true : false;
this.form.highwaySubDataList.push(arr[idx]); this.form.highwaySubDataList.push(arr[idx]);
} else { } else {
item.isFinish = false; item.isFinish = false;
@ -363,7 +445,8 @@
"exitVehicleCountYoy": '', "exitVehicleCountYoy": '',
"highwayId": "", "highwayId": "",
"highwayName": item.managementUnitName, "highwayName": item.managementUnitName,
"submitPersonnelContact": this.userInfo.realName+','+this.userInfo.mobile, "submitPersonnelContact": this.userInfo.realName + ',' + this
.userInfo.mobile,
"tollExemptAmount": 0.0, "tollExemptAmount": 0.0,
"tollExemptVehicleCount": 0, "tollExemptVehicleCount": 0,
"tollExemptVehicleCountMom": 0.0, "tollExemptVehicleCountMom": 0.0,
@ -387,14 +470,16 @@
}, },
// //
queryTime() { queryTime() {
this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date.parse( this.$request(getApp().globalData.baseUrl + '/api/dict/dictList?dictType=airport_time' + '&_t=' + Date
.parse(
new Date()), {}, 'GET').then(res => { new Date()), {}, 'GET').then(res => {
this.array = res.data; this.array = res.data;
if (this.pageType == 'add') { if (this.pageType == 'add') {
let now = new Date(); let now = new Date();
//11:00-13:30 0-12 //11:00-13:30 0-12
let dateStr = getDateStr(now, 0); let dateStr = getDateStr(now, 0);
if(new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() < new Date(dateStr + ' 13:30').getTime()) { if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() <
new Date(dateStr + ' 13:30').getTime()) {
this.form.statPeriod = '0012'; this.form.statPeriod = '0012';
let idx = this.array.findIndex(item => item.dictValue == '0012'); let idx = this.array.findIndex(item => item.dictValue == '0012');
this.index = idx > -1 ? idx : ''; this.index = idx > -1 ? idx : '';
@ -461,7 +546,8 @@
title: '提交中...', title: '提交中...',
mask: true mask: true
}) })
this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/saveOrUpdate', this.form, 'POST').then(res => { this.$request(getApp().globalData.baseUrl + '/api/biz/highwayParentDataController/saveOrUpdate', this.form,
'POST').then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ uni.showToast({
@ -474,8 +560,7 @@
url: '/pages/highway/runData/list' url: '/pages/highway/runData/list'
}) })
}, 300) }, 300)
} } else {
else {
uni.navigateBack(); uni.navigateBack();
} }
} }
@ -519,26 +604,31 @@
padding: 30rpx; padding: 30rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
border-radius: 30rpx; border-radius: 30rpx;
.line { .line {
height: 1px; height: 1px;
background-color: #dfdfdf; background-color: #dfdfdf;
margin: 30rpx 0; margin: 30rpx 0;
} }
.rate_item { .rate_item {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 24rpx; font-size: 24rpx;
font-family: PingFang SC-Regular, PingFang SC; font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
.rate_item_label { .rate_item_label {
color: #666; color: #666;
font-size: 24rpx; font-size: 24rpx;
} }
.rate_item_input { .rate_item_input {
color: #333; color: #333;
font-size: 28rpx; font-size: 28rpx;
} }
} }
&.danger { &.danger {
background-color: #FEF6F3; background-color: #FEF6F3;
border-color: #F0622D; border-color: #F0622D;
@ -553,8 +643,10 @@
font-weight: bold; font-weight: bold;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.form_item_remark { .form_item_remark {
margin-bottom: 30rpx; margin-bottom: 30rpx;
.form_item_label { .form_item_label {
color: #333333; color: #333333;
line-height: 42rpx; line-height: 42rpx;
@ -564,6 +656,7 @@
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
} }
.form_item { .form_item {
display: flex; display: flex;
align-items: center; align-items: center;
@ -612,10 +705,12 @@
font-family: PingFang SC-Regular, PingFang SC; font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
} }
// //
&.form_input { &.form_input {
/deep/ .is-input-border { /deep/ .is-input-border {
border: 0 !important; border: 0 !important;
.uni-easyinput__content-input { .uni-easyinput__content-input {
text-align: right; text-align: right;
} }
@ -633,6 +728,7 @@
text-align: center; text-align: center;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.station_box { .station_box {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -676,6 +772,7 @@
text-align: center; text-align: center;
} }
} }
&.choosed { &.choosed {
border-color: #2D8CF0 !important; border-color: #2D8CF0 !important;
} }

@ -61,14 +61,14 @@
</view> </view>
</view> </view>
<!-- 同比环比 --> <!-- 同比环比 -->
<view class="form_item_rate" v-if="form.inRailwayYomDo || form.inRailwayMomDo" <view class="form_item_rate"
:class="form.inboundRailwayDo == yoyMom.yesterdayData.inboundRailwayDo ? 'danger' : '' "> :class="form.inboundRailwayDo && form.inboundRailwayDo == yoyMom.yesterdayData.inboundRailwayDo ? 'danger' : '' ">
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label" <view class="rate_item_label"
:style="form.inboundRailwayDo == yoyMom.yesterdayData.inboundRailwayDo ? 'color: #EB4747' : ''"> :style="form.inboundRailwayDo && form.inboundRailwayDo == yoyMom.yesterdayData.inboundRailwayDo ? 'color: #EB4747' : ''">
终到车次环比(%)</view> 终到车次环比(%)</view>
<view class="rate_item_input" <view class="rate_item_input"
:style="form.inboundRailwayDo == yoyMom.yesterdayData.inboundRailwayDo ? 'color: #EB4747' : ''"> :style="form.inboundRailwayDo && form.inboundRailwayDo == yoyMom.yesterdayData.inboundRailwayDo ? 'color: #EB4747' : ''">
{{form.inRailwayYomDo ? form.inRailwayYomDo.toFixed(2) : ''}} {{form.inRailwayYomDo ? form.inRailwayYomDo.toFixed(2) : ''}}
</view> </view>
</view> </view>
@ -89,14 +89,14 @@
</view> </view>
</view> </view>
<!-- 同比环比 --> <!-- 同比环比 -->
<view class="form_item_rate" v-if="form.inPepoleYoyDo || form.inPepoleMomDo" <view class="form_item_rate"
:class="form.inPepole == yoyMom.yesterdayData.inPepole ? 'danger' : '' "> :class="form.inPepole && form.inPepole == yoyMom.yesterdayData.inPepole ? 'danger' : '' ">
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label" <view class="rate_item_label"
:style="form.inPepole == yoyMom.yesterdayData.inPepole ? 'color: #EB4747' : ''">人数环比(%) :style="form.inPepole && form.inPepole == yoyMom.yesterdayData.inPepole ? 'color: #EB4747' : ''">人数环比(%)
</view> </view>
<view class="rate_item_input" <view class="rate_item_input"
:style="form.inPepole == yoyMom.yesterdayData.inPepole ? 'color: #EB4747' : ''"> :style="form.inPepole && form.inPepole == yoyMom.yesterdayData.inPepole ? 'color: #EB4747' : ''">
{{form.inPepoleYoyDo ? form.inPepoleYoyDo.toFixed(2) : ''}} {{form.inPepoleYoyDo ? form.inPepoleYoyDo.toFixed(2) : ''}}
</view> </view>
</view> </view>
@ -140,14 +140,13 @@
</view> </view>
</view> </view>
<!-- 同比环比 --> <!-- 同比环比 -->
<view class="form_item_rate" v-if="form.outRailwayYomDo || form.outRailwayMomDo" <view class="form_item_rate" :class="form.outboundRailwayDo && form.outboundRailwayDo == yoyMom.yesterdayData.outboundRailwayDo ? 'danger' : '' ">
:class="form.outboundRailwayDo == yoyMom.yesterdayData.outboundRailwayDo ? 'danger' : '' ">
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label" <view class="rate_item_label"
:style="form.outboundRailwayDo == yoyMom.yesterdayData.outboundRailwayDo ? 'color: #EB4747' : ''"> :style="form.outboundRailwayDo && form.outboundRailwayDo == yoyMom.yesterdayData.outboundRailwayDo ? 'color: #EB4747' : ''">
始发车次环比(%)</view> 始发车次环比(%)</view>
<view class="rate_item_input" <view class="rate_item_input"
:style="form.outboundRailwayDo == yoyMom.yesterdayData.outboundRailwayDo ? 'color: #EB4747' : ''"> :style="form.outboundRailwayDo && form.outboundRailwayDo == yoyMom.yesterdayData.outboundRailwayDo ? 'color: #EB4747' : ''">
{{form.outRailwayYomDo ? form.outRailwayYomDo.toFixed(2) : ''}} {{form.outRailwayYomDo ? form.outRailwayYomDo.toFixed(2) : ''}}
</view> </view>
</view> </view>
@ -168,14 +167,13 @@
</view> </view>
</view> </view>
<!-- 同比环比 --> <!-- 同比环比 -->
<view class="form_item_rate" v-if="form.outPepoleYoyDo || form.outPepoleMomDo" <view class="form_item_rate" :class="form.outPepole && form.outPepole == yoyMom.yesterdayData.outPeople ? 'danger' : '' ">
:class="form.outPepole == yoyMom.yesterdayData.outPeople ? 'danger' : '' ">
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label" <view class="rate_item_label"
:style="form.outPepole == yoyMom.yesterdayData.outPeople ? 'color: #EB4747' : ''">人数环比(%) :style="form.outPepole && form.outPepole == yoyMom.yesterdayData.outPeople ? 'color: #EB4747' : ''">人数环比(%)
</view> </view>
<view class="rate_item_input" <view class="rate_item_input"
:style="form.outPepole == yoyMom.yesterdayData.outPeople ? 'color: #EB4747' : ''"> :style="form.outPepole && form.outPepole == yoyMom.yesterdayData.outPeople ? 'color: #EB4747' : ''">
{{form.outPepoleYoyDo ? form.outPepoleYoyDo.toFixed(2) : ''}} {{form.outPepoleYoyDo ? form.outPepoleYoyDo.toFixed(2) : ''}}
</view> </view>
</view> </view>
@ -214,22 +212,22 @@
return { return {
form: { form: {
"inMark": "", "inMark": "",
"inPepole": 0, "inPepole": '',
"inPepoleMomDo": 0.0, "inPepoleMomDo": '',
"inPepoleYoyDo": 0.0, "inPepoleYoyDo": '',
"inRailwayMomDo": 0.0, "inRailwayMomDo": '',
"inRailwayYomDo": 0.0, "inRailwayYomDo": '',
"inboundPassengersDo": 0, "inboundPassengersDo": '',
"inboundRailwayDo": 0, "inboundRailwayDo": '',
"isHoliday": "", "isHoliday": "",
"outMark": "", "outMark": "",
"outPepole": 0, "outPepole": '',
"outPepoleMomDo": 0.0, "outPepoleMomDo": '',
"outPepoleYoyDo": 0.0, "outPepoleYoyDo": '',
"outRailwayMomDo": 0.0, "outRailwayMomDo": '',
"outRailwayYomDo": 0.0, "outRailwayYomDo": '',
"outboundPassengersDo": 0, "outboundPassengersDo": '',
"outboundRailwayDo": 0, "outboundRailwayDo": '',
"railwayName": "", "railwayName": "",
"statDate": "", "statDate": "",
"statPeriod": "" "statPeriod": ""
@ -251,13 +249,11 @@
this.pageType = 'add'; this.pageType = 'add';
let now = new Date(); let now = new Date();
this.form.statDate = getDateStr(now, -1); // this.form.statDate = getDateStr(now, -1); //
this.queryYoyMom(); //
this.queryTime(); // this.queryTime(); //
} else if (options.id) { } else if (options.id) {
this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/find/' + options.id, {}, "GET").then( this.$request(getApp().globalData.baseUrl + '/api/biz/railwayRunData/find/' + options.id, {}, "GET").then(
res => { res => {
this.form = res.data; this.form = res.data;
this.queryYoyMom();
this.queryTime(); // this.queryTime(); //
}); });
} }
@ -281,32 +277,83 @@
console.log('同比环比计算') console.log('同比环比计算')
if (this.yoyMom.yesterdayData) { if (this.yoyMom.yesterdayData) {
// //
this.form.inRailwayYomDo = !checkNotEmpty(this.yoyMom.yesterdayData.inboundRailwayDo) ||this.yoyMom.yesterdayData.inboundRailwayDo === 0 ? 100 : this.form.inboundRailwayDo ? ( if (checkNotEmpty(this.form.inboundRailwayDo)) {
this.form.inRailwayYomDo = !checkNotEmpty(this.yoyMom.yesterdayData.inboundRailwayDo) || this
.yoyMom.yesterdayData.inboundRailwayDo === 0 ? 100 : (
parseInt(this.form.inboundRailwayDo) - this.yoyMom.yesterdayData.inboundRailwayDo) / this parseInt(this.form.inboundRailwayDo) - this.yoyMom.yesterdayData.inboundRailwayDo) / this
.yoyMom.yesterdayData.inboundRailwayDo * 100 : ''; .yoyMom.yesterdayData.inboundRailwayDo * 100;
this.form.inPepoleYoyDo = !checkNotEmpty(this.yoyMom.yesterdayData.inPepole) || this.yoyMom.yesterdayData.inPepole === 0 ? 100 : this.form.inPepole ? (parseInt(this }else{
.form.inPepole) - this.yoyMom.yesterdayData.inPepole) / this.yoyMom.yesterdayData.inPepole * this.form.inRailwayYomDo = '';
100 : ''; }
this.form.outRailwayYomDo = !checkNotEmpty(this.yoyMom.yesterdayData.outboundRailwayDo) || this.yoyMom.yesterdayData.outboundRailwayDo === 0 ? 100 : this.form if (this.form.inPepole) {
.outboundRailwayDo ? (parseInt(this.form.outboundRailwayDo) - this.yoyMom.yesterdayData this.form.inPepoleYoyDo = !checkNotEmpty(this.yoyMom.yesterdayData.inPepole) || this.yoyMom
.outboundRailwayDo) / this.yoyMom.yesterdayData.outboundRailwayDo * 100 : ''; .yesterdayData.inPepole === 0 ? 100 : (parseInt(this
this.form.outPepoleYoyDo = !checkNotEmpty(this.yoyMom.yesterdayData.outPepole) || this.yoyMom.yesterdayData.outPepole === 0 ? 100 : this.form.outPepole ? (parseInt(this .form.inPepole) - this.yoyMom.yesterdayData.inPepole) / this.yoyMom.yesterdayData
.form.outPepole) - this.yoyMom.yesterdayData.outPepole) / this.yoyMom.yesterdayData.outPepole * .inPepole *
100 : ''; 100;
}else{
this.form.inPepoleYoyDo = '';
}
if (checkNotEmpty(this.form.outboundRailwayDo)) {
this.form.outRailwayYomDo = !checkNotEmpty(this.yoyMom.yesterdayData.outboundRailwayDo) || this
.yoyMom.yesterdayData.outboundRailwayDo === 0 ? 100 : (parseInt(this.form.outboundRailwayDo) -
this.yoyMom.yesterdayData
.outboundRailwayDo) / this.yoyMom.yesterdayData.outboundRailwayDo * 100;
}else{
this.form.outRailwayYomDo = '';
}
if (checkNotEmpty(this.form.outPepole)) {
this.form.outPepoleYoyDo = !checkNotEmpty(this.yoyMom.yesterdayData.outPepole) || this.yoyMom
.yesterdayData.outPepole === 0 ? 100 : (parseInt(this
.form.outPepole) - this.yoyMom.yesterdayData.outPepole) / this.yoyMom.yesterdayData
.outPepole *
100;
}else{
this.form.outPepoleYoyDo = '';
}
} }
if (this.yoyMom.lastYearData) { if (this.yoyMom.lastYearData) {
// //
this.form.inRailwayMomDo = !checkNotEmpty(this.yoyMom.lastYearData.inboundRailwayDo) || this.yoyMom.lastYearData.inboundRailwayDo === 0 ? 100 : this.form.inboundRailwayDo ? ( if (checkNotEmpty(this.form.inboundRailwayDo)) {
parseInt(this.form.inboundRailwayDo) - this.yoyMom.lastYearData.inboundRailwayDo) / this.yoyMom this.form.inRailwayMomDo = !checkNotEmpty(this.yoyMom.lastYearData.inboundRailwayDo) || this.yoyMom
.lastYearData.inboundRailwayDo * 100 : ''; .lastYearData.inboundRailwayDo === 0 ? 100 : (
this.form.inPepoleMomDo = !checkNotEmpty(this.yoyMom.lastYearData.inPepole) || this.yoyMom.lastYearData.inPepole === 0 ? 100 : this.form.inPepole ? (parseInt(this.form parseInt(this.form.inboundRailwayDo) - this.yoyMom.lastYearData.inboundRailwayDo) / this
.inPepole) - this.yoyMom.lastYearData.inPepole) / this.yoyMom.lastYearData.inPepole * 100 : ''; .yoyMom
this.form.outRailwayMomDo = !checkNotEmpty(this.yoyMom.lastYearData.outboundRailwayDo) || this.yoyMom.lastYearData.outboundRailwayDo === 0 ? 100 : this.form.outboundRailwayDo ? .lastYearData.inboundRailwayDo * 100;
(parseInt(this.form.outboundRailwayDo) - this.yoyMom.lastYearData.outboundRailwayDo) / this.yoyMom }else{
.lastYearData.outboundRailwayDo * 100 : ''; this.form.inRailwayMomDo = '';
this.form.outPepoleMomDo = !checkNotEmpty(this.yoyMom.lastYearData.outPepole) || this.yoyMom.lastYearData.outPepole ===0 ? 100 : this.form.outPepole ? (parseInt(this }
.form.outPepole) - this.yoyMom.lastYearData.outPepole) / this.yoyMom.lastYearData.outPepole *
100 : ''; if (checkNotEmpty(this.form.inPepole)) {
this.form.inPepoleMomDo = !checkNotEmpty(this.yoyMom.lastYearData.inPepole) || this.yoyMom
.lastYearData
.inPepole === 0 ? 100 : (parseInt(this.form
.inPepole) - this.yoyMom.lastYearData.inPepole) / this.yoyMom.lastYearData.inPepole * 100;
}else{
this.form.inPepoleMomDo = '';
}
if (checkNotEmpty(this.form.outboundRailwayDo)) {
this.form.outRailwayMomDo = !checkNotEmpty(this.yoyMom.lastYearData.outboundRailwayDo) || this
.yoyMom
.lastYearData.outboundRailwayDo === 0 ? 100 :
(parseInt(this.form.outboundRailwayDo) - this.yoyMom.lastYearData.outboundRailwayDo) / this
.yoyMom
.lastYearData.outboundRailwayDo * 100;
}else{
this.form.outRailwayMomDo = '';
}
if (checkNotEmpty(this.form.outPepole)) {
this.form.outPepoleMomDo = !checkNotEmpty(this.yoyMom.lastYearData.outPepole) || this.yoyMom
.lastYearData.outPepole === 0 ? 100 : (parseInt(this
.form.outPepole) - this.yoyMom.lastYearData.outPepole) / this.yoyMom.lastYearData
.outPepole *
100;
}else{
this.form.outPepoleMomDo = '';
}
} }
}, },
// //
@ -351,17 +398,22 @@
let now = new Date(); let now = new Date();
//11:00-13:30 0-12 //11:00-13:30 0-12
let dateStr = getDateStr(now, 0); let dateStr = getDateStr(now, 0);
if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() < new Date(dateStr + if (new Date(dateStr + ' 11:00').getTime() < new Date().getTime() && new Date().getTime() <
new Date(dateStr +
' 13:30').getTime()) { ' 13:30').getTime()) {
this.form.statPeriod = '0012'; 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 : '';
} else { } else {
this.form.statPeriod = '03'; //0-24 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 : '';
} }
} else { } 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 : '';
} }
this.queryYoyMom(); //
}) })
}, },
// //
@ -439,8 +491,7 @@
url: '/pages/railway/railwayRunData/list' url: '/pages/railway/railwayRunData/list'
}) })
}, 300) }, 300)
} } else {
else {
uni.navigateBack(); uni.navigateBack();
} }
} }

@ -176,11 +176,19 @@
console.log('同比计算') console.log('同比计算')
if (this.yoyMom.lastYearData) { if (this.yoyMom.lastYearData) {
// //
this.form.passengerWatertransportMomDo = !checkNotEmpty(this.yoyMom.lastYearData.passengerWatertransportMomDo) || this.yoyMom.lastYearData.passengerWatertransportMomDo === 0 ? 100 : this.form.passengerWatertransportMomDo ? ( if(checkNotEmpty(this.form.outboundWatertransportDo)){
parseInt(this.form.passengerWatertransportMomDo) - this.yoyMom.lastYearData.passengerWatertransportMomDo) / this.yoyMom this.form.passengerWatertransportMomDo = !checkNotEmpty(this.yoyMom.lastYearData.outboundWatertransportDo) || this.yoyMom.lastYearData.outboundWatertransportDo === 0 ? 100 : (
.lastYearData.passengerWatertransportMomDo * 100 : ''; parseInt(this.form.outboundWatertransportDo) - this.yoyMom.lastYearData.outboundWatertransportDo) / this.yoyMom
this.form.voyageWatertransportMomDo = !checkNotEmpty(this.yoyMom.lastYearData.voyageWatertransportMomDo) || this.yoyMom.lastYearData.voyageWatertransportMomDo === 0 ? 100 : this.form.voyageWatertransportMomDo ? (parseInt(this.form .lastYearData.outboundWatertransportDo * 100;
.voyageWatertransportMomDo) - this.yoyMom.lastYearData.voyageWatertransportMomDo) / this.yoyMom.lastYearData.voyageWatertransportMomDo * 100 : ''; }else{
this.form.passengerWatertransportMomDo = '';
}
if(checkNotEmpty(this.form.inboundWatertransportDo)){
this.form.voyageWatertransportMomDo = !checkNotEmpty(this.yoyMom.lastYearData.inboundWatertransportDo) || this.yoyMom.lastYearData.inboundWatertransportDo === 0 ? 100 : (parseInt(this.form
.inboundWatertransportDo) - this.yoyMom.lastYearData.inboundWatertransportDo) / this.yoyMom.lastYearData.inboundWatertransportDo * 100;
}else{
this.form.voyageWatertransportMomDo = '';
}
} }
}, },
// //

@ -61,13 +61,13 @@
</view> </view>
</view> </view>
<!-- 同比环比 --> <!-- 同比环比 -->
<view class="form_item_rate" :class="item.voyage == item.yesterdayVoyage ? 'danger' : '' "> <view class="form_item_rate" :class="item.voyage && item.voyage == item.yesterdayVoyage ? 'danger' : '' ">
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label" <view class="rate_item_label"
:style="item.voyage == item.yesterdayVoyage ? 'color: #EB4747' : ''">航次环比(%) :style="item.voyage && item.voyage == item.yesterdayVoyage ? 'color: #EB4747' : ''">航次环比(%)
</view> </view>
<view class="rate_item_input" <view class="rate_item_input"
:style="item.voyage == item.yesterdayVoyage ? 'color: #EB4747' : ''"> :style="item.voyage && item.voyage == item.yesterdayVoyage ? 'color: #EB4747' : ''">
{{item.voyageRingRatio === 0 ? item.voyageRingRatio : item.voyageRingRatio ? item.voyageRingRatio.toFixed(2) : ''}} {{item.voyageRingRatio === 0 ? item.voyageRingRatio : item.voyageRingRatio ? item.voyageRingRatio.toFixed(2) : ''}}
</view> </view>
</view> </view>
@ -89,13 +89,13 @@
</view> </view>
<!-- 同比环比 --> <!-- 同比环比 -->
<view class="form_item_rate" <view class="form_item_rate"
:class="item.numberOfPeople == item.yesterdayNumberOfPeople ? 'danger' : '' "> :class="item.numberOfPeople && item.numberOfPeople == item.yesterdayNumberOfPeople ? 'danger' : '' ">
<view class="rate_item"> <view class="rate_item">
<view class="rate_item_label" <view class="rate_item_label"
:style="item.numberOfPeople == item.yesterdayNumberOfPeople ? 'color: #EB4747' : ''">人数环比(%) :style="item.numberOfPeople && item.numberOfPeople == item.yesterdayNumberOfPeople ? 'color: #EB4747' : ''">人数环比(%)
</view> </view>
<view class="rate_item_input" <view class="rate_item_input"
:style="item.numberOfPeople == item.yesterdayNumberOfPeople ? 'color: #EB4747' : ''"> :style="item.numberOfPeople && item.numberOfPeople == item.yesterdayNumberOfPeople ? 'color: #EB4747' : ''">
{{item.peopleRingRatio === 0 ? item.peopleRingRatio : item.peopleRingRatio ? item.peopleRingRatio.toFixed(2) : ''}} {{item.peopleRingRatio === 0 ? item.peopleRingRatio : item.peopleRingRatio ? item.peopleRingRatio.toFixed(2) : ''}}
</view> </view>
</view> </view>
@ -233,10 +233,10 @@
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].lastYearNumberOfPeople = checkNotEmpty(lastYearData.numberOfPeople) ? lastYearData.numberOfPeople : 0; this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].lastYearNumberOfPeople = checkNotEmpty(lastYearData.numberOfPeople) ? lastYearData.numberOfPeople : 0;
//- //-
let obj = this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index]; let obj = this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index];
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].voyageRingRatio = !checkNotEmpty(yesterdayData.voyage) || yesterdayData.voyage === 0 ? 100 : obj.voyage ? (parseInt(obj.voyage) - yesterdayData.voyage) / yesterdayData.voyage * 100 : ''; this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].voyageRingRatio = !checkNotEmpty(obj.voyage) ? '' : !checkNotEmpty(yesterdayData.voyage) || yesterdayData.voyage === 0 ? 100 : (parseInt(obj.voyage) - yesterdayData.voyage) / yesterdayData.voyage * 100 ;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].voyageYearOnYear = !checkNotEmpty(lastYearData.voyage) || lastYearData.voyage === 0 ? 100 : obj.voyage ? (parseInt(obj.voyage) - lastYearData.voyage) / lastYearData.voyage * 100 : ''; this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].voyageYearOnYear = !checkNotEmpty(obj.voyage) ? '' : !checkNotEmpty(lastYearData.voyage) || lastYearData.voyage === 0 ? 100 : (parseInt(obj.voyage) - lastYearData.voyage) / lastYearData.voyage * 100;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].peopleRingRatio = !checkNotEmpty(yesterdayData.numberOfPeople) || yesterdayData.numberOfPeople === 0 ? 100 : obj.numberOfPeople ? (parseInt(obj.numberOfPeople) - yesterdayData.numberOfPeople) / yesterdayData.numberOfPeople * 100 : ''; this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].peopleRingRatio = !checkNotEmpty(obj.numberOfPeople) ? '' : !checkNotEmpty(yesterdayData.numberOfPeople) || yesterdayData.numberOfPeople === 0 ? 100 : (parseInt(obj.numberOfPeople) - yesterdayData.numberOfPeople) / yesterdayData.numberOfPeople * 100;
this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].peopleYearOnYear = !checkNotEmpty(lastYearData.numberOfPeople) || lastYearData.numberOfPeople === 0 ? 100 : obj.numberOfPeople ? (parseInt(obj.numberOfPeople) - lastYearData.numberOfPeople) / lastYearData.numberOfPeople * 100 : ''; this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index].peopleYearOnYear = !checkNotEmpty(obj.numberOfPeople) ? '' : !checkNotEmpty(lastYearData.numberOfPeople) || lastYearData.numberOfPeople === 0 ? 100 : (parseInt(obj.numberOfPeople) - lastYearData.numberOfPeople) / lastYearData.numberOfPeople * 100;
console.log('环比同比', this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index]) console.log('环比同比', this.form.bizWaterwayIslandDataSaveOrUpdateDTOList[index])
}) })
}, },

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Loading…
Cancel
Save