From cd988b3aefed71c3dcb4de6cfee4b6e2f3f0cc4e Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Mon, 30 Mar 2026 09:04:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=9A=90=E6=82=A3=E8=80=83?= =?UTF-8?q?=E8=AF=84=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=8D=95?= =?UTF-8?q?=E7=8B=AC=E6=8B=89=E4=B8=80=E4=B8=AA=E6=96=B0=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- router.md | 10 - src/api/evaluationTeamConfig/index.js | 25 - src/api/hiddenEvaluation/index.js | 34 -- src/api/personnelEvaluation/index.js | 18 - src/enumerate/namespace/index.js | 3 - .../HiddenEvaluation/HiddenList/index.js | 252 ---------- .../Enterprise/HiddenEvaluation/List/index.js | 75 --- .../Enterprise/HiddenEvaluation/index.js | 9 - .../Enterprise/HiddenView/index.js | 12 - .../components/ViewEvaluationModal/index.js | 59 --- .../Container/Supervision/Enterprise/index.js | 9 - .../EvaluationTeamConfig/List/index.js | 473 ------------------ .../Evaluation/EvaluationTeamConfig/index.js | 9 - .../HiddenEvaluation/HiddenList/index.js | 251 ---------- .../Evaluation/HiddenEvaluation/List/index.js | 75 --- .../Evaluation/HiddenEvaluation/index.js | 9 - .../Evaluation/HiddenView/index.js | 12 - .../HiddenEvaluationList/index.js | 204 -------- .../PerformanceEvaluationList/List/index.js | 122 ----- .../PerformanceEvaluationList/List/index.less | 24 - .../UserExchangeList/index.js | 9 - .../UserExchangeRecordList/index.js | 9 - .../PerformanceEvaluationList/index.js | 9 - .../PersonnelEvaluation/List/index.js | 66 --- .../UserExchangeList/index.js | 170 ------- .../UserExchangeRecordList/index.js | 65 --- .../Evaluation/PersonnelEvaluation/index.js | 9 - .../components/ViewEvaluationModal/index.js | 59 --- .../Container/Supervision/Evaluation/index.js | 9 - 29 files changed, 2090 deletions(-) delete mode 100644 src/api/evaluationTeamConfig/index.js delete mode 100644 src/api/hiddenEvaluation/index.js delete mode 100644 src/api/personnelEvaluation/index.js delete mode 100644 src/pages/Container/Supervision/Enterprise/HiddenEvaluation/HiddenList/index.js delete mode 100644 src/pages/Container/Supervision/Enterprise/HiddenEvaluation/List/index.js delete mode 100644 src/pages/Container/Supervision/Enterprise/HiddenEvaluation/index.js delete mode 100644 src/pages/Container/Supervision/Enterprise/HiddenView/index.js delete mode 100644 src/pages/Container/Supervision/Enterprise/components/ViewEvaluationModal/index.js delete mode 100644 src/pages/Container/Supervision/Enterprise/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/EvaluationTeamConfig/List/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/EvaluationTeamConfig/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/HiddenEvaluation/HiddenList/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/HiddenEvaluation/List/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/HiddenEvaluation/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/HiddenView/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/HiddenEvaluationList/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/List/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/List/index.less delete mode 100644 src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/UserExchangeList/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/UserExchangeRecordList/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/List/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/UserExchangeList/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/UserExchangeRecordList/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/components/ViewEvaluationModal/index.js delete mode 100644 src/pages/Container/Supervision/Evaluation/index.js diff --git a/router.md b/router.md index 04c733c..67b8eb9 100644 --- a/router.md +++ b/router.md @@ -16,13 +16,3 @@ #### /hidden/container/supervision/average/average/corpInfoList 一般 #### /hidden/container/supervision/average/duplicateHazard/list 隐患重复统计 #### /hidden/container/supervision/average/aIHazardIdentification/list AI隐患识别记录 - -## 隐患考评 -### 监管端 -#### /hidden/container/supervision/evaluation/evaluationTeamConfig/list 分公司考评组配置 -#### /hidden/container/supervision/evaluation/hiddenEvaluation/list 分公司隐患考评 -#### /hidden/container/supervision/evaluation/personnelEvaluation/list 人员考评管理 -#### /hidden/container/supervision/evaluation/performanceEvaluationList/list 分公司绩效考评 - -### 分公司端 -#### /hidden/container/supervision/Enterprise/hiddenEvaluation/list 分公司隐患考评 diff --git a/src/api/evaluationTeamConfig/index.js b/src/api/evaluationTeamConfig/index.js deleted file mode 100644 index 89f4598..0000000 --- a/src/api/evaluationTeamConfig/index.js +++ /dev/null @@ -1,25 +0,0 @@ -import { declareRequest } from "@cqsjjb/jjb-dva-runtime"; - -export const evaluationTeamConfigList = declareRequest( - "evaluationTeamConfigLoading", - "Post > @/hidden/evaluateGroupUserConfig/page", -); -export const evaluationTeamConfigAdd = declareRequest( - "evaluationTeamConfigLoading", - "Post > @/hidden/evaluateGroupUserConfig/saveT", -); -export const evaluationTeamConfigUpdate = declareRequest( - "evaluationTeamConfigLoading", - "Put > @/hidden/evaluateGroupUserConfig/editT", -); -export const evaluationTeamConfigView = declareRequest( - "evaluationTeamConfigLoading", - "Post > @/hidden/evaluateGroupUserConfig/groupDetail", -); -export const evaluationTeamConfigChangeLog = declareRequest( - "evaluationTeamConfigLoading", - `Post > @/hidden/evaluateConfigUpdateRecord/list`, -); -export const corpInfoList = declareRequest( - `Post > @/basicInfo/corpInfo/list`, -); diff --git a/src/api/hiddenEvaluation/index.js b/src/api/hiddenEvaluation/index.js deleted file mode 100644 index 8231d8c..0000000 --- a/src/api/hiddenEvaluation/index.js +++ /dev/null @@ -1,34 +0,0 @@ -import { declareRequest } from "@cqsjjb/jjb-dva-runtime"; - -export const hiddenEvaluationList = declareRequest( - "hiddenEvaluationLoading", - "Post > @/hidden/evaluateGroupUserConfig/hiddenEvaluatePage", -); -export const hiddenEvaluationHiddenList = declareRequest( - "hiddenEvaluationLoading", - "Post > @/hidden/viewHiddenEvaluate/list", -); -export const hiddenEvaluationHiddenEvaluationView = declareRequest( - "hiddenEvaluationLoading", - "Post > @/hidden/evaluateGroupUserConfig/viewList", -); -export const hiddenEvaluationHiddenEvaluationAdd = declareRequest( - "hiddenEvaluationLoading", - "Post > @/hidden/evaluateHiddenDetail/save", -); -export const hiddenEvaluationHiddenEvaluationUpdate = declareRequest( - "hiddenEvaluationLoading", - "Put > @T/hidden/evaluateHiddenDetail/edit", -); -export const viewCorpEvaluatePerformanceList = declareRequest( - "hiddenEvaluationLoading", - "Post > @/hidden/viewCorpEvaluatePerformance/list", -); -export const evaluateHiddenDetailList = declareRequest( - "hiddenEvaluationLoading", - "Post > @/hidden/evaluateHiddenDetail/list", -); -export const viewUserEvaluateConditionList = declareRequest( - "hiddenEvaluationLoading", - "Post > @/hidden/viewUserEvaluateConditionList/exchangeAll", -); diff --git a/src/api/personnelEvaluation/index.js b/src/api/personnelEvaluation/index.js deleted file mode 100644 index 6846ec9..0000000 --- a/src/api/personnelEvaluation/index.js +++ /dev/null @@ -1,18 +0,0 @@ -import { declareRequest } from "@cqsjjb/jjb-dva-runtime"; - -export const personnelEvaluationList = declareRequest( - "personnelEvaluationLoading", - "Post > @/hidden/viewUserEvaluateCondition/list", -); -export const personnelEvaluationUserExchangeList = declareRequest( - "personnelEvaluationLoading", - "Post > @/hidden/viewUserEvaluateConditionList/list", -); -export const personnelEvaluationExchange = declareRequest( - "personnelEvaluationLoading", - "Post > @/hidden/viewUserEvaluateConditionList/exchange", -); -export const personnelEvaluationUserExchangeRecordList = declareRequest( - "personnelEvaluationLoading", - "Post > @/hidden/evaluateExchangeRecord/list", -); diff --git a/src/enumerate/namespace/index.js b/src/enumerate/namespace/index.js index 794f90f..b9271bd 100644 --- a/src/enumerate/namespace/index.js +++ b/src/enumerate/namespace/index.js @@ -14,6 +14,3 @@ export const NS_SPECIAL_DISPOSAL = defineNamespace("specialDisposal"); export const NS_ACCEPTANCE = defineNamespace("acceptance"); export const NS_PART = defineNamespace("part"); export const NS_AVERAGE = defineNamespace("average"); -export const NS_EVALUATION_TEAM_CONFIG = defineNamespace("evaluationTeamConfig"); -export const NS_HIDDEN_EVALUATION = defineNamespace("hiddenEvaluation"); -export const NS_PERSONNEL_EVALUATION = defineNamespace("personnelEvaluation"); diff --git a/src/pages/Container/Supervision/Enterprise/HiddenEvaluation/HiddenList/index.js b/src/pages/Container/Supervision/Enterprise/HiddenEvaluation/HiddenList/index.js deleted file mode 100644 index 09107b8..0000000 --- a/src/pages/Container/Supervision/Enterprise/HiddenEvaluation/HiddenList/index.js +++ /dev/null @@ -1,252 +0,0 @@ -import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Descriptions, Form, message, Modal, Space, Spin } from "antd"; -import { useEffect, useRef, 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"; -import Table from "zy-react-library/components/Table"; -import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; -import { HIDDEN_SOURCE_ENUM, HIDDEN_STATE_ENUM } from "zy-react-library/enum/hidden/gwj"; -import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; -import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo"; -import useTable from "zy-react-library/hooks/useTable"; -import { getLabelName } from "zy-react-library/utils"; -import { NS_HIDDEN_EVALUATION } from "~/enumerate/namespace"; -import ViewEvaluationModal from "../../components/ViewEvaluationModal"; - -function HiddenList(props) { - const query = useGetUrlQuery(); - const [viewEvaluationModalOpen, setViewEvaluationModalOpen] = useState(false); - const [evaluationModalOpen, setEvaluationModalOpen] = useState(false); - const [currentHiddenId, setCurrentHiddenId] = useState(""); - const [form] = Form.useForm(); - const { tableProps, getData } = useTable(props["hiddenEvaluationHiddenList"], { - form, - params: { - eqCorpId: query.corpinfoId, - eqHiddenType: query.hiddenType, - }, - transform: formData => ({ - geHiddenFindTime: formData.hiddenFindTime?.[0], - leHiddenFindTime: formData.hiddenFindTime?.[1], - geFinalDoneTime: formData.finalDoneTime?.[0], - leFinalDoneTime: formData.finalDoneTime?.[1], - }), - }); - - return ( - - ) }, - { name: "likeFindUserName", label: "隐患发现人" }, - { name: "hiddenFindTime", label: "隐患发现时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, - { - name: "eqHiddenTypeC", - label: "隐患类型", - render: , - }, - { - name: "eqEvaState", - label: "考评结果", - render: FORM_ITEM_RENDER_ENUM.SELECT, - items: [ - { bianma: "1", name: "是" }, - { bianma: "2", name: "否" }, - { bianma: "3", name: "考评合格" }, - { bianma: "4", name: "考评不合格" }, - ], - }, - { - name: "eqSelf", - label: "本人是否考评", - render: FORM_ITEM_RENDER_ENUM.SELECT, - items: [{ bianma: "1", name: "是" }, { bianma: "0", name: "否" }], - }, - { name: "finalDoneTime", label: "考评完成时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, - ]} - form={form} - onFinish={getData} - /> - getLabelName({ list: HIDDEN_SOURCE_ENUM, status: record.source }), - }, - { title: "隐患描述", dataIndex: "hiddenDesc" }, - { title: "隐患发现时间", dataIndex: "hiddenFindTime" }, - { title: "隐患发现人", dataIndex: "findUserName" }, - { title: "隐患验收人", dataIndex: "finalCheckOr" }, - { - title: "隐患状态", - dataIndex: "state", - render: (_, record) => getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }), - }, - { title: "已考评组成员", dataIndex: "alreadyEvaluate" }, - { title: "待考评组成员", dataIndex: "notEvaluate" }, - { - title: "考评结果", - dataIndex: "finalResult", - render: (_, record) => { - switch (record.finalResult) { - case 1: - return "考评合格"; - case 0: - return "考评不合格"; - default: - return "考核未完成"; - } - }, - }, - { - title: "操作", - width: 230, - fixed: "right", - render: (_, record) => ( - - - - { - record.isPermission === 1 && ( - - ) - } - - ), - }, - ]} - {...tableProps} - /> - {viewEvaluationModalOpen - && setViewEvaluationModalOpen(false)} hiddenId={currentHiddenId} url="hiddenEvaluationHiddenEvaluationView" />} - {evaluationModalOpen - && setEvaluationModalOpen(false)} hiddenId={currentHiddenId} getData={getData} />} - - ); -} - -const EvaluationModalComponent = (props) => { - const { getUserInfo } = useGetUserInfo(); - const [form] = Form.useForm(); - const [list, setList] = useState([]); - const isEdit = useRef(false); - const getData = async () => { - const { data } = await props["hiddenEvaluationHiddenEvaluationView"]({ eqId: props.hiddenId }); - setList(data); - isEdit.current = (!!data?.[0]?.id); - const userInfo = await getUserInfo(); - form.setFieldValue("user", `${userInfo.departmentName}-${userInfo.name}`); - }; - - useEffect(() => { - getData(); - }, []); - - const onSubmit = async (values) => { - const { success } = await props[isEdit ? "hiddenEvaluationHiddenEvaluationUpdate" : "hiddenEvaluationHiddenEvaluationAdd"]({ - ...values, - hiddenId: props.hiddenId, - }); - if (success) { - message.success("考评成功"); - props.onCancel(); - props.getData(); - } - }; - - return ( - - - ([ - { label: "考评人员", children: item.evaluateMemberName }, - { - label: "是否符合", - children: (() => { - switch (item.evaluateResult) { - case 1: - return "考评合格"; - case 0: - return "考评不合格"; - default: - return "考核未完成"; - } - })(), - }, - ...(item.evaluateResult === 0 ? [{ label: "不符合原因", children: `111`, span: 2 }] : []), - ])), - ]} - /> - !(formValues.result === 0), - }, - ]} - /> - - - ); -}; - -const EvaluationModal = Connect([NS_HIDDEN_EVALUATION], true)(EvaluationModalComponent); -export default Connect([NS_HIDDEN_EVALUATION], true)(HiddenList); diff --git a/src/pages/Container/Supervision/Enterprise/HiddenEvaluation/List/index.js b/src/pages/Container/Supervision/Enterprise/HiddenEvaluation/List/index.js deleted file mode 100644 index 8a2b442..0000000 --- a/src/pages/Container/Supervision/Enterprise/HiddenEvaluation/List/index.js +++ /dev/null @@ -1,75 +0,0 @@ -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 Table from "zy-react-library/components/Table"; -import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; -import useTable from "zy-react-library/hooks/useTable"; -import { NS_HIDDEN_EVALUATION } from "~/enumerate/namespace"; - -const STATE_ENUM = [ - { bianma: "1", name: "安全类已分配" }, - { bianma: "2", name: "安全类未分配" }, - { bianma: "3", name: "环保类已分配" }, - { bianma: "4", name: "环保类未分配" }, -]; -function List(props) { - const [form] = Form.useForm(); - const { tableProps, getData } = useTable(props["hiddenEvaluationList"], { - form, - }); - - return ( - - -
( - <> - {record.hiddenType === "aqyh" && "安全类"} - {record.hiddenType === "wshb" && "环保类"} - - ) }, - { title: "安全环保奖惩监管端", dataIndex: "superviseTotal", render: (_, record) => (`${record.superviseDone}/${record.superviseTotal}`) }, - { title: "安全环保奖惩企业端", dataIndex: "enterpriseTotal", render: (_, record) => (`${record.enterpriseDone}/${record.enterpriseTotal}`) }, - { title: "隐患排查", dataIndex: "troubleshootTotal", render: (_, record) => (`${record.troubleshootDone}/${record.troubleshootTotal}`) }, - { title: "隐患快报", dataIndex: "bulletinTotal", render: (_, record) => (`${record.bulletinDone}/${record.bulletinTotal}`) }, - { title: "消防检查", dataIndex: "fireControlTotal", render: (_, record) => (`${record.fireControlDone}/${record.fireControlTotal}`) }, - { title: "考评组成员", dataIndex: "members" }, - { - title: "操作", - width: 100, - fixed: "right", - render: (_, record) => ( - - {props.permission("fgs-kp-kp") && ( - - )} - - ), - }, - ]} - {...tableProps} - /> - - ); -} - -export default Connect([NS_HIDDEN_EVALUATION], true)(Permission(List)); diff --git a/src/pages/Container/Supervision/Enterprise/HiddenEvaluation/index.js b/src/pages/Container/Supervision/Enterprise/HiddenEvaluation/index.js deleted file mode 100644 index de44bad..0000000 --- a/src/pages/Container/Supervision/Enterprise/HiddenEvaluation/index.js +++ /dev/null @@ -1,9 +0,0 @@ -function HiddenEvaluation(props) { - return ( -
- {props.children} -
- ); -} - -export default HiddenEvaluation; diff --git a/src/pages/Container/Supervision/Enterprise/HiddenView/index.js b/src/pages/Container/Supervision/Enterprise/HiddenView/index.js deleted file mode 100644 index aa91bb4..0000000 --- a/src/pages/Container/Supervision/Enterprise/HiddenView/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj"; -import Page from "zy-react-library/components/Page"; - -function HiddenView() { - return ( - - - - ); -} - -export default HiddenView; diff --git a/src/pages/Container/Supervision/Enterprise/components/ViewEvaluationModal/index.js b/src/pages/Container/Supervision/Enterprise/components/ViewEvaluationModal/index.js deleted file mode 100644 index bec423d..0000000 --- a/src/pages/Container/Supervision/Enterprise/components/ViewEvaluationModal/index.js +++ /dev/null @@ -1,59 +0,0 @@ -import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Descriptions, Modal } from "antd"; -import { useEffect, useState } from "react"; -import { NS_HIDDEN_EVALUATION } from "~/enumerate/namespace"; - -const ViewEvaluationModal = (props) => { - const [list, setList] = useState([]); - const getData = async () => { - const { data } = await props["hiddenEvaluationHiddenEvaluationView"]({ eqId: props.hiddenId }); - // evaluateHiddenDetailList - setList(data); - }; - - useEffect(() => { - getData(); - }, []); - - return ( - - 取消 - , - ]} - > - ([ - { label: "考评人员", children: item.evaluateMemberName }, - { - label: "是否符合", - children: (() => { - switch (item.evaluateResult) { - case 1: - return "考评合格"; - case 0: - return "考评不合格"; - default: - return "考核未完成"; - } - })(), - }, - ...(item.evaluateResult === 0 ? [{ label: "不符合原因", children: "todo", span: 2 }] : []), - ])), - ]} - /> - - ); -}; - -export default Connect([NS_HIDDEN_EVALUATION], true)(ViewEvaluationModal); diff --git a/src/pages/Container/Supervision/Enterprise/index.js b/src/pages/Container/Supervision/Enterprise/index.js deleted file mode 100644 index eda14bf..0000000 --- a/src/pages/Container/Supervision/Enterprise/index.js +++ /dev/null @@ -1,9 +0,0 @@ -function Supervision(props) { - return ( -
- {props.children} -
- ); -} - -export default Supervision; diff --git a/src/pages/Container/Supervision/Evaluation/EvaluationTeamConfig/List/index.js b/src/pages/Container/Supervision/Evaluation/EvaluationTeamConfig/List/index.js deleted file mode 100644 index 18ab015..0000000 --- a/src/pages/Container/Supervision/Evaluation/EvaluationTeamConfig/List/index.js +++ /dev/null @@ -1,473 +0,0 @@ -import { Permission } from "@cqsjjb/jjb-common-decorator/permission"; -import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Descriptions, Form, message, Modal, Space } from "antd"; -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 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 useIsExistenceDuplicateSelection from "zy-react-library/hooks/useIsExistenceDuplicateSelection"; -import useTable from "zy-react-library/hooks/useTable"; -import { getLabelName } from "zy-react-library/utils"; -import { NS_EVALUATION_TEAM_CONFIG } from "~/enumerate/namespace"; - -const STATE_ENUM = [ - { bianma: "1", name: "安全类已分配" }, - { bianma: "2", name: "安全类未分配" }, - { bianma: "3", name: "环保类已分配" }, - { bianma: "4", name: "环保类未分配" }, - { bianma: "5", name: "安全类和环保类已分配" }, - { bianma: "6", name: "安全类和环保类已分配" }, -]; - -function List(props) { - const [form] = Form.useForm(); - const [configModalOpen, setConfigModalOpen] = useState(false); - const [configType, setConfigType] = useState(""); - const [currentData, setCurrentData] = useState({}); - const [addModalOpen, setAddModalOpen] = useState(false); - const [viewModalOpen, setViewModalOpen] = useState(false); - const [changeLogModalOpen, setChangeLogModalOpen] = useState(false); - - const { tableProps, getData } = useTable(props["evaluationTeamConfigList"], { - form, - }); - - return ( - - -
( - props.permission("jgd-yhkp-kpz-tjqy") && ( - - ) - )} - columns={[ - { title: "分公司名称", dataIndex: "corpinfoName" }, - { - title: "安全类隐患考评组分配状态", - dataIndex: "safetyFlag", - width: 220, - render: (_, record) => (record.safetyFlag === 1 ? "已分配" : "未分配"), - }, - { title: "考评组成员", dataIndex: "safetyMembers" }, - { - title: "环保类隐患考评组分配状态", - dataIndex: "environmentalFlag", - width: 220, - render: (_, record) => (record.safetyFlag === 1 ? "已分配" : "未分配"), - }, - { title: "考评组成员", dataIndex: "environmentalMembers" }, - { - title: "操作", - width: 330, - fixed: "right", - render: (_, record) => ( - - {props.permission("jgd-yhkp-kpz-ck") && ( - - )} - {props.permission("jgd-yhkp-kpz-aqz") && ( - - )} - {props.permission("jgd-yhkp-kpz-hbz") && ( - - )} - {props.permission("jgd-yhkp-kpz-bgjl") && ( - - )} - - ), - }, - ]} - {...tableProps} - /> - {configModalOpen - && ( - setConfigModalOpen(false)} - getData={getData} - data={currentData} - /> - )} - {addModalOpen - && ( - setAddModalOpen(false)} - getData={getData} - /> - )} - {viewModalOpen - && ( - setViewModalOpen(false)} - data={currentData} - /> - )} - {changeLogModalOpen - && ( - setChangeLogModalOpen(false)} - data={currentData} - /> - )} - - ); -} - -const ConfigModalComponent = (props) => { - const configType = props.configType; - const configTypeName = configType === "safety" ? "安全类" : "环保类"; - const corpinfoId = props.data.corpinfoId; - - const [form] = Form.useForm(); - const evaluateGroupUserConfigUpdateCmdList = Form.useWatch("evaluateGroupUserConfigUpdateCmdList", form); - - const { isExistenceDuplicateSelection } = useIsExistenceDuplicateSelection(); - - const getData = async () => { - const { data } = await props["evaluationTeamConfigView"]({ - eqCorpinfoId: corpinfoId, - eqType: configType === "safety" ? "aqyh" : "wshb", - }); - form.setFieldValue("evaluateGroupUserConfigUpdateCmdList", data); - }; - - useEffect(() => { - corpinfoId && getData(); - }, []); - const onSubmit = async (values) => { - await isExistenceDuplicateSelection({ data: values.evaluateGroupUserConfigUpdateCmdList, key: "memberId" }); - const { success } = await props["evaluationTeamConfigUpdate"]({ - ...values, - corpinfoId, - corpinfoName: props.data.corpinfoName, - }); - if (success) { - message.success("操作成功"); - props.onCancel(); - props.getData(); - } - }; - - return ( - - ([ - { - name: [field.name, "memberDeptId"], - label: "考评部门", - render: ( - { - form.setFieldValue(["evaluateGroupUserConfigUpdateCmdList", field.name, "memberId"], ""); - form.setFieldValue(["evaluateGroupUserConfigUpdateCmdList", field.name, "memberName"], ""); - }} - onGetLabel={(label) => { - form.setFieldValue(["evaluateGroupUserConfigUpdateCmdList", field.name, "memberDeptName"], label); - }} - /> - ), - }, - { name: [field.name, "memberDeptName"], label: "考评部门名称", onlyForLabel: true }, - { - name: [field.name, "memberId"], - label: "考评人员", - render: ( - form.setFieldValue(["evaluateGroupUserConfigUpdateCmdList", field.name, "memberName"], label)} - /> - ), - }, - { name: [field.name, "memberName"], label: "考评人员名称", onlyForLabel: true }, - { name: [field.name, "type"], label: "用户类型", onlyForLabel: true }, - ]), - }, - }, - ]} - /> - - ); -}; - -const AddModalComponent = (props) => { - const [form] = Form.useForm(); - const [corpInfoList, setCorpInfoList] = useState([]); - - const getCorpInfoList = async () => { - const { data } = await props["corpInfoList"]({ pageIndex: 1, pageSize: 1000 }); - setCorpInfoList(data); - }; - - useEffect(() => { - getCorpInfoList(); - }, []); - - const onSubmit = async (values) => { - const { success } = await props["evaluationTeamConfigAdd"]({ - ...values, - }); - if (success) { - message.success("操作成功"); - props.onCancel(); - props.getData(); - } - }; - - return ( - - { - form.setFieldValue("corpinfoName", getLabelName({ - list: corpInfoList, - status: value, - idKey: "id", - nameKey: "corpName", - })); - }, - }, - }, - { name: "corpinfoName", label: "分公司名称", onlyForLabel: true }, - ]} - /> - - ); -}; - -const ViewModalComponent = (props) => { - const corpinfoId = props.data.corpinfoId; - - const [safetyList, setSafetyList] = useState([]); - const [environmentalList, setEnvironmentalList] = useState([]); - - const getData = async () => { - const { data: safetyList } = await props["evaluationTeamConfigView"]({ - eqCorpinfoId: corpinfoId, - eqType: "aqyh", - }); - setSafetyList(safetyList); - const { data: environmentalList } = await props["evaluationTeamConfigView"]({ - eqCorpinfoId: corpinfoId, - eqType: "wshb", - }); - setEnvironmentalList(environmentalList); - }; - - useEffect(() => { - getData(); - }, []); - - return ( - - - {safetyList.map(item => ( - item.memberDeptName && ( -
- {item.memberDeptName} - {" "} - - - {" "} - {item.memberName} -
- ) - ))} - - ), - }, - ]} - /> - - {environmentalList.map(item => ( - item.memberDeptName && ( -
- {item.memberDeptName} - {" "} - - - {" "} - {item.memberName} -
- ) - ))} - - ), - }, - ]} - /> -
- ); -}; - -const ChangeLogModalComponent = (props) => { - const corpinfoId = props.data.corpinfoId; - - const [list, setList] = useState([]); - - const getData = async () => { - const { data } = await props["evaluationTeamConfigChangeLog"]({ - eqCorpinfoId: corpinfoId, - }); - setList(data); - }; - - useEffect(() => { - getData(); - }, []); - - return ( - 关闭, - ]} - > - ([ - { label: "隐患考评组类型", children: item.evaluateType === 1 ? "安全类" : "环保类" }, - { label: "变更前", children: `${item.beforeDeptName}-${item.beforeMemberName}` }, - { label: "变更后", children: `${item.afterDeptName}-${item.afterMemberName}` }, - ])), - ]} - /> - - ); -}; - -const ConfigModal = Connect([NS_EVALUATION_TEAM_CONFIG], true)(ConfigModalComponent); -const AddModal = Connect([NS_EVALUATION_TEAM_CONFIG], true)(AddModalComponent); -const ViewModal = Connect([NS_EVALUATION_TEAM_CONFIG], true)(ViewModalComponent); -const ChangeLogModal = Connect([NS_EVALUATION_TEAM_CONFIG], true)(ChangeLogModalComponent); -export default Connect([NS_EVALUATION_TEAM_CONFIG], true)(Permission(List)); diff --git a/src/pages/Container/Supervision/Evaluation/EvaluationTeamConfig/index.js b/src/pages/Container/Supervision/Evaluation/EvaluationTeamConfig/index.js deleted file mode 100644 index 770ab18..0000000 --- a/src/pages/Container/Supervision/Evaluation/EvaluationTeamConfig/index.js +++ /dev/null @@ -1,9 +0,0 @@ -function EvaluationTeamConfig(props) { - return ( -
- {props.children} -
- ); -} - -export default EvaluationTeamConfig; diff --git a/src/pages/Container/Supervision/Evaluation/HiddenEvaluation/HiddenList/index.js b/src/pages/Container/Supervision/Evaluation/HiddenEvaluation/HiddenList/index.js deleted file mode 100644 index 483bcb9..0000000 --- a/src/pages/Container/Supervision/Evaluation/HiddenEvaluation/HiddenList/index.js +++ /dev/null @@ -1,251 +0,0 @@ -import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Descriptions, Form, message, Modal, Space, Spin } from "antd"; -import { useEffect, useRef, 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"; -import Table from "zy-react-library/components/Table"; -import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; -import { HIDDEN_SOURCE_ENUM, HIDDEN_STATE_ENUM } from "zy-react-library/enum/hidden/gwj"; -import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; -import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo"; -import useTable from "zy-react-library/hooks/useTable"; -import { getLabelName } from "zy-react-library/utils"; -import { NS_HIDDEN_EVALUATION } from "~/enumerate/namespace"; -import ViewEvaluationModal from "../../components/ViewEvaluationModal"; - -function HiddenList(props) { - const query = useGetUrlQuery(); - const [viewEvaluationModalOpen, setViewEvaluationModalOpen] = useState(false); - const [evaluationModalOpen, setEvaluationModalOpen] = useState(false); - const [currentHiddenId, setCurrentHiddenId] = useState(""); - const [form] = Form.useForm(); - const { tableProps, getData } = useTable(props["hiddenEvaluationHiddenList"], { - form, - params: { - eqCorpId: query.corpinfoId, - eqHiddenType: query.hiddenType, - }, - transform: formData => ({ - geHiddenFindTime: formData.hiddenFindTime?.[0], - leHiddenFindTime: formData.hiddenFindTime?.[1], - geFinalDoneTime: formData.finalDoneTime?.[0], - leFinalDoneTime: formData.finalDoneTime?.[1], - }), - }); - - return ( - - ) }, - { name: "likeFindUserName", label: "隐患发现人" }, - { name: "hiddenFindTime", label: "隐患发现时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, - { - name: "eqHiddenTypeC", - label: "隐患类型", - render: , - }, - { - name: "eqEvaState", - label: "考评结果", - render: FORM_ITEM_RENDER_ENUM.SELECT, - items: [ - { bianma: "1", name: "是" }, - { bianma: "2", name: "否" }, - { bianma: "3", name: "考评合格" }, - { bianma: "4", name: "考评不合格" }, - ], - }, - { - name: "eqSelf", - label: "本人是否考评", - render: FORM_ITEM_RENDER_ENUM.SELECT, - items: [{ bianma: "1", name: "是" }, { bianma: "0", name: "否" }], - }, - { name: "finalDoneTime", label: "考评完成时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, - ]} - form={form} - onFinish={getData} - /> -
getLabelName({ list: HIDDEN_SOURCE_ENUM, status: record.source }), - }, - { title: "隐患描述", dataIndex: "hiddenDesc" }, - { title: "隐患发现时间", dataIndex: "hiddenFindTime" }, - { title: "隐患发现人", dataIndex: "findUserName" }, - { - title: "隐患状态", - dataIndex: "state", - render: (_, record) => getLabelName({ list: HIDDEN_STATE_ENUM, status: record.state }), - }, - { title: "已考评组成员", dataIndex: "alreadyEvaluate" }, - { title: "待考评组成员", dataIndex: "notEvaluate" }, - { - title: "考评结果", - dataIndex: "finalResult", - render: (_, record) => { - switch (record.finalResult) { - case 1: - return "考评合格"; - case 0: - return "考评不合格"; - default: - return "考核未完成"; - } - }, - }, - { - title: "操作", - width: 230, - fixed: "right", - render: (_, record) => ( - - - - { - record.isPermission === 1 && ( - - ) - } - - ), - }, - ]} - {...tableProps} - /> - {viewEvaluationModalOpen - && setViewEvaluationModalOpen(false)} hiddenId={currentHiddenId} url="hiddenEvaluationHiddenEvaluationView" />} - {evaluationModalOpen - && setEvaluationModalOpen(false)} hiddenId={currentHiddenId} getData={getData} />} - - ); -} - -const EvaluationModalComponent = (props) => { - const { getUserInfo } = useGetUserInfo(); - const [form] = Form.useForm(); - const [list, setList] = useState([]); - const isEdit = useRef(false); - const getData = async () => { - const { data } = await props["hiddenEvaluationHiddenEvaluationView"]({ eqId: props.hiddenId }); - setList(data); - isEdit.current = (!!data?.[0]?.id); - const userInfo = await getUserInfo(); - form.setFieldValue("user", `${userInfo.departmentName}-${userInfo.name}`); - }; - - useEffect(() => { - getData(); - }, []); - - const onSubmit = async (values) => { - const { success } = await props[isEdit ? "hiddenEvaluationHiddenEvaluationUpdate" : "hiddenEvaluationHiddenEvaluationAdd"]({ - ...values, - hiddenId: props.hiddenId, - }); - if (success) { - message.success("考评成功"); - props.onCancel(); - props.getData(); - } - }; - - return ( - - - ([ - { label: "考评人员", children: item.evaluateMemberName }, - { - label: "是否符合", - children: (() => { - switch (item.evaluateResult) { - case 1: - return "考评合格"; - case 0: - return "考评不合格"; - default: - return "考核未完成"; - } - })(), - }, - ...(item.evaluateResult === 0 ? [{ label: "不符合原因", children: `111`, span: 2 }] : []), - ])), - ]} - /> - !(formValues.result === 0), - }, - ]} - /> - - - ); -}; - -const EvaluationModal = Connect([NS_HIDDEN_EVALUATION], true)(EvaluationModalComponent); -export default Connect([NS_HIDDEN_EVALUATION], true)(HiddenList); diff --git a/src/pages/Container/Supervision/Evaluation/HiddenEvaluation/List/index.js b/src/pages/Container/Supervision/Evaluation/HiddenEvaluation/List/index.js deleted file mode 100644 index 8146358..0000000 --- a/src/pages/Container/Supervision/Evaluation/HiddenEvaluation/List/index.js +++ /dev/null @@ -1,75 +0,0 @@ -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 Table from "zy-react-library/components/Table"; -import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; -import useTable from "zy-react-library/hooks/useTable"; -import { NS_HIDDEN_EVALUATION } from "~/enumerate/namespace"; - -const STATE_ENUM = [ - { bianma: "1", name: "安全类已分配" }, - { bianma: "2", name: "安全类未分配" }, - { bianma: "3", name: "环保类已分配" }, - { bianma: "4", name: "环保类未分配" }, -]; -function List(props) { - const [form] = Form.useForm(); - const { tableProps, getData } = useTable(props["hiddenEvaluationList"], { - form, - }); - - return ( - - -
( - <> - {record.hiddenType === "aqyh" && "安全类"} - {record.hiddenType === "wshb" && "环保类"} - - ) }, - { title: "安全环保奖惩监管端", dataIndex: "superviseTotal", render: (_, record) => (`${record.superviseDone}/${record.superviseTotal}`) }, - { title: "安全环保奖惩企业端", dataIndex: "enterpriseTotal", render: (_, record) => (`${record.enterpriseDone}/${record.enterpriseTotal}`) }, - { title: "隐患排查", dataIndex: "troubleshootTotal", render: (_, record) => (`${record.troubleshootDone}/${record.troubleshootTotal}`) }, - { title: "隐患快报", dataIndex: "bulletinTotal", render: (_, record) => (`${record.bulletinDone}/${record.bulletinTotal}`) }, - { title: "消防检查", dataIndex: "fireControlTotal", render: (_, record) => (`${record.fireControlDone}/${record.fireControlTotal}`) }, - { title: "考评组成员", dataIndex: "members" }, - { - title: "操作", - width: 100, - fixed: "right", - render: (_, record) => ( - - {props.permission("jgd-yhkp-kp") && ( - - )} - - ), - }, - ]} - {...tableProps} - /> - - ); -} - -export default Connect([NS_HIDDEN_EVALUATION], true)(Permission(List)); diff --git a/src/pages/Container/Supervision/Evaluation/HiddenEvaluation/index.js b/src/pages/Container/Supervision/Evaluation/HiddenEvaluation/index.js deleted file mode 100644 index de44bad..0000000 --- a/src/pages/Container/Supervision/Evaluation/HiddenEvaluation/index.js +++ /dev/null @@ -1,9 +0,0 @@ -function HiddenEvaluation(props) { - return ( -
- {props.children} -
- ); -} - -export default HiddenEvaluation; diff --git a/src/pages/Container/Supervision/Evaluation/HiddenView/index.js b/src/pages/Container/Supervision/Evaluation/HiddenView/index.js deleted file mode 100644 index aa91bb4..0000000 --- a/src/pages/Container/Supervision/Evaluation/HiddenView/index.js +++ /dev/null @@ -1,12 +0,0 @@ -import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj"; -import Page from "zy-react-library/components/Page"; - -function HiddenView() { - return ( - - - - ); -} - -export default HiddenView; diff --git a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/HiddenEvaluationList/index.js b/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/HiddenEvaluationList/index.js deleted file mode 100644 index 10b455f..0000000 --- a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/HiddenEvaluationList/index.js +++ /dev/null @@ -1,204 +0,0 @@ -import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Descriptions, Form, message, Modal, Space, Spin } from "antd"; -import { useEffect, useRef, 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"; -import Table from "zy-react-library/components/Table"; -import { FORM_ITEM_RENDER_ENUM } from "zy-react-library/enum/formItemRender"; -import { HIDDEN_SOURCE_ENUM } from "zy-react-library/enum/hidden/gwj"; -import useGetUrlQuery from "zy-react-library/hooks/useGetUrlQuery"; -import useGetUserInfo from "zy-react-library/hooks/useGetUserInfo"; -import useTable from "zy-react-library/hooks/useTable"; -import { getLabelName } from "zy-react-library/utils"; -import { NS_HIDDEN_EVALUATION } from "~/enumerate/namespace"; -import ViewEvaluationModal from "../../components/ViewEvaluationModal"; - -function HiddenEvaluationList(props) { - const query = useGetUrlQuery(); - const [viewEvaluationModalOpen, setViewEvaluationModalOpen] = useState(false); - const [evaluationModalOpen, setEvaluationModalOpen] = useState(false); - const [currentHiddenId, setCurrentHiddenId] = useState(""); - const [form] = Form.useForm(); - const { tableProps, getData } = useTable(props["evaluateHiddenDetailList"], { - form, - params: { - eqFindUserId: query.findUserId, - }, - transform: formData => ({ - geExchangeTime: formData.hiddenFindTime?.[0], - leExchangeTime: formData.hiddenFindTime?.[1], - }), - }); - - return ( - - ) }, - { name: "likeFindUserRealName", label: "隐患发现人" }, - { - name: "eqHiddenTypeC", - label: "隐患类型", - render: , - }, - { name: "hiddenFindTime", label: "兑换时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE }, - ]} - form={form} - onFinish={getData} - /> -
getLabelName({ list: HIDDEN_SOURCE_ENUM, status: record.hiddenSource }), - }, - { title: "隐患描述", dataIndex: "hiddenDesc" }, - { title: "隐患发现时间", dataIndex: "findTime" }, - { title: "隐患发现人", dataIndex: "findUserName" }, - { title: "隐患验收人", dataIndex: "checkUserRealName" }, - { - title: "隐患状态", - dataIndex: "state", - render: () => { - return "已验收"; - }, - }, - { title: "考评组成员", dataIndex: "groupMembers" }, - { title: "兑换状态", dataIndex: "exchangeFlag", render: (_, record) => record.exchangeFlag === 1 ? "已兑换" : "未兑换" }, - { - title: "操作", - width: 230, - fixed: "right", - render: (_, record) => ( - - - - - ), - }, - ]} - {...tableProps} - /> - {viewEvaluationModalOpen - && setViewEvaluationModalOpen(false)} hiddenId={currentHiddenId} />} - {evaluationModalOpen - && setEvaluationModalOpen(false)} hiddenId={currentHiddenId} getData={getData} />} - - ); -} - -const EvaluationModalComponent = (props) => { - const { getUserInfo } = useGetUserInfo(); - const [form] = Form.useForm(); - const [list, setList] = useState([]); - const isEdit = useRef(false); - const getData = async () => { - const { data } = await props["hiddenEvaluationHiddenEvaluationView"]({ eqId: props.hiddenId }); - setList(data); - isEdit.current = (!!data?.[0]?.id); - const userInfo = await getUserInfo(); - form.setFieldValue("user", `${userInfo.departmentName}-${userInfo.name}`); - }; - - useEffect(() => { - getData(); - }, []); - - const onSubmit = async (values) => { - const { success } = await props[isEdit ? "hiddenEvaluationHiddenEvaluationUpdate" : "hiddenEvaluationHiddenEvaluationAdd"]({ - ...values, - hiddenId: props.hiddenId, - }); - if (success) { - message.success("考评成功"); - props.onCancel(); - props.getData(); - } - }; - - return ( - - - ([ - { label: "考评人员", children: item.evaluateMemberName }, - { - label: "是否符合", - children: (() => { - switch (item.evaluateResult) { - case 1: - return "考评合格"; - case 0: - return "考评不合格"; - default: - return "考核未完成"; - } - })(), - }, - ...(item.evaluateResult === 0 ? [{ label: "不符合原因", children: `111`, span: 2 }] : []), - ])), - ]} - /> - !(formValues.result === 0), - }, - ]} - /> - - - ); -}; - -const EvaluationModal = Connect([NS_HIDDEN_EVALUATION], true)(EvaluationModalComponent); -export default Connect([NS_HIDDEN_EVALUATION], true)(HiddenEvaluationList); diff --git a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/List/index.js b/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/List/index.js deleted file mode 100644 index 6e55c3b..0000000 --- a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/List/index.js +++ /dev/null @@ -1,122 +0,0 @@ -import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Form } from "antd"; -import { useMemo } from "react"; -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 useTable from "zy-react-library/hooks/useTable"; -import { NS_HIDDEN_EVALUATION } from "~/enumerate/namespace"; -import "./index.less"; -// 引入样式文件 -function List(props) { - const [form] = Form.useForm(); - const { tableProps, getData } = useTable(props["viewCorpEvaluatePerformanceList"], { - form, - }); - const handleCorpNameClick = (record) => { - props.history.push(`./userExchangeList?corpinfoId=${record.corpinfoId}`); - }; - // 处理表格数据,为合并行做准备 - const processedTableProps = useMemo(() => { - if (!tableProps.dataSource || tableProps.dataSource.length === 0) { - return tableProps; - } - - const dataSource = tableProps.dataSource; - - // 计算每个分公司出现的次数(用于rowSpan) - const corpRowSpans = {}; - dataSource.forEach((item) => { - const corpName = item.corpinfoName; - corpRowSpans[corpName] = (corpRowSpans[corpName] || 0) + 1; - }); - - // 处理数据源,添加rowSpan信息 - const processedDataSource = []; - const handledCorps = {}; - - dataSource.forEach((item) => { - const corpName = item.corpinfoName; - - if (!handledCorps[corpName]) { - // 第一次遇到这个分公司,设置rowSpan - processedDataSource.push({ - ...item, - _rowSpan: corpRowSpans[corpName], - }); - handledCorps[corpName] = true; - } - else { - // 后续遇到相同分公司,rowSpan为0(不显示) - processedDataSource.push({ - ...item, - _rowSpan: 0, - }); - } - }); - - return { - ...tableProps, - dataSource: processedDataSource, - }; - }, [tableProps]); - - // 自定义列配置,支持行合并 - const columns = [ - { - title: "分公司名称", - dataIndex: "corpinfoName", - render: (text, record) => { - const obj = { - children: ( - handleCorpNameClick(record)} - > - {text} - - ), - props: {}, - }; - if (record._rowSpan !== undefined) { - obj.props.rowSpan = record._rowSpan; - } - return obj; - }, - }, - { - title: "隐患考评组类型", - dataIndex: "hiddenType", - render: (_, record) => ( - <> - {record.hiddenType === "aqyh" && "安全类"} - {record.hiddenType === "wshb" && "环保类"} - - ), - }, - { title: "发现隐患数", dataIndex: "hiddenCount" }, - { title: "已验收隐患数", dataIndex: "checkCount" }, - { title: "已评审合格数", dataIndex: "passCount" }, - { title: "待评审数量", dataIndex: "notEvaluateCount" }, - { title: "已兑换积分", dataIndex: "exchangeScore" }, - { title: "未兑换积分", dataIndex: "notExchangeScore" }, - ]; - - return ( - - -
- - ); -} - -export default Connect([NS_HIDDEN_EVALUATION], true)(List); diff --git a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/List/index.less b/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/List/index.less deleted file mode 100644 index f55ebf5..0000000 --- a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/List/index.less +++ /dev/null @@ -1,24 +0,0 @@ -.corp-name-link { - color: #1F61FF !important; - text-decoration: none !important; - cursor: pointer; - - &:hover { - color: #1F61FF !important; - text-decoration: underline !important; - } - - // 深度覆盖 antd 的样式 - :global { - .ant-table-tbody & { - color: #1F61FF !important; - } - - .ant-table-cell & { - color: #1F61FF !important; - } - } - span{ - color: #1F61FF !important; - } -} diff --git a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/UserExchangeList/index.js b/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/UserExchangeList/index.js deleted file mode 100644 index a954d07..0000000 --- a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/UserExchangeList/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import UserExchangeListPage from "../../PersonnelEvaluation/UserExchangeList"; - -function UserExchangeList(props) { - return ( - - ); -} - -export default UserExchangeList; diff --git a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/UserExchangeRecordList/index.js b/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/UserExchangeRecordList/index.js deleted file mode 100644 index 2bcfe8f..0000000 --- a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/UserExchangeRecordList/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import UserExchangeRecordListPage from "../../PersonnelEvaluation/UserExchangeRecordList"; - -function UserExchangeRecordList(props) { - return ( - - ); -} - -export default UserExchangeRecordList; diff --git a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/index.js b/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/index.js deleted file mode 100644 index 18fece4..0000000 --- a/src/pages/Container/Supervision/Evaluation/PerformanceEvaluationList/index.js +++ /dev/null @@ -1,9 +0,0 @@ -function PerformanceEvaluationList(props) { - return ( -
- {props.children} -
- ); -} - -export default PerformanceEvaluationList; diff --git a/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/List/index.js b/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/List/index.js deleted file mode 100644 index 3d08468..0000000 --- a/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/List/index.js +++ /dev/null @@ -1,66 +0,0 @@ -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 Table from "zy-react-library/components/Table"; -import useTable from "zy-react-library/hooks/useTable"; -import { NS_PERSONNEL_EVALUATION } from "~/enumerate/namespace"; - -function List(props) { - const [form] = Form.useForm(); - const { tableProps, getData } = useTable(props["personnelEvaluationList"], { - form, - }); - - return ( - - ) }, - { name: "likeSafetyMembers", label: "考评组人员" }, - ]} - form={form} - onFinish={getData} - /> -
(`${record.alreadyExchange}/${record.alreadyExchange + record.notExchange}`), - }, - { title: "安全类隐患考评组成员", dataIndex: "safetyMembers" }, - { title: "环保类隐患考评组成员", dataIndex: "environmentalMembers" }, - { - title: "操作", - width: 100, - fixed: "right", - render: (_, record) => ( - - {props.permission("permission") && ( - - )} - - ), - }, - ]} - {...tableProps} - /> - - ); -} - -export default Connect([NS_PERSONNEL_EVALUATION], true)(Permission(List)); diff --git a/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/UserExchangeList/index.js b/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/UserExchangeList/index.js deleted file mode 100644 index c752809..0000000 --- a/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/UserExchangeList/index.js +++ /dev/null @@ -1,170 +0,0 @@ -import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Form, message, Modal, Space, Spin } from "antd"; -import { useState } from "react"; -import EditIcon from "zy-react-library/components/Icon/EditIcon"; -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 Table from "zy-react-library/components/Table"; -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 { NS_HIDDEN_EVALUATION, NS_PERSONNEL_EVALUATION } from "~/enumerate/namespace"; - -function UserExchangeList(props) { - const query = useGetUrlQuery(); - const { loading: downloadBlobLoading, downloadBlob } = useDownloadBlob(); - const { getUrlCriteriaQuery } = useUrlQueryCriteria(); - const [selectedRowKeys, setSelectedRowKeys] = useState([]); - const [form] = Form.useForm(); - const { tableProps, getData } = useTable(props["personnelEvaluationUserExchangeList"], { - form, - params: { - eqCorpId: query.corpinfoId, - }, - }); - - const onBatchExchange = async () => { - if (!selectedRowKeys.length) { - message.warning("请选择需要兑换的人员"); - return; - } - Modal.confirm({ - title: "兑换确认", - content: "确定要兑换吗?", // 确定要兑换所有人得分吗 - onOk: async () => { - const success = await props["personnelEvaluationExchange"]({ userIds: selectedRowKeys }); - if (success) { - message.success("兑换成功"); - getData(); - } - }, - onCancel: () => { - message.warning("已取消兑换"); - }, - }); - }; - const OnRedeemAll = async () => { - Modal.confirm({ - title: "兑换确认", - content: "确定要兑换所有人得分吗?", // 确定要兑换所有人得分吗 - onOk: async () => { - const searchForm = getUrlCriteriaQuery("searchFormKeys", "searchFormValues"); - const success = await props["viewUserEvaluateConditionList"]({ likeFindUserRealName: searchForm.likeFindUserRealName, eqFindUserDeptId: searchForm.eqFindUserDeptId, corpId: query.corpinfoId }); - if (success) { - message.success("兑换成功"); - getData(); - } - }, - onCancel: () => { - message.warning("已取消兑换"); - }, - }); - }; - const onExportExcel = async () => { - if (!selectedRowKeys.length) { - message.warning("请选择需要导出的人员"); - return; - } - Modal.confirm({ - title: "导出确认", - content: "确定要导出excel吗?", - onOk: async () => { - await downloadBlob("/hidden/viewUserEvaluateConditionList/exportEvaluate", { params: { findUserIds: selectedRowKeys.join(",") } }); - message.success("导出成功"); - }, - onCancel: () => { - message.warning("已取消导出"); - }, - }); - }; - - return ( - - - ) }, - { name: "likeFindUserRealName", label: "姓名" }, - ]} - form={form} - onFinish={getData} - /> -
{ - setSelectedRowKeys(selectedRowKeys); - }, - }} - rowKey="findUserId" - toolBarRender={() => ( - - - - - - )} - columns={[ - { title: "用户名", dataIndex: "findUserName" }, - { title: "姓名", dataIndex: "findUserRealName" }, - { title: "部门", dataIndex: "findUserDeptName" }, - { title: "岗位", dataIndex: "findUserPositionsName" }, - { title: "奖励总得分", dataIndex: "totalScore" }, - { title: "已兑换分数", dataIndex: "alreadyExchange" }, - { title: "未兑换奖励数", dataIndex: "notExchanged", render: (_, record) => record.totalScore - record.alreadyExchange }, - { - title: "操作", - width: 200, - fixed: "right", - render: (_, record) => ( - - - - - ), - }, - ]} - {...tableProps} - /> - - - ); -} - -export default Connect([NS_PERSONNEL_EVALUATION, NS_HIDDEN_EVALUATION], true)(UserExchangeList); diff --git a/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/UserExchangeRecordList/index.js b/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/UserExchangeRecordList/index.js deleted file mode 100644 index 5569c0d..0000000 --- a/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/UserExchangeRecordList/index.js +++ /dev/null @@ -1,65 +0,0 @@ -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 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 { NS_PERSONNEL_EVALUATION } from "~/enumerate/namespace"; - -function UserExchangeRecordList(props) { - const query = useGetUrlQuery(); - const [form] = Form.useForm(); - const { tableProps, getData } = useTable(props["personnelEvaluationUserExchangeRecordList"], { - form, - params: { - eqBelongerId: query.findUserId, - }, - transform: formData => ({ - geExchangeTime: formData.dates?.[0], - leExchangeTime: formData.dates?.[1], - }), - }); - - return ( - - -
( - - - - ), - }, - ]} - {...tableProps} - /> - - ); -} - -export default Connect([NS_PERSONNEL_EVALUATION], true)(UserExchangeRecordList); diff --git a/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/index.js b/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/index.js deleted file mode 100644 index e6b989a..0000000 --- a/src/pages/Container/Supervision/Evaluation/PersonnelEvaluation/index.js +++ /dev/null @@ -1,9 +0,0 @@ -function PersonnelEvaluation(props) { - return ( -
- {props.children} -
- ); -} - -export default PersonnelEvaluation; diff --git a/src/pages/Container/Supervision/Evaluation/components/ViewEvaluationModal/index.js b/src/pages/Container/Supervision/Evaluation/components/ViewEvaluationModal/index.js deleted file mode 100644 index bec423d..0000000 --- a/src/pages/Container/Supervision/Evaluation/components/ViewEvaluationModal/index.js +++ /dev/null @@ -1,59 +0,0 @@ -import { Connect } from "@cqsjjb/jjb-dva-runtime"; -import { Button, Descriptions, Modal } from "antd"; -import { useEffect, useState } from "react"; -import { NS_HIDDEN_EVALUATION } from "~/enumerate/namespace"; - -const ViewEvaluationModal = (props) => { - const [list, setList] = useState([]); - const getData = async () => { - const { data } = await props["hiddenEvaluationHiddenEvaluationView"]({ eqId: props.hiddenId }); - // evaluateHiddenDetailList - setList(data); - }; - - useEffect(() => { - getData(); - }, []); - - return ( - - 取消 - , - ]} - > - ([ - { label: "考评人员", children: item.evaluateMemberName }, - { - label: "是否符合", - children: (() => { - switch (item.evaluateResult) { - case 1: - return "考评合格"; - case 0: - return "考评不合格"; - default: - return "考核未完成"; - } - })(), - }, - ...(item.evaluateResult === 0 ? [{ label: "不符合原因", children: "todo", span: 2 }] : []), - ])), - ]} - /> - - ); -}; - -export default Connect([NS_HIDDEN_EVALUATION], true)(ViewEvaluationModal); diff --git a/src/pages/Container/Supervision/Evaluation/index.js b/src/pages/Container/Supervision/Evaluation/index.js deleted file mode 100644 index 822ad2a..0000000 --- a/src/pages/Container/Supervision/Evaluation/index.js +++ /dev/null @@ -1,9 +0,0 @@ -function Evaluation(props) { - return ( -
- {props.children} -
- ); -} - -export default Evaluation;