权限
This commit is contained in:
@@ -63,23 +63,27 @@ const DepListForm: React.FC = () => {
|
||||
<GapBox>
|
||||
{item?.admin_id != 1 && (
|
||||
<>
|
||||
<Button
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
AdminDepEditModalRef.current?.show(item);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
<Popconfirm
|
||||
placement='bottom'
|
||||
title='确认删除该组织架构吗?'
|
||||
onConfirm={() => {
|
||||
deleteAdminDepartmentRequest(stringify({ department_id: item.department_id }));
|
||||
}}
|
||||
>
|
||||
<Button danger>删除</Button>
|
||||
</Popconfirm>
|
||||
{auth.SF_ADMIN_DEPART_EDIT && (
|
||||
<Button
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
AdminDepEditModalRef.current?.show(item);
|
||||
}}
|
||||
>
|
||||
编辑
|
||||
</Button>
|
||||
)}
|
||||
{auth.SF_ADMIN_DEPART_DEL && (
|
||||
<Popconfirm
|
||||
placement='top'
|
||||
title='确认删除该组织架构吗?'
|
||||
onConfirm={() => {
|
||||
deleteAdminDepartmentRequest(stringify({ department_id: item.department_id }));
|
||||
}}
|
||||
>
|
||||
<Button danger>删除</Button>
|
||||
</Popconfirm>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</GapBox>
|
||||
@@ -99,7 +103,6 @@ const DepListForm: React.FC = () => {
|
||||
function page(curr: number) {
|
||||
if (!listLoading) {
|
||||
params.curr_page = curr;
|
||||
console.log(params);
|
||||
listRequest(stringify(params));
|
||||
}
|
||||
}
|
||||
@@ -193,14 +196,16 @@ const DepListForm: React.FC = () => {
|
||||
|
||||
<GapBox style={{ marginBottom: 12, justifyContent: 'space-between' }}>
|
||||
<GapBox>
|
||||
<Button
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
AdminDepEditModalRef.current?.show();
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
{auth.SF_ADMIN_DEPART_ADD && (
|
||||
<Button
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
AdminDepEditModalRef.current?.show();
|
||||
}}
|
||||
>
|
||||
新增
|
||||
</Button>
|
||||
)}
|
||||
</GapBox>
|
||||
<HeaderPagination
|
||||
style={{ marginBottom: 0, marginRight: 12 }}
|
||||
|
||||
Reference in New Issue
Block a user