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
9383c553
Commit
9383c553
authored
Sep 22, 2022
by
Jings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 权限树默认展开
parent
2816e2ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
guide-setting-copy.vue
src/views/enterprise/guide-setting-copy.vue
+16
-9
No files found.
src/views/enterprise/guide-setting-copy.vue
View file @
9383c553
...
...
@@ -4,7 +4,7 @@
* @Author: Drama
* @Date: 2022-09-14 11:09:43
* @LastEditors: Drama
* @LastEditTime: 2022-09-2
0 14:59:20
* @LastEditTime: 2022-09-2
2 15:01:27
* @FilePath: /haoban-3/src/views/enterprise/guide-setting-copy.vue
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
...
...
@@ -15,7 +15,7 @@
<el-form-item
label=
"应用权限"
required
>
<div
class=
"dis-f"
>
<div
class=
"title-wrap border-box border-radio-2"
>
<div
class=
"
border-box tag-wrap F-S-14 F-C-BLACK dis-center border-radio-2 cursor-pointer"
v-for=
"(item, index) in titleList"
:key=
"index"
:class=
"[activeNum == index ? 'checked-status' : '', item.isEmpty ? 'empted-status' : '']"
@
click=
"chooseType(index)"
>
{{
item
.
title
}}
</div>
<div
class=
"border-box tag-wrap F-S-14 F-C-BLACK dis-center border-radio-2 cursor-pointer"
v-for=
"(item, index) in titleList"
:key=
"index"
:class=
"[activeNum == index ? 'checked-status' : '', item.isEmpty ? 'empted-status' : '']"
@
click=
"chooseType(index)"
>
{{
item
.
title
}}
</div>
</div>
<div
v-if=
"isShowErrorTip"
class=
"error-tip border-box border-radio-2"
>
<i
class=
"el-icon-warning"
></i>
...
...
@@ -24,7 +24,7 @@
</div>
</el-form-item>
<el-form-item
label=
""
prop=
""
class=
""
>
<vue-gic-auth-tree
class=
"auth-tree"
:data=
"treeData"
show-checkbox
ref=
"tree"
node-key=
"menuCode"
:default-checked-keys=
"withoutParents"
default-expand-all
:props=
"defaultProps"
showButtonFlag
></vue-gic-auth-tree>
<vue-gic-auth-tree
class=
"auth-tree"
default-expand-all
:data=
"treeData"
show-checkbox
ref=
"tree"
node-key=
"menuCode"
:default-checked-keys=
"withoutParents"
:props=
"defaultProps"
showButtonFlag
></vue-gic-auth-tree>
</el-form-item>
</el-form>
</div>
...
...
@@ -76,11 +76,7 @@ export default {
isShowErrorTip
:
false
};
},
computed
:
{
setDefaultExpandedKeys
()
{
return
treeData
=>
treeData
.
map
(
el
=>
el
.
rightId
);
}
},
computed
:
{},
async
mounted
()
{
await
this
.
getMenuRoleList
(
0
);
await
this
.
getMenuRoleList
(
1
);
...
...
@@ -138,7 +134,18 @@ export default {
item
.
parentCode
=
0
;
}
});
this
[
'treeData_'
+
clerkType
]
=
deepClone
(
arrToTree
(
arr
,
0
,
{
idName
:
'menuCode'
,
parentIdName
:
'parentCode'
,
childName
:
'menuBOList'
}));
let
result
=
deepClone
(
arrToTree
(
arr
,
0
,
{
idName
:
'menuCode'
,
parentIdName
:
'parentCode'
,
childName
:
'menuBOList'
}));
result
.
forEach
(
item
=>
{
item
.
fold
=
false
;
item
.
menuBOList
.
forEach
(
el
=>
{
el
.
menuBOList
=
el
.
menuBOList
?
el
.
menuBOList
:
[];
if
(
el
.
menuBOList
.
length
>
0
)
{
el
.
foldBool
=
1
;
}
});
item
.
rightId
=
item
.
menuCode
;
});
this
[
'treeData_'
+
clerkType
]
=
deepClone
(
result
);
if
(
clerkType
==
0
)
{
this
.
treeData
=
deepClone
(
this
.
treeData_0
);
}
...
...
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