Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
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
office
haoban-3
Commits
e30d4cb1
Commit
e30d4cb1
authored
Oct 17, 2022
by
Jings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 权限数据过滤
parent
ffae9834
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
guide-setting-new.vue
src/views/enterprise/guide-setting-new.vue
+28
-2
No files found.
src/views/enterprise/guide-setting-new.vue
View file @
e30d4cb1
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Author: Drama
* @Author: Drama
* @Date: 2022-09-14 11:09:43
* @Date: 2022-09-14 11:09:43
* @LastEditors: Drama
* @LastEditors: Drama
* @LastEditTime: 2022-10-1
4 12:30:00
* @LastEditTime: 2022-10-1
7 15:59:54
* @FilePath: /haoban-3/src/views/enterprise/guide-setting-new.vue
* @FilePath: /haoban-3/src/views/enterprise/guide-setting-new.vue
* Copyright (C) 2022 huzhenhong. All rights reserved.
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
-->
...
@@ -176,7 +176,27 @@ export default {
...
@@ -176,7 +176,27 @@ export default {
// });
// });
// item.rightId = item.menuCode;
// item.rightId = item.menuCode;
// });
// });
// 添加处理字段
result
.
forEach
(
item
=>
{
result
.
forEach
(
item
=>
{
// 一级
item
.
ownerShipArr
=
item
.
ownerShip
.
split
(
'|'
);
if
(
item
.
menuBOList
.
length
)
{
// 二级
item
.
menuBOList
.
forEach
(
item_2
=>
{
item_2
.
ownerShipArr
=
item_2
.
ownerShip
.
split
(
'|'
);
if
(
item_2
.
menuBOList
.
length
)
{
// 三级
item_2
.
menuBOList
.
forEach
(
item_3
=>
{
item_3
.
ownerShipArr
=
item_3
.
ownerShip
.
split
(
'|'
);
});
}
});
}
});
let
dealArr
=
deepClone
(
result
);
let
dealTreeData
=
this
.
filterTreeData
(
dealArr
,
String
(
clerkType
));
dealTreeData
.
forEach
(
item
=>
{
item
.
fold
=
false
;
item
.
fold
=
false
;
item
.
childList
=
item
.
menuBOList
;
// 构造childList
item
.
childList
=
item
.
menuBOList
;
// 构造childList
item
.
rightType
=
'0'
;
item
.
rightType
=
'0'
;
...
@@ -197,7 +217,7 @@ export default {
...
@@ -197,7 +217,7 @@ export default {
});
});
}
}
});
});
this
[
'treeData_'
+
clerkType
]
=
deepClone
(
result
);
this
[
'treeData_'
+
clerkType
]
=
deepClone
(
dealTreeData
);
if
(
clerkType
==
0
)
{
if
(
clerkType
==
0
)
{
this
.
treeData
=
deepClone
(
this
.
treeData_0
);
this
.
treeData
=
deepClone
(
this
.
treeData_0
);
}
}
...
@@ -212,6 +232,12 @@ export default {
...
@@ -212,6 +232,12 @@ export default {
}
}
});
});
},
},
// 递归过滤
filterTreeData
(
column
,
text
)
{
let
newColumn
=
column
.
filter
(
item
=>
item
.
ownerShipArr
.
includes
(
text
));
newColumn
.
forEach
(
x
=>
x
.
menuBOList
&&
(
x
.
menuBOList
=
this
.
filterTreeData
(
x
.
menuBOList
,
text
)));
return
newColumn
;
},
// 保存
// 保存
submit
:
_debounce
(
function
()
{
submit
:
_debounce
(
function
()
{
let
currentChooseList
=
this
.
$refs
.
tree
.
getCheckedKeys
().
concat
(
this
.
$refs
.
tree
.
getHalfCheckedKeys
());
let
currentChooseList
=
this
.
$refs
.
tree
.
getCheckedKeys
().
concat
(
this
.
$refs
.
tree
.
getHalfCheckedKeys
());
...
...
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