NEZ-1509 fix: Main图表锁定后Group下的图表依然可以移动
This commit is contained in:
@@ -100,8 +100,7 @@ export default {
|
||||
panelId: {},
|
||||
chartDetailInfo: Object,
|
||||
timeRange: Array, // 时间范围
|
||||
panelLock: { type: Boolean, default: true },
|
||||
isGroup: { type: Boolean, default: false },
|
||||
isGroup: Boolean,
|
||||
groupInfo: {},
|
||||
from: String,
|
||||
dataList: Array // 看板中所有图表信息
|
||||
@@ -123,6 +122,9 @@ export default {
|
||||
},
|
||||
layoutMargintop () {
|
||||
return this.isGroup ? '0' : (this.dataList.length ? (-1 * (this.stepWidth + 14) + 'px') : '0')
|
||||
},
|
||||
panelLock () {
|
||||
return this.$store.getters.getPanelLock
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -333,6 +335,9 @@ export default {
|
||||
this.$store.commit('setChartListId', `chartList${this.timestamp}`)
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
this.$store.dispatch('dispatchPanelLock', { flag: true })
|
||||
},
|
||||
watch: {
|
||||
dataList: {
|
||||
deep: true,
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
>
|
||||
<template v-slot:before>
|
||||
<el-dropdown-item>
|
||||
<div id="panel-lock" @click="panelLock=!panelLock"><i :class="{'nz-icon nz-icon-lock':!panelLock,'nz-icon nz-icon-unlock':panelLock}"></i>{{!panelLock ? $t('overall.locked') : $t('overall.unlocked')}}</div>
|
||||
<div id="panel-lock" @click="$store.dispatch('dispatchPanelLock',{flag:!panelLock})"><i :class="{'nz-icon nz-icon-lock':!panelLock,'nz-icon nz-icon-unlock':panelLock}"></i>{{!panelLock ? $t('overall.locked') : $t('overall.unlocked')}}</div>
|
||||
</el-dropdown-item>
|
||||
</template>
|
||||
<template v-slot:after>
|
||||
@@ -90,7 +90,6 @@
|
||||
:data-list="dataList"
|
||||
:nowTimeType="nowTimeType"
|
||||
:from="fromRoute.panel"
|
||||
:panel-lock="panelLock"
|
||||
:time-range="searchTime"
|
||||
@edit-chart="editChart"
|
||||
@on-refresh-time="refreshTime"
|
||||
@@ -170,7 +169,6 @@ export default {
|
||||
panelTabLoading: false,
|
||||
overScroll10: false,
|
||||
isLoading: true,
|
||||
panelLock: true,
|
||||
showTopBtn: false, // top按钮
|
||||
visible: false,
|
||||
chartListLoading: true,
|
||||
@@ -294,6 +292,9 @@ export default {
|
||||
},
|
||||
delChartFlag () {
|
||||
return this.$store.getters.getDelChart
|
||||
},
|
||||
panelLock () {
|
||||
return this.$store.getters.getPanelLock
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
const panel = {
|
||||
state: {
|
||||
showRightBox: false,
|
||||
panelLock: true,
|
||||
chart: '',
|
||||
delChart: false,
|
||||
groupId: '',
|
||||
@@ -20,6 +21,9 @@ const panel = {
|
||||
setShowRightBox (state, flag) {
|
||||
state.showRightBox = flag
|
||||
},
|
||||
setPanelLock (state, flag) {
|
||||
state.panelLock = flag
|
||||
},
|
||||
setChart (state, chart) {
|
||||
state.chart = chart
|
||||
},
|
||||
@@ -61,6 +65,9 @@ const panel = {
|
||||
getShowRightBox (state) {
|
||||
return state.showRightBox
|
||||
},
|
||||
getPanelLock (state) {
|
||||
return state.panelLock
|
||||
},
|
||||
getChart (state) {
|
||||
return state.chart
|
||||
},
|
||||
@@ -119,6 +126,9 @@ const panel = {
|
||||
dispatchHeaderH (store, playload) {
|
||||
store.commit('setHeaderH', playload.headerH)
|
||||
},
|
||||
dispatchPanelLock (store, playload) {
|
||||
store.commit('setPanelLock', playload.flag)
|
||||
},
|
||||
clearPanel (store) {
|
||||
store.commit('cleanPanel')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user