This commit is contained in:
2026-01-22 16:52:40 +08:00
parent ab91458199
commit a6be3aa5e2
13 changed files with 341 additions and 155 deletions

View File

@@ -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 }}