From 744093c82f0e1215185243d2e5fd9dfbc22ce4d6 Mon Sep 17 00:00:00 2001 From: tangjie <122778500@qq.com> Date: Thu, 13 Aug 2026 17:18:36 +0800 Subject: [PATCH] feat --- .../SafetyEvalBusiness/ProjectFlow/SurveyContent.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/SurveyContent.js b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/SurveyContent.js index 13194d9..5c591d7 100644 --- a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/SurveyContent.js +++ b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/SurveyContent.js @@ -1,5 +1,5 @@ import React, { useState, useEffect } from "react"; -import { Form, Button, Flex, Typography, Steps, Tag, Card, Table, message, Popover, Image } from "antd"; +import { Form, Button, Flex, Typography, Steps, Tag, Card, Table, message, Popover, Image, Checkbox } from "antd"; import { CheckCircleFilled, DownloadOutlined } from "@ant-design/icons"; import { Connect } from "@cqsjjb/jjb-dva-runtime"; import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace"; @@ -153,6 +153,9 @@ const RectificationNoticePanel = ({ readOnly }) => ( 本节点不在线编制整改通知,只归档机构已出具的《整改通知单》文件;上传成功即完成,后续可替换修改。 + + 是否存在重大隐患 + { STAGES.forEach((s) => { values[s.key] = map[s.key] || []; }); + // 回填整改通知单的 checkbox 字段 + const rectItem = (res?.data || []).find((item) => item.attachTypeCode === "RECTIFICATION_NOTICE"); + values.majorHazardCheckbox = rectItem?.checkbox === 1; form.setFieldsValue(values); } }; @@ -302,10 +308,15 @@ const SurveyContent = ({ readOnly, ...props }) => { } for (const s of STAGES) { const fileList = values[s.key] || []; + const validFiles = fileList.filter((f) => f.status === "done" && f.url); + if (validFiles.length === 0) continue; payload.push({ projectId, attachTypeCode: s.key, fileUrl: JSON.stringify(fileList), + ...(s.key === "RECTIFICATION_NOTICE" + ? { checkbox: values.majorHazardCheckbox ? 1 : 0 } + : {}), }); } const res = await props.evalSurveySaveAttach(payload);