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
abfc53f5
Commit
abfc53f5
authored
Sep 27, 2023
by
王礼鸿 Baimax Wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/ld_databoard_fix' into ld_databoard_fix
parents
90b0a229
6e73cfc1
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
136 deletions
+58
-136
fetch.js
src/module/api/fetch.js
+0
-3
lostAddCustomer.js
src/module/databoard/databoard/js/lostAddCustomer.js
+1
-1
lost-add-customer.vue
src/module/databoard/databoard/lost-add-customer.vue
+2
-2
turnover-detail.vue
src/module/databoard/databoard/turnover-detail.vue
+3
-3
turnoverDetail.js
src/module/databoard/databoard/turnoverDetail.js
+44
-122
index.vue
src/module/databoard/index.vue
+1
-1
index.vue
src/module/index/index.vue
+1
-1
numUtil.js
src/module/utils/numUtil.js
+6
-3
No files found.
src/module/api/fetch.js
View file @
abfc53f5
...
@@ -44,9 +44,6 @@ export default async (url = '', data = {}, type = 'GET', method = 'fetch') => {
...
@@ -44,9 +44,6 @@ export default async (url = '', data = {}, type = 'GET', method = 'fetch') => {
try
{
try
{
const
response
=
await
fetch
(
url
,
requestConfig
);
const
response
=
await
fetch
(
url
,
requestConfig
);
const
responseJson
=
await
response
.
json
();
const
responseJson
=
await
response
.
json
();
if
(
response
.
status
===
403
){
parent
.
window
.
location
=
"/"
;
}
return
responseJson
return
responseJson
}
catch
(
error
)
{
}
catch
(
error
)
{
throw
new
Error
(
error
)
throw
new
Error
(
error
)
...
...
src/module/databoard/databoard/js/lostAddCustomer.js
View file @
abfc53f5
...
@@ -36,7 +36,7 @@ export const adapterLostAdd = function (data) {
...
@@ -36,7 +36,7 @@ export const adapterLostAdd = function (data) {
let
lostAddDataCol
=
new
Array
();
let
lostAddDataCol
=
new
Array
();
lostAddDataCol
[
0
]
=
adapterLostAddCol
(
"订单量(万吨) "
,
conver_amont
(
data
.
unit_weight
),
"red"
)
lostAddDataCol
[
0
]
=
adapterLostAddCol
(
"订单量(万吨) "
,
conver_amont
(
data
.
unit_weight
),
"red"
)
lostAddDataCol
[
1
]
=
adapterLostAddCol
(
"订单件数"
,
data
.
qty
,
"#eaa749"
)
lostAddDataCol
[
1
]
=
adapterLostAddCol
(
"订单件数"
,
data
.
qty
,
"#eaa749"
)
lostAddDataCol
[
2
]
=
adapterLostAddCol
(
"营
销
额(万元)"
,
conver_amont
(
data
.
sell_settle_amount
),
"#49eb29"
)
lostAddDataCol
[
2
]
=
adapterLostAddCol
(
"营
业
额(万元)"
,
conver_amont
(
data
.
sell_settle_amount
),
"#49eb29"
)
lostAddData
[
'column'
]
=
lostAddDataCol
;
lostAddData
[
'column'
]
=
lostAddDataCol
;
return
lostAddData
;
return
lostAddData
;
}
}
...
...
src/module/databoard/databoard/lost-add-customer.vue
View file @
abfc53f5
...
@@ -3,11 +3,13 @@
...
@@ -3,11 +3,13 @@
<div
class=
"content"
>
<div
class=
"content"
>
<display-board
class=
"content_card"
:title=
"lostCustomerTitle"
title_size=
"large"
>
<display-board
class=
"content_card"
:title=
"lostCustomerTitle"
title_size=
"large"
>
<winners-list
style=
"height: 100%;overflow: auto;"
id=
"ar_company_list"
<winners-list
style=
"height: 100%;overflow: auto;"
id=
"ar_company_list"
:columns-style=
"
{'title':{'width':'45%'}}"
:rows="lostCustomer"
:rows="lostCustomer"
/>
/>
</display-board>
</display-board>
<display-board
class=
"content_card"
:title=
"addCustomerTitle"
title_size=
"large"
>
<display-board
class=
"content_card"
:title=
"addCustomerTitle"
title_size=
"large"
>
<winners-list
style=
"height: 100%;overflow: auto;"
id=
"ar_company_list"
<winners-list
style=
"height: 100%;overflow: auto;"
id=
"ar_company_list"
:columns-style=
"
{'title':{'width':'45%'}}"
:rows="addCustomer"
:rows="addCustomer"
/>
/>
</display-board>
</display-board>
...
@@ -50,9 +52,7 @@ export default {
...
@@ -50,9 +52,7 @@ export default {
},
},
async
mounted
()
{
async
mounted
()
{
this
.
lostCustomer
=
await
getAllDatas
(
this
.
today
,
2
)
this
.
lostCustomer
=
await
getAllDatas
(
this
.
today
,
2
)
console
.
log
(
this
.
lostCustomer
)
this
.
addCustomer
=
await
getAllDatas
(
this
.
today
,
1
)
this
.
addCustomer
=
await
getAllDatas
(
this
.
today
,
1
)
console
.
log
(
this
.
addCustomer
)
},
},
}
}
</
script
>
</
script
>
...
...
src/module/databoard/databoard/turnover-detail.vue
View file @
abfc53f5
<
template
>
<
template
>
<div
class=
"turnover-detail"
>
<div
class=
"turnover-detail"
>
<div
class=
"card-board"
>
<div
class=
"card-board"
>
<contrast-card
v-for=
"(data,key) in currentData.head"
style=
"height: 100%;width: 2
0
%;"
<contrast-card
v-for=
"(data,key) in currentData.head"
style=
"height: 100%;width: 2
3
%;"
:class=
"
{'selectCard': currentCard === key}"
:class=
"
{'selectCard': currentCard === key}"
@click.native="selectLegend(key)">
@click.native="selectLegend(key)">
<title-content-mark
style=
"color: #369afa;float: left;width:
4
0%;font-size: 18px"
<title-content-mark
style=
"color: #369afa;float: left;width:
3
0%;font-size: 18px"
:title-style=
"
{'font-weight': 'bold','line-height': '30px'}" :mark-style="{'bottom': '12%'}" :title="key" :content="data.amount" mark="万元" isBold/>
:title-style=
"
{'font-weight': 'bold','line-height': '30px'}" :mark-style="{'bottom': '12%'}" :title="key" :content="data.amount" mark="万元" isBold/>
<div
<div
style=
"width:
6
0%; height: 100%; float:left; padding: 2% 2% 0 8%; line-height: 60px; display: flex; align-items: center;font-size: 16px;"
>
style=
"width:
7
0%; 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"
/>
<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"
<table-column
style=
"float: left;width: 35%;"
:data=
"data.hb"
name=
"rate"
...
...
src/module/databoard/databoard/turnoverDetail.js
View file @
abfc53f5
This diff is collapsed.
Click to expand it.
src/module/databoard/index.vue
View file @
abfc53f5
<
template
>
<
template
>
<div
class=
"main"
@
click=
"log()"
>
<div
class=
"main"
>
<div
class=
"middle"
>
<div
class=
"middle"
>
<display-board
class=
"trade_left"
title=
"营业情况"
>
<display-board
class=
"trade_left"
title=
"营业情况"
>
<div
<div
...
...
src/module/index/index.vue
View file @
abfc53f5
...
@@ -45,7 +45,7 @@ export default {
...
@@ -45,7 +45,7 @@ export default {
},
},
setCurrentDateTime
(){
setCurrentDateTime
(){
let
now
=
new
Date
();
let
now
=
new
Date
();
this
.
currentDate
=
now
.
getFullYear
()
+
"-"
+
now
.
getMonth
(
)
+
"-"
+
now
.
getDate
();
this
.
currentDate
=
now
.
getFullYear
()
+
"-"
+
(
now
.
getMonth
()
+
1
)
+
"-"
+
now
.
getDate
();
this
.
currentTime
=
now
.
getHours
()
+
":"
+
now
.
getMinutes
()
+
":"
+
now
.
getSeconds
();
this
.
currentTime
=
now
.
getHours
()
+
":"
+
now
.
getMinutes
()
+
":"
+
now
.
getSeconds
();
this
.
currentWeek
=
this
.
week
[
now
.
getDay
()];
this
.
currentWeek
=
this
.
week
[
now
.
getDay
()];
},
},
...
...
src/module/utils/numUtil.js
View file @
abfc53f5
//环比值=(当日营业额-昨日营业额)/昨日营业额*100%计算
//环比值=(当日营业额-昨日营业额)/昨日营业额*100%计算
export
const
calc_hb_str
=
function
(
cur
,
pre
)
{
export
const
calc_hb_str
=
function
(
cur
,
pre
)
{
if
(
cur
==
0
||
pre
==
0
){
if
(
cur
==
0
||
pre
==
0
)
{
return
'0.00%'
return
'0.00%'
}
}
return
conver_num_rate
(
formater
((
cur
-
pre
)
/
pre
*
100
));
return
conver_num_rate
(
formater
((
cur
-
pre
)
/
pre
*
100
));
...
@@ -8,12 +8,15 @@ export const calc_hb_str = function (cur, pre) {
...
@@ -8,12 +8,15 @@ export const calc_hb_str = function (cur, pre) {
//同比值=(当日营业额上个月同一日营业额)/上个月同一日营业额*100%计算
//同比值=(当日营业额上个月同一日营业额)/上个月同一日营业额*100%计算
export
const
calc_tb_str
=
function
(
cur
,
pre
)
{
export
const
calc_tb_str
=
function
(
cur
,
pre
)
{
if
(
cur
==
0
||
pre
==
0
)
{
return
'0.00%'
}
return
conver_num_rate
(
formater
(
cur
/
pre
*
100
));
return
conver_num_rate
(
formater
(
cur
/
pre
*
100
));
};
};
//计算占比
//计算占比
export
const
calc_zb_str
=
function
(
item
,
total
)
{
export
const
calc_zb_str
=
function
(
item
,
total
)
{
if
(
item
==
0
||
total
==
0
){
if
(
item
==
0
||
total
==
0
)
{
return
'0.00%'
return
'0.00%'
}
}
return
formater
(
item
/
total
*
100
)
+
'%'
;
return
formater
(
item
/
total
*
100
)
+
'%'
;
...
@@ -22,7 +25,7 @@ export const calc_zb_str = function (item, total) {
...
@@ -22,7 +25,7 @@ export const calc_zb_str = function (item, total) {
//conver amont
//conver amont
export
const
conver_amont
=
function
(
amont
)
{
export
const
conver_amont
=
function
(
amont
)
{
return
formater
(
amont
/
10000
)
;
return
amont
?
formater
(
amont
/
10000
)
:
"0.0"
;
};
};
//Positive and negative
//Positive and negative
...
...
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