Commit 11bcfe9c by Lin

feat: 接待中心移动端开发

1 parent 0acde363
<template> <template>
<view class="output-value-box"> <view class="output-value-box">
<view class="output-value-title">本月产值</view> <text class="output-value-title">本月产值</text>
<view class="output-value"> <view class="output-value">
<view class="value"> <view class="value">
<text class="value-num">{{ formattedNumber('actualProduction') }}</text> <text class="value-num">{{ formattedNumber('actualProduction') }}</text>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</view> </view>
</view> </view>
<view class="output-canvas"> <view class="output-canvas">
<l-echart ref="chartRef" class="pie-chart" @finished="initChart" /> <canvas id="output-chart" class="canvas"></canvas>
<view class="chart-text"> <view class="chart-text">
<text class="chart-label">产值贡献</text> <text class="chart-label">产值贡献</text>
<text class="chart-num">{{ formattedNumber('productionContribution') }}%</text> <text class="chart-num">{{ formattedNumber('productionContribution') }}%</text>
...@@ -35,10 +35,6 @@ ...@@ -35,10 +35,6 @@
</template> </template>
<script setup lang="uts"> <script setup lang="uts">
import { ref, computed, watch, nextTick } from 'vue';
const chartRef = ref<LEchartComponentPublicInstance | null>(null);
/** 页面数据:actualProduction、personalProduction、targetProduction、achievementRatio、productionContribution */ /** 页面数据:actualProduction、personalProduction、targetProduction、achievementRatio、productionContribution */
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
...@@ -69,222 +65,200 @@ function formattedNumber(key: string, unit: string | null = null): string { ...@@ -69,222 +65,200 @@ function formattedNumber(key: string, unit: string | null = null): string {
return str; return str;
} }
/** 获取产值贡献百分比(0-100) */ onMounted(() => {
function getContribution(): number { drawChart();
const pd = props.pageData;
const ds = props.dataShow;
let contribution = 0;
if (pd != null && ds) {
const val = pd['productionContribution'];
if (val != null && val != "") {
contribution = parseFloat("" + val);
}
}
if (contribution < 0) { contribution = 0; }
if (contribution > 100) { contribution = 100; }
return contribution;
}
/** 构建产值贡献环形图(饼图)配置 */
function buildPieOption(): UTSJSONObject {
const contribution = getContribution();
const rest = 100 - contribution;
const dataItems: UTSJSONObject[] = [
{
value: contribution,
name: '贡献',
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [{ offset: 0, color: '#7AAFFF' }, { offset: 1, color: '#4673FF' }]
}
}
} as UTSJSONObject,
{
value: rest,
name: '',
itemStyle: { color: '#F2F6FF' }
} as UTSJSONObject
];
return {
tooltip: { show: false },
series: [
{
type: 'pie',
radius: ['45%', '65%'],
center: ['50%', '50%'],
startAngle: 90,
data: dataItems,
label: { show: false },
labelLine: { show: false },
emphasis: { scale: false }
}
]
} as UTSJSONObject;
}
/** 初始化 lime-echart 饼图 */
const initChart = async (): Promise<void> => {
const comp = chartRef.value;
if (comp == null) { return; }
try {
await comp.init(null);
comp.setOption(buildPieOption());
} catch (e) {
console.error('OutputValue 饼图初始化失败:', e);
}
};
const pageDataRef = computed((): UTSJSONObject => {
const pd = props.pageData;
return pd != null ? pd : ({} as UTSJSONObject);
}); });
watch( watch(
pageDataRef, () => props.pageData,
() => { () => {
nextTick(() => { drawChart();
chartRef.value?.setOption(buildPieOption());
});
}, },
{ deep: true } { deep: true }
); );
function drawChart() {
const pd = props.pageData;
if (pd == null) return;
// 获取 contribution 值,假设是 0-100 的数字
let contribution = 0;
const val = pd['productionContribution'];
if (val != null && val != "") {
contribution = parseFloat("" + val);
}
// 限制在 0-100
if (contribution < 0) contribution = 0;
if (contribution > 100) contribution = 100;
const ctx = uni.getElementById('output-chart')?.getContext('2d') as CanvasRenderingContext2D | null;
if (ctx == null) return;
const width = 100; // canvas 宽
const height = 100; // canvas 高
const centerX = width / 2;
const centerY = height / 2;
const radius = 38; // 半径
const lineWidth = 8; // 线宽
// 清空画布
ctx.clearRect(0, 0, width, height);
// 绘制背景圆环
ctx.beginPath();
ctx.arc(centerX, centerY, radius, 0, 2 * Math.PI);
ctx.lineWidth = lineWidth;
ctx.strokeStyle = '#F0F2F5'; // 浅灰色背景
ctx.lineCap = 'round';
ctx.stroke();
// 绘制进度条
const startAngle = -Math.PI / 2;
const endAngle = startAngle + (contribution / 100) * 2 * Math.PI;
// 只有当有进度时才绘制
if (contribution > 0) {
ctx.beginPath();
ctx.arc(centerX, centerY, radius, startAngle, endAngle);
ctx.lineWidth = lineWidth;
ctx.strokeStyle = '#4673ff'; // 蓝色进度
ctx.lineCap = 'round';
// 增加阴影,使效果更接近设计图
ctx.shadowBlur = 4;
ctx.shadowColor = 'rgba(70, 115, 255, 0.3)';
ctx.stroke();
// 绘制完后清除阴影,以免影响其他绘制
ctx.shadowBlur = 0;
}
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
/* 本月产值模块 1:1 还原样式 */ /* 本月产值 - 基准 183px,toRpx/2 换算为 px;文字样式仅写在 text 上 */
.output-value-box { .output-value-box {
position: relative; position: relative;
width: 100%;
height: 183px; height: 183px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
box-sizing: border-box; box-sizing: border-box;
background-color: #ffffff; background-color: #ffffff; /* 确保背景色 */
border-radius: 12px; border-radius: 12px; /* 圆角 */
padding: 0; padding: 0;
overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02); /* 轻微阴影,增强卡片质感 */
} }
.output-value-title { .output-value-title {
font-size: 14px;
font-weight: 500; /* 加粗一点 */
padding: 16px 16px 0;
color: #333333; color: #333333;
font-size: 11px;
font-weight: 500;
padding: 16px 20px 0;
} }
.output-value { .output-value {
width: 50%; padding: 20px 0 0 20px;
padding: 12px 0 0 24px;
flex-shrink: 0; flex-shrink: 0;
display: flex;
flex-direction: column;
} }
.value { .value {
display: flex; display: flex;
flex-direction: row; align-items: baseline;
align-items: center; margin-bottom: 8px;
margin-bottom: 4px;
} }
.value-num { .value-num {
color: #4673ff; color: #4673ff;
font-size: 32px; font-size: 32px; /* 加大字体 */
line-height: 38px; line-height: 32px;
font-weight: bold; font-weight: bold;
font-family: 'DIN Alternate', 'DINAlternate-Bold', 'DINCondensed-Bold', sans-serif; font-family: DINAlternate-Bold, Roboto-Bold, Helvetica-Bold, sans-serif; /* 字体回退 */
} }
.unit { .unit {
color: #999999; color: #333333;
font-size: 12px; font-size: 14px;
margin-left: 2px; font-weight: 400;
margin-left: 4px;
line-height: 18px;
} }
.sub-value { .sub-value {
display: flex; display: flex;
align-items: center; align-items: center;
margin-top: -2px;
} }
.sub-value .sub-label { .sub-value .sub-label {
color: #999999; color: #666666; /* 稍微浅一点的灰色 */
font-size: 12px; font-size: 12px;
} }
.sub-value .num { .sub-value .num {
color: #4673ff; color: #4673ff;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: 500;
margin-left: 4px; margin-left: 4px;
} }
.output-canvas { .output-canvas {
position: absolute; position: absolute;
right: 16px; right: 16px;
top: 24px; top: 36px;
width: 110px; width: 100px;
height: 110px; height: 100px;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.pie-chart { .canvas {
width: 100%; width: 100px;
height: 100%; height: 100px;
position: absolute;
top: 0;
left: 0;
} }
.chart-text { .chart-text {
position: absolute; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
pointer-events: none; z-index: 1; /* 确保在 canvas 上方 */
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1;
} }
.chart-label { .chart-label {
font-size: 10px; font-size: 10px;
color: #999999; color: #666666;
margin-bottom: 2px; margin-bottom: 2px;
} }
.chart-num { .chart-num {
font-size: 18px; font-size: 16px;
color: #4673ff; color: #4673ff;
font-weight: bold; font-weight: bold;
font-family: 'DIN Alternate', sans-serif;
} }
/* 底部目标/达成比例栏 */ /* 底部目标/达成比例栏 */
.output-view-wrap { .output-view-wrap {
position: absolute; position: absolute;
left: 16px; left: 0;
right: 16px; right: 0;
bottom: 16px; bottom: 16px;
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.output-view { .output-view {
width: 100%; width: 90%; /* 稍微宽一点 */
height: 36px; max-width: 340px;
height: 36px; /* 加高一点 */
border-radius: 18px; border-radius: 18px;
background-color: #F6F8FF; background: #F5F7FF; /* 浅蓝色背景,更接近设计图 */
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 0; padding: 0 16px;
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -293,11 +267,12 @@ watch( ...@@ -293,11 +267,12 @@ watch(
justify-content: center; justify-content: center;
align-items: center; align-items: center;
flex: 1; flex: 1;
flex-shrink: 0;
} }
.output-view .item-label { .output-view .item-label {
color: #666666; color: #333333;
font-size: 13px; font-size: 12px;
} }
.output-view .num { .output-view .num {
...@@ -311,7 +286,8 @@ watch( ...@@ -311,7 +286,8 @@ watch(
.divider { .divider {
width: 1px; width: 1px;
height: 14px; height: 14px;
background-color: #E0E4EF; background: #D8DCE6; /* 调整分隔线颜色 */
flex-shrink: 0; flex-shrink: 0;
margin: 0 10px;
} }
</style> </style>
...@@ -819,8 +819,8 @@ onUnmounted(() => { ...@@ -819,8 +819,8 @@ onUnmounted(() => {
.record-list { .record-list {
flex: 1; flex: 1;
box-sizing: border-box; box-sizing: border-box;
position: relative; width: 100%;
overflow: hidden; min-height: 0;
} }
/* ── 提示条(高度 38px ≈ toRpx(76)/2) ─────────────────────────────────────── */ /* ── 提示条(高度 38px ≈ toRpx(76)/2) ─────────────────────────────────────── */
......
<template>
<scroll-view class="dashboard-container" scroll-y="true">
<view class="main-content">
<!-- Left section -->
<view class="left-section">
<!-- 业绩看板头部:上下布局 -->
<view class="card-header">
<!-- 上:标题行 -->
<view class="header-top-row">
<view class="header-title-box">
<text class="header-title">业绩看板</text>
</view>
<view class="tag-box">
<text class="tag-text">问界 ⌄</text>
</view>
</view>
<!-- 下:进度条区域 -->
<view class="progress-section">
<view class="progress-labels">
<text class="progress-label">时间进度</text>
<text class="progress-label">80%</text>
</view>
<view class="progress-bar-bg">
<view class="progress-bar-fill" style="width: 80%;"></view>
</view>
</view>
</view>
<!-- Funnel Card -->
<view class="glass-card funnel-card">
<view class="title-box">
<text class="title-text">门店客流情况</text>
</view>
<view class="funnel-container">
<text class="funnel-title">门店客流情况</text>
<view class="funnel-chart-box">
<!-- 漏斗主体:蓝渐变背景 + 白字;用 image 垫底确保 App 端背景可见 -->
<view class="funnel-box">
<view class="funnel-bg-layer"></view>
<view class="funnel-content">
<text class="funnel-text-sm">累计交付数</text>
<text class="funnel-text-lg">1800</text>
<view class="funnel-divider"></view>
<text class="funnel-text-sm">实际触客数</text>
<text class="funnel-text-lg">1000</text>
</view>
</view>
<!-- 侧边 L 形标注线 -->
<view class="funnel-bracket"></view>
<!-- 侧边文字标注 -->
<view class="funnel-side">
<text class="side-text-sm">实际触客率</text>
<text class="side-text-lg">66.6%</text>
</view>
</view>
</view>
</view>
<!-- Output Value Card -->
<view class="glass-card output-value-card">
<view class="tabs-box">
<view
class="tab-item tab-item-first"
:class="{ 'active-tab': outputTabIndex == 0 }"
@click="switchOutputTab(0)"
>
<text class="tab-text" :class="outputTabIndex == 0 ? 'text-slate-800 font-bold' : 'text-slate-500'">本月交付转化率</text>
</view>
<view
class="tab-item tab-item-last"
:class="{ 'active-tab': outputTabIndex == 1 }"
@click="switchOutputTab(1)"
>
<text class="tab-text" :class="outputTabIndex == 1 ? 'text-slate-800 font-bold' : 'text-slate-500'">本月交付客单价</text>
</view>
</view>
<!-- Tab 内容:数据驱动,统一结构 -->
<view class="compare-section">
<view
v-for="(row, idx) in currentOutputTab.compareRows"
:key="idx"
class="compare-row"
:class="{ 'compare-row-last': idx == currentOutputTab.compareRows.length - 1 }"
>
<text class="compare-label">{{ row.label }}</text>
<view class="compare-bar-bg">
<view
class="compare-bar-fill"
:class="row.barClass"
:style="{ width: row.barWidth }"
></view>
</view>
<text class="compare-value">{{ row.value }}</text>
</view>
</view>
</view>
<view class="glass-card output-value-card" style="margin-top: 10px;">
<view class="title-box">
<text class="title-text">本月产值</text>
</view>
<view class="output-summary">
<view class="summary-left">
<text class="summary-label">{{ currentOutputTab.summary.summaryLabel }}</text>
<view class="summary-value-box">
<text class="summary-value-num">{{ currentOutputTab.summary.summaryValueNum }}</text>
<text class="summary-value-unit">{{ currentOutputTab.summary.summaryValueUnit }}</text>
</view>
<view class="summary-personal">
<text class="personal-label">{{ currentOutputTab.summary.personalLabel }}</text>
<text class="personal-value">{{ currentOutputTab.summary.personalValue }}</text>
</view>
</view>
<view class="summary-right">
<view class="ring-chart-placeholder">
<text class="ring-percent">{{ currentOutputTab.summary.ringPercent }}</text>
<text class="ring-label">{{ currentOutputTab.summary.ringLabel }}</text>
</view>
</view>
</view>
</view>
</view>
<!-- Right section -->
<view class="right-section">
<view class="right-tabs">
<view
class="right-tab"
:class="{ 'active-right-tab': rightTabIndex == 0 }"
@click="switchRightTab(0)"
>
<text class="right-tab-text" :class="rightTabIndex == 0 ? 'text-blue-600 font-extrabold' : 'text-slate-400 font-bold'">客户录入</text>
</view>
<view
class="right-tab"
:class="{ 'active-right-tab': rightTabIndex == 1 }"
@click="switchRightTab(1)"
>
<text class="right-tab-text" :class="rightTabIndex == 1 ? 'text-blue-600 font-extrabold' : 'text-slate-400 font-bold'">接待复盘</text>
</view>
</view>
<view class="filter-section">
<view class="filter-group glass-card">
<view class="filter-tabs-row">
<view
class="filter-tab-item filter-tab-first"
:class="{ 'active-filter-tab': filterTabIndex == 0 }"
@click="switchFilterTab(0)"
>
<text class="filter-tab-text" :class="filterTabIndex == 0 ? 'text-slate-800 font-bold' : 'text-slate-500'">已提交</text>
</view>
<view
class="filter-tab-item filter-tab-last"
:class="{ 'active-filter-tab': filterTabIndex == 1 }"
@click="switchFilterTab(1)"
>
<text class="filter-tab-text" :class="filterTabIndex == 1 ? 'text-slate-800 font-bold' : 'text-slate-500'">未提交</text>
</view>
</view>
</view>
<view class="filter-actions">
<view class="action-btn"><text class="action-btn-text">战败 ⌄</text></view>
<view class="action-btn"><text class="action-btn-text">未复盘 ⌄</text></view>
</view>
</view>
<view class="list-container">
<!-- Card 1 -->
<view class="list-card glass-card">
<view class="card-header-row">
<view class="card-title-box">
<text class="card-name">李可</text>
<text class="card-car">AITO M9</text>
</view>
<view class="card-status-box">
<view class="status-badge bg-slate-100"><text class="status-text text-slate-400">未复盘</text></view>
<view class="status-badge bg-red-50"><text class="status-text text-red-400">战败</text></view>
</view>
</view>
<view class="card-info-list">
<view class="info-row"><text class="info-label">客户电话</text><text class="info-value">135 1000 8888</text></view>
<view class="info-row"><text class="info-label">销售姓名</text><text class="info-value">李玉燕</text></view>
<view class="info-row"><text class="info-label">接待时长</text><text class="info-value">21分32秒</text></view>
<view class="info-row"><text class="info-label">开始接待</text><text class="info-value">2024.01.29 16:30:52</text></view>
<view class="info-row info-row-last"><text class="info-label">结束接待</text><text class="info-value">2024.01.29 16:51:20</text></view>
</view>
</view>
<!-- Card 2 -->
<view class="list-card glass-card opacity-card">
<view class="card-header-row">
<view class="card-title-box">
<text class="card-name">梁敏</text>
<text class="card-car">AITO M9</text>
</view>
<view class="card-status-box">
<view class="status-badge bg-slate-100"><text class="status-text text-slate-400">未复盘</text></view>
</view>
</view>
<view class="card-info-list">
<view class="info-row"><text class="info-label">客户电话</text><text class="info-value">135 1222 9999</text></view>
<view class="info-row info-row-last"><text class="info-label">销售姓名</text><text class="info-value">李玉燕</text></view>
</view>
</view>
<!-- Card 3 -->
<view class="list-card glass-card">
<view class="card-header-row">
<view class="card-title-box">
<text class="card-name">吕文</text>
<text class="card-car">AITO M9</text>
</view>
<view class="card-status-box">
<view class="status-badge bg-red-50"><text class="status-text text-red-400">战败</text></view>
</view>
</view>
<view class="card-info-list">
<view class="info-row info-row-last"><text class="info-label">接待时长</text><text class="info-value">18分20秒</text></view>
</view>
</view>
<view class="list-footer">
<text class="list-footer-text">- 已经到底了 -</text>
</view>
</view>
</view>
</view>
</scroll-view>
</template>
<script setup lang="uts">
// 接待中心看板
// 产值卡片 tabs:0=本月交付转化率,1=本月交付客单价
const outputTabIndex = ref(1);
// 右侧 tabs:0=客户录入,1=接待复盘
const rightTabIndex = ref(1);
// 筛选 tabs:0=已提交,1=未提交
const filterTabIndex = ref(0);
function switchFilterTab(index: number): void {
filterTabIndex.value = index
}
function switchRightTab(index: number): void {
rightTabIndex.value = index
}
// 对比行数据结构
type CompareRow = {
label: string
barWidth: string
barClass: string
value: string
}
// 汇总区数据结构
type OutputSummary = {
summaryLabel: string
summaryValueNum: string
summaryValueUnit: string
personalLabel: string
personalValue: string
ringPercent: string
ringLabel: string
}
// Tab 数据结构,便于扩展新 tab
type OutputTabData = {
compareRows: CompareRow[]
summary: OutputSummary
}
// 各 tab 的配置数据,新增 tab 只需在此追加
const outputTabList: OutputTabData[] = [
{
compareRows: [
{ label: '优秀门店均值', barWidth: '85%', barClass: 'bg-blue-500', value: '¥28370' },
{ label: '本门店', barWidth: '42%', barClass: 'bg-blue-400', value: '¥2370' },
{ label: '个人', barWidth: '42%', barClass: 'bg-blue-400', value: '¥2370' }
],
summary: {
summaryLabel: '本月转化率',
summaryValueNum: '42',
summaryValueUnit: '%',
personalLabel: '目标转化率 ',
personalValue: '60%',
ringPercent: '70%',
ringLabel: '达成率'
}
},
{
compareRows: [
{ label: '优秀门店均值', barWidth: '90%', barClass: 'bg-blue-500', value: '¥28370' },
{ label: '本门店', barWidth: '10%', barClass: 'bg-blue-400', value: '¥2370' },
{ label: '个人', barWidth: '10%', barClass: 'bg-blue-400', value: '¥2370' }
],
summary: {
summaryLabel: '本月产值',
summaryValueNum: '23.68',
summaryValueUnit: '万',
personalLabel: '个人产值 ',
personalValue: '12.33万',
ringPercent: '52%',
ringLabel: '产值贡献'
}
}
]
// 当前 tab 的数据,由 outputTabIndex 驱动
const currentOutputTab = computed(() => {
const idx = outputTabIndex.value
if (idx >= 0 && idx < outputTabList.length) {
return outputTabList[idx]
}
return outputTabList[0]
})
function switchOutputTab(index: number): void {
outputTabIndex.value = index
}
</script>
<style>
.dashboard-container {
/* 作为 flex 子项占满可用空间,允许内部滚动 */
flex: 1;
width: 100%;
min-height: 0;
flex-direction: column;
background-image: linear-gradient(135deg, #E0E7FF 0%, #F1F5F9 50%, #FFFFFF 100%);
}
.main-content {
flex-direction: column;
padding: 16px;
}
.left-section {
flex-direction: column;
width: 100%;
}
.right-section {
flex-direction: column;
margin-top: 24px;
}
/* Glass Card */
.glass-card {
background-color: rgba(255, 255, 255, 0.7);
border: 1px solid rgba(255, 255, 255, 0.4);
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
border-radius: 32px;
flex-direction: column;
}
.funnel-card {
padding: 24px;
margin-bottom: 10px;
}
.output-value-card {
padding: 24px;
}
/* Card Header - 上下布局 */
.card-header {
flex-direction: column;
align-items: stretch;
margin-bottom: 24px;
}
.header-top-row {
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
}
.header-title-box {
flex-direction: row;
align-items: center;
}
.header-title {
font-size: 16px;
font-weight: bold;
color: #1E293B;
}
.tag-box {
background-color: rgba(255, 255, 255, 0.5);
padding: 4px 12px;
border-radius: 999px;
border: 1px solid rgba(226, 232, 240, 1);
flex-direction: row;
align-items: center;
}
.tag-text {
font-size: 12px;
color: #64748B;
}
/* Progress */
.progress-section {
flex-direction: column;
}
.progress-labels {
flex-direction: row;
justify-content: space-between;
margin-bottom: 4px;
}
.progress-label {
font-size: 10px;
color: #94A3B8;
}
.progress-bar-bg {
height: 6px;
background-color: rgba(255, 255, 255, 0.5);
border-radius: 999px;
overflow: hidden;
flex-direction: row;
}
.progress-bar-fill {
height: 100%;
background-color: #3B82F6;
border-radius: 999px;
}
/* Funnel Container - 门店客流情况:白底半透明 + 圆角,右侧留空给侧边标注 */
.funnel-container {
background-color: rgba(255, 255, 255, 0.4);
border-radius: 16px;
padding: 16px;
padding-right: 90px;
margin-top: 32px;
flex-direction: column;
align-items: center;
border: 1px solid rgba(255, 255, 255, 0.6);
overflow: visible;
}
.funnel-title {
font-size: 12px;
font-weight: bold;
color: #475569;
margin-bottom: 24px;
}
/* 漏斗图表容器:固定尺寸,相对定位以放置侧边标注 */
.funnel-chart-box {
width: 192px;
height: 128px;
flex-direction: row;
position: relative;
align-items: center;
justify-content: center;
overflow: visible;
}
/* 漏斗主体:蓝渐变背景 + 白字 */
.funnel-box {
width: 100%;
height: 100%;
position: relative;
border-radius: 8px;
flex-direction: column;
align-items: center;
justify-content: center;
overflow: hidden;
}
/* 背景层:单独 view 承载渐变,确保 App 端可见;linear-gradient 用 to bottom 格式 */
.funnel-bg-layer {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: #3B82F6;
background-image: linear-gradient(to bottom, #3B82F6, #60A5FA);
border-radius: 8px;
}
/* 内容层:文字叠在背景之上 */
.funnel-content {
position: relative;
flex-direction: column;
align-items: center;
justify-content: center;
}
.funnel-text-sm {
font-size: 10px;
color: rgba(255, 255, 255, 0.8);
}
.funnel-text-lg {
font-size: 18px;
font-weight: bold;
color: #FFFFFF;
}
.funnel-divider {
width: 126px;
height: 1px;
background-color: rgba(255, 255, 255, 0.3);
margin-top: 8px;
margin-bottom: 8px;
}
/* 侧边 L 形标注线:连接漏斗与文字 */
.funnel-bracket {
position: absolute;
right: -40px;
top: 50%;
margin-top: -20px;
width: 32px;
height: 40px;
border-left-width: 2px;
border-left-style: solid;
border-left-color: #60A5FA;
border-bottom-width: 2px;
border-bottom-style: solid;
border-bottom-color: #60A5FA;
}
/* 侧边文字:实际触客率 */
.funnel-side {
position: absolute;
right: -75px;
top: 50%;
margin-top: -20px;
flex-direction: column;
}
.side-text-sm {
font-size: 10px;
color: #2563EB;
}
.side-text-lg {
font-size: 14px;
font-weight: bold;
color: #2563EB;
}
/* Output Value Card Tabs */
.tabs-box {
flex-direction: row;
justify-content: space-between;
margin-bottom: 32px;
}
.tab-item {
flex: 1;
padding-top: 8px;
padding-bottom: 8px;
align-items: center;
justify-content: center;
background-color: rgba(241, 245, 249, 0.5);
flex-direction: row;
}
.tab-item-first {
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
}
.tab-item-last {
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
}
.active-tab {
background-color: #FFFFFF;
border: 1px solid #FFFFFF;
}
.tab-text {
font-size: 12px;
}
.text-slate-500 { color: #64748B; font-weight: normal; }
.text-slate-800 { color: #1E293B; font-weight: bold; }
/* Compare Section */
.compare-section {
flex-direction: column;
}
.compare-row {
flex-direction: row;
align-items: center;
margin-bottom: 24px;
}
.compare-row-last {
margin-bottom: 0;
}
.compare-label {
font-size: 12px;
color: #64748B;
width: 75px;
}
.compare-bar-bg {
flex: 1;
height: 8px;
background-color: #F1F5F9;
border-radius: 999px;
margin-right: 16px;
overflow: hidden;
flex-direction: row;
}
.compare-bar-fill {
height: 100%;
border-radius: 999px;
}
.bg-blue-500 { background-color: #3B82F6; }
.bg-blue-400 { background-color: #60A5FA; }
.compare-value {
font-size: 12px;
font-weight: bold;
color: #1E293B;
width: 48px;
text-align: right;
}
/* 本月产值标题:左上角布局 */
.title-box {
flex-direction: row;
align-items: center;
justify-content: flex-start;
}
.title-text {
color: #333333;
font-size: 14px;
font-weight: 500;
}
/* Output Summary */
.output-summary {
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-top: 40px;
}
.summary-left {
flex-direction: column;
}
.summary-label {
font-size: 12px;
color: #94A3B8;
margin-bottom: 4px;
}
.summary-value-box {
flex-direction: row;
align-items: flex-end;
}
.summary-value-num {
font-size: 24px;
font-weight: bold;
color: #2563EB;
}
.summary-value-unit {
font-size: 14px;
color: #2563EB;
}
.summary-personal {
flex-direction: row;
margin-top: 4px;
}
.personal-label {
font-size: 10px;
color: #94A3B8;
}
.personal-value {
font-size: 10px;
color: #3B82F6;
}
.summary-right {
position: relative;
width: 96px;
height: 96px;
flex-direction: column;
}
.ring-chart-placeholder {
width: 100%;
height: 100%;
border-radius: 48px;
border: 8px solid #3B82F6;
flex-direction: column;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.ring-percent {
font-size: 12px;
font-weight: bold;
color: #1E293B;
}
.ring-label {
font-size: 8px;
color: #94A3B8;
}
/* Right Section Tabs */
.right-tabs {
flex-direction: row;
padding-left: 8px;
padding-right: 8px;
margin-bottom: 8px;
}
.right-tab {
margin-right: 48px;
padding-bottom: 8px;
border-bottom: 2px solid transparent;
flex-direction: row;
}
.active-right-tab {
border-bottom: 2px solid #2563EB;
}
.right-tab-text {
font-size: 14px;
}
.text-slate-400 { color: #94A3B8; }
.text-blue-600 { color: #2563EB; }
.font-bold { font-weight: bold; }
.font-extrabold { font-weight: bold; }
/* Filter Section */
.filter-section {
flex-direction: row;
flex-wrap: wrap;
margin-bottom: 16px;
align-items: center;
}
.filter-group {
flex: 1;
min-width: 0;
padding: 4px;
border-radius: 12px;
}
/* 筛选 tabs 容器:强制左右布局,避免 glass-card 的 flex-direction: column 影响 */
.filter-tabs-row {
flex-direction: row;
flex: 1;
}
/* 筛选 tabs:参考 tabs-box 样式,宽高自适应 */
.filter-tab-item {
flex: 1;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 12px;
padding-right: 12px;
align-items: center;
justify-content: center;
background-color: rgba(241, 245, 249, 0.5);
flex-direction: row;
}
.filter-tab-first {
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
}
.filter-tab-last {
border-top-right-radius: 12px;
border-bottom-right-radius: 12px;
}
.active-filter-tab {
background-color: #FFFFFF;
border: 1px solid #FFFFFF;
}
.filter-tab-text {
font-size: 12px;
}
.filter-actions {
flex-direction: row;
margin-left: auto;
}
.action-btn {
background-color: rgba(255, 255, 255, 0.6);
padding-top: 8px;
padding-bottom: 8px;
padding-left: 16px;
padding-right: 16px;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.4);
flex-direction: row;
align-items: center;
margin-left: 8px;
}
.action-btn-text {
font-size: 12px;
color: #64748B;
}
/* List Container */
.list-container {
flex-direction: column;
}
.list-card {
padding: 20px;
border-radius: 24px;
margin-bottom: 16px;
}
.opacity-card {
background-color: rgba(255, 255, 255, 0.5);
}
.card-header-row {
flex-direction: row;
justify-content: space-between;
margin-bottom: 16px;
}
.card-title-box {
flex-direction: column;
}
.card-name {
font-size: 18px;
font-weight: bold;
color: #1E293B;
}
.card-car {
font-size: 14px;
font-weight: bold;
color: #0055FF;
margin-top: 4px;
}
.card-status-box {
flex-direction: row;
align-items: flex-start;
}
.status-badge {
padding-top: 2px;
padding-bottom: 2px;
padding-left: 6px;
padding-right: 6px;
border-radius: 4px;
margin-left: 4px;
justify-content: center;
align-items: center;
flex-direction: row;
}
.bg-slate-100 { background-color: #F1F5F9; }
.bg-red-50 { background-color: #FEF2F2; }
.status-text { font-size: 10px; }
.text-red-400 { color: #F87171; }
.card-info-list {
flex-direction: column;
}
.info-row {
flex-direction: row;
justify-content: space-between;
margin-bottom: 10px;
}
.info-row-last {
margin-bottom: 0;
}
.info-label {
font-size: 12px;
color: #64748B;
}
.info-value {
font-size: 12px;
color: #334155;
}
.list-footer {
padding-top: 16px;
padding-bottom: 40px;
align-items: center;
justify-content: center;
flex-direction: row;
}
.list-footer-text {
font-size: 10px;
color: #94A3B8;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -51,6 +51,9 @@ ...@@ -51,6 +51,9 @@
<view v-else-if="tabIndex == 0" class="legacy-home-wrap"> <view v-else-if="tabIndex == 0" class="legacy-home-wrap">
<slot name="home"></slot> <slot name="home"></slot>
</view> </view>
<view v-else-if="tabIndex == 1" class="reception-center-wrap">
<ReceptionCenterCenter />
</view>
</view> </view>
<view v-else class="right-side"> <view v-else class="right-side">
...@@ -97,6 +100,10 @@ ...@@ -97,6 +100,10 @@
<view v-else-if="tabIndex == 0" class="legacy-home-wrap"> <view v-else-if="tabIndex == 0" class="legacy-home-wrap">
<slot name="home"></slot> <slot name="home"></slot>
</view> </view>
<!-- 横屏接待中心:仅显示右侧列表区 -->
<view v-else-if="tabIndex == 1" class="reception-center-wrap">
<ReceptionCenterCenter :only-right="true" />
</view>
</view> </view>
<!-- 竖屏:底部 TabBar;横屏:左侧栏 --> <!-- 竖屏:底部 TabBar;横屏:左侧栏 -->
...@@ -135,6 +142,7 @@ import { storage } from "@/utils/storage.uts"; ...@@ -135,6 +142,7 @@ import { storage } from "@/utils/storage.uts";
import HomeFrameLeftSide from "./LeftSide.uvue"; import HomeFrameLeftSide from "./LeftSide.uvue";
import HomeFrameMessageIndex from "./MessageIndex.uvue"; import HomeFrameMessageIndex from "./MessageIndex.uvue";
import ReceptionCenterCenter from "./ReceptionCenter/center.uvue";
const props = defineProps<{ const props = defineProps<{
showFooter?: boolean showFooter?: boolean
...@@ -384,6 +392,15 @@ defineExpose({ ...@@ -384,6 +392,15 @@ defineExpose({
overflow: hidden; overflow: hidden;
} }
.reception-center-wrap {
flex: 1;
width: 100%;
height: 100%;
min-height: 0;
display: flex;
flex-direction: column;
}
/* 底部门店信息,与旧项目 store-addr 一致:居中、无通栏背景、两侧渐变线 */ /* 底部门店信息,与旧项目 store-addr 一致:居中、无通栏背景、两侧渐变线 */
.store-addr { .store-addr {
position: absolute; position: absolute;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!