Commit 9fa08a1d by Lin

refactor(receptionCenter): 优化接待中心组件样式和逻辑

- 在 ReceptionCustomerListTab 组件中添加 sticky-header 属性以改善列表滚动体验
- 调整 ListReception 组件的 margin-top 以优化布局
- 更新 ReceptionDashboardTab 组件,移除多余的空行以提升代码整洁性
- 修改接待中心页面的样式,确保组件在不同屏幕方向下表现一致
1 parent 5ef4f38b
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
<view class="reception-list-wrapper" v-if="isPortrait != true || mainTabIndex == 1"> <view class="reception-list-wrapper" v-if="isPortrait != true || mainTabIndex == 1">
<!-- ✅ 性能优化:始终渲染组件,内部通过 showListSkeleton 控制骨架屏 --> <!-- ✅ 性能优化:始终渲染组件,内部通过 showListSkeleton 控制骨架屏 -->
<ReceptionCustomerListTab <ReceptionCustomerListTab
:sticky-header="true"
:reception-record-list="receptionRecordList" :reception-record-list="receptionRecordList"
:show-list-skeleton="showListSkeleton" :show-list-skeleton="showListSkeleton"
:reception-list-loading-more="receptionListLoadingMore" :reception-list-loading-more="receptionListLoadingMore"
...@@ -746,7 +747,9 @@ onUnmounted(() => { ...@@ -746,7 +747,9 @@ onUnmounted(() => {
/* ✅ 横屏时 flex: 1 铺满剩余空间,竖屏时 flex: 1 */ /* ✅ 横屏时 flex: 1 铺满剩余空间,竖屏时 flex: 1 */
flex: var(--reception-landscape-right-flex, 1); flex: var(--reception-landscape-right-flex, 1);
min-height: 0; min-height: 0;
/* ✅ 子组件 list 吸顶:单列纵向撑满,保证 list-view 获得确定高度 */
flex-direction: column;
width: 100%;
/* ✅ 竖屏:仅在 mainTabIndex == 1 时显示 */ /* ✅ 竖屏:仅在 mainTabIndex == 1 时显示 */
display: var(--reception-list-display, flex); display: var(--reception-list-display, flex);
} }
......
...@@ -413,7 +413,7 @@ function onCardClick(item: UTSJSONObject): void { ...@@ -413,7 +413,7 @@ function onCardClick(item: UTSJSONObject): void {
/* 移除内层块的背景色和 padding,使得内容与大标题对齐 */ /* 移除内层块的背景色和 padding,使得内容与大标题对齐 */
background-color: transparent; background-color: transparent;
padding: 0; padding: 0;
margin-top: 12px; margin-top: 6px;
} }
.info-row { .info-row {
......
<template> <template>
<view class="list-content-wrapper"> <view class="list-content-wrapper">
<!-- 横屏分栏时:子 Tab + 筛选区固定在列表上方,仅下方列表滚动,避免随滚动移出视区 --> <!-- 子 Tab + 筛选区固定在列表区域顶部,仅 list-view 内滚动,不随列表内容上移 -->
<view v-if="stickyHeader == true" class="list-header-fixed"> <view v-if="stickyHeader == true" class="list-header-fixed">
<!-- 子 Tab 数据与 listSubTabIndex 逻辑保留;仅不展示顶部切换条 --> <!-- 子 Tab 数据与 listSubTabIndex 逻辑保留;仅不展示顶部切换条 -->
<view class="sub-tabs-row"> <view class="sub-tabs-row">
...@@ -181,7 +181,7 @@ type ReceptionListSubTabUIItem = { ...@@ -181,7 +181,7 @@ type ReceptionListSubTabUIItem = {
hidden: boolean hidden: boolean
} }
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
/** 横屏分栏时为 true:子 Tab + 筛选区不参与纵向滚动,固定在列表区域顶部 */ /** 为 true(默认):子 Tab + 筛选区在 list-view 外布局吸顶,仅列表区域纵向滚动;为 false 时头部作为首条 list-item 与列表同滚 */
stickyHeader?: boolean stickyHeader?: boolean
/** 客户预录/档案列表(父页暂无接口数据时可不传,默认空数组) */ /** 客户预录/档案列表(父页暂无接口数据时可不传,默认空数组) */
customerList?: UTSJSONObject[] customerList?: UTSJSONObject[]
...@@ -201,6 +201,8 @@ const props = withDefaults(defineProps<{ ...@@ -201,6 +201,8 @@ const props = withDefaults(defineProps<{
unsubmittedPendingTabIndex?: number unsubmittedPendingTabIndex?: number
}>(), { }>(), {
customerList: (): UTSJSONObject[] => [], customerList: (): UTSJSONObject[] => [],
/** 默认吸顶:子 Tab + 筛选区在 list-view 外,仅列表区域滚动 */
stickyHeader: true,
}) })
const emit = defineEmits<{ const emit = defineEmits<{
...@@ -516,6 +518,7 @@ const bottomSafeSpacerStyle = computed((): UTSJSONObject => { ...@@ -516,6 +518,7 @@ const bottomSafeSpacerStyle = computed((): UTSJSONObject => {
} }
.list-header-fixed { .list-header-fixed {
display: flex;
flex-direction: column; flex-direction: column;
flex-shrink: 0; flex-shrink: 0;
width: 100%; width: 100%;
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- ✅ 性能优化:使用 v-if 延迟渲染重型组件,避免同时初始化 --> <!-- ✅ 性能优化:使用 v-if 延迟渲染重型组件,避免同时初始化 -->
<CardFlow v-if="shouldRenderCardFlow" :performance-data="flowPerformanceDataRef" :metrics-visible="performanceMetricsVisible" /> <CardFlow v-if="shouldRenderCardFlow" :performance-data="flowPerformanceDataRef" :metrics-visible="performanceMetricsVisible" />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!