更改目录结构
parent
6fe79632c3
commit
a80a2bb2f3
|
|
@ -32,7 +32,7 @@
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-to-print": "^3.2.0",
|
"react-to-print": "^3.2.0",
|
||||||
"zy-react-library": "^1.0.156"
|
"zy-react-library": "^1.0.160"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "^5.4.1",
|
"@antfu/eslint-config": "^5.4.1",
|
||||||
|
|
|
||||||
|
|
@ -20,3 +20,8 @@ export const INSPECTION_STATE_ENUM = [
|
||||||
{ bianma: "700", name: "被检查人申辩" },
|
{ bianma: "700", name: "被检查人申辩" },
|
||||||
{ bianma: "-1", name: "暂存" },
|
{ bianma: "-1", name: "暂存" },
|
||||||
];
|
];
|
||||||
|
|
||||||
|
export const PLAN_ENUM = [
|
||||||
|
{ bianma: "1", name: "计划外" },
|
||||||
|
{ bianma: "2", name: "计划内" },
|
||||||
|
];
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ function HiddenList(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`../HiddenView?hiddenId=${record.hiddenId}&id=${record.id}`);
|
props.history.push(`../../hiddenView?hiddenId=${record.hiddenId}&id=${record.id}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
@ -61,7 +61,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}&isExport=0`);
|
props.history.push(`../../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}&isExport=0`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
@ -30,7 +30,7 @@ function HiddenList(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`../HiddenView?hiddenId=${record.hiddenId}&id=${record.id}`);
|
props.history.push(`../../hiddenView?hiddenId=${record.hiddenId}&id=${record.id}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
@ -61,7 +61,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}&isExport=0`);
|
props.history.push(`../../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}&isExport=0`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
@ -73,7 +73,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}&isExport=0`);
|
props.history.push(`../../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}&isExport=0`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
@ -69,7 +69,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}&isExport=0`);
|
props.history.push(`../../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}&isExport=0`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
@ -16,10 +16,11 @@ import useDeleteFile from "zy-react-library/hooks/useDeleteFile";
|
||||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
||||||
|
import useIdle from "zy-react-library/hooks/useIdle";
|
||||||
import useIsExistenceDuplicateSelection from "zy-react-library/hooks/useIsExistenceDuplicateSelection";
|
import useIsExistenceDuplicateSelection from "zy-react-library/hooks/useIsExistenceDuplicateSelection";
|
||||||
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
import useUploadFile from "zy-react-library/hooks/useUploadFile";
|
||||||
import { getFileUrl, validatorEndTime } from "zy-react-library/utils";
|
import { getFileUrl, validatorEndTime } from "zy-react-library/utils";
|
||||||
import { INSPECTION_QUESTION_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_QUESTION_ENUM, PLAN_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
import HiddenAddModal from "./components/HiddenAdd";
|
import HiddenAddModal from "./components/HiddenAdd";
|
||||||
|
|
||||||
|
|
@ -30,11 +31,13 @@ function Add(props) {
|
||||||
const { loading: getFileLoading, getFile } = useGetFile();
|
const { loading: getFileLoading, getFile } = useGetFile();
|
||||||
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
const { loading: uploadFileLoading, uploadFile } = useUploadFile();
|
||||||
const { isExistenceDuplicateSelection } = useIsExistenceDuplicateSelection();
|
const { isExistenceDuplicateSelection } = useIsExistenceDuplicateSelection();
|
||||||
|
const isIdle = useIdle({ timeout: 5000 });
|
||||||
|
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const personUnderInspectionDepartmentId = Form.useWatch(["personUnderInspection", "departmentId"], form);
|
const personUnderInspectionDepartmentId = Form.useWatch(["personUnderInspection", "departmentId"], form);
|
||||||
const inspectorList = Form.useWatch("inspectorList", form);
|
const inspectorList = Form.useWatch("inspectorList", form);
|
||||||
const timeStart = Form.useWatch("timeStart", form);
|
const timeStart = Form.useWatch("timeStart", form);
|
||||||
|
const todo1 = Form.useWatch("todo1", form);
|
||||||
|
|
||||||
const [userInfo, setUserInfo] = useState({});
|
const [userInfo, setUserInfo] = useState({});
|
||||||
|
|
||||||
|
|
@ -296,6 +299,11 @@ function Add(props) {
|
||||||
props.history.goBack();
|
props.history.goBack();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// if (isIdle)
|
||||||
|
// onSubmit(form.getFieldsValue(), 1);
|
||||||
|
}, [isIdle]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<HeaderBack title={query.id ? "编辑" : "新增"} />
|
<HeaderBack title={query.id ? "编辑" : "新增"} />
|
||||||
|
|
@ -303,6 +311,7 @@ function Add(props) {
|
||||||
<FormBuilder
|
<FormBuilder
|
||||||
form={form}
|
form={form}
|
||||||
values={{
|
values={{
|
||||||
|
todo1: "1",
|
||||||
situationList: [{ content: undefined }],
|
situationList: [{ content: undefined }],
|
||||||
}}
|
}}
|
||||||
loading={deleteFileLoading || getFileLoading || uploadFileLoading || props.inspection.inspectionLoading}
|
loading={deleteFileLoading || getFileLoading || uploadFileLoading || props.inspection.inspectionLoading}
|
||||||
|
|
@ -325,6 +334,15 @@ function Add(props) {
|
||||||
items: INSPECTION_QUESTION_ENUM,
|
items: INSPECTION_QUESTION_ENUM,
|
||||||
span: 24,
|
span: 24,
|
||||||
},
|
},
|
||||||
|
{ name: "todo1", label: "计划属性", render: FORM_ITEM_RENDER_ENUM.RADIO, items: PLAN_ENUM, span: todo1 === "1" ? 24 : 12 },
|
||||||
|
{
|
||||||
|
name: "todo2",
|
||||||
|
label: "计划名称",
|
||||||
|
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
||||||
|
items: [],
|
||||||
|
dependencies: ["todo1"],
|
||||||
|
hidden: formValues => !(formValues.todo1 === "2"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: ["personUnderInspection", "departmentId"],
|
name: ["personUnderInspection", "departmentId"],
|
||||||
label: "被检查单位",
|
label: "被检查单位",
|
||||||
|
|
@ -14,7 +14,7 @@ import Table from "zy-react-library/components/Table";
|
||||||
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender";
|
||||||
import useTable from "zy-react-library/hooks/useTable";
|
import useTable from "zy-react-library/hooks/useTable";
|
||||||
import { getLabelName } from "zy-react-library/utils";
|
import { getLabelName } from "zy-react-library/utils";
|
||||||
import { INSPECTION_QUESTION_ENUM, INSPECTION_STATE_ENUM } from "~/enumerate/constant";
|
import { INSPECTION_QUESTION_ENUM, INSPECTION_STATE_ENUM, PLAN_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
import { getFlowData } from "~/utils/flow";
|
import { getFlowData } from "~/utils/flow";
|
||||||
import "@xyflow/react/dist/style.css";
|
import "@xyflow/react/dist/style.css";
|
||||||
|
|
@ -41,7 +41,6 @@ function List(props) {
|
||||||
});
|
});
|
||||||
const getCount = async () => {
|
const getCount = async () => {
|
||||||
const { data } = await props["inspectionCount"]();
|
const { data } = await props["inspectionCount"]();
|
||||||
console.log(data);
|
|
||||||
setCount(data);
|
setCount(data);
|
||||||
};
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -154,6 +153,7 @@ function List(props) {
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })),
|
render: (_, record) => (getLabelName({ list: INSPECTION_STATE_ENUM, status: record.status })),
|
||||||
},
|
},
|
||||||
|
{ title: "计划属性", dataIndex: "todo", render: (_, record) => getLabelName({ list: PLAN_ENUM, status: record.todo }) },
|
||||||
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
{ title: "发现隐患数", dataIndex: "hiddenNumber" },
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
|
|
@ -187,7 +187,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}`);
|
props.history.push(`../../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
function Inspection(props) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{props.children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Inspection;
|
||||||
|
|
@ -68,7 +68,7 @@ function List(props) {
|
||||||
<Button
|
<Button
|
||||||
type="link"
|
type="link"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.history.push(`../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}&isExport=0`);
|
props.history.push(`../../viewInfo?id=${record.id}&inspectionId=${record.inspectionId}&isExport=0`);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
|
|
@ -11,7 +11,8 @@ import { UPLOAD_FILE_TYPE_ENUM } from "zy-react-library/enum/uploadFile/gwj";
|
||||||
import useGetFile from "zy-react-library/hooks/useGetFile";
|
import useGetFile from "zy-react-library/hooks/useGetFile";
|
||||||
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery";
|
||||||
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo";
|
||||||
import { getFileUrl } from "zy-react-library/utils";
|
import { getFileUrl, getLabelName } from "zy-react-library/utils";
|
||||||
|
import { PLAN_ENUM } from "~/enumerate/constant";
|
||||||
import { NS_INSPECTION } from "~/enumerate/namespace";
|
import { NS_INSPECTION } from "~/enumerate/namespace";
|
||||||
import { getFlowData } from "~/utils/flow";
|
import { getFlowData } from "~/utils/flow";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
@ -85,11 +86,13 @@ function View(props) {
|
||||||
items={[
|
items={[
|
||||||
{ label: "被检查单位", children: info.inspectedPartyConfirmation.departmentName },
|
{ label: "被检查单位", children: info.inspectedPartyConfirmation.departmentName },
|
||||||
{ label: "被检查单位现场负责人", children: info.inspectedPartyConfirmation.userName },
|
{ label: "被检查单位现场负责人", children: info.inspectedPartyConfirmation.userName },
|
||||||
{ label: "检查场所", children: info.place, span: 2 },
|
|
||||||
{ label: "牵头检查部门", children: info.currentInspectorUser.departmentName },
|
{ label: "牵头检查部门", children: info.currentInspectorUser.departmentName },
|
||||||
{ label: "检查人员", children: info.currentInspectorUser.userName },
|
{ label: "检查人", children: info.currentInspectorUser.userName },
|
||||||
{ label: "检查类型", children: info.typeName },
|
{ label: "检查类型", children: info.typeName },
|
||||||
{ label: "检查时间", children: `${info.timeStart}至${info.timeEnd}` },
|
{ label: "检查时间", children: `${info.timeStart}至${info.timeEnd}` },
|
||||||
|
{ label: "检查场所", children: info.place, span: 2 },
|
||||||
|
{ label: "计划属性", children: getLabelName({ list: PLAN_ENUM, status: info.todo1 }), span: 2 },
|
||||||
|
{ label: "计划名称", children: info.todo2, span: 2 },
|
||||||
{ label: "记录填写时间", children: info.createTime, span: 2 },
|
{ label: "记录填写时间", children: info.createTime, span: 2 },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import AcceptanceAcceptance from "../../../BranchCompany/Acceptance/Acceptance";
|
import AcceptanceAcceptance from "~/pages/Container/BranchCompany/Inspection/Acceptance/Acceptance";
|
||||||
|
|
||||||
function Acceptance(props) {
|
function Acceptance(props) {
|
||||||
return <AcceptanceAcceptance {...props} />;
|
return <AcceptanceAcceptance {...props} />;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import AcceptanceHiddenList from "../../../BranchCompany/Acceptance/HiddenList";
|
import AcceptanceHiddenList from "~/pages/Container/BranchCompany/Inspection/Acceptance/HiddenList";
|
||||||
|
|
||||||
function HiddenList(props) {
|
function HiddenList(props) {
|
||||||
return <AcceptanceHiddenList {...props} />;
|
return <AcceptanceHiddenList {...props} />;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import AcceptanceList from "../../../BranchCompany/Acceptance/List";
|
import AcceptanceList from "~/pages/Container/BranchCompany/Inspection/Acceptance/List";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
return <AcceptanceList searchType="all" {...props} />;
|
return <AcceptanceList searchType="all" {...props} />;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import DefenseList from "../../../BranchCompany/Defense/List";
|
import DefenseList from "~/pages/Container/BranchCompany/Inspection/Defense/List";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
return <DefenseList searchType="all" {...props} />;
|
return <DefenseList searchType="all" {...props} />;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import InspectionAdd from "../../../BranchCompany/Inspection/Add";
|
import InspectionAdd from "~/pages/Container/BranchCompany/Inspection/Inspection/Add";
|
||||||
|
|
||||||
function Add(props) {
|
function Add(props) {
|
||||||
return <InspectionAdd searchType="all" source="4" {...props} />;
|
return <InspectionAdd searchType="all" source="4" {...props} />;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import InspectionList from "../../../BranchCompany/Inspection/List";
|
import InspectionList from "~/pages/Container/BranchCompany/Inspection/Inspection/List";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
return <InspectionList searchType="all" {...props} />;
|
return <InspectionList searchType="all" {...props} />;
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
function Inspection(props) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{props.children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Inspection;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import InspectorList from "../../../BranchCompany/Inspector/List";
|
import InspectorList from "~/pages/Container/BranchCompany/Inspection/Inspector/List";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
return <InspectorList searchType="all" {...props} />;
|
return <InspectorList searchType="all" {...props} />;
|
||||||
Loading…
Reference in New Issue