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) => { /> + + - {QUALIFICATION_INDUSTRY_OPTIONS.map((opt) => ( {opt.label} @@ -314,6 +316,18 @@ 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)} > {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) => {