|
|
|
|
@ -39,10 +39,14 @@ |
|
|
|
|
</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_label" :style="form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''">收费站入口车辆数汇总环比(%)</view> |
|
|
|
|
<view class="rate_item_input" :style="form.entranceVehicleCount == yoyMom.minusDaysEntranceVehicleSum ?'color: #EB4747':''"> |
|
|
|
|
<view class="rate_item_label" |
|
|
|
|
: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) : ''}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
@ -61,10 +65,14 @@ |
|
|
|
|
</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_label" :style="form.exitVehicleCount == yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''">收费站入口车辆数汇总环比(%)</view> |
|
|
|
|
<view class="rate_item_input" :style="form.exitVehicleCount == yoyMom.minusDaysExitVehicleSum ?'color: #EB4747':''"> |
|
|
|
|
<view class="rate_item_label" |
|
|
|
|
: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) : ''}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
@ -79,19 +87,30 @@ |
|
|
|
|
</view> |
|
|
|
|
<!-- 用户权限收费站 --> |
|
|
|
|
<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='item.isFinish' class="tag"><uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons></view> |
|
|
|
|
<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='item.isFinish' class="tag"> |
|
|
|
|
<uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons> |
|
|
|
|
</view> |
|
|
|
|
{{item.stationName}} |
|
|
|
|
</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='item.isFinish' class="tag"><uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons></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='item.isFinish' class="tag"> |
|
|
|
|
<uni-icons type="checkmarkempty" color="#fff" size="12"></uni-icons> |
|
|
|
|
</view> |
|
|
|
|
{{item.stationName}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<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> |
|
|
|
|
{{showStaion?'收起':'展开'}}</view> |
|
|
|
|
{{showStaion?'收起':'展开'}} |
|
|
|
|
</view> |
|
|
|
|
<view class="form_item_box"> |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">收费站名称:</view> |
|
|
|
|
@ -104,63 +123,82 @@ |
|
|
|
|
<view class="form_item"> |
|
|
|
|
<view class="form_item_label">收费站入口车辆数:</view> |
|
|
|
|
<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 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_label" :style="form.highwaySubDataList[stationIndex].entranceVehicleCountMom == 0 ? 'color: #EB4747' : ''">收费站入口车辆数环比(%)</view> |
|
|
|
|
<view class="rate_item_input" :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 class="rate_item_label" |
|
|
|
|
:style="form.highwaySubDataList[stationIndex].entranceVehicleCountMom === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
收费站入口车辆数环比(%)</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 class="line"></view> |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label">收费站入口车辆数同比(%)</view> |
|
|
|
|
<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 class="form_item"> |
|
|
|
|
<view class="form_item_label">收费站出口车辆数:</view> |
|
|
|
|
<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 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_label" :style="form.highwaySubDataList[stationIndex].exitVehicleCountMom == 0 ? 'color: #EB4747' : ''">收费站出口车辆数环比(%)</view> |
|
|
|
|
<view class="rate_item_input" :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 class="rate_item_label" |
|
|
|
|
:style="form.highwaySubDataList[stationIndex].exitVehicleCountMom === 0 ? 'color: #EB4747' : ''"> |
|
|
|
|
收费站出口车辆数环比(%)</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 class="line"></view> |
|
|
|
|
<view class="rate_item"> |
|
|
|
|
<view class="rate_item_label">收费站出口车辆数同比(%)</view> |
|
|
|
|
<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 class="form_item"> |
|
|
|
|
<view class="form_item_label">免收通行费车辆数:</view> |
|
|
|
|
<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 class="form_item"> |
|
|
|
|
<view class="form_item_label">免收通行费金额:</view> |
|
|
|
|
<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 class="form_item"> |
|
|
|
|
<view class="form_item_label">报送人员及联系方式:</view> |
|
|
|
|
<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" |
|
|
|
|
: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> |
|
|
|
|
@ -170,7 +208,9 @@ |
|
|
|
|
<view class="form_item_remark"> |
|
|
|
|
<view class="form_item_label">备注:</view> |
|
|
|
|
<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> |
|
|
|
|
@ -182,7 +222,10 @@ |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { checkNotEmpty, getDateStr } from "../../../common/util.js" |
|
|
|
|
import { |
|
|
|
|
checkNotEmpty, |
|
|
|
|
getDateStr |
|
|
|
|
} from "../../../common/util.js" |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
@ -198,14 +241,14 @@ |
|
|
|
|
exitVehicleCountYoy: '', |
|
|
|
|
highwaySubDataList: [], |
|
|
|
|
}, //登录form |
|
|
|
|
highwaySubDataList: [],//收费站列表 |
|
|
|
|
stationIndex: 0,//收费站选中索引 |
|
|
|
|
submitPerson: [],//报送人 |
|
|
|
|
highwaySubDataList: [], //收费站列表 |
|
|
|
|
stationIndex: 0, //收费站选中索引 |
|
|
|
|
submitPerson: [], //报送人 |
|
|
|
|
array: [], //时段选择列表 |
|
|
|
|
index: 2, //时段选择,默认0-24 |
|
|
|
|
userInfo: {}, |
|
|
|
|
yoyMom: {},//同比环比 |
|
|
|
|
showStaion: false,//展开收起 |
|
|
|
|
yoyMom: {}, //同比环比 |
|
|
|
|
showStaion: false, //展开收起 |
|
|
|
|
pageType: '', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
@ -215,10 +258,11 @@ |
|
|
|
|
this.form.organizationName = this.userInfo.organizationName ? this.userInfo.organizationName : ''; |
|
|
|
|
this.pageType = 'add'; |
|
|
|
|
let now = new Date(); |
|
|
|
|
this.form.statDate = getDateStr(now, -1);//默认前一天 |
|
|
|
|
this.form.statDate = getDateStr(now, -1); //默认前一天 |
|
|
|
|
this.queryStation('add'); |
|
|
|
|
this.queryTime();//统计时段 |
|
|
|
|
} if(options.id) { |
|
|
|
|
this.queryTime(); //统计时段 |
|
|
|
|
} |
|
|
|
|
if (options.id) { |
|
|
|
|
this.queryDetailInfo(options.id); |
|
|
|
|
} |
|
|
|
|
this.queryPerson(); |
|
|
|
|
@ -226,7 +270,8 @@ |
|
|
|
|
methods: { |
|
|
|
|
//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.queryTime(); |
|
|
|
|
this.queryStation(); |
|
|
|
|
@ -234,11 +279,14 @@ |
|
|
|
|
}, |
|
|
|
|
//同比环比查询 |
|
|
|
|
queryYoYMom() { |
|
|
|
|
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 => { |
|
|
|
|
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.yoyMom = res.data; |
|
|
|
|
//如果重新更改填报日期,重新计算同比环比 |
|
|
|
|
if(this.highwaySubDataList.length > 0 && this.form.highwaySubDataList.length > 0){ |
|
|
|
|
if (this.highwaySubDataList.length > 0 && this.form.highwaySubDataList.length > 0) { |
|
|
|
|
this.highwaySubDataList.map((item, index) => { |
|
|
|
|
this.checkStationInfo(index); |
|
|
|
|
}) |
|
|
|
|
@ -248,7 +296,8 @@ |
|
|
|
|
}, |
|
|
|
|
//报送人 |
|
|
|
|
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 = []; |
|
|
|
|
res.data.list.map(item => { |
|
|
|
|
arr.push(item.name); |
|
|
|
|
@ -261,65 +310,95 @@ |
|
|
|
|
}, |
|
|
|
|
//切换当前编辑收费站索引 |
|
|
|
|
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; |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.highwaySubDataList[this.stationIndex].isFinish = false; |
|
|
|
|
} |
|
|
|
|
this.stationIndex = 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 => { |
|
|
|
|
entranceVehicleCount = entranceVehicleCount + (item.entranceVehicleCount ? parseInt(item.entranceVehicleCount) : 0); |
|
|
|
|
exitVehicleCount = exitVehicleCount + (item.exitVehicleCount ? parseInt(item.exitVehicleCount) : 0); |
|
|
|
|
entranceVehicleCount = entranceVehicleCount + (item.entranceVehicleCount ? parseInt(item |
|
|
|
|
.entranceVehicleCount) : 0); |
|
|
|
|
exitVehicleCount = exitVehicleCount + (item.exitVehicleCount ? parseInt(item |
|
|
|
|
.exitVehicleCount) : 0); |
|
|
|
|
}) |
|
|
|
|
this.form.entranceVehicleCount = entranceVehicleCount; |
|
|
|
|
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.entranceVehicleCountYoy = this.form.entranceVehicleCount && this.yoyMom.minusYearsEntranceVehicleSum ? (parseInt(this.form.entranceVehicleCount) - this.yoyMom.minusYearsEntranceVehicleSum ) / this.yoyMom.minusYearsEntranceVehicleSum * 100 : '';//同比 |
|
|
|
|
this.form.entranceVehicleCountMom = this.form.entranceVehicleCount && this.yoyMom |
|
|
|
|
.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.exitVehicleCountYoy = this.form.exitVehicleCount && this.yoyMom.minusYearsExitVehicleSum ? (parseInt(this.form.exitVehicleCount) - this.yoyMom.minusYearsExitVehicleSum) / this.yoyMom.minusYearsExitVehicleSum * 100 : '';//同比 |
|
|
|
|
this.form.exitVehicleCountMom = this.form.exitVehicleCount && this.yoyMom.minusDaysExitVehicleSum ? ( |
|
|
|
|
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 != ''){ |
|
|
|
|
let idx = this.yoyMom.minusDaysList.findIndex(item => {return item.tollStationName == 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(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 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) { |
|
|
|
|
//环比 |
|
|
|
|
let obj = this.yoyMom.minusDaysList[idx]; |
|
|
|
|
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].exitVehicleCountMom = !checkNotEmpty(obj.exitVehicleCount) || obj.exitVehicleCount === 0 ? 100 : obj.exitVehicleCount ? (parseInt(this.form.highwaySubDataList[index].exitVehicleCount) - obj.exitVehicleCount) / obj.exitVehicleCount * 100 : ''; |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
this.form.highwaySubDataList[index].entranceVehicleCountMom = !checkNotEmpty(this.form |
|
|
|
|
.highwaySubDataList[index].entranceVehicleCount) ? '' : !checkNotEmpty(obj |
|
|
|
|
.entranceVehicleCount) || obj.entranceVehicleCount === 0 ? 100 : (parseInt(this.form |
|
|
|
|
.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].exitVehicleCountMom = ''; |
|
|
|
|
} |
|
|
|
|
if(idx2 > -1){ |
|
|
|
|
if (idx2 > -1) { |
|
|
|
|
//同比 |
|
|
|
|
let obj = this.yoyMom.minusYearsList[idx2]; |
|
|
|
|
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].exitVehicleCountYoy = !checkNotEmpty(obj.exitVehicleCount) || obj.exitVehicleCount === 0 ? 100 : obj.exitVehicleCount ? (parseInt(this.form.highwaySubDataList[index].exitVehicleCount) - obj.exitVehicleCount) / obj.exitVehicleCount * 100 : ''; |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
this.form.highwaySubDataList[index].entranceVehicleCountYoy = !checkNotEmpty(this.form |
|
|
|
|
.highwaySubDataList[index].entranceVehicleCount) ? '' : !checkNotEmpty(obj |
|
|
|
|
.entranceVehicleCount) || obj.entranceVehicleCount === 0 ? 100 : (parseInt(this.form |
|
|
|
|
.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].exitVehicleCountYoy = ''; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
//收费站列表 |
|
|
|
|
queryStation(type) { |
|
|
|
|
this.$request(getApp().globalData.baseUrl + '/api/biz/HighSpeedPermissionsInfo/findList?_t=' + Date.parse( |
|
|
|
|
new Date()), {}, 'GET').then(res => { |
|
|
|
|
this.highwaySubDataList = res.data; |
|
|
|
|
if(type == 'add') { |
|
|
|
|
if (type == 'add') { |
|
|
|
|
this.highwaySubDataList.map(item => { |
|
|
|
|
item.isFinish = false; |
|
|
|
|
this.form.highwaySubDataList.push({ |
|
|
|
|
@ -332,7 +411,8 @@ |
|
|
|
|
"exitVehicleCountYoy": '', |
|
|
|
|
"highwayId": "", |
|
|
|
|
"highwayName": item.managementUnitName, |
|
|
|
|
"submitPersonnelContact": this.userInfo.realName+','+this.userInfo.mobile, |
|
|
|
|
"submitPersonnelContact": this.userInfo.realName + ',' + this |
|
|
|
|
.userInfo.mobile, |
|
|
|
|
"tollExemptAmount": 0.0, |
|
|
|
|
"tollExemptVehicleCount": 0, |
|
|
|
|
"tollExemptVehicleCountMom": 0.0, |
|
|
|
|
@ -341,17 +421,19 @@ |
|
|
|
|
"remark": '', |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
let arr = JSON.parse(JSON.stringify(this.form.highwaySubDataList)); |
|
|
|
|
this.form.highwaySubDataList = []; |
|
|
|
|
this.highwaySubDataList.map(item => { |
|
|
|
|
let idx = arr.findIndex(item2 => { |
|
|
|
|
return item.highWayLineCode && item2.tollStationName == item.stationName; |
|
|
|
|
return item.highWayLineCode && item2.tollStationName == item |
|
|
|
|
.stationName; |
|
|
|
|
}); |
|
|
|
|
if(idx > -1){ |
|
|
|
|
item.isFinish = arr[idx].entranceVehicleCount != '' && arr[idx].exitVehicleCount != '' ? true : false; |
|
|
|
|
if (idx > -1) { |
|
|
|
|
item.isFinish = arr[idx].entranceVehicleCount != '' && arr[idx] |
|
|
|
|
.exitVehicleCount != '' ? true : false; |
|
|
|
|
this.form.highwaySubDataList.push(arr[idx]); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
item.isFinish = false; |
|
|
|
|
this.form.highwaySubDataList.push({ |
|
|
|
|
"entranceVehicleCount": '', |
|
|
|
|
@ -363,7 +445,8 @@ |
|
|
|
|
"exitVehicleCountYoy": '', |
|
|
|
|
"highwayId": "", |
|
|
|
|
"highwayName": item.managementUnitName, |
|
|
|
|
"submitPersonnelContact": this.userInfo.realName+','+this.userInfo.mobile, |
|
|
|
|
"submitPersonnelContact": this.userInfo.realName + ',' + this |
|
|
|
|
.userInfo.mobile, |
|
|
|
|
"tollExemptAmount": 0.0, |
|
|
|
|
"tollExemptVehicleCount": 0, |
|
|
|
|
"tollExemptVehicleCountMom": 0.0, |
|
|
|
|
@ -387,23 +470,25 @@ |
|
|
|
|
}, |
|
|
|
|
//时段 |
|
|
|
|
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 => { |
|
|
|
|
this.array = res.data; |
|
|
|
|
if(this.pageType == 'add') { |
|
|
|
|
if (this.pageType == 'add') { |
|
|
|
|
let now = new Date(); |
|
|
|
|
//11:00-13:30 默认选择0-12 |
|
|
|
|
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'; |
|
|
|
|
let idx = this.array.findIndex(item => item.dictValue == '0012'); |
|
|
|
|
this.index = idx > -1 ? idx : ''; |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
this.form.statPeriod = '03'; //默认0-24 |
|
|
|
|
let idx = this.array.findIndex(item => item.dictValue == '03'); |
|
|
|
|
this.index = idx > -1 ? idx : ''; |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
let idx = this.array.findIndex(item => item.dictValue == this.form.statPeriod); |
|
|
|
|
this.index = idx > -1 ? idx : ''; |
|
|
|
|
} |
|
|
|
|
@ -461,21 +546,21 @@ |
|
|
|
|
title: '提交中...', |
|
|
|
|
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(); |
|
|
|
|
if (res.code == 200) { |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '报送提交成功', |
|
|
|
|
icon: 'none', |
|
|
|
|
success: () => { |
|
|
|
|
if(this.form.id == undefined) { |
|
|
|
|
if (this.form.id == undefined) { |
|
|
|
|
setTimeout(() => { |
|
|
|
|
uni.redirectTo({ |
|
|
|
|
url: '/pages/highway/runData/list' |
|
|
|
|
}) |
|
|
|
|
}, 300) |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
} else { |
|
|
|
|
uni.navigateBack(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -513,33 +598,38 @@ |
|
|
|
|
border-radius: 30rpx; |
|
|
|
|
|
|
|
|
|
//环比同比 |
|
|
|
|
.form_item_rate{ |
|
|
|
|
.form_item_rate { |
|
|
|
|
background: #F6F6F6; |
|
|
|
|
border: 1px solid #F6F6F6; |
|
|
|
|
padding: 30rpx; |
|
|
|
|
margin-bottom: 30rpx; |
|
|
|
|
border-radius: 30rpx; |
|
|
|
|
.line{ |
|
|
|
|
|
|
|
|
|
.line { |
|
|
|
|
height: 1px; |
|
|
|
|
background-color: #dfdfdf; |
|
|
|
|
margin: 30rpx 0; |
|
|
|
|
} |
|
|
|
|
.rate_item{ |
|
|
|
|
|
|
|
|
|
.rate_item { |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: space-between; |
|
|
|
|
font-size: 24rpx; |
|
|
|
|
font-family: PingFang SC-Regular, PingFang SC; |
|
|
|
|
font-weight: 400; |
|
|
|
|
.rate_item_label{ |
|
|
|
|
|
|
|
|
|
.rate_item_label { |
|
|
|
|
color: #666; |
|
|
|
|
font-size: 24rpx; |
|
|
|
|
} |
|
|
|
|
.rate_item_input{ |
|
|
|
|
|
|
|
|
|
.rate_item_input { |
|
|
|
|
color: #333; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
&.danger{ |
|
|
|
|
|
|
|
|
|
&.danger { |
|
|
|
|
background-color: #FEF6F3; |
|
|
|
|
border-color: #F0622D; |
|
|
|
|
} |
|
|
|
|
@ -553,9 +643,11 @@ |
|
|
|
|
font-weight: bold; |
|
|
|
|
margin-bottom: 30rpx; |
|
|
|
|
} |
|
|
|
|
.form_item_remark{ |
|
|
|
|
|
|
|
|
|
.form_item_remark { |
|
|
|
|
margin-bottom: 30rpx; |
|
|
|
|
.form_item_label{ |
|
|
|
|
|
|
|
|
|
.form_item_label { |
|
|
|
|
color: #333333; |
|
|
|
|
line-height: 42rpx; |
|
|
|
|
font-size: 30rpx; |
|
|
|
|
@ -564,6 +656,7 @@ |
|
|
|
|
margin-bottom: 30rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.form_item { |
|
|
|
|
display: flex; |
|
|
|
|
align-items: center; |
|
|
|
|
@ -605,18 +698,20 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//纯展示 |
|
|
|
|
&.text{ |
|
|
|
|
&.text { |
|
|
|
|
color: #333333; |
|
|
|
|
line-height: 40rpx; |
|
|
|
|
font-size: 28rpx; |
|
|
|
|
font-family: PingFang SC-Regular, PingFang SC; |
|
|
|
|
font-weight: 400; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//输入框 |
|
|
|
|
&.form_input{ |
|
|
|
|
/deep/ .is-input-border{ |
|
|
|
|
&.form_input { |
|
|
|
|
/deep/ .is-input-border { |
|
|
|
|
border: 0 !important; |
|
|
|
|
.uni-easyinput__content-input{ |
|
|
|
|
|
|
|
|
|
.uni-easyinput__content-input { |
|
|
|
|
text-align: right; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -627,12 +722,13 @@ |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//收费站 |
|
|
|
|
.station_act{ |
|
|
|
|
.station_act { |
|
|
|
|
color: #2D8CF0; |
|
|
|
|
font-size: 24rpx; |
|
|
|
|
text-align: center; |
|
|
|
|
margin-bottom: 30rpx; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.station_box { |
|
|
|
|
display: flex; |
|
|
|
|
flex-wrap: wrap; |
|
|
|
|
@ -676,7 +772,8 @@ |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
&.choosed{ |
|
|
|
|
|
|
|
|
|
&.choosed { |
|
|
|
|
border-color: #2D8CF0 !important; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|