修改页面样式
parent
f600f90b06
commit
c2b0e5c99f
|
|
@ -32,7 +32,7 @@
|
|||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-to-print": "^3.2.0",
|
||||
"zy-react-library": "^1.0.175"
|
||||
"zy-react-library": "^1.1.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@antfu/eslint-config": "^5.4.1",
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
|
||||
function HiddenView() {
|
||||
return (
|
||||
<div>
|
||||
<Page headerTitle="查看" contentPadding="0 20px 20px 20px">
|
||||
<HiddenInfo />
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Divider, Form, message } from "antd";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Upload from "zy-react-library/components/Upload";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
|
|
@ -29,9 +29,8 @@ function Acceptance(props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="隐患验收" />
|
||||
<HiddenInfo isShowHeaderBack={false} hiddenId={query.hiddenId} id={query.id} />
|
||||
<Page headerTitle="隐患验收" contentPadding="0 20px 20px 20px" isShowFooter={false}>
|
||||
<HiddenInfo hiddenId={query.hiddenId} id={query.id} />
|
||||
<Divider orientation="left">安全环保检查验收</Divider>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
|
|
@ -53,7 +52,7 @@ function Acceptance(props) {
|
|||
{ name: "files", label: "验收图片", required: false, render: (<Upload />) },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Space } from "antd";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { HIDDEN_STATE_ENUM } from "zy-react-library/enum/hidden/gwj";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
|
|
@ -15,42 +15,39 @@ function HiddenList(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="隐患验收" />
|
||||
<div style={{ padding: 20 }}>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "隐患描述", dataIndex: "hiddenDesc" },
|
||||
{ title: "隐患状态", dataIndex: "state", render: (_, record) => getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }) },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../../hiddenView?hiddenId=${record.hiddenId}&id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./acceptance?hiddenId=${record.hiddenId}&id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
验收
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Page headerTitle="隐患验收">
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "隐患描述", dataIndex: "hiddenDesc" },
|
||||
{ title: "隐患状态", dataIndex: "state", render: (_, record) => getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }) },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../../hiddenView?hiddenId=${record.hiddenId}&id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./acceptance?hiddenId=${record.hiddenId}&id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
验收
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Space } from "antd";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary";
|
||||
|
|
@ -22,7 +23,7 @@ function List(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
|
|
@ -83,7 +84,7 @@ function List(props) {
|
|||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { Divider, Form, message } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||
|
|
@ -29,9 +29,8 @@ function Assign(props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="隐患指派" />
|
||||
<HiddenInfo isShowHeaderBack={false} hiddenId={query.hiddenUUId} id={query.hiddenId} />
|
||||
<Page headerTitle="隐患指派" contentPadding="0 20px 20px 20px" isShowFooter={false}>
|
||||
<HiddenInfo hiddenId={query.hiddenUUId} id={query.hiddenId} />
|
||||
<Divider orientation="left">隐患确认</Divider>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
|
|
@ -60,7 +59,7 @@ function Assign(props) {
|
|||
{ name: "deptId", label: "隐患确认人部门id", onlyForLabel: true },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Space } from "antd";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { HIDDEN_STATE_ENUM } from "zy-react-library/enum/hidden/gwj";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
|
|
@ -15,42 +15,39 @@ function HiddenList(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="隐患指派" />
|
||||
<div style={{ padding: 20 }}>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "隐患描述", dataIndex: "hiddenDesc" },
|
||||
{ title: "隐患状态", dataIndex: "state", render: (_, record) => getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }) },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../../hiddenView?hiddenId=${record.hiddenId}&id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./assign?inspectionId=${query.inspectionId}&id=${query.id}&hiddenUUId=${record.hiddenId}&hiddenId=${record.id}`);
|
||||
}}
|
||||
>
|
||||
指派
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Page headerTitle="隐患指派">
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "隐患描述", dataIndex: "hiddenDesc" },
|
||||
{ title: "隐患状态", dataIndex: "state", render: (_, record) => getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }) },
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../../hiddenView?hiddenId=${record.hiddenId}&id=${record.id}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./assign?inspectionId=${query.inspectionId}&id=${query.id}&hiddenUUId=${record.hiddenId}&hiddenId=${record.id}`);
|
||||
}}
|
||||
>
|
||||
指派
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Space } from "antd";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary";
|
||||
|
|
@ -22,7 +23,7 @@ function List(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
|
|
@ -83,7 +84,7 @@ function List(props) {
|
|||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Image, message, Modal, Space } from "antd";
|
||||
import { Button, Form, Image, message, Modal, Space, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary";
|
||||
|
|
@ -33,7 +34,7 @@ function List(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
|
|
@ -124,7 +125,7 @@ function List(props) {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -152,17 +153,18 @@ function DefenseHandlingModalComponent(props) {
|
|||
return (
|
||||
<Modal
|
||||
title="申辩处理"
|
||||
width={800}
|
||||
width={600}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
loading={uploadFileLoading || props.inspection.defenseLoading}
|
||||
confirmLoading={uploadFileLoading || props.inspection.defenseLoading}
|
||||
>
|
||||
<FormBuilder
|
||||
loading={uploadFileLoading || props.inspection.defenseLoading}
|
||||
form={form}
|
||||
span={24}
|
||||
labelCol={{ span: 8 }}
|
||||
labelCol={{ span: 10 }}
|
||||
showActionButtons={false}
|
||||
onFinish={onSubmit}
|
||||
options={[
|
||||
|
|
@ -210,7 +212,7 @@ function DefenseHandlingModalComponent(props) {
|
|||
function DefenseRecordModalComponent(props) {
|
||||
const [list, setList] = useState([]);
|
||||
const { loading: downloadFileLoading, downloadFile } = useDownloadFile();
|
||||
const { loading: downloadGetFileLoading, getFile } = useGetFile();
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
|
||||
const getFiles = async (list) => {
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
|
|
@ -242,40 +244,41 @@ function DefenseRecordModalComponent(props) {
|
|||
footer={[
|
||||
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||
]}
|
||||
loading={downloadFileLoading || downloadGetFileLoading}
|
||||
>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "申辩时间", dataIndex: "createTime", width: 200 },
|
||||
{ title: "申辩描述", dataIndex: "content" },
|
||||
{ title: "申辩状态", dataIndex: "isPass", render: (_, record) => (
|
||||
<>
|
||||
<div>{record.isPass === 0 && "未审批"}</div>
|
||||
<div>{record.isPass === 1 && "通过"}</div>
|
||||
<div>{record.isPass === 2 && "未通过"}</div>
|
||||
</>
|
||||
) },
|
||||
{ title: "签字图片", dataIndex: "signature", render: (_, record) => (record.signature && <Image src={getFileUrl() + record.signature} width={100} height={100} />) },
|
||||
{ title: "申辩附件名称", dataIndex: "name", width: 200 },
|
||||
{ title: "申辩附件", dataIndex: "url", render: (_, record) => (
|
||||
record.url && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
downloadFile({ url: record.url, name: record.name });
|
||||
}}
|
||||
>
|
||||
下载
|
||||
</Button>
|
||||
)
|
||||
) },
|
||||
{ title: "检查人签字", dataIndex: "checkSign", render: (_, record) => (record.checkSign && <Image src={getFileUrl() + record.checkSign} width={100} height={100} />) },
|
||||
{ title: "检查人意见", dataIndex: "checkRemarks" },
|
||||
{ title: "审批时间", dataIndex: "checkSignTime", width: 200 },
|
||||
]}
|
||||
{...tableProps}
|
||||
dataSource={list}
|
||||
/>
|
||||
<Spin spinning={downloadFileLoading || getFileLoading}>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "申辩时间", dataIndex: "createTime", width: 200 },
|
||||
{ title: "申辩描述", dataIndex: "content" },
|
||||
{ title: "申辩状态", dataIndex: "isPass", render: (_, record) => (
|
||||
<>
|
||||
<div>{record.isPass === 0 && "未审批"}</div>
|
||||
<div>{record.isPass === 1 && "通过"}</div>
|
||||
<div>{record.isPass === 2 && "未通过"}</div>
|
||||
</>
|
||||
) },
|
||||
{ title: "签字图片", dataIndex: "signature", render: (_, record) => (record.signature && <Image src={getFileUrl() + record.signature} width={100} height={100} />) },
|
||||
{ title: "申辩附件名称", dataIndex: "name", width: 200 },
|
||||
{ title: "申辩附件", dataIndex: "url", render: (_, record) => (
|
||||
record.url && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
downloadFile({ url: record.url, name: record.name });
|
||||
}}
|
||||
>
|
||||
下载
|
||||
</Button>
|
||||
)
|
||||
) },
|
||||
{ title: "检查人签字", dataIndex: "checkSign", render: (_, record) => (record.checkSign && <Image src={getFileUrl() + record.checkSign} width={100} height={100} />) },
|
||||
{ title: "检查人意见", dataIndex: "checkRemarks" },
|
||||
{ title: "审批时间", dataIndex: "checkSignTime", width: 200 },
|
||||
]}
|
||||
{...tableProps}
|
||||
dataSource={list}
|
||||
/>
|
||||
</Spin>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary";
|
||||
|
|
@ -30,7 +31,7 @@ function List(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
|
|
@ -102,7 +103,7 @@ function List(props) {
|
|||
getData={getData}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -131,20 +132,21 @@ function ConfirmModalComponent(props) {
|
|||
return (
|
||||
<Modal
|
||||
title="检查确认"
|
||||
width={800}
|
||||
width={600}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
loading={uploadFileLoading || props.inspection.inspectedLoading}
|
||||
confirmLoading={uploadFileLoading || props.inspection.inspectedLoading}
|
||||
>
|
||||
<FormBuilder
|
||||
loading={uploadFileLoading || props.inspection.inspectedLoading}
|
||||
form={form}
|
||||
span={24}
|
||||
values={{
|
||||
reviewStatus: "1",
|
||||
}}
|
||||
labelCol={{ span: 8 }}
|
||||
labelCol={{ span: 10 }}
|
||||
showActionButtons={false}
|
||||
onFinish={onSubmit}
|
||||
options={[
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ function HiddenAddModal(props) {
|
|||
hiddenPartType,
|
||||
hiddenFindTime: dayjs().format("YYYY-MM-DD HH:mm:ss"),
|
||||
rectificationType: 2,
|
||||
isRelated: 2,
|
||||
});
|
||||
props.onCancel();
|
||||
};
|
||||
|
|
@ -104,12 +105,6 @@ function HiddenAddModal(props) {
|
|||
{ name: "hiddenTypeName", label: "隐患类型名称", onlyForLabel: true },
|
||||
{ name: "hiddenType2", label: "隐患类型名称", onlyForLabel: true },
|
||||
{ name: "hiddenType2Name", label: "隐患类型名称", onlyForLabel: true },
|
||||
{
|
||||
name: "isRelated",
|
||||
label: "是否相关方",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: [{ bianma: 1, name: "是" }, { bianma: 2, name: "否" }],
|
||||
},
|
||||
{ name: "map", customizeRender: true, render: <Map required={false} />, span: 24 },
|
||||
{ name: "positionDesc", label: "隐患位置描述", required: false, span: 24 },
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { Button, Form, message, Modal, Space } from "antd";
|
|||
import { cloneDeep } from "lodash-es";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary";
|
||||
|
|
@ -198,7 +198,7 @@ function Add(props) {
|
|||
});
|
||||
};
|
||||
|
||||
// 更新现有隐患
|
||||
// 保存隐患
|
||||
const handleHiddenSubmit = async (traceId, isDraft, index) => {
|
||||
await deleteFile({
|
||||
single: false,
|
||||
|
|
@ -224,7 +224,7 @@ function Add(props) {
|
|||
files: hiddenList[index].hiddenVideoFiles,
|
||||
params: {
|
||||
type: UPLOAD_FILE_TYPE_ENUM["102"],
|
||||
foreignKey: hiddenList[index].hiddenId,
|
||||
foreignKey: id,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -237,9 +237,9 @@ function Add(props) {
|
|||
eqForeignKey: id,
|
||||
});
|
||||
|
||||
await props["hiddenEdit"]({
|
||||
await props[!hiddenList[index].hiddenId ? "hiddenAdd" : "hiddenEdit"]({
|
||||
...hiddenList[index],
|
||||
source: 5,
|
||||
source: props.source || "5",
|
||||
hiddenId: id,
|
||||
state: isDraft === 0 ? 102 : 98,
|
||||
foreignKey: traceId,
|
||||
|
|
@ -307,283 +307,280 @@ function Add(props) {
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
// if (isIdle)
|
||||
// onSubmit(form.getFieldsValue(), 1);
|
||||
if (isIdle)
|
||||
onSubmit(form.getFieldsValue(), 1);
|
||||
}, [isIdle]);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title={query.id ? "编辑" : "新增"} />
|
||||
<div style={{ paddingBottom: 10 }}>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
values={{
|
||||
planType: query.planId ? 1 : 0,
|
||||
planId: query.planId,
|
||||
situationList: [{ content: undefined }],
|
||||
}}
|
||||
loading={deleteFileLoading || getFileLoading || uploadFileLoading || props.inspection.inspectionLoading}
|
||||
onFinish={values => onSubmit(values, 0)}
|
||||
extraActionButtons={[
|
||||
<Button
|
||||
key="temporaryStorage"
|
||||
onClick={() => {
|
||||
onSubmit(form.getFieldsValue(), 1);
|
||||
}}
|
||||
>
|
||||
暂存
|
||||
</Button>,
|
||||
]}
|
||||
options={[
|
||||
{
|
||||
name: "subject",
|
||||
label: "检查题目",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: INSPECTION_QUESTION_ENUM,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
name: "planType",
|
||||
label: "计划属性",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: PLAN_ENUM.map(item => ({ ...item, bianma: +item.bianma })),
|
||||
span: planType === 0 ? 24 : 12,
|
||||
componentProps: { disabled: query.planId },
|
||||
},
|
||||
{
|
||||
name: "planId",
|
||||
label: "计划名称",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: planList,
|
||||
itemsField: { labelKey: "planName", valueKey: "id" },
|
||||
dependencies: ["planType"],
|
||||
hidden: formValues => !(formValues.planType === 1),
|
||||
componentProps: { disabled: query.planId },
|
||||
},
|
||||
{
|
||||
name: ["personUnderInspection", "departmentId"],
|
||||
label: "被检查单位",
|
||||
render: (
|
||||
<DepartmentSelectTree
|
||||
searchType={props.searchType}
|
||||
onGetLabel={label => form.setFieldValue(["personUnderInspection", "departmentName"], label)}
|
||||
onChange={() => {
|
||||
form.setFieldValue(["personUnderInspection", "userId"], "");
|
||||
form.setFieldValue(["personUnderInspection", "userName"], "");
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: ["personUnderInspection", "departmentName"], label: "被检查单位名称", onlyForLabel: true },
|
||||
{
|
||||
name: ["personUnderInspection", "userId"],
|
||||
label: "被检查单位现场负责人",
|
||||
render: (
|
||||
<PersonnelSelect
|
||||
params={{ departmentId: personUnderInspectionDepartmentId }}
|
||||
onGetLabel={label => form.setFieldValue(["personUnderInspection", "userName"], label)}
|
||||
/>
|
||||
),
|
||||
formItemProps: { labelCol: { span: 8 } },
|
||||
},
|
||||
{ name: ["personUnderInspection", "userName"], label: "被检查单位现场负责人名称", onlyForLabel: true },
|
||||
{ name: "place", label: "检查场所", span: 24 },
|
||||
{
|
||||
name: "type",
|
||||
label: "检查类型",
|
||||
span: 8,
|
||||
render: (
|
||||
<DictionarySelectTree
|
||||
dictValue="inspectionType"
|
||||
onlyLastLevel
|
||||
onGetLabel={label => form.setFieldValue("typeName", label)}
|
||||
/>
|
||||
),
|
||||
formItemProps: { labelCol: { span: 6 } },
|
||||
},
|
||||
{ name: "typeName", label: "检查类型名称", onlyForLabel: true },
|
||||
{
|
||||
name: "timeStart",
|
||||
label: "检查开始时间",
|
||||
span: 8,
|
||||
render: FORM_ITEM_RENDER_ENUM.DATETIME,
|
||||
formItemProps: { labelCol: { span: 6 } },
|
||||
},
|
||||
{
|
||||
name: "timeEnd",
|
||||
label: "检查结束时间",
|
||||
span: 8,
|
||||
render: FORM_ITEM_RENDER_ENUM.DATETIME,
|
||||
formItemProps: { labelCol: { span: 6 } },
|
||||
rules: [validatorEndTime(timeStart)],
|
||||
},
|
||||
{ label: "检查人员", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||
{
|
||||
name: "inspectorList",
|
||||
span: 24,
|
||||
render: FORM_ITEM_RENDER_ENUM.FORM_LIST,
|
||||
formListUniqueProps: {
|
||||
addButtonText: "添加检查人员",
|
||||
options: field => (
|
||||
[
|
||||
{
|
||||
name: [field.name, "departmentId"],
|
||||
label: "检查人员部门",
|
||||
render: (
|
||||
<DepartmentSelectTree
|
||||
onChange={() => {
|
||||
form.setFieldValue(["inspectorList", field.name, "userId"], "");
|
||||
form.setFieldValue(["inspectorList", field.name, "userName"], "");
|
||||
}}
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue(["inspectorList", field.name, "departmentName"], label);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: [field.name, "departmentName"], label: "检查人员部门名称", onlyForLabel: true },
|
||||
{ name: [field.name, "userName"], label: "检查人员名称", onlyForLabel: true },
|
||||
{
|
||||
name: [field.name, "userId"],
|
||||
label: "检查人员",
|
||||
render: (
|
||||
<PersonnelSelect
|
||||
params={{ departmentId: inspectorList?.[field.name]?.departmentId || "" }}
|
||||
onGetLabel={label => form.setFieldValue(["inspectorList", field.name, "userName"], label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
]
|
||||
),
|
||||
},
|
||||
},
|
||||
{ label: "检查情况", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||
{
|
||||
name: "situationList",
|
||||
span: 24,
|
||||
render: FORM_ITEM_RENDER_ENUM.FORM_LIST,
|
||||
formListUniqueProps: {
|
||||
addButtonText: "添加检查情况",
|
||||
options: field => ([
|
||||
{ name: [field.name, "content"], label: "检查情况", render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
{ name: [field.name, "deleteFiles"], label: "删除的图片", onlyForLabel: true },
|
||||
<Page headerTitle={query.id ? "编辑" : "新增"} isShowFooter={false}>
|
||||
<FormBuilder
|
||||
form={form}
|
||||
values={{
|
||||
planType: query.planId ? 1 : 0,
|
||||
planId: query.planId,
|
||||
situationList: [{ content: undefined }],
|
||||
}}
|
||||
loading={deleteFileLoading || getFileLoading || uploadFileLoading || props.inspection.inspectionLoading}
|
||||
onFinish={values => onSubmit(values, 0)}
|
||||
extraActionButtons={[
|
||||
<Button
|
||||
key="temporaryStorage"
|
||||
onClick={() => {
|
||||
onSubmit(form.getFieldsValue(), 1);
|
||||
}}
|
||||
>
|
||||
暂存
|
||||
</Button>,
|
||||
]}
|
||||
options={[
|
||||
{
|
||||
name: "subject",
|
||||
label: "检查题目",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: INSPECTION_QUESTION_ENUM,
|
||||
span: 24,
|
||||
},
|
||||
{
|
||||
name: "planType",
|
||||
label: "计划属性",
|
||||
render: FORM_ITEM_RENDER_ENUM.RADIO,
|
||||
items: PLAN_ENUM.map(item => ({ ...item, bianma: +item.bianma })),
|
||||
span: planType === 0 ? 24 : 12,
|
||||
componentProps: { disabled: query.planId },
|
||||
},
|
||||
{
|
||||
name: "planId",
|
||||
label: "计划名称",
|
||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||
items: planList,
|
||||
itemsField: { labelKey: "planName", valueKey: "id" },
|
||||
dependencies: ["planType"],
|
||||
hidden: formValues => !(formValues.planType === 1),
|
||||
componentProps: { disabled: query.planId },
|
||||
},
|
||||
{
|
||||
name: ["personUnderInspection", "departmentId"],
|
||||
label: "被检查单位",
|
||||
render: (
|
||||
<DepartmentSelectTree
|
||||
searchType={props.searchType}
|
||||
onGetLabel={label => form.setFieldValue(["personUnderInspection", "departmentName"], label)}
|
||||
onChange={() => {
|
||||
form.setFieldValue(["personUnderInspection", "userId"], "");
|
||||
form.setFieldValue(["personUnderInspection", "userName"], "");
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: ["personUnderInspection", "departmentName"], label: "被检查单位名称", onlyForLabel: true },
|
||||
{
|
||||
name: ["personUnderInspection", "userId"],
|
||||
label: "被检查单位现场负责人",
|
||||
render: (
|
||||
<PersonnelSelect
|
||||
params={{ departmentId: personUnderInspectionDepartmentId }}
|
||||
onGetLabel={label => form.setFieldValue(["personUnderInspection", "userName"], label)}
|
||||
/>
|
||||
),
|
||||
formItemProps: { labelCol: { span: 8 } },
|
||||
},
|
||||
{ name: ["personUnderInspection", "userName"], label: "被检查单位现场负责人名称", onlyForLabel: true },
|
||||
{ name: "place", label: "检查场所", span: 24 },
|
||||
{
|
||||
name: "type",
|
||||
label: "检查类型",
|
||||
span: 8,
|
||||
render: (
|
||||
<DictionarySelectTree
|
||||
dictValue="inspectionType"
|
||||
onlyLastLevel
|
||||
onGetLabel={label => form.setFieldValue("typeName", label)}
|
||||
/>
|
||||
),
|
||||
formItemProps: { labelCol: { span: 6 } },
|
||||
},
|
||||
{ name: "typeName", label: "检查类型名称", onlyForLabel: true },
|
||||
{
|
||||
name: "timeStart",
|
||||
label: "检查开始时间",
|
||||
span: 8,
|
||||
render: FORM_ITEM_RENDER_ENUM.DATETIME,
|
||||
formItemProps: { labelCol: { span: 6 } },
|
||||
},
|
||||
{
|
||||
name: "timeEnd",
|
||||
label: "检查结束时间",
|
||||
span: 8,
|
||||
render: FORM_ITEM_RENDER_ENUM.DATETIME,
|
||||
formItemProps: { labelCol: { span: 6 } },
|
||||
rules: [validatorEndTime(timeStart)],
|
||||
},
|
||||
{ label: "检查人员", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||
{
|
||||
name: "inspectorList",
|
||||
span: 24,
|
||||
render: FORM_ITEM_RENDER_ENUM.FORM_LIST,
|
||||
formListUniqueProps: {
|
||||
addButtonText: "添加检查人员",
|
||||
options: field => (
|
||||
[
|
||||
{
|
||||
name: [field.name, "files"],
|
||||
label: "图片",
|
||||
name: [field.name, "departmentId"],
|
||||
label: "检查人员部门",
|
||||
render: (
|
||||
<Upload
|
||||
maxCount={1}
|
||||
onGetRemoveFile={(file) => {
|
||||
form.setFieldValue(
|
||||
["situationList", field.name, "deleteFiles"],
|
||||
[...(form.getFieldValue(["situationList", field.name, "deleteFiles"]) || []), file],
|
||||
);
|
||||
<DepartmentSelectTree
|
||||
onChange={() => {
|
||||
form.setFieldValue(["inspectorList", field.name, "userId"], "");
|
||||
form.setFieldValue(["inspectorList", field.name, "userName"], "");
|
||||
}}
|
||||
onGetLabel={(label) => {
|
||||
form.setFieldValue(["inspectorList", field.name, "departmentName"], label);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
]),
|
||||
},
|
||||
{ name: [field.name, "departmentName"], label: "检查人员部门名称", onlyForLabel: true },
|
||||
{ name: [field.name, "userName"], label: "检查人员名称", onlyForLabel: true },
|
||||
{
|
||||
name: [field.name, "userId"],
|
||||
label: "检查人员",
|
||||
render: (
|
||||
<PersonnelSelect
|
||||
params={{ departmentId: inspectorList?.[field.name]?.departmentId || "" }}
|
||||
onGetLabel={label => form.setFieldValue(["inspectorList", field.name, "userName"], label)}
|
||||
/>
|
||||
),
|
||||
},
|
||||
]
|
||||
),
|
||||
},
|
||||
{ label: "发现问题", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||
{
|
||||
key: "hiddenList",
|
||||
customizeRender: true,
|
||||
span: 24,
|
||||
render: (
|
||||
<Table
|
||||
style={{ marginBottom: 20 }}
|
||||
pagination={false}
|
||||
options={false}
|
||||
disabledResizer={true}
|
||||
toolBarRender={() => (
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
setHiddenDiscovererUserList(getHiddenDiscovererUserList());
|
||||
setCurrentHiddenInfo({});
|
||||
currentHiddenIndex.current = -1;
|
||||
setHiddenAddModalOpen(true);
|
||||
},
|
||||
{ label: "检查情况", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||
{
|
||||
name: "situationList",
|
||||
span: 24,
|
||||
render: FORM_ITEM_RENDER_ENUM.FORM_LIST,
|
||||
formListUniqueProps: {
|
||||
addButtonText: "添加检查情况",
|
||||
options: field => ([
|
||||
{ name: [field.name, "content"], label: "检查情况", render: FORM_ITEM_RENDER_ENUM.TEXTAREA },
|
||||
{ name: [field.name, "deleteFiles"], label: "删除的图片", onlyForLabel: true },
|
||||
{
|
||||
name: [field.name, "files"],
|
||||
label: "图片",
|
||||
render: (
|
||||
<Upload
|
||||
maxCount={1}
|
||||
onGetRemoveFile={(file) => {
|
||||
form.setFieldValue(
|
||||
["situationList", field.name, "deleteFiles"],
|
||||
[...(form.getFieldValue(["situationList", field.name, "deleteFiles"]) || []), file],
|
||||
);
|
||||
}}
|
||||
>
|
||||
添加隐患
|
||||
</Button>
|
||||
)}
|
||||
dataSource={hiddenList}
|
||||
columns={[
|
||||
{ title: "问题描述", dataIndex: "hiddenDesc" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 120,
|
||||
render: (_, record, index) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={async () => {
|
||||
if (record.hiddenId) {
|
||||
getCurrentHiddenInfo(record.id, record.hiddenId);
|
||||
}
|
||||
else {
|
||||
setCurrentHiddenInfo({ ...record });
|
||||
}
|
||||
setHiddenDiscovererUserList(getHiddenDiscovererUserList());
|
||||
currentHiddenIndex.current = index;
|
||||
setHiddenAddModalOpen(true);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定删除该隐患吗?",
|
||||
onOk: async () => {
|
||||
if (record.id) {
|
||||
deleteHiddenIds.current.push(record.id);
|
||||
}
|
||||
setHiddenList(hiddenList.filter((_, i) => i !== index));
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
),
|
||||
/>
|
||||
),
|
||||
},
|
||||
]),
|
||||
},
|
||||
{ name: ["initiator", "userRemarks"], label: "检查人意见", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{
|
||||
name: ["initiator", "signature"],
|
||||
label: "检查人",
|
||||
span: 24,
|
||||
required: false,
|
||||
rules: [{ required: true, message: "请签名" }],
|
||||
render: (
|
||||
<Signature
|
||||
url={signatureFilePath}
|
||||
onConfirm={(value) => {
|
||||
const signature = form.getFieldValue(["initiator", "signature"]);
|
||||
if (query.id && typeof signature === "string") {
|
||||
form.setFieldValue("deleteSignature", signature);
|
||||
}
|
||||
form.setFieldValue(["initiator", "signature"], value.file);
|
||||
form.setFieldValue(["initiator", "signatureTime"], value.time);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: ["initiator", "signatureTime"], label: "签字时间", onlyForLabel: true },
|
||||
{ name: "deleteSignature", label: "删除的签字图片", onlyForLabel: true },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
},
|
||||
{ label: "发现问题", render: FORM_ITEM_RENDER_ENUM.DIVIDER },
|
||||
{
|
||||
key: "hiddenList",
|
||||
customizeRender: true,
|
||||
span: 24,
|
||||
render: (
|
||||
<Table
|
||||
style={{ marginBottom: 20 }}
|
||||
pagination={false}
|
||||
options={false}
|
||||
disabledResizer={true}
|
||||
toolBarRender={() => (
|
||||
<Button
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
setHiddenDiscovererUserList(getHiddenDiscovererUserList());
|
||||
setCurrentHiddenInfo({});
|
||||
currentHiddenIndex.current = -1;
|
||||
setHiddenAddModalOpen(true);
|
||||
}}
|
||||
>
|
||||
添加隐患
|
||||
</Button>
|
||||
)}
|
||||
dataSource={hiddenList}
|
||||
columns={[
|
||||
{ title: "问题描述", dataIndex: "hiddenDesc" },
|
||||
{
|
||||
title: "操作",
|
||||
width: 120,
|
||||
render: (_, record, index) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={async () => {
|
||||
if (record.hiddenId) {
|
||||
getCurrentHiddenInfo(record.id, record.hiddenId);
|
||||
}
|
||||
else {
|
||||
setCurrentHiddenInfo({ ...record });
|
||||
}
|
||||
setHiddenDiscovererUserList(getHiddenDiscovererUserList());
|
||||
currentHiddenIndex.current = index;
|
||||
setHiddenAddModalOpen(true);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Button
|
||||
type="link"
|
||||
danger
|
||||
onClick={() => {
|
||||
Modal.confirm({
|
||||
title: "提示",
|
||||
content: "确定删除该隐患吗?",
|
||||
onOk: async () => {
|
||||
if (record.id) {
|
||||
deleteHiddenIds.current.push(record.id);
|
||||
}
|
||||
setHiddenList(hiddenList.filter((_, i) => i !== index));
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
删除
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: ["initiator", "userRemarks"], label: "检查人意见", render: FORM_ITEM_RENDER_ENUM.TEXTAREA, span: 24 },
|
||||
{
|
||||
name: ["initiator", "signature"],
|
||||
label: "检查人",
|
||||
span: 24,
|
||||
required: false,
|
||||
rules: [{ required: true, message: "请签名" }],
|
||||
render: (
|
||||
<Signature
|
||||
url={signatureFilePath}
|
||||
onConfirm={(value) => {
|
||||
const signature = form.getFieldValue(["initiator", "signature"]);
|
||||
if (query.id && typeof signature === "string") {
|
||||
form.setFieldValue("deleteSignature", signature);
|
||||
}
|
||||
form.setFieldValue(["initiator", "signature"], value.file);
|
||||
form.setFieldValue(["initiator", "signatureTime"], value.time);
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{ name: ["initiator", "signatureTime"], label: "签字时间", onlyForLabel: true },
|
||||
{ name: "deleteSignature", label: "删除的签字图片", onlyForLabel: true },
|
||||
]}
|
||||
/>
|
||||
{
|
||||
hiddenAddModalOpen && (
|
||||
<HiddenAddModal
|
||||
|
|
@ -611,7 +608,7 @@ function Add(props) {
|
|||
/>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { Button, Form, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary";
|
||||
|
|
@ -34,7 +35,7 @@ function List(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Page isShowAllAction={!!props.headerTitle} headerTitle={props.headerTitle}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
|
|
@ -140,7 +141,7 @@ function List(props) {
|
|||
/>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { Button, Form, message, Modal, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary";
|
||||
|
|
@ -29,7 +30,7 @@ function List(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
|
|
@ -101,7 +102,7 @@ function List(props) {
|
|||
getData={getData}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -125,20 +126,21 @@ function VerifyModalComponent(props) {
|
|||
return (
|
||||
<Modal
|
||||
title="检查核实"
|
||||
width={1000}
|
||||
width={600}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
loading={uploadFileLoading || props.inspection.inspectorLoading}
|
||||
confirmLoading={uploadFileLoading || props.inspection.inspectorLoading}
|
||||
>
|
||||
<FormBuilder
|
||||
loading={uploadFileLoading || props.inspection.inspectorLoading}
|
||||
form={form}
|
||||
span={24}
|
||||
values={{
|
||||
status: "1",
|
||||
}}
|
||||
labelCol={{ span: 8 }}
|
||||
labelCol={{ span: 10 }}
|
||||
showActionButtons={false}
|
||||
onFinish={onSubmit}
|
||||
options={[
|
||||
|
|
|
|||
|
|
@ -4,15 +4,16 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { Button, Form, message, Modal, Space, Spin } from "antd";
|
||||
import { useEffect, useState } from "react";
|
||||
import ExportIcon from "zy-react-library/components/Icon/ExportIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary";
|
||||
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 useUrlQueryCriteria from "zy-react-library/hooks/useUrlQueryCriteria";
|
||||
import useDownloadBlob from "zy-react-library/hooks/useDownloadBlob";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
import useUrlQueryCriteria from "zy-react-library/hooks/useUrlQueryCriteria";
|
||||
import { getLabelName } from "zy-react-library/utils";
|
||||
import InspectionFlowModal from "~/components/InspectionFlowModal";
|
||||
import { INSPECTION_QUESTION_ENUM, INSPECTION_STATE_ENUM, PLAN_ENUM } from "~/enumerate/constant";
|
||||
|
|
@ -80,7 +81,7 @@ function List(props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Page isShowAllAction={!!query.headerTitle} headerTitle={query.headerTitle}>
|
||||
<Search
|
||||
labelCol={{ span: 8 }}
|
||||
values={{
|
||||
|
|
@ -151,7 +152,7 @@ function List(props) {
|
|||
onClick={async () => {
|
||||
const exportParams = getUrlCriteriaQuery("searchFormKeys", "searchFormValues");
|
||||
|
||||
await downloadBlob("/accident/accident/export", { params: { ...exportParams, eqType: props.type } })
|
||||
await downloadBlob("/accident/accident/export", { params: { ...exportParams, eqType: props.type } });
|
||||
}}
|
||||
>
|
||||
导出
|
||||
|
|
@ -228,7 +229,7 @@ function List(props) {
|
|||
/>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { Button, Descriptions, Divider, Modal, Space, Spin } from "antd";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { useReactToPrint } from "react-to-print";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import PreviewImg from "zy-react-library/components/PreviewImg";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
||||
import { getFileUrl, getLabelName } from "zy-react-library/utils";
|
||||
import HiddenFlowModal from "~/components/HiddenFlowModal";
|
||||
import { PLAN_ENUM } from "~/enumerate/constant";
|
||||
|
|
@ -19,7 +18,6 @@ import "./index.less";
|
|||
function InspectionView(props) {
|
||||
const query = useGetUrlQuery();
|
||||
const { loading: getFileLoading, getFile } = useGetFile();
|
||||
const { getUserInfo } = useGetUserInfo();
|
||||
|
||||
const [info, setInfo] = useState({
|
||||
inspectedPartyConfirmation: {},
|
||||
|
|
@ -53,7 +51,6 @@ function InspectionView(props) {
|
|||
});
|
||||
|
||||
const getData = async () => {
|
||||
const userInfo = await getUserInfo();
|
||||
const { data } = await props["inspectionView"]({ inspectionId: query.id });
|
||||
for (let i = 0; i < data.content.length; i++) {
|
||||
const files = await getFile({
|
||||
|
|
@ -62,12 +59,12 @@ function InspectionView(props) {
|
|||
});
|
||||
data.content[i].files = files;
|
||||
}
|
||||
data.inspector.forEach(item => {
|
||||
setCurrentInspectorDepartmentName(prev => [...prev, item.departmentName || ""])
|
||||
})
|
||||
data.inspectorVerificationList.forEach(item => {
|
||||
setCurrentInspectorUserName(prev => [...prev, item.userName || ""])
|
||||
})
|
||||
data.inspector.forEach((item) => {
|
||||
setCurrentInspectorDepartmentName(prev => [...prev, item.departmentName || ""]);
|
||||
});
|
||||
data.inspectorVerificationList.forEach((item) => {
|
||||
setCurrentInspectorUserName(prev => [...prev, item.userName || ""]);
|
||||
});
|
||||
setInfo(data);
|
||||
const { data: hiddenList } = await props["hiddenList"]({ foreignKey: query.inspectionId, pageIndex: 1, pageSize: 999 });
|
||||
setHiddenList(hiddenList);
|
||||
|
|
@ -77,10 +74,9 @@ function InspectionView(props) {
|
|||
}, []);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="查看" />
|
||||
<Page headerTitle="查看">
|
||||
<Spin spinning={props.inspection.inspectionLoading || getFileLoading}>
|
||||
<div style={{ padding: 20, paddingBottom: 0 }} ref={contentRef}>
|
||||
<div ref={contentRef}>
|
||||
<Divider orientation="left">
|
||||
{info.subject}
|
||||
现场安全检查记录
|
||||
|
|
@ -127,7 +123,8 @@ function InspectionView(props) {
|
|||
{ title: "隐患描述", dataIndex: "hiddenDesc" },
|
||||
{ title: "隐患部位", dataIndex: "hiddenPartName" },
|
||||
{
|
||||
title: "操作", render: (_, record) => (
|
||||
title: "操作",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
|
|
@ -149,7 +146,7 @@ function InspectionView(props) {
|
|||
流程图
|
||||
</Button>
|
||||
</Space>
|
||||
)
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
|
@ -245,7 +242,7 @@ function InspectionView(props) {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,7 @@
|
|||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import InspectionList from "../../../Inspection/Inspection/List";
|
||||
|
||||
function InspectionRecords(props) {
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="检查记录" />
|
||||
<div style={{ paddingBottom: 10 }}>
|
||||
<InspectionList updatePermissionKey="inspection-qy-check-edit2" {...props} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return (<InspectionList updatePermissionKey="inspection-qy-check-edit2" headerTitle="检查记录" {...props} />);
|
||||
}
|
||||
|
||||
export default InspectionRecords;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
|||
import { Button, Form, Modal, Space } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import { useState } from "react";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary";
|
||||
|
|
@ -21,7 +22,7 @@ function List(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
options={[
|
||||
{
|
||||
|
|
@ -127,7 +128,7 @@ function List(props) {
|
|||
/>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -144,14 +145,14 @@ const PlanExecutionPersonnelModalComponent = (props) => {
|
|||
title="计划执行人员"
|
||||
open
|
||||
maskClosable={false}
|
||||
width={1000}
|
||||
width={800}
|
||||
onCancel={props.onCancel}
|
||||
footer={[
|
||||
<Button key="cancel" onClick={props.onCancel}>取消</Button>,
|
||||
]}
|
||||
>
|
||||
<Search
|
||||
labelCol={{ span: 6 }}
|
||||
labelCol={{ span: 8 }}
|
||||
options={[
|
||||
{ name: "departmentId", label: "部门", render: <DepartmentSelectTree /> },
|
||||
{ name: "userName", label: "人员" },
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import dayjs from "dayjs";
|
|||
import { useEffect, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import AddIcon from "zy-react-library/components/Icon/AddIcon";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import PersonnelSelect from "zy-react-library/components/Select/Personnel/Gwj";
|
||||
import DictionarySelectTree from "zy-react-library/components/SelectTree/Dictionary";
|
||||
|
|
@ -49,7 +50,7 @@ function List(props) {
|
|||
};
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Page isShowAllAction={!!query.headerTitle} headerTitle={query.headerTitle}>
|
||||
<Search
|
||||
options={[
|
||||
{
|
||||
|
|
@ -208,7 +209,7 @@ function List(props) {
|
|||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -271,17 +272,18 @@ const AddModalComponent = (props) => {
|
|||
return (
|
||||
<Modal
|
||||
title={props.id ? "编辑" : "新增"}
|
||||
width={800}
|
||||
width={600}
|
||||
open
|
||||
maskClosable={false}
|
||||
onOk={form.submit}
|
||||
onCancel={props.onCancel}
|
||||
loading={props.plan.planLoading}
|
||||
confirmLoading={props.plan.planLoading}
|
||||
>
|
||||
<FormBuilder
|
||||
loading={props.plan.planLoading}
|
||||
form={form}
|
||||
showActionButtons={false}
|
||||
labelCol={{ span: 8 }}
|
||||
labelCol={{ span: 10 }}
|
||||
span={24}
|
||||
onFinish={onSubmit}
|
||||
options={[
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Divider, Space } from "antd";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
|
|
@ -14,53 +14,50 @@ function PersonnelExecutionDetails(props) {
|
|||
const { tableProps } = useTable(props["inspectionList"], { params: { status: "", entrance: "2", checkUserId: query.userId } });
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="计划执行总次数" />
|
||||
<div style={{ padding: "0 20px 20px 20px" }}>
|
||||
<Divider orientation="left">计划信息</Divider>
|
||||
<ViewInfo id={query.planId} />
|
||||
<Divider orientation="left">人员执行详情</Divider>
|
||||
<Table
|
||||
headerTitle={query.userName}
|
||||
columns={[
|
||||
{ title: "检查题目", dataIndex: "subject" },
|
||||
{ title: "检查发起人", dataIndex: "inspectionOriginatorUserName" },
|
||||
{ title: "检查部门", dataIndex: "inspectionDepartmentName" },
|
||||
{ title: "检查人员", dataIndex: "inspectionInspectorUserName" },
|
||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||
{ title: "检查类型", dataIndex: "typeName" },
|
||||
{ title: "检查时间", width: 200, render: (_, record) => (`自${record.timeStart}至${record.timeEnd}止`) },
|
||||
{
|
||||
title: "检查状态",
|
||||
dataIndex: "status",
|
||||
render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })),
|
||||
},
|
||||
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../../inspectionView?id=${record.id}&inspectionId=${record.inspectionId}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
disabledResizer={true}
|
||||
options={false}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Page headerTitle="计划执行总次数" contentPadding="0 20px 20px 20px">
|
||||
<Divider orientation="left">计划信息</Divider>
|
||||
<ViewInfo id={query.planId} />
|
||||
<Divider orientation="left">人员执行详情</Divider>
|
||||
<Table
|
||||
headerTitle={query.userName}
|
||||
columns={[
|
||||
{ title: "检查题目", dataIndex: "subject" },
|
||||
{ title: "检查发起人", dataIndex: "inspectionOriginatorUserName" },
|
||||
{ title: "检查部门", dataIndex: "inspectionDepartmentName" },
|
||||
{ title: "检查人员", dataIndex: "inspectionInspectorUserName" },
|
||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||
{ title: "检查类型", dataIndex: "typeName" },
|
||||
{ title: "检查时间", width: 200, render: (_, record) => (`自${record.timeStart}至${record.timeEnd}止`) },
|
||||
{
|
||||
title: "检查状态",
|
||||
dataIndex: "status",
|
||||
render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })),
|
||||
},
|
||||
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../../inspectionView?id=${record.id}&inspectionId=${record.inspectionId}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
disabledResizer={true}
|
||||
options={false}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form } from "antd";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import DepartmentSelectTree from "zy-react-library/components/SelectTree/Department/Gwj";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
|
|
@ -17,48 +17,45 @@ function PersonnelExecutionRecords(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="人员执行情况" />
|
||||
<div style={{ padding: "0 20px 20px 20px" }}>
|
||||
<Search
|
||||
labelCol={{ span: 4 }}
|
||||
options={[
|
||||
{ name: "departmentId", label: "部门", render: <DepartmentSelectTree /> },
|
||||
{ name: "userName", label: "人员" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "部门", dataIndex: "departmentName" },
|
||||
{ title: "岗位", dataIndex: "postName" },
|
||||
{ title: "姓名", dataIndex: "userName" },
|
||||
{
|
||||
title: "计划执行情况",
|
||||
dataIndex: "planExecuteNum",
|
||||
render: (_, record) => (`${record.actualExecCount}/${record.planExecuteNum}`),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 150,
|
||||
render: (_, record) => (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./personnelExecutionDetails?id=${record.id}&planId=${record.planId}&userId=${record.userId}&userName=${record.userName}`);
|
||||
}}
|
||||
>
|
||||
人员执行详情
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Page headerTitle="人员执行情况" contentPadding="0 20px 20px 20px">
|
||||
<Search
|
||||
labelCol={{ span: 4 }}
|
||||
options={[
|
||||
{ name: "departmentId", label: "部门", render: <DepartmentSelectTree /> },
|
||||
{ name: "userName", label: "人员" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "部门", dataIndex: "departmentName" },
|
||||
{ title: "岗位", dataIndex: "postName" },
|
||||
{ title: "姓名", dataIndex: "userName" },
|
||||
{
|
||||
title: "计划执行情况",
|
||||
dataIndex: "planExecuteNum",
|
||||
render: (_, record) => (`${record.actualExecCount}/${record.planExecuteNum}`),
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 150,
|
||||
render: (_, record) => (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./personnelExecutionDetails?id=${record.id}&planId=${record.planId}&userId=${record.userId}&userName=${record.userName}`);
|
||||
}}
|
||||
>
|
||||
人员执行详情
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Divider, Space } from "antd";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||
import useTable from "zy-react-library/hooks/useTable";
|
||||
|
|
@ -16,52 +16,49 @@ function PlanExecutionDetails(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="计划执行总次数" />
|
||||
<div style={{ padding: "0 20px 20px 20px" }}>
|
||||
<Divider orientation="left">计划信息</Divider>
|
||||
<ViewInfo id={query.planId} />
|
||||
<Divider orientation="left">计划执行详情</Divider>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "检查题目", dataIndex: "subject" },
|
||||
{ title: "检查发起人", dataIndex: "inspectionOriginatorUserName" },
|
||||
{ title: "检查部门", dataIndex: "inspectionDepartmentName" },
|
||||
{ title: "检查人员", dataIndex: "inspectionInspectorUserName" },
|
||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||
{ title: "检查类型", dataIndex: "typeName" },
|
||||
{ title: "检查时间", width: 200, render: (_, record) => (`自${record.timeStart}至${record.timeEnd}止`) },
|
||||
{
|
||||
title: "检查状态",
|
||||
dataIndex: "status",
|
||||
render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })),
|
||||
},
|
||||
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../../inspectionView?id=${record.id}&inspectionId=${record.inspectionId}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
disabledResizer={true}
|
||||
options={false}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Page headerTitle="计划执行总次数" contentPadding="0 20px 20px 20px">
|
||||
<Divider orientation="left">计划信息</Divider>
|
||||
<ViewInfo id={query.planId} />
|
||||
<Divider orientation="left">计划执行详情</Divider>
|
||||
<Table
|
||||
columns={[
|
||||
{ title: "检查题目", dataIndex: "subject" },
|
||||
{ title: "检查发起人", dataIndex: "inspectionOriginatorUserName" },
|
||||
{ title: "检查部门", dataIndex: "inspectionDepartmentName" },
|
||||
{ title: "检查人员", dataIndex: "inspectionInspectorUserName" },
|
||||
{ title: "被检查单位", dataIndex: "inspectionSiteDepartmentName" },
|
||||
{ title: "被检查单位现场负责人", dataIndex: "inspectedSiteManagerName", width: 200 },
|
||||
{ title: "检查类型", dataIndex: "typeName" },
|
||||
{ title: "检查时间", width: 200, render: (_, record) => (`自${record.timeStart}至${record.timeEnd}止`) },
|
||||
{
|
||||
title: "检查状态",
|
||||
dataIndex: "status",
|
||||
render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })),
|
||||
},
|
||||
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
width: 100,
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`../../inspectionView?id=${record.id}&inspectionId=${record.inspectionId}`);
|
||||
}}
|
||||
>
|
||||
查看
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
disabledResizer={true}
|
||||
options={false}
|
||||
{...tableProps}
|
||||
/>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
|
||||
function HiddenView() {
|
||||
return (
|
||||
<div>
|
||||
<Page headerTitle="查看" contentPadding="0 20px 20px 20px">
|
||||
<HiddenInfo />
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,7 @@
|
|||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import InspectionList from "../../../Inspection/Inspection/List";
|
||||
|
||||
function InspectionRecords(props) {
|
||||
return (
|
||||
<div>
|
||||
<HeaderBack title="检查记录" />
|
||||
<div style={{ paddingBottom: 10 }}>
|
||||
<InspectionList updatePermissionKey="inspection-jg-check-edit2" {...props} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
return (<InspectionList updatePermissionKey="inspection-jg-check-edit2" headerTitle="检查记录" {...props} />);
|
||||
}
|
||||
|
||||
export default InspectionRecords;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
import ViewInfoA from "~/pages/Container/BranchCompany/Plan/ViewInfo";
|
||||
|
||||
function ViewInfo(props) {
|
||||
return (
|
||||
<ViewInfoA {...props} />
|
||||
);
|
||||
return (<ViewInfoA {...props} />);
|
||||
}
|
||||
|
||||
export default ViewInfo;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
import RecordsList from "~/pages/Container/Supervision/Inspection/Records/List";
|
||||
|
||||
function InspectionRecordsList(props) {
|
||||
return <RecordsList {...props} />;
|
||||
}
|
||||
|
||||
export default InspectionRecordsList;
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form } from "antd";
|
||||
import dayjs from "dayjs";
|
||||
import Page from "zy-react-library/components/Page";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||
|
|
@ -39,7 +40,7 @@ function List(props) {
|
|||
});
|
||||
|
||||
return (
|
||||
<div style={{ padding: 20 }}>
|
||||
<Page isShowAllAction={false}>
|
||||
<Search
|
||||
values={{ dateType: "1" }}
|
||||
options={[
|
||||
|
|
@ -71,7 +72,7 @@ function List(props) {
|
|||
type="link"
|
||||
onClick={() => {
|
||||
const dates = getDate();
|
||||
props.history.push(`../plan/management/list?corpId=${record.corpId}&startTime=${dates.startTime}&endTime=${dates.endTime}&entrance=statistics`);
|
||||
props.history.push(`./planList?corpId=${record.corpId}&startTime=${dates.startTime}&endTime=${dates.endTime}&entrance=statistics&headerTitle=计划总数`);
|
||||
}}
|
||||
>
|
||||
{record.planTotal}
|
||||
|
|
@ -86,7 +87,7 @@ function List(props) {
|
|||
type="link"
|
||||
onClick={() => {
|
||||
const dates = getDate();
|
||||
props.history.push(`../plan/management/list?corpId=${record.corpId}&startTime=${dates.startTime}&endTime=${dates.endTime}&entrance=statistics&completedOnly=1`);
|
||||
props.history.push(`./planList?corpId=${record.corpId}&startTime=${dates.startTime}&endTime=${dates.endTime}&entrance=statistics&completedOnly=1&headerTitle=已完成计划数`);
|
||||
}}
|
||||
>
|
||||
{record.completedPlanCount}
|
||||
|
|
@ -106,7 +107,7 @@ function List(props) {
|
|||
type="link"
|
||||
onClick={() => {
|
||||
const dates = getDate();
|
||||
props.history.push(`../inspection/records/list?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics`);
|
||||
props.history.push(`./inspectionRecordsList?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics&headerTitle=检查总数`);
|
||||
}}
|
||||
>
|
||||
{record.inspectionTotal}
|
||||
|
|
@ -121,7 +122,7 @@ function List(props) {
|
|||
type="link"
|
||||
onClick={() => {
|
||||
const dates = getDate();
|
||||
props.history.push(`../inspection/records/list?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics&planType=1`);
|
||||
props.history.push(`./inspectionRecordsList?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics&planType=1&headerTitle=计划内检查数`);
|
||||
}}
|
||||
>
|
||||
{record.planInCount}
|
||||
|
|
@ -136,7 +137,7 @@ function List(props) {
|
|||
type="link"
|
||||
onClick={() => {
|
||||
const dates = getDate();
|
||||
props.history.push(`../inspection/records/list?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics&planType=0`);
|
||||
props.history.push(`./inspectionRecordsList?corpId=${record.corpId}&checkStartTime=${dates.startTime}&checkEndTime=${dates.endTime}&entrance=statistics&planType=0&headerTitle=计划外检查数`);
|
||||
}}
|
||||
>
|
||||
{record.planOutCount}
|
||||
|
|
@ -148,7 +149,7 @@ function List(props) {
|
|||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
</Page>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
import ManagementList from "~/pages/Container/Supervision/Plan/Management/List";
|
||||
|
||||
function PlanList(props) {
|
||||
return <ManagementList {...props} />;
|
||||
}
|
||||
|
||||
export default PlanList;
|
||||
Loading…
Reference in New Issue