From 329d5613d3b259e578c0498e695cf38918d6c8d1 Mon Sep 17 00:00:00 2001
From: tangjie <122778500@qq.com>
Date: Mon, 20 Jul 2026 13:38:09 +0800
Subject: [PATCH] feat
---
src/pages/Container/Layout/menuConfig.js | 5 +
.../SafetyEvalBusiness/ProjectFlow/index.js | 785 ++++++++++++++++--
src/pages/Container/WpsEditor/index.js | 19 +-
3 files changed, 753 insertions(+), 56 deletions(-)
diff --git a/src/pages/Container/Layout/menuConfig.js b/src/pages/Container/Layout/menuConfig.js
index d400498..b688ff6 100644
--- a/src/pages/Container/Layout/menuConfig.js
+++ b/src/pages/Container/Layout/menuConfig.js
@@ -219,6 +219,11 @@ const menuItems = [
label: "A1 模块",
icon: ,
},
+ {
+ key: "/safetyEval/container/WpsEditor",
+ label: "报告编辑器",
+ icon: ,
+ },
],
},
];
diff --git a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/index.js b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/index.js
index f0e6909..820ab86 100644
--- a/src/pages/Container/SafetyEvalBusiness/ProjectFlow/index.js
+++ b/src/pages/Container/SafetyEvalBusiness/ProjectFlow/index.js
@@ -1,72 +1,753 @@
import React, { useState } from "react";
-import { Tabs, Tag, Alert, Button, Card } from "antd";
-import { ArrowLeftOutlined } from "@ant-design/icons";
+import {
+ Tabs,
+ Tag,
+ Alert,
+ Button,
+ Card,
+ Row,
+ Col,
+ Table,
+ Statistic,
+ Form,
+ Input,
+ Select,
+ Radio,
+ DatePicker,
+ Steps,
+ Empty,
+} from "antd";
+import { ArrowLeftOutlined, EditOutlined } from "@ant-design/icons";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
+import WpsEditor from "~/pages/Container/WpsEditor";
const PROCESS_TABS = [
- { key: "risk", index: "01", label: "风险分析", state: "已完成", stateType: "success" },
- { key: "contract", index: "02", label: "业务合同", state: "已完成", stateType: "success" },
- { key: "team", index: "03", label: "项目组", state: "已完成", stateType: "success" },
- { key: "survey", index: "04", label: "现场踏勘", state: "已完成", stateType: "success" },
- { key: "report", index: "05", label: "报告编制", state: "编制中", stateType: "processing" },
- { key: "internal", index: "06", label: "内部审核", state: "待办理", stateType: "default" },
- { key: "technical", index: "07", label: "技术审核", state: "待办理", stateType: "default" },
- { key: "control", index: "08", label: "过程控制", state: "前置未完成", stateType: "warning", locked: true },
+ {
+ key: "risk",
+ index: "01",
+ label: "风险分析",
+ state: "已完成",
+ stateType: "success",
+ role: "市场部经办人 / 市场部经理",
+ },
+ {
+ key: "contract",
+ index: "02",
+ label: "业务合同",
+ state: "已完成",
+ stateType: "success",
+ role: "机构管理员 / 项目负责人",
+ },
+ {
+ key: "team",
+ index: "03",
+ label: "项目组",
+ state: "已完成",
+ stateType: "success",
+ role: "评价部经理 / 机构主账号",
+ },
+ {
+ key: "survey",
+ index: "04",
+ label: "现场踏勘",
+ state: "已完成",
+ stateType: "success",
+ role: "项目组成员",
+ },
+ {
+ key: "report",
+ index: "05",
+ label: "报告编制",
+ state: "编制中",
+ stateType: "processing",
+ role: "报告编制人",
+ },
+ {
+ key: "internal",
+ index: "06",
+ label: "内部审核",
+ state: "待办理",
+ stateType: "default",
+ role: "内部审核人",
+ },
+ {
+ key: "technical",
+ index: "07",
+ label: "技术审核",
+ state: "待办理",
+ stateType: "default",
+ role: "技术负责人",
+ },
+ {
+ key: "control",
+ index: "08",
+ label: "过程控制",
+ state: "前置未完成",
+ stateType: "warning",
+ role: "过程控制负责人",
+ locked: true,
+ },
];
+const { TextArea } = Input;
+
+const RiskAnalysisContent = () => {
+ const [form] = Form.useForm();
+
+ return (
+
+
+
+ 市场部经办人 / 市场部经理
+
+
+ 市场部组织前置条件调查和风险分析,相关职能部门参与;市场部经理依据分析结果决定是否签订技术服务合同。
+
+
+
+
+
+
+
+
+
+ 是
+ 否
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 应结合项目行业特点、地理位置、周边环境和评价类别填写;非常规项目应通过风险分析会议形成记录。
+
+
+
+
+
+
+ 满足
+ 不满足
+
+
+
+
+ 不需要
+ 需要
+
+
+
+
+ 是
+ 否
+
+
+
+
+ 可行
+ 不可行
+
+
+
+
+ 有经济效益
+ 无经济效益
+
+
+
+
+
+
+
+ 低度
+ 中度
+ 高度
+
+
+
+ 中度:化工、金属非金属矿山、金属冶炼、陆地油气开采等行业评价项目。
+
+
+
+ 签合同
+ 不签合同
+
+
+
+ 系统建议:当前条件具备签约基础,最终结论由市场部经理批准。
+
+
+
+
+
+ {(fields, { add, remove }) => (
+ <>
+ (
+
+
+
+ ),
+ },
+ {
+ title: "部门/岗位", dataIndex: "dept",
+ render: (_, field) => (
+
+
+
+ ),
+ },
+ {
+ title: "分析意见", dataIndex: "opinion",
+ render: (_, field) => (
+
+
+
+ ),
+ },
+ {
+ title: "签字状态",
+ render: (_, field) => (
+
+ ),
+ },
+ {
+ title: "操作",
+ render: (_, field) => (
+ fields.length > 1 ? : null
+ ),
+ },
+ ]}
+ rowKey={(_, index) => index}
+ pagination={false}
+ />
+
+ >
+ )}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 低度风险
+
+
+ 小型露天采石场、加油站,以及机构熟悉且开展过类似评价工作的常规项目。
+
+
+
+
+
+
+ 中度风险
+
+
+ 化工生产、金属非金属矿山、金属冶炼、陆地石油和天然气开采行业的评价项目。
+
+
+
+
+
+
+ 高度风险
+
+
+ 机构未开展过的非常规项目,原则上组织专项风险分析会议,必要时总经理参加。
+
+
+
+
+
+ 不签合同重点条件:
+ 超出资质范围;无法提供合法有效资料;客户提出违法或不合理要求;经济性达不到预期;评价时间不能满足;机构与被评价对象存在投资咨询、设计、监理、物资供应等利益关系。
+
+
+
+ );
+};
+
+const ContractContent = () => (
+
+
+
+ 重庆市安全生产科学研究有限公司
+
+
+ HT00000000000000000001
+
+
+ 重庆市安全生产科学研究有限公司工程项目安全预评价
+
+
+ 项目简介
+
+ 15.00
+ 2026-03-05
+
+ 已上传 PDF
+
+
+
+
+
+
+
+);
+
+const TeamContent = () => (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+);
+
+const SurveyContent = () => (
+
+
+
+
+
+
+
+
+
+
+ 至少2名项目组专职人员完成有效签到签退
+
+
+ 厂区入口、生产装置区、末次会议等关键影像已上传
+
+
+ 现场检查表已上传
+
+
+ 整改通知和复查单双方已签字
+
+
+
+);
+
+const ReportContent = ({ onEdit }) => (
+ } onClick={onEdit}>
+ 打开报告编辑器
+
+ }
+ >
+
+
+ 安全预评价报告(AQ 8001 / AQ 8002 · V3.2)
+
+
+ AQ 8001-2007 / AQ 8002-2007
+
+ 编制中
+ 李明华
+
+ V1.3
+
+
+ 已开启,最近保存于 18:52
+
+
+
+);
+
+const InternalReviewContent = () => (
+
+
+ V1.3
+ 王丽萍
+ 7项
+ 2项
+
+
+
+);
+
+const TechnicalReviewContent = () => (
+
+
+ V1.4
+ 陈志强
+ 化工安全
+ 有效
+
+
+
+);
+
+const ControlContent = () => (
+
+
+
+
+);
+
const ProjectFlow = (props) => {
const [activeKey, setActiveKey] = useState("risk");
+ const [visible, setVisible] = useState(false);
- const tabItems = PROCESS_TABS.map((item) => ({
- key: item.key,
- disabled: item.locked,
- label: (
-
- {item.index} {item.label}
- {item.state}
-
- ),
- children: (
-
-
- {item.index} {item.label} 子流程页面
-
-
- ),
- }));
+ const handleTabChange = (key) => {
+ if (key === "report") {
+ setVisible(true);
+ return;
+ }
+ setActiveKey(key);
+ };
+
+ const tabItems = PROCESS_TABS.map((item) => {
+ let children = null;
+ switch (item.key) {
+ case "risk":
+ children = ;
+ break;
+ case "contract":
+ children = ;
+ break;
+ case "team":
+ children = ;
+ break;
+ case "survey":
+ children = ;
+ break;
+ case "report":
+ children = setVisible(true)} />;
+ break;
+ case "internal":
+ children = ;
+ break;
+ case "technical":
+ children = ;
+ break;
+ case "control":
+ children = ;
+ break;
+ default:
+ children = {item.label} 子流程页面;
+ }
+
+ return {
+ key: item.key,
+ disabled: item.locked,
+ label: (
+
+ {item.index} {item.label}
+
+ {item.state}
+
+
+ ),
+ children,
+ };
+ });
return (
- }
- onClick={() => props.history.push("MyProject")}
- style={{ paddingLeft: 0 }}
- >
- 返回
-
- 项目法定流程工作台
-
+
+
项目法定流程工作台
+
+ 华安化工园区安全预评价 | XP-2026-001
+
+
}
- extra={全量项目管理}
>
-
- 华安化工园区安全预评价 | XP-2026-001
-
-
-
-
-
+
+ {visible && setVisible(false)} />}
);
};
-export default AntdTableFuncControl(ProjectFlow);
\ No newline at end of file
+export default AntdTableFuncControl(ProjectFlow);
diff --git a/src/pages/Container/WpsEditor/index.js b/src/pages/Container/WpsEditor/index.js
index 60115e8..e83a264 100644
--- a/src/pages/Container/WpsEditor/index.js
+++ b/src/pages/Container/WpsEditor/index.js
@@ -1,11 +1,13 @@
import { useState, useEffect } from "react";
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
import { Flex, Button, Tabs, Input, Tag, Progress, Typography } from "antd";
+import { ArrowLeftOutlined } from "@ant-design/icons";
import WebOfficeSDK from "~/web-office-sdk-solution-v2.0.7/web-office-sdk-solution-v2.0.7.es.js";
import { createPortal } from "react-dom";
import "./index.less";
-const App = () => {
+const App = (props) => {
+ const { onCancel } = props;
const [expandedMap, setExpandedMap] = useState({});
const toggleExpand = (index) => {
@@ -29,7 +31,15 @@ const App = () => {
return (
+ {
+ console.log("点击了返回按钮");
+ onCancel()
+ }} />
+ 安全评价报告编制
+
+ }
extra={
@@ -171,6 +181,7 @@ const App = () => {
);
};
-export default function WpsEditor() {
- return createPortal(, document.body);
+export default function WpsEditor(props) {
+
+ return createPortal(, document.body);
}