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 52504fc6
authored
Jun 27, 2022
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
客流转化
1 parent
24b85236
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
12 deletions
src/utils/data.js
src/views/salesData/flow.vue
src/utils/data.js
View file @
52504fc
...
@@ -3,11 +3,13 @@
...
@@ -3,11 +3,13 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-06-23 17:38:33
* @Date: 2022-06-23 17:38:33
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2022-06-2
4 14:44:1
9
* @LastEditTime: 2022-06-2
7 14:42:0
9
*/
*/
const
DefaultData
=
{
const
DefaultData
=
{
defaultLineHeight
:
'19.8'
,
defaultLineHeight
:
'19.8'
,
defaultPieHeight
:
'16.6'
defaultPieHeight
:
'16.6'
,
directionTimer
:
3000
,
delayTimer
:
3000
}
}
const
Customer
=
{
const
Customer
=
{
...
...
src/views/salesData/flow.vue
View file @
52504fc
...
@@ -3,24 +3,73 @@
...
@@ -3,24 +3,73 @@
* @Author: huyue
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditors: huyue
* @LastEditTime: 2022-06-2
4 16:26:20
* @LastEditTime: 2022-06-2
7 15:45:19
-->
-->
<
template
>
<
template
>
<div
class=
"flow-box"
>
<div
class=
"flow-box"
>
<div
class=
"title inline"
>
客流转化
</div>
<div
class=
"flow-left"
>
<div
class=
"chart-box"
>
<div
class=
"title inline"
>
客流转化
</div>
<div
id=
"flow"
:style=
"
{ height: height - 3.1 + 'vh' }">
</div>
<div
class=
"chart-box"
>
<div
id=
"flow"
:style=
"
{ height: height - 4.1 + 'vh' }">
</div>
</div>
</div>
<div
class=
"flow-right"
>
<div
class=
"ranking-title"
>
<div
@
click=
"isActive = 1"
:class=
"isActive == 1 ? 'active' : ''"
>
前5品牌
</div>
<div
@
click=
"isActive = 2"
:class=
"isActive == 2 ? 'active' : ''"
>
后5品牌
</div>
</div>
<div
class=
"ranking-content"
>
<div
class=
"ranking-item"
v-for=
"(item, index) in flowData"
:key=
"index"
>
<span>
{{
item
.
id
}}
</span>
<span
class=
"ranking-name"
>
<marquee
:direction=
"directionTimer"
:delay=
"delayTimer"
:text=
"item.name"
/>
</span>
<span
class=
"ranking-text"
>
{{
item
.
num
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
datas
from
'../../utils/data'
import
*
as
echarts
from
'echarts'
import
*
as
echarts
from
'echarts'
export
default
{
export
default
{
name
:
'Flow'
,
name
:
'Flow'
,
props
:
[
'height'
],
props
:
[
'height'
],
data
()
{
data
()
{
return
{}
return
{
directionTimer
:
datas
.
DefaultData
.
directionTimer
,
delayTimer
:
datas
.
DefaultData
.
delayTimer
,
flowData
:
[
{
id
:
1
,
name
:
'林则徐:苟利国家生死以岂因祸福避趋之'
,
num
:
33234
},
{
id
:
2
,
name
:
'林则徐'
,
num
:
33234
},
{
id
:
3
,
name
:
'fg'
,
num
:
33234
},
{
id
:
4
,
name
:
'售后客户价值分析'
,
num
:
33234
},
{
id
:
5
,
name
:
'林则徐:苟利国家生死以岂因祸福避趋之'
,
num
:
33234
}
],
isActive
:
1
}
},
},
mounted
()
{
mounted
()
{
this
.
getChart
()
this
.
getChart
()
...
@@ -36,6 +85,7 @@ export default {
...
@@ -36,6 +85,7 @@ export default {
trigger
:
'item'
,
trigger
:
'item'
,
formatter
:
'{a} <br/>{b} : {c}%'
formatter
:
'{a} <br/>{b} : {c}%'
},
},
// color: [''],
series
:
[
series
:
[
{
{
name
:
'Funnel'
,
name
:
'Funnel'
,
...
@@ -80,7 +130,6 @@ export default {
...
@@ -80,7 +130,6 @@ export default {
}
}
]
]
}
}
option
&&
myChart
.
setOption
(
option
)
option
&&
myChart
.
setOption
(
option
)
}
}
}
}
...
@@ -89,15 +138,63 @@ export default {
...
@@ -89,15 +138,63 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.flow-box
{
.flow-box
{
display
:
flex
;
padding
:
0
8px
1vh
;
padding
:
0
8px
1vh
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.flow-left
{
padding-bottom
:
1vh
;
width
:
50%
;
}
.flow-right
{
flex
:
1
;
color
:
#fff
;
font-size
:
10px
;
padding
:
1vh
8px
1vh
20px
;
.ranking-title
{
display
:
flex
;
width
:
100%
;
margin-right
:
20px
;
.active
{
background-color
:
#eb6001
;
color
:
#fff
;
}
div
{
width
:
50%
;
text-align
:
center
;
background-color
:
#353535
;
line-height
:
20px
;
}
}
.ranking-content
{
background-color
:
#262525
;
}
.ranking-item
{
display
:
flex
;
width
:
100%
;
align-items
:
center
;
line-height
:
2.2vh
;
height
:
2.2vh
;
.ranking-name
{
width
:
calc
(
100%
-
33%
-
24px
);
}
.ranking-text
{
width
:
33%
;
//
width
:
calc
(
100%
-
50px
);
}
span
{
display
:
inline-block
;
&:first-child
{
padding
:
0
8px
;
}
}
}
}
}
}
.chart-box
{
.chart-box
{
width
:
148px
;
width
:
100%
;
height
:
11.7vh
;
box-sizing
:
border-box
;
//
height
:
11.7vh
;
background-color
:
#262525
;
background-color
:
#262525
;
padding
:
0
25px
;
padding
:
0
25px
;
//
margin
:
0
20px
1vh
8px
;
//
box-sizing
:
border-box
;
}
}
</
style
>
</
style
>
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