Commit 8eaee81a by liimin

style(ui): 优化组件样式和 z-index 计算

- 为 CarBrands 组件添加动态 z-index 计算,确保弹窗层级正确
- 将 accountItems 页面滚动条设置为隐藏
- 移除 accountItems 页面多余的位置定位样式
- 调整 content-box 的位置和边距样式
- 注释掉背景透明度样式避免视觉干扰
- 整理 ReceptionHome 和 center 页面的多余空行和注释
- 优化 ReceptionCenter 页面的布局样式和间距设置
1 parent bf9d8bf0
......@@ -5,7 +5,7 @@
:is-footer="false"
position="bottom"
:title="currentView == 'brand' ? '请选择车品牌' : '请选择车系'"
:z-index="10076"
:z-index="dynamicZIndex"
@close="handleMessageBoxClose">
<scroll-view class="select-box"
:show-scrollbar="false"
......@@ -104,6 +104,11 @@ const currentView = ref<"brand" | "series">("brand");
const selectedBrandIndex = ref<number>(-1);
// 当前车系列表(根据选中品牌动态变化)
const currentCarList = ref<Array<any>>([]);
// 动态计算 z-index,确保始终在最上层(高于 ToolBox 的 10073)
const dynamicZIndex = computed<number>(() => {
return 10090 + (currentView.value == "series" ? 1 : 0);
});
const watchStatus = computed<boolean>(() => {
const status = state.user?.historyStatus;
if (status == null) {
......
<template>
<layout-root>
<view class="page-container account-page fade-in">
<view class="bg">
<image class="bg-image"
......@@ -57,7 +57,7 @@
</view>
<scroll-view class="list"
direction="vertical"
:show-scrollbar="true">
:show-scrollbar="false">
<AccountList v-if="stepIndex == 0"
ref="accountRef"
@choose-account="chooseAccount" />
......@@ -108,7 +108,7 @@ onLoad((options: null | UTSJSONObject) => {
const search = (): void => {
edit.value = false;
inputFocus.value = false;
const step = stepIndex.value;
if (step == 0) {
if (accountRef.value != null) {
......@@ -169,19 +169,17 @@ const chooseMerchant = (userInfo: any): void => {
height: 100%;
position: relative;
overflow: hidden;
.bg {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
.bg-image {
width: 100%;
height: 100%;
opacity: 0.9;
filter: saturate(0.82) brightness(1.03);
filter: saturate(0.82) brightness(1.03);
}
}
......@@ -193,8 +191,7 @@ const chooseMerchant = (userInfo: any): void => {
box-sizing: border-box;
flex-direction: column;
align-items: center;
position: relative;
display: flex;
.nav-wrap {
width: 100%;
height: 66px;
......@@ -217,7 +214,6 @@ const chooseMerchant = (userInfo: any): void => {
}
.step-box {
position: absolute;
height: 44px;
border-radius: 14px;
background: transparent;
......@@ -226,7 +222,6 @@ const chooseMerchant = (userInfo: any): void => {
align-items: center;
justify-content: center;
box-sizing: border-box;
.step-item {
display: flex;
flex-direction: row;
......@@ -284,14 +279,15 @@ const chooseMerchant = (userInfo: any): void => {
}
.content-box {
position: absolute;
position:absolute;
top:60px;
flex: 1;
width: 86%;
box-sizing: border-box;
margin: 0 auto 2px;
margin: 0 10px 2px;
padding-top: 0;
border-radius: 20px;
background: rgba(255, 255, 255, 0.36);
//ba ckground: rgba(255, 255, 255, 0.36);
flex-direction: column;
overflow: hidden;
min-height: 0;
......@@ -300,7 +296,6 @@ const chooseMerchant = (userInfo: any): void => {
.search-box {
margin: 0 12px 12px;
position: relative;
.search-input {
width: 100%;
height: 42px;
......@@ -310,7 +305,6 @@ const chooseMerchant = (userInfo: any): void => {
padding: 0 8px;
position: relative;
box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
.input {
display: flex;
flex-direction: row;
......
......@@ -3,10 +3,10 @@
<view class="reception-home-page">
<!-- 顶部安全区 -->
<view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view>
<!-- 导航栏 -->
<un-navbar title="接待中心" left-icon="" />
<!-- Tab 切换 -->
<view class="reception-home-tabs">
<un-tabs
......@@ -17,12 +17,12 @@
<un-tab-item text="客户列表"></un-tab-item>
</un-tabs>
</view>
<!-- Tab 内容区域 -->
<view class="reception-home-content">
<!-- Tab 1: 业绩看板 -->
<view v-if="currentTabIndex == 0" class="tab-panel tab-panel-dashboard">
<DashboardPanel
<DashboardPanel
:performance-data="performanceData"
:metrics-visible="performanceMetricsVisible"
:selected-brand="selectedBrand"
......@@ -31,7 +31,7 @@
@toggle-metrics="togglePerformanceMetricsVisibility"
/>
</view>
<!-- Tab 2: 客户列表 -->
<view v-if="currentTabIndex == 1" class="tab-panel tab-panel-list">
<CustomerListPanel
......@@ -48,10 +48,10 @@
/>
</view>
</view>
<!-- 全局弹窗复用(保持原有逻辑) -->
<un-picker :show="show" :columns="columns" @close="onClose" @cancel="onClose" @confirm="onConfirm" />
<!-- 客户档案详情全屏层 -->
<view v-if="showReceptionDetail" class="form-detail-inner">
<FormDetail
......@@ -135,7 +135,7 @@ function syncReceptionDashboardLayout(): void {
function onTabChange(e: any): void {
currentTabIndex.value = e.index ?? 0
console.log('[ReceptionHome] Tab 切换:', currentTabIndex.value)
// Tab 切换时刷新对应数据
if (currentTabIndex.value == 0) {
// 切换到业绩看板
......@@ -162,7 +162,7 @@ function performanceTypeList(): UnPickerColumn {
{ label: '问界', value: 1 },
{ label: '鸿蒙', value: 2 },
]
const items: UnPickerColumn = []
let i = 0
while (i < list.length) {
......@@ -203,10 +203,10 @@ function togglePerformanceMetricsVisibility(): void {
async function loadPerformanceData(): Promise<void> {
const rawUser = storage.get('userInfo') as UTSJSONObject | null
if (rawUser == null) { return }
const merchantId = rawUser['shopMerchantId']
const sceneType = rawUser['sceneType']
// 模拟数据(实际应调用接口)
performanceData.value = {
cumulativeDeliveryCount: 128,
......@@ -224,7 +224,7 @@ async function loadPerformanceData(): Promise<void> {
targetProduction: 199,
productionContribution: 100,
} as UTSJSONObject
console.log('[ReceptionHome] 业绩数据加载完成')
}
......@@ -232,11 +232,11 @@ async function loadPerformanceData(): Promise<void> {
function getDefaultCustomerFileParams(): UTSJSONObject | null {
const rawUser = storage.get('userInfo') as UTSJSONObject | null
if (rawUser == null) { return null }
const merchantId = rawUser['shopMerchantId']
const sceneType = rawUser['sceneType']
const sceneBussiness = sceneType == 0 ? 1 : 2
const params = {
"pageNum": customerFilePageNum.value,
"pageSize": CUSTOMER_FILE_PAGE_SIZE,
......@@ -244,7 +244,7 @@ function getDefaultCustomerFileParams(): UTSJSONObject | null {
"merchantId": merchantId,
"bussinessScene": sceneBussiness,
} as UTSJSONObject
if (entryFilterIndex.value == 0) {
const now = new Date()
const y = now.getFullYear()
......@@ -254,7 +254,7 @@ function getDefaultCustomerFileParams(): UTSJSONObject | null {
params['startTime'] = `${dateStr} 00:00:00`
params['endTime'] = `${dateStr} 23:59:59`
}
return params
}
......@@ -266,17 +266,17 @@ async function getCustomerList(append: boolean): Promise<void> {
customerFilePageNum.value++
customerListLoadingMore.value = true
}
const fileParams = getDefaultCustomerFileParams()
if (fileParams == null) {
console.warn('[ReceptionHome] 无登录门店信息,跳过客户列表请求')
return
}
try {
// TODO: 调用实际接口
console.log('[ReceptionHome] 请求客户列表:', fileParams)
// 模拟数据
const mockList: UTSJSONObject[] = []
for (let i = 0; i < 5; i++) {
......@@ -289,13 +289,13 @@ async function getCustomerList(append: boolean): Promise<void> {
arrivalDate: '2026-04-03',
} as UTSJSONObject)
}
if (append) {
customerList.value = [...customerList.value, ...mockList]
} else {
customerList.value = mockList
}
customerListHasMore.value = customerList.value.length < 50 // 模拟还有更多
} catch (err) {
console.error('[ReceptionHome] 客户列表加载失败:', err)
......
......@@ -3,10 +3,10 @@
<view class="reception-center-page">
<!-- 顶部安全区 -->
<view class="reception-safe-top-spacer" :style="receptionSafeTopSpacerStyle"></view>
<un-navbar title="接待中心" left-icon="" />
<view class="reception-navbar-spacer"></view>
<!-- Tab 切换 -->
<view class="reception-tabs-container">
<un-tabs
......@@ -23,7 +23,7 @@
@change="onMainTabChange"
></un-tabs>
</view>
<!-- Tab 内容区域 -->
<view class="reception-content-container">
<ReceptionDashboardTab
......@@ -41,7 +41,7 @@
@open-brand-picker="show = true"
@update:output-tab-index="onOutputTabIndexChange"
/>
<ReceptionCustomerListTab
v-if="mainTabIndex == 1"
:list-sub-tab-index="listSubTabIndex"
......@@ -71,7 +71,7 @@
@reception-click="onReceptionCardClick"
/>
</view>
<!-- 全局弹窗 -->
<un-picker :show="show" :columns="columns" @close="onClose" @cancel="onClose" @confirm="onConfirm" />
<un-picker
......@@ -88,7 +88,7 @@
@cancel="onReviewPickerClose"
@confirm="onReviewPickerConfirm"
/>
<!-- 客户档案详情全屏层 -->
<view v-if="showReceptionDetail" class="form-detail-inner">
<FormDetail
......@@ -274,7 +274,7 @@ function onOutputTabIndexChange(index: number): void {
function switchListSubTab(index: number): void {
listSubTabIndex.value = index
console.log('[ReceptionCenter] 列表二级 Tab 切换:', listSubTabIndex.value)
// 重置页码并加载对应列表
if (index == 0) {
customerFilePageNum.value = 1
......@@ -918,7 +918,7 @@ onMounted(() => {
receptionDashboardLayoutPollId = setInterval(syncReceptionDashboardLayout, RECEPTION_LAYOUT_POLL_MS)
// 页面加载后再次兜底计算(避免运行期时区/时间跳变导致不一致)
setTimeProgress()
// 根据当前 Tab 加载对应数据
if (mainTabIndex.value == 0) {
void getPerformanceData()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!