Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
ReactWeb5
CivManage
Commits
66282721
Commit
66282721
authored
Feb 21, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改角色管理默认分组名称
parent
5cb40867
Pipeline
#44240
skipped with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
23 deletions
+22
-23
editForm.jsx
src/pages/productCenter/webConfig/menuconfig/editForm.jsx
+14
-6
RoleManage.jsx
src/pages/userCenter/roleManage/RoleManage.jsx
+8
-17
No files found.
src/pages/productCenter/webConfig/menuconfig/editForm.jsx
View file @
66282721
...
@@ -75,22 +75,28 @@ const EditForm = props => {
...
@@ -75,22 +75,28 @@ const EditForm = props => {
});
});
});
});
let
data
=
new
Set
();
let
data
=
new
Set
();
let
datalist
=
[];
info
.
map
(
item
=>
{
info
.
map
(
item
=>
{
if
(
item
.
isChecked
==
true
)
{
if
(
item
.
isChecked
==
true
)
{
data
.
add
(
item
.
groupName
);
data
.
add
(
item
.
groupName
);
}
}
});
});
list
.
map
((
k
,
i
)
=>
{
k
.
list
.
map
(
p
=>
{
datalist
.
push
(
p
.
related
);
});
});
if
(
data
.
size
==
info
.
length
)
{
if
(
data
.
size
==
info
.
length
)
{
setChoo
(
true
);
setChoo
(
true
);
setIndeterminateAll
(
false
);
}
else
{
}
else
{
setChoo
(
false
);
setChoo
(
false
);
if
(
listData
.
indexOf
(
true
)
!=
-
1
)
{
setIndeterminateAll
(
true
);
}
}
}
if
(
data
.
size
==
0
)
{
if
(
data
list
.
indexOf
(
true
)
==
-
1
)
{
setIndeterminateAll
(
false
);
setIndeterminateAll
(
false
);
}
else
if
(
datalist
.
indexOf
(
false
)
==
-
1
)
{
setIndeterminateAll
(
false
);
}
else
{
setIndeterminateAll
(
true
);
}
}
setIndeterminate
(
chooseData
);
setIndeterminate
(
chooseData
);
}
}
...
@@ -161,7 +167,9 @@ const EditForm = props => {
...
@@ -161,7 +167,9 @@ const EditForm = props => {
}
}
});
});
list
.
map
((
k
,
i
)
=>
{
list
.
map
((
k
,
i
)
=>
{
data
.
push
(
list
[
i
].
isChecked
);
k
.
list
.
map
(
p
=>
{
data
.
push
(
p
.
related
);
});
});
});
if
(
data
.
indexOf
(
true
)
==
-
1
)
{
if
(
data
.
indexOf
(
true
)
==
-
1
)
{
setIndeterminateAll
(
false
);
setIndeterminateAll
(
false
);
...
...
src/pages/userCenter/roleManage/RoleManage.jsx
View file @
66282721
...
@@ -131,22 +131,16 @@ const SiteManage = () => {
...
@@ -131,22 +131,16 @@ const SiteManage = () => {
res
.
data
.
roleList
.
map
((
i
,
j
)
=>
{
res
.
data
.
roleList
.
map
((
i
,
j
)
=>
{
console
.
log
(
i
);
console
.
log
(
i
);
if
(
i
.
child
.
length
==
0
)
{
if
(
i
.
child
.
length
==
0
)
{
let
childData
=
{
visibleTitle
:
'
默认
分组'
,
roleList
:
[]
};
let
childData
=
{
visibleTitle
:
'
系统
分组'
,
roleList
:
[]
};
childData
.
visibleValue
=
i
.
visibleValue
;
childData
.
visibleValue
=
i
.
visibleValue
;
i
.
child
.
push
(
childData
);
i
.
child
.
push
(
childData
);
}
else
{
}
else
{
let
arr
=
[];
let
arr
=
[];
i
.
child
.
map
(
k
=>
{
i
.
child
.
map
(
k
=>
{
arr
.
push
(
k
.
visibleTitle
);
arr
.
push
(
k
.
visibleTitle
);
// if (k.visibleTitle != '默认分组') {
// console.log(11);
// let childData = { visibleTitle: '默认分组', roleList: [] };
// childData.visibleValue = i.visibleValue;
// i.child.push(childData);
// }
});
});
if
(
arr
.
indexOf
(
'
默认
分组'
)
==
-
1
)
{
if
(
arr
.
indexOf
(
'
系统
分组'
)
==
-
1
)
{
let
childData
=
{
visibleTitle
:
'
默认
分组'
,
roleList
:
[]
};
let
childData
=
{
visibleTitle
:
'
系统
分组'
,
roleList
:
[]
};
childData
.
visibleValue
=
i
.
visibleValue
;
childData
.
visibleValue
=
i
.
visibleValue
;
i
.
child
.
push
(
childData
);
i
.
child
.
push
(
childData
);
}
}
...
@@ -311,7 +305,7 @@ const SiteManage = () => {
...
@@ -311,7 +305,7 @@ const SiteManage = () => {
/>
/>
</
Tooltip
>
</
Tooltip
>
)
}
)
}
{
i
.
groupflag
&&
i
.
groupflag
!=
'
默认
分组'
&&
(
{
i
.
groupflag
&&
i
.
groupflag
!=
'
系统
分组'
&&
(
<
Tooltip
title=
"编辑分组"
className=
{
styles
.
fs
}
>
<
Tooltip
title=
"编辑分组"
className=
{
styles
.
fs
}
>
<
EditOutlined
<
EditOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
...
@@ -376,7 +370,7 @@ const SiteManage = () => {
...
@@ -376,7 +370,7 @@ const SiteManage = () => {
/>
/>
</
Tooltip
>
</
Tooltip
>
)
}
)
}
{
itemRole
.
groupflag
&&
itemRole
.
groupflag
!=
'
默认
分组'
&&
(
{
itemRole
.
groupflag
&&
itemRole
.
groupflag
!=
'
系统
分组'
&&
(
<
Tooltip
title=
"编辑分组"
className=
{
styles
.
fs
}
>
<
Tooltip
title=
"编辑分组"
className=
{
styles
.
fs
}
>
<
EditOutlined
<
EditOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
...
@@ -425,7 +419,7 @@ const SiteManage = () => {
...
@@ -425,7 +419,7 @@ const SiteManage = () => {
/>
/>
</
Tooltip
>
</
Tooltip
>
)
}
)
}
{
item
.
groupflag
&&
item
.
groupflag
!=
'
默认
分组'
&&
(
{
item
.
groupflag
&&
item
.
groupflag
!=
'
系统
分组'
&&
(
<
Tooltip
title=
"编辑分组"
className=
{
styles
.
fs
}
>
<
Tooltip
title=
"编辑分组"
className=
{
styles
.
fs
}
>
<
EditOutlined
<
EditOutlined
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#1890FF'
}
}
...
@@ -461,19 +455,16 @@ const SiteManage = () => {
...
@@ -461,19 +455,16 @@ const SiteManage = () => {
};
};
// 编辑分组
// 编辑分组
const
editorGroup
=
(
e
,
record
)
=>
{
const
editorGroup
=
(
e
,
record
)
=>
{
console
.
log
(
record
,
'1212'
);
e
.
stopPropagation
();
e
.
stopPropagation
();
setItemObj
(
record
);
setItemObj
(
record
);
setGroupVisible
(
true
);
setGroupVisible
(
true
);
};
};
// 新增角色
// 新增角色
const
addsUser
=
(
e
,
record
)
=>
{
const
addsUser
=
(
e
,
record
)
=>
{
console
.
log
(
e
);
if
(
record
.
visibleTitle
==
'系统分组'
)
{
console
.
log
(
record
);
if
(
record
.
visibleTitle
==
'默认分组'
)
{
message
.
warn
({
message
.
warn
({
duration
:
5
,
duration
:
5
,
content
:
'
默认
分组下的角色不能被关联'
,
content
:
'
系统
分组下的角色不能被关联'
,
});
});
}
}
e
.
stopPropagation
();
e
.
stopPropagation
();
...
...
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