fix
parent
6605938618
commit
1d9dc7be62
|
|
@ -93,10 +93,10 @@ const RiskAnalysisContent = ({ readOnly, ...props }) => {
|
|||
message.warning("文件上传中,请稍后再保存");
|
||||
return;
|
||||
}
|
||||
// if (!rest.participants?.length) {
|
||||
// message.warning("请选择风险分析人员");
|
||||
// return;
|
||||
// }
|
||||
if (statusCode === 2&&!rest.participants?.length) {
|
||||
message.warning("请选择风险分析人员");
|
||||
return;
|
||||
}
|
||||
const res = await evalRiskAnalysisSave({
|
||||
...rest,
|
||||
projectId,
|
||||
|
|
@ -106,16 +106,20 @@ const RiskAnalysisContent = ({ readOnly, ...props }) => {
|
|||
? analysisDate.format("YYYY-MM-DD")
|
||||
: undefined,
|
||||
});
|
||||
if (res?.success && res.data && rest.participants?.length) {
|
||||
const result = await evalRiskAnalysisPeopleSave(
|
||||
rest.participants.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
riskId: res.data.id,
|
||||
};
|
||||
}),
|
||||
);
|
||||
if (result.success) {
|
||||
if (res?.success) {
|
||||
let peopleSaved = true;
|
||||
if (res.data && rest.participants?.length) {
|
||||
const result = await evalRiskAnalysisPeopleSave(
|
||||
rest.participants.map((item) => {
|
||||
return {
|
||||
...item,
|
||||
riskId: res.data.id,
|
||||
};
|
||||
}),
|
||||
);
|
||||
peopleSaved = result?.success;
|
||||
}
|
||||
if (peopleSaved) {
|
||||
message.success(statusCode === 2 ? "风险分析已完成" : "已暂存");
|
||||
props.getDetail();
|
||||
}
|
||||
|
|
@ -538,7 +542,7 @@ const RiskAnalysisContent = ({ readOnly, ...props }) => {
|
|||
</Modal>
|
||||
|
||||
{!readOnly && (
|
||||
<Flex justify="flex-end" gap={8}>
|
||||
<Flex justify="flex-end" gap={8} style={{marginTop: '8px'}}>
|
||||
<Button
|
||||
onClick={() => handleSave(1)}
|
||||
loading={riskAnalysisSaveLoading}
|
||||
|
|
|
|||
|
|
@ -156,9 +156,15 @@ const ProjectFlow = (props) => {
|
|||
docxUrl: "",
|
||||
projectId,
|
||||
});
|
||||
getDetail();
|
||||
|
||||
}, []);
|
||||
|
||||
useEffect(()=>{
|
||||
if(!visible){
|
||||
getDetail();
|
||||
}
|
||||
}, [visible])
|
||||
|
||||
const tabItems = processTabs.map((item) => {
|
||||
let children = null;
|
||||
switch (item.key) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue