fix(login-log): 修正登录失败状态码由2改为0

- 调整登录失败状态的判断,将状态码从2修改为0
- 更新登录日志详情中的状态标签显示颜色及类型
- 修正登录日志筛选选项中的失败状态值
- 删除登录日志详情中重复的用户ID显示项
- 优化相关模板中的状态判断逻辑一致性
This commit is contained in:
danial
2025-11-12 22:44:59 +08:00
parent d985ca0cca
commit b82dab01d0
3 changed files with 7 additions and 8 deletions

View File

@@ -6,7 +6,9 @@
"Bash(pnpm type:check)",
"Bash(npx eslint:*)",
"mcp__ide__getDiagnostics",
"Bash(pnpm lint:*)"
"Bash(pnpm lint:*)",
"Bash(pnpm prettier:fix)",
"Bash(pnpm eslint:*)"
],
"deny": [],
"ask": []

View File

@@ -12,9 +12,6 @@
<a-descriptions-item label="ID">
{{ loginLogData.id || '-' }}
</a-descriptions-item>
<a-descriptions-item label="用户ID">
{{ loginLogData.userId || '-' }}
</a-descriptions-item>
<a-descriptions-item label="登录名">
{{ loginLogData.loginName || '-' }}
</a-descriptions-item>
@@ -34,7 +31,7 @@
<a-tag v-if="loginLogData.status === 1" color="green">
登录成功
</a-tag>
<a-tag v-else-if="loginLogData.status === 2" color="red">
<a-tag v-else-if="loginLogData.status === 0" color="red">
登录失败
</a-tag>
<a-tag v-else color="gray">未知</a-tag>
@@ -51,7 +48,7 @@
:span="2"
>
<a-typography-text
:type="loginLogData.status === 2 ? 'danger' : 'primary'"
:type="loginLogData.status === 0 ? 'danger' : 'primary'"
>
{{ loginLogData.message }}
</a-typography-text>

View File

@@ -26,7 +26,7 @@
allow-clear
>
<a-option :value="1">登录成功</a-option>
<a-option :value="2">登录失败</a-option>
<a-option :value="0">登录失败</a-option>
</a-select>
</a-form-item>
</a-col>
@@ -85,7 +85,7 @@
</template>
<template #status="{ record }">
<a-tag v-if="record.status === 1" color="green">登录成功</a-tag>
<a-tag v-else-if="record.status === 2" color="red">登录失败</a-tag>
<a-tag v-else-if="record.status === 0" color="red">登录失败</a-tag>
<a-tag v-else color="gray">未知</a-tag>
</template>
<template #browser="{ record }">