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
3e971ee7
Commit
3e971ee7
authored
Dec 14, 2023
by
张恒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Demo
parent
f99cc40b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
754 additions
and
281 deletions
+754
-281
lostAddCustomer.js
src/module/databoard/databoard/js/lostAddCustomer.js
+6
-7
lost-add-customer.vue
src/module/databoard/databoard/lost-add-customer.vue
+19
-8
lost_add_customer.json
...odule/databoard/databoard/mockData/lost_add_customer.json
+728
-265
index.vue
src/module/index/index.vue
+1
-1
No files found.
src/module/databoard/databoard/js/lostAddCustomer.js
View file @
3e971ee7
...
...
@@ -20,13 +20,12 @@ export const getAllDatas = async function (cur_day, type,cur_page) {
/**
* 后端接口数据处理
* @param detailList
* @returns {
Promise<void>
}
* @returns {
*[]
}
*/
export
const
resultProcess
=
function
(
detailList
)
{
let
lostAddDataList
=
new
Array
();
for
(
let
key
in
detailList
)
{
let
resData
=
detailList
[
key
];
let
lostAdd
=
adapterLostAdd
(
resData
)
let
lostAddDataList
=
[];
for
(
let
data
of
detailList
)
{
let
lostAdd
=
adapterLostAdd
(
data
)
lostAddDataList
.
push
(
lostAdd
)
}
return
lostAddDataList
...
...
@@ -40,7 +39,7 @@ export const resultProcess = function (detailList) {
export
const
adapterLostAdd
=
function
(
data
)
{
let
lostAddData
=
{};
lostAddData
[
'title'
]
=
data
.
entrust_agency_name
;
let
lostAddDataCol
=
new
Array
()
;
let
lostAddDataCol
=
[]
;
lostAddDataCol
[
0
]
=
adapterLostAddCol
(
"订单量(万吨) "
,
conver_amont
(
data
.
unit_weight
),
"red"
)
lostAddDataCol
[
1
]
=
adapterLostAddCol
(
"订单件数"
,
data
.
qty
,
"#eaa749"
)
lostAddDataCol
[
2
]
=
adapterLostAddCol
(
"营业额(万元)"
,
conver_amont
(
data
.
sell_settle_amount
),
"#49eb29"
)
...
...
@@ -48,7 +47,7 @@ export const adapterLostAdd = function (data) {
return
lostAddData
;
}
export
const
adapterLostAddCol
=
function
(
key
,
val
,
styleColor
)
{
let
lostAddDataCol
=
new
Object
()
;
let
lostAddDataCol
=
{}
;
lostAddDataCol
.
key
=
key
;
lostAddDataCol
.
value
=
val
;
lostAddDataCol
.
valStyle
=
{
"color"
:
styleColor
}
...
...
src/module/databoard/databoard/lost-add-customer.vue
View file @
3e971ee7
...
...
@@ -25,7 +25,7 @@
import
data
from
"./mockData/lost_add_customer.json"
;
import
DisplayBoard
from
"../components/container/display-board.vue"
;
import
PagingList
from
"../components/card/paging-list.vue"
;
import
{
getAllData
s
}
from
"./js/lostAddCustomer"
import
{
resultProces
s
}
from
"./js/lostAddCustomer"
import
moment
from
'moment'
export
default
{
...
...
@@ -35,21 +35,32 @@ export default {
return
{
today
:
moment
().
format
(
"yyyy-MM-DD"
),
curPageTitle
:
this
.
$route
.
query
.
code
===
1
?
"新增客户(较去年)"
:
"流失客户(较去年)"
,
pageData
:{},
pageSize
:
40
,
curPage
:
1
,
pageData
:
{
leftData
:
{},
rightData
:
{},
total
:
0
},
pageSize
:
40
,
curPage
:
1
,
}
},
methods
:
{
back
()
{
this
.
$router
.
push
({
path
:
'/'
});
},
async
handleCurrentChange
(
currentPage
){
this
.
pageData
=
await
getAllDatas
(
this
.
today
,
this
.
$route
.
query
.
code
,
currentPage
)
handleCurrentChange
(
currentPage
)
{
this
.
curPage
=
currentPage
;
this
.
getAllData
();
},
getAllData
()
{
let
index
=
(
this
.
curPage
-
1
)
*
40
this
.
pageData
.
leftData
=
resultProcess
(
data
.
slice
(
index
,
index
+
20
));
this
.
pageData
.
rightData
=
resultProcess
(
data
.
slice
(
index
+
20
,
index
+
40
));
this
.
pageData
.
total
=
data
.
length
;
}
},
async
mounted
()
{
this
.
pageData
=
await
getAllDatas
(
this
.
today
,
this
.
$route
.
query
.
code
)
mounted
()
{
this
.
getAllData
();
},
}
</
script
>
...
...
src/module/databoard/databoard/mockData/lost_add_customer.json
View file @
3e971ee7
This diff is collapsed.
Click to expand it.
src/module/index/index.vue
View file @
3e971ee7
...
...
@@ -32,7 +32,7 @@ export default {
currentWeek
:
null
,
isRouterAlive
:
true
,
countDownTimer
:
null
,
week
:
[
'星期天'
,
'星期一'
,
'星期二'
,
'星期三'
,
'星期四'
,
'星期五'
],
week
:
[
'星期天'
,
'星期一'
,
'星期二'
,
'星期三'
,
'星期四'
,
'星期五'
,
"星期六"
],
}
},
methods
:
{
...
...
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