diff --git a/jjb.config.js b/jjb.config.js index 962cd7c..86b8cd7 100644 --- a/jjb.config.js +++ b/jjb.config.js @@ -1,8 +1,8 @@ module.exports = { // 应用后端git地址,部署上线需要 - javaGit: "", + javaGit: "http://47.92.113.182:3000/zcloud_gbs/zcloud-gbs-eightwork.git", // 应用后端仓库名称,部署上线需要 - javaGitName: "", + javaGitName: "zcloud-gbs-eightwork", // 环境配置 environment: { development: { @@ -14,7 +14,7 @@ module.exports = { }, production: { // 应用后端分支名称,部署上线需要 - javaGitBranch: "", + javaGitBranch: "master", // 接口服务地址 API_HOST: "", }, diff --git a/package.json b/package.json index 82db43e..b7ce09e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/CloseReasonModal/index.js b/src/components/CloseReasonModal/index.js index 8f8006b..84d406e 100644 --- a/src/components/CloseReasonModal/index.js +++ b/src/components/CloseReasonModal/index.js @@ -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 }, ]} /> diff --git a/src/pages/Container/Enterprise/ConfinedSpaceWork/Ledger/List/index.js b/src/pages/Container/Enterprise/ConfinedSpaceWork/Ledger/List/index.js index 220e21a..50bcd26 100644 --- a/src/pages/Container/Enterprise/ConfinedSpaceWork/Ledger/List/index.js +++ b/src/pages/Container/Enterprise/ConfinedSpaceWork/Ledger/List/index.js @@ -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"; diff --git a/src/pages/Container/Enterprise/HighPlaceWork/Homework/List/index.js b/src/pages/Container/Enterprise/HighPlaceWork/Homework/List/index.js index 5de4829..214bb0c 100644 --- a/src/pages/Container/Enterprise/HighPlaceWork/Homework/List/index.js +++ b/src/pages/Container/Enterprise/HighPlaceWork/Homework/List/index.js @@ -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 ( - + { + setSelectedRowKeys(selectedRowKeys); + setSelectedRows(selectedRows); + }, + }} + toolBarRender={() => ( + + + + )} 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"], diff --git a/src/pages/Container/Enterprise/HighPlaceWork/Homework/View/index.js b/src/pages/Container/Enterprise/HighPlaceWork/Homework/View/index.js index 5b21b5b..9368209 100644 --- a/src/pages/Container/Enterprise/HighPlaceWork/Homework/View/index.js +++ b/src/pages/Container/Enterprise/HighPlaceWork/Homework/View/index.js @@ -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) { )} - + - + + + + + - - - - - - - - - - + + + + + + - - - - - - - - - - - - - + - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - -
申请单位实施单位 {info?.info?.applyUnit}申请时间申请人{info?.info?.applyUser}
申请日期 {dayjs(info?.info?.applyTime || info?.createTime).format("YYYY-MM-DD HH:mm:ss")}
作业地点{info?.info?.workLocation}作业内容{info?.info?.workContent}
作业高度(米){info?.info?.workHeight} 作业类型 {info?.info?.operationTypeName}
作业地点{info?.info?.workLocation}工作内容{info?.info?.workContent}
作业级别{info?.info?.workLevelName}
作业单位{info?.info?.step_21?.actUserDepartmentName}监护人 - {info?.info?.step_20?.signPath - && } -
作业人{info?.info?.workUserName}作业负责人 - {info?.info?.step_21?.signPath - && } - {info?.info?.workLevelName}
关联的其他特殊作业及安全作业票编号 {info?.info?.linkSpecialWorks}
风险辨识结果{info?.info?.riskResults}预计作业开始时间{info?.info?.workStartTime}预计作业结束时间{info?.info?.workEndTime}
作业实施时间{`${info?.info?.workStartTime} 至 ${info?.info?.workEndTime} 止`}项目批准人{info?.info?.projectApproverName}方案编制人{info?.info?.planPreparerName}
方案批准人{info?.info?.planApproverName}工作负责人{info?.info?.workChargeUserName}
高处作业人{info?.info?.workUserName}监护人{info?.info?.workGuardianUserName}
安全措施确认人 + {info?.info?.step_3?.signPath + && } + 安全交底人 + {info?.info?.step_18?.signPath + && } +
{info?.info?.step_18?.signTime}
+
被交底人 +
+ { + theDisclosedPersonList.map((item, index) => ( +
+ {item.signPath + && } +
{item.signTime}
+
+ )) + } +
+
审批人员 + + 实施单位意见: + {info?.info?.step_41?.remarks} + ; + + + 发包单位发包部门意见: + {info?.info?.step_42?.remarks} + ; + + + 发包单位安监部门意见: + {info?.info?.step_43?.remarks} + ; + + + 属地单位意见: + {info?.info?.step_44?.remarks} + +