forked from github/dataease
Merge pull request #1995 from dataease/pr@dev@fix_panel-style
fix: tab组件视图编辑框弹出错误问题
This commit is contained in:
commit
3bc094dd8c
@ -277,6 +277,7 @@ export default {
|
|||||||
this.curItem.name = newComponentId
|
this.curItem.name = newComponentId
|
||||||
this.viewDialogVisible = false
|
this.viewDialogVisible = false
|
||||||
this.activeTabName = newComponentId
|
this.activeTabName = newComponentId
|
||||||
|
this.$store.dispatch('chart/setViewId', component.propValue.viewId)
|
||||||
this.styleChange()
|
this.styleChange()
|
||||||
})
|
})
|
||||||
// this.setComponentInfo()
|
// this.setComponentInfo()
|
||||||
@ -308,6 +309,7 @@ export default {
|
|||||||
this.activeTabName = this.element.options.tabList[activIndex].name
|
this.activeTabName = this.element.options.tabList[activIndex].name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.$store.dispatch('chart/setViewId', null)
|
||||||
this.styleChange()
|
this.styleChange()
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -334,6 +336,7 @@ export default {
|
|||||||
this.element.options.tabList.forEach(item => {
|
this.element.options.tabList.forEach(item => {
|
||||||
if (item && item.name === name && item.content && item.content.propValue && item.content.propValue.viewId) {
|
if (item && item.name === name && item.content && item.content.propValue && item.content.propValue.viewId) {
|
||||||
this.filterMap[item.content.propValue.viewId] = item.content.filters
|
this.filterMap[item.content.propValue.viewId] = item.content.filters
|
||||||
|
this.$store.dispatch('chart/setViewId', item.content.propValue.viewId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// console.log(tab)
|
// console.log(tab)
|
||||||
|
@ -455,6 +455,15 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 侧边显示控制
|
// 侧边显示控制
|
||||||
chartEditParam() {
|
chartEditParam() {
|
||||||
|
if (this.curComponent) {
|
||||||
|
if (this.curComponent.type === 'view') {
|
||||||
|
return { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' }
|
||||||
|
} else if (this.curComponent.type === 'de-tabs' && this.$store.state.chart.viewId) {
|
||||||
|
return { 'id': this.$store.state.chart.viewId, 'optType': 'edit' }
|
||||||
|
} else {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
return this.curComponent ? { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' } : {}
|
return this.curComponent ? { 'id': this.curComponent.propValue.viewId, 'optType': 'edit' } : {}
|
||||||
},
|
},
|
||||||
// 侧边显示控制
|
// 侧边显示控制
|
||||||
@ -463,7 +472,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 显示视图工具栏
|
// 显示视图工具栏
|
||||||
showViewToolsAside() {
|
showViewToolsAside() {
|
||||||
return this.curComponent && this.curComponent.type === 'view'
|
return this.curComponent && (this.curComponent.type === 'view' || this.curComponent.type === 'de-tabs')
|
||||||
},
|
},
|
||||||
showViewToolAsideType() {
|
showViewToolAsideType() {
|
||||||
if (this.curComponent) {
|
if (this.curComponent) {
|
||||||
@ -624,6 +633,9 @@ export default {
|
|||||||
this.outerParamsSetVisible = false
|
this.outerParamsSetVisible = false
|
||||||
},
|
},
|
||||||
changeRightDrawOpen(param) {
|
changeRightDrawOpen(param) {
|
||||||
|
if (!param) {
|
||||||
|
this.$store.dispatch('chart/setViewId', null)
|
||||||
|
}
|
||||||
this.rightDrawOpen = param
|
this.rightDrawOpen = param
|
||||||
if (this.rightDrawOpen) {
|
if (this.rightDrawOpen) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user