修复后台”在线用户强退“功能

This commit is contained in:
shizhong 2023-06-13 14:03:52 +08:00
parent 2989372c5c
commit e81f8c51cb
2 changed files with 4 additions and 4 deletions

View File

@ -23,6 +23,6 @@ export const getAccessTokenPageApi = (params: OAuth2TokenPageReqVO) => {
} }
// 删除 token // 删除 token
export const deleteAccessTokenApi = (accessToken: number) => { export const deleteAccessTokenApi = (accessToken: string) => {
return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken }) return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
} }

View File

@ -10,7 +10,7 @@
preIcon="ep:delete" preIcon="ep:delete"
:title="t('action.logout')" :title="t('action.logout')"
v-hasPermi="['system:oauth2-token:delete']" v-hasPermi="['system:oauth2-token:delete']"
@click="handleForceLogout(row.id)" @click="handleForceLogout(row.accessToken)"
/> />
</template> </template>
</XTable> </XTable>
@ -49,11 +49,11 @@ const handleDetail = async (row: TokenApi.OAuth2TokenVO) => {
} }
// 退 // 退
const handleForceLogout = (rowId: number) => { const handleForceLogout = (accessToken: string) => {
message message
.confirm('是否要强制退出用户') .confirm('是否要强制退出用户')
.then(async () => { .then(async () => {
await TokenApi.deleteAccessTokenApi(rowId) await TokenApi.deleteAccessTokenApi(accessToken)
message.success(t('common.success')) message.success(t('common.success'))
}) })
.finally(async () => { .finally(async () => {