管理人员替换为权限按钮

This commit is contained in:
禺狨 2023-03-08 15:33:57 +08:00
parent 7a14ff88b6
commit efe556929c
2 changed files with 24 additions and 14 deletions

View File

@ -155,7 +155,7 @@ export const DepartmentPage: React.FC = () => {
class="mr-16" class="mr-16"
icon={<PlusOutlined />} icon={<PlusOutlined />}
p="department-store" p="department-store"
onClick={() => console.log("ok")} onClick={() => null}
/> />
</Link> </Link>
</div> </div>

View File

@ -15,6 +15,7 @@ import { PlusOutlined, ReloadOutlined } from "@ant-design/icons";
import { adminUser } from "../../../api/index"; import { adminUser } from "../../../api/index";
import { dateFormat } from "../../../utils/index"; import { dateFormat } from "../../../utils/index";
import { Link, useNavigate } from "react-router-dom"; import { Link, useNavigate } from "react-router-dom";
import { PerButton } from "../../../compenents";
interface DataType { interface DataType {
id: React.Key; id: React.Key;
@ -74,16 +75,16 @@ export const SystemAdministratorPage: React.FC = () => {
width: 160, width: 160,
render: (_, record) => ( render: (_, record) => (
<Space size="small"> <Space size="small">
<Button <PerButton
type="link" type="link"
danger text="详情"
className="c-red" class="c-red"
icon={null}
p="admin-user-update"
onClick={() => onClick={() =>
navigate(`/system/administrator/update/${record.id}`) navigate(`/system/administrator/update/${record.id}`)
} }
> />
</Button>
<Popconfirm <Popconfirm
title="警告" title="警告"
description="即将删除此人员,确认操作?" description="即将删除此人员,确认操作?"
@ -91,9 +92,14 @@ export const SystemAdministratorPage: React.FC = () => {
okText="确定" okText="确定"
cancelText="取消" cancelText="取消"
> >
<Button type="link" danger className="c-red"> <PerButton
type="link"
</Button> text="删除"
class="c-red"
icon={null}
p="admin-user-destroy"
onClick={() => null}
/>
</Popconfirm> </Popconfirm>
</Space> </Space>
), ),
@ -123,7 +129,6 @@ export const SystemAdministratorPage: React.FC = () => {
setRefresh(!refresh); setRefresh(!refresh);
}; };
const paginationProps = { const paginationProps = {
current: page, //当前页码 current: page, //当前页码
pageSize: size, pageSize: size,
@ -186,9 +191,14 @@ export const SystemAdministratorPage: React.FC = () => {
style={{ textDecoration: "none" }} style={{ textDecoration: "none" }}
to={`/system/administrator/create`} to={`/system/administrator/create`}
> >
<Button icon={<PlusOutlined />} className="mr-16" type="primary"> <PerButton
type="primary"
</Button> text="新建"
class="mr-16"
icon={<PlusOutlined />}
p="admin-user-store"
onClick={() => null}
/>
</Link> </Link>
</div> </div>
<div className="d-flex"> <div className="d-flex">