File tree Expand file tree Collapse file tree 2 files changed +22
-22
lines changed
src/views/crm/statistics/customer/components Expand file tree Collapse file tree 2 files changed +22
-22
lines changed Original file line number Diff line number Diff line change 11
11
<el-card shadow =" never" class =" mt-16px" >
12
12
<el-table v-loading =" loading" :data =" list" >
13
13
<el-table-column label =" 序号" align =" center" type =" index" width =" 80" />
14
- <el-table-column
15
- label =" 区域"
16
- align =" center"
17
- prop =" areaName"
18
- min-width =" 200"
19
- :formatter =" (_, __, val: any) => val ?? '未知'"
20
- />
14
+ <el-table-column label =" 区域" align =" center" prop =" areaName" min-width =" 200" />
21
15
<el-table-column
22
16
label =" 成交周期(天)"
23
17
align =" center"
@@ -112,13 +106,19 @@ const echartsOption = reactive<EChartsOption>({
112
106
/** 获取数据并填充图表 */
113
107
const fetchAndFill = async () => {
114
108
// 1. 加载统计数据
115
- const customerDealCycleByArea = await StatisticsCustomerApi .getCustomerDealCycleByArea (
116
- props .queryParams
117
- )
109
+ const customerDealCycleByArea = (
110
+ await StatisticsCustomerApi .getCustomerDealCycleByArea (props .queryParams )
111
+ ).map ((s : CrmStatisticsCustomerDealCycleByAreaRespVO ) => {
112
+ return {
113
+ areaName: s .areaName ,
114
+ customerDealCycle: s .customerDealCycle ,
115
+ customerDealCount: s .customerDealCount
116
+ }
117
+ })
118
118
// 2.1 更新 Echarts 数据
119
119
if (echartsOption .xAxis && echartsOption .xAxis [' data' ]) {
120
120
echartsOption .xAxis [' data' ] = customerDealCycleByArea .map (
121
- (s : CrmStatisticsCustomerDealCycleByAreaRespVO ) => s .areaName ?? ' 未知 '
121
+ (s : CrmStatisticsCustomerDealCycleByAreaRespVO ) => s .areaName
122
122
)
123
123
}
124
124
if (echartsOption .series && echartsOption .series [0 ] && echartsOption .series [0 ][' data' ]) {
Original file line number Diff line number Diff line change 11
11
<el-card shadow =" never" class =" mt-16px" >
12
12
<el-table v-loading =" loading" :data =" list" >
13
13
<el-table-column label =" 序号" align =" center" type =" index" width =" 80" />
14
- <el-table-column
15
- label =" 产品名称"
16
- align =" center"
17
- prop =" productName"
18
- min-width =" 200"
19
- :formatter =" (_, __, val: any) => val ?? '未知'"
20
- />
14
+ <el-table-column label =" 产品名称" align =" center" prop =" productName" min-width =" 200" />
21
15
<el-table-column
22
16
label =" 成交周期(天)"
23
17
align =" center"
@@ -112,13 +106,19 @@ const echartsOption = reactive<EChartsOption>({
112
106
/** 获取数据并填充图表 */
113
107
const fetchAndFill = async () => {
114
108
// 1. 加载统计数据
115
- const customerDealCycleByProduct = await StatisticsCustomerApi .getCustomerDealCycleByProduct (
116
- props .queryParams
117
- )
109
+ const customerDealCycleByProduct = (
110
+ await StatisticsCustomerApi .getCustomerDealCycleByProduct (props .queryParams )
111
+ ).map ((s : CrmStatisticsCustomerDealCycleByProductRespVO ) => {
112
+ return {
113
+ productName: s .productName ?? ' 未知' ,
114
+ customerDealCycle: s .customerDealCount ,
115
+ customerDealCount: s .customerDealCount
116
+ }
117
+ })
118
118
// 2.1 更新 Echarts 数据
119
119
if (echartsOption .xAxis && echartsOption .xAxis [' data' ]) {
120
120
echartsOption .xAxis [' data' ] = customerDealCycleByProduct .map (
121
- (s : CrmStatisticsCustomerDealCycleByProductRespVO ) => s .productName ?? ' 未知 '
121
+ (s : CrmStatisticsCustomerDealCycleByProductRespVO ) => s .productName
122
122
)
123
123
}
124
124
if (echartsOption .series && echartsOption .series [0 ] && echartsOption .series [0 ][' data' ]) {
You can’t perform that action at this time.
0 commit comments