Commit b44c1ba7 by Lin

功能(接待中心):新增品牌选择下拉功能

- 新增品牌选择箭头图标
- 更新接待中心组件,增加可点击标签展示已选品牌
- 实现品牌下拉选择器,支持用户从多品牌中选取
- 优化标签与箭头图标的视觉样式,提升辨识度
1 parent fa18f4df
...@@ -11,8 +11,9 @@ ...@@ -11,8 +11,9 @@
<view class="header-title-box"> <view class="header-title-box">
<text class="header-title">业绩看板</text> <text class="header-title">业绩看板</text>
</view> </view>
<view class="tag-box"> <view class="tag-box" @click="show = true">
<text class="tag-text">问界 ⌄</text> <text class="tag-text">{{ selectedBrand }} </text>
<image class="tag-arrow-icon" src="/static/images/reception/icon-select-arrow.png" mode="aspectFit" />
</view> </view>
</view> </view>
<!-- 下:进度条区域 --> <!-- 下:进度条区域 -->
...@@ -232,10 +233,13 @@ ...@@ -232,10 +233,13 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<un-picker :show="show" :columns="columns" @close="onClose" @cancel="onClose" @confirm="onConfirm" />
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
// 接待中心看板 // 接待中心看板
import { ref } from 'vue'
import type { UnPickerColumn, UnPickerColumnItem, UnPickerConfirmEvent } from '@/uni_modules/uview-unix'
// 产值卡片 tabs:0=本月交付转化率,1=本月交付客单价 // 产值卡片 tabs:0=本月交付转化率,1=本月交付客单价
const outputTabIndex = ref(1); const outputTabIndex = ref(1);
...@@ -246,6 +250,30 @@ const rightTabIndex = ref(1); ...@@ -246,6 +250,30 @@ const rightTabIndex = ref(1);
// 筛选 tabs:0=已提交,1=未提交 // 筛选 tabs:0=已提交,1=未提交
const filterTabIndex = ref(0); const filterTabIndex = ref(0);
const show = ref(false)
// 选中的品牌,默认问界
const selectedBrand = ref('问界')
// 对象字面量需显式断言为 UnPickerColumnItem,否则 UTS 会推断为 UTSJSONObject
const columns = ref<UnPickerColumn[]>([
[
{ text: '问界', value: 1 } as UnPickerColumnItem,
{ text: '奥迪', value: 2 } as UnPickerColumnItem,
{ text: '奔驰', value: 3 } as UnPickerColumnItem
] as UnPickerColumn
])
// 确认:将选中值填充到 tag,并关闭弹窗
const onConfirm = (e: UnPickerConfirmEvent): void => {
const items = e.value
if (items != null && items.length > 0) {
selectedBrand.value = items[0].text
}
show.value = false
}
// 取消:仅关闭弹窗,不更新选中值
const onClose = (): void => {
show.value = false
}
function switchFilterTab(index: number): void { function switchFilterTab(index: number): void {
filterTabIndex.value = index filterTabIndex.value = index
} }
...@@ -408,7 +436,13 @@ function switchOutputTab(index: number): void { ...@@ -408,7 +436,13 @@ function switchOutputTab(index: number): void {
.tag-text { .tag-text {
font-size: 12px; font-size: 12px;
color: #64748B; color: #333333;
}
.tag-arrow-icon {
width: 18px;
height: 18px;
margin-left: 4px;
} }
/* Progress */ /* Progress */
......
import { DemoPageConfig } from "../../types/index.uts"; import { DemoPageConfig, ResponsiveImage } from "../../types/index.uts";
export const demoConfig : DemoPageConfig = { export const demoConfig : DemoPageConfig = {
paddingLeft: "100rpx", paddingLeft: "100rpx",
...@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = { ...@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = {
heroImageSrc: { heroImageSrc: {
x1: "/static/images/landscape/1024/study-hero.png", x1: "/static/images/landscape/1024/study-hero.png",
x2: "/static/images/landscape/1024/study-hero@2x.png" x2: "/static/images/landscape/1024/study-hero@2x.png"
}, } as ResponsiveImage,
titleFontSize: "80rpx" titleFontSize: "80rpx"
}; };
import { DemoPageConfig } from "../../types/index.uts"; import { DemoPageConfig, ResponsiveImage } from "../../types/index.uts";
export const demoConfig : DemoPageConfig = { export const demoConfig : DemoPageConfig = {
paddingLeft: "150rpx", paddingLeft: "150rpx",
...@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = { ...@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = {
heroImageSrc: { heroImageSrc: {
x1: "/static/images/landscape/1920/study-hero.png", x1: "/static/images/landscape/1920/study-hero.png",
x2: "/static/images/landscape/1920/study-hero@2x.png" x2: "/static/images/landscape/1920/study-hero@2x.png"
}, } as ResponsiveImage,
titleFontSize: "48rpx" titleFontSize: "48rpx"
}; };
import { DemoPageConfig } from "../../types/index.uts"; import { DemoPageConfig, ResponsiveImage } from "../../types/index.uts";
export const demoConfig : DemoPageConfig = { export const demoConfig : DemoPageConfig = {
paddingLeft: "32rpx", paddingLeft: "32rpx",
...@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = { ...@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = {
heroImageSrc: { heroImageSrc: {
x1: "/static/images/common/study-hero.png", x1: "/static/images/common/study-hero.png",
x2: "/static/images/common/study-hero@2x.png" x2: "/static/images/common/study-hero@2x.png"
}, } as ResponsiveImage,
titleFontSize: "32rpx" titleFontSize: "32rpx"
}; };
import { DemoPageConfig } from "../../types/index.uts"; import { DemoPageConfig, ResponsiveImage } from "../../types/index.uts";
export const demoConfig : DemoPageConfig = { export const demoConfig : DemoPageConfig = {
paddingLeft: "24rpx", paddingLeft: "24rpx",
...@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = { ...@@ -7,6 +7,6 @@ export const demoConfig : DemoPageConfig = {
heroImageSrc: { heroImageSrc: {
x1: "/static/images/portrait/common/study-hero.png", x1: "/static/images/portrait/common/study-hero.png",
x2: "/static/images/portrait/common/study-hero@2x.png" x2: "/static/images/portrait/common/study-hero@2x.png"
}, } as ResponsiveImage,
titleFontSize: "30rpx" titleFontSize: "30rpx"
}; };
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
:swiper-custom="true" :swiper-custom="true"
@start="handleStart"> @start="handleStart">
<template #swiperCustom> <template #swiperCustom>
<view v-if="logic.loadComplete.value" class="content-wrap"> <view v-if="!logic.loadComplete.value" class="content-wrap">
<scroll-view class="pkg-scroll" <scroll-view class="pkg-scroll"
direction="vertical" direction="vertical"
:show-scrollbar="true"> :show-scrollbar="true">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!