Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
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
黄庭坚
jinfa-platform
Commits
92c27947
Commit
92c27947
authored
May 10, 2021
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复系统能力,无法回显组织机构
parent
4dc50ea6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
15 deletions
+17
-15
memberDetail.tsx
src/pages/authConfig/memberSystem/memberDetail.tsx
+12
-11
orgModal.tsx
src/pages/authConfig/memberSystem/orgModal.tsx
+3
-1
index.ts
src/pages/authConfig/userSystem/schema/index.ts
+2
-3
No files found.
src/pages/authConfig/memberSystem/memberDetail.tsx
View file @
92c27947
...
...
@@ -73,21 +73,21 @@ const getTreeNode = (treeData: any, targetNodeId: any) => {
if
(
!
Array
.
isArray
(
treeData
))
{
return
null
;
}
let
result
=
{
id
:
''
,
title
:
''
,
}
for
(
let
i
=
0
;
i
<
treeData
.
length
;
i
++
)
{
const
item
=
treeData
[
i
];
if
(
item
.
id
===
targetNodeId
)
{
return
item
;
return
item
}
if
(
item
.
children
)
{
re
turn
getTreeNode
(
item
.
children
,
targetNodeId
);
re
sult
=
getTreeNode
(
item
.
children
,
targetNodeId
);
}
}
return
{
id
:
''
,
title
:
''
,
};
return
result
;
};
const
MemberDetail
:
React
.
FC
<
{}
>
=
()
=>
{
...
...
@@ -106,7 +106,6 @@ const MemberDetail: React.FC<{}> = () => {
}
=
useTreeTabs
({
fetchMenuData
:
fetchOrgsTreeData
,
});
const
{
treeData
,
handleSelect
}
=
useTreeData
({
fetchMenuData
,
fetchItemDetailData
:
({
id
})
=>
...
...
@@ -124,6 +123,7 @@ const MemberDetail: React.FC<{}> = () => {
const
[
buttonInfos
,
setButtonInfos
]
=
useState
<
any
>
([]);
// 储存的数据权限选项
const
[
authInfos
,
setAuthInfos
]
=
useState
<
any
>
({});
const
modalRef
=
useRef
<
any
>
({})
const
disabledCheckAuthConfig
=
useMemo
(()
=>
{
if
(
nodeRecord
&&
authInfos
[
nodeRecord
.
id
])
{
...
...
@@ -329,7 +329,7 @@ const MemberDetail: React.FC<{}> = () => {
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
className=
"addRepository"
title=
{
pageTitles
[
pageStatus
]
}
extra=
{
[
extraButtons
]
}
extra=
{
extraButtons
}
>
<
Card
>
<
Tabs
type=
"card"
className=
"black-tabs"
onChange=
{
changeTabs
}
>
...
...
@@ -423,9 +423,9 @@ const MemberDetail: React.FC<{}> = () => {
<
p
style=
{
{
color
:
'#909399'
}
}
>
组织机构授权
</
p
>
{
disabledCheckAuthConfig
.
orgIds
.
map
(
v
=>
{
const
node
=
getTreeNode
(
plateformTreeData
,
v
);
if
(
!
node
)
return
null
;
if
(
!
node
||
!
node
.
id
)
return
null
;
return
(
<
div
className=
"org-tag-container"
key=
{
v
.
id
}
>
<
div
className=
"org-tag-container"
key=
{
node
.
id
}
>
<
Tag
color=
{
'#F4F5F7'
}
className=
"org-tag"
>
{
node
.
title
}
</
Tag
>
...
...
@@ -450,6 +450,7 @@ const MemberDetail: React.FC<{}> = () => {
visible=
{
orgModalVisible
}
onSuccess=
{
handleOrgSuccess
}
onCancel=
{
handleOrgCancel
}
modalRef=
{
modalRef
}
/>
</
Card
>
</
PageHeaderWrapper
>
...
...
src/pages/authConfig/memberSystem/orgModal.tsx
View file @
92c27947
...
...
@@ -13,6 +13,7 @@ export interface OrgModalProps {
selectKeys
:
any
[],
onSuccess
(
selectKeys
:
any
[]),
onCancel
(),
modalRef
:
any
,
}
...
...
@@ -30,13 +31,14 @@ const OrgModal:React.FC<OrgModalProps> = (props) => {
useEffect
(()
=>
{
syncTreeActions
.
setSelectKeys
(
selectKeys
)
},
[
selectKeys
])
},
[
selectKeys
,
syncTreeActions
])
return
(
<
Drawer
visible=
{
visible
}
closable=
{
false
}
placement=
'right'
width=
{
600
}
forceRender
>
<
TabTree
fetchData
=
{
params
=
>
fetchOrgsTreeData()}
...
...
src/pages/authConfig/userSystem/schema/index.ts
View file @
92c27947
...
...
@@ -134,8 +134,8 @@ export const UserDetailSchema:ISchema = {
},
title
:
'关联角色'
},
}
}
}
}
\ No newline at end of file
}
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