Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
12972cdf
authored
Feb 24, 2024
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
CRM:将 bi 调整成 statistics
parent
dcfe1abb
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
35 additions
and
35 deletions
+35
-35
src/api/crm/statistics/rank.ts
+10
-10
src/views/crm/statistics/rank/ContactsCountRank.vue
+3
-3
src/views/crm/statistics/rank/ContractCountRank.vue
+3
-3
src/views/crm/statistics/rank/ContractPriceRank.vue
+3
-3
src/views/crm/statistics/rank/CustomerCountRank.vue
+3
-3
src/views/crm/statistics/rank/FollowCountRank.vue
+3
-3
src/views/crm/statistics/rank/FollowCustomerCountRank.vue
+3
-3
src/views/crm/statistics/rank/ProductSalesRank.vue
+3
-3
src/views/crm/statistics/rank/ReceivablePriceRank.vue
+3
-3
src/views/crm/statistics/rank/index.vue
+1
-1
No files found.
src/api/crm/
bi
/rank.ts
→
src/api/crm/
statistics
/rank.ts
View file @
12972cdf
import
request
from
'@/config/axios'
import
request
from
'@/config/axios'
export
interface
Bi
RankRespVO
{
export
interface
Statistics
RankRespVO
{
count
:
number
count
:
number
nickname
:
string
nickname
:
string
deptName
:
string
deptName
:
string
}
}
// 排行 API
// 排行 API
export
const
RankApi
=
{
export
const
Statistics
RankApi
=
{
// 获得合同排行榜
// 获得合同排行榜
getContractPriceRank
:
(
params
:
any
)
=>
{
getContractPriceRank
:
(
params
:
any
)
=>
{
return
request
.
get
({
return
request
.
get
({
url
:
'/crm/
bi
-rank/get-contract-price-rank'
,
url
:
'/crm/
statistics
-rank/get-contract-price-rank'
,
params
params
})
})
},
},
// 获得回款排行榜
// 获得回款排行榜
getReceivablePriceRank
:
(
params
:
any
)
=>
{
getReceivablePriceRank
:
(
params
:
any
)
=>
{
return
request
.
get
({
return
request
.
get
({
url
:
'/crm/
bi
-rank/get-receivable-price-rank'
,
url
:
'/crm/
statistics
-rank/get-receivable-price-rank'
,
params
params
})
})
},
},
// 签约合同排行
// 签约合同排行
getContractCountRank
:
(
params
:
any
)
=>
{
getContractCountRank
:
(
params
:
any
)
=>
{
return
request
.
get
({
return
request
.
get
({
url
:
'/crm/
bi
-rank/get-contract-count-rank'
,
url
:
'/crm/
statistics
-rank/get-contract-count-rank'
,
params
params
})
})
},
},
// 产品销量排行
// 产品销量排行
getProductSalesRank
:
(
params
:
any
)
=>
{
getProductSalesRank
:
(
params
:
any
)
=>
{
return
request
.
get
({
return
request
.
get
({
url
:
'/crm/
bi
-rank/get-product-sales-rank'
,
url
:
'/crm/
statistics
-rank/get-product-sales-rank'
,
params
params
})
})
},
},
// 新增客户数排行
// 新增客户数排行
getCustomerCountRank
:
(
params
:
any
)
=>
{
getCustomerCountRank
:
(
params
:
any
)
=>
{
return
request
.
get
({
return
request
.
get
({
url
:
'/crm/
bi
-rank/get-customer-count-rank'
,
url
:
'/crm/
statistics
-rank/get-customer-count-rank'
,
params
params
})
})
},
},
// 新增联系人数排行
// 新增联系人数排行
getContactsCountRank
:
(
params
:
any
)
=>
{
getContactsCountRank
:
(
params
:
any
)
=>
{
return
request
.
get
({
return
request
.
get
({
url
:
'/crm/
bi
-rank/get-contacts-count-rank'
,
url
:
'/crm/
statistics
-rank/get-contacts-count-rank'
,
params
params
})
})
},
},
// 跟进次数排行
// 跟进次数排行
getFollowCountRank
:
(
params
:
any
)
=>
{
getFollowCountRank
:
(
params
:
any
)
=>
{
return
request
.
get
({
return
request
.
get
({
url
:
'/crm/
bi
-rank/get-follow-count-rank'
,
url
:
'/crm/
statistics
-rank/get-follow-count-rank'
,
params
params
})
})
},
},
// 跟进客户数排行
// 跟进客户数排行
getFollowCustomerCountRank
:
(
params
:
any
)
=>
{
getFollowCustomerCountRank
:
(
params
:
any
)
=>
{
return
request
.
get
({
return
request
.
get
({
url
:
'/crm/
bi
-rank/get-follow-customer-count-rank'
,
url
:
'/crm/
statistics
-rank/get-follow-customer-count-rank'
,
params
params
})
})
}
}
...
...
src/views/crm/
bi
/rank/ContactsCountRank.vue
→
src/views/crm/
statistics
/rank/ContactsCountRank.vue
View file @
12972cdf
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</el-card>
</el-card>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
RankApi
,
BiRankRespVO
}
from
'@/api/crm/bi
/rank'
import
{
StatisticsRankApi
,
StatisticsRankRespVO
}
from
'@/api/crm/statistics
/rank'
import
{
EChartsOption
}
from
'echarts'
import
{
EChartsOption
}
from
'echarts'
import
{
clone
}
from
'lodash-es'
import
{
clone
}
from
'lodash-es'
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'ContactsCountRank' })
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'ContactsCountRank' })
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
loading
=
ref
(
false
)
// 加载中
const
loading
=
ref
(
false
)
// 加载中
const
list
=
ref
<
Bi
RankRespVO
[]
>
([])
// 列表的数据
const
list
=
ref
<
Statistics
RankRespVO
[]
>
([])
// 列表的数据
/** 柱状图配置:横向 */
/** 柱状图配置:横向 */
const
echartsOption
=
reactive
<
EChartsOption
>
({
const
echartsOption
=
reactive
<
EChartsOption
>
({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
// 1. 加载排行数据
// 1. 加载排行数据
loading
.
value
=
true
loading
.
value
=
true
const
rankingList
=
await
RankApi
.
getContactsCountRank
(
props
.
queryParams
)
const
rankingList
=
await
Statistics
RankApi
.
getContactsCountRank
(
props
.
queryParams
)
// 2.1 更新 Echarts 数据
// 2.1 更新 Echarts 数据
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
...
...
src/views/crm/
bi
/rank/ContractCountRank.vue
→
src/views/crm/
statistics
/rank/ContractCountRank.vue
View file @
12972cdf
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</el-card>
</el-card>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
RankApi
,
BiRankRespVO
}
from
'@/api/crm/bi
/rank'
import
{
StatisticsRankApi
,
StatisticsRankRespVO
}
from
'@/api/crm/statistics
/rank'
import
{
EChartsOption
}
from
'echarts'
import
{
EChartsOption
}
from
'echarts'
import
{
clone
}
from
'lodash-es'
import
{
clone
}
from
'lodash-es'
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'ContractCountRank' })
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'ContractCountRank' })
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
loading
=
ref
(
false
)
// 加载中
const
loading
=
ref
(
false
)
// 加载中
const
list
=
ref
<
Bi
RankRespVO
[]
>
([])
// 列表的数据
const
list
=
ref
<
Statistics
RankRespVO
[]
>
([])
// 列表的数据
/** 柱状图配置:横向 */
/** 柱状图配置:横向 */
const
echartsOption
=
reactive
<
EChartsOption
>
({
const
echartsOption
=
reactive
<
EChartsOption
>
({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
// 1. 加载排行数据
// 1. 加载排行数据
loading
.
value
=
true
loading
.
value
=
true
const
rankingList
=
await
RankApi
.
getContractCountRank
(
props
.
queryParams
)
const
rankingList
=
await
Statistics
RankApi
.
getContractCountRank
(
props
.
queryParams
)
// 2.1 更新 Echarts 数据
// 2.1 更新 Echarts 数据
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
...
...
src/views/crm/
bi
/rank/ContractPriceRank.vue
→
src/views/crm/
statistics
/rank/ContractPriceRank.vue
View file @
12972cdf
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</el-card>
</el-card>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
RankApi
,
BiRankRespVO
}
from
'@/api/crm/bi
/rank'
import
{
StatisticsRankApi
,
StatisticsRankRespVO
}
from
'@/api/crm/statistics
/rank'
import
{
EChartsOption
}
from
'echarts'
import
{
EChartsOption
}
from
'echarts'
import
{
clone
}
from
'lodash-es'
import
{
clone
}
from
'lodash-es'
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'ContractPriceRank' })
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'ContractPriceRank' })
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
loading
=
ref
(
false
)
// 加载中
const
loading
=
ref
(
false
)
// 加载中
const
list
=
ref
<
Bi
RankRespVO
[]
>
([])
// 列表的数据
const
list
=
ref
<
Statistics
RankRespVO
[]
>
([])
// 列表的数据
/** 柱状图配置:横向 */
/** 柱状图配置:横向 */
const
echartsOption
=
reactive
<
EChartsOption
>
({
const
echartsOption
=
reactive
<
EChartsOption
>
({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
// 1. 加载排行数据
// 1. 加载排行数据
loading
.
value
=
true
loading
.
value
=
true
const
rankingList
=
await
RankApi
.
getContractPriceRank
(
props
.
queryParams
)
const
rankingList
=
await
Statistics
RankApi
.
getContractPriceRank
(
props
.
queryParams
)
// 2.1 更新 Echarts 数据
// 2.1 更新 Echarts 数据
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
...
...
src/views/crm/
bi
/rank/CustomerCountRank.vue
→
src/views/crm/
statistics
/rank/CustomerCountRank.vue
View file @
12972cdf
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</el-card>
</el-card>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
RankApi
,
BiRankRespVO
}
from
'@/api/crm/bi
/rank'
import
{
StatisticsRankApi
,
StatisticsRankRespVO
}
from
'@/api/crm/statistics
/rank'
import
{
EChartsOption
}
from
'echarts'
import
{
EChartsOption
}
from
'echarts'
import
{
clone
}
from
'lodash-es'
import
{
clone
}
from
'lodash-es'
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'CustomerCountRank' })
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'CustomerCountRank' })
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
loading
=
ref
(
false
)
// 加载中
const
loading
=
ref
(
false
)
// 加载中
const
list
=
ref
<
Bi
RankRespVO
[]
>
([])
// 列表的数据
const
list
=
ref
<
Statistics
RankRespVO
[]
>
([])
// 列表的数据
/** 柱状图配置:横向 */
/** 柱状图配置:横向 */
const
echartsOption
=
reactive
<
EChartsOption
>
({
const
echartsOption
=
reactive
<
EChartsOption
>
({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
// 1. 加载排行数据
// 1. 加载排行数据
loading
.
value
=
true
loading
.
value
=
true
const
rankingList
=
await
RankApi
.
getCustomerCountRank
(
props
.
queryParams
)
const
rankingList
=
await
Statistics
RankApi
.
getCustomerCountRank
(
props
.
queryParams
)
// 2.1 更新 Echarts 数据
// 2.1 更新 Echarts 数据
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
...
...
src/views/crm/
bi
/rank/FollowCountRank.vue
→
src/views/crm/
statistics
/rank/FollowCountRank.vue
View file @
12972cdf
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</el-card>
</el-card>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
RankApi
,
BiRankRespVO
}
from
'@/api/crm/bi
/rank'
import
{
StatisticsRankApi
,
StatisticsRankRespVO
}
from
'@/api/crm/statistics
/rank'
import
{
EChartsOption
}
from
'echarts'
import
{
EChartsOption
}
from
'echarts'
import
{
clone
}
from
'lodash-es'
import
{
clone
}
from
'lodash-es'
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'FollowCountRank' })
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'FollowCountRank' })
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
loading
=
ref
(
false
)
// 加载中
const
loading
=
ref
(
false
)
// 加载中
const
list
=
ref
<
Bi
RankRespVO
[]
>
([])
// 列表的数据
const
list
=
ref
<
Statistics
RankRespVO
[]
>
([])
// 列表的数据
/** 柱状图配置:横向 */
/** 柱状图配置:横向 */
const
echartsOption
=
reactive
<
EChartsOption
>
({
const
echartsOption
=
reactive
<
EChartsOption
>
({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
// 1. 加载排行数据
// 1. 加载排行数据
loading
.
value
=
true
loading
.
value
=
true
const
rankingList
=
await
RankApi
.
getFollowCountRank
(
props
.
queryParams
)
const
rankingList
=
await
Statistics
RankApi
.
getFollowCountRank
(
props
.
queryParams
)
// 2.1 更新 Echarts 数据
// 2.1 更新 Echarts 数据
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
...
...
src/views/crm/
bi
/rank/FollowCustomerCountRank.vue
→
src/views/crm/
statistics
/rank/FollowCustomerCountRank.vue
View file @
12972cdf
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</el-card>
</el-card>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
RankApi
,
BiRankRespVO
}
from
'@/api/crm/bi
/rank'
import
{
StatisticsRankApi
,
StatisticsRankRespVO
}
from
'@/api/crm/statistics
/rank'
import
{
EChartsOption
}
from
'echarts'
import
{
EChartsOption
}
from
'echarts'
import
{
clone
}
from
'lodash-es'
import
{
clone
}
from
'lodash-es'
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'FollowCustomerCountRank' })
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'FollowCustomerCountRank' })
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
loading
=
ref
(
false
)
// 加载中
const
loading
=
ref
(
false
)
// 加载中
const
list
=
ref
<
Bi
RankRespVO
[]
>
([])
// 列表的数据
const
list
=
ref
<
Statistics
RankRespVO
[]
>
([])
// 列表的数据
/** 柱状图配置:横向 */
/** 柱状图配置:横向 */
const
echartsOption
=
reactive
<
EChartsOption
>
({
const
echartsOption
=
reactive
<
EChartsOption
>
({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
// 1. 加载排行数据
// 1. 加载排行数据
loading
.
value
=
true
loading
.
value
=
true
const
rankingList
=
await
RankApi
.
getFollowCustomerCountRank
(
props
.
queryParams
)
const
rankingList
=
await
Statistics
RankApi
.
getFollowCustomerCountRank
(
props
.
queryParams
)
// 2.1 更新 Echarts 数据
// 2.1 更新 Echarts 数据
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
...
...
src/views/crm/
bi
/rank/ProductSalesRank.vue
→
src/views/crm/
statistics
/rank/ProductSalesRank.vue
View file @
12972cdf
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</el-card>
</el-card>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
RankApi
,
BiRankRespVO
}
from
'@/api/crm/bi
/rank'
import
{
StatisticsRankApi
,
StatisticsRankRespVO
}
from
'@/api/crm/statistics
/rank'
import
{
EChartsOption
}
from
'echarts'
import
{
EChartsOption
}
from
'echarts'
import
{
clone
}
from
'lodash-es'
import
{
clone
}
from
'lodash-es'
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'ProductSalesRank' })
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'ProductSalesRank' })
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
loading
=
ref
(
false
)
// 加载中
const
loading
=
ref
(
false
)
// 加载中
const
list
=
ref
<
Bi
RankRespVO
[]
>
([])
// 列表的数据
const
list
=
ref
<
Statistics
RankRespVO
[]
>
([])
// 列表的数据
/** 柱状图配置:横向 */
/** 柱状图配置:横向 */
const
echartsOption
=
reactive
<
EChartsOption
>
({
const
echartsOption
=
reactive
<
EChartsOption
>
({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -80,7 +80,7 @@ const echartsOption = reactive<EChartsOption>({
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
// 1. 加载排行数据
// 1. 加载排行数据
loading
.
value
=
true
loading
.
value
=
true
const
rankingList
=
await
RankApi
.
getProductSalesRank
(
props
.
queryParams
)
const
rankingList
=
await
Statistics
RankApi
.
getProductSalesRank
(
props
.
queryParams
)
// 2.1 更新 Echarts 数据
// 2.1 更新 Echarts 数据
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
...
...
src/views/crm/
bi
/rank/ReceivablePriceRank.vue
→
src/views/crm/
statistics
/rank/ReceivablePriceRank.vue
View file @
12972cdf
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</el-card>
</el-card>
</
template
>
</
template
>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
RankApi
,
BiRankRespVO
}
from
'@/api/crm/bi
/rank'
import
{
StatisticsRankApi
,
StatisticsRankRespVO
}
from
'@/api/crm/statistics
/rank'
import
{
EChartsOption
}
from
'echarts'
import
{
EChartsOption
}
from
'echarts'
import
{
clone
}
from
'lodash-es'
import
{
clone
}
from
'lodash-es'
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'ReceivablePriceRank' })
...
@@ -26,7 +26,7 @@ defineOptions({ name: 'ReceivablePriceRank' })
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
props
=
defineProps
<
{
queryParams
:
any
}
>
()
// 搜索参数
const
loading
=
ref
(
false
)
// 加载中
const
loading
=
ref
(
false
)
// 加载中
const
list
=
ref
<
Bi
RankRespVO
[]
>
([])
// 列表的数据
const
list
=
ref
<
Statistics
RankRespVO
[]
>
([])
// 列表的数据
/** 柱状图配置:横向 */
/** 柱状图配置:横向 */
const
echartsOption
=
reactive
<
EChartsOption
>
({
const
echartsOption
=
reactive
<
EChartsOption
>
({
...
@@ -81,7 +81,7 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -81,7 +81,7 @@ const echartsOption = reactive<EChartsOption>({
const
loadData
=
async
()
=>
{
const
loadData
=
async
()
=>
{
// 1. 加载排行数据
// 1. 加载排行数据
loading
.
value
=
true
loading
.
value
=
true
const
rankingList
=
await
RankApi
.
getReceivablePriceRank
(
props
.
queryParams
)
const
rankingList
=
await
Statistics
RankApi
.
getReceivablePriceRank
(
props
.
queryParams
)
// 2.1 更新 Echarts 数据
// 2.1 更新 Echarts 数据
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
if
(
echartsOption
.
dataset
&&
echartsOption
.
dataset
[
'source'
])
{
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
echartsOption
.
dataset
[
'source'
]
=
clone
(
rankingList
).
reverse
()
...
...
src/views/crm/
bi
/rank/index.vue
→
src/views/crm/
statistics
/rank/index.vue
View file @
12972cdf
...
@@ -90,7 +90,7 @@ import * as DeptApi from '@/api/system/dept'
...
@@ -90,7 +90,7 @@ import * as DeptApi from '@/api/system/dept'
import
{
beginOfDay
,
defaultShortcuts
,
endOfDay
,
formatDate
}
from
'@/utils/formatTime'
import
{
beginOfDay
,
defaultShortcuts
,
endOfDay
,
formatDate
}
from
'@/utils/formatTime'
import
{
useUserStore
}
from
'@/store/modules/user'
import
{
useUserStore
}
from
'@/store/modules/user'
defineOptions
({
name
:
'Crm
Bi
Rank'
})
defineOptions
({
name
:
'Crm
Statistics
Rank'
})
const
queryParams
=
reactive
({
const
queryParams
=
reactive
({
deptId
:
useUserStore
().
getUser
.
deptId
,
deptId
:
useUserStore
().
getUser
.
deptId
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment