高处作业、吊装作业、盲板抽堵作业、动土作业、断路作业、临时用电作业

master
LiuJiaNan 2026-04-08 15:38:16 +08:00
parent 5c24d321d4
commit bcd0d4a2ee
95 changed files with 3561 additions and 150 deletions

View File

@ -1,29 +1,41 @@
### 企业端
- 动火作业/作业管理
`/eightwork/container/enterprise/hotWork/homework/list`
- 动火作业/归档管理
`/eightwork/container/enterprise/hotWork/archive/list`
- 动火作业/关闭管理
`/eightwork/container/enterprise/hotWork/forceClose/list`
- 有限空间作业/台账管理
`/eightwork/container/enterprise/confinedSpaceWork/ledger/list`
- 有限空间作业/作业管理
`/eightwork/container/enterprise/confinedSpaceWork/homework/list`
- 有限空间作业/归档管理
`/eightwork/container/enterprise/confinedSpaceWork/archive/list`
- 有限空间作业/关闭管理
`/eightwork/container/enterprise/confinedSpaceWork/forceClose/list`
- 高处作业/作业管理
`/eightwork/container/enterprise/highPlaceWork/homework/list`
- 吊装作业/作业管理
`/eightwork/container/enterprise/liftingWork/homework/list`
- 盲板抽堵作业/作业管理
`/eightwork/container/enterprise/blindBoardWork/homework/list`
- 动土作业/作业管理
`/eightwork/container/enterprise/digWork/homework/list`
- 断路作业/作业管理
`/eightwork/container/enterprise/cutWork/homework/list`
- 临时用电作业/作业管理
`/eightwork/container/enterprise/electricWork/homework/list`
### 相关方端
- 动火作业/作业管理
`/eightwork/container/stakeholder/hotWork/homework/list`
- 动火作业/归档管理
`/eightwork/container/stakeholder/hotWork/archive/list`
- 有限空间作业/作业管理
`/eightwork/container/stakeholder/confinedSpaceWork/homework/list`
- 有限空间作业/归档管理
`/eightwork/container/stakeholder/confinedSpaceWork/archive/list`
- 高处作业/作业管理
`/eightwork/container/stakeholder/highPlaceWork/homework/list`
- 吊装作业/作业管理
`/eightwork/container/stakeholder/liftingWork/homework/list`
- 盲板抽堵作业/作业管理
`/eightwork/container/stakeholder/blindBoardWork/homework/list`
- 动土作业/作业管理
`/eightwork/container/stakeholder/digWork/homework/list`
- 断路作业/作业管理
`/eightwork/container/stakeholder/cutWork/homework/list`
- 临时用电作业/作业管理
`/eightwork/container/stakeholder/electricWork/homework/list`
### 监管端
@ -31,3 +43,15 @@
`/eightwork/container/supervision/hotWork/list`
- 有限空间作业
`/eightwork/container/supervision/confinedSpaceWork/list`
- 高处作业
`/eightwork/container/supervision/highPlaceWork/list`
- 吊装作业
`/eightwork/container/supervision/liftingWork/list`
- 盲板抽堵作业
`/eightwork/container/supervision/blindBoardWork/list`
- 动土作业
`/eightwork/container/supervision/digWork/list`
- 断路作业
`/eightwork/container/supervision/cutWork/list`
- 临时用电作业
`/eightwork/container/supervision/electricWork/list`

View File

@ -0,0 +1,27 @@
import { Button, Descriptions, Modal } from "antd";
const CloseReasonModal = (props) => {
return (
<Modal
open
title="强制关闭原因"
maskClosable={false}
onCancel={props.onCancel}
footer={[
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
]}
width={600}
>
<Descriptions
bordered
column={1}
styles={{ label: { width: 200 } }}
items={[
{ label: "强制关闭原因", children: props.closeReason },
]}
/>
</Modal>
);
};
export default CloseReasonModal;

View File

