Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
glsk-data-view-scene
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 ea699140
authored
Feb 28, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复运营看板客户价值分析轮播问题
1 parent
8d7513a9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
src/views/operational/components/BarChart.vue
src/views/operational/components/BarChart.vue
View file @
ea69914
...
@@ -106,7 +106,7 @@ export default {
...
@@ -106,7 +106,7 @@ export default {
watch
:
{
watch
:
{
analysisList
:
{
analysisList
:
{
handler
()
{
handler
()
{
le
t
_this
=
this
cons
t
_this
=
this
const
{
rotate
,
analysisList
,
colorList
}
=
this
const
{
rotate
,
analysisList
,
colorList
}
=
this
const
obj
=
{
const
obj
=
{
rotate
,
rotate
,
...
@@ -117,19 +117,24 @@ export default {
...
@@ -117,19 +117,24 @@ export default {
_this
.
lineOptions
=
_this
.
revese
?
getBarReverseOptions
(
obj
,
colorList
)
:
getBarOptions
(
obj
,
colorList
)
_this
.
lineOptions
=
_this
.
revese
?
getBarReverseOptions
(
obj
,
colorList
)
:
getBarOptions
(
obj
,
colorList
)
_this
.
chartBindEvent
()
_this
.
chartBindEvent
()
})
})
},
},
deep
:
true
deep
:
true
}
}
},
},
mounted
()
{
mounted
()
{
let
_this
=
this
this
.
lineDom
=
document
.
getElementById
(
this
.
domId
)
_this
.
$nextTick
(
function
()
{
this
[
this
.
domId
]
=
echarts
.
init
(
this
.
lineDom
)
_this
.
lineDom
=
document
.
getElementById
(
_this
.
domId
)
// this.chartBindEvent()
_this
[
_this
.
domId
]
=
echarts
.
init
(
_this
.
lineDom
)
window
.
addEventListener
(
'resize'
,
()
=>
{
_this
.
chartReaize
()
this
[
this
.
domId
].
resize
()
_this
.
chartBindEvent
()
})
})
// const _this = this
// _this.$nextTick(function () {
// _this.lineDom = document.getElementById(_this.domId)
// _this[_this.domId] = echarts.init(_this.lineDom)
// _this.chartReaize()
// _this.chartBindEvent()
// })
},
},
methods
:
{
methods
:
{
chartReaize
()
{
chartReaize
()
{
...
@@ -138,12 +143,12 @@ export default {
...
@@ -138,12 +143,12 @@ export default {
})
})
},
},
chartBindEvent
()
{
chartBindEvent
()
{
if
(
!
this
[
this
.
domId
])
{
if
(
!
this
[
this
.
domId
])
{
return
false
;
return
false
}
}
if
(
this
[
this
.
domId
])
{
if
(
this
[
this
.
domId
])
{
// 防止报错
// 防止报错
if
(
this
.
lineOptions
&&
this
.
lineOptions
.
series
)
{
if
(
this
.
lineOptions
&&
this
.
lineOptions
.
series
)
{
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
this
[
this
.
domId
].
setOption
(
this
.
lineOptions
)
}
}
}
}
...
@@ -186,8 +191,8 @@ export default {
...
@@ -186,8 +191,8 @@ export default {
this
.
chartAction
(
this
.
currentData
.
dataIndex
)
this
.
chartAction
(
this
.
currentData
.
dataIndex
)
},
},
chartAction
(
index
=
7
)
{
chartAction
(
index
=
7
)
{
if
(
!
this
[
this
.
domId
])
{
if
(
!
this
[
this
.
domId
])
{
return
false
;
return
false
}
}
this
[
this
.
domId
].
dispatchAction
({
this
[
this
.
domId
].
dispatchAction
({
type
:
'showTip'
,
type
:
'showTip'
,
...
...
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