修正用户名显示逻辑进入服务列表页面自动刷新

This commit is contained in:
zhonghua.li
2026-04-17 08:12:56 +08:00
parent d74bc2ad1f
commit 18455a311d
14 changed files with 132 additions and 72 deletions

View File

@@ -40,7 +40,12 @@
</view>
<!-- 服务状态列表 -->
<service-list-furniture v-if="activeTab === 'status'" class="service-status-container" :style="{ top: computedContentTop || contentTop }"></service-list-furniture>
<service-list-furniture
v-if="activeTab === 'status'"
ref="serviceListRef"
class="service-status-container"
:style="{ top: computedContentTop || contentTop }"
></service-list-furniture>
<!-- 开始接待表单 -->
<common-begin-reception
@@ -467,6 +472,21 @@ import ServiceListFurniture from "./serviceListFurniture.vue";
});
},
methods: {
/**
* 由宿主页 onShow / 分包就绪后调用。tab 页缓存时子列表的 mounted 不会重复执行,需在此主动拉取后端数据。
*/
refreshPageData() {
this.$nextTick(() => {
if (this.activeTab === 'status') {
const list = this.$refs.serviceListRef;
if (list && typeof list.onServiceStatusRefresh === 'function') {
list.onServiceStatusRefresh();
}
} else if (this.activeTab === 'tag' && this.tagViewMode === 'list') {
this.fetchTagList({ force: true });
}
});
},
applyIncomingTab(tab) {
const allowed = ['status', 'reception', 'tag'];
if (!allowed.includes(tab)) return;