diff --git a/src/components/AttachmentUpload/index.js b/src/components/AttachmentUpload/index.js
index 729fe00..1b1b507 100644
--- a/src/components/AttachmentUpload/index.js
+++ b/src/components/AttachmentUpload/index.js
@@ -4,7 +4,7 @@ import { PlusOutlined } from "@ant-design/icons";
const isImage = (url) =>
/\.(png|jpe?g|gif|bmp|webp|svg)(\?.*)?$/i.test(url || "");
-export default function AttachmentUpload({ name, label, disabled = false, maxCount, accept, extra ,rules }) {
+export default function AttachmentUpload({ name, label, disabled = false, maxCount, accept, extra ,rules, style }) {
const [previewImage, setPreviewImage] = useState("");
return (
@@ -13,6 +13,7 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
name={name}
label={label}
extra={extra}
+ style={style}
valuePropName="fileList"
rules={rules}
getValueProps={(value) => {
@@ -90,7 +91,7 @@ export default function AttachmentUpload({ name, label, disabled = false, maxCou
-
+ />}
>
);
}
diff --git a/src/pages/Container/Layout/index.jsx b/src/pages/Container/Layout/index.jsx
index 5c4b0a6..73e89ba 100644
--- a/src/pages/Container/Layout/index.jsx
+++ b/src/pages/Container/Layout/index.jsx
@@ -45,14 +45,22 @@ function saveState(tabs, activeKey) {
export default function SimulatedLayout({ children, history }) {
const [collapsed, setCollapsed] = useState(false);
const [state, setState] = useState(loadState);
- const currentPath = window.location.pathname;
+ const [currentPath, setCurrentPath] = useState(window.location.pathname);
- // 页面加载时自动将当前路径加入标签
+ // 监听路由变化,更新 currentPath
+ useEffect(() => {
+ const unlisten = history?.listen?.((location) => {
+ setCurrentPath(location.pathname || window.location.pathname);
+ });
+ return () => unlisten?.();
+ }, [history]);
+
+ // 路由变化时自动将当前路径加入标签
useEffect(() => {
if (currentPath && !currentPath.endsWith("/container/")) {
addTab(currentPath);
}
- }, []); // 仅挂载时执行一次
+ }, [currentPath]);
/* ---- 标签操作 ---- */
const addTab = useCallback((path) => {
@@ -73,9 +81,11 @@ export default function SimulatedLayout({ children, history }) {
const navigateTo = useCallback((path) => {
if (path !== currentPath) {
- window.location.href = path;
+ history.replace(path.replace(/^\/safetyEval/, ""));
+ // history.listen 可能不存在,手动同步 currentPath
+ setCurrentPath(window.location.pathname);
}
- }, [currentPath]);
+ }, [currentPath, history]);
const handleCloseTab = useCallback((targetKey) => {
setState((prev) => {
diff --git a/src/pages/Container/SafetyEvalBusiness/EvalProject/Create/index.js b/src/pages/Container/SafetyEvalBusiness/EvalProject/Create/index.js
index 271d8dc..f1bfb21 100644
--- a/src/pages/Container/SafetyEvalBusiness/EvalProject/Create/index.js
+++ b/src/pages/Container/SafetyEvalBusiness/EvalProject/Create/index.js
@@ -11,6 +11,7 @@ import {
DatePicker,
Flex,
Tag,
+ Radio,
} from "antd";
import dayjs from "dayjs";
import { tools } from "@cqsjjb/jjb-common-lib";
@@ -103,7 +104,7 @@ const EvalProjectCreate = (props) => {
name: item.userName,
deptName: item.deptName,
posName: item.postName,
- capacity: '龟派气功波',
+ capacity: '',
})),
};
if (isView) {
@@ -298,14 +299,15 @@ const EvalProjectCreate = (props) => {
/>
+
+
-
+
+
+
+ 是
+ 否
+
+
+
diff --git a/src/pages/Container/SafetyEvalBusiness/ProjectDocLibrary/index.js b/src/pages/Container/SafetyEvalBusiness/ProjectDocLibrary/index.js
index 7e31ad5..d843617 100644
--- a/src/pages/Container/SafetyEvalBusiness/ProjectDocLibrary/index.js
+++ b/src/pages/Container/SafetyEvalBusiness/ProjectDocLibrary/index.js
@@ -22,6 +22,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { tools } from "@cqsjjb/jjb-common-lib";
import AttachmentUpload from "~/components/AttachmentUpload";
+import PreviewUrlButton from "~/components/PreviewUrlButton";
const { router } = tools;
@@ -265,13 +266,7 @@ const ProjectDocLibrary = (props) => {
title: "操作",
width: 100,
render: (_, record) => (
-
+
),
},
]}
diff --git a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ContractContent.js b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ContractContent.js
index a59e6c1..4259301 100644
--- a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ContractContent.js
+++ b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ContractContent.js
@@ -501,10 +501,12 @@ const ContractContent = (props) => {
-
diff --git a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ControlContent.js b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ControlContent.js
index 5bf38d8..31b2b0c 100644
--- a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ControlContent.js
+++ b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ControlContent.js
@@ -22,7 +22,7 @@ const ControlContent = (props) => {
// 过程控制审核
const [rows, setRows] = useState([]);
- const [opinionContent, setOpinionContent] = useState("");
+
// 项目归档
const [files, setFiles] = useState([]);
@@ -34,7 +34,7 @@ const ControlContent = (props) => {
const fetchDetail = () => {
props.evalProcessControlDetail({ projectId }).then((res) => {
if (res?.success) {
- setOpinionContent(res?.data?.opinionContent);
+
if (res?.data?.signTaskPersonCo) {
setSelectPeople({
value: res?.data?.signTaskPersonCo?.signerPersonnelId,
@@ -65,8 +65,10 @@ const ControlContent = (props) => {
})),
);
}
+
if (processControl?.opinionContent) {
- setOpinionContent(processControl.opinionContent);
+ setApprovalOpinion(processControl.opinionContent);
+
}
}, [processControlDetail]);
@@ -93,11 +95,15 @@ const ControlContent = (props) => {
// 过程控制签字提交(confirm)
const handleConfirm = async (resultCode) => {
if (!projectId) return;
+ if(!rows.every((r) => r.reviewConclusion)){
+ message.error("请填写所有核查项的结果");
+ return;
+ }
const payload = {
id: processControl?.id,
projectId,
resultCode,
- opinionContent,
+ opinionContent: approvalOpinion,
reviewItems: rows.map((r) => ({
bizType: "eval_process_control",
bizId: processControl?.id,
@@ -151,12 +157,14 @@ const ControlContent = (props) => {
{
title: "结果",
dataIndex: "reviewConclusion",
- width: 120,
+ width: 150,
render: (val, _, idx) => (
updateRow(idx, "reviewConclusion", v)}
>
符合
diff --git a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/InternalReviewContent.js b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/InternalReviewContent.js
index 4b77263..4129a4b 100644
--- a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/InternalReviewContent.js
+++ b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/InternalReviewContent.js
@@ -71,7 +71,6 @@ const InternalReviewContent = (props) => {
setRows(next);
};
-
const isDispatched =
internalReview?.reviewerSignatureTaskStatus === "dispatched";
const problemCount = rows.filter(
@@ -80,41 +79,57 @@ const InternalReviewContent = (props) => {
const handleAssign = async () => {
if (!projectId) return;
- const res = await props.evalInternalReviewAssign({ projectId, signTaskPersonCmd:{
- signerPersonnelId: selectedReviewer,
- signerName: reviewers.find((item) => item.personnelId === selectedReviewer)?.personnelName ,
- } });
+ const result= await handleConfirm("not_passed");
+ if(!result) return;
+ const res = await props.evalInternalReviewAssign({
+ projectId,
+ signTaskPersonCmd: {
+ signerPersonnelId: selectedReviewer,
+ signerName: reviewers.find(
+ (item) => item.personnelId === selectedReviewer,
+ )?.personnelName,
+ },
+ });
if (res?.success !== false) {
message.success("已下发签字任务");
- fetchDetail();
+ fetchDetail()
}
};
const handleConfirm = async (resultCode) => {
- if (!projectId) return;
- const payload = {
- id: internalReview?.id,
- projectId,
- resultCode,
- opinionContent: overallOpinion,
- reviewItems: rows.map((r) => ({
- bizType: "eval_internal_review",
- bizId: internalReview?.id,
- reviewDimensionCode: r.reviewDimensionCode,
- reviewDimensionName: r.reviewDimensionName,
- reviewFocus: r.reviewFocus,
- reviewConclusion: r.reviewConclusion,
- reviewOpinion: r.reviewOpinion,
- })),
- };
- const res = await props.evalInternalReviewConfirm(payload);
- if (res?.success !== false) {
- message.success(
- resultCode === "passed" ? "已提交" : "已保存",
- );
- fetchDetail();
- props.getDetail?.();
+ if(!rows.every((r) => r.reviewConclusion)){
+ message.error("请填写审核结论");
+ return;
}
+ return new Promise(async (resolve, reject) => {
+ if (!projectId) return;
+ const payload = {
+ id: internalReview?.id,
+ projectId,
+ resultCode,
+ opinionContent: overallOpinion,
+ reviewItems: rows.map((r) => ({
+ bizType: "eval_internal_review",
+ bizId: internalReview?.id,
+ reviewDimensionCode: r.reviewDimensionCode,
+ reviewDimensionName: r.reviewDimensionName,
+ reviewFocus: r.reviewFocus,
+ reviewConclusion: r.reviewConclusion,
+ reviewOpinion: r.reviewOpinion,
+ })),
+ };
+ const res = await props.evalInternalReviewConfirm(payload);
+ if (res?.success !== false) {
+ message.success(resultCode === "passed" ? "已提交" : "已保存");
+ resolve(res);
+ if (resultCode === "passed") {
+ props.getDetail?.();
+ }
+ }
+ else{
+ reject();
+ }
+ });
};
const columns = [
@@ -128,7 +143,9 @@ const InternalReviewContent = (props) => {
updateRow(idx, "reviewConclusion", v)}
>
{CONCLUSION_OPTIONS.map((opt) => (
@@ -169,9 +186,20 @@ const InternalReviewContent = (props) => {
内审人
-
-
r.personnelName).join("、")}>
- {(reviewers || []).map((r) => r.personnelName).join("、") || "-"}
+
+ r.personnelName).join("、")}
+ >
+
+ {(reviewers || []).map((r) => r.personnelName).join("、") ||
+ "-"}
+
@@ -213,6 +241,9 @@ const InternalReviewContent = (props) => {
-
+
{(fields, { add, remove }) => {
addParticipantRef.current = add;
@@ -463,55 +466,14 @@ const RiskAnalysisContent = (props) => {
- setParticipantModalOpen(false)}
- onOk={() => {
- const selected = (
- evalProjectDetailData?.participants || []
- ).filter((p) => selectedParticipantIds.includes(p.id));
- selected.forEach((p) => {
- addParticipantRef.current?.({
- personnelId: p.id,
- personnelName: p.name,
- deptName: p.deptName,
- opinion: "",
- projectId,
- });
- });
- setParticipantModalOpen(false);
- }}
- >
- {
- const existing = (
- form.getFieldValue("participants") || []
- ).map((p) => p.personnelName);
- return (evalProjectDetailData?.participants || []).filter(
- (p) => !existing.includes(p.name),
- );
- })()}
- rowKey="id"
- rowSelection={{
- type: "checkbox",
- selectedRowKeys: selectedParticipantIds,
- onChange: (keys) => setSelectedParticipantIds(keys),
- getCheckboxProps: (record) => ({
- disabled: false,
- }),
- }}
- columns={[
- { title: "姓名", dataIndex: "name", width: 100 },
- { title: "部门", dataIndex: "deptName", width: 120 },
- { title: "岗位", dataIndex: "posName", width: 120 },
- { title: "能力", dataIndex: "capacity", width: 120 },
- ]}
- pagination={false}
- size="small"
- locale={{ emptyText: "所有人员均已添加" }}
- />
-
+
@@ -558,6 +520,56 @@ const RiskAnalysisContent = (props) => {
+ setParticipantModalOpen(false)}
+ onOk={() => {
+ const selected = (evalProjectDetailData?.participants || []).filter(
+ (p) => selectedParticipantIds.includes(p.id),
+ );
+ selected.forEach((p) => {
+ addParticipantRef.current?.({
+ personnelId: p.id,
+ personnelName: p.name,
+ deptName: p.deptName,
+ opinion: "",
+ projectId,
+ });
+ });
+ setParticipantModalOpen(false);
+ }}
+ >
+ {
+ const existing = (form.getFieldValue("participants") || []).map(
+ (p) => p.personnelName,
+ );
+ return (evalProjectDetailData?.participants || []).filter(
+ (p) => !existing.includes(p.name),
+ );
+ })()}
+ rowKey="id"
+ rowSelection={{
+ type: "checkbox",
+ selectedRowKeys: selectedParticipantIds,
+ onChange: (keys) => setSelectedParticipantIds(keys),
+ getCheckboxProps: (record) => ({
+ disabled: false,
+ }),
+ }}
+ columns={[
+ { title: "姓名", dataIndex: "name", width: 100 },
+ { title: "部门", dataIndex: "deptName", width: 120 },
+ { title: "岗位", dataIndex: "posName", width: 120 },
+ { title: "能力", dataIndex: "capacity", width: 120 },
+ ]}
+ pagination={false}
+ size="small"
+ locale={{ emptyText: "所有人员均已添加" }}
+ />
+
+
-
+
+
);
@@ -111,19 +118,72 @@ const InspectionPanel = ({ dataSource = [], evalProjectDetailData = {} }) => {
签到日期:{dataSource?.[0]?.singInTime ? dayjs(dataSource?.[0]?.singInTime).format('YYYY-MM-DD') : '-'}
+
);
};
-const SimpleUploadPanel = ({ index, title, desc }) => (
+const RectificationNoticePanel = () => (
- {index}
- {title}
- {desc}
+ 03
+ 整改通知单上传
+ 本节点不在线编制整改通知,只归档机构已出具的《整改通知单》文件;上传成功即完成,后续可替换修改。
+
+
+);
+
+const EnterpriseRectificationPanel = () => (
+
+
+
+ 04
+ 企业整改报告上传
+ 企业线下提交《整改报告》后,由机构人员上传归档;本系统不提供企业在线提交和逐项整改流程。
+
+
+
+
+);
+
+const RectificationReviewPanel = () => (
+
+
+
+ 05
+ 整改复查单上传
+ 机构人员现场复查后,将经双方签字确认的《整改复查单》上传归档;上传后本节点自动标记完成。
+
+
+
);
@@ -217,39 +277,22 @@ const SurveyContent = (props) => {
items={STAGES.map((s) => ({ title: s.label }))}
/>
- {activeStage === "PRACTICE_NOTIFICATION" && }
- {activeStage === "SITE_INSPECTION_FORM" && }
- {activeStage === "RECTIFICATION_NOTICE" && (
-
- )}
- {activeStage === "ENTERPRISE_RECTIFICATION" && (
-
- )}
- {activeStage === "RECTIFICATION_REVIEW" && (
-
- )}
-
diff --git a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/TechnicalReviewContent.js b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/TechnicalReviewContent.js
index 038b1e5..2d8c7d7 100644
--- a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/TechnicalReviewContent.js
+++ b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/TechnicalReviewContent.js
@@ -76,6 +76,8 @@ const TechnicalReviewContent = (props) => {
const handleAssign = async () => {
if (!projectId) return;
+ const result= await handleConfirm("not_passed");
+ if(!result) return;
const res = await props.evalTechReviewAssign({
projectId,
signTaskPersonCmd: {
@@ -87,35 +89,45 @@ const TechnicalReviewContent = (props) => {
});
if (res?.success !== false) {
message.success("已下发签字任务");
- fetchDetail();
+ fetchDetail()
}
};
const handleConfirm = async (resultCode) => {
- if (!projectId) return;
- const payload = {
- id: techReview?.id,
- projectId,
- resultCode,
- opinionContent: overallOpinion,
- reviewItems: rows.map((r) => ({
- bizType: "eval_tech_review",
- bizId: techReview?.id,
- reviewDimensionCode: r.reviewDimensionCode,
- reviewDimensionName: r.reviewDimensionName,
- reviewFocus: r.reviewFocus,
- reviewConclusion: r.reviewConclusion,
- reviewOpinion: r.reviewOpinion,
- })),
- };
- const res = await props.evalTechReviewConfirm(payload);
- if (res?.success !== false) {
- message.success(
- resultCode === "1" ? "已确认技审并提交过程控制" : "已保存",
- );
- fetchDetail();
- props.getDetail?.();
+ if (!rows.every((r) => r.reviewConclusion)) {
+ message.error("请填写审核结论");
+ return;
}
+ if (!projectId) return;
+ return new Promise(async (resolve, reject) => {
+ const payload = {
+ id: techReview?.id,
+ projectId,
+ resultCode,
+ opinionContent: overallOpinion,
+ reviewItems: rows.map((r) => ({
+ bizType: "eval_tech_review",
+ bizId: techReview?.id,
+ reviewDimensionCode: r.reviewDimensionCode,
+ reviewDimensionName: r.reviewDimensionName,
+ reviewFocus: r.reviewFocus,
+ reviewConclusion: r.reviewConclusion,
+ reviewOpinion: r.reviewOpinion,
+ })),
+ };
+ const res = await props.evalTechReviewConfirm(payload);
+ if (res?.success !== false) {
+ resolve(res);
+ message.success(
+ resultCode === "passed" ? "已确认技审并提交过程控制" : "已保存",
+ );
+ if (resultCode === "passed") {
+ props.getDetail?.();
+ }
+ } else {
+ reject();
+ }
+ });
};
const columns = [
@@ -129,7 +141,9 @@ const TechnicalReviewContent = (props) => {
updateRow(idx, "reviewConclusion", v)}
>
{CONCLUSION_OPTIONS.map((opt) => (
@@ -228,6 +242,9 @@ const TechnicalReviewContent = (props) => {
-
+