解决页面显示空白的问题。

This commit is contained in:
zhonghua.li
2026-04-18 17:15:26 +08:00
parent b5f3a1b2f7
commit 453b6e8841
26 changed files with 1198 additions and 1246 deletions

View File

@@ -19,7 +19,7 @@
class="tab-item"
:class="{ active: activeTab === 'reception' }"
@click="switchTab('reception')">
<text>开始接待</text>
<text>客户接待</text>
</view>
<view
class="tab-item"
@@ -27,6 +27,12 @@
@click="switchTab('status')">
<text>接待中</text>
</view>
<view
class="tab-item"
:class="{ active: activeTab === 'tag' }"
@click="switchTab('tag')">
<text>标签管理</text>
</view>
</view>
<common-begin-reception
v-if="activeTab === 'reception'"
@@ -42,10 +48,15 @@
ref="serviceListRef"
class="service-status-container"
:style="{ top: computedContentTop || contentTop }"
record-state-label="接待中"
:show-record-state-indicator="false"
empty-list-hint="暂无接待中记录"
:show-reception-entry-shortcut="true"
/>
<tag-management-panel
v-if="activeTab === 'tag'"
ref="tagPanelRef"
:content-top="computedContentTop || contentTop"
/>
</view>
</view>
</template>
@@ -56,6 +67,7 @@ import statusBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-stat
// #endif
import CommonBeginReception from './common_begin_reception.vue';
import ServiceListFurniture from './serviceListFurniture.vue';
import TagManagementPanel from './tag_management_panel.vue';
export default {
name: '接待中',
@@ -64,12 +76,14 @@ export default {
statusBar,
CommonBeginReception,
ServiceListFurniture,
TagManagementPanel,
},
// #endif
// #ifndef APP
components: {
CommonBeginReception,
ServiceListFurniture,
TagManagementPanel,
},
// #endif
data() {
@@ -133,6 +147,13 @@ export default {
list.onServiceStatusRefresh();
}
});
} else if (this.activeTab === 'tag') {
this.$nextTick(() => {
const tagPanel = this.$refs.tagPanelRef;
if (tagPanel && typeof tagPanel.refreshTagList === 'function') {
tagPanel.refreshTagList();
}
});
}
});
},
@@ -186,12 +207,21 @@ export default {
});
},
switchTab(tab) {
if (tab !== 'reception' && tab !== 'status') {
if (tab !== 'reception' && tab !== 'status' && tab !== 'tag') {
return;
}
this.activeTab = tab;
if (tab === 'reception') {
this.resetReceptionForm();
} else if (tab === 'tag') {
this.$nextTick(() => {
this.$nextTick(() => {
const p = this.$refs.tagPanelRef;
if (p && typeof p.refreshTagList === 'function') {
p.refreshTagList();
}
});
});
}
},
resetReceptionForm() {