增加按钮权限
parent
b9e2c94a80
commit
9b6de27939
|
|
@ -1,7 +1,7 @@
|
|||
import ListPage from "~/pages/Container/Supervision/HiddenEvaluation/List";
|
||||
|
||||
function List(props) {
|
||||
return (<ListPage {...props} />);
|
||||
return (<ListPage evaluationBtn="qyd-fgsyhkp-eval" {...props} />);
|
||||
}
|
||||
|
||||
export default List;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ function List(props) {
|
|||
<Table
|
||||
toolBarRender={() => (
|
||||
<Space>
|
||||
{props.permission("gfd-kpzpz-add") && (
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<AddIcon />}
|
||||
|
|
@ -60,6 +61,7 @@ function List(props) {
|
|||
>
|
||||
新增
|
||||
</Button>
|
||||
)}
|
||||
</Space>
|
||||
)}
|
||||
columns={[
|
||||
|
|
@ -74,6 +76,7 @@ function List(props) {
|
|||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
{props.permission("gfd-kpzpz-info") && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -83,6 +86,8 @@ function List(props) {
|
|||
>
|
||||
查看
|
||||
</Button>
|
||||
)}
|
||||
{props.permission("gfd-kpzpz-anquan") && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -93,6 +98,8 @@ function List(props) {
|
|||
>
|
||||
安全类组分配
|
||||
</Button>
|
||||
)}
|
||||
{props.permission("gfd-kpzpz-huanbao") && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -103,6 +110,8 @@ function List(props) {
|
|||
>
|
||||
环保类组分配
|
||||
</Button>
|
||||
)}
|
||||
{props.permission("gfd-kpzpz-record") && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -112,6 +121,7 @@ function List(props) {
|
|||
>
|
||||
变更记录
|
||||
</Button>
|
||||
)}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ function List(props) {
|
|||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
{props.permission(props.evaluationBtn || "gfd-fgsyhkp-eval") && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -80,6 +81,7 @@ function List(props) {
|
|||
>
|
||||
考评
|
||||
</Button>
|
||||
)}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ function List(props) {
|
|||
return null;
|
||||
return {
|
||||
children: (
|
||||
props.permission("gfd-fgsjxkp-corp")
|
||||
? (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() =>
|
||||
|
|
@ -62,6 +64,8 @@ function List(props) {
|
|||
>
|
||||
{record.corpinfoName}
|
||||
</Button>
|
||||
)
|
||||
: <span>{record.corpinfoName}</span>
|
||||
),
|
||||
props: { rowSpan },
|
||||
};
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ function List(props) {
|
|||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
{props.permission("gfd-rykpgl-info") && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -51,6 +52,7 @@ function List(props) {
|
|||
>
|
||||
查看
|
||||
</Button>
|
||||
)}
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { Permission } from "@cqsjjb/jjb-common-decorator/permission";
|
||||
import { Connect } from "@cqsjjb/jjb-dva-runtime";
|
||||
import { Button, message, Modal, Space, Spin } from "antd";
|
||||
import { useState } from "react";
|
||||
|
|
@ -150,6 +151,34 @@ function UserExchangeList(props) {
|
|||
fixed: "right",
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
{
|
||||
props.entrance === "enterprise"
|
||||
? (
|
||||
<>
|
||||
{props.permission("qyd-rykpgl-exchange-info") && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./userExchangeRecordList?userId=${record.userId}`);
|
||||
}}
|
||||
>
|
||||
兑换记录
|
||||
</Button>
|
||||
)}
|
||||
{props.permission("qyd-rykpgl-eval-record") && (
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
props.history.push(`./hiddenEvaluationList?userId=${record.userId}`);
|
||||
}}
|
||||
>
|
||||
考评详情
|
||||
</Button>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
: (
|
||||
<>
|
||||
<Button
|
||||
type="link"
|
||||
onClick={() => {
|
||||
|
|
@ -166,6 +195,9 @@ function UserExchangeList(props) {
|
|||
>
|
||||
考评详情
|
||||
</Button>
|
||||
</>
|
||||
)
|
||||
}
|
||||
</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