Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TFMOM
TF-MOM-WEB
Commits
08fb8e0d
Commit
08fb8e0d
authored
Dec 07, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并产品【8067】权限设置,勾选父级自动勾选子级<2>
parent
9105f67b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
menuPermTree.vue
.../views/roleManagement/menuPermAssignment/menuPermTree.vue
+7
-8
No files found.
applications/dee-perm/src/views/roleManagement/menuPermAssignment/menuPermTree.vue
View file @
08fb8e0d
...
...
@@ -160,13 +160,13 @@ export default {
const items = [node.data]
const nodePath = []
const dataPath = []
while (node.level >= 1) {
nodePath.push(node)
dataPath.push(node.data)
node = node.parent
}
if (isChecked) {
// 如果父节点没有勾中,则父节点也要勾中
while (node.level >= 1) {
nodePath.push(node)
dataPath.push(node.data)
node = node.parent
}
for (let i = 1; i < nodePath.length; i++) {
if (nodePath[i].checked) {
break
...
...
@@ -174,10 +174,9 @@ export default {
items.push(dataPath[i])
}
}
// 当前节点选中,自动勾选它所有的后代节点
const subNodesData = this.getSubNodes(clickNode).map(node => node.data)
items.push(...subNodesData)
}
const subNodesData = this.getSubNodes(clickNode).map(node => node.data)
items.push(...subNodesData)
this.updatePermState(items, isChecked)
},
// 获取指定节点下所有子节点
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment