tangjie 2026-08-05 16:21:20 +08:00
parent 6605938618
commit 1d9dc7be62
2 changed files with 26 additions and 16 deletions

View File

@ -93,10 +93,10 @@ const RiskAnalysisContent = ({ readOnly, ...props }) => {
message.warning("文件上传中,请稍后再保存"); message.warning("文件上传中,请稍后再保存");
return; return;
} }
// if (!rest.participants?.length) { if (statusCode === 2&&!rest.participants?.length) {
// message.warning("请选择风险分析人员"); message.warning("请选择风险分析人员");
// return; return;
// } }
const res = await evalRiskAnalysisSave({ const res = await evalRiskAnalysisSave({
...rest, ...rest,
projectId, projectId,
@ -106,16 +106,20 @@ const RiskAnalysisContent = ({ readOnly, ...props }) => {
? analysisDate.format("YYYY-MM-DD") ? analysisDate.format("YYYY-MM-DD")
: undefined, : undefined,
}); });
if (res?.success && res.data && rest.participants?.length) { if (res?.success) {
const result = await evalRiskAnalysisPeopleSave( let peopleSaved = true;
rest.participants.map((item) => { if (res.data && rest.participants?.length) {
return { const result = await evalRiskAnalysisPeopleSave(
...item, rest.participants.map((item) => {
riskId: res.data.id, return {
}; ...item,
}), riskId: res.data.id,
); };
if (result.success) { }),
);
peopleSaved = result?.success;
}
if (peopleSaved) {
message.success(statusCode === 2 ? "风险分析已完成" : "已暂存"); message.success(statusCode === 2 ? "风险分析已完成" : "已暂存");
props.getDetail(); props.getDetail();
} }
@ -538,7 +542,7 @@ const RiskAnalysisContent = ({ readOnly, ...props }) => {
</Modal> </Modal>
{!readOnly && ( {!readOnly && (
<Flex justify="flex-end" gap={8}> <Flex justify="flex-end" gap={8} style={{marginTop: '8px'}}>
<Button <Button
onClick={() => handleSave(1)} onClick={() => handleSave(1)}
loading={riskAnalysisSaveLoading} loading={riskAnalysisSaveLoading}

View File

@ -156,9 +156,15 @@ const ProjectFlow = (props) => {
docxUrl: "", docxUrl: "",
projectId, projectId,
}); });
getDetail();
}, []); }, []);
useEffect(()=>{
if(!visible){
getDetail();
}
}, [visible])
const tabItems = processTabs.map((item) => { const tabItems = processTabs.map((item) => {
let children = null; let children = null;
switch (item.key) { switch (item.key) {