Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
114 lines
4.6 KiB
Plaintext
114 lines
4.6 KiB
Plaintext
<view class="equipment">
|
|
<!-- 运维模式提示行 -->
|
|
<view class="ops-bar">
|
|
<view class="ops-mode">当前为:运维模式</view>
|
|
<view class="ops-btn ops-btn--blue" bind:tap="onCloseOps">关闭运维模式</view>
|
|
</view>
|
|
|
|
<!-- 顶部卡片(渐变背景 + 设备图片占位) -->
|
|
<view class="top-banner">
|
|
<image src="/images/equipment/bg.png"/>
|
|
</view>
|
|
|
|
<!-- 已配对设备行 -->
|
|
<view class="section-bar">
|
|
<view class="section-left">
|
|
<view class="bt-icon">
|
|
<image src="/images/equipment/bluetooth.png"/>
|
|
</view>
|
|
<view class="section-title">已配对设备</view>
|
|
</view>
|
|
<view class="ops-btn ops-btn--red" bind:tap="onUnpairAll">取消全部配对</view>
|
|
</view>
|
|
|
|
<!-- 设备列表 -->
|
|
<!-- <view class="device">
|
|
<scroll-view class="scrollView" scroll-y>
|
|
<view class="scrollViewContent">
|
|
|
|
</view>
|
|
</scroll-view>
|
|
</view> -->
|
|
<block wx:if="{{ devices && devices.length }}">
|
|
<block wx:for="{{ devices }}" wx:key="id">
|
|
<view class="device-card">
|
|
<view class="device-top">
|
|
<view class="device-icon">
|
|
<image src="/images/device/{{ item.name }}.png"/>
|
|
</view>
|
|
<view class="device-info">
|
|
<view class="device-info_">
|
|
<view class="device-name">{{ item.name }}</view>
|
|
<view class="device-unpair" bind:tap="onTapUnpair">取消配对</view>
|
|
</view>
|
|
<view class="device-status" bind:tap="onTapStatus" data-item="{{ item }}">
|
|
<view class="device-status_ {{item.status ? 'connected' : ''}}">
|
|
<view class="status-dot"></view>
|
|
<view class="status-text">{{ item.status ? '已连接' : '未连接' }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="device-meta">
|
|
<view class="meta-row">
|
|
<view class="meta-label">设备ID</view>
|
|
<view class="meta-value">{{ item.deviceId }}</view>
|
|
</view>
|
|
<view class="meta-row">
|
|
<view class="meta-label">设备SN</view>
|
|
<view class="meta-value">{{ item.sn }}</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="device-actions">
|
|
<block wx:if="{{item.status}}">
|
|
<view class="device-action-btn">
|
|
<view>
|
|
<image src="/images/equipment/wifi.png"/>
|
|
</view>
|
|
<view>设备WIFI</view>
|
|
</view>
|
|
</block>
|
|
<block wx:else>
|
|
<view class="device-action-btn" bind:tap="onTapStatus" data-item="{{ item }}">
|
|
<view>
|
|
<image src="/images/equipment/bluetooth.png"/>
|
|
</view>
|
|
<view>设备连接</view>
|
|
</view>
|
|
</block>
|
|
<view class="device-action-btn" bind:tap="onTapUser" data-item="{{ item }}">
|
|
<view>
|
|
<image src="/images/equipment/users.png"/>
|
|
</view>
|
|
<view>用户({{ item.userNum }})</view>
|
|
</view>
|
|
<block wx:if="{{item.status}}">
|
|
<view class="device-action-btn">
|
|
<view>
|
|
<image src="/images/equipment/reload.png"/>
|
|
</view>
|
|
<view>数据补传</view>
|
|
</view>
|
|
</block>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
<block wx:else>
|
|
<empty-data containerStyle="margin: 100rpx 0 200rpx;" />
|
|
</block>
|
|
|
|
<!-- 添加设备按钮 -->
|
|
<view class="add-btn" bind:tap="onTapAdd">
|
|
<view class="add-icon">
|
|
<image src="/images/addBtn.png"/>
|
|
</view>
|
|
<view class="add-text">添加设备</view>
|
|
</view>
|
|
|
|
<equipment-dialog show="{{ loadingShow }}" title="{{ loadingTitle }}" content="{{ loadingContent }}"
|
|
bind:close="onCloseLoading"/>
|
|
</view>
|