mirror of https://gitee.com/topiam/eiam
⚡ 优化代码
parent
f9a8028db0
commit
b0f797b5ca
|
@ -40,7 +40,7 @@ import {
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Typography,
|
Typography,
|
||||||
Tag,
|
Tag,
|
||||||
Popover
|
Popover,
|
||||||
} from 'antd';
|
} from 'antd';
|
||||||
import React, { useRef, useState } from 'react';
|
import React, { useRef, useState } from 'react';
|
||||||
import CreateUser from '../CreateUser';
|
import CreateUser from '../CreateUser';
|
||||||
|
@ -188,21 +188,22 @@ export default (props: UserListProps) => {
|
||||||
<Popover
|
<Popover
|
||||||
key="pop"
|
key="pop"
|
||||||
title={
|
title={
|
||||||
<Tag color={'geekblue'} key={record.primaryOrgDisplayPath}>
|
<Tag color={'geekblue'} key={record.orgDisplayPath}>
|
||||||
{record.primaryOrgDisplayPath}
|
{record.primaryOrgDisplayPath}
|
||||||
</Tag>
|
</Tag>
|
||||||
}
|
}
|
||||||
content={
|
content={
|
||||||
<Space direction="vertical" size="small" style={{ display: 'flex' }}>
|
<Space direction="vertical" size="small" style={{ display: 'flex' }}>
|
||||||
{record.orgDisplayPath.split(",")?.map((p: string) => {
|
{record.orgDisplayPath.split(',')?.map((p: string) => {
|
||||||
return (
|
return (
|
||||||
<Tag color={'green'} key={p}>
|
<Tag color={'green'} key={p}>
|
||||||
{p}
|
{p}
|
||||||
</Tag>
|
</Tag>
|
||||||
)
|
);
|
||||||
})}
|
})}
|
||||||
</Space>
|
</Space>
|
||||||
}>
|
}
|
||||||
|
>
|
||||||
<Space key="primary_path">
|
<Space key="primary_path">
|
||||||
{
|
{
|
||||||
<Tag color={'geekblue'} key={record.primaryOrgDisplayPath}>
|
<Tag color={'geekblue'} key={record.primaryOrgDisplayPath}>
|
||||||
|
@ -211,17 +212,15 @@ export default (props: UserListProps) => {
|
||||||
}
|
}
|
||||||
</Space>
|
</Space>
|
||||||
<Space key="path" direction="vertical" size="small" style={{ display: 'flex' }}>
|
<Space key="path" direction="vertical" size="small" style={{ display: 'flex' }}>
|
||||||
{
|
{record.orgDisplayPath.split(',')?.map((p: string) => {
|
||||||
record.orgDisplayPath.split(",")?.map((p: string) => {
|
|
||||||
return (
|
return (
|
||||||
<Tag color={'green'} key={p}>
|
<Tag color={'green'} key={p}>
|
||||||
{p}
|
{p}
|
||||||
</Tag>
|
</Tag>
|
||||||
)
|
);
|
||||||
})
|
})}
|
||||||
}
|
|
||||||
</Space>
|
</Space>
|
||||||
</Popover>
|
</Popover>,
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -273,7 +273,9 @@ export async function removeUser(id: string): Promise<API.ApiResult<boolean>> {
|
||||||
/**
|
/**
|
||||||
* Remove Batch User
|
* Remove Batch User
|
||||||
*/
|
*/
|
||||||
export async function removeBatchUser(ids: (number | string)[]): Promise<API.ApiResult<boolean>> {
|
export async function removeBatchUser(
|
||||||
|
ids: (number | string | Key)[],
|
||||||
|
): Promise<API.ApiResult<boolean>> {
|
||||||
return request<API.ApiResult<boolean>>(`/api/v1/user/batch_delete`, {
|
return request<API.ApiResult<boolean>>(`/api/v1/user/batch_delete`, {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
params: { ids: ids },
|
params: { ids: ids },
|
||||||
|
|
Loading…
Reference in New Issue