删除隐患考评相关代码,单独拉一个新项目
parent
eb0b9f907a
commit
cd988b3aef
10
router.md
10
router.md
|
|
@ -16,13 +16,3 @@
|
||||||
#### /hidden/container/supervision/average/average/corpInfoList 一般
|
#### /hidden/container/supervision/average/average/corpInfoList 一般
|
||||||
#### /hidden/container/supervision/average/duplicateHazard/list 隐患重复统计
|
#### /hidden/container/supervision/average/duplicateHazard/list 隐患重复统计
|
||||||
#### /hidden/container/supervision/average/aIHazardIdentification/list AI隐患识别记录
|
#### /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 分公司隐患考评
|
|
||||||
|
|
|
||||||
|
|
@ -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`,
|
|
||||||
);
|
|
||||||
|
|
@ -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",
|
|
||||||
);
|
|
||||||
|
|
@ -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",
|
|
||||||
);
|
|
||||||
|
|
@ -14,6 +14,3 @@ export const NS_SPECIAL_DISPOSAL = defineNamespace("specialDisposal");
|
||||||
export const NS_ACCEPTANCE = defineNamespace("acceptance");
|
export const NS_ACCEPTANCE = defineNamespace("acceptance");
|
||||||
export const NS_PART = defineNamespace("part");
|
export const NS_PART = defineNamespace("part");
|
||||||
export const NS_AVERAGE = defineNamespace("average");
|
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");
|
|
||||||
|
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Page headerTitle="分公司考评隐患">
|
|
||||||
<Search
|
|
||||||
options={[
|
|
||||||
{ name: "likeHiddenDesc", label: "隐患描述" },
|
|
||||||
{ name: "eqSource", label: "隐患来源", render: FORM_ITEM_RENDER_ENUM.SELECT, items: HIDDEN_SOURCE_ENUM },
|
|
||||||
{ name: "eqHiddenFindDept", label: "发现部门", render: (<DepartmentSelectTree searchType="all" />) },
|
|
||||||
{ name: "likeFindUserName", label: "隐患发现人" },
|
|
||||||
{ name: "hiddenFindTime", label: "隐患发现时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
|
||||||
{
|
|
||||||
name: "eqHiddenTypeC",
|
|
||||||
label: "隐患类型",
|
|
||||||
render: <DictionarySelectTree dictValue="hiddenType" onlyLastLevel />,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
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}
|
|
||||||
/>
|
|
||||||
<Table
|
|
||||||
columns={[
|
|
||||||
{
|
|
||||||
title: "隐患来源",
|
|
||||||
dataIndex: "source",
|
|
||||||
render: (_, record) => 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) => (
|
|
||||||
<Space>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`../hiddenView?hiddenId=${record.hiddenId}&id=${record.id}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
查看隐患详情
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setViewEvaluationModalOpen(true);
|
|
||||||
setCurrentHiddenId(record.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
考评详情
|
|
||||||
</Button>
|
|
||||||
{
|
|
||||||
record.isPermission === 1 && (
|
|
||||||
<Button
|
|
||||||
disabled={record.finalResult === 1 || record.finalResult === 0}
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setEvaluationModalOpen(true);
|
|
||||||
setCurrentHiddenId(record.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
考评
|
|
||||||
</Button>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
{...tableProps}
|
|
||||||
/>
|
|
||||||
{viewEvaluationModalOpen
|
|
||||||
&& <ViewEvaluationModal onCancel={() => setViewEvaluationModalOpen(false)} hiddenId={currentHiddenId} url="hiddenEvaluationHiddenEvaluationView" />}
|
|
||||||
{evaluationModalOpen
|
|
||||||
&& <EvaluationModal onCancel={() => setEvaluationModalOpen(false)} hiddenId={currentHiddenId} getData={getData} />}
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
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 (
|
|
||||||
<Modal
|
|
||||||
title="考评"
|
|
||||||
width={600}
|
|
||||||
open
|
|
||||||
maskClosable={false}
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
onOk={form.submit}
|
|
||||||
confirmLoading={props.hiddenEvaluation.hiddenEvaluationLoading}
|
|
||||||
>
|
|
||||||
<Spin spinning={props.hiddenEvaluation.hiddenEvaluationLoading}>
|
|
||||||
<Descriptions
|
|
||||||
column={2}
|
|
||||||
bordered
|
|
||||||
styles={{ label: { width: 200 } }}
|
|
||||||
items={[
|
|
||||||
...list.flatMap(item => ([
|
|
||||||
{ 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 }] : []),
|
|
||||||
])),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
<FormBuilder
|
|
||||||
style={{ marginTop: 20 }}
|
|
||||||
form={form}
|
|
||||||
showActionButtons={false}
|
|
||||||
span={24}
|
|
||||||
onFinish={onSubmit}
|
|
||||||
labelCol={{ span: 8 }}
|
|
||||||
options={[
|
|
||||||
{ name: "user", label: "考评人员", required: false, componentProps: { disabled: true } },
|
|
||||||
{
|
|
||||||
name: "result",
|
|
||||||
label: "是否符合",
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
|
||||||
items: [{ bianma: 1, name: "符合" }, { bianma: 0, name: "不符合" }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "resultCase",
|
|
||||||
label: "不符合原因",
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
|
||||||
dependencies: ["result"],
|
|
||||||
hidden: formValues => !(formValues.result === 0),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Spin>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const EvaluationModal = Connect([NS_HIDDEN_EVALUATION], true)(EvaluationModalComponent);
|
|
||||||
export default Connect([NS_HIDDEN_EVALUATION], true)(HiddenList);
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Page isShowAllAction={false}>
|
|
||||||
<Search
|
|
||||||
options={[
|
|
||||||
{ name: "likeCorpinfoName", label: "分公司名称" },
|
|
||||||
{ name: "eqState", label: "隐患考评组类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATE_ENUM },
|
|
||||||
{ name: "likeMembers", label: "考评组成员" },
|
|
||||||
]}
|
|
||||||
form={form}
|
|
||||||
onFinish={getData}
|
|
||||||
/>
|
|
||||||
<Table
|
|
||||||
columns={[
|
|
||||||
{ title: "分公司名称", dataIndex: "corpinfoName" },
|
|
||||||
{ title: "隐患考评组类型", dataIndex: "hiddenType", render: (_, record) => (
|
|
||||||
<>
|
|
||||||
{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) => (
|
|
||||||
<Space>
|
|
||||||
{props.permission("fgs-kp-kp") && (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`./hiddenList?hiddenType=${record.hiddenType}&corpinfoId=${record.corpinfoId}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
考评
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
{...tableProps}
|
|
||||||
/>
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Connect([NS_HIDDEN_EVALUATION], true)(Permission(List));
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
function HiddenEvaluation(props) {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default HiddenEvaluation;
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
|
||||||
|
|
||||||
function HiddenView() {
|
|
||||||
return (
|
|
||||||
<Page headerTitle="查看" contentPadding="0 20px 20px 20px">
|
|
||||||
<HiddenInfo />
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default HiddenView;
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Modal
|
|
||||||
title="考评详情"
|
|
||||||
width={600}
|
|
||||||
open
|
|
||||||
maskClosable={false}
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
footer={[
|
|
||||||
<Button key="cancel" onClick={props.onCancel}>
|
|
||||||
取消
|
|
||||||
</Button>,
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<Descriptions
|
|
||||||
column={2}
|
|
||||||
bordered
|
|
||||||
styles={{ label: { width: 200 } }}
|
|
||||||
items={[
|
|
||||||
...list.flatMap(item => ([
|
|
||||||
{ 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 }] : []),
|
|
||||||
])),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Connect([NS_HIDDEN_EVALUATION], true)(ViewEvaluationModal);
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
function Supervision(props) {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Supervision;
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Page isShowAllAction={false}>
|
|
||||||
<Search
|
|
||||||
options={[
|
|
||||||
{ name: "likeCorpinfoName", label: "分公司名称" },
|
|
||||||
{ name: "eqState", label: "考评组状态", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATE_ENUM },
|
|
||||||
]}
|
|
||||||
form={form}
|
|
||||||
onFinish={getData}
|
|
||||||
/>
|
|
||||||
<Table
|
|
||||||
toolBarRender={() => (
|
|
||||||
props.permission("jgd-yhkp-kpz-tjqy") && (
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
icon={<AddIcon />}
|
|
||||||
onClick={() => {
|
|
||||||
setAddModalOpen(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
新增
|
|
||||||
</Button>
|
|
||||||
)
|
|
||||||
)}
|
|
||||||
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) => (
|
|
||||||
<Space>
|
|
||||||
{props.permission("jgd-yhkp-kpz-ck") && (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setViewModalOpen(true);
|
|
||||||
setCurrentData(record);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
查看
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
{props.permission("jgd-yhkp-kpz-aqz") && (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setConfigModalOpen(true);
|
|
||||||
setConfigType("safety");
|
|
||||||
setCurrentData(record);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
安全类组分配
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
{props.permission("jgd-yhkp-kpz-hbz") && (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setConfigModalOpen(true);
|
|
||||||
setConfigType("environmental");
|
|
||||||
setCurrentData(record);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
环保类组分配
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
{props.permission("jgd-yhkp-kpz-bgjl") && (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setChangeLogModalOpen(true);
|
|
||||||
setCurrentData(record);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
变更记录
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
{...tableProps}
|
|
||||||
/>
|
|
||||||
{configModalOpen
|
|
||||||
&& (
|
|
||||||
<ConfigModal
|
|
||||||
configType={configType}
|
|
||||||
onCancel={() => setConfigModalOpen(false)}
|
|
||||||
getData={getData}
|
|
||||||
data={currentData}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{addModalOpen
|
|
||||||
&& (
|
|
||||||
<AddModal
|
|
||||||
onCancel={() => setAddModalOpen(false)}
|
|
||||||
getData={getData}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{viewModalOpen
|
|
||||||
&& (
|
|
||||||
<ViewModal
|
|
||||||
onCancel={() => setViewModalOpen(false)}
|
|
||||||
data={currentData}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{changeLogModalOpen
|
|
||||||
&& (
|
|
||||||
<ChangeLogModal
|
|
||||||
onCancel={() => setChangeLogModalOpen(false)}
|
|
||||||
data={currentData}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
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 (
|
|
||||||
<Modal
|
|
||||||
title={`${configTypeName}隐患考评组分配`}
|
|
||||||
width={1000}
|
|
||||||
open
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
maskClosable={false}
|
|
||||||
onOk={form.submit}
|
|
||||||
confirmLoading={props.evaluationTeamConfig.evaluationTeamConfigLoading}
|
|
||||||
>
|
|
||||||
<FormBuilder
|
|
||||||
loading={props.evaluationTeamConfig.evaluationTeamConfigLoading}
|
|
||||||
values={{ configType: configTypeName }}
|
|
||||||
labelCol={{ span: 8 }}
|
|
||||||
showActionButtons={false}
|
|
||||||
form={form}
|
|
||||||
onFinish={onSubmit}
|
|
||||||
options={[
|
|
||||||
{ name: "configType", label: "隐患考评组类型", componentProps: { disabled: true }, span: 24 },
|
|
||||||
{
|
|
||||||
name: "evaluateGroupUserConfigUpdateCmdList",
|
|
||||||
span: 24,
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.FORM_LIST,
|
|
||||||
formListUniqueProps: {
|
|
||||||
showRemoveButton: false,
|
|
||||||
showAddButton: false,
|
|
||||||
options: field => ([
|
|
||||||
{
|
|
||||||
name: [field.name, "memberDeptId"],
|
|
||||||
label: "考评部门",
|
|
||||||
render: (
|
|
||||||
<DepartmentSelectTree
|
|
||||||
isNeedCorpInfoId={true}
|
|
||||||
params={{ eqCorpinfoId: corpinfoId }}
|
|
||||||
onChange={() => {
|
|
||||||
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: (
|
|
||||||
<PersonnelSelect
|
|
||||||
params={{ departmentId: evaluateGroupUserConfigUpdateCmdList?.[field.name]?.memberDeptId || "" }}
|
|
||||||
onGetLabel={label => form.setFieldValue(["evaluateGroupUserConfigUpdateCmdList", field.name, "memberName"], label)}
|
|
||||||
/>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{ name: [field.name, "memberName"], label: "考评人员名称", onlyForLabel: true },
|
|
||||||
{ name: [field.name, "type"], label: "用户类型", onlyForLabel: true },
|
|
||||||
]),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
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 (
|
|
||||||
<Modal
|
|
||||||
title="新增"
|
|
||||||
width={600}
|
|
||||||
open
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
maskClosable={false}
|
|
||||||
onOk={form.submit}
|
|
||||||
confirmLoading={props.evaluationTeamConfig.evaluationTeamConfigLoading}
|
|
||||||
>
|
|
||||||
<FormBuilder
|
|
||||||
loading={props.evaluationTeamConfig.evaluationTeamConfigLoading}
|
|
||||||
labelCol={{ span: 8 }}
|
|
||||||
showActionButtons={false}
|
|
||||||
form={form}
|
|
||||||
onFinish={onSubmit}
|
|
||||||
span={24}
|
|
||||||
options={[
|
|
||||||
{
|
|
||||||
name: "corpinfoId",
|
|
||||||
label: "分公司",
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
|
||||||
items: corpInfoList,
|
|
||||||
itemsField: { valueKey: "id", labelKey: "corpName" },
|
|
||||||
componentProps: {
|
|
||||||
onChange: (value) => {
|
|
||||||
form.setFieldValue("corpinfoName", getLabelName({
|
|
||||||
list: corpInfoList,
|
|
||||||
status: value,
|
|
||||||
idKey: "id",
|
|
||||||
nameKey: "corpName",
|
|
||||||
}));
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ name: "corpinfoName", label: "分公司名称", onlyForLabel: true },
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
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 (
|
|
||||||
<Modal
|
|
||||||
title="查看"
|
|
||||||
width={600}
|
|
||||||
open
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
maskClosable={false}
|
|
||||||
>
|
|
||||||
<Descriptions
|
|
||||||
column={1}
|
|
||||||
bordered
|
|
||||||
styles={{ label: { width: 200 } }}
|
|
||||||
items={[
|
|
||||||
{ label: "隐患考评组类型", children: "安全类" },
|
|
||||||
{
|
|
||||||
label: "考评组成员",
|
|
||||||
children: (
|
|
||||||
<div>
|
|
||||||
{safetyList.map(item => (
|
|
||||||
item.memberDeptName && (
|
|
||||||
<div key={item.id}>
|
|
||||||
{item.memberDeptName}
|
|
||||||
{" "}
|
|
||||||
-
|
|
||||||
{" "}
|
|
||||||
{item.memberName}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
<Descriptions
|
|
||||||
column={1}
|
|
||||||
bordered
|
|
||||||
styles={{ label: { width: 200 } }}
|
|
||||||
items={[
|
|
||||||
{ label: "隐患考评组类型", children: "环保类" },
|
|
||||||
{
|
|
||||||
label: "考评组成员",
|
|
||||||
children: (
|
|
||||||
<div>
|
|
||||||
{environmentalList.map(item => (
|
|
||||||
item.memberDeptName && (
|
|
||||||
<div key={item.id}>
|
|
||||||
{item.memberDeptName}
|
|
||||||
{" "}
|
|
||||||
-
|
|
||||||
{" "}
|
|
||||||
{item.memberName}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
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 (
|
|
||||||
<Modal
|
|
||||||
title="查看"
|
|
||||||
width={1000}
|
|
||||||
open
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
maskClosable={false}
|
|
||||||
footer={[
|
|
||||||
<Button key="back" onClick={props.onCancel}>关闭</Button>,
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<Descriptions
|
|
||||||
column={3}
|
|
||||||
bordered
|
|
||||||
styles={{ label: { width: 200 } }}
|
|
||||||
items={[
|
|
||||||
...list.flatMap(item => ([
|
|
||||||
{ label: "隐患考评组类型", children: item.evaluateType === 1 ? "安全类" : "环保类" },
|
|
||||||
{ label: "变更前", children: `${item.beforeDeptName}-${item.beforeMemberName}` },
|
|
||||||
{ label: "变更后", children: `${item.afterDeptName}-${item.afterMemberName}` },
|
|
||||||
])),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
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));
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
function EvaluationTeamConfig(props) {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default EvaluationTeamConfig;
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Page headerTitle="分公司考评隐患">
|
|
||||||
<Search
|
|
||||||
options={[
|
|
||||||
{ name: "likeHiddenDesc", label: "隐患描述" },
|
|
||||||
{ name: "eqSource", label: "隐患来源", render: FORM_ITEM_RENDER_ENUM.SELECT, items: HIDDEN_SOURCE_ENUM },
|
|
||||||
{ name: "eqHiddenFindDept", label: "发现部门", render: (<DepartmentSelectTree />) },
|
|
||||||
{ name: "likeFindUserName", label: "隐患发现人" },
|
|
||||||
{ name: "hiddenFindTime", label: "隐患发现时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
|
||||||
{
|
|
||||||
name: "eqHiddenTypeC",
|
|
||||||
label: "隐患类型",
|
|
||||||
render: <DictionarySelectTree dictValue="hiddenType" onlyLastLevel />,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
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}
|
|
||||||
/>
|
|
||||||
<Table
|
|
||||||
columns={[
|
|
||||||
{
|
|
||||||
title: "隐患来源",
|
|
||||||
dataIndex: "source",
|
|
||||||
render: (_, record) => 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) => (
|
|
||||||
<Space>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`../hiddenView?hiddenId=${record.hiddenId}&id=${record.id}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
查看隐患详情
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setViewEvaluationModalOpen(true);
|
|
||||||
setCurrentHiddenId(record.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
考评详情
|
|
||||||
</Button>
|
|
||||||
{
|
|
||||||
record.isPermission === 1 && (
|
|
||||||
<Button
|
|
||||||
disabled={record.finalResult === 1 || record.finalResult === 0}
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setEvaluationModalOpen(true);
|
|
||||||
setCurrentHiddenId(record.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
考评
|
|
||||||
</Button>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
{...tableProps}
|
|
||||||
/>
|
|
||||||
{viewEvaluationModalOpen
|
|
||||||
&& <ViewEvaluationModal onCancel={() => setViewEvaluationModalOpen(false)} hiddenId={currentHiddenId} url="hiddenEvaluationHiddenEvaluationView" />}
|
|
||||||
{evaluationModalOpen
|
|
||||||
&& <EvaluationModal onCancel={() => setEvaluationModalOpen(false)} hiddenId={currentHiddenId} getData={getData} />}
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
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 (
|
|
||||||
<Modal
|
|
||||||
title="考评"
|
|
||||||
width={600}
|
|
||||||
open
|
|
||||||
maskClosable={false}
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
onOk={form.submit}
|
|
||||||
confirmLoading={props.hiddenEvaluation.hiddenEvaluationLoading}
|
|
||||||
>
|
|
||||||
<Spin spinning={props.hiddenEvaluation.hiddenEvaluationLoading}>
|
|
||||||
<Descriptions
|
|
||||||
column={2}
|
|
||||||
bordered
|
|
||||||
styles={{ label: { width: 200 } }}
|
|
||||||
items={[
|
|
||||||
...list.flatMap(item => ([
|
|
||||||
{ 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 }] : []),
|
|
||||||
])),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
<FormBuilder
|
|
||||||
style={{ marginTop: 20 }}
|
|
||||||
form={form}
|
|
||||||
showActionButtons={false}
|
|
||||||
span={24}
|
|
||||||
onFinish={onSubmit}
|
|
||||||
labelCol={{ span: 8 }}
|
|
||||||
options={[
|
|
||||||
{ name: "user", label: "考评人员", required: false, componentProps: { disabled: true } },
|
|
||||||
{
|
|
||||||
name: "result",
|
|
||||||
label: "是否符合",
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
|
||||||
items: [{ bianma: 1, name: "符合" }, { bianma: 0, name: "不符合" }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "resultCase",
|
|
||||||
label: "不符合原因",
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
|
||||||
dependencies: ["result"],
|
|
||||||
hidden: formValues => !(formValues.result === 0),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Spin>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const EvaluationModal = Connect([NS_HIDDEN_EVALUATION], true)(EvaluationModalComponent);
|
|
||||||
export default Connect([NS_HIDDEN_EVALUATION], true)(HiddenList);
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Page isShowAllAction={false}>
|
|
||||||
<Search
|
|
||||||
options={[
|
|
||||||
{ name: "likeCorpinfoName", label: "分公司名称" },
|
|
||||||
{ name: "eqState", label: "隐患考评组类型", render: FORM_ITEM_RENDER_ENUM.SELECT, items: STATE_ENUM },
|
|
||||||
{ name: "likeMembers", label: "考评组成员" },
|
|
||||||
]}
|
|
||||||
form={form}
|
|
||||||
onFinish={getData}
|
|
||||||
/>
|
|
||||||
<Table
|
|
||||||
columns={[
|
|
||||||
{ title: "分公司名称", dataIndex: "corpinfoName" },
|
|
||||||
{ title: "隐患考评组类型", dataIndex: "hiddenType", render: (_, record) => (
|
|
||||||
<>
|
|
||||||
{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) => (
|
|
||||||
<Space>
|
|
||||||
{props.permission("jgd-yhkp-kp") && (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`./hiddenList?hiddenType=${record.hiddenType}&corpinfoId=${record.corpinfoId}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
考评
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
{...tableProps}
|
|
||||||
/>
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Connect([NS_HIDDEN_EVALUATION], true)(Permission(List));
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
function HiddenEvaluation(props) {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default HiddenEvaluation;
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
|
||||||
import Page from "zy-react-library/components/Page";
|
|
||||||
|
|
||||||
function HiddenView() {
|
|
||||||
return (
|
|
||||||
<Page headerTitle="查看" contentPadding="0 20px 20px 20px">
|
|
||||||
<HiddenInfo />
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default HiddenView;
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Page headerTitle="分公司考评隐患">
|
|
||||||
<Search
|
|
||||||
options={[
|
|
||||||
{ name: "eqHiddenSource", label: "隐患来源", render: FORM_ITEM_RENDER_ENUM.SELECT, items: HIDDEN_SOURCE_ENUM },
|
|
||||||
{ name: "eqFindUserDeptId", label: "发现部门", render: (<DepartmentSelectTree />) },
|
|
||||||
{ name: "likeFindUserRealName", label: "隐患发现人" },
|
|
||||||
{
|
|
||||||
name: "eqHiddenTypeC",
|
|
||||||
label: "隐患类型",
|
|
||||||
render: <DictionarySelectTree dictValue="hiddenType" onlyLastLevel />,
|
|
||||||
},
|
|
||||||
{ name: "hiddenFindTime", label: "兑换时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
|
||||||
]}
|
|
||||||
form={form}
|
|
||||||
onFinish={getData}
|
|
||||||
/>
|
|
||||||
<Table
|
|
||||||
columns={[
|
|
||||||
{
|
|
||||||
title: "隐患来源",
|
|
||||||
dataIndex: "hiddenSource",
|
|
||||||
render: (_, record) => 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) => (
|
|
||||||
<Space>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`../hiddenView?id=${record.id}&hiddenId=${record.hiddenId}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
查看隐患详情
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
setViewEvaluationModalOpen(true);
|
|
||||||
setCurrentHiddenId(record.id);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
考评详情
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
{...tableProps}
|
|
||||||
/>
|
|
||||||
{viewEvaluationModalOpen
|
|
||||||
&& <ViewEvaluationModal onCancel={() => setViewEvaluationModalOpen(false)} hiddenId={currentHiddenId} />}
|
|
||||||
{evaluationModalOpen
|
|
||||||
&& <EvaluationModal onCancel={() => setEvaluationModalOpen(false)} hiddenId={currentHiddenId} getData={getData} />}
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
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 (
|
|
||||||
<Modal
|
|
||||||
title="考评"
|
|
||||||
width={600}
|
|
||||||
open
|
|
||||||
maskClosable={false}
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
onOk={form.submit}
|
|
||||||
confirmLoading={props.hiddenEvaluation.hiddenEvaluationLoading}
|
|
||||||
>
|
|
||||||
<Spin spinning={props.hiddenEvaluation.hiddenEvaluationLoading}>
|
|
||||||
<Descriptions
|
|
||||||
column={2}
|
|
||||||
bordered
|
|
||||||
styles={{ label: { width: 200 } }}
|
|
||||||
items={[
|
|
||||||
...list.flatMap(item => ([
|
|
||||||
{ 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 }] : []),
|
|
||||||
])),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
<FormBuilder
|
|
||||||
style={{ marginTop: 20 }}
|
|
||||||
form={form}
|
|
||||||
showActionButtons={false}
|
|
||||||
span={24}
|
|
||||||
onFinish={onSubmit}
|
|
||||||
labelCol={{ span: 8 }}
|
|
||||||
options={[
|
|
||||||
{ name: "user", label: "考评人员", required: false, componentProps: { disabled: true } },
|
|
||||||
{
|
|
||||||
name: "result",
|
|
||||||
label: "是否符合",
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.SELECT,
|
|
||||||
items: [{ bianma: 1, name: "符合" }, { bianma: 0, name: "不符合" }],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "resultCase",
|
|
||||||
label: "不符合原因",
|
|
||||||
render: FORM_ITEM_RENDER_ENUM.TEXTAREA,
|
|
||||||
dependencies: ["result"],
|
|
||||||
hidden: formValues => !(formValues.result === 0),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Spin>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const EvaluationModal = Connect([NS_HIDDEN_EVALUATION], true)(EvaluationModalComponent);
|
|
||||||
export default Connect([NS_HIDDEN_EVALUATION], true)(HiddenEvaluationList);
|
|
||||||
|
|
@ -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: (
|
|
||||||
<a
|
|
||||||
className="corp-name-link"
|
|
||||||
onClick={() => handleCorpNameClick(record)}
|
|
||||||
>
|
|
||||||
{text}
|
|
||||||
</a>
|
|
||||||
),
|
|
||||||
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 (
|
|
||||||
<Page isShowAllAction={false}>
|
|
||||||
<Search
|
|
||||||
options={[
|
|
||||||
{ name: "likeCorpinfoName", label: "分公司名称" },
|
|
||||||
]}
|
|
||||||
form={form}
|
|
||||||
onFinish={getData}
|
|
||||||
/>
|
|
||||||
<Table
|
|
||||||
columns={columns}
|
|
||||||
{...processedTableProps}
|
|
||||||
/>
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Connect([NS_HIDDEN_EVALUATION], true)(List);
|
|
||||||
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
import UserExchangeListPage from "../../PersonnelEvaluation/UserExchangeList";
|
|
||||||
|
|
||||||
function UserExchangeList(props) {
|
|
||||||
return (
|
|
||||||
<UserExchangeListPage {...props} />
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default UserExchangeList;
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
import UserExchangeRecordListPage from "../../PersonnelEvaluation/UserExchangeRecordList";
|
|
||||||
|
|
||||||
function UserExchangeRecordList(props) {
|
|
||||||
return (
|
|
||||||
<UserExchangeRecordListPage {...props} />
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default UserExchangeRecordList;
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
function PerformanceEvaluationList(props) {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default PerformanceEvaluationList;
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Page isShowAllAction={false}>
|
|
||||||
<Search
|
|
||||||
options={[
|
|
||||||
{ name: "eqDeptId", label: "考评组部门", render: (<DepartmentSelectTree searchType="all" />) },
|
|
||||||
{ name: "likeSafetyMembers", label: "考评组人员" },
|
|
||||||
]}
|
|
||||||
form={form}
|
|
||||||
onFinish={getData}
|
|
||||||
/>
|
|
||||||
<Table
|
|
||||||
columns={[
|
|
||||||
{ title: "单位名称", dataIndex: "corpinfoName" },
|
|
||||||
{ title: "完成考评隐患数", dataIndex: "evaDoneTotal" },
|
|
||||||
{ title: "待考评隐患数", dataIndex: "checkTotal" },
|
|
||||||
{ title: "涉及奖励人数", dataIndex: "peopleTotal" },
|
|
||||||
{
|
|
||||||
title: "奖励兑换情况",
|
|
||||||
dataIndex: "alreadyExchange",
|
|
||||||
render: (_, record) => (`${record.alreadyExchange}/${record.alreadyExchange + record.notExchange}`),
|
|
||||||
},
|
|
||||||
{ title: "安全类隐患考评组成员", dataIndex: "safetyMembers" },
|
|
||||||
{ title: "环保类隐患考评组成员", dataIndex: "environmentalMembers" },
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
width: 100,
|
|
||||||
fixed: "right",
|
|
||||||
render: (_, record) => (
|
|
||||||
<Space>
|
|
||||||
{props.permission("permission") && (
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`./userExchangeList?corpinfoId=${record.corpinfoId}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
查看
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
{...tableProps}
|
|
||||||
/>
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Connect([NS_PERSONNEL_EVALUATION], true)(Permission(List));
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Page headerTitle="人员考评情况">
|
|
||||||
<Spin spinning={downloadBlobLoading}>
|
|
||||||
<Search
|
|
||||||
options={[
|
|
||||||
{ name: "eqFindUserDeptId", label: "部门", render: (<DepartmentSelectTree isNeedCorpInfoId params={{ eqCorpinfoId: query.corpinfoId }} />) },
|
|
||||||
{ name: "likeFindUserRealName", label: "姓名" },
|
|
||||||
]}
|
|
||||||
form={form}
|
|
||||||
onFinish={getData}
|
|
||||||
/>
|
|
||||||
<Table
|
|
||||||
rowSelection={{
|
|
||||||
preserveSelectedRowKeys: true,
|
|
||||||
selectedRowKeys,
|
|
||||||
onChange: (selectedRowKeys) => {
|
|
||||||
setSelectedRowKeys(selectedRowKeys);
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
rowKey="findUserId"
|
|
||||||
toolBarRender={() => (
|
|
||||||
<Space>
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
icon={<EditIcon />}
|
|
||||||
onClick={onBatchExchange}
|
|
||||||
>
|
|
||||||
批量兑换
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
icon={<EditIcon />}
|
|
||||||
onClick={OnRedeemAll}
|
|
||||||
>
|
|
||||||
全选兑换
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
icon={<ExportIcon />}
|
|
||||||
onClick={onExportExcel}
|
|
||||||
>
|
|
||||||
导出数据
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
)}
|
|
||||||
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) => (
|
|
||||||
<Space>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`./userExchangeRecordList?findUserId=${record.findUserId}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
兑换记录
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`./HiddenEvaluationList?findUserId=${record.findUserId}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
考评详情
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
{...tableProps}
|
|
||||||
/>
|
|
||||||
</Spin>
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Connect([NS_PERSONNEL_EVALUATION, NS_HIDDEN_EVALUATION], true)(UserExchangeList);
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Page headerTitle="兑换记录">
|
|
||||||
<Search
|
|
||||||
options={[
|
|
||||||
{ name: "dates", label: "兑换时间", render: FORM_ITEM_RENDER_ENUM.DATE_RANGE },
|
|
||||||
]}
|
|
||||||
form={form}
|
|
||||||
onFinish={getData}
|
|
||||||
/>
|
|
||||||
<Table
|
|
||||||
columns={[
|
|
||||||
{ title: "兑换时间", dataIndex: "exchangeTime" },
|
|
||||||
{ title: "兑换操作人员", dataIndex: "exchangeUserName" },
|
|
||||||
{ title: "兑换隐患数", dataIndex: "exchangeTotal" },
|
|
||||||
{ title: "兑换积分", dataIndex: "exchangeScore" },
|
|
||||||
{ title: "剩余积分数", dataIndex: "surplusScoreTotal" },
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
width: 100,
|
|
||||||
fixed: "right",
|
|
||||||
render: (_, record) => (
|
|
||||||
<Space>
|
|
||||||
<Button
|
|
||||||
type="link"
|
|
||||||
onClick={() => {
|
|
||||||
props.history.push(`./HiddenEvaluationList?findUserId=${record.belongerId}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
隐患详情
|
|
||||||
</Button>
|
|
||||||
</Space>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
{...tableProps}
|
|
||||||
/>
|
|
||||||
</Page>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Connect([NS_PERSONNEL_EVALUATION], true)(UserExchangeRecordList);
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
function PersonnelEvaluation(props) {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default PersonnelEvaluation;
|
|
||||||
|
|
@ -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 (
|
|
||||||
<Modal
|
|
||||||
title="考评详情"
|
|
||||||
width={600}
|
|
||||||
open
|
|
||||||
maskClosable={false}
|
|
||||||
onCancel={props.onCancel}
|
|
||||||
footer={[
|
|
||||||
<Button key="cancel" onClick={props.onCancel}>
|
|
||||||
取消
|
|
||||||
</Button>,
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<Descriptions
|
|
||||||
column={2}
|
|
||||||
bordered
|
|
||||||
styles={{ label: { width: 200 } }}
|
|
||||||
items={[
|
|
||||||
...list.flatMap(item => ([
|
|
||||||
{ 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 }] : []),
|
|
||||||
])),
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default Connect([NS_HIDDEN_EVALUATION], true)(ViewEvaluationModal);
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
function Evaluation(props) {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
{props.children}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Evaluation;
|
|
||||||
Loading…
Reference in New Issue