diff --git a/jjb.config.js b/jjb.config.js
index f261548..956c00a 100644
--- a/jjb.config.js
+++ b/jjb.config.js
@@ -13,8 +13,8 @@ module.exports = {
//API_HOST: "https://gbs-gateway.qhdsafety.com",
//API_HOST: "http://192.168.0.152",
- API_HOST: "http://192.168.0.150", //太浅
- //API_HOST: "http://192.168.0.152",
+ API_HOST: "http://192.168.0.150", //太浅
+ // API_HOST: "http://192.168.0.152",
//API_HOST: "http://192.168.0.103", //huwei
},
production: {
diff --git a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ControlContent.js b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ControlContent.js
index 2ae9e8d..3eef06a 100644
--- a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ControlContent.js
+++ b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/ControlContent.js
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from "react";
-import { Tag, Button, Card, Row, Col, Table, Select, Input, Flex, Typography, message } from "antd";
+import { Tag, Button, Card, Table, Select, Input, Flex, Typography, message, Popover } from "antd";
+import { CheckCircleFilled } from "@ant-design/icons";
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace";
import { tools } from "@cqsjjb/jjb-common-lib";
@@ -7,16 +8,15 @@ import { tools } from "@cqsjjb/jjb-common-lib";
const { TextArea } = Input;
const { router } = tools;
-const CONCLUSION_OPTIONS = [
- { value: "conform_to", label: "符合" },
- { value: "not_conform_to", label: "需修改" },
-];
-
const ControlContent = (props) => {
const projectId = router.query?.id;
- const { processControlDetail, processControlFiles } = props.safetyEvalBusiness || {};
- const { processControl, controllers, reviewItems } = processControlDetail || {};
+ const { processControlDetail, processControlFiles } =
+ props.safetyEvalBusiness || {};
+ const { processControl, controllers, reviewItems } =
+ processControlDetail || {};
+ const [selectPeople, setSelectPeople] = useState(null);
+
// 当前步骤:1-过程控制审核 2-机构负责人签发 3-项目归档
const [step, setStep] = useState(1);
@@ -27,8 +27,21 @@ const ControlContent = (props) => {
// 项目归档
const [files, setFiles] = useState([]);
+ // 机构负责人签发
+ const [approvalOpinion, setApprovalOpinion] = useState("");
+
const fetchDetail = () => {
- props.evalProcessControlDetail({ projectId });
+ props.evalProcessControlDetail({ projectId }).then((res) => {
+ if (res?.success) {
+ setOpinionContent(res?.data?.opinionContent);
+ if (res?.data?.signTaskPersonCo) {
+ setSelectPeople({
+ value: res?.data?.signTaskPersonCo?.signerPersonnelId,
+ label: res?.data?.signTaskPersonCo?.signerName,
+ });
+ }
+ }
+ });
};
const fetchFiles = () => {
@@ -68,11 +81,12 @@ const ControlContent = (props) => {
setRows(next);
};
- const controllerName = processControl?.controllerName || "";
- const isDispatched = processControl?.reviewerSignatureTaskStatus !== "non_dispatched";
- const isSignatureCompleted = processControl?.reviewerSignatureTaskStatus === "completed";
+ const isDispatched =
+ processControl?.reviewerSignatureTaskStatus !== "non_dispatched";
+ const isSignatureCompleted =
+ processControl?.reviewerSignatureTaskStatus === "completed";
const hasHandoverForm = !!processControl?.handoverFormUrl;
- const problemCount = rows.filter((r) => r.reviewConclusion === "not_conform_to").length;
+
const canArchive = isSignatureCompleted && hasHandoverForm;
// 过程控制签字提交(confirm)
@@ -95,7 +109,9 @@ const ControlContent = (props) => {
};
const res = await props.evalProcessControlConfirm(payload);
if (res?.success !== false) {
- message.success(resultCode === "passed" ? "已提交通过审核" : "已提交退回修改");
+ message.success(
+ resultCode === "passed" ? "已提交通过审核" : "已提交退回修改",
+ );
fetchDetail();
}
};
@@ -103,23 +119,20 @@ const ControlContent = (props) => {
// 下发签字任务(assign)
const handleAssign = async () => {
if (!projectId) return;
- const res = await props.evalProcessControlAssign({ projectId });
+ const res = await props.evalProcessControlAssign({
+ projectId,
+ signTaskPersonCmd: {
+ signerPersonnelId: selectPeople?.value,
+ signerName: selectPeople?.label,
+ },
+ opinionContent: approvalOpinion,
+ });
if (res?.success !== false) {
message.success("已下发签字任务");
fetchDetail();
}
};
- // 生成归档交接单
- const handleGenerateHandover = async () => {
- if (!projectId) return;
- const res = await props.evalProcessControlGenerateHandover({ projectId });
- if (res?.success !== false) {
- message.success("归档交接单已生成");
- fetchDetail();
- }
- };
-
// 归档项目并入库
const handleArchive = async () => {
if (!projectId) return;
@@ -131,10 +144,10 @@ const ControlContent = (props) => {
};
const reviewColumns = [
- { title: "审核维度", dataIndex: "reviewDimensionName", width: 120 },
- { title: "审核重点", dataIndex: "reviewFocus", width: 200 },
+ { title: "程序审核项", dataIndex: "reviewDimensionName", width: 120 },
+ { title: "核查内容", dataIndex: "reviewFocus", width: 200 },
{
- title: "结论",
+ title: "结果",
dataIndex: "reviewConclusion",
width: 120,
render: (val, _, idx) => (
@@ -144,21 +157,21 @@ const ControlContent = (props) => {
style={{ width: 100 }}
onChange={(v) => updateRow(idx, "reviewConclusion", v)}
>
- {CONCLUSION_OPTIONS.map((opt) => (
-
- {opt.label}
-
- ))}
+ 符合
+ 不符合
),
},
{
- title: "审核意见",
+ title: "意见",
dataIndex: "reviewOpinion",
render: (val, _, idx) => (
updateRow(idx, "reviewOpinion", e.target.value)}
/>
),
@@ -166,23 +179,61 @@ const ControlContent = (props) => {
];
const fileColumns = [
- { title: "流程名称", dataIndex: "processName", width: 100 },
- { title: "条目名称", dataIndex: "itemName", width: 120 },
- { title: "文件名称", dataIndex: "materialName", width: 200 },
+ { title: "流程名称", dataIndex: "processName", ellipsis: true },
+ { title: "条目名称", dataIndex: "itemName", ellipsis: true },
+
{
- title: "文件地址",
+ title: "文件",
dataIndex: "projectDocUrl",
- width: 200,
- render: (url) =>
- url ? (
-
- 查看文件
-
- ) : (
- "-"
- ),
+
+ render: (val) => {
+ let files = [];
+ if (typeof val === "string") {
+ try { files = JSON.parse(val); } catch { files = []; }
+ } else if (Array.isArray(val)) {
+ files = val;
+ }
+ if (!files.length) return "-";
+ return (
+
+
+ {files.map((f, i) => (
+
+ 📎 {f.name || f.url || "查看文件"}
+
+ ))}
+
+ }
+ trigger="hover"
+ >
+ e.preventDefault()}
+ style={{ cursor: "pointer" }}
+ >
+ {files.length}个附件
+
+
+
+ );
+ },
},
- { title: "资料类型", dataIndex: "materialType", width: 100 },
+
];
const STEP_ITEMS = [
@@ -193,7 +244,10 @@ const ControlContent = (props) => {
return (
-
+
{STEP_ITEMS.map((item) => (