|
@@ -39,6 +39,7 @@
|
|
|
<u-button type="primary" @click="submit" style="margin-top: 20vh;">提交</u-button>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <u-modal v-model="modalShow" :content="modalContent" @confirm="modalConfirm" :show-cancel-button="true"></u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -80,7 +81,10 @@
|
|
|
placeStatus:[],
|
|
|
buttonStyle:{
|
|
|
padding:'0 50px'
|
|
|
- }
|
|
|
+ },
|
|
|
+ modalShow:false,
|
|
|
+ modalContent:'',
|
|
|
+ command:'',
|
|
|
}
|
|
|
},
|
|
|
onLoad(page){
|
|
@@ -211,8 +215,8 @@
|
|
|
this.mescroll.endErr();
|
|
|
})
|
|
|
},
|
|
|
- controlDevice(command){
|
|
|
- this.$u.api.controlDevice({roadwayNo:this.roadNo,command:command}).then(res=>{
|
|
|
+ modalConfirm(){
|
|
|
+ this.$u.api.controlDevice({roadwayNo:this.roadNo,command:this.command}).then(res=>{
|
|
|
uni.showToast({
|
|
|
icon:'none',
|
|
|
title:res.msg
|
|
@@ -222,6 +226,15 @@
|
|
|
//联网失败, 结束加载
|
|
|
this.mescroll.endErr();
|
|
|
})
|
|
|
+ },
|
|
|
+ controlDevice(command){
|
|
|
+ if(command==0){
|
|
|
+ this.modalContent = '是否对此车道进行关闸操作?'
|
|
|
+ }else if(command==1){
|
|
|
+ this.modalContent = '是否对此车道进行开闸操作?'
|
|
|
+ }
|
|
|
+ this.command = command;
|
|
|
+ this.modalShow = true;
|
|
|
}
|
|
|
}
|
|
|
}
|