From abc65c6317db3d57c501615125b5a4e17b0448c9 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期二, 25 一月 2022 17:14:10 +0800 Subject: [PATCH] 优化目录移除时默认目录的选择 --- web_src/src/components/dialog/chooseChannelForCatalog.vue | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/web_src/src/components/dialog/chooseChannelForCatalog.vue b/web_src/src/components/dialog/chooseChannelForCatalog.vue index 08e180a..2d87bdd 100644 --- a/web_src/src/components/dialog/chooseChannelForCatalog.vue +++ b/web_src/src/components/dialog/chooseChannelForCatalog.vue @@ -132,6 +132,7 @@ url:`/api/platform/catalog/del`, params: { id: id, + platformId: this.platformId, } }) .then((res) => { @@ -139,8 +140,8 @@ console.log("绉婚櫎鎴愬姛") node.parent.loaded = false node.parent.expand(); - if(this.defaultCatalogId === id) { - this.defaultCatalogId = this.platformId; + if (res.data.data) { + this.defaultCatalogId = res.data.data; } } }) @@ -239,7 +240,15 @@ disabled: node.level === 1, divided: true, onClick: () => { - this.removeCatalog(data.id, node) + this.$confirm('纭畾鍒犻櫎?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.removeCatalog(data.id, node) + }).catch(() => { + + }); } }, { -- Gitblit v1.8.0