unitid 保存

This commit is contained in:
白了个白 2024-09-23 09:15:39 +08:00
parent 96098c899f
commit e70d6b0539
1 changed files with 13 additions and 0 deletions

View File

@ -360,6 +360,19 @@ const handleNodeClick = (data, node) => {
localStorage.setItem('defaultExpandedKeys', nodeData.parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id])) localStorage.setItem('defaultExpandedKeys', nodeData.parentNode ? JSON.stringify([parentNode.id]) : JSON.stringify([data.id]))
localStorage.setItem('currentNodeId', JSON.stringify(data.id)) localStorage.setItem('currentNodeId', JSON.stringify(data.id))
//#region
let levelSecondId = curData.node.id
let levelFirstId
if (curData.node.parentNode) {
levelFirstId = curData.node.parentNode.id
} else {
levelFirstId = curData.node.id
levelSecondId = ''
}
console.log('levelFirstId---', levelFirstId)
console.log('levelSecondId---', levelSecondId)
localStorage.setItem('unitId', JSON.stringify({ levelFirstId, levelSecondId}))
//#endregion
emit('nodeClick', curData) emit('nodeClick', curData)