“申请单位”可选数据:在分公司端,可选择本公司和相关方单位组织架构;在相关方端,可选择本相关方单位组织架构
parent
0c55ddb04e
commit
5c24d321d4
|
|
@ -32,6 +32,14 @@ export const statisticsByWorkType = declareRequest(
|
|||
"eightworkLoading",
|
||||
`Post > @/eightwork/eightworkInfo/statisticsByWorkType`,
|
||||
);
|
||||
export const departmentListTree = declareRequest(
|
||||
"eightworkLoading",
|
||||
"Post > @/basicInfo/department/listTree",
|
||||
);
|
||||
export const departmentListAllTreeByCorpType = declareRequest(
|
||||
"eightworkLoading",
|
||||
"Post > @/basicInfo/department/listAllTreeByCorpType",
|
||||
);
|
||||
export const corpInfoList = declareRequest(
|
||||
"eightworkLoading",
|
||||
"Post > @/basicInfo/corpInfo/list",
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ export {};
|
|||
// HOISTING("hoisting_work", "DZ","吊装作业");
|
||||
|
||||
export const STATUS_ENUM = [
|
||||
{ name: "未开始", bianma: "0" },
|
||||
{ name: "进行中", bianma: "1" },
|
||||
{ name: "打回", bianma: "2" },
|
||||
{ name: "强制归档", bianma: "998" },
|
||||
{ name: "归档", bianma: "999" },
|
||||
{ name: "暂存", bianma: "0" },
|
||||
{ name: "已打回", bianma: "2" },
|
||||
{ name: "审批中", bianma: "1" },
|
||||
{ name: "已归档", bianma: "999" },
|
||||
{ name: "关闭归档", bianma: "998" },
|
||||
];
|
||||
export const WORK_TYPE_ENUM = [
|
||||
{ name: "相关方作业", bianma: "1" },
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ function List(props) {
|
|||
setForceTerminationModalOpen(true);
|
||||
}}
|
||||
>
|
||||
强制结束
|
||||
强制关闭
|
||||
</Button>
|
||||
)}
|
||||
</Space>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Button, Space } from "antd";
|
|||
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";
|
||||
|
|
@ -26,6 +27,7 @@ function List(props) {
|
|||
const [forceTerminationModalOpen, setForceTerminationModalOpen] = useState(false);
|
||||
const [flowModalOpen, setFlowModalOpen] = useState(false);
|
||||
const [currentId, setCurrentId] = useState("");
|
||||
const [departmentTree, setDepartmentTree] = useState([]);
|
||||
|
||||
const { tableProps, getData } = useTable(props["eightworkList"], {
|
||||
form,
|
||||
|
|
@ -37,6 +39,22 @@ 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);
|
||||
|
|
@ -44,6 +62,7 @@ function List(props) {
|
|||
|
||||
useEffect(() => {
|
||||
getEightworkType();
|
||||
getDepartmentTree();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
@ -68,7 +87,7 @@ 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: <DepartmentSelectTree multiple /> },
|
||||
{ name: "inDepartmentId", label: "申请单位", render: <BasicSelectTree treeData={departmentTree} childrenKey="childrenList" multiple /> },
|
||||
{
|
||||
name: "todo",
|
||||
label: "服务单位",
|
||||
|
|
@ -142,7 +161,7 @@ function List(props) {
|
|||
setForceTerminationModalOpen(true);
|
||||
}}
|
||||
>
|
||||
强制结束
|
||||
强制关闭
|
||||
</Button>
|
||||
)}
|
||||
</Space>
|
||||
|
|
|
|||
Loading…
Reference in New Issue