forked from github/dataease
feat:创建分组或者仪表板时,点击取消按钮,不发出目录树的请求
This commit is contained in:
parent
b11db93328
commit
39d5ea5aa5
@ -293,21 +293,23 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
closeEditPanelDialog(panelInfo) {
|
closeEditPanelDialog(panelInfo) {
|
||||||
this.editPanel.visible = false
|
this.editPanel.visible = false
|
||||||
this.defaultTree()
|
if (panelInfo) {
|
||||||
// 默认展开 同时点击 新增的节点
|
this.defaultTree()
|
||||||
if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) {
|
// 默认展开 同时点击 新增的节点
|
||||||
if (this.editPanel.optType === 'rename') {
|
if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) {
|
||||||
this.lastActiveNodeData.name = panelInfo.name
|
if (this.editPanel.optType === 'rename') {
|
||||||
return
|
this.lastActiveNodeData.name = panelInfo.name
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.lastActiveNodeData.children) {
|
||||||
|
this.$set(this.lastActiveNodeData, 'children', [])
|
||||||
|
}
|
||||||
|
this.lastActiveNodeData.children.push(panelInfo)
|
||||||
|
this.lastActiveNode.expanded = true
|
||||||
|
this.activeNodeAndClick(panelInfo)
|
||||||
|
} else {
|
||||||
|
this.tree(this.groupForm)
|
||||||
}
|
}
|
||||||
if (!this.lastActiveNodeData.children) {
|
|
||||||
this.$set(this.lastActiveNodeData, 'children', [])
|
|
||||||
}
|
|
||||||
this.lastActiveNodeData.children.push(panelInfo)
|
|
||||||
this.lastActiveNode.expanded = true
|
|
||||||
this.activeNodeAndClick(panelInfo)
|
|
||||||
} else {
|
|
||||||
this.tree(this.groupForm)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showEditPanel(param) {
|
showEditPanel(param) {
|
||||||
|
Loading…
Reference in New Issue
Block a user