Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
project
jinfa-admin
Commits
d802edd5
Commit
d802edd5
authored
Apr 19, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复权限菜单有时候更新不到的问题
parent
bf4444c1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
index.tsx
...ges/member/memberPrSubmit/components/DetailInfo/index.tsx
+23
-20
No files found.
src/pages/member/memberPrSubmit/components/DetailInfo/index.tsx
View file @
d802edd5
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-01-26 16:36:30
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-0
1-26 16:41:39
* @LastEditTime: 2021-0
4-19 16:58:00
* @Description: 待提交审核详情信息
*/
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
...
...
@@ -17,6 +17,7 @@ import {
Modal
,
Button
,
Spin
,
message
,
}
from
'antd'
;
import
{
FormOutlined
}
from
'@ant-design/icons'
;
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
;
...
...
@@ -51,11 +52,11 @@ interface DetailInfoProps {
/**
* 数据id
*/
id
?
:
string
;
id
:
string
;
/**
* 审核id
*/
validateId
?
:
string
;
validateId
:
string
;
/**
* 是否是编辑的
*/
...
...
@@ -175,7 +176,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
}
else
{
if
(
isEditForm
)
{
// 有填写过表单
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
Modal
.
confirm
({
content
:
'确认要离开当前页面吗,您提交的数据尚未保存'
,
onOk
()
{
...
...
@@ -232,8 +233,8 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
if
(
isEditForm
)
{
// 更新右侧按钮
await
PublicApi
.
postMemberValidateCommitUpdatebutton
({
memberId
:
id
,
validateId
,
memberId
:
+
id
,
validateId
:
+
validateId
,
menuId
:
nodeRecord
.
id
,
buttonIds
:
buttonIds
,
});
...
...
@@ -247,43 +248,44 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
const
updateMenu
=
()
=>
{
const
menuIds
:
any
=
treeActions
.
getSelectKeys
();
return
PublicApi
.
postMemberValidateCommitUpdatemenu
({
memberId
:
id
,
validateId
,
memberId
:
+
id
,
validateId
:
+
validateId
,
menuIds
,
},
{
ctlType
:
'none'
,
});
};
const
handleSubmit
=
values
=>
{
const
handleSubmit
=
async
(
values
)
=>
{
if
(
!
isEdit
)
{
return
;
}
setConfirmLoading
(
true
);
const
promises
=
[
updateMenu
(),
const
updateRes
=
await
updateMenu
();
if
(
updateRes
.
code
!==
1000
)
{
message
.
error
(
updateRes
.
message
||
'未知错误'
);
setConfirmLoading
(
false
);
return
;
}
PublicApi
.
postMemberValidateCommitSubmit
({
memberId
:
id
,
validateId
,
...
values
,
}),
];
Promise
.
all
(
promises
).
then
(
resArr
=>
{
if
(
resArr
.
every
(
item
=>
item
&&
item
.
code
===
1000
))
{
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
setModalVisible
(
false
);
}
setConfirmLoading
(
false
);
setPowerUnsaved
(
false
);
}).
catch
(()
=>
{
}
}).
finally
(()
=>
{
setConfirmLoading
(
false
);
});
};
const
handleCheck
=
(
)
=>
{
const
handleCheck
=
(
keys
:
any
,
nodes
:
any
):
any
=>
{
setPowerUnsaved
(
true
);
};
...
...
@@ -398,6 +400,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
handleSelect=
{
handleSelect
}
handleCheck=
{
handleCheck
}
disabled=
{
!
isEdit
}
checkStrictly
checkable
/>
</
MellowCard
>
...
...
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