sc
This commit is contained in:
@@ -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('请先创建节点数据')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 = {
|
||||||
|
|||||||
Reference in New Issue
Block a user