Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
gh
/
data-view
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 62b6a769
authored
Jul 06, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_v1.0.0' of
http://192.168.3.233:8090/gh/data-view
into dev_v1.0.0
2 parents
59a89d9a
ec0236e9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
18 deletions
src/assets/css/index.scss
src/components/LineChart.vue
src/components/PieChart.vue
src/components/ViewTabs.vue
src/views/afterSales/analyze.vue
src/assets/css/index.scss
View file @
62b6a76
...
@@ -84,7 +84,7 @@ img {
...
@@ -84,7 +84,7 @@ img {
}
}
.title
{
.title
{
font-size
:
12px
;
font-size
:
0
.75vw
;
color
:
#e8e8e8
;
color
:
#e8e8e8
;
// line-height: 2.1vh;
// line-height: 2.1vh;
font-weight
:
400
;
font-weight
:
400
;
...
...
src/components/LineChart.vue
View file @
62b6a76
...
@@ -213,8 +213,8 @@ p {
...
@@ -213,8 +213,8 @@ p {
.line-item
{
.line-item
{
height
:
1.8vh
;
height
:
1.8vh
;
width
:
100%
;
width
:
100%
;
font-size
:
10px
;
font-size
:
0.55vw
;
padding-bottom
:
0.
6
vh
;
padding-bottom
:
0.
3
vh
;
}
}
.line-item
:last-of-type
{
.line-item
:last-of-type
{
padding-bottom
:
0
;
padding-bottom
:
0
;
...
@@ -226,4 +226,18 @@ p {
...
@@ -226,4 +226,18 @@ p {
}
}
}
}
}
}
::v-deep
.line-chart
{
width
:
100%
;
height
:
100%
;
div
{
&:nth-child(1)
{
width
:
100%
!important
;
height
:
100%
!important
;
canvas
{
width
:
100%
!important
;
height
:
100%
!important
;
}
}
}
}
</
style
>
</
style
>
src/components/PieChart.vue
View file @
62b6a76
...
@@ -202,7 +202,7 @@ document.querySelector(`.${this.id}`).nextElementSibling.style = 'animation-iter
...
@@ -202,7 +202,7 @@ document.querySelector(`.${this.id}`).nextElementSibling.style = 'animation-iter
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.pie-box
{
.pie-box
{
background
:
#262525
;
//
background
:
#262525
;
position
:
relative
;
position
:
relative
;
flex
:
1
;
flex
:
1
;
.center-content
{
.center-content
{
...
...
src/components/ViewTabs.vue
View file @
62b6a76
...
@@ -168,7 +168,6 @@ export default {
...
@@ -168,7 +168,6 @@ export default {
if
(
params
.
brand
)
this
.
isGroup
=
false
if
(
params
.
brand
)
this
.
isGroup
=
false
this
.
req
=
req
this
.
req
=
req
this
.
isEmpty
=
true
this
.
isEmpty
=
true
// this.flag = false
this
.
getOverallbase
(
'total'
)
this
.
getOverallbase
(
'total'
)
this
.
getOverallbase
(
'wechat'
)
this
.
getOverallbase
(
'wechat'
)
this
.
getOverallbase
(
'wechatGroup'
)
this
.
getOverallbase
(
'wechatGroup'
)
...
@@ -189,6 +188,13 @@ export default {
...
@@ -189,6 +188,13 @@ export default {
}
}
this
.
tabHead
=
this
.
isGroup
?
[
'前5品牌'
,
'后5品牌'
]
:
[
'前5门店'
,
'后5门店'
]
this
.
tabHead
=
this
.
isGroup
?
[
'前5品牌'
,
'后5品牌'
]
:
[
'前5门店'
,
'后5门店'
]
this
.
api
.
overview
[
this
.
isGroup
?
'getBrandOverallbase'
:
'getMerchantOverallbase'
](
params
).
then
(({
code
,
data
})
=>
{
this
.
api
.
overview
[
this
.
isGroup
?
'getBrandOverallbase'
:
'getMerchantOverallbase'
](
params
).
then
(({
code
,
data
})
=>
{
this
.
pageData
[
queryItem
]
=
{
top
:
[],
last
:
[],
incrNum
:
0
,
returnNum
:
0
,
totalNum
:
0
}
if
(
code
==
0
)
{
if
(
code
==
0
)
{
let
[
dataList
]
=
data
.
dataList
let
[
dataList
]
=
data
.
dataList
if
(
dataList
)
{
if
(
dataList
)
{
...
@@ -211,21 +217,18 @@ export default {
...
@@ -211,21 +217,18 @@ export default {
this
.
pageData
[
queryItem
]
=
dataList
this
.
pageData
[
queryItem
]
=
dataList
}
}
}).
catch
(()
=>
{
this
.
pageData
[
queryItem
]
=
{
top
:
[],
last
:
[],
incrNum
:
0
,
returnNum
:
0
,
totalNum
:
0
}
})
})
},
},
ObjectToArray
(
obj
)
{
ObjectToArray
(
obj
)
{
let
arr
=
[]
let
arr
=
[]
if
(
obj
&&
obj
!=
'null'
)
JSON
.
parse
(
obj
).
map
(
e
=>
{
if
(
obj
&&
obj
!==
'null'
)
{
Object
.
keys
(
e
).
map
(
name
=>
arr
.
push
({
name
,
num
:
e
[
name
]
}))
obj
=
obj
.
replace
(
'null'
,
'"未知"'
)
})
let
item
=
JSON
.
parse
(
obj
)
if
(
Array
.
isArray
(
item
))
item
.
map
(
e
=>
{
Object
.
keys
(
e
).
map
(
name
=>
arr
.
push
({
name
,
num
:
e
[
name
]
}))
})
else
Object
.
keys
(
item
).
map
(
name
=>
arr
.
push
({
name
,
num
:
item
[
name
]
}))
}
return
arr
return
arr
},
},
getOveralltrend
(
queryItem
)
{
getOveralltrend
(
queryItem
)
{
...
...
src/views/afterSales/analyze.vue
View file @
62b6a76
...
@@ -10,10 +10,10 @@
...
@@ -10,10 +10,10 @@
<div
class=
"title"
>
售后客户价值分析
</div>
<div
class=
"title"
>
售后客户价值分析
</div>
<template
v-if=
"barData.length > 0"
>
<template
v-if=
"barData.length > 0"
>
<div
class=
"analyze-content"
:style=
"
{ height: height - 5 + 'vh' }">
<div
class=
"analyze-content"
:style=
"
{ height: height - 5 + 'vh' }">
<div
class=
"content-left
bg
"
>
<div
class=
"content-left"
>
<div
id=
"analyzeBar"
style=
"height: 100%"
></div>
<div
id=
"analyzeBar"
style=
"height: 100%"
></div>
</div>
</div>
<div
class=
"contetn-right
bg
"
>
<div
class=
"contetn-right"
>
<pie-chart
:id=
"chart.id"
:list=
"analyzeData"
:height=
"height - 5 + 'vh'"
:radius=
"chart.radius"
:size=
"chart.size"
></pie-chart>
<pie-chart
:id=
"chart.id"
:list=
"analyzeData"
:height=
"height - 5 + 'vh'"
:radius=
"chart.radius"
:size=
"chart.size"
></pie-chart>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment