优化:优化表格操作列功能权限处理,即当所有操作按钮均没有权限时,移除操作列
This commit is contained in:
parent
405c821e2a
commit
1a180ff3d9
@ -66,7 +66,7 @@
|
|||||||
<a-table-column title="登录地点" data-index="location" />
|
<a-table-column title="登录地点" data-index="location" />
|
||||||
<a-table-column title="浏览器" data-index="browser" />
|
<a-table-column title="浏览器" data-index="browser" />
|
||||||
<a-table-column title="登录时间" data-index="loginTime" />
|
<a-table-column title="登录时间" data-index="loginTime" />
|
||||||
<a-table-column title="操作" align="center">
|
<a-table-column v-if="checkPermission(['monitor:online:user:delete'])" title="操作" align="center">
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-popconfirm content="确定要强退该用户吗?" type="warning" @ok="handleKickout(record.token)">
|
<a-popconfirm content="确定要强退该用户吗?" type="warning" @ok="handleKickout(record.token)">
|
||||||
<a-button
|
<a-button
|
||||||
@ -93,9 +93,10 @@
|
|||||||
OnlineUserParam,
|
OnlineUserParam,
|
||||||
OnlineUserRecord,
|
OnlineUserRecord,
|
||||||
listOnlineUser,
|
listOnlineUser,
|
||||||
kickout
|
kickout,
|
||||||
} from '@/api/monitor/online';
|
} from '@/api/monitor/online';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
|
import checkPermission from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as any;
|
||||||
|
|
||||||
|
@ -137,7 +137,11 @@
|
|||||||
<a-table-column title="描述" data-index="description" />
|
<a-table-column title="描述" data-index="description" />
|
||||||
<a-table-column title="创建人" data-index="createUserString" />
|
<a-table-column title="创建人" data-index="createUserString" />
|
||||||
<a-table-column title="创建时间" data-index="createTime" />
|
<a-table-column title="创建时间" data-index="createTime" />
|
||||||
<a-table-column title="操作" align="center">
|
<a-table-column
|
||||||
|
v-if="checkPermission(['system:dept:update', 'system:dept:delete'])"
|
||||||
|
title="操作"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-button
|
<a-button
|
||||||
v-permission="['system:dept:update']"
|
v-permission="['system:dept:update']"
|
||||||
|
@ -153,7 +153,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column title="创建时间" data-index="createTime" />
|
<a-table-column title="创建时间" data-index="createTime" />
|
||||||
<a-table-column title="操作" align="center">
|
<a-table-column
|
||||||
|
v-if="checkPermission(['system:menu:update', 'system:menu:delete'])"
|
||||||
|
title="操作"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-button
|
<a-button
|
||||||
v-permission="['system:menu:update']"
|
v-permission="['system:menu:update']"
|
||||||
|
@ -152,7 +152,11 @@
|
|||||||
<a-table-column title="描述" data-index="description" />
|
<a-table-column title="描述" data-index="description" />
|
||||||
<a-table-column title="创建人" data-index="createUserString" />
|
<a-table-column title="创建人" data-index="createUserString" />
|
||||||
<a-table-column title="创建时间" data-index="createTime" />
|
<a-table-column title="创建时间" data-index="createTime" />
|
||||||
<a-table-column title="操作" align="center">
|
<a-table-column
|
||||||
|
v-if="checkPermission(['system:role:update', 'system:role:delete'])"
|
||||||
|
title="操作"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-button
|
<a-button
|
||||||
v-permission="['system:role:update']"
|
v-permission="['system:role:update']"
|
||||||
|
@ -186,6 +186,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column
|
<a-table-column
|
||||||
|
v-if="
|
||||||
|
checkPermission([
|
||||||
|
'system:user:update',
|
||||||
|
'system:user:delete',
|
||||||
|
'system:user:password:reset',
|
||||||
|
'system:user:role:update',
|
||||||
|
])
|
||||||
|
"
|
||||||
title="操作"
|
title="操作"
|
||||||
align="center"
|
align="center"
|
||||||
fixed="right"
|
fixed="right"
|
||||||
|
Loading…
Reference in New Issue
Block a user