From 1c475741e6b3a43fa171b2aa77d30db459aceede Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Mon, 17 Nov 2025 13:44:00 +0800
Subject: [PATCH] feat:文件夹无子集置灰
---
src/views/layerManagement/components/leftList.vue | 41 +++++++++++++++++++++++++++--------------
src/views/layerManagement/index.vue | 2 +-
2 files changed, 28 insertions(+), 15 deletions(-)
diff --git a/src/views/layerManagement/components/leftList.vue b/src/views/layerManagement/components/leftList.vue
index 812bcdd..2ce3a5a 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>
@@ -188,6 +190,8 @@
};
// 定位按钮事件
const handleLocation = node => {
+console.log('11',node.data);
+
if (node.data.level === 2) {
layerParams.value.isSingleLocating = false;
// 新增:标记当前定位的文件夹ID
@@ -457,8 +461,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 +483,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>
diff --git a/src/views/layerManagement/index.vue b/src/views/layerManagement/index.vue
index 2a1c09d..eedbc17 100644
--- a/src/views/layerManagement/index.vue
+++ b/src/views/layerManagement/index.vue
@@ -170,7 +170,7 @@
};
// 点击显示区域
const handleCoverDataUpdate = data => {
-console.log('daa',data);
+// console.log('daa',data);
selectDataList.value = data;
if (selectDataList.value.length > 0) {
--
Gitblit v1.9.3