Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
shld-databoard-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘自豪 Rambo Pan
shld-databoard-ui
Commits
853e24e4
Commit
853e24e4
authored
Sep 25, 2023
by
张恒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
已开票已收款图表增加tooltip
parent
f1529c01
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
7 deletions
+50
-7
ar-company-bar.vue
src/module/databoard/components/chart/ar-company-bar.vue
+7
-0
ar-company-monthly-bar.vue
...ule/databoard/components/chart/ar-company-monthly-bar.vue
+14
-2
ar-monthly-bar.vue
src/module/databoard/components/chart/ar-monthly-bar.vue
+7
-0
ar-monthly-company-bar.vue
...ule/databoard/components/chart/ar-monthly-company-bar.vue
+7
-0
ar-summary-bar.vue
src/module/databoard/components/chart/ar-summary-bar.vue
+7
-0
index.vue
src/module/databoard/index.vue
+5
-5
numUtil.js
src/module/utils/numUtil.js
+3
-0
No files found.
src/module/databoard/components/chart/ar-company-bar.vue
View file @
853e24e4
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<
script
>
<
script
>
import
*
as
echarts
from
"echarts"
;
import
*
as
echarts
from
"echarts"
;
import
{
arCompanyBar
}
from
"../../../api/apiList"
;
import
{
arCompanyBar
}
from
"../../../api/apiList"
;
import
{
convert_num_unit
}
from
"../../../utils/numUtil"
;
export
default
{
export
default
{
name
:
"ArCompanyBar"
,
name
:
"ArCompanyBar"
,
...
@@ -12,6 +13,10 @@ export default {
...
@@ -12,6 +13,10 @@ export default {
return
{
return
{
arCompanyBar
:
null
,
arCompanyBar
:
null
,
barChart
:
{
barChart
:
{
tooltip
:
{
trigger
:
'axis'
,
formatter
:
(
params
)
=>
params
[
0
].
name
+
"<br>"
+
params
[
0
].
marker
+
"
\
t
\
t"
+
this
.
convert_num_unit
(
params
[
0
]),
},
title
:
{
title
:
{
show
:
true
,
show
:
true
,
text
:
"已开票未收款(结算单位)"
,
text
:
"已开票未收款(结算单位)"
,
...
@@ -80,6 +85,7 @@ export default {
...
@@ -80,6 +85,7 @@ export default {
show
:
true
,
show
:
true
,
position
:
'top'
,
position
:
'top'
,
color
:
"#FFFFFF"
,
color
:
"#FFFFFF"
,
formatter
:
this
.
convert_num_unit
},
},
emphasis
:
{
emphasis
:
{
focus
:
'self'
,
focus
:
'self'
,
...
@@ -90,6 +96,7 @@ export default {
...
@@ -90,6 +96,7 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
convert_num_unit
,
// 绘制图表
// 绘制图表
drawArCompanyBar
()
{
drawArCompanyBar
()
{
if
(
!
this
.
arCompanyBar
)
{
if
(
!
this
.
arCompanyBar
)
{
...
...
src/module/databoard/components/chart/ar-company-monthly-bar.vue
View file @
853e24e4
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<
script
>
<
script
>
import
*
as
echarts
from
"echarts"
;
import
*
as
echarts
from
"echarts"
;
import
{
arCompanyMonthlyBar
}
from
"../../../api/apiList"
;
import
{
arCompanyMonthlyBar
}
from
"../../../api/apiList"
;
import
{
convert_num_unit
}
from
"../../../utils/numUtil"
;
export
default
{
export
default
{
name
:
"ArCompanyMonthlyBar"
,
name
:
"ArCompanyMonthlyBar"
,
...
@@ -12,6 +13,10 @@ export default {
...
@@ -12,6 +13,10 @@ export default {
return
{
return
{
arCompanyMonthlyBar
:
null
,
arCompanyMonthlyBar
:
null
,
barChart
:
{
barChart
:
{
tooltip
:
{
trigger
:
'axis'
,
formatter
:
(
params
)
=>
params
[
0
].
name
+
"<br>"
+
params
[
0
].
marker
+
"
\
t"
+
this
.
convert_num_unit
(
params
[
0
])
+
"<br>"
+
params
[
1
].
marker
+
"
\
t"
+
params
[
1
].
data
+
"%"
,
},
title
:
{
title
:
{
show
:
true
,
show
:
true
,
text
:
"XXXXXX股份有限公司 已开票未收款(开票月份)"
,
text
:
"XXXXXX股份有限公司 已开票未收款(开票月份)"
,
...
@@ -55,7 +60,7 @@ export default {
...
@@ -55,7 +60,7 @@ export default {
type
:
"value"
,
type
:
"value"
,
position
:
"left"
,
position
:
"left"
,
show
:
false
,
show
:
false
,
max
:
1
max
:
1
00
}],
}],
series
:
[
series
:
[
{
{
...
@@ -82,19 +87,26 @@ export default {
...
@@ -82,19 +87,26 @@ export default {
show
:
true
,
show
:
true
,
position
:
'top'
,
position
:
'top'
,
color
:
"#FFFFFF"
,
color
:
"#FFFFFF"
,
formatter
:
this
.
convert_num_unit
},
},
},
},
{
{
type
:
"line"
,
type
:
"line"
,
barWidth
:
"40%"
,
barWidth
:
"40%"
,
yAxisIndex
:
1
,
yAxisIndex
:
1
,
data
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
]
data
:
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
label
:
{
show
:
true
,
color
:
"#FFFFFF"
,
formatter
:
(
params
)
=>
params
.
data
+
"%"
}
}
}
]
]
},
},
}
}
},
},
methods
:
{
methods
:
{
convert_num_unit
,
// 绘制图表
// 绘制图表
drawArCompanyMonthlyBar
()
{
drawArCompanyMonthlyBar
()
{
if
(
!
this
.
arCompanyMonthlyBar
)
{
if
(
!
this
.
arCompanyMonthlyBar
)
{
...
...
src/module/databoard/components/chart/ar-monthly-bar.vue
View file @
853e24e4
...
@@ -5,12 +5,17 @@
...
@@ -5,12 +5,17 @@
<
script
>
<
script
>
import
*
as
echarts
from
"echarts"
;
import
*
as
echarts
from
"echarts"
;
import
{
arMonthlyBar
}
from
"../../../api/apiList"
;
import
{
arMonthlyBar
}
from
"../../../api/apiList"
;
import
{
convert_num_unit
}
from
"../../../utils/numUtil"
;
export
default
{
export
default
{
name
:
"ArMonthlyBar"
,
name
:
"ArMonthlyBar"
,
data
()
{
data
()
{
return
{
return
{
barChart
:
{
barChart
:
{
tooltip
:
{
trigger
:
'axis'
,
formatter
:
(
params
)
=>
params
[
0
].
name
+
"<br>"
+
params
[
0
].
marker
+
"
\
t
\
t"
+
this
.
convert_num_unit
(
params
[
0
]),
},
title
:
{
title
:
{
show
:
true
,
show
:
true
,
text
:
"已开票未收款(开票月份)"
,
text
:
"已开票未收款(开票月份)"
,
...
@@ -74,6 +79,7 @@ export default {
...
@@ -74,6 +79,7 @@ export default {
show
:
true
,
show
:
true
,
position
:
'top'
,
position
:
'top'
,
color
:
"#FFFFFF"
,
color
:
"#FFFFFF"
,
formatter
:
this
.
convert_num_unit
},
},
emphasis
:
{
emphasis
:
{
focus
:
'self'
,
focus
:
'self'
,
...
@@ -85,6 +91,7 @@ export default {
...
@@ -85,6 +91,7 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
convert_num_unit
,
// 绘制图表
// 绘制图表
drawArMonthlyBar
()
{
drawArMonthlyBar
()
{
if
(
!
this
.
arMonthlyBar
)
{
if
(
!
this
.
arMonthlyBar
)
{
...
...
src/module/databoard/components/chart/ar-monthly-company-bar.vue
View file @
853e24e4
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
<
script
>
<
script
>
import
*
as
echarts
from
"echarts"
;
import
*
as
echarts
from
"echarts"
;
import
{
arMonthlyCompanyBar
}
from
"../../../api/apiList"
;
import
{
arMonthlyCompanyBar
}
from
"../../../api/apiList"
;
import
{
convert_num_unit
}
from
"../../../utils/numUtil"
;
export
default
{
export
default
{
name
:
"ArMonthlyCompanyBar"
,
name
:
"ArMonthlyCompanyBar"
,
...
@@ -12,6 +13,10 @@ export default {
...
@@ -12,6 +13,10 @@ export default {
return
{
return
{
arMonthlyCompanyBar
:
null
,
arMonthlyCompanyBar
:
null
,
barChart
:
{
barChart
:
{
tooltip
:
{
trigger
:
'axis'
,
formatter
:
(
params
)
=>
params
[
0
].
name
+
"<br>"
+
params
[
0
].
marker
+
"
\
t
\
t"
+
this
.
convert_num_unit
(
params
[
0
]),
},
title
:
{
title
:
{
show
:
true
,
show
:
true
,
text
:
"XXXX-XX 已开票未收款(结算单位)"
,
text
:
"XXXX-XX 已开票未收款(结算单位)"
,
...
@@ -75,12 +80,14 @@ export default {
...
@@ -75,12 +80,14 @@ export default {
show
:
true
,
show
:
true
,
position
:
'top'
,
position
:
'top'
,
color
:
"#FFFFFF"
,
color
:
"#FFFFFF"
,
formatter
:
this
.
convert_num_unit
},
},
}
}
},
},
}
}
},
},
methods
:
{
methods
:
{
convert_num_unit
,
// 绘制图表
// 绘制图表
drawArMonthlyCompanyBar
()
{
drawArMonthlyCompanyBar
()
{
if
(
!
this
.
arMonthlyCompanyBar
)
{
if
(
!
this
.
arMonthlyCompanyBar
)
{
...
...
src/module/databoard/components/chart/ar-summary-bar.vue
View file @
853e24e4
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<
script
>
<
script
>
import
*
as
echarts
from
"echarts"
;
import
*
as
echarts
from
"echarts"
;
import
{
convert_num_unit
}
from
"../../../utils/numUtil"
;
export
default
{
export
default
{
name
:
"ArSummaryBar"
,
name
:
"ArSummaryBar"
,
...
@@ -11,6 +12,10 @@ export default {
...
@@ -11,6 +12,10 @@ export default {
return
{
return
{
arSummaryBar
:
null
,
arSummaryBar
:
null
,
barChart
:
{
barChart
:
{
tooltip
:
{
trigger
:
'axis'
,
formatter
:
(
params
)
=>
params
[
0
].
name
+
"<br>"
+
params
[
0
].
marker
+
"
\
t
\
t"
+
this
.
convert_num_unit
(
params
[
0
]),
},
textStyle
:
{
textStyle
:
{
color
:
"#FFFFFF"
,
color
:
"#FFFFFF"
,
fontSize
:
"12"
fontSize
:
"12"
...
@@ -66,12 +71,14 @@ export default {
...
@@ -66,12 +71,14 @@ export default {
show
:
true
,
show
:
true
,
position
:
'top'
,
position
:
'top'
,
color
:
"#FFFFFF"
,
color
:
"#FFFFFF"
,
formatter
:
this
.
convert_num_unit
},
},
}
}
},
},
}
}
},
},
methods
:
{
methods
:
{
convert_num_unit
,
drawArSummaryBar
(
seriesData
)
{
drawArSummaryBar
(
seriesData
)
{
if
(
!
this
.
arSummaryBar
)
{
if
(
!
this
.
arSummaryBar
)
{
this
.
arSummaryBar
=
echarts
.
init
(
document
.
getElementById
(
'ar_summary_bar'
))
this
.
arSummaryBar
=
echarts
.
init
(
document
.
getElementById
(
'ar_summary_bar'
))
...
...
src/module/databoard/index.vue
View file @
853e24e4
...
@@ -473,11 +473,11 @@ export default {
...
@@ -473,11 +473,11 @@ export default {
arSummaryBar
().
then
(
res
=>
{
arSummaryBar
().
then
(
res
=>
{
let
data
=
res
.
data
let
data
=
res
.
data
let
seriesData
=
[]
let
seriesData
=
[]
seriesData
.
push
(
conver_num_retain
(
data
.
unsettled_amount
)
)
seriesData
.
push
(
data
.
unsettled_amount
)
seriesData
.
push
(
conver_num_retain
(
data
.
settled_amount
)
)
seriesData
.
push
(
data
.
settled_amount
)
seriesData
.
push
(
conver_num_retain
(
data
.
unregister_amount
)
)
seriesData
.
push
(
data
.
unregister_amount
)
seriesData
.
push
(
conver_num_retain
(
data
.
receivable_amount
)
)
seriesData
.
push
(
data
.
receivable_amount
)
seriesData
.
push
(
conver_num_retain
(
data
.
cancelled_amount
)
)
seriesData
.
push
(
data
.
cancelled_amount
)
this
.
arSummary
[
0
].
value
=
conver_num_retain
(
data
.
total_amount
)
this
.
arSummary
[
0
].
value
=
conver_num_retain
(
data
.
total_amount
)
this
.
arSummary
[
1
].
value
=
conver_num_retain
(
data
.
unregister_amount
)
this
.
arSummary
[
1
].
value
=
conver_num_retain
(
data
.
unregister_amount
)
this
.
arSummary
[
2
].
value
=
conver_num_retain
(
data
.
receivable_amount
)
this
.
arSummary
[
2
].
value
=
conver_num_retain
(
data
.
receivable_amount
)
...
...
src/module/utils/numUtil.js
View file @
853e24e4
...
@@ -43,6 +43,9 @@ export const conver_num_retain = function (amont) {
...
@@ -43,6 +43,9 @@ export const conver_num_retain = function (amont) {
return
formater
(
amont
)
return
formater
(
amont
)
}
}
export
const
convert_num_unit
=
function
(
params
)
{
return
formater
(
params
.
data
)
+
"万元"
}
//数字金额显示
//数字金额显示
function
formater
(
data
)
{
function
formater
(
data
)
{
...
...
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