From c547851487a8e24f93405ace3c0359d0d6790364 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 25 一月 2022 19:38:04 +0800
Subject: [PATCH] 优化zlm上线与下线过时通道的移除
---
web_src/src/components/dialog/chooseChannelForCatalog.vue | 37 ++++++++++++-------------------------
1 files changed, 12 insertions(+), 25 deletions(-)
diff --git a/web_src/src/components/dialog/chooseChannelForCatalog.vue b/web_src/src/components/dialog/chooseChannelForCatalog.vue
index 4e4339f..2d87bdd 100644
--- a/web_src/src/components/dialog/chooseChannelForCatalog.vue
+++ b/web_src/src/components/dialog/chooseChannelForCatalog.vue
@@ -91,16 +91,6 @@
if (typeof(callback) === 'function') {
callback(res.data.data)
}
- //
-
- // if (typeof (this.$refs.tree.setCurrentKey) == "undefined") {
- // this.$refs.tree.setCurrentKey(this.defaultCatalogId)
- // let data = this.$refs.tree.getCurrentNode()
- // if (data != null && data.id === this.defaultCatalogId) {
- // this.currentCatalogChange(data, this.$refs.tree.getNode(data.id))
- // }
- // }
-
}
})
.catch(function (error) {
@@ -126,18 +116,6 @@
let node = this.$refs.tree.getNode(id);
this.refreshCatalog(node);
}
- // if (nodeIds !== null) {
- // let refreshNode = {}
- // for (let i = 0; i < nodeIds.length; i++) {
- // let node = this.$refs.tree.getNode(nodeIds[i]);
- // refreshNode[node.parent.data.id] = node.parent
- // }
- // if (Object.values(refreshNode).length > 0) {
- // for (let j = 0; j < Object.values(refreshNode).length; j++) {
- // this.refreshCatalog(Object.values(refreshNode)[j]);
- // }
- // }
- // }
},
editCatalog: function (data, node){
let that = this;
@@ -154,6 +132,7 @@
url:`/api/platform/catalog/del`,
params: {
id: id,
+ platformId: this.platformId,
}
})
.then((res) => {
@@ -161,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;
}
}
})
@@ -261,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