解决便携式设备角色没有治理树id取值失败问题

This commit is contained in:
zhujiyan
2024-08-02 15:59:35 +08:00
parent dd4372ed9b
commit 46a5a2374f
2 changed files with 4 additions and 4 deletions

View File

@@ -176,12 +176,12 @@ const changeDevice = (val: any) => {
arr2.map(item => {
item.checked = false
})
treeRef1.value.setCurrentKey(arr1[0].id)
treeRef1.value.setCurrentKey(arr1[0]?.id)
} else {
arr1.map(item => {
item.checked = false
})
treeRef2.value.setCurrentKey(arr2[0].id)
treeRef2.value.setCurrentKey(arr2[0]?.id)
}
}
const onMenuCollapse = () => {

View File

@@ -356,8 +356,8 @@ const handleaddDevice = () => {
const deviceId: any = ref('')
const lineId: any = ref('')
const nodeClick = async (e: anyObj) => {
deviceId.value = e.pid
lineId.value = e.id
deviceId.value = e?.pid
lineId.value = e?.id
if (!e) {
loading.value = false
return