feat
parent
2113d06d42
commit
13ce708425
|
|
@ -82,3 +82,19 @@ export const queryQualMonitoringPageStatistics = declareRequest(
|
||||||
"Get > /safetyEval/qual-filing/qualificationMonitoringPageStatistics",
|
"Get > /safetyEval/qual-filing/qualificationMonitoringPageStatistics",
|
||||||
"monitorStats: {} | res.data || {}",
|
"monitorStats: {} | res.data || {}",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const querySiteReviewNoticePage = declareRequest(
|
||||||
|
"siteReviewNoticeLoading",
|
||||||
|
"Get > /safetyEval/site-review-notice/page",
|
||||||
|
'siteReviewNoticeList: [] | res.data?.records || [] & siteReviewNoticeTotal: 0 | res.data?.total || 0',
|
||||||
|
);
|
||||||
|
|
||||||
|
export const siteReviewNoticeSave = declareRequest(
|
||||||
|
"siteReviewNoticeSaveLoading",
|
||||||
|
"Post > @/safetyEval/site-review-notice/save",
|
||||||
|
);
|
||||||
|
|
||||||
|
export const siteReviewResultSave = declareRequest(
|
||||||
|
"siteReviewResultSaveLoading",
|
||||||
|
"Post > @/safetyEval/site-review-result/save",
|
||||||
|
);
|
||||||
|
|
@ -5,3 +5,15 @@ export const queryMyOrCreateDoc = declareRequest(
|
||||||
"Get > /safetyEval-h5/wsp/doc/my-or-create",
|
"Get > /safetyEval-h5/wsp/doc/my-or-create",
|
||||||
'wpsDoc: {} | res.data || {}',
|
'wpsDoc: {} | res.data || {}',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const fetchWpsDocTemplate = declareRequest(
|
||||||
|
"docTemplateLoading",
|
||||||
|
"Post > @/safetyEval-h5/wsp/doc/template",
|
||||||
|
'docTemplate: {} | res.data || {}',
|
||||||
|
);
|
||||||
|
|
||||||
|
export const createWpsDoc = declareRequest(
|
||||||
|
"createDocLoading",
|
||||||
|
"Post > @/safetyEval-h5/wsp/doc/create",
|
||||||
|
'wpsDoc: {} | res.data || {}',
|
||||||
|
);
|
||||||
|
|
@ -121,7 +121,7 @@ const BaiduMapPicker = ({ visible, onCancel, onConfirm }) => {
|
||||||
width={800}
|
width={800}
|
||||||
okText="确认"
|
okText="确认"
|
||||||
cancelText="取消"
|
cancelText="取消"
|
||||||
destroyOnClose
|
destroyOnHidden
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
id="baiduSearchInput"
|
id="baiduSearchInput"
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,11 @@ const menuItems = [
|
||||||
label: "备案变更管理",
|
label: "备案变更管理",
|
||||||
icon: <SwapOutlined />,
|
icon: <SwapOutlined />,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "/safetyEval/container/QualificationReview/SiteReviewNotice",
|
||||||
|
label: "现场审查通知",
|
||||||
|
icon: <FileTextOutlined />,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ const RiskCenter = (props) => {
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
width={760}
|
width={760}
|
||||||
destroyOnClose
|
destroyOnHidden
|
||||||
>
|
>
|
||||||
<div style={{ padding: "0 0 8px", fontSize: 13, color: "#666" }}>
|
<div style={{ padding: "0 0 8px", fontSize: 13, color: "#666" }}>
|
||||||
风险预警中心统一办理监管处置:确认来源、选择处置方式、发送机构消息、等待机构反馈、复核并闭环。
|
风险预警中心统一办理监管处置:确认来源、选择处置方式、发送机构消息、等待机构反馈、复核并闭环。
|
||||||
|
|
@ -362,7 +362,7 @@ const RiskCenter = (props) => {
|
||||||
</Space>
|
</Space>
|
||||||
}
|
}
|
||||||
width={760}
|
width={760}
|
||||||
destroyOnClose
|
destroyOnHidden
|
||||||
>
|
>
|
||||||
<div style={{ padding: "0 0 8px", fontSize: 13, color: "#666" }}>
|
<div style={{ padding: "0 0 8px", fontSize: 13, color: "#666" }}>
|
||||||
机构端提交的说明和附件进入本环节复核,监管人员可通过、退回补正或办结。
|
机构端提交的说明和附件进入本环节复核,监管人员可通过、退回补正或办结。
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,384 @@
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
import { Form, Table, Button, Modal, Input, Select, DatePicker, Card, Row, Col, Statistic, message, Tag } from "antd";
|
||||||
|
import PageLayout from "@cqsjjb/jjb-react-admin-component/PageLayout";
|
||||||
|
import SearchForm from "@cqsjjb/jjb-react-admin-component/SearchForm";
|
||||||
|
import ControlWrapper from "@cqsjjb/jjb-react-admin-component/ControlWrapper";
|
||||||
|
import TableAction from "@cqsjjb/jjb-react-admin-component/TableAction";
|
||||||
|
import { AntdTableFuncControl } from "@cqsjjb/jjb-common-decorator/antd";
|
||||||
|
import { NS_QUAL_REVIEW } from "~/enumerate/namespace";
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import AttachmentUpload from "~/components/AttachmentUpload";
|
||||||
|
|
||||||
|
const MOCK_LIST = [
|
||||||
|
{
|
||||||
|
id: 1, institution: "重庆安评技术研究院有限公司", date: "2026-07-22", time: "09:30",
|
||||||
|
address: "机构办公场所及档案室", team: "王立军等4人", status: "pending",
|
||||||
|
application: "安全评价机构资质延续", department: "重庆市应急管理局",
|
||||||
|
materials: "12 / 14", noticeNo: "SC-2026-018",
|
||||||
|
materialsReq: "机构资质申请材料原件、人员档案、社保材料、办公场所和档案室证明、设备清单、过程控制制度及项目档案等资料。",
|
||||||
|
contact: "李科长", contactPhone: "023-6751****",
|
||||||
|
conclusion: "", resultFile: "", opinion: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2, institution: "重庆恒安安全评价有限公司", date: "2026-07-19", time: "14:00",
|
||||||
|
address: "机构会议室", team: "赵强等3人", status: "pending",
|
||||||
|
application: "新增业务范围申请", department: "重庆市应急管理局",
|
||||||
|
materials: "8 / 10", noticeNo: "SC-2026-021",
|
||||||
|
materialsReq: "新申请业务范围的技术人员证书、装备清单、能力证明等材料。",
|
||||||
|
contact: "李科长", contactPhone: "023-6751****",
|
||||||
|
conclusion: "", resultFile: "", opinion: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3, institution: "重庆渝安风险评估中心", date: "2025-11-18", time: "14:00",
|
||||||
|
address: "机构会议室", team: "李建军等3人", status: "done",
|
||||||
|
application: "安全生产评价机构资质备案", department: "重庆市应急管理局",
|
||||||
|
materials: "14 / 14", noticeNo: "SC-2025-031",
|
||||||
|
materialsReq: "—",
|
||||||
|
contact: "—", contactPhone: "—",
|
||||||
|
conclusion: "审查通过", resultFile: "现场审查结果报告.pdf", opinion: "整改项2项均已闭环,审查结论:通过",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const APPLICATION_OPTIONS = [
|
||||||
|
{ label: "资质延续申请 SQ-2026-018", value: "SQ-2026-018" },
|
||||||
|
{ label: "新增业务范围申请 SQ-2026-021", value: "SQ-2026-021" },
|
||||||
|
];
|
||||||
|
|
||||||
|
const INSTITUTION_OPTIONS = [
|
||||||
|
"重庆安评技术研究院有限公司",
|
||||||
|
"重庆恒安安全评价有限公司",
|
||||||
|
"重庆渝安风险评估中心",
|
||||||
|
];
|
||||||
|
|
||||||
|
const SiteReviewNotice = (props) => {
|
||||||
|
const [searchForm] = Form.useForm();
|
||||||
|
const [noticeForm] = Form.useForm();
|
||||||
|
const [resultForm] = Form.useForm();
|
||||||
|
const [dataSource, setDataSource] = useState(MOCK_LIST);
|
||||||
|
const [noticeModalOpen, setNoticeModalOpen] = useState(false);
|
||||||
|
const [resultModalOpen, setResultModalOpen] = useState(false);
|
||||||
|
const [currentResultRow, setCurrentResultRow] = useState(null);
|
||||||
|
const [viewMode, setViewMode] = useState(false); // true=保存查看, false=下发
|
||||||
|
|
||||||
|
const stats = {
|
||||||
|
total: dataSource.length,
|
||||||
|
pending: dataSource.filter((d) => d.status === "pending").length,
|
||||||
|
done: dataSource.filter((d) => d.status === "done").length,
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSearch = (values) => {
|
||||||
|
const { institution, status, date } = values || {};
|
||||||
|
setDataSource(MOCK_LIST.filter((item) => {
|
||||||
|
if (institution && !item.institution.includes(institution)) return false;
|
||||||
|
if (status && item.status !== status) return false;
|
||||||
|
return true;
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleReset = () => {
|
||||||
|
searchForm.resetFields();
|
||||||
|
setDataSource(MOCK_LIST);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 下发通知
|
||||||
|
const handleOpenNoticeModal = () => {
|
||||||
|
setViewMode(false);
|
||||||
|
noticeForm.resetFields();
|
||||||
|
setNoticeModalOpen(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 保存查看
|
||||||
|
const handleViewNotice = (record) => {
|
||||||
|
setViewMode(true);
|
||||||
|
noticeForm.setFieldsValue({
|
||||||
|
application: record.application,
|
||||||
|
institution: record.institution,
|
||||||
|
date: record.date ? dayjs(record.date) : null,
|
||||||
|
time: record.time,
|
||||||
|
address: record.address,
|
||||||
|
team: record.team,
|
||||||
|
materials: record.materialsReq,
|
||||||
|
contact: record.contact,
|
||||||
|
contactPhone: record.contactPhone,
|
||||||
|
});
|
||||||
|
setNoticeModalOpen(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSubmitNotice = () => {
|
||||||
|
noticeForm.validateFields().then((values) => {
|
||||||
|
const newNotice = {
|
||||||
|
id: dataSource.length + 1,
|
||||||
|
institution: values.institution,
|
||||||
|
date: values.date ? values.date.format("YYYY-MM-DD") : "2026-07-25",
|
||||||
|
time: values.time || "09:30",
|
||||||
|
address: values.address || "",
|
||||||
|
team: values.team || "",
|
||||||
|
status: "pending",
|
||||||
|
application: values.application || "",
|
||||||
|
department: "重庆市应急管理局",
|
||||||
|
materials: "—",
|
||||||
|
noticeNo: `SC-2026-${String(dataSource.length + 20).padStart(3, "0")}`,
|
||||||
|
materialsReq: values.materials || "",
|
||||||
|
contact: values.contact || "",
|
||||||
|
contactPhone: values.contactPhone || "",
|
||||||
|
};
|
||||||
|
setDataSource((prev) => [newNotice, ...prev]);
|
||||||
|
setNoticeModalOpen(false);
|
||||||
|
message.success("现场审查通知已下发机构端");
|
||||||
|
}).catch(() => {});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 审查结果上传
|
||||||
|
const handleOpenResultModal = (record) => {
|
||||||
|
setCurrentResultRow(record);
|
||||||
|
resultForm.resetFields();
|
||||||
|
resultForm.setFieldsValue({
|
||||||
|
institution: record.institution,
|
||||||
|
date: record.date,
|
||||||
|
conclusion: record.conclusion || undefined,
|
||||||
|
leader: record.team ? record.team.split("等")[0] : "王立军",
|
||||||
|
opinion: record.opinion || "",
|
||||||
|
});
|
||||||
|
setResultModalOpen(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSubmitResult = () => {
|
||||||
|
resultForm.validateFields().then((values) => {
|
||||||
|
setDataSource((prev) =>
|
||||||
|
prev.map((item) =>
|
||||||
|
item.id === currentResultRow?.id
|
||||||
|
? { ...item, status: "done", conclusion: values.conclusion, opinion: values.opinion }
|
||||||
|
: item
|
||||||
|
)
|
||||||
|
);
|
||||||
|
setResultModalOpen(false);
|
||||||
|
message.success("审查结果已保存并上传");
|
||||||
|
}).catch(() => {});
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{ title: "机构名称", dataIndex: "institution", ellipsis: true },
|
||||||
|
{
|
||||||
|
title: "现场审查时间", dataIndex: "date", width: 180,
|
||||||
|
render: (date, record) => `${date} ${record.time}`,
|
||||||
|
},
|
||||||
|
{ title: "审查地点", dataIndex: "address", width: 200, ellipsis: true },
|
||||||
|
{ title: "审查组", dataIndex: "team", width: 140 },
|
||||||
|
{
|
||||||
|
title: "状态", dataIndex: "status", width: 100,
|
||||||
|
render: (status) =>
|
||||||
|
status === "done" ? <Tag color="success">已完成</Tag> : <Tag color="processing">待开展审查</Tag>,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "操作", width: 220, fixed: "right",
|
||||||
|
render: (_, record) => (
|
||||||
|
<TableAction>
|
||||||
|
<Button type="link" size="small" onClick={() => handleViewNotice(record)}>
|
||||||
|
修改
|
||||||
|
</Button>
|
||||||
|
<Button type="link" size="small" onClick={() => handleOpenResultModal(record)}>
|
||||||
|
审查结果上传
|
||||||
|
</Button>
|
||||||
|
</TableAction>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<PageLayout
|
||||||
|
title="现场审查通知"
|
||||||
|
extra={
|
||||||
|
<Button type="primary" onClick={handleOpenNoticeModal}>
|
||||||
|
下发现场审查通知
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<div style={{ fontSize: 13, color: "#666", marginBottom: 16 }}>
|
||||||
|
向安全评价机构下发现场审查时间、地点和审查组安排,并接收审查结果文件。
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Row gutter={16} style={{ marginBottom: 16 }}>
|
||||||
|
<Col span={8}>
|
||||||
|
<Card size="small">
|
||||||
|
<Statistic title="通知总数" value={stats.total} suffix="条" />
|
||||||
|
<div style={{ fontSize: 12, color: "#999", marginTop: 4 }}>本年度累计</div>
|
||||||
|
</Card>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<Card size="small">
|
||||||
|
<Statistic title="待开展审查" value={stats.pending} valueStyle={{ color: "#2563eb" }} suffix="条" />
|
||||||
|
<div style={{ fontSize: 12, color: "#999", marginTop: 4 }}>未来30日内</div>
|
||||||
|
</Card>
|
||||||
|
</Col>
|
||||||
|
<Col span={8}>
|
||||||
|
<Card size="small">
|
||||||
|
<Statistic title="已完成" value={stats.done} valueStyle={{ color: "#059669" }} suffix="条" />
|
||||||
|
<div style={{ fontSize: 12, color: "#999", marginTop: 4 }}>审查结果已归档</div>
|
||||||
|
</Card>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
<SearchForm
|
||||||
|
form={searchForm}
|
||||||
|
loading={false}
|
||||||
|
formLine={[
|
||||||
|
<Form.Item key="institution" name="institution">
|
||||||
|
<ControlWrapper.Input label="机构名称" placeholder="请输入机构名称" allowClear />
|
||||||
|
</Form.Item>,
|
||||||
|
<Form.Item key="status" name="status">
|
||||||
|
<ControlWrapper.Select label="审查状态" placeholder="全部" allowClear style={{ width: "100%" }}>
|
||||||
|
<Select.Option value="pending">待开展审查</Select.Option>
|
||||||
|
<Select.Option value="done">已完成</Select.Option>
|
||||||
|
</ControlWrapper.Select>
|
||||||
|
</Form.Item>,
|
||||||
|
<Form.Item key="date" name="date">
|
||||||
|
<ControlWrapper.DatePicker label="审查日期" placeholder="请选择" />
|
||||||
|
</Form.Item>,
|
||||||
|
]}
|
||||||
|
onFinish={handleSearch}
|
||||||
|
onReset={handleReset}
|
||||||
|
style={{ marginBottom: 16 }}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Table
|
||||||
|
rowKey="id"
|
||||||
|
columns={columns}
|
||||||
|
dataSource={dataSource}
|
||||||
|
loading={false}
|
||||||
|
scroll={{ y: props.scrollY, x: 1200 }}
|
||||||
|
pagination={{
|
||||||
|
total: dataSource.length,
|
||||||
|
showSizeChanger: true,
|
||||||
|
showQuickJumper: true,
|
||||||
|
showTotal: (total) => `共 ${total} 条`,
|
||||||
|
pageSize: 10,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{/* 下发现场审查通知 / 保存查看 弹窗 */}
|
||||||
|
<Modal
|
||||||
|
title={viewMode ? "保存查看现场审查通知" : "下发现场审查通知"}
|
||||||
|
open={noticeModalOpen}
|
||||||
|
onCancel={() => setNoticeModalOpen(false)}
|
||||||
|
onOk={viewMode ? () => setNoticeModalOpen(false) : handleSubmitNotice}
|
||||||
|
okText={viewMode ? "关闭" : "确认下发"}
|
||||||
|
width={760}
|
||||||
|
destroyOnHidden
|
||||||
|
>
|
||||||
|
<Form form={noticeForm} layout="vertical">
|
||||||
|
<Row gutter={16}>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="application" label="关联资质申请" rules={viewMode ? [] : [{ required: true, message: "请选择" }]}>
|
||||||
|
<Select placeholder="请选择" disabled={viewMode} options={APPLICATION_OPTIONS} />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="institution" label="受审查机构" rules={viewMode ? [] : [{ required: true, message: "请选择" }]}>
|
||||||
|
<Select placeholder="请选择" disabled={viewMode}>
|
||||||
|
{INSTITUTION_OPTIONS.map((name) => (
|
||||||
|
<Select.Option key={name} value={name}>{name}</Select.Option>
|
||||||
|
))}
|
||||||
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row gutter={16}>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="date" label="现场审查日期" rules={viewMode ? [] : [{ required: true, message: "请选择" }]}>
|
||||||
|
<DatePicker style={{ width: "100%" }} disabled={viewMode} />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="time" label="开始时间">
|
||||||
|
<Input placeholder="09:30" disabled={viewMode} />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Form.Item name="address" label="审查地点" rules={viewMode ? [] : [{ required: true, message: "请输入" }]}>
|
||||||
|
<Input placeholder="机构办公场所、档案室及设备存放场所" disabled={viewMode} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item name="team" label="审查组成员" rules={viewMode ? [] : [{ required: true, message: "请输入" }]}>
|
||||||
|
<Input placeholder="王立军(组长)、赵强、刘洋、陈国庆" disabled={viewMode} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item name="materials" label="材料准备要求">
|
||||||
|
<Input.TextArea
|
||||||
|
rows={4}
|
||||||
|
placeholder="请准备机构资质申请材料原件、人员档案、社保材料、办公场所和档案室证明、设备清单、过程控制制度及项目档案等资料。"
|
||||||
|
disabled={viewMode}
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Row gutter={16}>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="contact" label="监管联系人">
|
||||||
|
<Input placeholder="李科长" disabled={viewMode} />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="contactPhone" label="联系电话">
|
||||||
|
<Input placeholder="023-6751****" disabled={viewMode} />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Form>
|
||||||
|
</Modal>
|
||||||
|
|
||||||
|
{/* 审查结果上传弹窗 */}
|
||||||
|
<Modal
|
||||||
|
title="上传审查结果"
|
||||||
|
open={resultModalOpen}
|
||||||
|
onCancel={() => setResultModalOpen(false)}
|
||||||
|
onOk={handleSubmitResult}
|
||||||
|
okText="保存审查结果"
|
||||||
|
width={760}
|
||||||
|
destroyOnHidden
|
||||||
|
>
|
||||||
|
<div style={{ fontSize: 13, color: "#666", marginBottom: 16 }}>
|
||||||
|
上传现场审查结果文件,并保存审查结论和意见。
|
||||||
|
</div>
|
||||||
|
<Form form={resultForm} layout="vertical">
|
||||||
|
<Row gutter={16}>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="institution" label="受审查机构">
|
||||||
|
<Input disabled />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="date" label="现场审查日期">
|
||||||
|
<Input disabled />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row gutter={16}>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="conclusion" label="审查结论" rules={[{ required: true, message: "请选择" }]}>
|
||||||
|
<Select placeholder="请选择">
|
||||||
|
<Select.Option value="审查通过">审查通过</Select.Option>
|
||||||
|
<Select.Option value="补正材料后通过">补正材料后通过</Select.Option>
|
||||||
|
<Select.Option value="不通过">不通过</Select.Option>
|
||||||
|
</Select>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
|
<Form.Item name="leader" label="审查组长">
|
||||||
|
<Input placeholder="王立军" />
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<AttachmentUpload
|
||||||
|
name="resultFile"
|
||||||
|
label="审查结果文件"
|
||||||
|
accept=".pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png"
|
||||||
|
maxCount={1}
|
||||||
|
extra="支持上传审查记录、审查意见或现场审查结果文件,限定pdf和图片,最多10个。"
|
||||||
|
/>
|
||||||
|
<Form.Item name="opinion" label="审查意见">
|
||||||
|
<Input.TextArea rows={4} placeholder="填写现场审查发现、整改要求和结论依据" />
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
</Modal>
|
||||||
|
</PageLayout>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Connect([NS_QUAL_REVIEW], true)(AntdTableFuncControl(SiteReviewNotice));
|
||||||
|
|
@ -211,7 +211,7 @@ const CustomerManage = (props) => {
|
||||||
onCancel={() => setModalOpen(false)}
|
onCancel={() => setModalOpen(false)}
|
||||||
onOk={handleCreateSubmit}
|
onOk={handleCreateSubmit}
|
||||||
width={800}
|
width={800}
|
||||||
destroyOnClose
|
destroyOnHidden
|
||||||
>
|
>
|
||||||
<div style={{ fontSize: 13, color: "#666", marginBottom: 16 }}>
|
<div style={{ fontSize: 13, color: "#666", marginBottom: 16 }}>
|
||||||
优先从平台企业库选择;平台没有时可新建客户信息。
|
优先从平台企业库选择;平台没有时可新建客户信息。
|
||||||
|
|
|
||||||
|
|
@ -13,13 +13,30 @@ import {
|
||||||
import { ArrowLeftOutlined } from "@ant-design/icons";
|
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 WebOfficeSDK from "~/web-office-sdk-solution-v2.0.7/web-office-sdk-solution-v2.0.7.es.js";
|
||||||
import { createPortal } from "react-dom";
|
import { createPortal } from "react-dom";
|
||||||
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
|
import { NS_SAFETY_EVAL_BUSINESS } from "~/enumerate/namespace";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const App = (props) => {
|
const App = (props) => {
|
||||||
const { onCancel, fileId } = props;
|
const { onCancel, safetyEvalBusiness } = props;
|
||||||
|
const {createDocLoading }=safetyEvalBusiness;
|
||||||
const [expandedMap, setExpandedMap] = useState({});
|
const [expandedMap, setExpandedMap] = useState({});
|
||||||
|
const [fileId, setFileId] = useState(props.fileId);
|
||||||
|
const [templateMap, setTemplateMap] = useState([]);
|
||||||
const sdkRef = useRef(null);
|
const sdkRef = useRef(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
props.fetchWpsDocTemplate().then((res) => {
|
||||||
|
if (res?.data) {
|
||||||
|
const list = Object.entries(res.data).map(([name, url]) => ({
|
||||||
|
name,
|
||||||
|
url,
|
||||||
|
}));
|
||||||
|
setTemplateMap(list);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
|
|
||||||
const handleSave = async () => {
|
const handleSave = async () => {
|
||||||
if (!sdkRef.current) {
|
if (!sdkRef.current) {
|
||||||
message.warning("文档尚未加载完成");
|
message.warning("文档尚未加载完成");
|
||||||
|
|
@ -40,13 +57,13 @@ const App = (props) => {
|
||||||
officeType: WebOfficeSDK.OfficeType.Writer,
|
officeType: WebOfficeSDK.OfficeType.Writer,
|
||||||
appId: "SX20260717TSGKEA",
|
appId: "SX20260717TSGKEA",
|
||||||
mount: document.getElementById("app-sbsb"),
|
mount: document.getElementById("app-sbsb"),
|
||||||
fileId: fileId || "123",
|
fileId: fileId,
|
||||||
token: sessionStorage.getItem("token"),
|
token: sessionStorage.getItem("token"),
|
||||||
});
|
});
|
||||||
await instance.ready();
|
await instance.ready();
|
||||||
sdkRef.current = instance;
|
sdkRef.current = instance;
|
||||||
})();
|
})();
|
||||||
}, []);
|
}, [fileId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="WpsEditor-container">
|
<div className="WpsEditor-container">
|
||||||
|
|
@ -185,43 +202,32 @@ const App = (props) => {
|
||||||
</Button>
|
</Button>
|
||||||
</Flex>
|
</Flex>
|
||||||
<div className="WpsEditor-dock-list">
|
<div className="WpsEditor-dock-list">
|
||||||
{[
|
{templateMap.map(({ name, url }, i) => (
|
||||||
{
|
<div key={i} className="WpsEditor-templateCard">
|
||||||
name: "安全预评价报告",
|
|
||||||
desc: "AQ 8001 / AQ 8002 · V3.2",
|
|
||||||
active: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "安全验收评价报告",
|
|
||||||
desc: "AQ 8001 / AQ 8003 · V2.8",
|
|
||||||
active: false,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "安全现状评价报告",
|
|
||||||
desc: "机构标准模板 · V4.1",
|
|
||||||
active: false,
|
|
||||||
},
|
|
||||||
].map((tmpl, i) => (
|
|
||||||
<div
|
|
||||||
key={i}
|
|
||||||
className={`WpsEditor-templateCard${tmpl.active ? " active" : ""}`}
|
|
||||||
>
|
|
||||||
<div>
|
<div>
|
||||||
<Typography.Text strong>
|
<Typography.Text strong>{name}</Typography.Text>
|
||||||
{tmpl.name}
|
{/* <Typography.Paragraph
|
||||||
</Typography.Text>
|
|
||||||
<Typography.Paragraph
|
|
||||||
type="secondary"
|
type="secondary"
|
||||||
style={{ margin: 0, fontSize: 12 }}
|
style={{ margin: 0, fontSize: 12 }}
|
||||||
>
|
>
|
||||||
{tmpl.desc}
|
{url}
|
||||||
</Typography.Paragraph>
|
</Typography.Paragraph> */}
|
||||||
</div>
|
</div>
|
||||||
{tmpl.active ? (
|
<Button
|
||||||
<Tag color="blue">使用中</Tag>
|
loading={createDocLoading}
|
||||||
) : (
|
size="small"
|
||||||
<Button size="small">应用</Button>
|
onClick={() => {
|
||||||
)}
|
props.createWpsDoc({docxUrl:url}).then((res) => {
|
||||||
|
const fileId = res?.data?.fileId;
|
||||||
|
if(!fileId){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
setFileId(fileId);
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
应用
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -338,5 +344,7 @@ const App = (props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function WpsEditor(props) {
|
export default function WpsEditor(props) {
|
||||||
return createPortal(<App {...props} />, document.body);
|
return createPortal(<ConnectApp {...props} />, document.body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ConnectApp = Connect([NS_SAFETY_EVAL_BUSINESS], true)(App);
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.WpsEditor-dock-cats {
|
.WpsEditor-dock-cats {
|
||||||
margin: 8px 0;
|
margin: 7px 0;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
padding-bottom: 2px;
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue