From 031a29b8a2b686798aca8c0e487cb2fd4ffaa0b1 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: Wed, 7 Aug 2024 17:15:45 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=A1=8C=E6=94=BF=E5=8C=BA?=
=?UTF-8?q?=E5=88=92=E9=80=9A=E9=81=93=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
web_src/src/components/region.vue | 43 ++++++++++++++++++++++++++++---
1 file changed, 40 insertions(+), 3 deletions(-)
diff --git a/web_src/src/components/region.vue b/web_src/src/components/region.vue
index 747196ce..6462979e 100755
--- a/web_src/src/components/region.vue
+++ b/web_src/src/components/region.vue
@@ -27,9 +27,12 @@
-
+
添加
+
+ 移除
+
@@ -162,8 +165,12 @@ export default {
this.multipleSelection = val;
},
selectable: function (row, rowIndex) {
- if (row.gbCivilCode) {
- return false
+ if (this.hasCivilCode === "") {
+ if (row.gbCivilCode) {
+ return false
+ }else {
+ return true
+ }
}else {
return true
}
@@ -211,6 +218,36 @@ export default {
});
},
remove: function (row) {
+ let channels = []
+ for (let i = 0; i < this.multipleSelection.length; i++) {
+ channels.push(this.multipleSelection[i].gbId)
+ }
+ if (channels.length === 0) {
+ this.$message.info("请选择右侧通道")
+ return;
+ }
+ this.loading = true
+
+ this.$axios({
+ method: 'post',
+ url: `/api/common/channel/region/delete`,
+ data: {
+ channelIds: channels
+ }
+ }).then((res)=> {
+ if (res.data.code === 0) {
+ this.$message.success("保存成功")
+ this.getChannelList()
+ // 刷新树节点
+ this.$refs.regionTree.refresh(this.regionId)
+ }else {
+ this.$message.error(res.data.msg)
+ }
+ this.loading = false
+ }).catch((error)=> {
+ this.$message.error(error)
+ this.loading = false
+ });
},
getSnap: function (row) {
let baseUrl = window.baseUrl ? window.baseUrl : "";