| | |
| | | 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 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(); |