This commit is contained in:
qsh
2025-04-16 01:31:23 +08:00
parent 51140a3c41
commit 5ee61f7f6b
2 changed files with 21 additions and 7 deletions

View File

@@ -72,12 +72,16 @@ const isCurrentLeafNode = ref(false)
function handleSearchPeroid() { function handleSearchPeroid() {
getAllNodeTree().then((resp) => { getAllNodeTree().then((resp) => {
peroidList.value = listToTree(resp.tree, { if (resp.nodeId) {
id: 'nodeId', peroidList.value = listToTree(resp.tree, {
pid: 'parentId', id: 'nodeId',
children: 'children' pid: 'parentId',
}) children: 'children'
nodeChange(resp.nodeId) })
nodeChange(resp.nodeId)
} else {
message.warning('请先创建节点数据')
}
}) })
} }

View File

@@ -339,9 +339,19 @@ import { useUserStore } from '@/store/modules/user'
const message = useMessage() const message = useMessage()
const userStore = useUserStore() const userStore = useUserStore()
const currentUserId = userStore.getUser.id const currentUserId = userStore.getUser.id
const emit = defineEmits(['edit']) const emit = defineEmits(['edit', 'close'])
const show = ref(false) const show = ref(false)
watch(
() => show.value,
(newValue, oldValue) => {
if (oldValue && !newValue) {
emit('close', nodeInfo.value)
}
}
)
const canEdit = ref(false) const canEdit = ref(false)
const toolbarConfig = { const toolbarConfig = {