| | |
| | | <div class="tableListBox"> |
| | | <el-tree |
| | | class="ztzf-el-tree" |
| | | :class="{isTheTerritory:activeName === '国土空间规划'}" |
| | | ref="treeRef" |
| | | v-model="checkedKeys" |
| | | :data="treeData" |
| | |
| | | <span>{{ node.label }}</span> |
| | | <!-- 操作按钮组 --> |
| | | <div class="tree-node-actions"> |
| | | <el-button |
| | | <el-button link |
| | | icon="el-icon-location" |
| | | type="text" |
| | | @click="handleLocation(node)" |
| | | ></el-button> |
| | | <el-button icon="el-icon-edit" type="text" @click.stop="handleEdit(node)"></el-button> |
| | | <el-button icon="el-icon-delete" type="text" @click="handleDelete(node)"></el-button> |
| | | <el-button icon="el-icon-edit" link @click.stop="handleEdit(node)"></el-button> |
| | | <el-button icon="el-icon-delete" link @click="handleDelete(node)"></el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <script setup> |
| | | import { ElMessage } from 'element-plus'; |
| | | import { treeDataApi, deleteFenceApi, deleteFolderApi, spatialPlanningApi } from '@/api/layer/index'; |
| | | import { inject, onMounted, watch } from 'vue'; |
| | | import { inject, nextTick, onMounted, watch } from 'vue'; |
| | | const emit = defineEmits(['update:coverData', 'update:deitData', 'newFencesMethods']); |
| | | import EventBus from '@/utils/eventBus'; |
| | | const coverData = ref(); |
| | |
| | | newVal => { |
| | | const matchedCategory = treeAllData.value.find(item => item.name === newVal); |
| | | treeData.value = matchedCategory.children; |
| | | nextTick(search) |
| | | if (treeData.value && treeData.value.length > 0) { |
| | | const folderNode = treeData.value[0]; |
| | | // 赋值给 layerParams |
| | |
| | | treeRef.value?.filter('') |
| | | } |
| | | function filterNode(value,data) { |
| | | if (props.activeName === '国土空间规划'){ |
| | | if (!value) return (data.level===2 || data.level===1) |
| | | return (data.level===2 || data.level===1) && data.name.includes(value) |
| | | } |
| | | if (!value) return true |
| | | return data.name.includes(value) |
| | | } |
| | |
| | | // } |
| | | //} |
| | | |
| | | .isTheTerritory{ |
| | | :deep(){ |
| | | .el-tree-node__expand-icon{ |
| | | visibility: hidden; |
| | | } |
| | | } |
| | | } |
| | | |
| | | :deep() { |
| | | .el-checkbox { |
| | | --el-checkbox-bg-color: transparent !important; |