Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
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
Maple
TOSTUMI
Commits
798f3816
Commit
798f3816
authored
Dec 21, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed-off-by: cellee <893264950@qq.com>
parent
e695c59c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
5 deletions
+27
-5
AccountAdds.tsx
src/pages/AccountManagement/account/AccountAdds.tsx
+26
-4
Template.tsx
src/pages/runTest/Template.tsx
+1
-1
No files found.
src/pages/AccountManagement/account/AccountAdds.tsx
View file @
798f3816
...
...
@@ -32,12 +32,34 @@ const Account = (props: any) => {
const
[
form
]
=
Form
.
useForm
();
const
formRef
=
useRef
(
null
);
// 当前账户
信息
// 当前账户
权限
useEffect
(()
=>
{
if
(
user
!=
null
)
{
// 发起请求
let
data
=
{};
RA
(
56
,
data
,
module
,
dispatch
);
let
treeDatas
=
treeData
;
let
_a
=
user
.
currentUser
.
permission
;
// 当前账户权限
let
_p
=
treeDatas
[
0
].
children
;
// 所有权限列表
let
arr
:
any
=
[];
// 一级栏目权限
let
erArr
:
any
=
[];
// 一级栏目权限
// 循环一级 判断当前账户有没有权限修改增加
for
(
let
i
of
_a
)
{
for
(
let
j
in
_p
)
{
if
(
_p
[
j
].
key
==
i
)
{
arr
.
push
(
_p
[
j
].
key
);
_p
[
j
].
disabled
=
false
;
}
// 二级权限
for
(
let
k
in
_p
[
j
].
children
)
{
if
(
_p
[
j
].
children
[
k
].
key
==
i
)
{
erArr
.
push
(
_p
[
j
].
children
[
k
].
key
);
_p
[
j
].
children
[
k
].
disableCheckbox
=
false
;
}
}
}
}
// 赋值改变
treeDatas
[
0
].
children
=
_p
;
setCheckedKeys
(
treeDatas
as
any
);
// 可勾选列表
}
},
[
user
]);
...
...
src/pages/runTest/Template.tsx
View file @
798f3816
...
...
@@ -22,7 +22,7 @@ const Guard = (props: any) => {
return
(
<
div
className=
{
styles
.
base
}
>
<
TitleGet
title=
{
'Version 1.5.
4
'
}
/>
<
TitleGet
title=
{
'Version 1.5.
5
'
}
/>
{
/* <p>
token:{page.token}
name:{getCookie('name')}
...
...
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