[update] 修改工作组选中左侧树获取节点对象

This commit is contained in:
lideqin
2023-11-08 16:11:57 +08:00
parent 257c10cb62
commit e065b6d9b8
@@ -346,7 +346,7 @@ export default {
// 根据当前节点key设置当前节点对象
setCurrNodeObjByKey (treeData) {
for (const item of treeData) {
if (item.id === this.currentTreeNode) {
if (item.id === this.currentTreeNode[0]) {
this.currentNodeObj = item
break
}
@@ -357,9 +357,10 @@ export default {
},
// 左侧树点击选中
treeSelect (selectedKeys) {
console.log(selectedKeys)
this.currentTreeNode = selectedKeys
// 设置当前左侧树节点对象,为了右侧表格操作判断权限
this.setCurrNodeObjByKey()
this.setCurrNodeObjByKey(this.treeData)
this.queryParam.workingGroupId = selectedKeys[0]
this.loadData()
},