无人机管理后台前端(已迁走)
罗广辉
2025-12-03 7186247c8e7facc9745ded9a459e9f2056b6a069
feat: 不过滤过期的
1 files modified
38 ■■■■ changed files
src/views/layerManagement/components/leftList.vue 38 ●●●● patch | view | raw | blame | history
src/views/layerManagement/components/leftList.vue
@@ -57,7 +57,7 @@
        node-key="id"
        default-expand-all
        :expand-on-click-node="false"
         :check-on-click-node="false"
         :check-on-click-node="false"
        :filter-node-method="filterNode"
        @check="handleCheck"
        :props="{
@@ -77,7 +77,7 @@
               icon="el-icon-location"
                @click.stop="handleLocation(node)"
                :disabled="node.data.level === 2 && (!node.data.children || node.data.children.length === 0)"
              class="location-btn"
              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>
@@ -124,9 +124,9 @@
const gettreeDataApi = async () => {
  try {
    loading.value = true;
    const res = await treeDataApi();
    const res = await treeDataApi({filterExpired:false});
    treeAllData.value = res.data.data;
    setupWatch();
  } catch (error) {
    console.error('获取数据失败:', error);
@@ -186,7 +186,7 @@
      checkedNodes.value = allFenceNodes;
      coverData.value = allFenceNodes;
      emit('update:coverData', coverData.value);
    }
  }
@@ -206,16 +206,16 @@
  const currentCheckedKeys = [...checkedKeys.value];
  const currentCheckedNodes = [...checkedNodes.value];
  EventBus.emit('focusOnNode', node.data);
  if (node.data.level === 2) {
    const folderChildren = node.data.children || [];
    const childrenIds = folderChildren.map(child => child.id);
    const newChildrenIds = childrenIds.filter(id => !currentCheckedKeys.includes(id));
    const newChildrenNodes = folderChildren.filter(child => newChildrenIds.includes(child.id));
    const newCheckedKeys = [...new Set([...currentCheckedKeys, ...newChildrenIds])];
    const newCheckedNodes = [...currentCheckedNodes, ...newChildrenNodes];
    treeRef.value.setCheckedKeys(newCheckedKeys);
    checkedKeys.value = newCheckedKeys;
    checkedNodes.value = newCheckedNodes;
@@ -249,10 +249,10 @@
    coverData.value = [];
    layerParams.value.editNest = true;
    layerParams.value.decideWhetherToAddOrEdit = 2;
    if (props.activeName === '自定义识别区') {
    if (props.activeName === '自定义识别区') {
      layerParams.value.fenceType = 1; // 电子围栏类型标识
    } else if (props.activeName === '自定义禁飞区') {
      layerParams.value.fenceType = 2; // 自定义禁飞区类型标识
      layerParams.value.fenceType = 2; // 自定义禁飞区类型标识
    }
    emit('update:deitData', node.data);
  }
@@ -380,10 +380,10 @@
  () => props.resetCheck,
  (newVal) => {
    if (newVal !== undefined) {
      checkedKeys.value = [];
      checkedNodes.value = [];
      coverData.value = [];
      treeRef.value?.setCheckedKeys([]);
      checkedKeys.value = [];
      checkedNodes.value = [];
      coverData.value = [];
      treeRef.value?.setCheckedKeys([]);
    }
  },
  { immediate: true }
@@ -479,20 +479,20 @@
  .tree-node-actions {
    display: flex;
    // gap: 8px;
    button {
      padding: 0;
      color: #fff;
      padding: 0;
      color: #fff;
      width: 17px;
      height: 17px;
      //  color: #409eff;
      // &:hover {
      //   color: #409eff;
      //   color: #409eff;
      // }
    }
  }
  ::v-deep(.location-btn.el-button.is-link.is-disabled) {
  color:  #999 !important;
  color:  #999 !important;
}
}
</style>