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 38fa6722
authored
Jun 27, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
折线图-排名
1 parent
52504fc6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
9 deletions
src/components/LineChart.vue
src/views/afterSales/file.vue
src/components/LineChart.vue
View file @
38fa672
...
...
@@ -2,9 +2,15 @@
<div
class=
"line-box"
>
<div
id=
"line-chart"
class=
"line-chart"
></div>
<div
class=
"rank-box"
>
<div>
<p
:class=
"[ 'rank-title', rankFlag == 'first' ? 'rank-active' : '' ]"
@
click=
"handleRankChange('first')"
>
前5
{{
storeOrBrandTxt
}}
</p>
<p
:class=
"[ 'rank-title', rankFlag == 'last' ? 'rank-active' : '' ]"
@
click=
"handleRankChange('last')"
>
后5
{{
storeOrBrandTxt
}}
</p>
<div
class=
"rank-title-block"
>
<p
:class=
"[ 'rank-title', rankFlag == 'first' ? 'rank-title-active' : '' ]"
@
click=
"handleRankChange('first')"
>
前5
{{
storeOrBrandTxt
}}
</p>
<p
:class=
"[ 'rank-title', rankFlag == 'last' ? 'rank-title-active' : '' ]"
@
click=
"handleRankChange('last')"
>
后5
{{
storeOrBrandTxt
}}
</p>
</div>
<div
class=
"rank-block"
>
<div
class=
"ramk-item"
v-for=
"(item, index) in rankList"
:key=
"index"
>
<p>
{{
item
.
name
}}
</p>
<p>
{{
item
.
num
}}
</p>
</div>
</div>
</div>
</div>
...
...
@@ -24,6 +30,10 @@ export default {
storeOrBrandTxt
:
{
type
:
String
,
default
:
'门店'
},
rankList
:
{
type
:
String
,
default
:
()
=>
[]
}
},
...
...
@@ -140,23 +150,40 @@ p {
box-sizing
:
border-box
;
display
:
flex
;
height
:
4.6vh
;
padding
:
0.
48
vh
0.87vh
;
padding
:
0.
5
vh
0.87vh
;
border-top
:
1px
solid
#373739
;
.rank-title-block
{
flex
:
0
0
55px
;
}
.rank-title
{
box-sizing
:
border-box
;
width
:
100%
;
font-size
:
0.6em
;
background
:
#353535
;
padding
:
1px
5px
;
height
:
1.8
3
vh
;
line-height
:
1.8
3
vh
;
padding
:
0.2vh
5px
;
height
:
1.8vh
;
line-height
:
1.8vh
;
opacity
:
0.7
;
cursor
:
pointer
;
}
.rank-active
{
.rank-
title-
active
{
opacity
:
1
;
color
:
#ffffff
;
background
:
#eb6001
;
}
.rank-block
{
width
:
calc
(
100%
-
55px
);
display
:
flex
;
.ramk-item
{
box-sizing
:
border-box
;
width
:
25%
;
padding
:
0
6px
;
border-left
:
1px
solid
rgba
(
96
,
98
,
102
,
0.4
);
}
.ramk-item
:first-child
{
border-width
:
0
;
}
}
}
}
</
style
>
src/views/afterSales/file.vue
View file @
38fa672
...
...
@@ -8,7 +8,7 @@
<
template
>
<div>
<div
class=
"title"
>
售后档案客户
</div>
<LineChart
@
handleRankChange=
"handleRankChange"
></LineChart>
<LineChart
@
handleRankChange=
"handleRankChange"
:rankList=
"rankList"
></LineChart>
</div>
</
template
>
...
...
@@ -21,6 +21,32 @@ export default {
default
:
'19.8vh'
}
},
data
()
{
return
{
rankList
:
[
{
name
:
'奥迪'
,
num
:
599604
},
{
name
:
'宝马'
,
num
:
599604
},
{
name
:
'现代起亚'
,
num
:
599604
},
{
name
:
'奔驰'
,
num
:
599604
},
{
name
:
'沃尔沃'
,
num
:
599604
}
]
}
},
mounted
()
{
},
methods
:
{
handleRankChange
(
value
)
{
...
...
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