Compare commits
2 Commits
5e29aa77d6
...
f1fe585fc4
| Author | SHA1 | Date | |
|---|---|---|---|
| f1fe585fc4 | |||
| d385d22cf5 |
@@ -5,7 +5,7 @@ import { useUserStore } from '@/stores/user'
|
|||||||
|
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
baseURL: 'http://192.168.15.54:8890' || '', // API基础路径,支持完整URL
|
baseURL: 'http://192.168.15.53:8890' || '', // API基础路径,支持完整URL
|
||||||
timeout: 100000, // 请求超时时间
|
timeout: 100000, // 请求超时时间
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json;charset=UTF-8'
|
'Content-Type': 'application/json;charset=UTF-8'
|
||||||
|
|||||||
@@ -327,11 +327,8 @@ async function getUrgentProblem() {
|
|||||||
const res = await getProblemDistribution(hasParams ? params : undefined)
|
const res = await getProblemDistribution(hasParams ? params : undefined)
|
||||||
if(res.code === 200) {
|
if(res.code === 200) {
|
||||||
// 将API返回的对象格式转换为数组格式
|
// 将API返回的对象格式转换为数组格式
|
||||||
const problemDistribution = res.data.problem_distribution
|
const problemDistributionCount = res.data.problem_distribution_count
|
||||||
urgentProblemData.value = Object.entries(problemDistribution).map(([name, percentage]) => ({
|
urgentProblemData.value = Object.entries(problemDistributionCount).map(([name, value]) => ({ name, value }))
|
||||||
name: name,
|
|
||||||
value: parseInt(percentage.replace('%', '')) || 0
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取紧急问题数据失败:', error)
|
console.error('获取紧急问题数据失败:', error)
|
||||||
|
|||||||
@@ -148,9 +148,6 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<!-- Loading组件 -->
|
|
||||||
<Loading :visible="isLoading" text="正在加载数据..." />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ const tooltip = reactive({
|
|||||||
const metricDescriptions = {
|
const metricDescriptions = {
|
||||||
conversionRate: {
|
conversionRate: {
|
||||||
title: '成交率计算方式',
|
title: '成交率计算方式',
|
||||||
description: '成交单数 ÷ 总线索数 × 100%,反映销售人员将潜在客户转化为实际成交的能力。'
|
description: '成交单数 ÷ 总线索数 × 100%'
|
||||||
},
|
},
|
||||||
totalDeals: {
|
totalDeals: {
|
||||||
title: '成交单数计算方式',
|
title: '成交单数计算方式',
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<h3>转化对比图</h3>
|
<h3>转化对比图</h3>
|
||||||
<div class="time-selector">
|
<div class="time-selector">
|
||||||
<select v-model="selectedTimeRange" @change="handleTimeRangeChange" class="time-select">
|
<select v-model="selectedTimeRange" @change="handleTimeRangeChange" class="time-select">
|
||||||
<option value="periods">本期 vs 上期</option>
|
|
||||||
<option value="month">本月 vs 上月</option>
|
<option value="month">本月 vs 上月</option>
|
||||||
|
<option value="periods">本期 vs 上期</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,7 +67,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
const emit = defineEmits(['time-range-change']);
|
const emit = defineEmits(['time-range-change']);
|
||||||
|
|
||||||
const selectedTimeRange = ref('periods');
|
const selectedTimeRange = ref('month');
|
||||||
|
|
||||||
// 计算属性:当前和上一期的标签
|
// 计算属性:当前和上一期的标签
|
||||||
const currentPeriodLabel = computed(() => {
|
const currentPeriodLabel = computed(() => {
|
||||||
|
|||||||
@@ -19,9 +19,6 @@
|
|||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span class="card-label">
|
<span class="card-label">
|
||||||
总成交单数
|
总成交单数
|
||||||
<span class="info-icon"
|
|
||||||
@mouseenter="showTooltip($event, 'totalSales')"
|
|
||||||
@mouseleave="hideTooltip">!</span>
|
|
||||||
</span>
|
</span>
|
||||||
<span class="card-trend" :class="getTrendClass(kpiData.totalSales.trend)">
|
<span class="card-trend" :class="getTrendClass(kpiData.totalSales.trend)">
|
||||||
{{ formatTrend(kpiData.totalSales.trend) }} vs 上期
|
{{ formatTrend(kpiData.totalSales.trend) }} vs 上期
|
||||||
@@ -84,10 +81,7 @@
|
|||||||
<div class="kpi-card">
|
<div class="kpi-card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span class="card-label">
|
<span class="card-label">
|
||||||
新增客户
|
今日新增客户
|
||||||
<span class="info-icon"
|
|
||||||
@mouseenter="showTooltip($event, 'newCustomers')"
|
|
||||||
@mouseleave="hideTooltip">!</span>
|
|
||||||
</span>
|
</span>
|
||||||
<span class="card-trend" :class="getTrendClass(kpiData.newCustomers.trend)">
|
<span class="card-trend" :class="getTrendClass(kpiData.newCustomers.trend)">
|
||||||
{{ formatTrend(kpiData.newCustomers.trend) }} vs 上期
|
{{ formatTrend(kpiData.newCustomers.trend) }} vs 上期
|
||||||
@@ -163,25 +157,21 @@ const tooltip = reactive({
|
|||||||
|
|
||||||
// 指标描述
|
// 指标描述
|
||||||
const metricDescriptions = {
|
const metricDescriptions = {
|
||||||
totalSales: {
|
|
||||||
title: '总成交单数计算方式',
|
|
||||||
description: '统计公司在选定时间范围内所有已完成的成交订单总数,包括各个中心、各个团队的成交业绩汇总。'
|
|
||||||
},
|
|
||||||
depositConversion: {
|
depositConversion: {
|
||||||
title: '定金转化率计算方式',
|
title: '定金转化率计算方式',
|
||||||
description: '定金转化率 = (支付定金客户数 / 意向客户总数) × 100%,反映从意向客户到付费客户的转化效果。'
|
description: '定金转化率 = (支付定金客户数 / 意向客户总数) × 100%'
|
||||||
},
|
},
|
||||||
totalCalls: {
|
totalCalls: {
|
||||||
title: '总通话次数计算方式',
|
title: '总通话次数计算方式',
|
||||||
description: '统计公司所有销售人员在选定时间范围内的外呼和接听通话总次数,包括有效通话和无效通话。'
|
description: '有效通话为接通电话次数,总通话为接通电话次数'
|
||||||
},
|
},
|
||||||
newCustomers: {
|
newCustomers: {
|
||||||
title: '新增客户计算方式',
|
title: '新增客户计算方式',
|
||||||
description: '统计在选定时间范围内新建档的客户数量,不包括重复录入的客户,按首次录入时间计算。'
|
description: '统计新建档的客户数量,不包括重复录入的客户,按首次录入时间计算。'
|
||||||
},
|
},
|
||||||
conversionRate: {
|
conversionRate: {
|
||||||
title: '中心转化率计算方式',
|
title: '转化率计算方式',
|
||||||
description: '中心转化率 = (成交客户数 / 总客户数) × 100%,反映整体销售转化效果和业务质量。'
|
description: '转化率 = (成交客户数 / 总客户数) × 100%'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user