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 3014c221
authored
Jul 05, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改样式
1 parent
6c266171
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
11 deletions
src/components/LineChart.vue
src/components/lineOptions.js
src/views/salesData/trend.vue
src/components/LineChart.vue
View file @
3014c22
...
@@ -166,6 +166,7 @@ p {
...
@@ -166,6 +166,7 @@ p {
color
:
#ffffff
;
color
:
#ffffff
;
//
padding
:
4px
8px
;
//
padding
:
4px
8px
;
font-size
:
0.75em
;
font-size
:
0.75em
;
overflow
:
hidden
;
.txt-orange
{
.txt-orange
{
color
:
#eb6001
;
color
:
#eb6001
;
}
}
...
...
src/components/lineOptions.js
View file @
3014c22
function
getLineOptions
(
obj
)
{
function
getLineOptions
(
obj
)
{
const
{
tooltipFormatter
}
=
obj
const
{
tooltipFormatter
}
=
obj
var
lineOptions
=
{
var
lineOptions
=
{
tooltip
:
{
tooltip
:
{
...
@@ -9,7 +9,8 @@ function getLineOptions(obj) {
...
@@ -9,7 +9,8 @@ function getLineOptions(obj) {
color
:
'#FFFFFF'
,
color
:
'#FFFFFF'
,
fontSize
:
'8px'
fontSize
:
'8px'
},
},
formatter
:
tooltipFormatter
||
''
formatter
:
tooltipFormatter
||
''
,
confine
:
true
},
},
grid
:
{
grid
:
{
left
:
'3%'
,
left
:
'3%'
,
...
...
src/views/salesData/trend.vue
View file @
3014c22
...
@@ -8,11 +8,23 @@
...
@@ -8,11 +8,23 @@
<
template
>
<
template
>
<div>
<div>
<div
class=
"title"
>
转化趋势
</div>
<div
class=
"title"
>
转化趋势
</div>
<div
v-show=
"hasData"
style=
"width: 100%"
>
<div
<div
id=
"lineTrend"
:style=
"
{ height: height - 4.1 + 'vh' }">
</div>
v-show=
"hasData"
class=
"linetrend-box"
>
<div
id=
"lineTrend"
:style=
"
{ height: height - 4.1 + 'vh' }"
>
</div>
</div>
</div>
<div
v-show=
"!hasData"
class=
"empty"
>
<div
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
v-show=
"!hasData"
class=
"empty"
>
<img
src=
"../../assets/images/empty.png"
alt=
""
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -24,7 +36,7 @@ export default {
...
@@ -24,7 +36,7 @@ export default {
name
:
'Trend'
,
name
:
'Trend'
,
props
:
[
'height'
],
props
:
[
'height'
],
mixins
:
[
changeMixin
],
mixins
:
[
changeMixin
],
data
()
{
data
()
{
return
{
return
{
echartsTrend
:
{},
echartsTrend
:
{},
option
:
{},
option
:
{},
...
@@ -34,17 +46,17 @@ export default {
...
@@ -34,17 +46,17 @@ export default {
hasData
:
true
hasData
:
true
}
}
},
},
mounted
()
{
mounted
()
{
this
.
echartsTrend
=
echarts
.
init
(
document
.
getElementById
(
'lineTrend'
))
this
.
echartsTrend
=
echarts
.
init
(
document
.
getElementById
(
'lineTrend'
))
window
.
addEventListener
(
'resize'
,
()
=>
{
window
.
addEventListener
(
'resize'
,
()
=>
{
this
.
echartsTrend
.
resize
()
this
.
echartsTrend
.
resize
()
})
})
},
},
methods
:
{
methods
:
{
init
(
val
)
{
init
(
val
)
{
this
.
getChartData
(
val
)
this
.
getChartData
(
val
)
},
},
getChartData
(
val
)
{
getChartData
(
val
)
{
var
params
=
{
var
params
=
{
req
:
{
req
:
{
// queryItem: 'enter',
// queryItem: 'enter',
...
@@ -86,13 +98,14 @@ export default {
...
@@ -86,13 +98,14 @@ export default {
this
.
hasData
=
false
this
.
hasData
=
false
})
})
},
},
draw
(
reportType
)
{
draw
(
reportType
)
{
this
.
option
=
{
this
.
option
=
{
tooltip
:
{
tooltip
:
{
trigger
:
'axis'
,
trigger
:
'axis'
,
show
:
true
,
show
:
true
,
borderWidth
:
0
,
borderWidth
:
0
,
backgroundColor
:
'rgba(68,68,68,0.80)'
,
backgroundColor
:
'rgba(68,68,68,0.80)'
,
confine
:
true
,
// position: (point, params, dom, rect, size) => {
// position: (point, params, dom, rect, size) => {
// var x = 0 // x坐标位置
// var x = 0 // x坐标位置
// var y = 0 // y坐标位置
// var y = 0 // y坐标位置
...
@@ -226,3 +239,9 @@ export default {
...
@@ -226,3 +239,9 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.linetrend-box
{
width
:
100%
;
overflow
:
hidden
;
}
</
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