Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Z
ZZDataAnalysis
Project
Project
Details
Activity
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
hlwu
ZZDataAnalysis
Commits
7a06d7a4
Commit
7a06d7a4
authored
Sep 19, 2023
by
liushuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复定制化图表显示问题
parent
78177e11
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
5 deletions
+30
-5
chartDataZoom.vue
web/src/chartcustomization/chartConfg/chartDataZoom.vue
+18
-4
chartPoint.vue
web/src/chartcustomization/chartConfg/chartPoint.vue
+10
-0
chartYAxis.vue
web/src/chartcustomization/chartConfg/chartYAxis.vue
+2
-1
No files found.
web/src/chartcustomization/chartConfg/chartDataZoom.vue
View file @
7a06d7a4
<
template
>
<
template
>
<div
class=
"setting"
>
<div
class=
"setting"
>
<div
name=
"dataZoom"
class=
"dataZoom"
>
<div
name=
"dataZoom"
class=
"dataZoom"
>
<div
slot=
"title"
class=
"collapse-item"
>
<div
slot=
"title"
class=
"collapse-item"
@
click=
"change"
>
数据区域缩放
数据区域缩放
<el-switch
<el-switch
ref=
"switch"
style=
"pointer-events: none;"
v-model=
"show"
v-model=
"show"
@
change=
"changeShow"
active-color=
"#13ce66"
>
active-color=
"#13ce66"
>
</el-switch>
</el-switch>
...
@@ -33,7 +31,22 @@
...
@@ -33,7 +31,22 @@
mounted
()
{
mounted
()
{
this
.
activeNames
=
[
"dataZoom"
]
this
.
activeNames
=
[
"dataZoom"
]
},
},
watch
:{
"show"
:
function
(
newval
,
oldVal
)
{
for
(
var
i
in
this
.
chartSettingsDataZoom
){
let
item
=
this
.
chartSettingsDataZoom
[
i
]
item
.
show
=
newval
}
this
.
$store
.
commit
(
'charts/updateChartSettingsDataZoom'
,
this
.
chartSettingsDataZoom
);
},
},
methods
:{
methods
:{
change
(){
// 获取 el-switch 的实例
const
elSwitch
=
this
.
$refs
.
switch
;
// 手动触发 el-switch 的点击事件
elSwitch
.
$el
.
click
();
},
changeShow
(
value
){
changeShow
(
value
){
for
(
var
i
in
this
.
chartSettingsDataZoom
){
for
(
var
i
in
this
.
chartSettingsDataZoom
){
let
item
=
this
.
chartSettingsDataZoom
[
i
]
let
item
=
this
.
chartSettingsDataZoom
[
i
]
...
@@ -50,6 +63,7 @@
...
@@ -50,6 +63,7 @@
flex
:
1
;
flex
:
1
;
}
}
.collapse-item
{
.collapse-item
{
cursor
:
pointer
;
/*width: 100%;*/
/*width: 100%;*/
font-weight
:
bold
;
font-weight
:
bold
;
line-height
:
40px
;
line-height
:
40px
;
...
...
web/src/chartcustomization/chartConfg/chartPoint.vue
View file @
7a06d7a4
...
@@ -44,6 +44,16 @@
...
@@ -44,6 +44,16 @@
computed
:
{
computed
:
{
...
mapState
(
'charts'
,[
'chartSettingsSeries'
])
...
mapState
(
'charts'
,[
'chartSettingsSeries'
])
},
},
watch
:{
'activeNames'
:
function
(
newVal
,
oldVal
)
{
if
(
this
.
activeNames
.
length
>
0
){
this
.
chartSettingsSeries
.
showPoint
=
true
}
else
{
this
.
chartSettingsSeries
.
showPoint
=
false
}
this
.
$store
.
commit
(
'charts/updateChartSettingsSeries'
,
this
.
chartSettingsSeries
);
}
},
mounted
()
{
mounted
()
{
if
(
this
.
show
==
true
){
if
(
this
.
show
==
true
){
this
.
activeNames
=
[
"point"
]
this
.
activeNames
=
[
"point"
]
...
...
web/src/chartcustomization/chartConfg/chartYAxis.vue
View file @
7a06d7a4
...
@@ -251,11 +251,12 @@
...
@@ -251,11 +251,12 @@
},
},
watch
:{
watch
:{
'activeNames'
:
function
(
newVal
,
oldVal
)
{
'activeNames'
:
function
(
newVal
,
oldVal
)
{
if
(
newVal
.
length
>
0
){
if
(
this
.
activeNames
.
length
>
0
){
this
.
chartSettingsYAxis
.
show
=
true
this
.
chartSettingsYAxis
.
show
=
true
}
else
{
}
else
{
this
.
chartSettingsYAxis
.
show
=
false
this
.
chartSettingsYAxis
.
show
=
false
}
}
// console.log( this.chartSettingsYAxis.show )
this
.
$store
.
commit
(
'charts/updateChartSettingYAxis'
,
this
.
chartSettingsYAxis
);
this
.
$store
.
commit
(
'charts/updateChartSettingYAxis'
,
this
.
chartSettingsYAxis
);
},
},
'axisShow'
:
function
(
newVal
,
oldVal
)
{
'axisShow'
:
function
(
newVal
,
oldVal
)
{
...
...
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