From 128221893db2236a8ed4e8278a88ffc3ed5a50d4 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Mon, 17 Nov 2025 17:17:16 +0800
Subject: [PATCH] Merge branch 'feature/v8.0/8.0.2' into test

---
 src/views/layerManagement/components/leftList.vue |   55 +++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/src/views/layerManagement/components/leftList.vue b/src/views/layerManagement/components/leftList.vue
index 812bcdd..25a3eaf 100644
--- a/src/views/layerManagement/components/leftList.vue
+++ b/src/views/layerManagement/components/leftList.vue
@@ -69,16 +69,18 @@
         <template #default="{ node }">
           <div class="tree-node">
             <!-- 节点名称 -->
-            <span>{{ node.label }}</span>
+            <span class="nodeName">{{ node.label }}</span>
             <!-- 操作按钮组 -->
             <div class="tree-node-actions">
               <el-button
                 link
-               
+               icon="el-icon-location"
                 @click.stop="handleLocation(node)"
-              >定位</el-button>
-              <el-button link @click.stop="handleEdit(node)">编辑</el-button>
-              <el-button link @click.stop="handleDelete(node)">删除</el-button>
+                :disabled="node.data.level === 2 && (!node.data.children || node.data.children.length === 0)"
+              class="location-btn" 
+              ></el-button>
+              <el-button icon="el-icon-edit" link @click.stop="handleEdit(node)"></el-button>
+              <el-button icon="el-icon-delete" link @click.stop="handleDelete(node)"></el-button>
             </div>
           </div>
         </template>
@@ -106,7 +108,7 @@
 const checkedKeys = ref([]); // 存储勾选的节点key
 const treeRef = ref(null); // 获取tree实例
 const checkedNodes = ref([]); // 存储勾选的节点数据
-const props = defineProps(['activeName']);
+const props = defineProps(['activeName','resetCheck']);
 const formData = ref({
   isPush: undefined,
   page: 1,
@@ -370,7 +372,19 @@
     ElMessage.success('取消同步成功');
   });
 }
-
+// 切换tab清空复选框的数据
+watch(
+  () => props.resetCheck,
+  (newVal) => {
+    if (newVal !== undefined) {
+      checkedKeys.value = []; 
+      checkedNodes.value = []; 
+      coverData.value = []; 
+      treeRef.value?.setCheckedKeys([]); 
+    }
+  },
+  { immediate: true }
+);
 onMounted(() => {
   failuresList();
   gettreeDataApi();
@@ -457,8 +471,8 @@
   flex-grow: 1;
   padding-right: 12px;
   :deep(.el-tree-node__content) {
-  height: 38px !important;
-  line-height: 38px !important;
+  height: 35px !important;
+  line-height: 35px !important;
   }
 
   .isTheTerritory {
@@ -479,19 +493,28 @@
     justify-content: space-between;
     align-items: center;
     width: 100%;
+       .nodeName {
+    font-size: 12px !important;
+    }
   }
 
   .tree-node-actions {
     display: flex;
-    // gap: 8px; // 按钮之间的间距
+    // gap: 8px;
+ 
     button {
-      padding: 0; // 清除默认内边距
-      // color: #fff; // 按钮图标颜色
-       color: #409eff;
-      &:hover {
-        color: #409eff; //  hover 时的颜色
-      }
+      padding: 0; 
+      color: #fff; 
+      width: 17px;
+      height: 17px;
+      //  color: #409eff;
+      // &:hover {
+      //   color: #409eff; 
+      // }
     }
   }
+  ::v-deep(.location-btn.el-button.is-link.is-disabled) {
+  color:  #999 !important; 
+}
 }
 </style>

--
Gitblit v1.9.3