From ba09ccd7346a2e0aa8a1ac55b5cc46eb9cb057af Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Fri, 02 Aug 2024 08:39:53 +0800
Subject: [PATCH] 责任人
---
src/views/Admin/contactBook/structure.vue | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/src/views/Admin/contactBook/structure.vue b/src/views/Admin/contactBook/structure.vue
index 85b6e41..672e81b 100644
--- a/src/views/Admin/contactBook/structure.vue
+++ b/src/views/Admin/contactBook/structure.vue
@@ -125,12 +125,24 @@
const t = this
const res = await getStructure();
if(res.data.code == 100){
- t.tableData = res.data.data
+ t.tableData = t.filterBranches(res.data.data,['自治区直辖县级行政区划'])
}else{
t.$message.warning(res.data.msg);
}
},
+ filterBranches(branches, targetNames) {
+ return branches.filter(branch => {
+ if (targetNames.includes(branch.name)) {
+ return false; // 过滤掉当前分支
+ }
+ if (branch.children && branch.children.length > 0) {
+ branch.children = this.filterBranches(branch.children, targetNames);
+ }
+ return true; // 保留当前分支
+ });
+ },
+
openAdd(type,row){
if(type == 'add'){
this.editTitle = '新增'
--
Gitblit v1.9.2