管理人员替换为权限按钮

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"
icon={<PlusOutlined />}
p="department-store"
onClick={() => console.log("ok")}
onClick={() => null}
/>
</Link>
</div>

View File

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