unitid 保存
This commit is contained in:
parent
96098c899f
commit
e70d6b0539
|
@ -360,6 +360,19 @@ const handleNodeClick = (data, node) => {
|
|||
|
||||
localStorage.setItem('defaultExpandedKeys', nodeData.parentNode ? JSON.stringify([parentNode.id]) : 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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue