Commit 5763732d by liimin

feat(components): 优化车辆品牌选择组件增加车系选择功能

- 实现品牌和车系两级选择视图,支持在品牌和车系之间切换
- 添加自定义返回按钮,车系视图时显示返回品牌列表功能
- 重构组件结构,统一使用单个 MessageBox 组件管理品牌和车系选择
- 集成缓存机制,优先从本地存储获取车系数据提升性能
- 添加选中状态高亮显示,优化用户体验
- 为 MessageBox 组件添加 z-index 属性支持层级控制
- 更新样式布局,修复选择项排列问题
1 parent 79267a73
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
:max-height="1000" :max-height="1000"
position="bottom" position="bottom"
:title="`请选择${title}`" :title="`请选择${title}`"
:z-index="10076"
@close="handleClose"> @close="handleClose">
<view class="select-box"> <view class="select-box">
<template v-for="(item, index) in employeeList" :key="index"> <template v-for="(item, index) in employeeList" :key="index">
...@@ -25,7 +26,7 @@ import { dispatch, state } from "@/store/index.uts"; ...@@ -25,7 +26,7 @@ import { dispatch, state } from "@/store/index.uts";
import { storage } from "@/utils/storage.uts"; import { storage } from "@/utils/storage.uts";
import MessageBox from "./MessageBox.uvue"; import MessageBox from "./MessageBox.uvue";
type Props = { type Props = {
salesPropsUuid?: string salesPropsUuid?: string
title?: string title?: string
...@@ -132,7 +133,7 @@ defineExpose({ open, close }); ...@@ -132,7 +133,7 @@ defineExpose({ open, close });
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
text { text {
text-align: center; text-align: center;
color: #333; color: #333;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
:is-footer="false" :is-footer="false"
position="center" position="center"
:title="step == 1 ? '客户信息完善' : '结果反馈'" :title="step == 1 ? '客户信息完善' : '结果反馈'"
:z-index="10075"
@close="onMessageBoxClose"> @close="onMessageBoxClose">
<view class="popup-content"> <view class="popup-content">
<!-- 内容区域 --> <!-- 内容区域 -->
......
<template> <template>
<un-popup :mode="position" <un-popup :mode="position"
:show="visible"> :show="visible"
:z-index="zIndex">
<view class="tips-wrapper" <view class="tips-wrapper"
:class="[{'radius': position === 'center'}]" :class="[{'radius': position === 'center'}]"
:style="popupStyle"> :style="popupStyle">
...@@ -15,8 +16,10 @@ ...@@ -15,8 +16,10 @@
</view> </view>
<view class="tips-title"> <view class="tips-title">
<template v-if="back"> <template v-if="back">
<view class="sprite-icon icon-back" <view class="icon-back"
@click="handleHide"> :style="{ display: 'flex', alignItems: 'center', justifyContent: 'center' }"
@click="handleBack">
<un-icon name="arrow-left" size="20"></un-icon>
</view> </view>
</template> </template>
{{ title }} {{ title }}
...@@ -93,6 +96,10 @@ const props = defineProps({ ...@@ -93,6 +96,10 @@ const props = defineProps({
showCancelBtn: { showCancelBtn: {
type: Boolean, type: Boolean,
default: true default: true
},
zIndex: {
type: Number,
default: 10_075
} }
}); });
...@@ -119,6 +126,9 @@ function close(): void { ...@@ -119,6 +126,9 @@ function close(): void {
function hide(): void { function hide(): void {
visible.value = false; visible.value = false;
} }
function handleBack(): void {
emit("close");
}
function open(): void { function open(): void {
visible.value = true; visible.value = true;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!