feat:创建分组或者仪表板时,点击取消按钮,不发出目录树的请求

This commit is contained in:
wangjiahao 2021-07-14 10:53:47 +08:00
parent b11db93328
commit 39d5ea5aa5

View File

@ -293,21 +293,23 @@ export default {
methods: {
closeEditPanelDialog(panelInfo) {
this.editPanel.visible = false
this.defaultTree()
//
if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) {
if (this.editPanel.optType === 'rename') {
this.lastActiveNodeData.name = panelInfo.name
return
if (panelInfo) {
this.defaultTree()
//
if (panelInfo && panelInfo.panelType === 'self' && this.lastActiveNodeData.id) {
if (this.editPanel.optType === 'rename') {
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) {