@ -4,6 +4,7 @@ import { Button, Modal } from "antd";
import { useEffect, useState } from "react";
import { NS_EIGHTWORK } from "~/enumerate/namespace";
import { getFlowData } from "~/utils/flow";
import "@xyflow/react/dist/style.css";
function FlowModal(props) {
const [flowNodes, setFlowNodes] = useState([]);

View File

@ -0,0 +1,222 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Space } from "antd";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import BasicSelectTree from "zy-react-library/components/SelectTree/Basic";
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import CloseReasonModal from "~/components/CloseReasonModal";
import FlowModal from "~/components/FlowModal";
import ForceTerminationModal from "~/components/ForceTerminationModal";
import { STATUS_ENUM, WORK_TYPE_ENUM } from "~/enumerate/constant";
import { NS_EIGHTWORK } from "~/enumerate/namespace";
import useApplyDepartment from "~/utils/useApplyDepartment";
function List(props) {
const [form] = Search.useForm();
const query = useGetUrlQuery();
const { departmentTree } = useApplyDepartment(props, query);
const [eightworkType, setEightworkType] = useState([]);
const [forceTerminationModalOpen, setForceTerminationModalOpen] = useState(false);
const [flowModalOpen, setFlowModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
const [closeReason, setCloseReason] = useState("");
const [closeReasonModalOpen, setCloseReasonModalOpen] = useState(false);
const { tableProps, getData } = useTable(props["eightworkList"], {
form,
params: { eqWorkType: "blindboard_work", corpinfoId: query.corpinfoId },
transform: formData => ({
geCreateTime: formData.createTime?.[0],
leCreateTime: formData.createTime?.[1],
eqStatus: props.status || formData.eqStatus,
}),
});
const getEightworkType = async () => {
const { data } = await props["eightworkType"]({ workType: "blindboard_work" });
setEightworkType(data);
};
useEffect(() => {
getEightworkType();
}, []);
return (
<Page isShowAllAction={query.headerTitle || false} headerTitle={query.headerTitle}>
<Search
options={[
{ name: "eqCheckNo", label: "编号" },
{ name: "likeCreateName", label: "申请人" },
{ name: "createTime", label: "申请时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
{
name: "eqStatus",
label: "审核状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: STATUS_ENUM,
hidden: () => {
if (props.entrance === "supervision") {
return !!props.status;
}
return false;
},
},
{
name: "eqWorkLevel",
label: "作业类别",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: eightworkType,
itemsField: { labelKey: "taskName", valueKey: "workLevel" },
},
{ name: "eqXgfFlag", label: "作业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: WORK_TYPE_ENUM },
{
name: "inDepartmentId",
label: "申请单位",
render: <BasicSelectTree treeData={departmentTree} childrenKey="childrenList" multiple />,
},
{
name: "todo",
label: "服务单位",
render: <DepartmentSelectTree searchType="inType" params={{ enterpriseType: [1, 2] }} />,
hidden: !(props.entrance === "stakeholder"),
},
]}
form={form}
onFinish={getData}
/>
<Table
columns={[
{ title: "服务单位", dataIndex: "todo", hidden: !(props.entrance === "stakeholder") },
{ title: "编号", dataIndex: "checkNo" },
{
title: "作业类型",
dataIndex: "xgfFlag",
render: (_, record) => getLabelName({ list: WORK_TYPE_ENUM, status: record.xgfFlag }),
},
{
title: "作业类别",
dataIndex: "workLevel",
render: (_, record) => getLabelName({
list: eightworkType,
status: record.workLevel,
idKey: "workLevel",
nameKey: "taskName",
}),
},
{ title: "申请人", dataIndex: ["info", "applyUser"] },
{ title: "申请单位", dataIndex: ["info", "applyUnit"] },
{
title: "申请时间",
dataIndex: ["info", "applyTime"],
render: (_, record) => dayjs(record.info?.applyTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{ title: "作业人", dataIndex: ["info", "workUserName"] },
{
title: "作业时间",
dataIndex: ["info", "workStartTime"],
render: (_, record) => `${record.info.workStartTime || ""}-${record.info.workEndTime || ""}`,
},
{ title: "设备管道名称", dataIndex: ["info", "devicePipelineName"] },
{
title: "审核状态",
dataIndex: "status",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.status }),
},
{
title: "操作",
fixed: "right",
width: 260,
render: (_, record) => (
<Space>
<Button
type="link"
onClick={() => {
setCurrentId(record.workId);
setFlowModalOpen(true);
}}
>
流程图
</Button>
<Button
type="link"
onClick={() => {
props.history.push(`./view?id=${record.id}&workId=${record.workId}`);
}}
>
审批表详情
</Button>
{(!props.entrance && ![998, 999].includes(record.status)) && (
<Button
type="link"
danger
onClick={() => {
setCurrentId(record.id);
setForceTerminationModalOpen(true);
}}
>
强制关闭
</Button>
)}
{(record.status === 998) && (
<Button
type="link"
onClick={() => {
setCloseReason(record.info.closeReason);
setCloseReasonModalOpen(true);
}}
>
强制关闭原因
</Button>
)}
</Space>
),
},
]}
{...tableProps}
/>
{
forceTerminationModalOpen && (
<ForceTerminationModal
id={currentId}
onCancel={() => {
setForceTerminationModalOpen(false);
setCurrentId("");
}}
getData={getData}
/>
)
}
{
flowModalOpen && (
<FlowModal
id={currentId}
onCancel={() => {
setFlowModalOpen(false);
setCurrentId("");
}}
/>
)
}
{
closeReasonModalOpen && (
<CloseReasonModal
closeReason={closeReason}
onCancel={() => {
setCloseReasonModalOpen(false);
setCloseReason("");
}}
/>
)
}
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(List);

View File

@ -0,0 +1,285 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Divider, Image } from "antd";
import dayjs from "dayjs";
import { useEffect, useRef, useState } from "react";
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 { NS_EIGHTWORK } from "~/enumerate/namespace";
import "~/css/index.less";
function View(props) {
const query = useGetUrlQuery();
const contentRef = useRef(null);
const handlePrint = useReactToPrint({
contentRef,
pageStyle: `@page {
size: landscape;
margin: 0mm;
}
@media print {
body {
margin: 10px;
padding: 10px;
}
}
`,
documentTitle: "",
});
const [info, setInfo] = useState({});
const [safetyMeasures, setSafetyMeasures] = useState([]);
const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]);
const getData = async () => {
const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id });
setInfo(basicInfo);
const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId });
setSafetyMeasures(measuresLogs.filter(item => item.type === 1));
setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2));
};
useEffect(() => {
getData();
}, []);
return (
<Page
headerTitle="审批表详情"
contentPadding="0 20px 20px 20px"
extraActionButtons={(
<Button type="primary" onClick={handlePrint}>打印</Button>
)}
>
<div className="work_ticket_details" ref={contentRef}>
<table>
<thead>
<tr>
<td colSpan={7} style={{ border: "none" }}>
<Divider orientation="left">盲板抽堵安全作业票</Divider>
</td>
</tr>
<tr>
<td colSpan={7} style={{ border: "none" }}>
<span>编号</span>
<span>{info.checkNo}</span>
</td>
</tr>
</thead>
<tbody>
{props.entrance === "stakeholder" && (
<tr>
<td className="title">服务单位</td>
<td colSpan={7}>{info.xx}</td>
</tr>
)}
<tr>
<td className="title">申请单位</td>
<td colSpan={3}>{info?.info?.applyUnit}</td>
<td className="title">申请时间</td>
<td colSpan={2}>{dayjs(info?.info?.applyTime || info?.createTime).format("YYYY-MM-DD HH:mm:ss")}</td>
</tr>
<tr>
<td className="title">作业人</td>
<td colSpan={3}>{info?.info?.workUserName}</td>
<td className="title">作业类型</td>
<td colSpan={2}>{info?.info?.operationTypeName}</td>
</tr>
<tr>
<td className="title center" rowSpan={2}>设备管道名称</td>
<td className="title center" colSpan={3}>管道参数</td>
<td className="title center" colSpan={3}>盲板参数</td>
</tr>
<tr>
<td className="title center">介质</td>
<td className="title center">温度</td>
<td className="title center">压力</td>
<td className="title center">材质</td>
<td className="title center">规格</td>
<td className="title center">编号</td>
</tr>
<tr>
<td className="center">{info?.info?.devicePipelineName}</td>
<td className="center">{info?.info?.mediumName}</td>
<td className="center">{info?.info?.temperature}</td>
<td className="center">{info?.info?.pressure}</td>
<td className="center">{info?.info?.matertal}</td>
<td className="center">{info?.info?.specification}</td>
<td className="center">{info?.info?.number}</td>
</tr>
<tr>
<td className="title">作业类别</td>
<td colSpan={6}>{info?.info?.blindboardWorkTypeName}</td>
</tr>
<tr>
<td className="title">盲板抽堵位置图</td>
<td colSpan={3}>
{info?.info?.workScopeAndMethodImage
&& <Image src={getFileUrl() + info?.info?.workScopeAndMethodImage} width={50} height={50} />}
</td>
<td className="title">作业单位</td>
<td colSpan={2}>{info?.info?.step_21?.actUserDepartmentName}</td>
</tr>
<tr>
<td className="title">监护人</td>
<td colSpan={3}>
{info?.info?.step_20?.signPath
&& <Image src={getFileUrl() + info?.info?.step_20?.signPath} width={50} height={50} />}
</td>
<td className="title">作业负责人</td>
<td colSpan={2}>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</td>
</tr>
<tr>
<td className="title">关联的其他特殊作业及安全作业票编号</td>
<td colSpan={6}>
{info?.info?.linkSpecialWorks.map((item, index) => (
<div key={index}>
{`${item.workTypeName}${item.checkNo}`}
</div>
))}
</td>
</tr>
<tr>
<td className="title">风险辨识结果</td>
<td colSpan={6}>
{info?.info?.riskResults.map((item, index) => (
<div key={index}>
{item.riskResultName}
</div>
))}
</td>
</tr>
<tr>
<td className="title">实际作业开始时间</td>
<td colSpan={6}>{info?.info?.workStartTime}</td>
</tr>
<tr>
<td colSpan={7} style={{ border: "none", padding: 0 }}>
<table>
<tbody>
<tr>
<td className="center title" style={{ width: 80 }}>序号</td>
<td className="center title" style={{ width: "auto" }}>安全措施</td>
<td className="center title" style={{ width: 100 }}>是否涉及</td>
<td className="center title" style={{ width: 100 }}>确认人</td>
</tr>
{safetyMeasures.map((item, index) => (
<tr key={index}>
<td className="center">{index + 1}</td>
<td>{item.content}</td>
<td className="center">符合</td>
<td className="center">
{item.signPath && <Image src={getFileUrl() + item.signPath} width={50} height={50} />}
</td>
</tr>
))}
<tr>
<td className="center">{safetyMeasures.length + 1}</td>
<td colSpan={3}>
{
otherSafetyMeasures.map((item, index) => (
<div key={index} style={{ display: "flex", justifyContent: "space-between" }}>
<div>
<span>其它安全措施</span>
<span>{item.content}</span>
</div>
<div>
<span>编制人</span>
<span>{item.createName}</span>
</div>
</div>
))
}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td className="title">安全交底人</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_18?.signPath
&& <Image src={getFileUrl() + info?.info?.step_18?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_18?.signTime}</div>
<div>{info?.info?.step_18?.remarks}</div>
</td>
<td className="title">接受交底人</td>
<td className="right" colSpan={2}>
<div>
{info?.info?.step_19?.signPath
&& <Image src={getFileUrl() + info?.info?.step_19?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_19?.signTime}</div>
<div>{info?.info?.step_19?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">作业负责人意见</td>
<td className="right" colSpan={6}>
<div>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_21?.signTime}</div>
<div>{info?.info?.step_21?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">所在单位意见</td>
<td className="right" colSpan={6}>
<div>
{info?.info?.step_22?.signPath
&& <Image src={getFileUrl() + info?.info?.step_22?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_22?.signTime}</div>
<div>{info?.info?.step_22?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审核部门意见</td>
<td className="right" colSpan={6}>
<div>
{info?.info?.step_23?.signPath
&& <Image src={getFileUrl() + info?.info?.step_23?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_23?.signTime}</div>
<div>{info?.info?.step_23?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审批部门意见</td>
<td className="right" colSpan={6}>
<div>
{info?.info?.step_24?.signPath
&& <Image src={getFileUrl() + info?.info?.step_24?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_24?.signTime}</div>
<div>{info?.info?.step_24?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">完工验收</td>
<td className="right" colSpan={6}>
<div>
{info?.info?.step_25?.signPath
&& <Image src={getFileUrl() + info?.info?.step_25?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_25?.signTime}</div>
<div>{info?.info?.step_25?.remarks}</div>
</td>
</tr>
</tbody>
</table>
</div>
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(View);

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function BlindBoardWork(props) {
return props.children;
}
export default BlindBoardWork;

View File

@ -1,7 +0,0 @@
import ListPage from "../../Homework/List";
function List(props) {
return (<ListPage status="999" {...props} />);
}
export default List;

View File

@ -1,5 +0,0 @@
function Archive(props) {
return props.children;
}
export default Archive;

View File

@ -1,7 +0,0 @@
import ListPage from "../../Homework/List";
function List(props) {
return (<ListPage status="998" {...props} />);
}
export default List;

View File

@ -1,5 +0,0 @@
function ForceClose(props) {
return props.children;
}
export default ForceClose;

View File

@ -3,28 +3,30 @@ import { Button, Space } from "antd";
import { useState } from "react";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import BasicSelectTree from "zy-react-library/components/SelectTree/Basic";
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import CloseReasonModal from "~/components/CloseReasonModal";
import FlowModal from "~/components/FlowModal";
import ForceTerminationModal from "~/components/ForceTerminationModal";
import { STATUS_ENUM, WORK_TYPE_ENUM } from "~/enumerate/constant";
import { NS_EIGHTWORK } from "~/enumerate/namespace";
import "@xyflow/react/dist/style.css";
import useApplyDepartment from "~/utils/useApplyDepartment";
function List(props) {
// status 默认不传是作业管理999 是归档管理998 是强制关闭管理
// entrance 默认不传是企业端stakeholder 是相关方端supervision 是监督端
const [form] = Search.useForm();
const query = useGetUrlQuery();
const { departmentTree } = useApplyDepartment(props, query);
const [forceTerminationModalOpen, setForceTerminationModalOpen] = useState(false);
const [flowModalOpen, setFlowModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
const [closeReason, setCloseReason] = useState("");
const [closeReasonModalOpen, setCloseReasonModalOpen] = useState(false);
const { tableProps, getData } = useTable(props["eightworkList"], {
form,
@ -37,7 +39,7 @@ function List(props) {
});
return (
<Page isShowAllAction={false}>
<Page isShowAllAction={query.headerTitle || false} headerTitle={query.headerTitle}>
<Search
options={[
{ name: "eqCheckNo", label: "编号" },
@ -48,11 +50,20 @@ function List(props) {
label: "审核状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: STATUS_ENUM,
hidden: props.status,
hidden: () => {
if (props.entrance === "supervision") {
return !!props.status;
}
return false;
},
},
{ name: "eqXgfFlag", label: "作业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: WORK_TYPE_ENUM },
{ name: "todo", label: "有限空间名称" },
{ name: "inDepartmentId", label: "申请单位", render: <DepartmentSelectTree multiple /> },
{
name: "inDepartmentId",
label: "申请单位",
render: <BasicSelectTree treeData={departmentTree} childrenKey="childrenList" multiple />,
},
{
name: "todo",
label: "服务单位",
@ -75,8 +86,8 @@ function List(props) {
{ title: "申请人", dataIndex: ["info", "applyUser"] },
{ title: "申请单位", dataIndex: ["info", "applyUnit"] },
{ title: "申请时间", dataIndex: ["info", "applyTime"] },
// { title: "作业人", dataIndex: ["info", "step_1", "actUserName"] },
// { title: "作业单位", dataIndex: ["info", "step_1", "actUserDepartmentName"] },
{ title: "作业人", dataIndex: ["info", "workUserName"] },
{ title: "作业单位", dataIndex: ["info", "workDepartmentName"] },
{
title: "作业时间",
dataIndex: ["info", "workStartTime"],
@ -89,7 +100,6 @@ function List(props) {
dataIndex: "status",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.status }),
},
{ title: "强制关闭原因", dataIndex: ["info", "closeReason"], hidden: !(props.status === "998") },
{
title: "操作",
fixed: "right",
@ -113,7 +123,7 @@ function List(props) {
>
审批表详情
</Button>
{(!props.status && !props.entrance && ![998, 999].includes(record.status)) && (
{(!props.entrance && ![998, 999].includes(record.status)) && (
<Button
type="link"
danger
@ -125,6 +135,17 @@ function List(props) {
强制关闭
</Button>
)}
{(record.status === 998) && (
<Button
type="link"
onClick={() => {
setCloseReason(record.info.closeReason);
setCloseReasonModalOpen(true);
}}
>
强制关闭原因
</Button>
)}
</Space>
),
},
@ -154,6 +175,17 @@ function List(props) {
/>
)
}
{
closeReasonModalOpen && (
<CloseReasonModal
closeReason={closeReason}
onCancel={() => {
setCloseReasonModalOpen(false);
setCloseReason("");
}}
/>
)
}
</Page>
);
}

View File

@ -36,7 +36,11 @@ function View(props) {
const getData = async () => {
const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id });
setInfo(basicInfo);
const { data: supplementaryInfo } = await props["eightworkSupplementaryInfo"]({ eqWorkId: query.workId, pageSize: 999, pageIndex: 1 });
const { data: supplementaryInfo } = await props["eightworkSupplementaryInfo"]({
eqWorkId: query.workId,
pageSize: 999,
pageIndex: 1,
});
// setDelayedMonitoringRecord(supplementaryInfo.filter(item => item.type === "delay"));
setGasMonitoringRecord(supplementaryInfo.filter(item => item.type === "gas"));
const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId });
@ -164,7 +168,9 @@ function View(props) {
<td className="center">{index + 1}</td>
<td>{item.content}</td>
<td className="center">
{item.signPath ? <Image src={getFileUrl() + item.signPath} width={50} height={50} /> : item.createName}
{item.signPath
? <Image src={getFileUrl() + item.signPath} width={50} height={50} />
: item.createName}
</td>
</tr>
))}
@ -195,7 +201,8 @@ function View(props) {
<td className="center">{item?.details?.samplingTime}</td>
<td className="center">{item?.details?.samplingLocation}</td>
<td className="center">
{item?.details?.signImagePath && <Image src={getFileUrl() + item?.details?.signImagePath} width={50} height={50} />}
{item?.details?.signImagePath
&& <Image src={getFileUrl() + item?.details?.signImagePath} width={50} height={50} />}
</td>
</tr>
))}
@ -208,7 +215,8 @@ function View(props) {
<td className="title">作业单位负责人意见</td>
<td className="right" style={{ width: 200 }}>
<div>
{info?.info?.step_14?.signPath && <Image src={getFileUrl() + info?.info?.step_14?.signPath} width={50} height={50} />}
{info?.info?.step_14?.signPath
&& <Image src={getFileUrl() + info?.info?.step_14?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_14?.signTime}</div>
<div>{info?.info?.step_14?.remarks}</div>
@ -216,7 +224,8 @@ function View(props) {
<td className="title">管理单位发包部门意见</td>
<td className="right" style={{ width: 200 }}>
<div>
{info?.info?.step_15?.signPath && <Image src={getFileUrl() + info?.info?.step_15?.signPath} width={50} height={50} />}
{info?.info?.step_15?.signPath
&& <Image src={getFileUrl() + info?.info?.step_15?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_15?.signTime}</div>
<div>{info?.info?.step_15?.remarks}</div>
@ -224,7 +233,8 @@ function View(props) {
<td className="title">管理单位安监部门意见</td>
<td className="right" style={{ width: 200 }}>
<div>
{info?.info?.step_16?.signPath && <Image src={getFileUrl() + info?.info?.step_16?.signPath} width={50} height={50} />}
{info?.info?.step_16?.signPath
&& <Image src={getFileUrl() + info?.info?.step_16?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_16?.signTime}</div>
<div>{info?.info?.step_16?.remarks}</div>

View File

@ -0,0 +1,221 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Space } from "antd";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import BasicSelectTree from "zy-react-library/components/SelectTree/Basic";
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import CloseReasonModal from "~/components/CloseReasonModal";
import FlowModal from "~/components/FlowModal";
import ForceTerminationModal from "~/components/ForceTerminationModal";
import { STATUS_ENUM, WORK_TYPE_ENUM } from "~/enumerate/constant";
import { NS_EIGHTWORK } from "~/enumerate/namespace";
import useApplyDepartment from "~/utils/useApplyDepartment";
function List(props) {
const [form] = Search.useForm();
const query = useGetUrlQuery();
const { departmentTree } = useApplyDepartment(props, query);
const [eightworkType, setEightworkType] = useState([]);
const [forceTerminationModalOpen, setForceTerminationModalOpen] = useState(false);
const [flowModalOpen, setFlowModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
const [closeReason, setCloseReason] = useState("");
const [closeReasonModalOpen, setCloseReasonModalOpen] = useState(false);
const { tableProps, getData } = useTable(props["eightworkList"], {
form,
params: { eqWorkType: "cutroad_work", corpinfoId: query.corpinfoId },
transform: formData => ({
geCreateTime: formData.createTime?.[0],
leCreateTime: formData.createTime?.[1],
eqStatus: props.status || formData.eqStatus,
}),
});
const getEightworkType = async () => {
const { data } = await props["eightworkType"]({ workType: "cutroad_work" });
setEightworkType(data);
};
useEffect(() => {
getEightworkType();
}, []);
return (
<Page isShowAllAction={query.headerTitle || false} headerTitle={query.headerTitle}>
<Search
options={[
{ name: "eqCheckNo", label: "编号" },
{ name: "likeCreateName", label: "申请人" },
{ name: "createTime", label: "申请时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
{
name: "eqStatus",
label: "审核状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: STATUS_ENUM,
hidden: () => {
if (props.entrance === "supervision") {
return !!props.status;
}
return false;
},
},
{
name: "eqWorkLevel",
label: "作业级别",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: eightworkType,
itemsField: { labelKey: "taskName", valueKey: "workLevel" },
},
{ name: "eqXgfFlag", label: "作业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: WORK_TYPE_ENUM },
{
name: "inDepartmentId",
label: "申请单位",
render: <BasicSelectTree treeData={departmentTree} childrenKey="childrenList" multiple />,
},
{
name: "todo",
label: "服务单位",
render: <DepartmentSelectTree searchType="inType" params={{ enterpriseType: [1, 2] }} />,
hidden: !(props.entrance === "stakeholder"),
},
]}
form={form}
onFinish={getData}
/>
<Table
columns={[
{ title: "服务单位", dataIndex: "todo", hidden: !(props.entrance === "stakeholder") },
{ title: "编号", dataIndex: "checkNo" },
{
title: "作业类型",
dataIndex: "xgfFlag",
render: (_, record) => getLabelName({ list: WORK_TYPE_ENUM, status: record.xgfFlag }),
},
{
title: "作业级别",
dataIndex: "workLevel",
render: (_, record) => getLabelName({
list: eightworkType,
status: record.workLevel,
idKey: "workLevel",
nameKey: "taskName",
}),
},
{ title: "申请人", dataIndex: ["info", "applyUser"] },
{ title: "申请单位", dataIndex: ["info", "applyUnit"] },
{
title: "申请时间",
dataIndex: ["info", "applyTime"],
render: (_, record) => dayjs(record.info?.applyTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{
title: "作业时间",
dataIndex: ["info", "workStartTime"],
render: (_, record) => `${record.info.workStartTime || ""}-${record.info.workEndTime || ""}`,
},
{ title: "断路原因", dataIndex: ["info", "breakReason"] },
{
title: "审核状态",
dataIndex: "status",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.status }),
},
{
title: "操作",
fixed: "right",
width: 260,
render: (_, record) => (
<Space>
<Button
type="link"
onClick={() => {
setCurrentId(record.workId);
setFlowModalOpen(true);
}}
>
流程图
</Button>
<Button
type="link"
onClick={() => {
props.history.push(`./view?id=${record.id}&workId=${record.workId}`);
}}
>
审批表详情
</Button>
{(!props.entrance && ![998, 999].includes(record.status)) && (
<Button
type="link"
danger
onClick={() => {
setCurrentId(record.id);
setForceTerminationModalOpen(true);
}}
>
强制关闭
</Button>
)}
{(record.status === 998) && (
<Button
type="link"
onClick={() => {
setCloseReason(record.info.closeReason);
setCloseReasonModalOpen(true);
}}
>
强制关闭原因
</Button>
)}
</Space>
),
},
]}
{...tableProps}
/>
{
forceTerminationModalOpen && (
<ForceTerminationModal
id={currentId}
onCancel={() => {
setForceTerminationModalOpen(false);
setCurrentId("");
}}
getData={getData}
/>
)
}
{
flowModalOpen && (
<FlowModal
id={currentId}
onCancel={() => {
setFlowModalOpen(false);
setCurrentId("");
}}
/>
)
}
{
closeReasonModalOpen && (
<CloseReasonModal
closeReason={closeReason}
onCancel={() => {
setCloseReasonModalOpen(false);
setCloseReason("");
}}
/>
)
}
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(List);

View File

@ -0,0 +1,269 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Divider, Image } from "antd";
import dayjs from "dayjs";
import { useEffect, useRef, useState } from "react";
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 { NS_EIGHTWORK } from "~/enumerate/namespace";
import "~/css/index.less";
function View(props) {
const query = useGetUrlQuery();
const contentRef = useRef(null);
const handlePrint = useReactToPrint({
contentRef,
pageStyle: `@page {
size: landscape;
margin: 0mm;
}
@media print {
body {
margin: 10px;
padding: 10px;
}
}
`,
documentTitle: "",
});
const [info, setInfo] = useState({});
const [safetyMeasures, setSafetyMeasures] = useState([]);
const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]);
const getData = async () => {
const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id });
setInfo(basicInfo);
const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId });
setSafetyMeasures(measuresLogs.filter(item => item.type === 1));
setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2));
};
useEffect(() => {
getData();
}, []);
return (
<Page
headerTitle="审批表详情"
contentPadding="0 20px 20px 20px"
extraActionButtons={(
<Button type="primary" onClick={handlePrint}>打印</Button>
)}
>
<div className="work_ticket_details" ref={contentRef}>
<table>
<thead>
<tr>
<td colSpan={4} style={{ border: "none" }}>
<Divider orientation="left">断路安全作业票</Divider>
</td>
</tr>
<tr>
<td colSpan={4} style={{ border: "none" }}>
<span>编号</span>
<span>{info.checkNo}</span>
</td>
</tr>
</thead>
<tbody>
{props.entrance === "stakeholder" && (
<tr>
<td className="title">服务单位</td>
<td colSpan={3}>{info.xx}</td>
</tr>
)}
<tr>
<td className="title">申请单位</td>
<td>{info?.info?.applyUnit}</td>
<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?.operationTypeName}</td>
</tr>
<tr>
<td className="title">涉及相关单位部门</td>
<td>{info?.info?.relatedUnit}</td>
<td className="title">作业级别</td>
<td>{info?.info?.workLevelName}</td>
</tr>
<tr>
<td className="title">断路原因</td>
<td>{info?.info?.breakReason}</td>
<td className="title">断路地段示意图</td>
<td>
{info?.info?.workScopeAndMethodImage
&& <Image src={getFileUrl() + info?.info?.workScopeAndMethodImage} width={50} height={50} />}
</td>
</tr>
<tr>
<td className="title">断路地段示意图相关说明</td>
<td>{info?.info?.workScopeAndMethod}</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 colSpan={3}>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</td>
</tr>
<tr>
<td className="title">关联的其他特殊作业及安全作业票编号</td>
<td colSpan={3}>
{info?.info?.linkSpecialWorks.map((item, index) => (
<div key={index}>
{`${item.workTypeName}${item.checkNo}`}
</div>
))}
</td>
</tr>
<tr>
<td className="title">风险辨识结果</td>
<td colSpan={3}>
{info?.info?.riskResults.map((item, index) => (
<div key={index}>
{item.riskResultName}
</div>
))}
</td>
</tr>
<tr>
<td className="title">实际作业开始时间</td>
<td colSpan={3}>{info?.info?.workStartTime}</td>
</tr>
<tr>
<td colSpan={4} style={{ border: "none", padding: 0 }}>
<table>
<tbody>
<tr>
<td className="center title" style={{ width: 80 }}>序号</td>
<td className="center title" style={{ width: "auto" }}>安全措施</td>
<td className="center title" style={{ width: 100 }}>是否涉及</td>
<td className="center title" style={{ width: 100 }}>确认人</td>
</tr>
{safetyMeasures.map((item, index) => (
<tr key={index}>
<td className="center">{index + 1}</td>
<td>{item.content}</td>
<td className="center">符合</td>
<td className="center">
{item.signPath && <Image src={getFileUrl() + item.signPath} width={50} height={50} />}
</td>
</tr>
))}
<tr>
<td className="center">{safetyMeasures.length + 1}</td>
<td colSpan={3}>
{
otherSafetyMeasures.map((item, index) => (
<div key={index} style={{ display: "flex", justifyContent: "space-between" }}>
<div>
<span>其它安全措施</span>
<span>{item.content}</span>
</div>
<div>
<span>编制人</span>
<span>{item.createName}</span>
</div>
</div>
))
}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td className="title">安全交底人</td>
<td className="right">
<div>
{info?.info?.step_18?.signPath
&& <Image src={getFileUrl() + info?.info?.step_18?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_18?.signTime}</div>
<div>{info?.info?.step_18?.remarks}</div>
</td>
<td className="title">接受交底人</td>
<td className="right">
<div>
{info?.info?.step_19?.signPath
&& <Image src={getFileUrl() + info?.info?.step_19?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_19?.signTime}</div>
<div>{info?.info?.step_19?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">作业负责人意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_21?.signTime}</div>
<div>{info?.info?.step_21?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">所在单位意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_22?.signPath
&& <Image src={getFileUrl() + info?.info?.step_22?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_22?.signTime}</div>
<div>{info?.info?.step_22?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审核部门意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_23?.signPath
&& <Image src={getFileUrl() + info?.info?.step_23?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_23?.signTime}</div>
<div>{info?.info?.step_23?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审批部门意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_24?.signPath
&& <Image src={getFileUrl() + info?.info?.step_24?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_24?.signTime}</div>
<div>{info?.info?.step_24?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">完工验收</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_25?.signPath
&& <Image src={getFileUrl() + info?.info?.step_25?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_25?.signTime}</div>
<div>{info?.info?.step_25?.remarks}</div>
</td>
</tr>
</tbody>
</table>
</div>
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(View);

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function CutWork(props) {
return props.children;
}
export default CutWork;

View File

@ -0,0 +1,221 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Space } from "antd";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import BasicSelectTree from "zy-react-library/components/SelectTree/Basic";
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import CloseReasonModal from "~/components/CloseReasonModal";
import FlowModal from "~/components/FlowModal";
import ForceTerminationModal from "~/components/ForceTerminationModal";
import { STATUS_ENUM, WORK_TYPE_ENUM } from "~/enumerate/constant";
import { NS_EIGHTWORK } from "~/enumerate/namespace";
import useApplyDepartment from "~/utils/useApplyDepartment";
function List(props) {
const [form] = Search.useForm();
const query = useGetUrlQuery();
const { departmentTree } = useApplyDepartment(props, query);
const [eightworkType, setEightworkType] = useState([]);
const [forceTerminationModalOpen, setForceTerminationModalOpen] = useState(false);
const [flowModalOpen, setFlowModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
const [closeReason, setCloseReason] = useState("");
const [closeReasonModalOpen, setCloseReasonModalOpen] = useState(false);
const { tableProps, getData } = useTable(props["eightworkList"], {
form,
params: { eqWorkType: "breakground_work", corpinfoId: query.corpinfoId },
transform: formData => ({
geCreateTime: formData.createTime?.[0],
leCreateTime: formData.createTime?.[1],
eqStatus: props.status || formData.eqStatus,
}),
});
const getEightworkType = async () => {
const { data } = await props["eightworkType"]({ workType: "breakground_work" });
setEightworkType(data);
};
useEffect(() => {
getEightworkType();
}, []);
return (
<Page isShowAllAction={query.headerTitle || false} headerTitle={query.headerTitle}>
<Search
options={[
{ name: "eqCheckNo", label: "编号" },
{ name: "likeCreateName", label: "申请人" },
{ name: "createTime", label: "申请时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
{
name: "eqStatus",
label: "审核状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: STATUS_ENUM,
hidden: () => {
if (props.entrance === "supervision") {
return !!props.status;
}
return false;
},
},
{
name: "eqWorkLevel",
label: "作业级别",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: eightworkType,
itemsField: { labelKey: "taskName", valueKey: "workLevel" },
},
{ name: "eqXgfFlag", label: "作业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: WORK_TYPE_ENUM },
{
name: "inDepartmentId",
label: "申请单位",
render: <BasicSelectTree treeData={departmentTree} childrenKey="childrenList" multiple />,
},
{
name: "todo",
label: "服务单位",
render: <DepartmentSelectTree searchType="inType" params={{ enterpriseType: [1, 2] }} />,
hidden: !(props.entrance === "stakeholder"),
},
]}
form={form}
onFinish={getData}
/>
<Table
columns={[
{ title: "服务单位", dataIndex: "todo", hidden: !(props.entrance === "stakeholder") },
{ title: "编号", dataIndex: "checkNo" },
{
title: "作业类型",
dataIndex: "xgfFlag",
render: (_, record) => getLabelName({ list: WORK_TYPE_ENUM, status: record.xgfFlag }),
},
{
title: "作业级别",
dataIndex: "workLevel",
render: (_, record) => getLabelName({
list: eightworkType,
status: record.workLevel,
idKey: "workLevel",
nameKey: "taskName",
}),
},
{ title: "申请人", dataIndex: ["info", "applyUser"] },
{ title: "申请单位", dataIndex: ["info", "applyUnit"] },
{
title: "申请时间",
dataIndex: ["info", "applyTime"],
render: (_, record) => dayjs(record.info?.applyTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{
title: "作业时间",
dataIndex: ["info", "workStartTime"],
render: (_, record) => `${record.info.workStartTime || ""}-${record.info.workEndTime || ""}`,
},
{ title: "作业内容", dataIndex: ["info", "workContent"] },
{
title: "审核状态",
dataIndex: "status",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.status }),
},
{
title: "操作",
fixed: "right",
width: 260,
render: (_, record) => (
<Space>
<Button
type="link"
onClick={() => {
setCurrentId(record.workId);
setFlowModalOpen(true);
}}
>
流程图
</Button>
<Button
type="link"
onClick={() => {
props.history.push(`./view?id=${record.id}&workId=${record.workId}`);
}}
>
审批表详情
</Button>
{(!props.entrance && ![998, 999].includes(record.status)) && (
<Button
type="link"
danger
onClick={() => {
setCurrentId(record.id);
setForceTerminationModalOpen(true);
}}
>
强制关闭
</Button>
)}
{(record.status === 998) && (
<Button
type="link"
onClick={() => {
setCloseReason(record.info.closeReason);
setCloseReasonModalOpen(true);
}}
>
强制关闭原因
</Button>
)}
</Space>
),
},
]}
{...tableProps}
/>
{
forceTerminationModalOpen && (
<ForceTerminationModal
id={currentId}
onCancel={() => {
setForceTerminationModalOpen(false);
setCurrentId("");
}}
getData={getData}
/>
)
}
{
flowModalOpen && (
<FlowModal
id={currentId}
onCancel={() => {
setFlowModalOpen(false);
setCurrentId("");
}}
/>
)
}
{
closeReasonModalOpen && (
<CloseReasonModal
closeReason={closeReason}
onCancel={() => {
setCloseReasonModalOpen(false);
setCloseReason("");
}}
/>
)
}
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(List);

View File

@ -0,0 +1,269 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Divider, Image } from "antd";
import dayjs from "dayjs";
import { useEffect, useRef, useState } from "react";
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 { NS_EIGHTWORK } from "~/enumerate/namespace";
import "~/css/index.less";
function View(props) {
const query = useGetUrlQuery();
const contentRef = useRef(null);
const handlePrint = useReactToPrint({
contentRef,
pageStyle: `@page {
size: landscape;
margin: 0mm;
}
@media print {
body {
margin: 10px;
padding: 10px;
}
}
`,
documentTitle: "",
});
const [info, setInfo] = useState({});
const [safetyMeasures, setSafetyMeasures] = useState([]);
const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]);
const getData = async () => {
const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id });
setInfo(basicInfo);
const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId });
setSafetyMeasures(measuresLogs.filter(item => item.type === 1));
setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2));
};
useEffect(() => {
getData();
}, []);
return (
<Page
headerTitle="审批表详情"
contentPadding="0 20px 20px 20px"
extraActionButtons={(
<Button type="primary" onClick={handlePrint}>打印</Button>
)}
>
<div className="work_ticket_details" ref={contentRef}>
<table>
<thead>
<tr>
<td colSpan={4} style={{ border: "none" }}>
<Divider orientation="left">动土安全作业票</Divider>
</td>
</tr>
<tr>
<td colSpan={4} style={{ border: "none" }}>
<span>编号</span>
<span>{info.checkNo}</span>
</td>
</tr>
</thead>
<tbody>
{props.entrance === "stakeholder" && (
<tr>
<td className="title">服务单位</td>
<td colSpan={3}>{info.xx}</td>
</tr>
)}
<tr>
<td className="title">申请单位</td>
<td>{info?.info?.applyUnit}</td>
<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?.operationTypeName}</td>
</tr>
<tr>
<td className="title">作业内容</td>
<td>{info?.info?.workContent}</td>
<td className="title">作业级别</td>
<td>{info?.info?.workLevelName}</td>
</tr>
<tr>
<td className="title">作业内容范围方式</td>
<td>{info?.info?.workScopeAndMethod}</td>
<td className="title">作业内容范围方式简图</td>
<td>
{info?.info?.workScopeAndMethodImage
&& <Image src={getFileUrl() + info?.info?.workScopeAndMethodImage} width={50} height={50} />}
</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 colSpan={3}>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</td>
</tr>
<tr>
<td className="title">关联的其他特殊作业及安全作业票编号</td>
<td colSpan={3}>
{info?.info?.linkSpecialWorks.map((item, index) => (
<div key={index}>
{`${item.workTypeName}${item.checkNo}`}
</div>
))}
</td>
</tr>
<tr>
<td className="title">风险辨识结果</td>
<td colSpan={3}>
{info?.info?.riskResults.map((item, index) => (
<div key={index}>
{item.riskResultName}
</div>
))}
</td>
</tr>
<tr>
<td className="title">实际作业开始时间</td>
<td colSpan={3}>{info?.info?.workStartTime}</td>
</tr>
<tr>
<td colSpan={4} style={{ border: "none", padding: 0 }}>
<table>
<tbody>
<tr>
<td className="center title" style={{ width: 80 }}>序号</td>
<td className="center title" style={{ width: "auto" }}>安全措施</td>
<td className="center title" style={{ width: 100 }}>是否涉及</td>
<td className="center title" style={{ width: 100 }}>确认人</td>
</tr>
{safetyMeasures.map((item, index) => (
<tr key={index}>
<td className="center">{index + 1}</td>
<td>{item.content}</td>
<td className="center">符合</td>
<td className="center">
{item.signPath && <Image src={getFileUrl() + item.signPath} width={50} height={50} />}
</td>
</tr>
))}
<tr>
<td className="center">{safetyMeasures.length + 1}</td>
<td colSpan={3}>
{
otherSafetyMeasures.map((item, index) => (
<div key={index} style={{ display: "flex", justifyContent: "space-between" }}>
<div>
<span>其它安全措施</span>
<span>{item.content}</span>
</div>
<div>
<span>编制人</span>
<span>{item.createName}</span>
</div>
</div>
))
}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td className="title">安全交底人</td>
<td className="right">
<div>
{info?.info?.step_18?.signPath
&& <Image src={getFileUrl() + info?.info?.step_18?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_18?.signTime}</div>
<div>{info?.info?.step_18?.remarks}</div>
</td>
<td className="title">接受交底人</td>
<td className="right">
<div>
{info?.info?.step_19?.signPath
&& <Image src={getFileUrl() + info?.info?.step_19?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_19?.signTime}</div>
<div>{info?.info?.step_19?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">作业负责人意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_21?.signTime}</div>
<div>{info?.info?.step_21?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">所在单位意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_22?.signPath
&& <Image src={getFileUrl() + info?.info?.step_22?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_22?.signTime}</div>
<div>{info?.info?.step_22?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审核部门意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_23?.signPath
&& <Image src={getFileUrl() + info?.info?.step_23?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_23?.signTime}</div>
<div>{info?.info?.step_23?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审批部门意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_24?.signPath
&& <Image src={getFileUrl() + info?.info?.step_24?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_24?.signTime}</div>
<div>{info?.info?.step_24?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">完工验收</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_25?.signPath
&& <Image src={getFileUrl() + info?.info?.step_25?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_25?.signTime}</div>
<div>{info?.info?.step_25?.remarks}</div>
</td>
</tr>
</tbody>
</table>
</div>
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(View);

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function DigWork(props) {
return props.children;
}
export default DigWork;

View File

@ -0,0 +1,221 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Space } from "antd";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import BasicSelectTree from "zy-react-library/components/SelectTree/Basic";
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import CloseReasonModal from "~/components/CloseReasonModal";
import FlowModal from "~/components/FlowModal";
import ForceTerminationModal from "~/components/ForceTerminationModal";
import { STATUS_ENUM, WORK_TYPE_ENUM } from "~/enumerate/constant";
import { NS_EIGHTWORK } from "~/enumerate/namespace";
import useApplyDepartment from "~/utils/useApplyDepartment";
function List(props) {
const [form] = Search.useForm();
const query = useGetUrlQuery();
const { departmentTree } = useApplyDepartment(props, query);
const [eightworkType, setEightworkType] = useState([]);
const [forceTerminationModalOpen, setForceTerminationModalOpen] = useState(false);
const [flowModalOpen, setFlowModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
const [closeReason, setCloseReason] = useState("");
const [closeReasonModalOpen, setCloseReasonModalOpen] = useState(false);
const { tableProps, getData } = useTable(props["eightworkList"], {
form,
params: { eqWorkType: "electricity_work", corpinfoId: query.corpinfoId },
transform: formData => ({
geCreateTime: formData.createTime?.[0],
leCreateTime: formData.createTime?.[1],
eqStatus: props.status || formData.eqStatus,
}),
});
const getEightworkType = async () => {
const { data } = await props["eightworkType"]({ workType: "electricity_work" });
setEightworkType(data);
};
useEffect(() => {
getEightworkType();
}, []);
return (
<Page isShowAllAction={query.headerTitle || false} headerTitle={query.headerTitle}>
<Search
options={[
{ name: "eqCheckNo", label: "编号" },
{ name: "likeCreateName", label: "申请人" },
{ name: "createTime", label: "申请时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
{
name: "eqStatus",
label: "审核状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: STATUS_ENUM,
hidden: () => {
if (props.entrance === "supervision") {
return !!props.status;
}
return false;
},
},
{
name: "eqWorkLevel",
label: "作业级别",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: eightworkType,
itemsField: { labelKey: "taskName", valueKey: "workLevel" },
},
{ name: "eqXgfFlag", label: "作业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: WORK_TYPE_ENUM },
{
name: "inDepartmentId",
label: "申请单位",
render: <BasicSelectTree treeData={departmentTree} childrenKey="childrenList" multiple />,
},
{
name: "todo",
label: "服务单位",
render: <DepartmentSelectTree searchType="inType" params={{ enterpriseType: [1, 2] }} />,
hidden: !(props.entrance === "stakeholder"),
},
]}
form={form}
onFinish={getData}
/>
<Table
columns={[
{ title: "服务单位", dataIndex: "todo", hidden: !(props.entrance === "stakeholder") },
{ title: "编号", dataIndex: "checkNo" },
{
title: "作业类型",
dataIndex: "xgfFlag",
render: (_, record) => getLabelName({ list: WORK_TYPE_ENUM, status: record.xgfFlag }),
},
{
title: "作业级别",
dataIndex: "workLevel",
render: (_, record) => getLabelName({
list: eightworkType,
status: record.workLevel,
idKey: "workLevel",
nameKey: "taskName",
}),
},
{ title: "申请人", dataIndex: ["info", "applyUser"] },
{ title: "申请单位", dataIndex: ["info", "applyUnit"] },
{
title: "申请时间",
dataIndex: ["info", "applyTime"],
render: (_, record) => dayjs(record.info?.applyTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{
title: "作业时间",
dataIndex: ["info", "workStartTime"],
render: (_, record) => `${record.info.workStartTime || ""}-${record.info.workEndTime || ""}`,
},
{ title: "用电人", dataIndex: ["info", "electricUser"] },
{
title: "审核状态",
dataIndex: "status",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.status }),
},
{
title: "操作",
fixed: "right",
width: 260,
render: (_, record) => (
<Space>
<Button
type="link"
onClick={() => {
setCurrentId(record.workId);
setFlowModalOpen(true);
}}
>
流程图
</Button>
<Button
type="link"
onClick={() => {
props.history.push(`./view?id=${record.id}&workId=${record.workId}`);
}}
>
审批表详情
</Button>
{(!props.entrance && ![998, 999].includes(record.status)) && (
<Button
type="link"
danger
onClick={() => {
setCurrentId(record.id);
setForceTerminationModalOpen(true);
}}
>
强制关闭
</Button>
)}
{(record.status === 998) && (
<Button
type="link"
onClick={() => {
setCloseReason(record.info.closeReason);
setCloseReasonModalOpen(true);
}}
>
强制关闭原因
</Button>
)}
</Space>
),
},
]}
{...tableProps}
/>
{
forceTerminationModalOpen && (
<ForceTerminationModal
id={currentId}
onCancel={() => {
setForceTerminationModalOpen(false);
setCurrentId("");
}}
getData={getData}
/>
)
}
{
flowModalOpen && (
<FlowModal
id={currentId}
onCancel={() => {
setFlowModalOpen(false);
setCurrentId("");
}}
/>
)
}
{
closeReasonModalOpen && (
<CloseReasonModal
closeReason={closeReason}
onCancel={() => {
setCloseReasonModalOpen(false);
setCloseReason("");
}}
/>
)
}
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(List);

View File

@ -0,0 +1,274 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Divider, Image } from "antd";
import dayjs from "dayjs";
import { useEffect, useRef, useState } from "react";
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 { NS_EIGHTWORK } from "~/enumerate/namespace";
import "~/css/index.less";
function View(props) {
const query = useGetUrlQuery();
const contentRef = useRef(null);
const handlePrint = useReactToPrint({
contentRef,
pageStyle: `@page {
size: landscape;
margin: 0mm;
}
@media print {
body {
margin: 10px;
padding: 10px;
}
}
`,
documentTitle: "",
});
const [info, setInfo] = useState({});
const [safetyMeasures, setSafetyMeasures] = useState([]);
const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]);
const getData = async () => {
const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id });
setInfo(basicInfo);
const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId });
setSafetyMeasures(measuresLogs.filter(item => item.type === 1));
setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2));
};
useEffect(() => {
getData();
}, []);
return (
<Page
headerTitle="审批表详情"
contentPadding="0 20px 20px 20px"
extraActionButtons={(
<Button type="primary" onClick={handlePrint}>打印</Button>
)}
>
<div className="work_ticket_details" ref={contentRef}>
<table>
<thead>
<tr>
<td colSpan={4} style={{ border: "none" }}>
<Divider orientation="left">临时用电安全作业票</Divider>
</td>
</tr>
<tr>
<td colSpan={4} style={{ border: "none" }}>
<span>编号</span>
<span>{info.checkNo}</span>
</td>
</tr>
</thead>
<tbody>
{props.entrance === "stakeholder" && (
<tr>
<td className="title">服务单位</td>
<td colSpan={3}>{info.xx}</td>
</tr>
)}
<tr>
<td className="title">申请单位</td>
<td>{info?.info?.applyUnit}</td>
<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?.operationTypeName}</td>
</tr>
<tr>
<td className="title">作业人电工证号</td>
<td>{info?.info?.electricNumber}</td>
<td className="title">作业级别</td>
<td>{info?.info?.workLevelName}</td>
</tr>
<tr>
<td className="title">电源接入点及许可用电功率</td>
<td>{info?.info?.pointPower}</td>
<td className="title">用电设备名称及额定功率</td>
<td>{info?.info?.equipmentNamePower}</td>
</tr>
<tr>
<td className="title">工作电压</td>
<td>{info?.info?.workVoltage}</td>
<td className="title">用电人</td>
<td>{info?.info?.electricUser}</td>
</tr>
<tr>
<td className="title">负责人电工号</td>
<td>{info?.info?.electricUserNo}</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 colSpan={3}>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</td>
</tr>
<tr>
<td className="title">关联的其他特殊作业及安全作业票编号</td>
<td colSpan={3}>
{info?.info?.linkSpecialWorks.map((item, index) => (
<div key={index}>
{`${item.workTypeName}${item.checkNo}`}
</div>
))}
</td>
</tr>
<tr>
<td className="title">风险辨识结果</td>
<td colSpan={3}>
{info?.info?.riskResults.map((item, index) => (
<div key={index}>
{item.riskResultName}
</div>
))}
</td>
</tr>
<tr>
<td className="title">实际作业开始时间</td>
<td colSpan={3}>{info?.info?.workStartTime}</td>
</tr>
<tr>
<td colSpan={4} style={{ border: "none", padding: 0 }}>
<table>
<tbody>
<tr>
<td className="center title" style={{ width: 80 }}>序号</td>
<td className="center title" style={{ width: "auto" }}>安全措施</td>
<td className="center title" style={{ width: 100 }}>是否涉及</td>
<td className="center title" style={{ width: 100 }}>确认人</td>
</tr>
{safetyMeasures.map((item, index) => (
<tr key={index}>
<td className="center">{index + 1}</td>
<td>{item.content}</td>
<td className="center">符合</td>
<td className="center">
{item.signPath && <Image src={getFileUrl() + item.signPath} width={50} height={50} />}
</td>
</tr>
))}
<tr>
<td className="center">{safetyMeasures.length + 1}</td>
<td colSpan={3}>
{
otherSafetyMeasures.map((item, index) => (
<div key={index} style={{ display: "flex", justifyContent: "space-between" }}>
<div>
<span>其它安全措施</span>
<span>{item.content}</span>
</div>
<div>
<span>编制人</span>
<span>{item.createName}</span>
</div>
</div>
))
}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td className="title">安全交底人</td>
<td className="right">
<div>
{info?.info?.step_18?.signPath
&& <Image src={getFileUrl() + info?.info?.step_18?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_18?.signTime}</div>
<div>{info?.info?.step_18?.remarks}</div>
</td>
<td className="title">接受交底人</td>
<td className="right">
<div>
{info?.info?.step_19?.signPath
&& <Image src={getFileUrl() + info?.info?.step_19?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_19?.signTime}</div>
<div>{info?.info?.step_19?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">作业负责人意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_21?.signTime}</div>
<div>{info?.info?.step_21?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">所在单位意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_22?.signPath
&& <Image src={getFileUrl() + info?.info?.step_22?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_22?.signTime}</div>
<div>{info?.info?.step_22?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审核部门意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_23?.signPath
&& <Image src={getFileUrl() + info?.info?.step_23?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_23?.signTime}</div>
<div>{info?.info?.step_23?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审批部门意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_24?.signPath
&& <Image src={getFileUrl() + info?.info?.step_24?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_24?.signTime}</div>
<div>{info?.info?.step_24?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">完工验收</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_25?.signPath
&& <Image src={getFileUrl() + info?.info?.step_25?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_25?.signTime}</div>
<div>{info?.info?.step_25?.remarks}</div>
</td>
</tr>
</tbody>
</table>
</div>
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(View);

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function ElectricWork(props) {
return props.children;
}
export default ElectricWork;

View File

@ -0,0 +1,222 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Space } from "antd";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import BasicSelectTree from "zy-react-library/components/SelectTree/Basic";
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import CloseReasonModal from "~/components/CloseReasonModal";
import FlowModal from "~/components/FlowModal";
import ForceTerminationModal from "~/components/ForceTerminationModal";
import { STATUS_ENUM, WORK_TYPE_ENUM } from "~/enumerate/constant";
import { NS_EIGHTWORK } from "~/enumerate/namespace";
import useApplyDepartment from "~/utils/useApplyDepartment";
function List(props) {
const [form] = Search.useForm();
const query = useGetUrlQuery();
const { departmentTree } = useApplyDepartment(props, query);
const [eightworkType, setEightworkType] = useState([]);
const [forceTerminationModalOpen, setForceTerminationModalOpen] = useState(false);
const [flowModalOpen, setFlowModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
const [closeReason, setCloseReason] = useState("");
const [closeReasonModalOpen, setCloseReasonModalOpen] = useState(false);
const { tableProps, getData } = useTable(props["eightworkList"], {
form,
params: { eqWorkType: "high_work", corpinfoId: query.corpinfoId },
transform: formData => ({
geCreateTime: formData.createTime?.[0],
leCreateTime: formData.createTime?.[1],
eqStatus: props.status || formData.eqStatus,
}),
});
const getEightworkType = async () => {
const { data } = await props["eightworkType"]({ workType: "high_work" });
setEightworkType(data);
};
useEffect(() => {
getEightworkType();
}, []);
return (
<Page isShowAllAction={query.headerTitle || false} headerTitle={query.headerTitle}>
<Search
options={[
{ name: "eqCheckNo", label: "编号" },
{ name: "likeCreateName", label: "申请人" },
{ name: "createTime", label: "申请时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
{
name: "eqStatus",
label: "审核状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: STATUS_ENUM,
hidden: () => {
if (props.entrance === "supervision") {
return !!props.status;
}
return false;
},
},
{
name: "eqWorkLevel",
label: "作业级别",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: eightworkType,
itemsField: { labelKey: "taskName", valueKey: "workLevel" },
},
{ name: "eqXgfFlag", label: "作业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: WORK_TYPE_ENUM },
{
name: "inDepartmentId",
label: "申请单位",
render: <BasicSelectTree treeData={departmentTree} childrenKey="childrenList" multiple />,
},
{
name: "todo",
label: "服务单位",
render: <DepartmentSelectTree searchType="inType" params={{ enterpriseType: [1, 2] }} />,
hidden: !(props.entrance === "stakeholder"),
},
]}
form={form}
onFinish={getData}
/>
<Table
columns={[
{ title: "服务单位", dataIndex: "todo", hidden: !(props.entrance === "stakeholder") },
{ title: "编号", dataIndex: "checkNo" },
{
title: "作业类型",
dataIndex: "xgfFlag",
render: (_, record) => getLabelName({ list: WORK_TYPE_ENUM, status: record.xgfFlag }),
},
{
title: "作业级别",
dataIndex: "workLevel",
render: (_, record) => getLabelName({
list: eightworkType,
status: record.workLevel,
idKey: "workLevel",
nameKey: "taskName",
}),
},
{ title: "申请人", dataIndex: ["info", "applyUser"] },
{ title: "申请单位", dataIndex: ["info", "applyUnit"] },
{
title: "申请时间",
dataIndex: ["info", "applyTime"],
render: (_, record) => dayjs(record.info?.applyTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{ title: "作业人", dataIndex: ["info", "workUserName"] },
{
title: "作业时间",
dataIndex: ["info", "workStartTime"],
render: (_, record) => `${record.info.workStartTime || ""}-${record.info.workEndTime || ""}`,
},
{ title: "作业内容", dataIndex: ["info", "workContent"] },
{
title: "审核状态",
dataIndex: "status",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.status }),
},
{
title: "操作",
fixed: "right",
width: 260,
render: (_, record) => (
<Space>
<Button
type="link"
onClick={() => {
setCurrentId(record.workId);
setFlowModalOpen(true);
}}
>
流程图
</Button>
<Button
type="link"
onClick={() => {
props.history.push(`./view?id=${record.id}&workId=${record.workId}`);
}}
>
审批表详情
</Button>
{(!props.entrance && ![998, 999].includes(record.status)) && (
<Button
type="link"
danger
onClick={() => {
setCurrentId(record.id);
setForceTerminationModalOpen(true);
}}
>
强制关闭
</Button>
)}
{(record.status === 998) && (
<Button
type="link"
onClick={() => {
setCloseReason(record.info.closeReason);
setCloseReasonModalOpen(true);
}}
>
强制关闭原因
</Button>
)}
</Space>
),
},
]}
{...tableProps}
/>
{
forceTerminationModalOpen && (
<ForceTerminationModal
id={currentId}
onCancel={() => {
setForceTerminationModalOpen(false);
setCurrentId("");
}}
getData={getData}
/>
)
}
{
flowModalOpen && (
<FlowModal
id={currentId}
onCancel={() => {
setFlowModalOpen(false);
setCurrentId("");
}}
/>
)
}
{
closeReasonModalOpen && (
<CloseReasonModal
closeReason={closeReason}
onCancel={() => {
setCloseReasonModalOpen(false);
setCloseReason("");
}}
/>
)
}
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(List);

View File

@ -0,0 +1,266 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Divider, Image } from "antd";
import dayjs from "dayjs";
import { useEffect, useRef, useState } from "react";
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 { NS_EIGHTWORK } from "~/enumerate/namespace";
import "~/css/index.less";
function View(props) {
const query = useGetUrlQuery();
const contentRef = useRef(null);
const handlePrint = useReactToPrint({
contentRef,
pageStyle: `@page {
size: landscape;
margin: 0mm;
}
@media print {
body {
margin: 10px;
padding: 10px;
}
}
`,
documentTitle: "",
});
const [info, setInfo] = useState({});
const [safetyMeasures, setSafetyMeasures] = useState([]);
const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]);
const getData = async () => {
const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id });
setInfo(basicInfo);
const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId });
setSafetyMeasures(measuresLogs.filter(item => item.type === 1));
setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2));
};
useEffect(() => {
getData();
}, []);
return (
<Page
headerTitle="审批表详情"
contentPadding="0 20px 20px 20px"
extraActionButtons={(
<Button type="primary" onClick={handlePrint}>打印</Button>
)}
>
<div className="work_ticket_details" ref={contentRef}>
<table>
<thead>
<tr>
<td colSpan={4} style={{ border: "none" }}>
<Divider orientation="left">高处安全作业票</Divider>
</td>
</tr>
<tr>
<td colSpan={4} style={{ border: "none" }}>
<span>编号</span>
<span>{info.checkNo}</span>
</td>
</tr>
</thead>
<tbody>
{props.entrance === "stakeholder" && (
<tr>
<td className="title">服务单位</td>
<td colSpan={3}>{info.xx}</td>
</tr>
)}
<tr>
<td className="title">申请单位</td>
<td>{info?.info?.applyUnit}</td>
<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?.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>
</tr>
<tr>
<td className="title">关联的其他特殊作业及安全作业票编号</td>
<td colSpan={3}>
{info?.info?.linkSpecialWorks.map((item, index) => (
<div key={index}>
{`${item.workTypeName}${item.checkNo}`}
</div>
))}
</td>
</tr>
<tr>
<td className="title">风险辨识结果</td>
<td colSpan={3}>
{info?.info?.riskResults.map((item, index) => (
<div key={index}>
{item.riskResultName}
</div>
))}
</td>
</tr>
<tr>
<td className="title">作业实施时间</td>
<td colSpan={3}>{`${info?.info?.workStartTime}${info?.info?.workEndTime}`}</td>
</tr>
<tr>
<td colSpan={4} style={{ border: "none", padding: 0 }}>
<table>
<tbody>
<tr>
<td className="center title" style={{ width: 80 }}>序号</td>
<td className="center title" style={{ width: "auto" }}>安全措施</td>
<td className="center title" style={{ width: 100 }}>是否涉及</td>
<td className="center title" style={{ width: 100 }}>确认人</td>
</tr>
{safetyMeasures.map((item, index) => (
<tr key={index}>
<td className="center">{index + 1}</td>
<td>{item.content}</td>
<td className="center">符合</td>
<td className="center">
{item.signPath && <Image src={getFileUrl() + item.signPath} width={50} height={50} />}
</td>
</tr>
))}
<tr>
<td className="center">{safetyMeasures.length + 1}</td>
<td colSpan={3}>
{
otherSafetyMeasures.map((item, index) => (
<div key={index} style={{ display: "flex", justifyContent: "space-between" }}>
<div>
<span>其它安全措施</span>
<span>{item.content}</span>
</div>
<div>
<span>编制人</span>
<span>{item.createName}</span>
</div>
</div>
))
}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td className="title">安全交底人</td>
<td className="right">
<div>
{info?.info?.step_18?.signPath
&& <Image src={getFileUrl() + info?.info?.step_18?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_18?.signTime}</div>
<div>{info?.info?.step_18?.remarks}</div>
</td>
<td className="title">接受交底人</td>
<td className="right">
<div>
{info?.info?.step_19?.signPath
&& <Image src={getFileUrl() + info?.info?.step_19?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_19?.signTime}</div>
<div>{info?.info?.step_19?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">作业负责人意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_21?.signTime}</div>
<div>{info?.info?.step_21?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">所在单位意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_22?.signPath
&& <Image src={getFileUrl() + info?.info?.step_22?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_22?.signTime}</div>
<div>{info?.info?.step_22?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审核部门意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_23?.signPath
&& <Image src={getFileUrl() + info?.info?.step_23?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_23?.signTime}</div>
<div>{info?.info?.step_23?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审批部门意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_24?.signPath
&& <Image src={getFileUrl() + info?.info?.step_24?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_24?.signTime}</div>
<div>{info?.info?.step_24?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">完工验收</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_25?.signPath
&& <Image src={getFileUrl() + info?.info?.step_25?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_25?.signTime}</div>
<div>{info?.info?.step_25?.remarks}</div>
</td>
</tr>
</tbody>
</table>
</div>
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(View);

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function HighPlaceWork(props) {
return props.children;
}
export default HighPlaceWork;

View File

@ -1,7 +0,0 @@
import ListPage from "../../Homework/List";
function List(props) {
return (<ListPage status="999" {...props} />);
}
export default List;

View File

@ -1,5 +0,0 @@
function Archive(props) {
return props.children;
}
export default Archive;

View File

@ -1,7 +0,0 @@
import ListPage from "../../Homework/List";
function List(props) {
return (<ListPage status="998" {...props} />);
}
export default List;

View File

@ -1,5 +0,0 @@
function ForceClose(props) {
return props.children;
}
export default ForceClose;

View File

@ -10,24 +10,24 @@ import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import CloseReasonModal from "~/components/CloseReasonModal";
import FlowModal from "~/components/FlowModal";
import ForceTerminationModal from "~/components/ForceTerminationModal";
import { STATUS_ENUM, WORK_TYPE_ENUM } from "~/enumerate/constant";
import { NS_EIGHTWORK } from "~/enumerate/namespace";
import "@xyflow/react/dist/style.css";
import useApplyDepartment from "~/utils/useApplyDepartment";
function List(props) {
// status 默认不传是作业管理999 是归档管理998 是强制关闭管理
// entrance 默认不传是企业端stakeholder 是相关方端supervision 是监督端
const [form] = Search.useForm();
const query = useGetUrlQuery();
const { departmentTree } = useApplyDepartment(props, query);
const [eightworkType, setEightworkType] = useState([]);
const [forceTerminationModalOpen, setForceTerminationModalOpen] = useState(false);
const [flowModalOpen, setFlowModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
const [departmentTree, setDepartmentTree] = useState([]);
const [closeReason, setCloseReason] = useState("");
const [closeReasonModalOpen, setCloseReasonModalOpen] = useState(false);
const { tableProps, getData } = useTable(props["eightworkList"], {
form,
@ -39,22 +39,6 @@ function List(props) {
}),
});
const getDepartmentTree = async () => {
if (!props.entrance) {
const { data: currentDepartmentTree } = await props["departmentListTree"]();
const { data: stakeholderDepartmentTree } = await props["departmentListAllTreeByCorpType"]({ enterpriseType: [3] });
setDepartmentTree([...currentDepartmentTree, ...stakeholderDepartmentTree]);
}
else if (props.entrance === "stakeholder") {
const { data: currentDepartmentTree } = await props["departmentListTree"]();
setDepartmentTree(currentDepartmentTree);
}
else if (props.entrance === "supervision") {
const { data: currentDepartmentTree } = await props["departmentListTree"]({ eqCorpinfoId: query.corpinfoId });
setDepartmentTree(currentDepartmentTree);
}
};
const getEightworkType = async () => {
const { data } = await props["eightworkType"]({ workType: "hot_work" });
setEightworkType(data);
@ -62,11 +46,10 @@ function List(props) {
useEffect(() => {
getEightworkType();
getDepartmentTree();
}, []);
return (
<Page isShowAllAction={false}>
<Page isShowAllAction={query.headerTitle || false} headerTitle={query.headerTitle}>
<Search
options={[
{ name: "eqCheckNo", label: "编号" },
@ -77,7 +60,12 @@ function List(props) {
label: "审核状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: STATUS_ENUM,
hidden: props.status,
hidden: () => {
if (props.entrance === "supervision") {
return !!props.status;
}
return false;
},
},
{
name: "eqWorkLevel",
@ -87,7 +75,11 @@ function List(props) {
itemsField: { labelKey: "taskName", valueKey: "workLevel" },
},
{ name: "eqXgfFlag", label: "作业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: WORK_TYPE_ENUM },
{ name: "inDepartmentId", label: "申请单位", render: <BasicSelectTree treeData={departmentTree} childrenKey="childrenList" multiple /> },
{
name: "inDepartmentId",
label: "申请单位",
render: <BasicSelectTree treeData={departmentTree} childrenKey="childrenList" multiple />,
},
{
name: "todo",
label: "服务单位",
@ -110,7 +102,12 @@ function List(props) {
{
title: "动火等级",
dataIndex: "workLevel",
render: (_, record) => getLabelName({ list: eightworkType, status: record.workLevel, idKey: "workLevel", nameKey: "taskName" }),
render: (_, record) => getLabelName({
list: eightworkType,
status: record.workLevel,
idKey: "workLevel",
nameKey: "taskName",
}),
},
{ title: "申请人", dataIndex: ["info", "applyUser"] },
{ title: "申请单位", dataIndex: ["info", "applyUnit"] },
@ -128,11 +125,10 @@ function List(props) {
dataIndex: "status",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.status }),
},
{ title: "强制关闭原因", dataIndex: ["info", "closeReason"], hidden: !(props.status === "998") },
{
title: "操作",
fixed: "right",
width: 250,
width: 260,
render: (_, record) => (
<Space>
<Button
@ -152,7 +148,7 @@ function List(props) {
>
审批表详情
</Button>
{(!props.status && !props.entrance && ![998, 999].includes(record.status)) && (
{(!props.entrance && ![998, 999].includes(record.status)) && (
<Button
type="link"
danger
@ -164,6 +160,17 @@ function List(props) {
强制关闭
</Button>
)}
{(record.status === 998) && (
<Button
type="link"
onClick={() => {
setCloseReason(record.info.closeReason);
setCloseReasonModalOpen(true);
}}
>
强制关闭原因
</Button>
)}
</Space>
),
},
@ -193,6 +200,17 @@ function List(props) {
/>
)
}
{
closeReasonModalOpen && (
<CloseReasonModal
closeReason={closeReason}
onCancel={() => {
setCloseReasonModalOpen(false);
setCloseReason("");
}}
/>
)
}
</Page>
);
}

View File

@ -1,5 +1,6 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Divider, Image } from "antd";
import dayjs from "dayjs";
import { Fragment, useEffect, useRef, useState } from "react";
import { useReactToPrint } from "react-to-print";
import Page from "zy-react-library/components/Page";
@ -36,7 +37,11 @@ function View(props) {
const getData = async () => {
const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id });
setInfo(basicInfo);
const { data: supplementaryInfo } = await props["eightworkSupplementaryInfo"]({ eqWorkId: query.workId, pageSize: 999, pageIndex: 1 });
const { data: supplementaryInfo } = await props["eightworkSupplementaryInfo"]({
eqWorkId: query.workId,
pageSize: 999,
pageIndex: 1,
});
setDelayedMonitoringRecord(supplementaryInfo.filter(item => item.type === "delay"));
setGasMonitoringRecord(supplementaryInfo.filter(item => item.type === "gas"));
const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId });
@ -82,7 +87,7 @@ function View(props) {
<td className="title">申请单位</td>
<td>{info?.info?.applyUnit}</td>
<td className="title">申请时间</td>
<td>{info?.info?.applyTime}</td>
<td>{dayjs(info?.info?.applyTime || info?.createTime).format("YYYY-MM-DD HH:mm:ss")}</td>
</tr>
<tr>
<td className="title">动火部位</td>
@ -183,7 +188,8 @@ function View(props) {
<td className="title">动火单位(部门)负责人意见</td>
<td className="right">
<div>
{info?.info?.step_4?.signPath && <Image src={getFileUrl() + info?.info?.step_4?.signPath} width={50} height={50} />}
{info?.info?.step_4?.signPath
&& <Image src={getFileUrl() + info?.info?.step_4?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_4?.signTime}</div>
<div>{info?.info?.step_4?.remarks}</div>
@ -191,7 +197,8 @@ function View(props) {
<td className="title">项目发包单位(部门)人员意见</td>
<td className="right">
<div>
{info?.info?.step_5?.signPath && <Image src={getFileUrl() + info?.info?.step_5?.signPath} width={50} height={50} />}
{info?.info?.step_5?.signPath
&& <Image src={getFileUrl() + info?.info?.step_5?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_5?.signTime}</div>
<div>{info?.info?.step_5?.remarks}</div>
@ -201,7 +208,8 @@ function View(props) {
<td className="title">现场管辖单位(部门)负责人意见</td>
<td className="right">
<div>
{info?.info?.step_6?.signPath && <Image src={getFileUrl() + info?.info?.step_6?.signPath} width={50} height={50} />}
{info?.info?.step_6?.signPath
&& <Image src={getFileUrl() + info?.info?.step_6?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_6?.signTime}</div>
<div>{info?.info?.step_6?.remarks}</div>
@ -209,7 +217,8 @@ function View(props) {
<td className="title">动火许可证签发单位意见</td>
<td className="right">
<div>
{info?.info?.step_7?.signPath && <Image src={getFileUrl() + info?.info?.step_7?.signPath} width={50} height={50} />}
{info?.info?.step_7?.signPath
&& <Image src={getFileUrl() + info?.info?.step_7?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_7?.signTime}</div>
<div>{info?.info?.step_7?.remarks}</div>
@ -219,7 +228,8 @@ function View(props) {
<td className="title">动火前管辖单位现场人员许可</td>
<td className="right">
<div>
{info?.info?.step_9?.signPath && <Image src={getFileUrl() + info?.info?.step_9?.signPath} width={50} height={50} />}
{info?.info?.step_9?.signPath
&& <Image src={getFileUrl() + info?.info?.step_9?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_9?.signTime}</div>
<div>{info?.info?.step_9?.remarks}</div>
@ -227,7 +237,8 @@ function View(props) {
<td className="title">动火后管辖单位现场人员验收</td>
<td className="right">
<div>
{info?.info?.step_11?.signPath && <Image src={getFileUrl() + info?.info?.step_11?.signPath} width={50} height={50} />}
{info?.info?.step_11?.signPath
&& <Image src={getFileUrl() + info?.info?.step_11?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_11?.signTime}</div>
<div>{info?.info?.step_11?.remarks}</div>
@ -250,7 +261,8 @@ function View(props) {
<td className="center">{item?.details?.actUserName}</td>
<td className="center">{item?.details?.delayHotTime}</td>
<td className="center">
{item?.details?.delayHotPhoto && <Image src={getFileUrl() + item?.details?.delayHotPhoto} width={50} height={50} />}
{item?.details?.delayHotPhoto
&& <Image src={getFileUrl() + item?.details?.delayHotPhoto} width={50} height={50} />}
</td>
</tr>
))}

View File

@ -0,0 +1,222 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Space } from "antd";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import Page from "zy-react-library/components/Page";
import Search from "zy-react-library/components/Search";
import BasicSelectTree from "zy-react-library/components/SelectTree/Basic";
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
import Table from "zy-react-library/components/Table";
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import useTable from "zy-react-library/hooks/useTable";
import { getLabelName } from "zy-react-library/utils";
import CloseReasonModal from "~/components/CloseReasonModal";
import FlowModal from "~/components/FlowModal";
import ForceTerminationModal from "~/components/ForceTerminationModal";
import { STATUS_ENUM, WORK_TYPE_ENUM } from "~/enumerate/constant";
import { NS_EIGHTWORK } from "~/enumerate/namespace";
import useApplyDepartment from "~/utils/useApplyDepartment";
function List(props) {
const [form] = Search.useForm();
const query = useGetUrlQuery();
const { departmentTree } = useApplyDepartment(props, query);
const [eightworkType, setEightworkType] = useState([]);
const [forceTerminationModalOpen, setForceTerminationModalOpen] = useState(false);
const [flowModalOpen, setFlowModalOpen] = useState(false);
const [currentId, setCurrentId] = useState("");
const [closeReason, setCloseReason] = useState("");
const [closeReasonModalOpen, setCloseReasonModalOpen] = useState(false);
const { tableProps, getData } = useTable(props["eightworkList"], {
form,
params: { eqWorkType: "hoisting_work", corpinfoId: query.corpinfoId },
transform: formData => ({
geCreateTime: formData.createTime?.[0],
leCreateTime: formData.createTime?.[1],
eqStatus: props.status || formData.eqStatus,
}),
});
const getEightworkType = async () => {
const { data } = await props["eightworkType"]({ workType: "hoisting_work" });
setEightworkType(data);
};
useEffect(() => {
getEightworkType();
}, []);
return (
<Page isShowAllAction={query.headerTitle || false} headerTitle={query.headerTitle}>
<Search
options={[
{ name: "eqCheckNo", label: "编号" },
{ name: "likeCreateName", label: "申请人" },
{ name: "createTime", label: "申请时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
{
name: "eqStatus",
label: "审核状态",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: STATUS_ENUM,
hidden: () => {
if (props.entrance === "supervision") {
return !!props.status;
}
return false;
},
},
{
name: "eqWorkLevel",
label: "作业级别",
render: FORM_ITEM_RENDER_ENUM.SELECT,
items: eightworkType,
itemsField: { labelKey: "taskName", valueKey: "workLevel" },
},
{ name: "eqXgfFlag", label: "作业类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: WORK_TYPE_ENUM },
{
name: "inDepartmentId",
label: "申请单位",
render: <BasicSelectTree treeData={departmentTree} childrenKey="childrenList" multiple />,
},
{
name: "todo",
label: "服务单位",
render: <DepartmentSelectTree searchType="inType" params={{ enterpriseType: [1, 2] }} />,
hidden: !(props.entrance === "stakeholder"),
},
]}
form={form}
onFinish={getData}
/>
<Table
columns={[
{ title: "服务单位", dataIndex: "todo", hidden: !(props.entrance === "stakeholder") },
{ title: "编号", dataIndex: "checkNo" },
{
title: "作业类型",
dataIndex: "xgfFlag",
render: (_, record) => getLabelName({ list: WORK_TYPE_ENUM, status: record.xgfFlag }),
},
{
title: "作业级别",
dataIndex: "workLevel",
render: (_, record) => getLabelName({
list: eightworkType,
status: record.workLevel,
idKey: "workLevel",
nameKey: "taskName",
}),
},
{ title: "申请人", dataIndex: ["info", "applyUser"] },
{ title: "申请单位", dataIndex: ["info", "applyUnit"] },
{
title: "申请时间",
dataIndex: ["info", "applyTime"],
render: (_, record) => dayjs(record.info?.applyTime || record.createTime).format("YYYY-MM-DD HH:mm:ss"),
},
{ title: "作业人", dataIndex: ["info", "workUserName"] },
{
title: "作业时间",
dataIndex: ["info", "workStartTime"],
render: (_, record) => `${record.info.workStartTime || ""}-${record.info.workEndTime || ""}`,
},
{ title: "吊物内容", dataIndex: ["info", "workContent"] },
{
title: "审核状态",
dataIndex: "status",
render: (_, record) => getLabelName({ list: STATUS_ENUM, status: record.status }),
},
{
title: "操作",
fixed: "right",
width: 260,
render: (_, record) => (
<Space>
<Button
type="link"
onClick={() => {
setCurrentId(record.workId);
setFlowModalOpen(true);
}}
>
流程图
</Button>
<Button
type="link"
onClick={() => {
props.history.push(`./view?id=${record.id}&workId=${record.workId}`);
}}
>
审批表详情
</Button>
{(!props.entrance && ![998, 999].includes(record.status)) && (
<Button
type="link"
danger
onClick={() => {
setCurrentId(record.id);
setForceTerminationModalOpen(true);
}}
>
强制关闭
</Button>
)}
{(record.status === 998) && (
<Button
type="link"
onClick={() => {
setCloseReason(record.info.closeReason);
setCloseReasonModalOpen(true);
}}
>
强制关闭原因
</Button>
)}
</Space>
),
},
]}
{...tableProps}
/>
{
forceTerminationModalOpen && (
<ForceTerminationModal
id={currentId}
onCancel={() => {
setForceTerminationModalOpen(false);
setCurrentId("");
}}
getData={getData}
/>
)
}
{
flowModalOpen && (
<FlowModal
id={currentId}
onCancel={() => {
setFlowModalOpen(false);
setCurrentId("");
}}
/>
)
}
{
closeReasonModalOpen && (
<CloseReasonModal
closeReason={closeReason}
onCancel={() => {
setCloseReasonModalOpen(false);
setCloseReason("");
}}
/>
)
}
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(List);

View File

@ -0,0 +1,278 @@
import { Connect } from "@cqsjjb/jjb-dva-runtime";
import { Button, Divider, Image } from "antd";
import dayjs from "dayjs";
import { useEffect, useRef, useState } from "react";
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 { NS_EIGHTWORK } from "~/enumerate/namespace";
import "~/css/index.less";
function View(props) {
const query = useGetUrlQuery();
const contentRef = useRef(null);
const handlePrint = useReactToPrint({
contentRef,
pageStyle: `@page {
size: landscape;
margin: 0mm;
}
@media print {
body {
margin: 10px;
padding: 10px;
}
}
`,
documentTitle: "",
});
const [info, setInfo] = useState({});
const [safetyMeasures, setSafetyMeasures] = useState([]);
const [otherSafetyMeasures, setOtherSafetyMeasures] = useState([]);
const getData = async () => {
const { data: basicInfo } = await props["eightworkInfo"]({ id: query.id });
setInfo(basicInfo);
const { data: measuresLogs } = await props["eightworkMeasuresLogs"]({ workId: query.workId });
setSafetyMeasures(measuresLogs.filter(item => item.type === 1));
setOtherSafetyMeasures(measuresLogs.filter(item => item.type === 2));
};
useEffect(() => {
getData();
}, []);
return (
<Page
headerTitle="审批表详情"
contentPadding="0 20px 20px 20px"
extraActionButtons={(
<Button type="primary" onClick={handlePrint}>打印</Button>
)}
>
<div className="work_ticket_details" ref={contentRef}>
<table>
<thead>
<tr>
<td colSpan={4} style={{ border: "none" }}>
<Divider orientation="left">吊装安全作业票</Divider>
</td>
</tr>
<tr>
<td colSpan={4} style={{ border: "none" }}>
<span>编号</span>
<span>{info.checkNo}</span>
</td>
</tr>
</thead>
<tbody>
{props.entrance === "stakeholder" && (
<tr>
<td className="title">服务单位</td>
<td colSpan={3}>{info.xx}</td>
</tr>
)}
<tr>
<td className="title">申请单位</td>
<td>{info?.info?.applyUnit}</td>
<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?.operationTypeName}</td>
</tr>
<tr>
<td className="title">吊具名称</td>
<td>{info?.info?.hoistName}</td>
<td className="title">作业级别</td>
<td>{info?.info?.workLevelName}</td>
</tr>
<tr>
<td className="title">吊装作业人</td>
<td>{info?.info?.workUserName}</td>
<td className="title">司索人</td>
<td>{info?.info?.pullUserName}</td>
</tr>
<tr>
<td className="title">指挥人</td>
<td>{info?.info?.commandUserName}</td>
<td rowSpan={2} className="title">吊物内容</td>
<td rowSpan={2}>{info?.info?.workContent}</td>
</tr>
<tr>
<td className="title">吊物质量</td>
<td>{info?.info?.hoistWeight}</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>
</tr>
<tr>
<td className="title">关联的其他特殊作业及安全作业票编号</td>
<td colSpan={3}>
{info?.info?.linkSpecialWorks.map((item, index) => (
<div key={index}>
{`${item.workTypeName}${item.checkNo}`}
</div>
))}
</td>
</tr>
<tr>
<td className="title">风险辨识结果</td>
<td colSpan={3}>
{info?.info?.riskResults.map((item, index) => (
<div key={index}>
{item.riskResultName}
</div>
))}
</td>
</tr>
<tr>
<td className="title">作业实施时间</td>
<td colSpan={3}>{`${info?.info?.workStartTime}${info?.info?.workEndTime}`}</td>
</tr>
<tr>
<td colSpan={4} style={{ border: "none", padding: 0 }}>
<table>
<tbody>
<tr>
<td className="center title" style={{ width: 80 }}>序号</td>
<td className="center title" style={{ width: "auto" }}>安全措施</td>
<td className="center title" style={{ width: 100 }}>是否涉及</td>
<td className="center title" style={{ width: 100 }}>确认人</td>
</tr>
{safetyMeasures.map((item, index) => (
<tr key={index}>
<td className="center">{index + 1}</td>
<td>{item.content}</td>
<td className="center">符合</td>
<td className="center">
{item.signPath && <Image src={getFileUrl() + item.signPath} width={50} height={50} />}
</td>
</tr>
))}
<tr>
<td className="center">{safetyMeasures.length + 1}</td>
<td colSpan={3}>
{
otherSafetyMeasures.map((item, index) => (
<div key={index} style={{ display: "flex", justifyContent: "space-between" }}>
<div>
<span>其它安全措施</span>
<span>{item.content}</span>
</div>
<div>
<span>编制人</span>
<span>{item.createName}</span>
</div>
</div>
))
}
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td className="title">安全交底人</td>
<td className="right">
<div>
{info?.info?.step_18?.signPath
&& <Image src={getFileUrl() + info?.info?.step_18?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_18?.signTime}</div>
<div>{info?.info?.step_18?.remarks}</div>
</td>
<td className="title">接受交底人</td>
<td className="right">
<div>
{info?.info?.step_19?.signPath
&& <Image src={getFileUrl() + info?.info?.step_19?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_19?.signTime}</div>
<div>{info?.info?.step_19?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">作业指挥负责人意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_21?.signPath
&& <Image src={getFileUrl() + info?.info?.step_21?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_21?.signTime}</div>
<div>{info?.info?.step_21?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">所在单位意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_22?.signPath
&& <Image src={getFileUrl() + info?.info?.step_22?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_22?.signTime}</div>
<div>{info?.info?.step_22?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审核部门意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_23?.signPath
&& <Image src={getFileUrl() + info?.info?.step_23?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_23?.signTime}</div>
<div>{info?.info?.step_23?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">审批部门意见</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_24?.signPath
&& <Image src={getFileUrl() + info?.info?.step_24?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_24?.signTime}</div>
<div>{info?.info?.step_24?.remarks}</div>
</td>
</tr>
<tr>
<td className="title">完工验收</td>
<td className="right" colSpan={3}>
<div>
{info?.info?.step_25?.signPath
&& <Image src={getFileUrl() + info?.info?.step_25?.signPath} width={50} height={50} />}
</div>
<div>{info?.info?.step_25?.signTime}</div>
<div>{info?.info?.step_25?.remarks}</div>
</td>
</tr>
</tbody>
</table>
</div>
</Page>
);
}
export default Connect([NS_EIGHTWORK], true)(View);

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function LiftingWork(props) {
return props.children;
}
export default LiftingWork;

View File

@ -0,0 +1,7 @@
import ListPage from "~/pages/Container/Enterprise/BlindBoardWork/Homework/List";
function List(props) {
return (<ListPage entrance="stakeholder" {...props} />);
}
export default List;

View File

@ -0,0 +1,7 @@
import ViewPage from "~/pages/Container/Enterprise/BlindBoardWork/Homework/View";
function View(props) {
return (<ViewPage entrance="stakeholder" {...props} />);
}
export default View;

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function BlindBoardWork(props) {
return props.children;
}
export default BlindBoardWork;

View File

@ -1,7 +0,0 @@
import ListPage from "~/pages/Container/Enterprise/ConfinedSpaceWork/Homework/List";
function List(props) {
return (<ListPage status="999" entrance="stakeholder" {...props} />);
}
export default List;

View File

@ -1,5 +0,0 @@
function Archive(props) {
return props.children;
}
export default Archive;

View File

@ -0,0 +1,7 @@
import ListPage from "~/pages/Container/Enterprise/CutWork/Homework/List";
function List(props) {
return (<ListPage entrance="stakeholder" {...props} />);
}
export default List;

View File

@ -0,0 +1,7 @@
import ViewPage from "~/pages/Container/Enterprise/CutWork/Homework/View";
function View(props) {
return (<ViewPage entrance="stakeholder" {...props} />);
}
export default View;

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function CutWork(props) {
return props.children;
}
export default CutWork;

View File

@ -0,0 +1,7 @@
import ListPage from "~/pages/Container/Enterprise/DigWork/Homework/List";
function List(props) {
return (<ListPage entrance="stakeholder" {...props} />);
}
export default List;

View File

@ -0,0 +1,7 @@
import ViewPage from "~/pages/Container/Enterprise/DigWork/Homework/View";
function View(props) {
return (<ViewPage entrance="stakeholder" {...props} />);
}
export default View;

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function DigWork(props) {
return props.children;
}
export default DigWork;

View File

@ -0,0 +1,7 @@
import ListPage from "~/pages/Container/Enterprise/ElectricWork/Homework/List";
function List(props) {
return (<ListPage entrance="stakeholder" {...props} />);
}
export default List;

View File

@ -0,0 +1,7 @@
import ViewPage from "~/pages/Container/Enterprise/ElectricWork/Homework/View";
function View(props) {
return (<ViewPage entrance="stakeholder" {...props} />);
}
export default View;

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function ElectricWork(props) {
return props.children;
}
export default ElectricWork;

View File

@ -0,0 +1,7 @@
import ListPage from "~/pages/Container/Enterprise/HighPlaceWork/Homework/List";
function List(props) {
return (<ListPage entrance="stakeholder" {...props} />);
}
export default List;

View File

@ -0,0 +1,7 @@
import ViewPage from "~/pages/Container/Enterprise/HighPlaceWork/Homework/View";
function View(props) {
return (<ViewPage entrance="stakeholder" {...props} />);
}
export default View;

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function HighPlaceWork(props) {
return props.children;
}
export default HighPlaceWork;

View File

@ -1,7 +0,0 @@
import ListPage from "~/pages/Container/Enterprise/HotWork/Homework/List";
function List(props) {
return (<ListPage status="999" entrance="stakeholder" {...props} />);
}
export default List;

View File

@ -1,5 +0,0 @@
function Archive(props) {
return props.children;
}
export default Archive;

View File

@ -0,0 +1,7 @@
import ListPage from "~/pages/Container/Enterprise/LiftingWork/Homework/List";
function List(props) {
return (<ListPage entrance="stakeholder" {...props} />);
}
export default List;

View File

@ -0,0 +1,7 @@
import ViewPage from "~/pages/Container/Enterprise/LiftingWork/Homework/View";
function View(props) {
return (<ViewPage entrance="stakeholder" {...props} />);
}
export default View;

View File

@ -0,0 +1,5 @@
function Homework(props) {
return props.children;
}
export default Homework;

View File

@ -0,0 +1,5 @@
function LiftingWork(props) {
return props.children;
}
export default LiftingWork;

View File

@ -0,0 +1,9 @@
import ListPage from "~/pages/Container/Supervision/HotWork/List";
function List(props) {
return (
<ListPage eqWorkType="blindboard_work" {...props} />
);
}
export default List;

View File

@ -0,0 +1,10 @@
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import ListPage from "~/pages/Container/Enterprise/BlindBoardWork/Homework/List";
function RecordsList(props) {
const query = useGetUrlQuery();
return (<ListPage status={query.status} entrance="supervision" {...props} />);
}
export default RecordsList;

View File

@ -0,0 +1,7 @@
import ViewPage from "~/pages/Container/Enterprise/BlindBoardWork/Homework/View";
function View(props) {
return (<ViewPage {...props} />);
}
export default View;

View File

@ -0,0 +1,5 @@
function HighPlaceWork(props) {
return props.children;
}
export default HighPlaceWork;

View File

@ -1,7 +1,7 @@
import ViewPage from "~/pages/Container/Enterprise/ConfinedSpaceWork/Homework/View";
function View(props) {
return (<ViewPage entrance="stakeholder" {...props} />);
return (<ViewPage {...props} />);
}
export default View;

View File

@ -0,0 +1,9 @@
import ListPage from "~/pages/Container/Supervision/HotWork/List";
function List(props) {
return (
<ListPage eqWorkType="cutroad_work" {...props} />
);
}
export default List;

View File

@ -0,0 +1,10 @@
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import ListPage from "~/pages/Container/Enterprise/CutWork/Homework/List";
function RecordsList(props) {
const query = useGetUrlQuery();
return (<ListPage status={query.status} entrance="supervision" {...props} />);
}
export default RecordsList;

View File

@ -1,4 +1,4 @@
import ViewPage from "../../Homework/View";
import ViewPage from "~/pages/Container/Enterprise/CutWork/Homework/View";
function View(props) {
return (<ViewPage {...props} />);

View File

@ -0,0 +1,5 @@
function CutWork(props) {
return props.children;
}
export default CutWork;

View File

@ -0,0 +1,9 @@
import ListPage from "~/pages/Container/Supervision/HotWork/List";
function List(props) {
return (
<ListPage eqWorkType="breakground_work" {...props} />
);
}
export default List;

View File

@ -0,0 +1,10 @@
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import ListPage from "~/pages/Container/Enterprise/DigWork/Homework/List";
function RecordsList(props) {
const query = useGetUrlQuery();
return (<ListPage status={query.status} entrance="supervision" {...props} />);
}
export default RecordsList;

View File

@ -1,4 +1,4 @@
import ViewPage from "../../Homework/View";
import ViewPage from "~/pages/Container/Enterprise/DigWork/Homework/View";
function View(props) {
return (<ViewPage {...props} />);

View File

@ -0,0 +1,5 @@
function DigWork(props) {
return props.children;
}
export default DigWork;

View File

@ -0,0 +1,9 @@
import ListPage from "~/pages/Container/Supervision/HotWork/List";
function List(props) {
return (
<ListPage eqWorkType="electricity_work" {...props} />
);
}
export default List;

View File

@ -0,0 +1,10 @@
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import ListPage from "~/pages/Container/Enterprise/ElectricWork/Homework/List";
function RecordsList(props) {
const query = useGetUrlQuery();
return (<ListPage status={query.status} entrance="supervision" {...props} />);
}
export default RecordsList;

View File

@ -1,4 +1,4 @@
import ViewPage from "../../Homework/View";
import ViewPage from "~/pages/Container/Enterprise/ElectricWork/Homework/View";
function View(props) {
return (<ViewPage {...props} />);

View File

@ -0,0 +1,5 @@
function ElectricWork(props) {
return props.children;
}
export default ElectricWork;

View File

@ -0,0 +1,9 @@
import ListPage from "~/pages/Container/Supervision/HotWork/List";
function List(props) {
return (
<ListPage eqWorkType="high_work" {...props} />
);
}
export default List;

View File

@ -0,0 +1,10 @@
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import ListPage from "~/pages/Container/Enterprise/HighPlaceWork/Homework/List";
function RecordsList(props) {
const query = useGetUrlQuery();
return (<ListPage status={query.status} entrance="supervision" {...props} />);
}
export default RecordsList;

View File

@ -0,0 +1,7 @@
import ViewPage from "~/pages/Container/Enterprise/HighPlaceWork/Homework/View";
function View(props) {
return (<ViewPage {...props} />);
}
export default View;

View File

@ -0,0 +1,5 @@
function HighPlaceWork(props) {
return props.children;
}
export default HighPlaceWork;

View File

@ -54,7 +54,7 @@ function List(props) {
<Button
type="link"
onClick={() => {
props.history.push(`./recordsList?corpinfoId=${record.id}`);
props.history.push(`./recordsList?corpinfoId=${record.id}&headerTitle=申请总数`);
}}
>
{(record.doneCount + record.rejectedCount + record.doingCount + record.forceTerminateCount) || 0}
@ -68,7 +68,7 @@ function List(props) {
<Button
type="link"
onClick={() => {
props.history.push(`./recordsList?corpinfoId=${record.id}&status=999`);
props.history.push(`./recordsList?corpinfoId=${record.id}&status=999&headerTitle=完成数`);
}}
>
{record.doneCount || 0}
@ -82,7 +82,7 @@ function List(props) {
<Button
type="link"
onClick={() => {
props.history.push(`./recordsList?corpinfoId=${record.id}&status=1`);
props.history.push(`./recordsList?corpinfoId=${record.id}&status=1&headerTitle=进行数`);
}}
>
{(record.doingCount) || 0}
@ -96,7 +96,7 @@ function List(props) {
<Button
type="link"
onClick={() => {
props.history.push(`./recordsList?corpinfoId=${record.id}&status=2`);
props.history.push(`./recordsList?corpinfoId=${record.id}&status=2&headerTitle=打回数`);
}}
>
{(record.rejectedCount) || 0}
@ -110,7 +110,7 @@ function List(props) {
<Button
type="link"
onClick={() => {
props.history.push(`./recordsList?corpinfoId=${record.id}&status=998`);
props.history.push(`./recordsList?corpinfoId=${record.id}&status=998&headerTitle=废除数`);
}}
>
{record.forceTerminateCount || 0}

View File

@ -1,7 +1,7 @@
import ViewPage from "~/pages/Container/Enterprise/HotWork/Homework/View";
function View(props) {
return (<ViewPage entrance="stakeholder" {...props} />);
return (<ViewPage {...props} />);
}
export default View;

View File

@ -0,0 +1,9 @@
import ListPage from "~/pages/Container/Supervision/HotWork/List";
function List(props) {
return (
<ListPage eqWorkType="hoisting_work" {...props} />
);
}
export default List;

View File

@ -0,0 +1,10 @@
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
import ListPage from "~/pages/Container/Enterprise/LiftingWork/Homework/List";
function RecordsList(props) {
const query = useGetUrlQuery();
return (<ListPage status={query.status} entrance="supervision" {...props} />);
}
export default RecordsList;

View File

@ -1,4 +1,4 @@
import ViewPage from "../../Homework/View";
import ViewPage from "~/pages/Container/Enterprise/LiftingWork/Homework/View";
function View(props) {
return (<ViewPage {...props} />);

View File

@ -0,0 +1,5 @@
function HighPlaceWork(props) {
return props.children;
}
export default HighPlaceWork;

View File

@ -0,0 +1,27 @@
import { useEffect, useState } from "react";
export default function useApplyDepartment(props, query) {
const [departmentTree, setDepartmentTree] = useState([]);
const getDepartmentTree = async () => {
if (!props.entrance) {
const { data: currentDepartmentTree } = await props["departmentListTree"]();
const { data: stakeholderDepartmentTree } = await props["departmentListAllTreeByCorpType"]({ enterpriseType: [3] });
setDepartmentTree([...currentDepartmentTree, ...stakeholderDepartmentTree]);
}
else if (props.entrance === "stakeholder") {
const { data: currentDepartmentTree } = await props["departmentListTree"]();
setDepartmentTree(currentDepartmentTree);
}
else if (props.entrance === "supervision") {
const { data: currentDepartmentTree } = await props["departmentListTree"]({ eqCorpinfoId: query.corpinfoId });
setDepartmentTree(currentDepartmentTree);
}
};
useEffect(() => {
getDepartmentTree();
}, []);
return { departmentTree };
}