修正用户名显示逻辑进入服务列表页面自动刷新
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user