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
6f236680
Commit
6f236680
authored
Feb 14, 2022
by
xiexiuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:保存按钮修复
parent
a4ecb82b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
memberDetail.tsx
src/pages/authConfig/memberSystem/memberDetail.tsx
+12
-5
No files found.
src/pages/authConfig/memberSystem/memberDetail.tsx
View file @
6f236680
...
@@ -193,7 +193,6 @@ const MemberDetail: React.FC<{}> = () => {
...
@@ -193,7 +193,6 @@ const MemberDetail: React.FC<{}> = () => {
const
{
node
}
=
await
handleSelect
(
selectKey
,
selectNode
);
const
{
node
}
=
await
handleSelect
(
selectKey
,
selectNode
);
console
.
log
(
node
)
console
.
log
(
node
)
setcheckflag
(
treeActions
.
getSelectKeys
().
indexOf
(
selectKey
)
!=
-
1
)
setcheckflag
(
treeActions
.
getSelectKeys
().
indexOf
(
selectKey
)
!=
-
1
)
console
.
log
(
node
.
buttonIds
,
'node.buttonIds'
)
actionRef
.
current
.
setSelected
(
node
.
buttonIds
)
actionRef
.
current
.
setSelected
(
node
.
buttonIds
)
if
(
nodeRecord
)
{
if
(
nodeRecord
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -221,8 +220,13 @@ const MemberDetail: React.FC<{}> = () => {
...
@@ -221,8 +220,13 @@ const MemberDetail: React.FC<{}> = () => {
// 左边勾选按钮监听
// 左边勾选按钮监听
const
handleCheck
=
async
(
e
)
=>
{
const
handleCheck
=
async
(
e
)
=>
{
const
{
checked
}
=
e
;
const
{
checked
}
=
e
;
console
.
log
(
nodeRecord
,
checked
)
if
(
nodeRecord
)
{
if
(
nodeRecord
)
{
setcheckflag
(
checked
.
indexOf
(
nodeRecord
.
id
)
!=
-
1
?
true
:
false
)
setcheckflag
(
checked
.
indexOf
(
nodeRecord
.
id
)
!=
-
1
?
true
:
false
)
}
else
{
let
ids
=
[...
dataId
];
ids
=
checked
;
setdataId
(
ids
)
}
}
}
}
...
@@ -303,6 +307,7 @@ const MemberDetail: React.FC<{}> = () => {
...
@@ -303,6 +307,7 @@ const MemberDetail: React.FC<{}> = () => {
for
(
let
i
in
checkIds
)
{
for
(
let
i
in
checkIds
)
{
cheIds
.
push
(
checkIds
[
i
]);
cheIds
.
push
(
checkIds
[
i
]);
}
}
// console.log(cheIds, 'cheIds')
// 判断后台返回的选中id 是否和和当前选中id是一样
// 判断后台返回的选中id 是否和和当前选中id是一样
const
flag
=
treeCheckIds
.
join
(
','
)
===
cheIds
.
join
(
','
)
?
true
:
false
;
const
flag
=
treeCheckIds
.
join
(
','
)
===
cheIds
.
join
(
','
)
?
true
:
false
;
// 如果后台返回的选中的id 和 当前选中id 是一样 则午休修改 提交一个空数据过去
// 如果后台返回的选中的id 和 当前选中id 是一样 则午休修改 提交一个空数据过去
...
@@ -343,19 +348,21 @@ const MemberDetail: React.FC<{}> = () => {
...
@@ -343,19 +348,21 @@ const MemberDetail: React.FC<{}> = () => {
list
=
publicarr
.
filter
((
element
,
index
,
self
)
=>
{
list
=
publicarr
.
filter
((
element
,
index
,
self
)
=>
{
return
self
.
findIndex
(
x
=>
x
.
menuId
===
element
.
menuId
)
===
index
return
self
.
findIndex
(
x
=>
x
.
menuId
===
element
.
menuId
)
===
index
})
})
// console.log(list);
const
publicParams
=
{
const
publicParams
=
{
...
values
,
...
values
,
imFlag
:
!!
values
.
imFlag
,
imFlag
:
!!
values
.
imFlag
,
auth
:
(
flag
&&
dataId
.
length
===
0
)
?
[]
:
list
.
map
(
v
=>
({
auth
:
(
flag
&&
dataId
.
length
<
0
)
?
[]
:
list
.
map
(
v
=>
({
menuId
:
v
.
menuId
,
menuId
:
v
.
menuId
,
buttonIds
:
authInfos
[
v
.
menuId
].
buttonIds
?
authInfos
[
v
.
menuId
].
buttonIds
:
[],
buttonIds
:
(
Object
.
keys
(
authInfos
).
length
!=
0
&&
authInfos
[
v
.
menuId
].
buttonIds
)
?
authInfos
[
v
.
menuId
].
buttonIds
:
[],
checked
:
v
.
checked
,
checked
:
v
.
checked
,
hasDataAuth
:
authInfos
[
v
.
menuId
]?.
hasDataAuth
?
authInfos
[
v
.
menuId
]?.
hasDataAuth
:
0
,
hasDataAuth
:
(
Object
.
keys
(
authInfos
).
length
!=
0
&&
authInfos
[
v
.
menuId
]?.
hasDataAuth
)
?
authInfos
[
v
.
menuId
]?.
hasDataAuth
:
0
,
orgIds
:
authInfos
[
v
.
menuId
]?.
hasDataAuth
?
authInfos
[
v
.
menuId
]?.
orgIds
:
[],
orgIds
:
(
Object
.
keys
(
authInfos
).
length
!=
0
&&
authInfos
[
v
.
menuId
]?.
hasDataAuth
)
?
authInfos
[
v
.
menuId
]?.
orgIds
:
[],
}))
}))
};
};
console
.
log
(
publicParams
,
'publicParams'
)
delete
publicParams
.
checkIds
delete
publicParams
.
checkIds
if
(
pageStatus
===
PageStatus
.
EDIT
)
{
if
(
pageStatus
===
PageStatus
.
EDIT
)
{
...
...
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