更新bug
This commit is contained in:
@@ -103,40 +103,40 @@
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<section class="ranking-grid">
|
||||
<article class="panel ranking-panel">
|
||||
<div class="panel-heading">
|
||||
<div>
|
||||
<h2>部门订单量占比</h2>
|
||||
<p>按订单创建人归属,排除取消、拒收及退款</p>
|
||||
</div>
|
||||
<span>单位:单</span>
|
||||
</div>
|
||||
<div v-if="dashboard.rankings.orders.length" class="bar-list">
|
||||
<div v-for="item in dashboard.rankings.orders" :key="`order-${item.id}`" class="bar-row">
|
||||
<span class="bar-name" :title="item.name">{{ item.name }}</span>
|
||||
<div class="bar-track"><i class="is-teal" :style="{ width: barWidth(item.value, maxOrderValue) }" /></div>
|
||||
<strong>{{ formatNumber(item.value) }} 单</strong>
|
||||
</div>
|
||||
</div>
|
||||
<el-empty v-else :image-size="54" description="当前范围暂无订单数据" />
|
||||
<section v-if="showRankings" class="ranking-grid">
|
||||
<article class="panel ranking-panel">
|
||||
<div class="panel-heading">
|
||||
<div>
|
||||
<h2>{{ rankingSubject }}订单量占比排名</h2>
|
||||
<p>按{{ rankingSubject }}归属统计,排除取消、拒收及退款</p>
|
||||
</div>
|
||||
<span>单位:单</span>
|
||||
</div>
|
||||
<div v-if="dashboard.rankings.orders.length" class="bar-list">
|
||||
<div v-for="(item, index) in dashboard.rankings.orders" :key="`order-${item.id}`" class="bar-row">
|
||||
<span class="bar-name" :title="item.name"><b>{{ index + 1 }}</b>{{ item.name }}</span>
|
||||
<div class="bar-track"><i class="is-teal" :style="{ width: barWidth(item.value, totalOrderValue) }" /></div>
|
||||
<strong><span>{{ formatNumber(item.value) }} 单</span><small>{{ formatShare(item.value, totalOrderValue) }}</small></strong>
|
||||
</div>
|
||||
</div>
|
||||
<el-empty v-else :image-size="54" description="当前范围暂无订单数据" />
|
||||
</article>
|
||||
|
||||
<article class="panel ranking-panel">
|
||||
<div class="panel-heading">
|
||||
<div>
|
||||
<h2>部门金额占比</h2>
|
||||
<p>仅统计未取消、未拒收且未退款的有效金额</p>
|
||||
</div>
|
||||
<span>单位:元</span>
|
||||
</div>
|
||||
<div v-if="dashboard.rankings.amounts.length" class="bar-list">
|
||||
<div v-for="item in dashboard.rankings.amounts" :key="`amount-${item.id}`" class="bar-row">
|
||||
<span class="bar-name" :title="item.name">{{ item.name }}</span>
|
||||
<div class="bar-track"><i class="is-blue" :style="{ width: barWidth(item.value, maxAmountValue) }" /></div>
|
||||
<strong>{{ formatMoney(item.value) }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
<div>
|
||||
<h2>{{ rankingSubject }}金额占比排名</h2>
|
||||
<p>按{{ rankingSubject }}归属统计,仅含未取消、未拒收且未退款的有效金额</p>
|
||||
</div>
|
||||
<span>单位:元</span>
|
||||
</div>
|
||||
<div v-if="dashboard.rankings.amounts.length" class="bar-list">
|
||||
<div v-for="(item, index) in dashboard.rankings.amounts" :key="`amount-${item.id}`" class="bar-row">
|
||||
<span class="bar-name" :title="item.name"><b>{{ index + 1 }}</b>{{ item.name }}</span>
|
||||
<div class="bar-track"><i class="is-blue" :style="{ width: barWidth(item.value, totalAmountValue) }" /></div>
|
||||
<strong><span>{{ formatMoney(item.value) }}</span><small>{{ formatShare(item.value, totalAmountValue) }}</small></strong>
|
||||
</div>
|
||||
</div>
|
||||
<el-empty v-else :image-size="54" description="当前范围暂无金额数据" />
|
||||
</article>
|
||||
</section>
|
||||
@@ -156,7 +156,7 @@
|
||||
default-expand-all
|
||||
class="detail-table"
|
||||
>
|
||||
<el-table-column prop="name" label="部门 / 人员" min-width="280" fixed="left">
|
||||
<el-table-column prop="name" label="部门 / 人员" min-width="220" fixed="left">
|
||||
<template #default="{ row }">
|
||||
<strong :class="{ 'is-parent': Array.isArray(row.children) && row.children.length, 'is-member': row.type === 'member' }">
|
||||
{{ row.name }}
|
||||
@@ -178,34 +178,34 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="add_fans_count" label="加粉" min-width="88" align="right" />
|
||||
<el-table-column prop="total_open_count" label="开口" min-width="88" align="right" />
|
||||
<el-table-column prop="paid_appointment_count" label="挂号" min-width="88" align="right" />
|
||||
<el-table-column prop="appointment_total_count" label="预约" min-width="88" align="right" />
|
||||
<el-table-column prop="interview_count" label="面诊" min-width="88" align="right" />
|
||||
<el-table-column prop="completed_order_count" label="接诊诊单" min-width="104" align="right" />
|
||||
<el-table-column label="接诊金额" min-width="120" align="right">
|
||||
<el-table-column prop="add_fans_count" label="加粉" min-width="72" align="right" />
|
||||
<el-table-column prop="total_open_count" label="开口" min-width="72" align="right" />
|
||||
<el-table-column prop="paid_appointment_count" label="挂号" min-width="72" align="right" />
|
||||
<el-table-column prop="appointment_total_count" label="预约" min-width="72" align="right" />
|
||||
<el-table-column prop="interview_count" label="面诊" min-width="72" align="right" />
|
||||
<el-table-column prop="completed_order_count" label="接诊诊单" min-width="88" align="right" />
|
||||
<el-table-column label="接诊金额" min-width="104" align="right">
|
||||
<template #default="{ row }">{{ formatMoney(row.completed_order_amount) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开口率" min-width="96" align="right">
|
||||
<el-table-column label="开口率" min-width="82" align="right">
|
||||
<template #default="{ row }">{{ formatPercent(row.total_open_rate) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="挂号率" min-width="96" align="right">
|
||||
<el-table-column label="挂号率" min-width="82" align="right">
|
||||
<template #default="{ row }">{{ formatPercent(row.paid_appointment_rate) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="面诊率" min-width="96" align="right">
|
||||
<el-table-column label="面诊率" min-width="82" align="right">
|
||||
<template #default="{ row }">{{ formatPercent(row.interview_paid_rate) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预约率" min-width="96" align="right">
|
||||
<el-table-column label="预约率" min-width="82" align="right">
|
||||
<template #default="{ row }">{{ formatPercent(row.interview_rate) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="面诊接诊率" min-width="116" align="right">
|
||||
<el-table-column label="面诊接诊率" min-width="100" align="right">
|
||||
<template #default="{ row }">{{ formatPercent(row.interview_receive_rate) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="接诊率" min-width="96" align="right">
|
||||
<el-table-column label="接诊率" min-width="82" align="right">
|
||||
<template #default="{ row }">{{ formatPercent(row.receive_rate) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="ROI" min-width="86" align="right">
|
||||
<el-table-column label="ROI" min-width="72" align="right">
|
||||
<template #default="{ row }">{{ formatRatio(row.roi) }}</template>
|
||||
</el-table-column>
|
||||
<template #empty><el-empty description="当前权限范围内暂无转化数据" /></template>
|
||||
@@ -291,9 +291,9 @@ type MediaChannelOption = {
|
||||
|
||||
const emptyDashboard = () => ({
|
||||
meta: {
|
||||
time_type: 'today', time_label: '今日', start_date: '', end_date: '', generated_at: '',
|
||||
scope_value: 4, scope_label: '', selected_dept_name: '', selected_assistant_name: '',
|
||||
selected_media_channel_code: '', selected_media_channel_name: '', open_count_source: ''
|
||||
time_type: 'today', time_label: '今日', start_date: '', end_date: '', generated_at: '',
|
||||
scope_value: 4, scope_label: '', selected_dept_name: '', selected_assistant_name: '',
|
||||
selected_media_channel_code: '', selected_media_channel_name: '', open_count_source: '', ranking_kind: 'hidden'
|
||||
},
|
||||
filters: {
|
||||
departments: [] as any[],
|
||||
@@ -364,8 +364,13 @@ const mediaChannelGroups = computed(() => {
|
||||
}
|
||||
return Array.from(groups.values())
|
||||
})
|
||||
const maxOrderValue = computed(() => Math.max(0, ...dashboard.rankings.orders.map(item => Number(item.value || 0))))
|
||||
const maxAmountValue = computed(() => Math.max(0, ...dashboard.rankings.amounts.map(item => Number(item.value || 0))))
|
||||
const rankingKind = computed(() => dashboard.meta.ranking_kind || (
|
||||
Number(dashboard.meta.scope_value) === 4 ? 'hidden' : Number(dashboard.meta.scope_value) === 3 ? 'member' : 'group'
|
||||
))
|
||||
const showRankings = computed(() => rankingKind.value !== 'hidden')
|
||||
const rankingSubject = computed(() => rankingKind.value === 'member' ? '组内成员' : '小组')
|
||||
const totalOrderValue = computed(() => dashboard.rankings.orders.reduce((total, item) => total + Number(item.value || 0), 0))
|
||||
const totalAmountValue = computed(() => dashboard.rankings.amounts.reduce((total, item) => total + Number(item.value || 0), 0))
|
||||
const targetChartOption = computed(() => ({
|
||||
animationDuration: 450,
|
||||
color: ['#0f9185', '#2f78df'],
|
||||
@@ -447,9 +452,14 @@ function formatMoney(value: any) {
|
||||
return `¥${Number(value || 0).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
|
||||
}
|
||||
|
||||
function formatPercent(value: any) {
|
||||
return `${Number(value || 0).toFixed(1)}%`
|
||||
}
|
||||
function formatPercent(value: any) {
|
||||
return `${Number(value || 0).toFixed(1)}%`
|
||||
}
|
||||
|
||||
function formatShare(value: any, total: number) {
|
||||
if (total <= 0) return '0.0%'
|
||||
return `${(Number(value || 0) / total * 100).toFixed(1)}%`
|
||||
}
|
||||
|
||||
function nullablePercent(value: any) {
|
||||
return value === null || value === undefined ? '未设置' : formatPercent(value)
|
||||
@@ -464,10 +474,11 @@ function compactNumber(value: number) {
|
||||
return String(Math.round(value))
|
||||
}
|
||||
|
||||
function barWidth(value: any, maximum: number) {
|
||||
if (maximum <= 0) return '0%'
|
||||
return `${Math.max(4, Math.min(100, Number(value || 0) / maximum * 100))}%`
|
||||
}
|
||||
function barWidth(value: any, total: number) {
|
||||
const numericValue = Number(value || 0)
|
||||
if (total <= 0 || numericValue <= 0) return '0%'
|
||||
return `${Math.max(4, Math.min(100, numericValue / total * 100))}%`
|
||||
}
|
||||
|
||||
function progressValue(value: any) {
|
||||
return Math.max(0, Math.min(100, Number(value || 0)))
|
||||
@@ -477,22 +488,29 @@ onMounted(loadDashboard)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.conversion-page {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
min-height: 640px;
|
||||
padding: 16px;
|
||||
color: #172033;
|
||||
background: #f4f6f8;
|
||||
}
|
||||
.conversion-page {
|
||||
display: grid;
|
||||
gap: 14px;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
min-height: 640px;
|
||||
padding: 16px;
|
||||
overflow-x: hidden;
|
||||
box-sizing: border-box;
|
||||
color: #172033;
|
||||
background: #f4f6f8;
|
||||
}
|
||||
|
||||
.page-heading,
|
||||
.filter-strip,
|
||||
.panel,
|
||||
.metric-card {
|
||||
border: 1px solid #dfe5ec;
|
||||
background: #fff;
|
||||
}
|
||||
.metric-card {
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #dfe5ec;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.page-heading {
|
||||
display: flex;
|
||||
@@ -566,7 +584,7 @@ onMounted(loadDashboard)
|
||||
}
|
||||
|
||||
.ranking-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
|
||||
.panel { padding: 16px; border-radius: 10px; }
|
||||
.panel { min-width: 0; max-width: 100%; padding: 16px; border-radius: 10px; box-sizing: border-box; }
|
||||
|
||||
.panel-heading {
|
||||
display: flex;
|
||||
@@ -580,18 +598,26 @@ onMounted(loadDashboard)
|
||||
> span { color: #929dac; font-size: 11px; white-space: nowrap; }
|
||||
}
|
||||
|
||||
.bar-list { display: grid; gap: 13px; }
|
||||
.bar-row { display: grid; grid-template-columns: 110px minmax(80px, 1fr) 94px; align-items: center; gap: 10px; }
|
||||
.bar-name { overflow: hidden; color: #66748a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.bar-row > strong { text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
|
||||
.bar-list { display: grid; gap: 13px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
|
||||
.bar-row { display: grid; grid-template-columns: 130px minmax(80px, 1fr) 116px; align-items: center; gap: 10px; }
|
||||
.bar-name { overflow: hidden; color: #66748a; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.bar-name b { display: inline-block; width: 20px; margin-right: 7px; color: #98a2b3; font-size: 11px; font-weight: 650; text-align: center; }
|
||||
.bar-row > strong { display: flex; align-items: baseline; justify-content: flex-end; gap: 7px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
|
||||
.bar-row > strong small { color: #8a95a5; font-size: 10px; font-weight: 500; }
|
||||
.bar-track { height: 18px; overflow: hidden; border-radius: 5px; background: #edf1f5; }
|
||||
.bar-track i { display: block; height: 100%; border-radius: 5px; transition: width .35s ease; }
|
||||
.bar-track i.is-teal { background: #15998d; }
|
||||
.bar-track i.is-blue { background: #307bdf; }
|
||||
|
||||
.detail-panel { padding-bottom: 10px; }
|
||||
.detail-table {
|
||||
:deep(th.el-table__cell) { color: #66748a; background: #f7f9fb; font-size: 12px; }
|
||||
.detail-panel { padding-bottom: 10px; overflow: hidden; }
|
||||
.detail-table {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
|
||||
:deep(.el-table__inner-wrapper),
|
||||
:deep(.el-scrollbar) { max-width: 100%; }
|
||||
:deep(th.el-table__cell) { color: #66748a; background: #f7f9fb; font-size: 12px; }
|
||||
:deep(td.el-table__cell) { color: #273347; font-size: 12px; }
|
||||
:deep(.el-table__row--level-0 > td.el-table__cell) { background: #edf7f5; font-weight: 650; }
|
||||
strong.is-parent { color: #172033; font-weight: 700; }
|
||||
@@ -632,7 +658,7 @@ onMounted(loadDashboard)
|
||||
.metric-grid, .ranking-grid { grid-template-columns: 1fr; }
|
||||
.filter-item, .filter-item--time { width: 100%; align-items: flex-start; flex-direction: column; }
|
||||
.employee-select, .dept-select, .channel-select { width: 100%; }
|
||||
.bar-row { grid-template-columns: 90px minmax(70px, 1fr) 82px; }
|
||||
.bar-row { grid-template-columns: 100px minmax(70px, 1fr) 96px; }
|
||||
.target-summary { grid-template-columns: 1fr; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<article class="metric-card">
|
||||
<article v-if="dashboard.scope.kind !== 'assistant'" class="metric-card">
|
||||
<div class="metric-label-row">
|
||||
<span>本人本月业绩</span>
|
||||
<el-tooltip :content="dashboard.meta.commission_note" placement="top">
|
||||
@@ -151,11 +151,11 @@
|
||||
<div class="panel-header">
|
||||
<div>
|
||||
<h2>{{ dashboard.rankings.appointments.title }}</h2>
|
||||
<p>{{ appointmentRankingSubtitle }}</p>
|
||||
<p v-if="appointmentRankingSubtitle">{{ appointmentRankingSubtitle }}</p>
|
||||
</div>
|
||||
<div class="panel-header-actions">
|
||||
<el-tree-select
|
||||
v-if="dashboard.rankings.appointments.kind !== 'doctor'"
|
||||
v-if="showRankingDeptSelect"
|
||||
v-model="rankingDeptId"
|
||||
:data="dashboard.filters.ranking_departments"
|
||||
:props="departmentTreeProps"
|
||||
@@ -164,7 +164,7 @@
|
||||
clearable
|
||||
filterable
|
||||
default-expand-all
|
||||
placeholder="全部可见部门"
|
||||
placeholder="全部部门"
|
||||
class="ranking-dept-select"
|
||||
@change="handleRankingDeptChange"
|
||||
/>
|
||||
@@ -176,12 +176,16 @@
|
||||
v-for="(item, index) in dashboard.rankings.appointments.items"
|
||||
:key="`appointment-${item.id}-${index}`"
|
||||
class="ranking-row"
|
||||
:class="{ 'is-self': item.is_self }"
|
||||
>
|
||||
<span class="ranking-index" :class="{ 'is-top': index < 2 }">{{ index + 1 }}</span>
|
||||
<span class="ranking-index" :class="{ 'is-top': index < 2, 'is-self': item.is_self }">{{ index + 1 }}</span>
|
||||
<div class="ranking-main">
|
||||
<div class="ranking-copy">
|
||||
<strong>{{ item.name || '未命名成员' }}</strong>
|
||||
<span>{{ formatNumber(item.count) }} 挂号</span>
|
||||
<strong>
|
||||
{{ item.name || '未命名成员' }}
|
||||
<i v-if="item.is_self" class="ranking-self-tag">我</i>
|
||||
</strong>
|
||||
<span>{{ formatNumber(item.count) }} {{ rankingCountUnit }}</span>
|
||||
</div>
|
||||
<div class="ranking-meter" aria-hidden="true">
|
||||
<span :style="{ width: rankingWidth(item.count, appointmentRankingMax) }" />
|
||||
@@ -190,14 +194,16 @@
|
||||
<b class="ranking-value">{{ formatNumber(item.count) }}</b>
|
||||
</div>
|
||||
</div>
|
||||
<el-empty v-else :image-size="72" description="当前数据范围内暂无挂号排行" />
|
||||
<el-empty v-else :image-size="72" :description="`当前数据范围内暂无${rankingCountUnit}排行`" />
|
||||
</article>
|
||||
|
||||
<article class="dashboard-panel ranking-panel">
|
||||
<div class="panel-header">
|
||||
<div>
|
||||
<h2>{{ dashboard.rankings.performance.title }}</h2>
|
||||
<p>{{ dashboard.rankings.performance.scope_label }}内今日计入业绩的业务订单</p>
|
||||
<p>
|
||||
{{ performanceRankingSubtitle }}
|
||||
</p>
|
||||
</div>
|
||||
<span class="panel-meta">今日</span>
|
||||
</div>
|
||||
@@ -206,11 +212,15 @@
|
||||
v-for="(item, index) in dashboard.rankings.performance.items"
|
||||
:key="`performance-${item.id}-${index}`"
|
||||
class="ranking-row"
|
||||
:class="{ 'is-self': item.is_self }"
|
||||
>
|
||||
<span class="ranking-index" :class="{ 'is-top': index < 2 }">{{ index + 1 }}</span>
|
||||
<span class="ranking-index" :class="{ 'is-top': index < 2, 'is-self': item.is_self }">{{ index + 1 }}</span>
|
||||
<div class="ranking-main">
|
||||
<div class="ranking-copy">
|
||||
<strong>{{ item.name || '未命名部门' }}</strong>
|
||||
<strong>
|
||||
{{ item.name || (dashboard.rankings.performance.kind === 'person' ? '未命名成员' : '未命名部门') }}
|
||||
<i v-if="item.is_self" class="ranking-self-tag">我</i>
|
||||
</strong>
|
||||
<span>{{ formatNumber(item.count) }} 个诊单</span>
|
||||
</div>
|
||||
<div class="ranking-meter" aria-hidden="true">
|
||||
@@ -335,6 +345,7 @@ interface RankingItem {
|
||||
name: string
|
||||
count: number
|
||||
amount: number
|
||||
is_self?: boolean
|
||||
}
|
||||
|
||||
type ComparisonDirection = 'up' | 'down' | 'flat'
|
||||
@@ -355,10 +366,12 @@ const emptyComparison = (): MetricComparison => ({
|
||||
const createInitialDashboard = () => ({
|
||||
scope: {
|
||||
key: '',
|
||||
kind: '',
|
||||
scope_value: 4,
|
||||
label: '',
|
||||
is_limited: true,
|
||||
viewer_name: '',
|
||||
viewer_id: 0,
|
||||
role_ids: [] as number[],
|
||||
role_names: [] as string[],
|
||||
department_names: [] as string[],
|
||||
@@ -401,11 +414,13 @@ const createInitialDashboard = () => ({
|
||||
appointments: {
|
||||
title: '实时挂号排行',
|
||||
kind: 'assistant',
|
||||
metric: 'registration',
|
||||
scope_label: '',
|
||||
items: [] as RankingItem[],
|
||||
},
|
||||
performance: {
|
||||
title: '今日部门业绩排行',
|
||||
kind: 'dept',
|
||||
scope_label: '',
|
||||
items: [] as RankingItem[],
|
||||
},
|
||||
@@ -413,6 +428,7 @@ const createInitialDashboard = () => ({
|
||||
filters: {
|
||||
ranking_departments: [] as any[],
|
||||
ranking_dept_id: 0,
|
||||
ranking_selectable: true,
|
||||
},
|
||||
trend: {
|
||||
date_range: [] as string[],
|
||||
@@ -533,9 +549,34 @@ const currentDate = computed(() => new Intl.DateTimeFormat('zh-CN', {
|
||||
weekday: 'short',
|
||||
}).format(now.value))
|
||||
|
||||
const showRankingDeptSelect = computed(() => (
|
||||
dashboard.filters.ranking_selectable !== false
|
||||
&& dashboard.scope.kind !== 'group_leader'
|
||||
&& dashboard.rankings.appointments.kind !== 'doctor'
|
||||
&& dashboard.filters.ranking_departments.length > 0
|
||||
))
|
||||
|
||||
const rankingCountUnit = computed(() => (
|
||||
dashboard.rankings.appointments.metric === 'appointment' ? '预约' : '挂号'
|
||||
))
|
||||
|
||||
const appointmentRankingSubtitle = computed(() => {
|
||||
if (dashboard.rankings.appointments.metric === 'appointment') {
|
||||
return ''
|
||||
}
|
||||
const actor = dashboard.rankings.appointments.kind === 'doctor' ? '医生' : '成员'
|
||||
return `${dashboard.rankings.appointments.scope_label}内${actor}已支付且实收低于 10 元的订单数`
|
||||
const scopeLabel = dashboard.rankings.appointments.scope_label || '当前部门'
|
||||
return `${scopeLabel}内${actor}已支付且实收低于 10 元的订单数`
|
||||
})
|
||||
|
||||
const performanceRankingSubtitle = computed(() => {
|
||||
const scopeLabel = dashboard.rankings.performance.scope_label || '当前部门'
|
||||
if (dashboard.rankings.performance.kind === 'person') {
|
||||
return dashboard.scope.kind === 'group_leader'
|
||||
? '本小组内今日计入业绩的个人订单'
|
||||
: `${scopeLabel}内今日计入业绩的个人订单`
|
||||
}
|
||||
return `${scopeLabel}内今日计入业绩的业务订单`
|
||||
})
|
||||
|
||||
const appointmentRankingMax = computed(() => Math.max(
|
||||
@@ -656,7 +697,7 @@ const loadDashboard = async () => {
|
||||
errorMessage.value = ''
|
||||
try {
|
||||
const res: any = await performanceDashboardOverview({
|
||||
ranking_dept_id: rankingDeptId.value,
|
||||
ranking_dept_id: loaded.value ? (rankingDeptId.value || 0) : undefined,
|
||||
// 驾驶舱是实时数据,避免浏览器或反向代理复用旧的 GET 响应。
|
||||
_t: Date.now(),
|
||||
})
|
||||
@@ -998,6 +1039,11 @@ onBeforeUnmount(() => {
|
||||
padding: 7px 9px;
|
||||
border-radius: 11px;
|
||||
background: var(--dash-surface-muted);
|
||||
|
||||
&.is-self {
|
||||
background: color-mix(in srgb, var(--dash-accent) 16%, var(--dash-surface));
|
||||
box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dash-accent) 42%, transparent);
|
||||
}
|
||||
}
|
||||
|
||||
.ranking-index {
|
||||
@@ -1017,6 +1063,24 @@ onBeforeUnmount(() => {
|
||||
color: #fff;
|
||||
background: var(--dash-accent);
|
||||
}
|
||||
|
||||
&.is-self:not(.is-top) {
|
||||
color: var(--dash-accent);
|
||||
background: color-mix(in srgb, var(--dash-accent) 18%, var(--el-fill-color-light));
|
||||
font-weight: 750;
|
||||
}
|
||||
}
|
||||
|
||||
.ranking-self-tag {
|
||||
flex-shrink: 0;
|
||||
padding: 0 5px;
|
||||
border-radius: 6px;
|
||||
color: #fff;
|
||||
font-size: 10px;
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
line-height: 18px;
|
||||
background: var(--dash-accent);
|
||||
}
|
||||
|
||||
.ranking-main {
|
||||
@@ -1032,6 +1096,9 @@ onBeforeUnmount(() => {
|
||||
margin-bottom: 5px;
|
||||
|
||||
strong {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user