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
3ec45876
Commit
3ec45876
authored
Sep 27, 2023
by
潘自豪
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ld_databoard_fix' into ld_databoard_fix
parents
da4b48d1
338a5dff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
11 deletions
+28
-11
orderProportionHeadData.js
src/module/databoard/databoard/js/orderProportionHeadData.js
+22
-5
order-proportion.vue
src/module/databoard/databoard/order-proportion.vue
+6
-6
No files found.
src/module/databoard/databoard/js/orderProportionHeadData.js
View file @
3ec45876
...
@@ -11,6 +11,7 @@ export const getHeadData = async (aux,callback) => {
...
@@ -11,6 +11,7 @@ export const getHeadData = async (aux,callback) => {
let
resList
=
new
Array
();
let
resList
=
new
Array
();
await
getOrderFinishDataByCondition
(
aux
).
then
(
function
(
res
)
{
await
getOrderFinishDataByCondition
(
aux
).
then
(
function
(
res
)
{
resList
=
dataFormatter
(
aux
,
res
.
data
);
resList
=
dataFormatter
(
aux
,
res
.
data
);
console
.
log
(
resList
)
});
});
callback
(
resList
);
callback
(
resList
);
return
resList
return
resList
...
@@ -20,17 +21,22 @@ export const getHeadData = async (aux,callback) => {
...
@@ -20,17 +21,22 @@ export const getHeadData = async (aux,callback) => {
function
dataFormatter
(
aux
,
data
){
function
dataFormatter
(
aux
,
data
){
let
res
=
new
Array
();
let
res
=
new
Array
();
let
otherBaseItem
;
if
(
aux
.
group_type
===
'01'
){
if
(
aux
.
group_type
===
'01'
){
formatType01Data
(
aux
,
res
,
data
);
otherBaseItem
=
formatType01Data
(
aux
,
res
,
data
);
}
else
{
}
else
{
formatNotType01Data
(
aux
,
res
,
data
);
otherBaseItem
=
formatNotType01Data
(
aux
,
res
,
data
);
}
if
(
otherBaseItem
){
res
.
push
(
otherBaseItem
)
}
}
return
res
;
return
res
;
}
}
function
formatNotType01Data
(
aux
,
res
,
data
){
function
formatNotType01Data
(
aux
,
res
,
data
){
let
otherBaseItem
;
let
sum
=
{
let
sum
=
{
title
:
"当日"
,
title
:
aux
.
time_type
===
'day'
?
'当日'
:
'截至当日'
,
data
:
[
data
:
[
{
{
title
:
'订单量'
,
title
:
'订单量'
,
...
@@ -86,12 +92,18 @@ function formatNotType01Data(aux,res, data){
...
@@ -86,12 +92,18 @@ function formatNotType01Data(aux,res, data){
sum
.
data
[
i
].
today
+=
item
.
data
[
i
].
today
;
sum
.
data
[
i
].
today
+=
item
.
data
[
i
].
today
;
sum
.
data
[
i
].
yesterday
+=
item
.
data
[
i
].
yesterday
;
sum
.
data
[
i
].
yesterday
+=
item
.
data
[
i
].
yesterday
;
}
}
res
.
push
(
item
);
if
(
key
===
'其他基地'
){
otherBaseItem
=
item
;
}
else
{
res
.
push
(
item
);
}
}
}
return
otherBaseItem
;
}
}
//转换领域细分数据
//转换领域细分数据
function
formatType01Data
(
aux
,
res
,
data
)
{
function
formatType01Data
(
aux
,
res
,
data
)
{
let
otherBaseItem
;
let
sum
=
{
let
sum
=
{
title
:
"当日订单量(不含仓库)"
,
title
:
"当日订单量(不含仓库)"
,
amount
:
0
,
amount
:
0
,
...
@@ -119,11 +131,16 @@ function formatType01Data(aux,res, data) {
...
@@ -119,11 +131,16 @@ function formatType01Data(aux,res, data) {
};
};
sum
.
amount
+=
data
[
key
].
cur_unit_weight
;
sum
.
amount
+=
data
[
key
].
cur_unit_weight
;
sum
.
hb
[
0
].
amount
+=
data
[
key
].
pre_unit_weight
;
sum
.
hb
[
0
].
amount
+=
data
[
key
].
pre_unit_weight
;
res
.
push
(
item
);
if
(
key
===
'其他基地'
){
otherBaseItem
=
item
;
}
else
{
res
.
push
(
item
);
}
}
}
calcProportion
(
res
);
calcProportion
(
res
);
sum
.
amount
=
conver_amont
(
sum
.
amount
);
sum
.
amount
=
conver_amont
(
sum
.
amount
);
sum
.
hb
[
0
].
amount
=
conver_amont
(
sum
.
hb
[
0
].
amount
);
sum
.
hb
[
0
].
amount
=
conver_amont
(
sum
.
hb
[
0
].
amount
);
return
otherBaseItem
;
}
}
function
calcProportion
(
list
)
{
function
calcProportion
(
list
)
{
...
...
src/module/databoard/databoard/order-proportion.vue
View file @
3ec45876
...
@@ -17,14 +17,15 @@
...
@@ -17,14 +17,15 @@
<div
style=
"width: 60%; height: 100%; float:left; padding: 2% 2% 0 8%; line-height: 40px; display: flex; align-items: center;font-size: 16px;"
>
<div
style=
"width: 60%; height: 100%; float:left; padding: 2% 2% 0 8%; line-height: 40px; display: flex; align-items: center;font-size: 16px;"
>
<table-column
style=
"float: left;width: 25%;"
:data=
"data.hb"
name=
"title"
/>
<table-column
style=
"float: left;width: 25%;"
:data=
"data.hb"
name=
"title"
/>
<table-column
style=
"float: left;width: 40%;"
:data=
"data.hb"
name=
"amount"
/>
<table-column
style=
"float: left;width: 40%;"
:data=
"data.hb"
name=
"amount"
/>
<table-column
style=
"float: left;width: 35%;"
:data=
"data.hb"
name=
"rate"
cell-style-js=
"var res =
{color: 'rgb(
255, 51, 0)'}; if(data.indexOf('+') !== -1){res.color = 'rgb(51, 255, 102
)'} res;"/>
<table-column
style=
"float: left;width: 35%;"
:data=
"data.hb"
name=
"rate"
cell-style-js=
"var res =
{color: 'rgb(
51, 255, 102)'}; if(data.indexOf('+') !== -1){res.color = 'rgb(255, 51, 0
)'} res;"/>
</div>
</div>
</contrast-card>
</contrast-card>
</div>
</div>
<div
class=
"card-board"
v-if=
"currentBtn.subdivide !== '01'"
>
<div
class=
"card-board"
v-if=
"currentBtn.subdivide !== '01'"
>
<contrast-card
v-for=
"data in currentHeadData"
style=
"height: 100%;width: 18%;"
:class=
"
{'selectCard': currentCard === data.key}" @click.native="selectCard(data)" :style="listCardStyle">
<contrast-card
v-for=
"data in currentHeadData"
style=
"height: 100%;width: 18%;"
:class=
"
{'selectCard': currentCard === data.key}" @click.native="selectCard(data)" :style="listCardStyle">
<!-- 标题-->
<div
style=
"width: 100%; height: 20%; float:left; padding: 2%; line-height: 28px; display: flex; align-items: center; font-size: 14px;"
>
<div
style=
"width: 100%; height: 20%; float:left; padding: 2%; line-height: 28px; display: flex; align-items: center; font-size: 14px;"
>
<table-column
style=
"float: left;width: 80%;"
:data=
"[]"
name=
"title"
:title=
"data.title"
:title-formatter=
"value=> value+'(万元)'"
show-head
:title-style=
"
{'font-size': '18px','padding-left':'3%','white-space': 'nowrap',}"/>
<table-column
style=
"float: left;width: 80%;"
:data=
"[]"
name=
"title"
:title=
"data.title"
:title-formatter=
"value=> value+'(万元)'"
show-head
:title-style=
"
{'font-size': '18px','padding-left':'3%','white-space': 'nowrap',
'font-weight': 'bold',
}"/>
<table-column
style=
"float: left;width: 0;font-size: 24px;font-weight: bold;color: #5eeef4;text-align: center;"
:data=
"[]"
name=
"today"
/>
<table-column
style=
"float: left;width: 0;font-size: 24px;font-weight: bold;color: #5eeef4;text-align: center;"
:data=
"[]"
name=
"today"
/>
<table-column
style=
"float: left;width: 20%;"
:data=
"[]"
name=
"yesterday"
:title=
"dateTimeChoice[currentBtn.date]"
show-head
/>
<table-column
style=
"float: left;width: 20%;"
:data=
"[]"
name=
"yesterday"
:title=
"dateTimeChoice[currentBtn.date]"
show-head
/>
</div>
</div>
...
@@ -48,7 +49,6 @@
...
@@ -48,7 +49,6 @@
import
TitleContentMark
from
"../components/layout/title-content-mark.vue"
;
import
TitleContentMark
from
"../components/layout/title-content-mark.vue"
;
import
TableColumn
from
"../components/table/table-column.vue"
;
import
TableColumn
from
"../components/table/table-column.vue"
;
import
ContrastCard
from
"../components/card/contrast-card.vue"
;
import
ContrastCard
from
"../components/card/contrast-card.vue"
;
import
*
as
echarts
from
"echarts"
;
import
DisplayBoard
from
"../components/container/display-board.vue"
;
import
DisplayBoard
from
"../components/container/display-board.vue"
;
import
WinnersList
from
"../components/card/winners-list.vue"
;
import
WinnersList
from
"../components/card/winners-list.vue"
;
import
LineBarChart
from
"../components/chart/line-bar-chart.vue"
;
import
LineBarChart
from
"../components/chart/line-bar-chart.vue"
;
...
@@ -62,7 +62,7 @@ export default {
...
@@ -62,7 +62,7 @@ export default {
components
:
{
LineBarChart
,
WinnersList
,
DisplayBoard
,
ContrastCard
,
TableColumn
,
TitleContentMark
},
components
:
{
LineBarChart
,
WinnersList
,
DisplayBoard
,
ContrastCard
,
TableColumn
,
TitleContentMark
},
data
()
{
data
()
{
return
{
return
{
today
:
moment
().
format
(
"yyyy-MM-DD"
)
,
today
:
'2022-06-26'
,
currentHeadData
:[],
currentHeadData
:[],
currentDetailData
:[],
currentDetailData
:[],
chart
:
null
,
chart
:
null
,
...
@@ -96,10 +96,10 @@ export default {
...
@@ -96,10 +96,10 @@ export default {
getHeadData
({
cur_day
:
this
.
today
,
time_type
:
this
.
currentBtn
.
date
,
group_type
:
this
.
currentBtn
.
subdivide
},
getHeadData
({
cur_day
:
this
.
today
,
time_type
:
this
.
currentBtn
.
date
,
group_type
:
this
.
currentBtn
.
subdivide
},
(
res
)
=>
{
(
res
)
=>
{
this
.
currentHeadData
=
res
;
this
.
currentHeadData
=
res
;
if
(
type
&&
type
!==
"date"
){
//
if (type && type !== "date"){
this
.
currentCard
=
res
[
0
]?
res
[
0
].
key
:
null
;
this
.
currentCard
=
res
[
0
]?
res
[
0
].
key
:
null
;
this
.
chartTitle
=
res
[
0
]?(
res
[
0
].
title
+
'委托单位占比'
):
null
;
this
.
chartTitle
=
res
[
0
]?(
res
[
0
].
title
+
'委托单位占比'
):
null
;
}
//
}
this
.
calcCardWidth
();
this
.
calcCardWidth
();
this
.
getDetailData
();
this
.
getDetailData
();
}
}
...
...
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