| | |
| | | <div |
| | | class="tableListBox" |
| | | v-loading="loading" |
| | | element-loading-background="rgba(0, 0, 0, 0.5)" |
| | | element-loading-background="rgba(0, 0, 0, 0.2)" |
| | | element-loading-text="加载中..." |
| | | > |
| | | <el-tree |
| | |
| | | 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> |
| | |
| | | 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, |
| | |
| | | ); |
| | | }; |
| | | const selectAll = () => { |
| | | layerParams.value.currentLocationFolderId = null; |
| | | layerParams.value.isSingleLocating = false |
| | | if (treeRef.value) { |
| | | const allFenceKeys = getAllFenceKeys(); |
| | | const allFenceNodes = treeData.value.flatMap(folder => folder.children); |
| | | |
| | | if (checkedKeys.value.length === allFenceKeys.length) { |
| | | // 取消全选 |
| | | treeRef.value.setCheckedKeys([]); |
| | | checkedKeys.value = []; |
| | | checkedNodes.value = []; |
| | | coverData.value = []; |
| | | emit('update:coverData', coverData.value); |
| | | } else { |
| | | // 全选 |
| | | treeRef.value.setCheckedKeys(allFenceKeys); |
| | | checkedKeys.value = allFenceKeys; |
| | | checkedNodes.value = allFenceNodes; |
| | | coverData.value = allFenceNodes; |
| | | emit('update:coverData', coverData.value); |
| | | |
| | | } |
| | | emit('update:coverData', coverData.value); |
| | | |
| | | } |
| | | }; |
| | | // 定位按钮事件 |
| | | const handleLocation = node => { |
| | | console.log('11',node.data); |
| | | |
| | | if (node.data.level === 2) { |
| | | layerParams.value.isSingleLocating = false; |
| | | // 新增:标记当前定位的文件夹ID |
| | |
| | | ElMessage.success('取消同步成功'); |
| | | }); |
| | | } |
| | | |
| | | // 切换tab清空复选框的数据 |
| | | watch( |
| | | () => props.resetCheck, |
| | | (newVal) => { |
| | | if (newVal !== undefined) { |
| | | checkedKeys.value = []; |
| | | checkedNodes.value = []; |
| | | coverData.value = []; |
| | | treeRef.value?.setCheckedKeys([]); |
| | | } |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | onMounted(() => { |
| | | failuresList(); |
| | | gettreeDataApi(); |
| | |
| | | left: 0; |
| | | height: calc(100% - 32px); |
| | | z-index: 99; |
| | | width: 382px; |
| | | width: 332px; |
| | | overflow: hidden; |
| | | background: rgba(0,0,0,0.51); |
| | | backdrop-filter: blur(4px); |
| | |
| | | margin-top: 10px; |
| | | padding-right: 12px; |
| | | .inputName { |
| | | width: 184px; |
| | | width: 140px; |
| | | height: 32px; |
| | | } |
| | | .searchAndReset { |
| | |
| | | justify-content: right; |
| | | align-items: center; |
| | | margin-right: 10px; |
| | | .reset, |
| | | .search { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 46px; |
| | | height: 32px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .reset { |
| | | margin-left: 12px; |
| | | background: #0d2b38; |
| | | border-radius: 4px 4px 4px 4px; |
| | | border: 1px solid #84cbd3; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: #ffffff; |
| | | } |
| | | |
| | | .search { |
| | | background: #1e2d51; |
| | | border-radius: 4px 4px 4px 4px; |
| | | border: 1px solid #c5d6ff; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | } |
| | | .btnGroups { |
| | |
| | | flex-grow: 1; |
| | | padding-right: 12px; |
| | | :deep(.el-tree-node__content) { |
| | | height: 35px !important; |
| | | line-height: 35px !important; |
| | | height: 45px !important; |
| | | line-height: 45px !important; |
| | | // padding-left: 0 !important; |
| | | border-bottom: 1px dotted rgba(255,255,255,0.1); |
| | | } |
| | | |
| | | .isTheTerritory { |