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
449d1191
authored
May 04, 2024
by
scholar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix同比环比数据计算的bug。
parent
f4dd1bed
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
21 deletions
+21
-21
src/views/crm/statistics/performance/components/ContractCountPerformance.vue
+7
-7
src/views/crm/statistics/performance/components/ContractPricePerformance.vue
+7
-7
src/views/crm/statistics/performance/components/ReceivablePricePerformance.vue
+7
-7
No files found.
src/views/crm/statistics/performance/components/ContractCountPerformance.vue
View file @
449d1191
...
@@ -57,13 +57,13 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -57,13 +57,13 @@ const echartsOption = reactive<EChartsOption>({
data
:
[]
data
:
[]
},
},
{
{
name
:
'
同
比增长率(%)'
,
name
:
'
环
比增长率(%)'
,
type
:
'line'
,
type
:
'line'
,
yAxisIndex
:
1
,
yAxisIndex
:
1
,
data
:
[]
data
:
[]
},
},
{
{
name
:
'
环
比增长率(%)'
,
name
:
'
同
比增长率(%)'
,
type
:
'line'
,
type
:
'line'
,
yAxisIndex
:
1
,
yAxisIndex
:
1
,
data
:
[]
data
:
[]
...
@@ -166,7 +166,7 @@ const loadData = async () => {
...
@@ -166,7 +166,7 @@ const loadData = async () => {
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
)
)
echartsOption
.
series
[
3
][
'data'
]
=
performanceList
.
map
(
echartsOption
.
series
[
3
][
'data'
]
=
performanceList
.
map
(
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
!==
0
?
(
s
.
currentMonthCount
/
s
.
lastMonthCount
*
100
).
toFixed
(
2
)
:
'NULL'
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
!==
0
?
(
(
s
.
currentMonthCount
-
s
.
lastMonthCount
)
/
s
.
lastMonthCount
*
100
).
toFixed
(
2
)
:
'NULL'
)
)
}
}
if
(
echartsOption
.
series
&&
echartsOption
.
series
[
2
]
&&
echartsOption
.
series
[
2
][
'data'
])
{
if
(
echartsOption
.
series
&&
echartsOption
.
series
[
2
]
&&
echartsOption
.
series
[
2
][
'data'
])
{
...
@@ -174,7 +174,7 @@ const loadData = async () => {
...
@@ -174,7 +174,7 @@ const loadData = async () => {
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
)
)
echartsOption
.
series
[
4
][
'data'
]
=
performanceList
.
map
(
echartsOption
.
series
[
4
][
'data'
]
=
performanceList
.
map
(
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
!==
0
?
(
s
.
currentMonthCount
/
s
.
lastYearCount
*
100
).
toFixed
(
2
)
:
'NULL'
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
!==
0
?
(
(
s
.
currentMonthCount
-
s
.
lastYearCount
)
/
s
.
lastYearCount
*
100
).
toFixed
(
2
)
:
'NULL'
)
)
}
}
...
@@ -188,7 +188,7 @@ const loadData = async () => {
...
@@ -188,7 +188,7 @@ const loadData = async () => {
// 初始化数据
// 初始化数据
const
columnsData
=
reactive
([]);
const
columnsData
=
reactive
([]);
const
tableData
=
reactive
([{
title
:
'当月合同数量统计(个)'
},
{
title
:
'上月合同数量统计(个)'
},
const
tableData
=
reactive
([{
title
:
'当月合同数量统计(个)'
},
{
title
:
'上月合同数量统计(个)'
},
{
title
:
'去年当月合同数量统计(个)'
},
{
title
:
'
同比增长率(%)'
},
{
title
:
'环
比增长率(%)'
}])
{
title
:
'去年当月合同数量统计(个)'
},
{
title
:
'
环比增长率(%)'
},
{
title
:
'同
比增长率(%)'
}])
// 定义 convertListData 方法,数据行列转置,展示每月数据
// 定义 convertListData 方法,数据行列转置,展示每月数据
const
convertListData
=
()
=>
{
const
convertListData
=
()
=>
{
...
@@ -202,8 +202,8 @@ const convertListData = () => {
...
@@ -202,8 +202,8 @@ const convertListData = () => {
tableData
[
0
][
'prop'
+
index
]
=
item
.
currentMonthCount
tableData
[
0
][
'prop'
+
index
]
=
item
.
currentMonthCount
tableData
[
1
][
'prop'
+
index
]
=
item
.
lastMonthCount
tableData
[
1
][
'prop'
+
index
]
=
item
.
lastMonthCount
tableData
[
2
][
'prop'
+
index
]
=
item
.
lastYearCount
tableData
[
2
][
'prop'
+
index
]
=
item
.
lastYearCount
tableData
[
3
][
'prop'
+
index
]
=
item
.
lastMonthCount
!==
0
?
(
item
.
currentMonthCount
/
item
.
lastMonthCount
).
toFixed
(
2
)
:
'NULL'
tableData
[
3
][
'prop'
+
index
]
=
item
.
lastMonthCount
!==
0
?
(
(
item
.
currentMonthCount
-
item
.
lastMonthCount
)
/
item
.
lastMonthCount
*
100
).
toFixed
(
2
)
:
'NULL'
tableData
[
4
][
'prop'
+
index
]
=
item
.
lastYearCount
!==
0
?
(
item
.
currentMonthCount
/
item
.
lastYearCount
).
toFixed
(
2
)
:
'NULL'
tableData
[
4
][
'prop'
+
index
]
=
item
.
lastYearCount
!==
0
?
(
(
item
.
currentMonthCount
-
item
.
lastYearCount
)
/
item
.
lastYearCount
*
100
).
toFixed
(
2
)
:
'NULL'
})
})
}
}
...
...
src/views/crm/statistics/performance/components/ContractPricePerformance.vue
View file @
449d1191
...
@@ -57,13 +57,13 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -57,13 +57,13 @@ const echartsOption = reactive<EChartsOption>({
data
:
[]
data
:
[]
},
},
{
{
name
:
'
同
比增长率(%)'
,
name
:
'
环
比增长率(%)'
,
type
:
'line'
,
type
:
'line'
,
yAxisIndex
:
1
,
yAxisIndex
:
1
,
data
:
[]
data
:
[]
},
},
{
{
name
:
'
环
比增长率(%)'
,
name
:
'
同
比增长率(%)'
,
type
:
'line'
,
type
:
'line'
,
yAxisIndex
:
1
,
yAxisIndex
:
1
,
data
:
[]
data
:
[]
...
@@ -166,7 +166,7 @@ const loadData = async () => {
...
@@ -166,7 +166,7 @@ const loadData = async () => {
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
)
)
echartsOption
.
series
[
3
][
'data'
]
=
performanceList
.
map
(
echartsOption
.
series
[
3
][
'data'
]
=
performanceList
.
map
(
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
!==
0
?
(
s
.
currentMonthCount
/
s
.
lastMonthCount
*
100
).
toFixed
(
2
)
:
'NULL'
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
!==
0
?
(
(
s
.
currentMonthCount
-
s
.
lastMonthCount
)
/
s
.
lastMonthCount
*
100
).
toFixed
(
2
)
:
'NULL'
)
)
}
}
if
(
echartsOption
.
series
&&
echartsOption
.
series
[
2
]
&&
echartsOption
.
series
[
2
][
'data'
])
{
if
(
echartsOption
.
series
&&
echartsOption
.
series
[
2
]
&&
echartsOption
.
series
[
2
][
'data'
])
{
...
@@ -174,7 +174,7 @@ const loadData = async () => {
...
@@ -174,7 +174,7 @@ const loadData = async () => {
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
)
)
echartsOption
.
series
[
4
][
'data'
]
=
performanceList
.
map
(
echartsOption
.
series
[
4
][
'data'
]
=
performanceList
.
map
(
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
!==
0
?
(
s
.
currentMonthCount
/
s
.
lastYearCount
*
100
).
toFixed
(
2
)
:
'NULL'
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
!==
0
?
(
(
s
.
currentMonthCount
-
s
.
lastYearCount
)
/
s
.
lastYearCount
*
100
).
toFixed
(
2
)
:
'NULL'
)
)
}
}
...
@@ -188,7 +188,7 @@ const loadData = async () => {
...
@@ -188,7 +188,7 @@ const loadData = async () => {
// 初始化数据
// 初始化数据
const
columnsData
=
reactive
([]);
const
columnsData
=
reactive
([]);
const
tableData
=
reactive
([{
title
:
'当月合同金额统计(元)'
},
{
title
:
'上月合同金额统计(元)'
},
{
title
:
'去年当月合同金额统计(元)'
},
const
tableData
=
reactive
([{
title
:
'当月合同金额统计(元)'
},
{
title
:
'上月合同金额统计(元)'
},
{
title
:
'去年当月合同金额统计(元)'
},
{
title
:
'
同比增长率(%)'
},
{
title
:
'环
比增长率(%)'
}])
{
title
:
'
环比增长率(%)'
},
{
title
:
'同
比增长率(%)'
}])
// 定义 init 方法
// 定义 init 方法
const
convertListData
=
()
=>
{
const
convertListData
=
()
=>
{
...
@@ -202,8 +202,8 @@ const convertListData = () => {
...
@@ -202,8 +202,8 @@ const convertListData = () => {
tableData
[
0
][
'prop'
+
index
]
=
item
.
currentMonthCount
tableData
[
0
][
'prop'
+
index
]
=
item
.
currentMonthCount
tableData
[
1
][
'prop'
+
index
]
=
item
.
lastMonthCount
tableData
[
1
][
'prop'
+
index
]
=
item
.
lastMonthCount
tableData
[
2
][
'prop'
+
index
]
=
item
.
lastYearCount
tableData
[
2
][
'prop'
+
index
]
=
item
.
lastYearCount
tableData
[
3
][
'prop'
+
index
]
=
item
.
lastMonthCount
!==
0
?
(
item
.
currentMonthCount
/
item
.
lastMonthCount
).
toFixed
(
2
)
:
'NULL'
tableData
[
3
][
'prop'
+
index
]
=
item
.
lastMonthCount
!==
0
?
(
(
item
.
currentMonthCount
-
item
.
lastMonthCount
)
/
item
.
lastMonthCount
*
100
).
toFixed
(
2
)
:
'NULL'
tableData
[
4
][
'prop'
+
index
]
=
item
.
lastYearCount
!==
0
?
(
item
.
currentMonthCount
/
item
.
lastYearCount
).
toFixed
(
2
)
:
'NULL'
tableData
[
4
][
'prop'
+
index
]
=
item
.
lastYearCount
!==
0
?
(
(
item
.
currentMonthCount
-
item
.
lastYearCount
)
/
item
.
lastYearCount
*
100
).
toFixed
(
2
)
:
'NULL'
})
})
}
}
...
...
src/views/crm/statistics/performance/components/ReceivablePricePerformance.vue
View file @
449d1191
...
@@ -57,13 +57,13 @@ const echartsOption = reactive<EChartsOption>({
...
@@ -57,13 +57,13 @@ const echartsOption = reactive<EChartsOption>({
data
:
[]
data
:
[]
},
},
{
{
name
:
'
同
比增长率(%)'
,
name
:
'
环
比增长率(%)'
,
type
:
'line'
,
type
:
'line'
,
yAxisIndex
:
1
,
yAxisIndex
:
1
,
data
:
[]
data
:
[]
},
},
{
{
name
:
'
环
比增长率(%)'
,
name
:
'
同
比增长率(%)'
,
type
:
'line'
,
type
:
'line'
,
yAxisIndex
:
1
,
yAxisIndex
:
1
,
data
:
[]
data
:
[]
...
@@ -166,7 +166,7 @@ const loadData = async () => {
...
@@ -166,7 +166,7 @@ const loadData = async () => {
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
)
)
echartsOption
.
series
[
3
][
'data'
]
=
performanceList
.
map
(
echartsOption
.
series
[
3
][
'data'
]
=
performanceList
.
map
(
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
!==
0
?
(
s
.
currentMonthCount
/
s
.
lastMonthCount
*
100
).
toFixed
(
2
)
:
'NULL'
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastMonthCount
!==
0
?
(
(
s
.
currentMonthCount
-
s
.
lastMonthCount
)
/
s
.
lastMonthCount
*
100
).
toFixed
(
2
)
:
'NULL'
)
)
}
}
if
(
echartsOption
.
series
&&
echartsOption
.
series
[
2
]
&&
echartsOption
.
series
[
1
][
'data'
])
{
if
(
echartsOption
.
series
&&
echartsOption
.
series
[
2
]
&&
echartsOption
.
series
[
1
][
'data'
])
{
...
@@ -174,7 +174,7 @@ const loadData = async () => {
...
@@ -174,7 +174,7 @@ const loadData = async () => {
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
)
)
echartsOption
.
series
[
4
][
'data'
]
=
performanceList
.
map
(
echartsOption
.
series
[
4
][
'data'
]
=
performanceList
.
map
(
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
!==
0
?
(
s
.
currentMonthCount
/
s
.
lastYearCount
*
100
).
toFixed
(
2
)
:
'NULL'
(
s
:
StatisticsPerformanceRespVO
)
=>
s
.
lastYearCount
!==
0
?
(
(
s
.
currentMonthCount
-
s
.
lastYearCount
)
/
s
.
lastYearCount
*
100
).
toFixed
(
2
)
:
'NULL'
)
)
}
}
...
@@ -188,7 +188,7 @@ const loadData = async () => {
...
@@ -188,7 +188,7 @@ const loadData = async () => {
// 初始化数据
// 初始化数据
const
columnsData
=
reactive
([]);
const
columnsData
=
reactive
([]);
const
tableData
=
reactive
([{
title
:
'当月回款金额统计(元)'
},
{
title
:
'上月回款金额统计(元)'
},
const
tableData
=
reactive
([{
title
:
'当月回款金额统计(元)'
},
{
title
:
'上月回款金额统计(元)'
},
{
title
:
'去年当月回款金额统计(元)'
},
{
title
:
'
同比增长率(%)'
},
{
title
:
'环
比增长率(%)'
}]);
{
title
:
'去年当月回款金额统计(元)'
},
{
title
:
'
环比增长率(%)'
},
{
title
:
'同
比增长率(%)'
}]);
// 定义 init 方法
// 定义 init 方法
const
convertListData
=
()
=>
{
const
convertListData
=
()
=>
{
...
@@ -202,8 +202,8 @@ const convertListData = () => {
...
@@ -202,8 +202,8 @@ const convertListData = () => {
tableData
[
0
][
'prop'
+
index
]
=
item
.
currentMonthCount
tableData
[
0
][
'prop'
+
index
]
=
item
.
currentMonthCount
tableData
[
1
][
'prop'
+
index
]
=
item
.
lastMonthCount
tableData
[
1
][
'prop'
+
index
]
=
item
.
lastMonthCount
tableData
[
2
][
'prop'
+
index
]
=
item
.
lastYearCount
tableData
[
2
][
'prop'
+
index
]
=
item
.
lastYearCount
tableData
[
3
][
'prop'
+
index
]
=
item
.
lastMonthCount
!==
0
?
(
item
.
currentMonthCount
/
item
.
lastMonthCount
).
toFixed
(
2
)
:
'NULL'
tableData
[
3
][
'prop'
+
index
]
=
item
.
lastMonthCount
!==
0
?
(
(
item
.
currentMonthCount
-
item
.
lastMonthCount
)
/
item
.
lastMonthCount
*
100
).
toFixed
(
2
)
:
'NULL'
tableData
[
4
][
'prop'
+
index
]
=
item
.
lastYearCount
!==
0
?
(
item
.
currentMonthCount
/
item
.
lastYearCount
).
toFixed
(
2
)
:
'NULL'
tableData
[
4
][
'prop'
+
index
]
=
item
.
lastYearCount
!==
0
?
(
(
item
.
currentMonthCount
-
item
.
lastYearCount
)
/
item
.
lastYearCount
*
100
).
toFixed
(
2
)
:
'NULL'
})
})
}
}
...
...
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