feat(equipment): 已配对设备行按钮重构,添加设备入口仅运维可见

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-09-11 14:09:35 +08:00
co-authored by Claude Sonnet 4.6
parent b3e2a11423
commit fa0246d1e5
2 changed files with 66 additions and 34 deletions
+33 -13
View File
@@ -83,27 +83,47 @@
}
}
/* 描边按钮(蓝色/红色) */
.ops-btn {
width: 180rpx;
.section-right {
height: 48rpx;
display: flex;
flex-wrap: nowrap;
.section-right-red {
height: 48rpx;
padding: 0 15rpx;
border-radius: 8rpx;
font-size: 24rpx;
line-height: 44rpx;
text-align: center;
box-sizing: border-box;
flex-shrink: 0;
}
.ops-btn--blue {
border: 2rpx solid #1385FA;
color: #1385FA;
}
.ops-btn--red {
border: 2rpx solid #F24439;
color: #F24439;
}
.section-right-blue {
height: 48rpx;
display: flex;
flex-wrap: nowrap;
align-items: center;
padding: 0 15rpx;
border-radius: 8rpx;
background-color: #1385FA;
> view:nth-child(1) {
width: 32rpx;
height: 32rpx;
display: flex;
align-items: center;
margin-right: 6rpx;
}
> view:nth-child(2) {
color: #FFFFFF;
height: 24rpx;
font-size: 24rpx;
line-height: 24rpx;
}
}
}
}
/* 设备卡片 */
+16 -4
View File
@@ -13,7 +13,6 @@
</view>
<!-- 已配对设备行 -->
<block wx:if="{{ operationsEngineer }}">
<view class="section-bar">
<view class="section-left">
<view class="bt-icon">
@@ -21,9 +20,20 @@
</view>
<view class="section-title">已配对设备</view>
</view>
<view class="ops-btn ops-btn--red" bind:tap="onUnpairAll">取消全部配对</view>
<view class="section-right">
<block wx:if="{{ operationsEngineer }}">
<view class="section-right-red" bind:tap="onUnpairAll">取消全部配对</view>
</block>
<block wx:else>
<view class="section-right-blue" bind:tap="onTapAdd">
<view>
<image src="/images/addBtn.png"/>
</view>
<view>添加设备</view>
</view>
</block>
</view>
</view>
<!-- 设备列表 -->
<!-- <view class="device">
@@ -86,7 +96,7 @@
<view>
<image src="/images/equipment/users.png"/>
</view>
<view>用户({{ item.userNum }})</view>
<view>用户管理({{ item.userNum }})</view>
</view>
<block wx:if="{{item.status}}">
<view class="device-action-btn" bind:tap="onTapDataRetransfer">
@@ -105,12 +115,14 @@
</block>
<!-- 添加设备按钮 -->
<block wx:if="{{ operationsEngineer }}">
<view class="add-btn" bind:tap="onTapAdd">
<view class="add-icon">
<image src="/images/addBtn.png"/>
</view>
<view class="add-text">绑定设备</view>
<view class="add-text">添加设备</view>
</view>
</block>
<equipment-dialog show="{{ loadingShow }}" title="{{ loadingTitle }}" content="{{ loadingContent }}"
bind:close="onCloseLoading"/>