优化控制台、登录日志、用户

This commit is contained in:
zjl 2024-12-18 09:18:51 +08:00
parent 9f65845fed
commit aa8920f487
3 changed files with 26 additions and 13 deletions

View File

@ -10,7 +10,7 @@
:bordered="false"
>
<template #header-extra>
<n-tag type="success"></n-tag>
<n-tag type="success" :bordered="false"></n-tag>
</template>
<div class="flex justify-between px-1 py-1">
<n-skeleton v-if="loading" :width="100" size="medium" />
@ -59,7 +59,7 @@
:bordered="false"
>
<template #header-extra>
<n-tag type="info"></n-tag>
<n-tag type="info" :bordered="false"></n-tag>
</template>
<div class="flex justify-between px-1 py-1">
<n-skeleton v-if="loading" :width="100" size="medium" />
@ -102,7 +102,7 @@
:bordered="false"
>
<template #header-extra>
<n-tag type="warning"></n-tag>
<n-tag type="warning" :bordered="false"></n-tag>
</template>
<div class="flex justify-between px-1 py-1">
<n-skeleton v-if="loading" :width="100" size="medium" />
@ -151,7 +151,7 @@
:bordered="false"
>
<template #header-extra>
<n-tag type="error"></n-tag>
<n-tag type="error" :bordered="false"></n-tag>
</template>
<div class="flex justify-between px-1 py-1">
<n-skeleton v-if="loading" :width="100" size="medium" />

View File

@ -28,7 +28,7 @@
{{ formData.requestMethod }}
</n-descriptions-item>
<n-descriptions-item label="请求状态">
<n-tag :color="formData.status ? 'danger' : 'success'">{{
<n-tag :color="formData.status ? 'danger' : 'success'" :bordered="false">{{
formData.status ? '异常' : '正常'
}}</n-tag>
</n-descriptions-item>

View File

@ -17,16 +17,17 @@ export const columns: BasicColumn[] = [
{
title: '登录账号',
key: 'username',
width: 150,
width: 100,
},
{
title: '用户姓名',
key: 'realname',
width: 150,
width: 100,
},
{
title: '头像',
key: 'avatar',
width: 100,
render(row) {
return h(NImage, {
width: 48,
@ -35,11 +36,10 @@ export const columns: BasicColumn[] = [
fit: 'fill',
});
},
width: 100,
},
{
title: '性别',
width: 100,
width: 80,
key: 'gender',
render(row) {
let typeText = '';
@ -78,19 +78,32 @@ export const columns: BasicColumn[] = [
{
title: '手机号',
key: 'mobile',
width: 160,
width: 120,
},
{
title: '用户角色',
key: 'role',
width: 250,
render(row) {
let roleNames = '';
if (row.roles.length > 0) {
roleNames = row.roles.map((role) => role.name).join(',');
}
return h('span', roleNames || '-');
// return h('span', roleNames || '-');
return h(
NTag,
{
style: {
marginRight: '6px',
},
type: 'info',
bordered: false,
},
{
default: () => roleNames,
},
);
},
width: 100,
},
{
title: '职级',
@ -105,7 +118,7 @@ export const columns: BasicColumn[] = [
{
title: '部门',
key: 'deptName',
width: 160,
width: 100,
},
{
title: '状态',