| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <view class="container">
- <!-- 地图核心区域 -->
- <map
- id="map"
- class="map"
- longitude="{{longitude}}"
- latitude="{{latitude}}"
- scale="{{scale}}"
- markers="{{markers}}"
- show-location
- bindregionchange="onRegionChange"
- bindmarkertap="onMarkerTap"
- ></map>
-
- <!-- 分类选项卡 -->
- <view class="tab-container">
- <view class="tab-item {{activeType === 'car' ? 'tab-active' : ''}}" bindtap="switchType" data-type="car">
- <span class="tab-text">储能车</span>
- <span class="tab-badge">{{pointData.car.length}}</span>
- </view>
- <view class="tab-item {{activeType === 'station' ? 'tab-active' : ''}}" bindtap="switchType" data-type="station">
- <span class="tab-text">电站</span>
- <span class="tab-badge">{{pointData.station.length}}</span>
- </view>
- <view class="tab-item {{activeType === 'user' ? 'tab-active' : ''}}" bindtap="switchType" data-type="user">
- <span class="tab-text">用电点</span>
- <span class="tab-badge">{{pointData.user.length}}</span>
- </view>
- </view>
-
- <!-- 点位列表区 -->
- <view class="list-wrap">
- <view class="list-header">
- <text class="list-title">{{activeType === 'car' ? '储能车列表' : activeType === 'station' ? '电站列表' : '用电点列表'}}</text>
- <text class="list-count">共{{currentList.length}}个点位</text>
- </view>
-
- <!-- 空数据占位 -->
- <view class="empty-wrap" wx:if="{{currentList.length === 0}}">
- <view class="empty-icon">📍</view>
- <view class="empty-text">暂无{{activeType === 'car' ? '储能车' : activeType === 'station' ? '电站' : '用电点'}}数据</view>
- </view>
-
- <!-- 卡片式列表项(点击跳转详情页) -->
- <view class="list-card" wx:for="{{currentList}}" wx:key="id" bindtap="toDetailPage" data-item="{{item}}">
- <view class="card-left">
- <view class="card-tag {{item.type === 'car' ? 'tag-car' : item.type === 'station' ? 'tag-station' : 'tag-user'}}">
- {{item.type === 'car' ? '储能车' : item.type === 'station' ? '电站' : '用电点'}}
- </view>
- <view class="card-name">{{item.name}}</view>
- <view class="card-address">{{item.address}}</view>
- <view class="card-status" wx:if="{{item.status}}">{{item.status}}</view>
- </view>
- <view class="card-right">
- <view class="detail-btn">详情</view>
- </view>
- </view>
- </view>
- </view>
|