增加按钮权限
parent
b9e2c94a80
commit
9b6de27939
|
|
@ -1,7 +1,7 @@
|
||||||
import ListPage from "~/pages/Container/Supervision/HiddenEvaluation/List";
|
import ListPage from "~/pages/Container/Supervision/HiddenEvaluation/List";
|
||||||
|
|
||||||
function List(props) {
|
function List(props) {
|
||||||
return (<ListPage {...props} />);
|
return (<ListPage evaluationBtn="qyd-fgsyhkp-eval" {...props} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default List;
|
export default List;
|
||||||
|
|
|
||||||
|
|
@ -51,15 +51,17 @@ function List(props) {
|
||||||
<Table
|
<Table
|
||||||
toolBarRender={() => (
|
toolBarRender={() => (
|
||||||
<Space>
|
<Space>
|
||||||
<Button
|
{props.permission("gfd-kpzpz-add") && (
|
||||||
type="primary"
|
<Button
|
||||||
icon={<AddIcon />}
|
type="primary"
|
||||||
onClick={() => {
|
icon={<AddIcon />}
|
||||||
setAddModalOpen(true);
|
onClick={() => {
|
||||||
}}
|
setAddModalOpen(true);
|
||||||
>
|
}}
|
||||||
新增
|
>
|
||||||
</Button>
|
新增
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
columns={[
|
columns={[
|
||||||
|
|
@ -74,44 +76,52 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
<Button
|
{props.permission("gfd-kpzpz-info") && (
|
||||||
type="link"
|
<Button
|
||||||
onClick={() => {
|
type="link"
|
||||||
setViewModalOpen(true);
|
onClick={() => {
|
||||||
setCurrentData(record);
|
setViewModalOpen(true);
|
||||||
}}
|
setCurrentData(record);
|
||||||
>
|
}}
|
||||||
查看
|
>
|
||||||
</Button>
|
查看
|
||||||
<Button
|
</Button>
|
||||||
type="link"
|
)}
|
||||||
onClick={() => {
|
{props.permission("gfd-kpzpz-anquan") && (
|
||||||
setConfigModalOpen(true);
|
<Button
|
||||||
setEvaluationType(1);
|
type="link"
|
||||||
setCurrentData(record);
|
onClick={() => {
|
||||||
}}
|
setConfigModalOpen(true);
|
||||||
>
|
setEvaluationType(1);
|
||||||
安全类组分配
|
setCurrentData(record);
|
||||||
</Button>
|
}}
|
||||||
<Button
|
>
|
||||||
type="link"
|
安全类组分配
|
||||||
onClick={() => {
|
</Button>
|
||||||
setConfigModalOpen(true);
|
)}
|
||||||
setEvaluationType(2);
|
{props.permission("gfd-kpzpz-huanbao") && (
|
||||||
setCurrentData(record);
|
<Button
|
||||||
}}
|
type="link"
|
||||||
>
|
onClick={() => {
|
||||||
环保类组分配
|
setConfigModalOpen(true);
|
||||||
</Button>
|
setEvaluationType(2);
|
||||||
<Button
|
setCurrentData(record);
|
||||||
type="link"
|
}}
|
||||||
onClick={() => {
|
>
|
||||||
setChangeLogModalOpen(true);
|
环保类组分配
|
||||||
setCurrentData(record);
|
</Button>
|
||||||
}}
|
)}
|
||||||
>
|
{props.permission("gfd-kpzpz-record") && (
|
||||||
变更记录
|
<Button
|
||||||
</Button>
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
setChangeLogModalOpen(true);
|
||||||
|
setCurrentData(record);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
变更记录
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -72,14 +72,16 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
<Button
|
{props.permission(props.evaluationBtn || "gfd-fgsyhkp-eval") && (
|
||||||
type="link"
|
<Button
|
||||||
onClick={() => {
|
type="link"
|
||||||
props.history.push(`./hiddenList?corpinfoId=${record.corpinfoId}&evaluationType=${record.evaluationType}`);
|
onClick={() => {
|
||||||
}}
|
props.history.push(`./hiddenList?corpinfoId=${record.corpinfoId}&evaluationType=${record.evaluationType}`);
|
||||||
>
|
}}
|
||||||
考评
|
>
|
||||||
</Button>
|
考评
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -55,13 +55,17 @@ function List(props) {
|
||||||
return null;
|
return null;
|
||||||
return {
|
return {
|
||||||
children: (
|
children: (
|
||||||
<Button
|
props.permission("gfd-fgsjxkp-corp")
|
||||||
type="link"
|
? (
|
||||||
onClick={() =>
|
<Button
|
||||||
props.history.push(`./userExchangeList?corpinfoId=${record.corpinfoId}`)}
|
type="link"
|
||||||
>
|
onClick={() =>
|
||||||
{record.corpinfoName}
|
props.history.push(`./userExchangeList?corpinfoId=${record.corpinfoId}`)}
|
||||||
</Button>
|
>
|
||||||
|
{record.corpinfoName}
|
||||||
|
</Button>
|
||||||
|
)
|
||||||
|
: <span>{record.corpinfoName}</span>
|
||||||
),
|
),
|
||||||
props: { rowSpan },
|
props: { rowSpan },
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -43,14 +43,16 @@ function List(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
<Button
|
{props.permission("gfd-rykpgl-info") && (
|
||||||
type="link"
|
<Button
|
||||||
onClick={() => {
|
type="link"
|
||||||
props.history.push(`./userExchangeList?corpinfoId=${record.corpinfoId}`);
|
onClick={() => {
|
||||||
}}
|
props.history.push(`./userExchangeList?corpinfoId=${record.corpinfoId}`);
|
||||||
>
|
}}
|
||||||
查看
|
>
|
||||||
</Button>
|
查看
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||||
import { Button, message, Modal, Space, Spin } from "antd";
|
import { Button, message, Modal, Space, Spin } from "antd";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
@ -150,22 +151,53 @@ function UserExchangeList(props) {
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
render: (_, record) => (
|
render: (_, record) => (
|
||||||
<Space>
|
<Space>
|
||||||
<Button
|
{
|
||||||
type="link"
|
props.entrance === "enterprise"
|
||||||
onClick={() => {
|
? (
|
||||||
props.history.push(`./userExchangeRecordList?userId=${record.userId}`);
|
<>
|
||||||
}}
|
{props.permission("qyd-rykpgl-exchange-info") && (
|
||||||
>
|
<Button
|
||||||
兑换记录
|
type="link"
|
||||||
</Button>
|
onClick={() => {
|
||||||
<Button
|
props.history.push(`./userExchangeRecordList?userId=${record.userId}`);
|
||||||
type="link"
|
}}
|
||||||
onClick={() => {
|
>
|
||||||
props.history.push(`./hiddenEvaluationList?userId=${record.userId}`);
|
兑换记录
|
||||||
}}
|
</Button>
|
||||||
>
|
)}
|
||||||
考评详情
|
{props.permission("qyd-rykpgl-eval-record") && (
|
||||||
</Button>
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push(`./hiddenEvaluationList?userId=${record.userId}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
考评详情
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
: (
|
||||||
|
<>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push(`./userExchangeRecordList?userId=${record.userId}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
兑换记录
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
onClick={() => {
|
||||||
|
props.history.push(`./hiddenEvaluationList?userId=${record.userId}`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
考评详情
|
||||||
|
</Button>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
</Space>
|
</Space>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
@ -177,4 +209,4 @@ function UserExchangeList(props) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Connect([NS_PERSONNEL_EVALUATION, NS_HIDDEN_EVALUATION], true)(UserExchangeList);
|
export default Connect([NS_PERSONNEL_EVALUATION, NS_HIDDEN_EVALUATION], true)(Permission(UserExchangeList));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue