|
@@ -10,7 +10,7 @@
|
|
<u-empty class="u-m-t-80" text="暂无车位" mode="data" v-if="roadspaceList.length == 0"></u-empty>
|
|
<u-empty class="u-m-t-80" text="暂无车位" mode="data" v-if="roadspaceList.length == 0"></u-empty>
|
|
<view class="search"><u-search placeholder="请输入车位名称" v-model="roadspaceList.spaceName" shape="round" @search="spaceSearch()" @custom="spaceSearch()"></u-search></view>
|
|
<view class="search"><u-search placeholder="请输入车位名称" v-model="roadspaceList.spaceName" shape="round" @search="spaceSearch()" @custom="spaceSearch()"></u-search></view>
|
|
<view class="roadspace-list wrap">
|
|
<view class="roadspace-list wrap">
|
|
- <view class="roadspace-list-item" @click="roadspaceClick(item)" ontouchstart="gtouchstart()" v-for="(item,index) in roadspaceList" :key="index + item.id">
|
|
|
|
|
|
+ <view class="roadspace-list-item" @click="roadspaceClick(item)" @longpress="longopenPage(item)" v-for="(item,index) in roadspaceList" :key="index + item.id">
|
|
<view class="block" :class="{flashing: (item.deviceStatus ==1||item.deviceStatus ==5)||(item.placeStatus==1&&(item.vehicleNo==''))}">
|
|
<view class="block" :class="{flashing: (item.deviceStatus ==1||item.deviceStatus ==5)||(item.placeStatus==1&&(item.vehicleNo==''))}">
|
|
<view class="block-top" v-if="item.placeStatus==1&&(item.vehicleNo=='')"></view>
|
|
<view class="block-top" v-if="item.placeStatus==1&&(item.vehicleNo=='')"></view>
|
|
<view class="block-bottom" v-if="item.placeStatus==1&&(item.vehicleNo=='')">
|
|
<view class="block-bottom" v-if="item.placeStatus==1&&(item.vehicleNo=='')">
|
|
@@ -67,7 +67,8 @@
|
|
carImg:'',
|
|
carImg:'',
|
|
pages:'',
|
|
pages:'',
|
|
vehicleImage:null,
|
|
vehicleImage:null,
|
|
- placeStatus:''
|
|
|
|
|
|
+ placeStatus:'',
|
|
|
|
+ timeOutEvent: '0'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -82,16 +83,23 @@
|
|
}, 1000);
|
|
}, 1000);
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
- gtouchstart(){
|
|
|
|
- timeOutEvent = setTimeout("this.longPress()",500);//这里设置定时器,定义长按500毫秒触发长按事件,时间可以自己改,个人感觉500毫秒非常合适
|
|
|
|
- return false;
|
|
|
|
- },
|
|
|
|
- //真正长按后应该执行的内容
|
|
|
|
- longPress(){
|
|
|
|
- timeOutEvent = 0;
|
|
|
|
- //执行长按要执行的内容,如弹出菜单
|
|
|
|
- // alert("长按事件触发发");
|
|
|
|
- this.openPage('pages/getin/getin');
|
|
|
|
|
|
+ longopenPage(item){
|
|
|
|
+ this.spaceId = item.id;
|
|
|
|
+ this.spaceName = item.spaceName;
|
|
|
|
+ this.inTime = item.inTime;
|
|
|
|
+ this.placeStatus=item.placeStatus;
|
|
|
|
+ this.currentVehicleNo=item.vehicleNo;
|
|
|
|
+ this.$u.route({
|
|
|
|
+ url: 'pages/getin/getin',
|
|
|
|
+ params:{
|
|
|
|
+ spaceId: this.spaceId,
|
|
|
|
+ spaceName:this.spaceName,
|
|
|
|
+ roadNo:this.roadNo,
|
|
|
|
+ inTime:this.inTime,
|
|
|
|
+ placeStatus:this.placeStatus,
|
|
|
|
+ currentVehicleNo:this.currentVehicleNo
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// uni_pagination_change(e){
|
|
// uni_pagination_change(e){
|
|
|
|
|