提交 39d5ea5a authored 作者: wangjiahao's avatar wangjiahao

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

上级 b11db933
...@@ -293,21 +293,23 @@ export default { ...@@ -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', []) 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)
} }
this.lastActiveNodeData.children.push(panelInfo)
this.lastActiveNode.expanded = true
this.activeNodeAndClick(panelInfo)
} else {
this.tree(this.groupForm)
} }
}, },
showEditPanel(param) { showEditPanel(param) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论