Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DC-TOM
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘照晖
DC-TOM
Commits
8d356ea1
Commit
8d356ea1
authored
Jun 04, 2025
by
liuzhaoh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化图表,进行联动
parent
4f1ef8fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
index.vue
src/views/dustMonitoring/index.vue
+24
-0
No files found.
src/views/dustMonitoring/index.vue
View file @
8d356ea1
...
...
@@ -178,7 +178,30 @@ const initChart = (instance, option, domEl) => {
instance
=
echarts
.
init
(
document
.
getElementById
(
domEl
));
instance
.
setOption
(
option
);
chartInstance
[
domEl
]
=
instance
;
chartLinkageFun
()
};
// 图表联动
const
chartLinkageFun
=
(
target
)
=>
{
Object
.
keys
(
chartInstance
).
forEach
((
currentKey
)
=>
{
chartInstance
[
currentKey
].
on
(
'mousemove'
,
(
params
)
=>
{
Object
.
keys
(
chartInstance
).
forEach
((
key
)
=>
{
// if (key !== currentKey) {
chartInstance
[
key
].
dispatchAction
({
type
:
'showTip'
,
seriesIndex
:
0
,
dataIndex
:
params
.
dataIndex
})
// }
})
})
})
}
// 移出图表事件
const
chartRemoveEvent
=
()
=>
{
Object
.
keys
(
chartInstance
).
forEach
((
key
)
=>
{
chartInstance
[
key
].
off
()
})
}
const
dustInfo
=
reactive
([
{
label
:
"压差"
,
...
...
@@ -573,6 +596,7 @@ onMounted(() => {
});
onUnmounted
(()
=>
{
window
.
removeEventListener
(
"resize"
,
resizeFun
);
chartRemoveEvent
()
})
watch
(
()
=>
form
.
dusterNo
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment