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
f72613d8
Commit
f72613d8
authored
Sep 22, 2023
by
王礼鸿 Baimax Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据格式化提交
parent
c46c4c5b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
35 deletions
+69
-35
line-bar-chart.vue
src/module/databoard/components/chart/line-bar-chart.vue
+3
-0
ring-pie-chart.vue
src/module/databoard/components/chart/ring-pie-chart.vue
+10
-1
title-content-mark.vue
...module/databoard/components/layout/title-content-mark.vue
+2
-2
turnover-detail.vue
src/module/databoard/databoard/turnover-detail.vue
+33
-14
turnoverDetail.js
src/module/databoard/databoard/turnoverDetail.js
+12
-12
index.vue
src/module/databoard/index.vue
+9
-6
No files found.
src/module/databoard/components/chart/line-bar-chart.vue
View file @
f72613d8
...
...
@@ -175,6 +175,9 @@ export default {
{
type
:
'line'
,
color
:
'red'
,
lineStyle
:{
width
:
6
,
},
label
:
{
show
:
true
,
position
:
'bottom'
,
...
...
src/module/databoard/components/chart/ring-pie-chart.vue
View file @
f72613d8
...
...
@@ -17,6 +17,9 @@ export default {
type
:
'pie'
,
radius
:
[
'40%'
,
'70%'
],
avoidLabelOverlap
:
false
,
tooltip
:
{
valueFormatter
:
this
.
valueFormatter
},
label
:
{
show
:
true
,
// position: 'center',
...
...
@@ -89,7 +92,13 @@ export default {
formatter
:{
type
:
Function
,
default
:
function
(
param
)
{
return
param
.
name
+
'
\
r
\
n'
+
param
.
value
return
param
.
name
+
'
\
r
\
n'
+
param
.
value
;
},
},
valueFormatter
:{
type
:
Function
,
default
:
function
(
param
)
{
return
param
.
value
},
}
}
...
...
src/module/databoard/components/layout/title-content-mark.vue
View file @
f72613d8
<
template
>
<div
class=
"bd"
:class=
"
{'center-bd': isCenter}">
<div
class=
"title"
v-if=
"title"
:class=
"
{'center-title': isCenter}" :style="
titleStyle,{'--titleHeight': titleHeight
}">
<div
class=
"title"
v-if=
"title"
:class=
"
{'center-title': isCenter}" :style="
{'--titleHeight': titleHeight,...titleStyle
}">
{{
title
}}
</div>
<div
class=
"content"
:style=
"
{'--titleHeight': titleHeight}">
...
...
@@ -10,7 +10,7 @@
<b
v-if=
"!isBold"
style=
"font-weight: normal"
:style=
"contentStyle"
>
{{
content
}}
</b>
<span
class=
"mark"
:style=
"
{'--markWidth': mark.length
},markStyle
">
<span
class=
"mark"
:style=
"
{'--markWidth': mark.length
,...markStyle}
">
{{
mark
}}
</span>
</div>
...
...
src/module/databoard/databoard/turnover-detail.vue
View file @
f72613d8
...
...
@@ -5,7 +5,7 @@
:class=
"
{'selectCard': currentCard === key}"
@click.native="selectLegend(key)">
<title-content-mark
style=
"color: #369afa;float: left;width: 40%;font-size: 18px"
:title-style=
"
{'font-weight': 'bold'
}" :title="key" :content="data.amount
" isBold/>
:title-style=
"
{'font-weight': 'bold'
,'line-height': '30px'}" :mark-style="{'bottom': '12%'}" :title="key" :content="data.amount" mark="万元
" isBold/>
<div
style=
"width: 60%; height: 100%; float:left; padding: 2% 2% 0 8%; line-height: 60px; display: flex; align-items: center;font-size: 16px;"
>
<table-column
style=
"float: left;width: 25%;"
:data=
"data.hb"
name=
"title"
/>
...
...
@@ -35,6 +35,7 @@ import TableColumn from "../components/table/table-column.vue";
import
ContrastCard
from
"../components/card/contrast-card.vue"
;
import
*
as
echarts
from
"echarts"
;
import
{
getTrunOver
}
from
"./turnoverDetail"
import
{
conver_amont
}
from
"../../utils/numUtil"
;
export
default
{
name
:
"TurnoverDetail"
,
...
...
@@ -112,12 +113,12 @@ export default {
}
},
detail
:
[
{
"汽运(
元)"
:
0
,
"水运(元)"
:
0
,
"铁运(
元)"
:
0
,
"date"
:
"2023-05-06"
}
{
"汽运(
万元)"
:
0
,
"水运(万元)"
:
0
,
"铁运(万
元)"
:
0
,
"date"
:
"2023-05-06"
}
]
},
chart
:
null
,
currentBtn
:
"day"
,
currentLegend
:
'汽运(元)'
,
currentLegend
:
'汽运(
万
元)'
,
currentCard
:
'营业额'
,
chartOption
:
{
legend
:
{
...
...
@@ -125,9 +126,12 @@ export default {
color
:
'white'
}
},
tooltip
:
{},
tooltip
:
{
trigger
:
'axis'
,
valueFormatter
:
this
.
valueFormatter
},
dataset
:
{
dimensions
:
[
'date'
,
'汽运(
元)'
,
'水运(元)'
,
'铁运(
元)'
],
dimensions
:
[
'date'
,
'汽运(
万元)'
,
'水运(万元)'
,
'铁运(万
元)'
],
source
:
[]
},
xAxis
:
{
...
...
@@ -150,6 +154,7 @@ export default {
show
:
true
,
position
:
'top'
,
color
:
"#00CCD2"
,
formatter
:
this
.
labelFormatter
(
1
)
},
color
:
{
type
:
'linear'
,
...
...
@@ -166,6 +171,7 @@ export default {
show
:
true
,
position
:
'top'
,
color
:
"#FFFAB7"
,
formatter
:
this
.
labelFormatter
(
2
)
},
color
:
{
type
:
'linear'
,
...
...
@@ -182,6 +188,7 @@ export default {
show
:
true
,
position
:
'top'
,
color
:
"#81FBB8"
,
formatter
:
this
.
labelFormatter
(
3
)
},
color
:
{
type
:
'linear'
,
...
...
@@ -195,6 +202,9 @@ export default {
{
type
:
'line'
,
color
:
'red'
,
lineStyle
:{
width
:
6
,
},
data
:
[]
}
]
...
...
@@ -211,6 +221,15 @@ export default {
this
.
chart
.
resize
();
}
},
valueFormatter
(
param
)
{
return
conver_amont
(
param
);
},
labelFormatter
(
dimensionNames
){
return
function
(
param
){
return
conver_amont
(
param
.
value
[
param
.
dimensionNames
[
dimensionNames
]])
+
"万元"
;
}
},
async
changeDimension
(
dimension
)
{
this
.
currentBtn
=
dimension
;
switch
(
dimension
)
{
...
...
@@ -246,32 +265,32 @@ export default {
case
'营业额'
:
break
;
case
'汽运营业额'
:
name
=
"汽运(元)"
;
name
=
"汽运(
万
元)"
;
break
;
case
'水运营业额'
:
name
=
"水运(元)"
;
name
=
"水运(
万
元)"
;
break
;
case
'铁运营业额'
:
name
=
"铁运(元)"
;
name
=
"铁运(
万
元)"
;
break
;
case
'汽运成本'
:
name
=
"汽运(元)"
;
name
=
"汽运(
万
元)"
;
break
;
case
'水运成本'
:
name
=
"水运(元)"
;
name
=
"水运(
万
元)"
;
break
;
case
'铁运成本'
:
name
=
"铁运(元)"
;
name
=
"铁运(
万
元)"
;
break
;
case
'汽运毛利'
:
name
=
"汽运(元)"
;
name
=
"汽运(
万
元)"
;
break
;
case
'水运毛利'
:
name
=
"水运(元)"
;
name
=
"水运(
万
元)"
;
break
;
case
'铁运毛利'
:
name
=
"铁运(元)"
;
name
=
"铁运(
万
元)"
;
break
;
default
:
break
;
...
...
src/module/databoard/databoard/turnoverDetail.js
View file @
f72613d8
...
...
@@ -387,35 +387,35 @@ export const detailConver = function (type, detailList) {
//初始化
if
(
type
==
'yye'
)
{
if
(
data
.
cur_transport_type
==
'10'
)
{
detail
[
'汽运(元)'
]
=
data
.
cur_sell_settle_amount
;
detail
[
'汽运(
万
元)'
]
=
data
.
cur_sell_settle_amount
;
}
if
(
data
.
cur_transport_type
==
'30'
)
{
detail
[
'水运(元)'
]
=
data
.
cur_sell_settle_amount
detail
[
'水运(
万
元)'
]
=
data
.
cur_sell_settle_amount
}
if
(
data
.
cur_transport_type
==
'20'
)
{
detail
[
'铁运(元)'
]
=
data
.
cur_sell_settle_amount
detail
[
'铁运(
万
元)'
]
=
data
.
cur_sell_settle_amount
}
}
if
(
type
==
'cb'
)
{
if
(
data
.
cur_transport_type
==
'10'
)
{
detail
[
'汽运(元)'
]
=
data
.
cur_buy_settle_amount
detail
[
'汽运(
万
元)'
]
=
data
.
cur_buy_settle_amount
}
if
(
data
.
cur_transport_type
==
'30'
)
{
detail
[
'水运(元)'
]
=
data
.
cur_buy_settle_amount
detail
[
'水运(
万
元)'
]
=
data
.
cur_buy_settle_amount
}
if
(
data
.
cur_transport_type
==
'20'
)
{
detail
[
'铁运(元)'
]
=
data
.
cur_buy_settle_amount
detail
[
'铁运(
万
元)'
]
=
data
.
cur_buy_settle_amount
}
}
if
(
type
==
'ml'
)
{
if
(
data
.
cur_transport_type
==
'10'
)
{
detail
[
'汽运(元)'
]
=
data
.
cur_gross_profit_amount
detail
[
'汽运(
万
元)'
]
=
data
.
cur_gross_profit_amount
}
if
(
data
.
cur_transport_type
==
'30'
)
{
detail
[
'水运(元)'
]
=
data
.
cur_gross_profit_amount
detail
[
'水运(
万
元)'
]
=
data
.
cur_gross_profit_amount
}
if
(
data
.
cur_transport_type
==
'20'
)
{
detail
[
'铁运(元)'
]
=
data
.
cur_gross_profit_amount
detail
[
'铁运(
万
元)'
]
=
data
.
cur_gross_profit_amount
}
}
}
...
...
@@ -426,9 +426,9 @@ export const detailConver = function (type, detailList) {
*/
export
const
initDetail
=
function
()
{
let
detail
=
{};
detail
[
'汽运(元)'
]
=
0
detail
[
'水运(元)'
]
=
0
detail
[
'铁运(元)'
]
=
0
detail
[
'汽运(
万
元)'
]
=
0
detail
[
'水运(
万
元)'
]
=
0
detail
[
'铁运(
万
元)'
]
=
0
return
detail
;
}
src/module/databoard/index.vue
View file @
f72613d8
...
...
@@ -132,8 +132,8 @@
</div>
<display-board
class=
"trade_right"
title=
"当日订单量占比"
>
<div
style=
"height: 100%; display: flex; flex-direction: column; justify-content: space-around; padding: 0 1rem 0 1rem;"
>
<ring-pie-chart
ref=
"transportTypeChart"
style=
"width: 100%;height: 50%;z-index: 999"
name=
"运输类型占比"
:data=
"transportTypeOrderFinishPie"
@
click
.
native=
"routerTo('/order-proportion')"
:formatter=
"pieDataFormatter"
/>
<ring-pie-chart
ref=
"customerChart"
style=
"width: 100%;height: 50%;"
name=
"公司占比"
:data=
"customerOrderFinishPie"
@
click
.
native=
"routerTo('/order-proportion')"
:formatter=
"pieDataFormatter"
/>
<ring-pie-chart
ref=
"transportTypeChart"
style=
"width: 100%;height: 50%;z-index: 999"
name=
"运输类型占比"
:data=
"transportTypeOrderFinishPie"
@
click
.
native=
"routerTo('/order-proportion')"
:
value-formatter=
"pieDataValueFormatter"
:
formatter=
"pieDataFormatter"
/>
<ring-pie-chart
ref=
"customerChart"
style=
"width: 100%;height: 50%;"
name=
"公司占比"
:data=
"customerOrderFinishPie"
@
click
.
native=
"routerTo('/order-proportion')"
:
value-formatter=
"pieDataValueFormatter"
:
formatter=
"pieDataFormatter"
/>
</div>
</display-board>
</div>
...
...
@@ -492,9 +492,12 @@ export default {
getTransportTypeOrderFinishPie
(
res
=>
this
.
transportTypeOrderFinishPie
=
res
,
this
.
today
);
getCustomerOrderFinishPie
(
res
=>
this
.
customerOrderFinishPie
=
res
,
this
.
today
);
},
pieDataFormatter
(
param
){
return
param
.
name
+
'
\
r
\
n'
+
conver_num_retain
(
param
.
value
);
}
pieDataValueFormatter
(
param
){
return
conver_amont
(
param
)
+
"万元"
;
},
pieDataFormatter
(
param
)
{
return
param
.
name
+
'
\
r
\
n'
+
this
.
pieDataValueFormatter
(
param
.
value
)
+
"万元"
;
},
},
mounted
()
{
this
.
showBusinessConditionDatas
();
...
...
@@ -503,7 +506,7 @@ export default {
},
500
)
this
.
getArSummaryBar
();
this
.
getArCompanyList
();
this
.
refreshData
()
this
.
refreshData
()
;
},
beforeDestroy
()
{
window
.
removeEventListener
(
"resize"
,
this
.
resizeChart
);
...
...
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