fix(仪表板): 修复普通用户点击仪表板可能无发显示问题
This commit is contained in:
parent
53bb42777b
commit
7089665fd2
@ -675,13 +675,13 @@ export default {
|
||||
},
|
||||
filterText(val) {
|
||||
this.searchPids = []
|
||||
this.$refs.default_panel_tree.filter(val)
|
||||
this.$refs.panel_list_tree.filter(val)
|
||||
this.$refs.default_panel_tree?.filter(val)
|
||||
this.$refs.panel_list_tree?.filter(val)
|
||||
},
|
||||
searchType(val) {
|
||||
this.searchPids = []
|
||||
this.$refs.default_panel_tree.filter(this.filterText)
|
||||
this.$refs.panel_list_tree.filter(this.filterText)
|
||||
this.$refs.default_panel_tree?.filter(this.filterText)
|
||||
this.$refs.panel_list_tree?.filter(this.filterText)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -1054,14 +1054,14 @@ export default {
|
||||
}
|
||||
if (this.filterText) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.default_panel_tree.filter(this.filterText)
|
||||
this.$refs.default_panel_tree?.filter(this.filterText)
|
||||
})
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
const currentKey = this.$refs.default_panel_tree?.getCurrentKey()
|
||||
if (currentKey) {
|
||||
this.$nextTick(() =>{
|
||||
this.$refs.default_panel_tree.setCurrentKey(currentKey)
|
||||
this.$refs.default_panel_tree?.setCurrentKey(currentKey)
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -1070,9 +1070,9 @@ export default {
|
||||
|
||||
nodeClick(data, node) {
|
||||
if (data.panelType === 'self') {
|
||||
this.$refs.default_panel_tree.setCurrentKey(null)
|
||||
this.$refs.default_panel_tree?.setCurrentKey(null)
|
||||
} else {
|
||||
this.$refs.panel_list_tree.setCurrentKey(null)
|
||||
this.$refs.panel_list_tree?.setCurrentKey(null)
|
||||
}
|
||||
this.lastActiveNode = node
|
||||
this.lastActiveNodeData = data
|
||||
@ -1163,7 +1163,7 @@ export default {
|
||||
// 延迟设置CurrentKey
|
||||
_this.$refs.panel_list_tree.setCurrentKey(panelInfo.id)
|
||||
// 去除default_tree 的影响
|
||||
_this.$refs.default_panel_tree.setCurrentKey(null)
|
||||
_this.$refs.default_panel_tree?.setCurrentKey(null)
|
||||
_this.$nextTick(() => {
|
||||
document.querySelector('.is-current').firstChild.click()
|
||||
// 如果是仪表板列表的仪表板 直接进入编辑界面
|
||||
@ -1180,9 +1180,9 @@ export default {
|
||||
const _this = this
|
||||
_this.$nextTick(() => {
|
||||
// 延迟设置CurrentKey
|
||||
_this.$refs.panel_list_tree.setCurrentKey(panelInfo.id)
|
||||
_this.$refs.panel_list_tree?.setCurrentKey(panelInfo.id)
|
||||
// 去除default_tree 的影响
|
||||
_this.$refs.default_panel_tree.setCurrentKey(null)
|
||||
_this.$refs.default_panel_tree?.setCurrentKey(null)
|
||||
if (panelInfo.parents) {
|
||||
_this.expandedArray = panelInfo.parents
|
||||
}
|
||||
@ -1197,9 +1197,9 @@ export default {
|
||||
if (panelId) {
|
||||
const _this = this
|
||||
_this.$nextTick(() => {
|
||||
_this.$refs.panel_list_tree.setCurrentKey(null)
|
||||
_this.$refs.panel_list_tree?.setCurrentKey(null)
|
||||
// 延迟设置CurrentKey
|
||||
_this.$refs.default_panel_tree.setCurrentKey(panelId)
|
||||
_this.$refs.default_panel_tree?.setCurrentKey(panelId)
|
||||
_this.$nextTick(() => {
|
||||
document.querySelector('.is-current').firstChild.click()
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user