Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
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 ce67dae8
authored
Feb 19, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
e032644e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
65 additions
and
79 deletions
linkwe-pc/src/components/CardGroupIndex.vue
linkwe-pc/src/components/ChartBar.vue
linkwe-pc/src/components/ChartLine.vue
linkwe-pc/src/components/ChartPie.vue
linkwe-pc/src/views/index/index.vue
linkwe-pc/src/components/CardGroupIndex.vue
View file @
ce67dae
...
@@ -58,7 +58,7 @@ export default {
...
@@ -58,7 +58,7 @@ export default {
<
template
>
<
template
>
<ul
class=
"card-group-index flex"
>
<ul
class=
"card-group-index flex"
>
<li
v-for=
"(row, index) in data"
:key=
"index"
class=
"card-index-li"
>
<li
v-for=
"(row, index) in data"
:key=
"index"
class=
"card-index-li"
>
<div
class=
"
mb5
label"
>
<div
class=
"label"
>
<span>
{{
row
[
defaultProps
.
title
]
}}
</span>
<span>
{{
row
[
defaultProps
.
title
]
}}
</span>
<div
v-if=
"row[defaultProps.tips] !== undefined"
class=
"fr"
>
<div
v-if=
"row[defaultProps.tips] !== undefined"
class=
"fr"
>
<el-popover
trigger=
"hover"
:content=
"row[defaultProps.tips]"
placement=
"top-start"
>
<el-popover
trigger=
"hover"
:content=
"row[defaultProps.tips]"
placement=
"top-start"
>
...
@@ -66,8 +66,8 @@ export default {
...
@@ -66,8 +66,8 @@ export default {
</el-popover>
</el-popover>
</div>
</div>
</div>
</div>
<div
class=
"m
b1
5 value"
>
{{
row
[
defaultProps
.
value
]
||
0
}}
</div>
<div
class=
"m
t
5 value"
>
{{
row
[
defaultProps
.
value
]
||
0
}}
</div>
<div
v-if=
"row[defaultProps.title1] !== undefined || row[defaultProps.value1] !== undefined"
>
<div
class=
"mt15"
v-if=
"row[defaultProps.title1] !== undefined || row[defaultProps.value1] !== undefined"
>
{{
row
[
defaultProps
.
title1
]
}}
{{
row
[
defaultProps
.
title1
]
}}
<span
class=
"fr"
:class=
"row[defaultProps.noArrow] || getClass(row[defaultProps.value1])"
>
<span
class=
"fr"
:class=
"row[defaultProps.noArrow] || getClass(row[defaultProps.value1])"
>
{{
row
[
defaultProps
.
noArrow
]
?
''
:
getArrow
(
row
[
defaultProps
.
value1
])
}}
{{
row
[
defaultProps
.
noArrow
]
?
''
:
getArrow
(
row
[
defaultProps
.
value1
])
}}
...
@@ -83,13 +83,15 @@ export default {
...
@@ -83,13 +83,15 @@ export default {
.card-index-li
{
.card-index-li
{
position
:
relative
;
position
:
relative
;
width
:
200px
;
width
:
200px
;
//
height
:
108px
;
//
background
:
linear-gradient
(
90deg
,
#f7f8fb
0%
,
#f1f3f8
100%
);
background
:
#fff
;
background
:
#fff
;
border-radius
:
$
border-radius
;
border-radius
:
var
(
--border-radius-big
);
margin
:
0
10px
20px
0
;
border
:
1px
solid
#edf2f9
;
margin
:
0
10px
0
0
;
line-height
:
1
;
line-height
:
1
;
padding
:
22px
20px
;
padding
:
22px
20px
;
&:last-child
{
margin-right
:
0
;
}
.card-icon
{
.card-icon
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
0
;
...
...
linkwe-pc/src/components/ChartBar.vue
View file @
ce67dae
...
@@ -10,15 +10,7 @@ export default {
...
@@ -10,15 +10,7 @@ export default {
// X轴坐标数据
// X轴坐标数据
xData
:
{
xData
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[
default
:
()
=>
[
'腾讯广告'
,
'巨量引擎'
,
'京东数坊'
,
'达摩盘'
,
'数据银行'
,
'微信广告'
,
'企业微信'
],
'腾讯广告'
,
'巨量引擎'
,
'京东数坊'
,
'达摩盘'
,
'数据银行'
,
'微信广告'
,
'企业微信'
,
],
},
},
// 图例
// 图例
legend
:
{
legend
:
{
...
@@ -62,7 +54,7 @@ export default {
...
@@ -62,7 +54,7 @@ export default {
})
})
},
},
},
},
created
()
{
},
created
()
{},
mounted
()
{
mounted
()
{
this
.
drawChart
()
this
.
drawChart
()
},
},
...
@@ -100,18 +92,18 @@ export default {
...
@@ -100,18 +92,18 @@ export default {
// text: 'Stacked Area Chart'
// text: 'Stacked Area Chart'
// },
// },
tooltip
:
{
tooltip
:
{
backgroundColor
:
'#505050'
,
borderWidth
:
0
,
textStyle
:
{
color
:
'#fff'
,
},
trigger
:
'axis'
,
trigger
:
'axis'
,
axisPointer
:
{
// backgroundColor: '#505050',
type
:
'cross'
,
// borderWidth: 0,
label
:
{
// textStyle: {
backgroundColor
:
'#6a7985'
,
// color: '#fff',
},
// },
},
// axisPointer: {
// type: 'cross',
// label: {
// backgroundColor: '#6a7985',
// },
// },
},
},
legend
:
{
legend
:
{
data
:
this
.
legend
,
data
:
this
.
legend
,
...
...
linkwe-pc/src/components/ChartLine.vue
View file @
ce67dae
...
@@ -16,15 +16,7 @@ export default {
...
@@ -16,15 +16,7 @@ export default {
// X轴坐标数据
// X轴坐标数据
xData
:
{
xData
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[
default
:
()
=>
[
'2021-12-01'
,
'2021-12-02'
,
'2021-12-03'
,
'2021-12-03'
,
'2021-12-04'
,
'2021-12-05'
,
'2021-12-06'
],
'2021-12-01'
,
'2021-12-02'
,
'2021-12-03'
,
'2021-12-03'
,
'2021-12-04'
,
'2021-12-05'
,
'2021-12-06'
,
],
},
},
// 图例; 单个图例可传字符串,实际转换成单元素数组[string]
// 图例; 单个图例可传字符串,实际转换成单元素数组[string]
legend
:
{
legend
:
{
...
@@ -124,19 +116,19 @@ export default {
...
@@ -124,19 +116,19 @@ export default {
// text: 'Stacked Area Chart'
// text: 'Stacked Area Chart'
// },
// },
tooltip
:
{
tooltip
:
{
textStyle
:
{
color
:
'#FFF'
,
// 设置文字颜色
fontSize
:
12
,
},
trigger
:
'axis'
,
trigger
:
'axis'
,
backgroundColor
:
'#505050'
,
// textStyle: {
borderWidth
:
0
,
// color: '#FFF', // 设置文字颜色
axisPointer
:
{
// fontSize: 12,
type
:
'cross'
,
// },
label
:
{
// backgroundColor: '#505050',
backgroundColor
:
'#6a7985'
,
// borderWidth: 0,
},
// axisPointer: {
},
// type: 'cross',
// label: {
// backgroundColor: '#6a7985',
// },
// },
},
},
legend
:
{
legend
:
{
data
:
legend
,
data
:
legend
,
...
@@ -156,7 +148,7 @@ export default {
...
@@ -156,7 +148,7 @@ export default {
icon
:
'roundRect'
,
icon
:
'roundRect'
,
itemWidth
:
24
,
itemWidth
:
24
,
itemHeight
:
4
,
itemHeight
:
4
,
itemGap
:
14
,
itemGap
:
14
,
tooltip
:
{
tooltip
:
{
show
:
true
,
show
:
true
,
},
},
...
...
linkwe-pc/src/components/ChartPie.vue
View file @
ce67dae
...
@@ -4,14 +4,14 @@ import { echartColors } from '@/utils/index'
...
@@ -4,14 +4,14 @@ import { echartColors } from '@/utils/index'
import
merge
from
'lodash.merge'
import
merge
from
'lodash.merge'
export
default
{
export
default
{
//
折线
图
//
饼
图
name
:
'ChartPie'
,
name
:
'ChartPie'
,
components
:
{},
components
:
{},
props
:
{
props
:
{
// 图例
// 图例
legend
:
{
legend
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[
'新增客户'
]
default
:
()
=>
[
'新增客户'
]
,
},
},
// 展示数据集
// 展示数据集
series
:
{
series
:
{
...
@@ -21,15 +21,15 @@ export default {
...
@@ -21,15 +21,15 @@ export default {
{
value
:
735
,
name
:
'Direct'
},
{
value
:
735
,
name
:
'Direct'
},
{
value
:
580
,
name
:
'Email'
},
{
value
:
580
,
name
:
'Email'
},
{
value
:
484
,
name
:
'Union Ads'
},
{
value
:
484
,
name
:
'Union Ads'
},
{
value
:
300
,
name
:
'Video Ads'
}
{
value
:
300
,
name
:
'Video Ads'
}
,
]
]
,
},
},
// 自定义图表配置项,使用loadsh.merge(origin, option)和原有的配置进行覆盖合并
// 自定义图表配置项,使用loadsh.merge(origin, option)和原有的配置进行覆盖合并
// loadsh.merge: https://www.html.cn/doc/lodash/#_mergeobject-sources
// loadsh.merge: https://www.html.cn/doc/lodash/#_mergeobject-sources
option
:
{
option
:
{
type
:
Object
,
type
:
Object
,
default
:
null
default
:
null
,
}
}
,
},
},
data
()
{
data
()
{
return
{}
return
{}
...
@@ -38,7 +38,7 @@ export default {
...
@@ -38,7 +38,7 @@ export default {
watch
:
{
watch
:
{
series
()
{
series
()
{
this
.
drawChart
()
this
.
drawChart
()
}
}
,
},
},
created
()
{},
created
()
{},
mounted
()
{
mounted
()
{
...
@@ -56,19 +56,19 @@ export default {
...
@@ -56,19 +56,19 @@ export default {
// top: 'bottom'
// top: 'bottom'
// },
// },
tooltip
:
{
tooltip
:
{
textStyle
:
{
color
:
'#FFF'
,
// 设置文字颜色
fontSize
:
12
},
trigger
:
'item'
,
trigger
:
'item'
,
backgroundColor
:
'#505050'
,
// textStyle: {
borderWidth
:
0
,
// color: '#FFF', // 设置文字颜色
axisPointer
:
{
// fontSize: 12,
type
:
'cross'
,
// },
label
:
{
// backgroundColor: '#505050',
backgroundColor
:
'#6a7985'
// borderWidth: 0,
}
// axisPointer: {
}
// type: 'cross',
// label: {
// backgroundColor: '#6a7985',
// },
// },
},
},
legend
:
{
legend
:
{
x
:
'center'
,
x
:
'center'
,
...
@@ -79,20 +79,20 @@ export default {
...
@@ -79,20 +79,20 @@ export default {
itemWidth
:
8
,
itemWidth
:
8
,
itemHeight
:
8
,
itemHeight
:
8
,
tooltip
:
{
tooltip
:
{
show
:
true
show
:
true
,
},
},
textStyle
:
{
textStyle
:
{
color
:
'#36363A'
,
color
:
'#36363A'
,
fontSize
:
12
,
fontSize
:
12
,
lineHeight
:
14
lineHeight
:
14
,
}
}
,
},
},
grid
:
{
grid
:
{
left
:
'3%'
,
left
:
'3%'
,
right
:
'3%'
,
right
:
'3%'
,
bottom
:
'20px'
,
bottom
:
'20px'
,
top
:
'30px'
,
top
:
'30px'
,
containLabel
:
true
containLabel
:
true
,
},
},
series
:
{
series
:
{
type
:
'pie'
,
type
:
'pie'
,
...
@@ -102,10 +102,10 @@ export default {
...
@@ -102,10 +102,10 @@ export default {
itemStyle
:
{
itemStyle
:
{
shadowBlur
:
10
,
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowOffsetX
:
0
,
shadowColor
:
'rgba(0, 0, 0, 0.5)'
shadowColor
:
'rgba(0, 0, 0, 0.5)'
,
}
}
,
}
}
,
}
}
,
}
}
this
.
option
&&
merge
(
option
,
this
.
option
)
this
.
option
&&
merge
(
option
,
this
.
option
)
option
&&
this
.
myChart
.
setOption
(
option
)
option
&&
this
.
myChart
.
setOption
(
option
)
...
@@ -113,8 +113,8 @@ export default {
...
@@ -113,8 +113,8 @@ export default {
new
ResizeObserver
((
entries
)
=>
{
new
ResizeObserver
((
entries
)
=>
{
this
.
myChart
.
resize
()
this
.
myChart
.
resize
()
}).
observe
(
this
.
$refs
.
chart
)
}).
observe
(
this
.
$refs
.
chart
)
}
}
,
}
}
,
}
}
</
script
>
</
script
>
...
...
linkwe-pc/src/views/index/index.vue
View file @
ce67dae
This diff is collapsed.
Click to expand it.
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