index.wxml 3.58 KB
<wxs module="jstools" src="includes.wxs"></wxs>
<view class="map-box">
    <map id="myMap" latitude="{{latitude}}" longitude="{{longitude}}" bindmarkertap="markertap" bindcallouttap="callouttap" bindlabeltap="labeltap" markers="{{markers}}" scale="{{scale}}">
        <cover-view style="bottom:{{drawerHeight == 456?20:400}}rpx" class="cover-view" bindtap="controltap">
            <cover-image class="station" src="https://img01.glsx.com.cn/weapp/resource/miniprogram/wuye/home/parking/position.png"></cover-image>
        </cover-view>
    </map>
    <view class="draw-box" style="height: {{drawerHeight}}rpx;">

        <block wx:if="{{isEmpty}}">
            <view class="draw-header" catch:touchstart="touchStart" catch:touchmove="touchMove" catch:touchend="touchEnd">
                <view class="parking-arrow-icon" catch:tap="pullH">

                </view>
                <view class="parking-logo">
                    <glsx-image webp src="home/parking/stop.png" class="parking-logo"></glsx-image>
                </view>
                <view class="parking-desc">当前剩余空闲车位: <text>{{parking.idleStatusCount}}</text></view>
            </view>
            <view class="draw-tab">
                <view class="tab-item {{tabIndex === item.value?'checked':''}}" data-index="{{item.value}}" catch:tap="selectTab" wx:for="{{STATUS}}">{{item.label}}({{parking[item.name]}})</view>
                <view class="tab-btn" bindtap="handleRefresh">刷新<view class="parking-refresh {{isRotate?'rotate':''}}">
                        <glsx-image webp src="home/parking/refresh.png"></glsx-image>
                    </view>
                </view>
            </view>
            <view class="draw-body">
                <block wx:if="{{carList.length}}">
                    <view class="car-item" wx:for="{{carList}}" wx:key="index">
                        <view class="parking-logo">
                            <glsx-image webp src="home/parking/{{item.parkingStatus == 1?'idle':item.parkingStatus == 2?'occupy':'unknown'}}_icon.png" class="parking-logo"></glsx-image>
                        </view>
                        <view class="parking-desc">
                            <view class="parking-num {{item.parkingStatus == 0?'disabeld':''}}">
                                {{item.parkingArea}}-{{item.parkingBuilding}}-{{item.parkingFloor}}
                            </view>
                            <view class="parking-status {{item.parkingStatus == 1?'idle':item.parkingStatus == 2?'occupy':'unknown'}}">
                                {{item.parkingStatusStr}}
                            </view>
                        </view>
                        <view class="parking-btn" bind:tap="jump" data-id="{{item.id}}">详情</view>
                    </view>
                </block>
                <block wx:else>
                    <view class="empty-box" style="height: 100%;">
                        <view class="empty-body" style="width: 220rpx;height: 220rpx;">
                            <glsx-image webp src="home/parking/empty.png"></glsx-image>
                        </view>
                        <view class="empty-text">暂无车位</view>
                    </view>
                </block>

            </view>
        </block>
        <block wx:else>
            <view class="empty-box">
                <view class="empty-header"></view>
                <view class="empty-body">
                    <glsx-image webp src="home/parking/empty.png"></glsx-image>
                </view>
                <view class="empty-text">暂无车位</view>
            </view>
        </block>
    </view>
</view>