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
84ddf94d
Commit
84ddf94d
authored
Nov 20, 2020
by
Maofei94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix bug
parent
18801f9f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
26 deletions
+62
-26
index.jsx
src/components/CheckGroup/index.jsx
+2
-1
ListCardItem.less
src/pages/orgnazation/ListCardItem.less
+5
-1
RoleManage.jsx
src/pages/userCenter/roleManage/RoleManage.jsx
+29
-13
RoleManage.less
src/pages/userCenter/roleManage/RoleManage.less
+7
-5
SiteManage.jsx
src/pages/userCenter/siteManage/SiteManage.jsx
+0
-0
SiteManage.less
src/pages/userCenter/siteManage/SiteManage.less
+11
-6
api.js
src/services/userCenter/RoleManage/api.js
+4
-0
api.js
src/services/userCenter/siteManage/api.js
+4
-0
No files found.
src/components/CheckGroup/index.jsx
View file @
84ddf94d
...
...
@@ -18,6 +18,7 @@ export const checkChildrenByCondition = (item, fn, tag = 'every') => {
};
const
ListCard
=
props
=>
{
console
.
log
(
props
,
'props'
);
const
{
ouid
,
searchWord
,
...
...
@@ -79,7 +80,7 @@ const ListCard = props => {
/>
))
)
:
(
<
Empty
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
</>
)
}
...
...
src/pages/orgnazation/ListCardItem.less
View file @
84ddf94d
...
...
@@ -25,7 +25,11 @@
flex-wrap: wrap;
align-items: center;
.ant-checkbox-group-item{
flex:0 0 150px;
flex:0 0 auto;
flex-shrink: 0;
flex-grow: 0;
margin-right: 60px;
// min-width: 180px;
margin-bottom: 5px;
}
}
...
...
src/pages/userCenter/roleManage/RoleManage.jsx
View file @
84ddf94d
...
...
@@ -16,6 +16,7 @@ import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons';
import
{
setMenuToRole
,
getRoleGroupList
,
getMenuByRoleWithLevel
,
}
from
'@/services/userCenter/roleManage/api'
;
import
ListCard
,
{
checkChildrenByCondition
,
...
...
@@ -28,7 +29,6 @@ import AddModal from './AddModal';
import
DelModal
from
'./DelModal'
;
import
EditModal
from
'./EditModal'
;
import
EditGroup
from
'./EditGroup'
;
import
{
get
}
from
'@/services'
;
import
userStyles
from
'../UserManage.less'
;
const
{
Search
}
=
Input
;
...
...
@@ -79,7 +79,7 @@ const SiteManage = () => {
};
useEffect
(()
=>
{
setSpinLoading
(
true
);
getRoleGroupList
({
userID
:
1
}).
then
(
res
=>
{
getRoleGroupList
({
userID
:
'1'
}).
then
(
res
=>
{
setSpinLoading
(
false
);
if
(
res
.
code
===
0
)
{
const
{
roleList
}
=
res
.
data
;
...
...
@@ -114,8 +114,7 @@ const SiteManage = () => {
title
:
'默认组'
,
id
:
''
,
};
get
(
'/Cityinterface/rest/services/OMS.svc/W4_GetMenuByRoleWithLevel'
,
{
getMenuByRoleWithLevel
({
roleID
:
itemObj
.
roleID
,
subSystemValue
:
itemObj
.
subSystemValue
,
subSystemName
:
itemObj
.
subSystemValue
,
...
...
@@ -168,16 +167,27 @@ const SiteManage = () => {
// 树形数据转换;
const
transTree
=
val
=>
{
let
arr
=
val
;
let
newArr
=
[];
let
arr2
=
arr
.
filter
(
item
=>
{
if
(
item
.
child
&&
item
.
child
.
length
>
0
)
{
item
.
child
.
forEach
(
itemC
=>
{
item
.
roleList
.
unshift
(
itemC
);
});
}
if
(
item
.
visibleTitle
===
'手持系统'
)
{
newArr
[
0
]
=
item
;
}
if
(
item
.
visibleTitle
===
'小程序'
)
{
newArr
[
1
]
=
item
;
}
return
(
item
.
visibleTitle
!==
'其它角色'
&&
item
.
visibleTitle
!==
'运维管理'
item
.
visibleTitle
!==
'其它角色'
&&
item
.
visibleTitle
!==
'运维管理'
&&
item
.
visibleTitle
!==
'手持系统'
&&
item
.
visibleTitle
!==
'小程序'
);
});
arr2
=
arr2
.
concat
(
newArr
);
console
.
log
(
arr2
,
'arr2'
);
let
arr3
=
arr2
.
map
(
item
=>
{
item
.
title
=
item
.
visibleTitle
||
''
;
...
...
@@ -291,9 +301,8 @@ const SiteManage = () => {
};
return
(
<
PageContainer
>
{
/* <GridContent> */
}
<
Row
gutter=
{
0
}
>
<
Col
lg
=
{
mulu
?
5
:
0
}
>
<
Col
span
=
{
mulu
?
5
:
0
}
>
<
Card
className=
{
styles
.
cardBox
}
>
<
Spin
tip=
"loading...."
...
...
@@ -341,21 +350,28 @@ const SiteManage = () => {
confirmModal=
{
groupModal
}
/>
</
Card
>
<
div
>
{
mulu
&&
(
<
Tooltip
title=
"隐藏角色栏"
className=
{
styles
.
hide
}
>
<
DoubleLeftOutlined
onClick=
{
()
=>
handleHide
()
}
/>
</
Tooltip
>
)
}
</
div
>
</
Col
>
<
Col
>
{
mulu
&&
(
<
Col
span=
{
mulu
?
0
:
1
}
>
{
/* {
mulu && (
<Tooltip title="隐藏角色栏" className={styles.hide}>
<DoubleLeftOutlined onClick={() => handleHide()} />
</Tooltip>
)
}
)}
*/
}
{
!
mulu
&&
(
<
Tooltip
title=
"显示角色栏"
className=
{
styles
.
hide
}
>
<
DoubleRightOutlined
onClick=
{
()
=>
handleHide
()
}
/>
</
Tooltip
>
)
}
</
Col
>
<
Col
lg=
{
mulu
?
18
:
23
}
>
<
Card
style=
{
{
marginBottom
:
'10px'
}
}
>
<
Col
span=
{
mulu
?
19
:
23
}
>
<
Card
style=
{
{
marginBottom
:
'10px'
,
minWidth
:
'870px'
}
}
>
<
Row
align=
"middle"
>
<
Col
span=
{
1
}
>
搜索
</
Col
>
<
Col
span=
{
8
}
>
...
...
@@ -388,6 +404,7 @@ const SiteManage = () => {
编辑角色
</
Button
>
<
Button
type=
"primary"
danger
onClick=
{
()
=>
{
handleDel
();
...
...
@@ -424,7 +441,6 @@ const SiteManage = () => {
</
Card
>
</
Col
>
</
Row
>
{
/* </GridContent> */
}
</
PageContainer
>
);
};
...
...
src/pages/userCenter/roleManage/RoleManage.less
View file @
84ddf94d
...
...
@@ -2,6 +2,7 @@
min-height: calc(100vh - 80px);
max-height: calc(100vh - 80px);
overflow-y: scroll;
margin-right: 20px;
}
.ant-tree-node-content-wrapper-open{
display: flex;
...
...
@@ -26,6 +27,7 @@
align-items: center;
}
.cardBoxR{
min-width: 870px;
min-height: calc(100vh - 172px);
max-height: calc(100vh - 172px);
overflow-y: scroll;
...
...
@@ -43,10 +45,11 @@
.hide{
display: block;
position:
relativ
e;
position:
absolut
e;
font-size: 20px;
color: #1890FF!important;
top: 45%;
left: 50%;
transform: translate(-50%,-50%);
}
\ No newline at end of file
right:0;
transform: translate(0%,-50%);
z-index: 2;
}
src/pages/userCenter/siteManage/SiteManage.jsx
View file @
84ddf94d
This diff is collapsed.
Click to expand it.
src/pages/userCenter/siteManage/SiteManage.less
View file @
84ddf94d
...
...
@@ -2,8 +2,8 @@
min-height: calc(100vh - 80px);
max-height: calc(100vh - 80px);
overflow: auto;
margin-right: 20px;
}
.siteTitle{
font-size: 16px;
margin: 0 0 6px 0;
...
...
@@ -14,6 +14,7 @@
.cardBoxR{
min-height: calc(100vh - 172px);
max-height: calc(100vh - 172px);
min-width: 600px;
overflow-y: scroll;
}
.ant-tree-node-content-wrapper-open{
...
...
@@ -53,10 +54,14 @@
.hide{
display: block;
position:
relativ
e;
position:
absolut
e;
font-size: 20px;
color: #1890FF!important;
top: 45%;
left: 50%;
transform: translate(-50%,-50%);
}
\ No newline at end of file
right: 0;
transform: translate(0%,-50%);
z-index: 2;
}
// .hide{
// left: 0;
// }
\ No newline at end of file
src/services/userCenter/RoleManage/api.js
View file @
84ddf94d
...
...
@@ -53,3 +53,7 @@ export const deleteRole = params =>
// 编辑分组名称
export
const
setRoleGroupName
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/P_SetRoleGroupName'
,
params
);
// 保存选择的功能
export
const
getMenuByRoleWithLevel
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/W4_GetMenuByRoleWithLevel'
,
params
);
src/services/userCenter/siteManage/api.js
View file @
84ddf94d
...
...
@@ -29,3 +29,7 @@ export const chooseUserToStation = (params, options) =>
params
,
options
,
);
// 获取人员
export
const
getUserByStation
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/P_GetUserByStation'
,
params
);
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