隐患审评股份端人员考评管理,分公司绩效考评,分公司端隐患审评
parent
7a43d728f9
commit
16a5d2d9f3
|
|
@ -20,3 +20,15 @@ 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",
|
||||
);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,252 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, message, Modal, Space } from "antd";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
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 List(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 (
|
||||
<div>
|
||||
<HeaderBack title="分公司考评隐患" />
|
||||
<div style={{ padding: 20 }}>
|
||||
<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: "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}
|
||||
/>
|
||||
</div>
|
||||
{viewEvaluationModalOpen
|
||||
&& <ViewEvaluationModal onCancel={() => setViewEvaluationModalOpen(false)} hiddenId={currentHiddenId} url="hiddenEvaluationHiddenEvaluationView" />}
|
||||
{evaluationModalOpen
|
||||
&& <EvaluationModal onCancel={() => setEvaluationModalOpen(false)} hiddenId={currentHiddenId} getData={getData} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
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={800}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
loading={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),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const EvaluationModal = Connect([NS_HIDDEN_EVALUATION], true)(EvaluationModalComponent);
|
||||
export default Connect([NS_HIDDEN_EVALUATION], true)(List);
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Space } from "antd";
|
||||
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 (
|
||||
<div>
|
||||
<div style={{ padding: 20 }}>
|
||||
<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>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./hiddenList?hiddenType=${record.hiddenType}&corpinfoId=${record.corpinfoId}`);
|
||||
}}
|
||||
>
|
||||
考评
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
]}
|
||||
{...tableProps}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_HIDDEN_EVALUATION], true)(List);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
function HiddenEvaluation(props) {
|
||||
return (
|
||||
<div>
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default HiddenEvaluation;
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
import HiddenInfo from "zy-react-library/components/HiddenInfo/gwj";
|
||||
|
||||
function HiddenView() {
|
||||
return (
|
||||
<div>
|
||||
<HiddenInfo />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default HiddenView;
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
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={800}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
loading={props.hiddenEvaluation.hiddenEvaluationLoading}
|
||||
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);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
function Supervision(props) {
|
||||
return (
|
||||
<div>
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Supervision;
|
||||
|
|
@ -149,7 +149,7 @@ function List(props) {
|
|||
/>
|
||||
</div>
|
||||
{viewEvaluationModalOpen
|
||||
&& <ViewEvaluationModal onCancel={() => setViewEvaluationModalOpen(false)} hiddenId={currentHiddenId} />}
|
||||
&& <ViewEvaluationModal onCancel={() => setViewEvaluationModalOpen(false)} hiddenId={currentHiddenId} url="hiddenEvaluationHiddenEvaluationView" />}
|
||||
{evaluationModalOpen
|
||||
&& <EvaluationModal onCancel={() => setEvaluationModalOpen(false)} hiddenId={currentHiddenId} getData={getData} />}
|
||||
</div>
|
||||
|
|
@ -162,7 +162,7 @@ const EvaluationModalComponent = (props) => {
|
|||
const [list, setList] = useState([]);
|
||||
const isEdit = useRef(false);
|
||||
const getData = async () => {
|
||||
const { data } = await props["hiddenEvaluationHiddenEvaluationView"]({ eqHiddenId: props.hiddenId });
|
||||
const { data } = await props["hiddenEvaluationHiddenEvaluationView"]({ eqId: props.hiddenId });
|
||||
setList(data);
|
||||
isEdit.current = (!!data?.[0]?.id);
|
||||
const userInfo = await getUserInfo();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,204 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Descriptions, Form, message, Modal, Space } from "antd";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import FormBuilder from "zy-react-library/components/FormBuilder";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
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 List(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 (
|
||||
<div>
|
||||
<HeaderBack title="分公司考评隐患" />
|
||||
<div style={{ padding: 20 }}>
|
||||
<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}
|
||||
/>
|
||||
</div>
|
||||
{viewEvaluationModalOpen
|
||||
&& <ViewEvaluationModal onCancel={() => setViewEvaluationModalOpen(false)} hiddenId={currentHiddenId} />}
|
||||
{evaluationModalOpen
|
||||
&& <EvaluationModal onCancel={() => setEvaluationModalOpen(false)} hiddenId={currentHiddenId} getData={getData} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
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={800}
|
||||
open
|
||||
maskClosable={false}
|
||||
onCancel={props.onCancel}
|
||||
onOk={form.submit}
|
||||
loading={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),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
const EvaluationModal = Connect([NS_HIDDEN_EVALUATION], true)(EvaluationModalComponent);
|
||||
export default Connect([NS_HIDDEN_EVALUATION], true)(List);
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Form } from "antd";
|
||||
import { useMemo } from "react";
|
||||
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 (
|
||||
<div>
|
||||
<div style={{ padding: 20 }}>
|
||||
<Search
|
||||
options={[
|
||||
{ name: "likeCorpinfoName", label: "分公司名称" },
|
||||
]}
|
||||
form={form}
|
||||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
columns={columns}
|
||||
{...processedTableProps}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_HIDDEN_EVALUATION], true)(List);
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
.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;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, message, Modal, Space, Spin } from "antd";
|
||||
import { useState } from "react";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import EditIcon from "zy-react-library/components/Icon/EditIcon";
|
||||
import ExportIcon from "zy-react-library/components/Icon/ExportIcon";
|
||||
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 List(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 (
|
||||
<div>
|
||||
<HeaderBack title="人员考评情况" />
|
||||
<div style={{ padding: 20 }}>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_PERSONNEL_EVALUATION, NS_HIDDEN_EVALUATION], true)(List);
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Space } from "antd";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
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 List(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 (
|
||||
<div>
|
||||
<HeaderBack title="兑换记录" />
|
||||
<div style={{ padding: 20 }}>
|
||||
<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}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_PERSONNEL_EVALUATION], true)(List);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
function PerformanceEvaluationList(props) {
|
||||
return (
|
||||
<div>
|
||||
{props.children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default PerformanceEvaluationList;
|
||||
|
|
@ -10,12 +10,13 @@ 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 { NS_PERSONNEL_EVALUATION } from "~/enumerate/namespace";
|
||||
import useUrlQueryCriteria from "zy-react-library/hooks/useUrlQueryCriteria";
|
||||
import { NS_HIDDEN_EVALUATION, NS_PERSONNEL_EVALUATION } from "~/enumerate/namespace";
|
||||
|
||||
function List(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"], {
|
||||
|
|
@ -45,7 +46,23 @@ function List(props) {
|
|||
},
|
||||
});
|
||||
};
|
||||
|
||||
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("请选择需要导出的人员");
|
||||
|
|
@ -98,9 +115,7 @@ function List(props) {
|
|||
<Button
|
||||
type="primary"
|
||||
icon={<EditIcon />}
|
||||
onClick={() => {
|
||||
// TODO
|
||||
}}
|
||||
onClick={OnRedeemAll}
|
||||
>
|
||||
全选兑换
|
||||
</Button>
|
||||
|
|
@ -138,6 +153,7 @@ function List(props) {
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./HiddenEvaluationList?findUserId=${record.findUserId}`);
|
||||
}}
|
||||
>
|
||||
考评详情
|
||||
|
|
@ -154,4 +170,4 @@ function List(props) {
|
|||
);
|
||||
}
|
||||
|
||||
export default Connect([NS_PERSONNEL_EVALUATION], true)(List);
|
||||
export default Connect([NS_PERSONNEL_EVALUATION, NS_HIDDEN_EVALUATION], true)(List);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, Form, Space } from "antd";
|
||||
import { useState } from "react";
|
||||
import HeaderBack from "zy-react-library/components/HeaderBack";
|
||||
import Search from "zy-react-library/components/Search";
|
||||
import Table from "zy-react-library/components/Table";
|
||||
|
|
@ -11,8 +10,6 @@ import { NS_PERSONNEL_EVALUATION } from "~/enumerate/namespace";
|
|||
|
||||
function List(props) {
|
||||
const query = useGetUrlQuery();
|
||||
|
||||
const [selectedRowKeys, setSelectedRowKeys] = useState([]);
|
||||
const [form] = Form.useForm();
|
||||
const { tableProps, getData } = useTable(props["personnelEvaluationUserExchangeRecordList"], {
|
||||
form,
|
||||
|
|
@ -37,14 +34,6 @@ function List(props) {
|
|||
onFinish={getData}
|
||||
/>
|
||||
<Table
|
||||
rowSelection={{
|
||||
preserveSelectedRowKeys: true,
|
||||
selectedRowKeys,
|
||||
onChange: (selectedRowKeys) => {
|
||||
setSelectedRowKeys(selectedRowKeys);
|
||||
},
|
||||
}}
|
||||
rowKey="findUserId"
|
||||
columns={[
|
||||
{ title: "兑换时间", dataIndex: "exchangeTime" },
|
||||
{ title: "兑换操作人员", dataIndex: "exchangeUserName" },
|
||||
|
|
@ -60,6 +49,7 @@ function List(props) {
|
|||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./HiddenEvaluationList?findUserId=${record.belongerId}`);
|
||||
}}
|
||||
>
|
||||
隐患详情
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import { NS_HIDDEN_EVALUATION } from "~/enumerate/namespace";
|
|||
const ViewEvaluationModal = (props) => {
|
||||
const [list, setList] = useState([]);
|
||||
const getData = async () => {
|
||||
const { data } = await props["hiddenEvaluationHiddenEvaluationView"]({ eqHiddenId: props.hiddenId });
|
||||
const { data } = await props["hiddenEvaluationHiddenEvaluationView"]({ eqId: props.hiddenId });
|
||||
// evaluateHiddenDetailList
|
||||
setList(data);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue