|
@@ -23,6 +23,7 @@
|
|
|
<view class="li-con" v-for="(item,index) in devs">
|
|
|
<view class="dev-tit">
|
|
|
<text>{{item.channel_name}}</text>
|
|
|
+ <u-button type="primary" :custom-style="{height:'60rpx'}" :plain="true" @tap="manualPass(item.id,item.channel_name)">手动放行</u-button>
|
|
|
<view class="dev-view"><text>查看</text><u-icon name="arrow-right"></u-icon></view>
|
|
|
</view>
|
|
|
<view class="dev-stat">
|
|
@@ -33,9 +34,9 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <u-button type="primary" style="margin:50rpx 50rpx;" @tap="manualPass">出口抬杆放行</u-button>
|
|
|
+ <!-- <u-button type="primary" style="margin:50rpx 50rpx;" @tap="manualPass">出口抬杆放行</u-button> -->
|
|
|
|
|
|
- <u-modal v-model="showModal" title="放行说明" :show-cancel-button="true" @confirm="exePass">
|
|
|
+ <u-modal v-model="showModal" :title="modalTitle" :show-cancel-button="true" @confirm="exePass">
|
|
|
<view class="slot-content">
|
|
|
<u-field v-model="passNote" label="" placeholder="请填写放行说明" type="textarea" label-width="0" :auto-height="false" :field-style="{height:'140rpx'}"/>
|
|
|
</view>
|
|
@@ -51,8 +52,10 @@
|
|
|
data() {
|
|
|
return {
|
|
|
showModal:false,
|
|
|
+ modalTitle:'放行说明',
|
|
|
passNote:'',
|
|
|
opening:false,
|
|
|
+ openingChannel:'',
|
|
|
parkingSite:{},
|
|
|
chargeRule:{},
|
|
|
othChargeRule:[],
|
|
@@ -63,7 +66,7 @@
|
|
|
this.loadPageData(opt.park_id);
|
|
|
},
|
|
|
methods: {
|
|
|
- manualPass(){
|
|
|
+ manualPass(channelId,channelName){
|
|
|
if(this.opening){
|
|
|
uni.showToast({
|
|
|
title:'开门中,勿重复操作',
|
|
@@ -71,13 +74,15 @@
|
|
|
})
|
|
|
return;
|
|
|
}
|
|
|
+ this.modalTitle=channelName+"放行";
|
|
|
this.showModal=true;
|
|
|
+ this.openingChannel=channelId;
|
|
|
},
|
|
|
exePass(){
|
|
|
|
|
|
- if(!this.parkingSite||!this.parkingSite.id){
|
|
|
+ if(!this.openingChannel){
|
|
|
uni.showToast({
|
|
|
- title:'未知停车场',
|
|
|
+ title:'未选择要开启设备',
|
|
|
icon:'none'
|
|
|
})
|
|
|
|
|
@@ -86,7 +91,7 @@
|
|
|
uni.showLoading({
|
|
|
title:'开门中...'
|
|
|
});
|
|
|
- api.manualPass(this.parkingSite.id,this.passNote).then(resp => {
|
|
|
+ api.manualPass(this.openingChannel,this.passNote).then(resp => {
|
|
|
this.opening=false;
|
|
|
uni.hideLoading();
|
|
|
if(!resp.success){
|