From 5c24d321d487944a4f52df5414c8ccad248a827a Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Tue, 7 Apr 2026 14:03:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=9C=E7=94=B3=E8=AF=B7=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E2=80=9D=E5=8F=AF=E9=80=89=E6=95=B0=E6=8D=AE=EF=BC=9A=E5=9C=A8?= =?UTF-8?q?=E5=88=86=E5=85=AC=E5=8F=B8=E7=AB=AF=EF=BC=8C=E5=8F=AF=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=9C=AC=E5=85=AC=E5=8F=B8=E5=92=8C=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E6=96=B9=E5=8D=95=E4=BD=8D=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84?= =?UTF-8?q?=EF=BC=9B=E5=9C=A8=E7=9B=B8=E5=85=B3=E6=96=B9=E7=AB=AF=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E9=80=89=E6=8B=A9=E6=9C=AC=E7=9B=B8=E5=85=B3=E6=96=B9?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E7=BB=84=E7=BB=87=E6=9E=B6=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eightwork/index.js | 8 +++++++ src/enumerate/constant/index.js | 10 ++++---- .../ConfinedSpaceWork/Homework/List/index.js | 2 +- .../Enterprise/HotWork/Homework/List/index.js | 23 +++++++++++++++++-- 4 files changed, 35 insertions(+), 8 deletions(-) diff --git a/src/api/eightwork/index.js b/src/api/eightwork/index.js index 39f6e27..18885fe 100644 --- a/src/api/eightwork/index.js +++ b/src/api/eightwork/index.js @@ -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", diff --git a/src/enumerate/constant/index.js b/src/enumerate/constant/index.js index 2478781..ae1947a 100644 --- a/src/enumerate/constant/index.js +++ b/src/enumerate/constant/index.js @@ -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" }, diff --git a/src/pages/Container/Enterprise/ConfinedSpaceWork/Homework/List/index.js b/src/pages/Container/Enterprise/ConfinedSpaceWork/Homework/List/index.js index ffa2603..e9d86a4 100644 --- a/src/pages/Container/Enterprise/ConfinedSpaceWork/Homework/List/index.js +++ b/src/pages/Container/Enterprise/ConfinedSpaceWork/Homework/List/index.js @@ -122,7 +122,7 @@ function List(props) { setForceTerminationModalOpen(true); }} > - 强制结束 + 强制关闭 )} diff --git a/src/pages/Container/Enterprise/HotWork/Homework/List/index.js b/src/pages/Container/Enterprise/HotWork/Homework/List/index.js index bde4ad5..591a102 100644 --- a/src/pages/Container/Enterprise/HotWork/Homework/List/index.js +++ b/src/pages/Container/Enterprise/HotWork/Homework/List/index.js @@ -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: }, + { name: "inDepartmentId", label: "申请单位", render: }, { name: "todo", label: "服务单位", @@ -142,7 +161,7 @@ function List(props) { setForceTerminationModalOpen(true); }} > - 强制结束 + 强制关闭 )}