| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <view class="container">
- <!-- 地图组件:永久显示车+电站+用户所有坐标 -->
- <map
- id="map"
- class="map"
- longitude="{{longitude}}"
- latitude="{{latitude}}"
- scale="{{scale}}"
- markers="{{markers}}"
- polyline="{{polyline}}"
- show-location
- bindregionchange="onRegionChange"
- bindmarkertap="onMarkerTap"
- ></map>
- <!-- -->
- <view class="navigation-bar" style="height: 120rpx;">
- <!-- 晟运储能 -->
- <picker bindchange="bindPickerChange" value="{{powerindex}}" range="{{objectArray}}" range-key="projectName">
- <view class="picker">
- {{objectArray[powerindex].projectName}}
- <t-icon class="chevron_down" name="chevron-down" size="40rpx" data-name="chevron-down"/>
- </view>
- </picker>
- </view>
-
- <!-- 优化后的三选项卡(仅切换列表,不控制地图)-->
- <view class="tab_box">
- <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 class="tab-item {{activeType === 'driver' ? 'tab-active' : ''}}" bindtap="switchType" data-type="driver">
- <span class="tab-text">司机</span>
- <span class="tab-badge">{{pointData.driver.length}}</span>
- </view>
- </view>
-
- <!-- 优化后的分类列表 -->
- <view class="list-wrap">
- <view class="list-header">
- <!-- 优化列表标题 -->
- <text class="list-title">
- {{
- activeType === 'car' ? '储能车列表' :
- activeType === 'station' ? '购电电站列表' :
- activeType === 'user' ? '用电场景列表' :
- '司机列表'
- }}
- </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' ? '电站' :
- activeType === 'user' ? '用户用电' :
- '司机'
- }}数据
- </view>
- </view>
-
- <!-- 卡片式列项表 -->
- <view class="list-card" wx:for="{{currentList}}" wx:key="id">
- <view class="card-left">
- <view class="card-tag {{item.type === 'car' ? 'tag-car' : item.type === 'station' ? 'tag-station' : 'tag-user'}}">
- {{
- activeType === 'car' ? '储能车' :
- activeType === 'station' ? '电站' :
- activeType === 'user' ? '用户用电' :
- '司机'
- }}
- </view>
-
- <view wx:if="{{activeType === 'car'}}">
- <view class="card-name">{{item.carName}}</view>
- <view class="card-address">{{item.controllerId}}</view>
- <view class="card-status">{{item.lineType === 1 ? '在线' : '离线'}}</view>
- </view>
-
- <view wx:if="{{activeType === 'station' || activeType === 'user'}}">
- <view class="card-name">{{item.poiName}}</view>
- <view class="card-address">{{item.addressName}}</view>
- <view class="card-status">{{item.addressDeletetype === 0 ? '在线' : '离线'}}</view>
- </view>
-
- <view wx:if="{{activeType === 'driver'}}">
- <!-- 司机列表的显示内容,根据实际数据结构补充 -->
- <view class="card-name">{{item.operationName || item.name}}</view>
- <view class="card-address">{{item.operationPhone || item.id}}</view>
- <view class="card-status">{{item.lineType === 1 ? '在线' : '离线'}}</view>
- </view>
- </view>
-
- <view class="card-right">
- <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s" data-item="{{item}}" bind:tap="ondetails"/>
- <view style="height: 60rpx;"></view>
- <t-icon name="focus" size="40rpx" data-name="focus" data-item="{{item}}" bindtap="toPosition"/>
- </view>
- </view>
- </view>
- </view>
- </view>
- <!--
-
- -->
|