添加牌位-过滤所属区域

This commit is contained in:
WindowBird 2025-10-17 11:07:52 +08:00
parent fd1e851daf
commit 62eb2c62c0

View File

@ -2,7 +2,7 @@
<view class="page">
<base-background />
<!-- 使用自定义导航栏组件 -->
<custom-navbar title="添加牌位" />
<custom-navbar ref="customNavbar" title="添加牌位" />
<view class="content">
<!-- 扫码获取SN和MAC -->
@ -84,10 +84,10 @@
</view>
</view>
<!-- 绑定设备列表 -->
<!-- 添加设备列表 -->
<view class="device-list-section">
<view class="section-title">
<text>绑定牌位的设备列表</text>
<text>添加牌位的设备列表</text>
<view v-if="winB_Pagination.total" class="count-badge">
{{ winB_Pagination.total }}
</view>
@ -96,7 +96,7 @@
<!-- 空状态 -->
<view v-if="winB_List.length === 0" class="empty-state">
<view class="empty-icon">📱</view>
<view class="empty-text">暂无未绑定设备</view>
<view class="empty-text">暂无未添加设备</view>
<view class="empty-tip">请先扫码添加设备</view>
</view>
@ -336,16 +336,18 @@ export default {
transformRegionData(data) {
if (!data || !data.children) return [];
return data.children.map((floor) => ({
label: floor.label,
value: floor.id,
children: floor.children
? floor.children.map((area) => ({
label: area.label,
value: area.id,
}))
: [],
}));
return data.children
.filter((floor) => floor.id !== "41") // value "41"
.map((floor) => ({
label: floor.label,
value: floor.id,
children: floor.children
? floor.children.map((area) => ({
label: area.label,
value: area.id,
}))
: [],
}));
},
//