无人机管理后台前端(已迁走)
张含笑
2025-11-17 1c475741e6b3a43fa171b2aa77d30db459aceede
feat:文件夹无子集置灰
2 files modified
43 ■■■■■ changed files
src/views/layerManagement/components/leftList.vue 41 ●●●●● patch | view | raw | blame | history
src/views/layerManagement/index.vue 2 ●●● patch | view | raw | blame | history
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>
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) {