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
1289f7d8
Commit
1289f7d8
authored
Jan 05, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二级账户可以编辑下级但不可编辑自身
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
00ff682e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+12
-3
No files found.
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
1289f7d8
...
@@ -29,7 +29,8 @@ const Account = (props: any) => {
...
@@ -29,7 +29,8 @@ const Account = (props: any) => {
const
[
towAccountId
,
settowAccountId
]
=
useState
(
null
);
// 二级账户id
const
[
towAccountId
,
settowAccountId
]
=
useState
(
null
);
// 二级账户id
//提醒次数
//提醒次数
const
[
frequency
,
setfrequency
]
=
useState
(
0
);
// 权限列表
// const [frequency, setfrequency] = useState(0); // 权限列表
const
[
TreeDisabled
,
setTreeDisabled
]
=
useState
(
true
);
// 权限是否可编辑
// 表单标识
// 表单标识
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
...
@@ -56,6 +57,14 @@ const Account = (props: any) => {
...
@@ -56,6 +57,14 @@ const Account = (props: any) => {
settowAccountId
(
DataSave
.
userLeader
);
//上级id
settowAccountId
(
DataSave
.
userLeader
);
//上级id
}
}
// 二级账户可以编辑下级但不可编辑自身
if
(
user
.
currentUser
.
userModel
.
tosUserLevel
==
1
||
(
user
.
currentUser
.
userModel
.
tosUserLevel
==
2
&&
DataSave
.
tosUserLevel
==
3
)
)
{
setTreeDisabled
(
false
);
}
// 发起获取权限请求
// 发起获取权限请求
RA
(
54
,
{
tosUserName
:
DataSave
.
tosUserName
},
module
,
dispatch
);
// 发起获取权限请求
RA
(
54
,
{
tosUserName
:
DataSave
.
tosUserName
},
module
,
dispatch
);
// 发起获取权限请求
}
else
{
}
else
{
...
@@ -313,7 +322,7 @@ const Account = (props: any) => {
...
@@ -313,7 +322,7 @@ const Account = (props: any) => {
cancelText
:
'No'
,
cancelText
:
'No'
,
onOk
()
{
onOk
()
{
setCheckedKeys
(
checkedKeys
);
setCheckedKeys
(
checkedKeys
);
setfrequency
(
1
);
//
setfrequency(1);
},
},
onCancel
()
{},
onCancel
()
{},
});
});
...
@@ -451,7 +460,7 @@ const Account = (props: any) => {
...
@@ -451,7 +460,7 @@ const Account = (props: any) => {
onSelect=
{
onSelect
}
onSelect=
{
onSelect
}
selectedKeys=
{
selectedKeys
}
selectedKeys=
{
selectedKeys
}
treeData=
{
treeDataList
}
treeData=
{
treeDataList
}
disabled=
{
user
&&
user
.
currentUser
.
userModel
.
tosUserLevel
!=
1
?
true
:
false
}
disabled=
{
TreeDisabled
}
/>
/>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
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