0814 需求变更

master
LiuJiaNan 2026-08-27 17:33:21 +08:00
parent dfe7dc6873
commit ad493acbc7
6 changed files with 164 additions and 82 deletions

View File

@ -1,8 +1,8 @@
module.exports = {
// 应用后端git地址部署上线需要
javaGit: "<git-url>",
javaGit: "http://47.92.113.182:3000/zcloud_gbs/zcloud-gbs-eightwork.git",
// 应用后端仓库名称,部署上线需要
javaGitName: "<git-name>",
javaGitName: "zcloud-gbs-eightwork",
// 环境配置
environment: {
development: {
@ -14,7 +14,7 @@ module.exports = {
},
production: {
// 应用后端分支名称,部署上线需要
javaGitBranch: "<branch-name>",
javaGitBranch: "master",
// 接口服务地址
API_HOST: "",
},

View File

@ -8,7 +8,7 @@
"scripts": {
"serve": "node node_modules/@cqsjjb/scripts/webpack.dev.server.js",
"build": "node node_modules/@cqsjjb/scripts/webpack.build.js",
"push": "jjb-cmd push java production",
"push": "zy-gbs-cmd push java production",
"clean-cache": "rimraf node_modules/.cache/webpack",
"serve:development": "cross-env NODE_ENV=development npm run serve",
"serve:production": "cross-env NODE_ENV=production npm run serve",
@ -18,6 +18,7 @@
"lint": "eslint --ext .js,.jsx,.tsx --fix src"
},
"dependencies": {
"@ahooksjs/use-url-state": "^3.5.1",
"@ant-design/icons": "^5.6.1",
"@ant-design/pro-components": "^2.8.10",
"@cqsjjb/jjb-common-decorator": "latest",
@ -32,7 +33,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-to-print": "^3.3.0",
"zy-react-library": "^1.3.17"
"zy-react-data": "^1.0.2",
"zy-react-library": "^1.4.2"
},
"devDependencies": {
"@antfu/eslint-config": "^5.4.1",

View File

@ -17,8 +17,8 @@ const CloseReasonModal = (props) => {
column={1}
styles={{ label: { width: 200 } }}
items={[
{ label: "时间", children: props.closeTime },
{ label: "强制关闭作业票原因", children: props.closeReason },
{ label: "强制关闭时间", children: props.closeTime },
{ label: "强制关闭原因", children: props.closeReason },
]}
/>
</Modal>

View File

@ -1,6 +1,7 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Descriptions, message, Modal, Space } from "antd";
import { useEffect, useRef, useState } from "react";
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-data/enum/uploadFile";
import FormBuilder from "zy-react-library/components/FormBuilder";
import AddIcon from "zy-react-library/components/Icon/AddIcon";
import Page from "zy-react-library/components/Page";
@ -10,7 +11,6 @@ import DictionarySelect from "zy-react-library/components/Select/Dictionary";
import Table from "zy-react-library/components/Table";
import Upload from "zy-react-library/components/Upload";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
import useDeleteFile from "zy-react-library/hooks/useDeleteFile";
import useDownloadFile from "zy-react-library/hooks/useDownloadFile";
import useTable from "zy-react-library/hooks/useTable";

View File

@ -1,11 +1,13 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Space } from "antd";
import { Button, message, Space } from "antd";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import ExportIcon from "zy-react-library/components/Icon/ExportIcon";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useDownloadBlob from "zy-react-library/hooks/useDownloadBlob";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
@ -22,6 +24,8 @@ function List(props) {
const { departmentTree, serviceDepartmentData } = useApplyDepartment(props, query);
const [eightworkType, setEightworkType] = useState([]);
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
const [selectedRows, setSelectedRows] = useState([]);
const [forceTerminationModalOpen, setForceTerminationModalOpen] = useState(false);
const [flowModalOpen, setFlowModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
@ -29,6 +33,8 @@ function List(props) {
const [closeTime, setCloseTime] = useState("");
const [closeReasonModalOpen, setCloseReasonModalOpen] = useState(false);
const { loading: downloadLoading, downloadBlob } = useDownloadBlob();
const { tableProps, getData } = useTable(props["eightworkList"], {
form,
params: { eqWorkType: "high_work", corpinfoId: query.corpinfoId },
@ -48,8 +54,20 @@ function List(props) {
getEightworkType();
}, []);
const onExport = () => {
if (selectedRowKeys.length === 0) {
message.warning("请选择要导出的数据");
return;
}
downloadBlob("/eightwork/eightworkInfo/exportHighWorkPermit", {
name: selectedRowKeys.length === 1 ? `高处作业安全许可证_${selectedRows[0].checkNo}` : "高处作业安全许可证",
type: selectedRowKeys.length === 1 ? "application/pdf" : "application/zip",
params: { ids: selectedRowKeys },
});
};
return (
<Page isShowAllAction={query.headerTitle || false} headerTitle={query.headerTitle}>
<Page isShowAllAction={query.headerTitle || false} headerTitle={query.headerTitle} loading={downloadLoading}>
<Search
options={[
{ name: "eqCheckNo", label: "编号" },
@ -77,7 +95,7 @@ function List(props) {
{ name: "eqXgfFlag", label: "作业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: WORK_TYPE_ENUM },
{
name: "eqTenantId",
label: "申请单位",
label: "实施单位",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: departmentTree,
itemsField: { labelKey: "corpName", valueKey: "id" },
@ -95,6 +113,27 @@ function List(props) {
onFinish={getData}
/>
<Table
rowSelection={{
preserveSelectedRowKeys: true,
selectedRowKeys,
onChange: (selectedRowKeys, selectedRows) => {
setSelectedRowKeys(selectedRowKeys);
setSelectedRows(selectedRows);
},
}}
toolBarRender={() => (
<Space>
<Button
icon={(<ExportIcon />)}
type="primary"
onClick={() => {
onExport();
}}
>
导出
</Button>
</Space>
)}
columns={[
{ title: "服务单位", dataIndex: "corpinfoName", hidden: !(props.entrance === "stakeholder") },
{ title: "编号", dataIndex: "checkNo" },
@ -114,7 +153,7 @@ function List(props) {
}),
},
{ title: "申请人", dataIndex: ["info", "applyUser"] },
{ title: "申请单位", dataIndex: ["info", "applyUnit"] },
{ title: "实施单位", dataIndex: ["info", "applyUnit"] },
{
title: "申请时间",
dataIndex: ["info", "applyTime"],

View File

@ -6,7 +6,6 @@ import { useReactToPrint } from "react-to-print";
import Page from "zy-react-library/components/Page";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import { getFileUrl } from "zy-react-library/utils";
import DisclaimerSign from "~/components/DisclaimerSign";
import OpinionSign from "~/components/OpinionSign";
import SafetyMeasures from "~/components/SafetyMeasures";
import { NS_EIGHTWORK } from "~/enumerate/namespace";
@ -32,10 +31,17 @@ function View(props) {
});
const [info, setInfo] = useState({});
const [theDisclosedPersonList, setTheDisclosedPersonList] = useState([]);
const getData = async () => {
const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id });
setInfo(basicInfo);
const matches = JSON.stringify(basicInfo.info || {}).match(/"step_19[^"]*"\s*:\s*\{[^}]*\}/g);
const result = matches.map((item) => {
const objStr = item.match(/\{[^}]*\}/)[0];
return JSON.parse(objStr);
});
setTheDisclosedPersonList(result);
};
useEffect(() => {
@ -73,101 +79,136 @@ function View(props) {
</tr>
)}
<tr>
<td className="title">申请单位</td>
<td className="title">实施单位</td>
<td>{info?.info?.applyUnit}</td>
<td className="title">申请时间</td>
<td className="title">申请人</td>
<td>{info?.info?.applyUser}</td>
</tr>
<tr>
<td className="title">申请日期</td>
<td>{dayjs(info?.info?.applyTime || info?.createTime).format("YYYY-MM-DD HH:mm:ss")}</td>
</tr>
<tr>
<td className="title">作业地点</td>
<td>{info?.info?.workLocation}</td>
<td className="title">作业内容</td>
<td>{info?.info?.workContent}</td>
</tr>
<tr>
<td rowSpan={2} className="title">作业高度</td>
<td rowSpan={2}>{info?.info?.workHeight}</td>
<td className="title">作业类型</td>
<td>{info?.info?.operationTypeName}</td>
</tr>
<tr>
<td className="title">作业地点</td>
<td>{info?.info?.workLocation}</td>
<td className="title">工作内容</td>
<td>{info?.info?.workContent}</td>
</tr>
<tr>
<td className="title">作业级别</td>
<td>{info?.info?.workLevelName}</td>
</tr>
<tr>
<td className="title">作业单位</td>
<td>{info?.info?.step_21?.actUserDepartmentName}</td>
<td className="title">监护人</td>
<td>
{info?.info?.step_20?.signPath
&& <Image src={getFileUrl() + info?.info?.step_20?.signPath} width={50} height={50} />}
</td>
</tr>
<tr>
<td className="title">作业人</td>
<td>{info?.info?.workUserName}</td>
<td className="title">作业负责人</td>
<td>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</td>
<td colSpan={3}>{info?.info?.workLevelName}</td>
</tr>
<tr>
<td className="title">关联的其他特殊作业及安全作业票编号</td>
<td colSpan={3}>{info?.info?.linkSpecialWorks}</td>
</tr>
<tr>
<td className="title">风险辨识结果</td>
<td colSpan={3}>{info?.info?.riskResults}</td>
<td className="title">预计作业开始时间</td>
<td>{info?.info?.workStartTime}</td>
<td className="title">预计作业结束时间</td>
<td>{info?.info?.workEndTime}</td>
</tr>
<tr>
<td className="title">作业实施时间</td>
<td colSpan={3}>{`${info?.info?.workStartTime}${info?.info?.workEndTime}`}</td>
<td className="title">项目批准人</td>
<td>{info?.info?.projectApproverName}</td>
<td className="title">方案编制人</td>
<td>{info?.info?.planPreparerName}</td>
</tr>
<tr>
<td className="title">方案批准人</td>
<td>{info?.info?.planApproverName}</td>
<td className="title">工作负责人</td>
<td>{info?.info?.workChargeUserName}</td>
</tr>
<tr>
<td className="title">高处作业人</td>
<td>{info?.info?.workUserName}</td>
<td className="title">监护人</td>
<td>{info?.info?.workGuardianUserName}</td>
</tr>
<tr>
<td className="title">安全措施确认人</td>
<td>
{info?.info?.step_3?.signPath
&& <Image src={getFileUrl() + info?.info?.step_3?.signPath} width={50} height={50} />}
</td>
<td className="title">安全交底人</td>
<td>
{info?.info?.step_18?.signPath
&& <Image src={getFileUrl() + info?.info?.step_18?.signPath} width={50} height={50} />}
<div>{info?.info?.step_18?.signTime}</div>
</td>
</tr>
<tr>
<td className="title">被交底人</td>
<td colSpan={3}>
<div style={{ display: "flex", flexWrap: "wrap", gap: "10px" }}>
{
theDisclosedPersonList.map((item, index) => (
<div key={index}>
{item.signPath
&& <Image src={getFileUrl() + item.signPath} width={50} height={50} />}
<div>{item.signTime}</div>
</div>
))
}
</div>
</td>
</tr>
<tr>
<td className="title">审批人员</td>
<td colSpan={3}>
<span>
<span>实施单位意见</span>
<span>{info?.info?.step_41?.remarks}</span>
<span>;</span>
</span>
<span style={{ paddingLeft: "10px" }}>
<span>发包单位发包部门意见</span>
<span>{info?.info?.step_42?.remarks}</span>
<span>;</span>
</span>
<span style={{ paddingLeft: "10px" }}>
<span>发包单位安监部门意见</span>
<span>{info?.info?.step_43?.remarks}</span>
<span>;</span>
</span>
<span style={{ paddingLeft: "10px" }}>
<span>属地单位意见</span>
<span>{info?.info?.step_44?.remarks}</span>
</span>
</td>
</tr>
<SafetyMeasures colSpan={4} />
<DisclaimerSign
colSpan={2}
safetyRemarks={info?.info?.step_18?.remarks}
safetySignPath={info?.info?.step_18?.signPath}
safetySignTime={info?.info?.step_18?.status !== 0 && info?.info?.step_18?.signTime}
AcceptRemarks={info?.info?.step_19?.remarks}
AcceptSignPath={info?.info?.step_19?.signPath}
AcceptSignTime={info?.info?.step_19?.status !== 0 && info?.info?.step_19?.signTime}
<OpinionSign
title="实施单位意见"
colSpan={4}
remarks={info?.info?.step_41?.remarks}
signPath={info?.info?.step_41?.signPath}
signTime={info?.info?.step_41?.status !== 0 && info?.info?.step_41?.signTime}
/>
<OpinionSign
title="作业负责人意见"
title="发包单位发包部门意见"
colSpan={4}
remarks={info?.info?.step_21?.remarks}
signPath={info?.info?.step_21?.signPath}
signTime={info?.info?.step_21?.status !== 0 && info?.info?.step_21?.signTime}
remarks={info?.info?.step_42?.remarks}
signPath={info?.info?.step_42?.signPath}
signTime={info?.info?.step_42?.status !== 0 && info?.info?.step_42?.signTime}
/>
<OpinionSign
title="所在单位意见"
title="发包单位安监部门意见"
colSpan={4}
remarks={info?.info?.step_22?.remarks}
signPath={info?.info?.step_22?.signPath}
signTime={info?.info?.step_22?.status !== 0 && info?.info?.step_22?.signTime}
remarks={info?.info?.step_43?.remarks}
signPath={info?.info?.step_43?.signPath}
signTime={info?.info?.step_43?.status !== 0 && info?.info?.step_43?.signTime}
/>
<OpinionSign
title="审核部门意见"
title="属地单位意见"
colSpan={4}
remarks={info?.info?.step_23?.remarks}
signPath={info?.info?.step_23?.signPath}
signTime={info?.info?.step_23?.status !== 0 && info?.info?.step_23?.signTime}
/>
<OpinionSign
title="审批部门意见"
colSpan={4}
remarks={info?.info?.step_24?.remarks}
signPath={info?.info?.step_24?.signPath}
signTime={info?.info?.step_24?.status !== 0 && info?.info?.step_24?.signTime}
/>
<OpinionSign
title="完工验收"
colSpan={4}
remarks={info?.info?.step_25?.remarks}
signPath={info?.info?.step_25?.signPath}
signTime={info?.info?.step_25?.status !== 0 && info?.info?.step_25?.signTime}
remarks={info?.info?.step_44?.remarks}
signPath={info?.info?.step_44?.signPath}
signTime={info?.info?.step_44?.status !== 0 && info?.info?.step_44?.signTime}
/>
</tbody>
</table>