fix(admin): 优化admin管理台细节问题

This commit is contained in:
sophie committed 2026-06-23 19:17:34 +08:00
1 parent a89491f4b1
commit 0d3a812e16
7 files changed
+132 -86

No files matched your search

@@ -19,6 +19,7 @@ import {
unbindAdminWecomUser,
} from '@/features/admin/api/admin.api';
import { useMessage } from '@/shared/composables/useMessage';
import { formatLocalDateTime } from '@/shared/utils/dateTime';
import type { AdminUserRow } from '@/features/admin/types/admin.types';
import {
createDefaultWecomSystemSettings,
@@ -425,7 +426,7 @@ export function useWecomAdmin() {
return;
}
const rows = filteredWecomLoginAudits.value.map((row) => ({
Time: row.created_at || '',
Time: formatLocalDateTime(row.created_at),
Source: row.source || '',
Username: row.username || '',
Status: row.status || '',
@@ -6,6 +6,7 @@
import { inject } from 'vue';
import { useI18n } from 'vue-i18n';
import { Download } from 'lucide-vue-next';
import { formatLocalDateTime } from '@/shared/utils/dateTime';
import { WECOM_ADMIN_KEY } from '../wecom.context';
const { t } = useI18n();
@@ -40,9 +41,9 @@ const {
</button>
</div>
</div>
<div class="admin-table-wrap max-h-[560px]">
<div class="admin-table-wrap">
<table class="admin-table">
<thead class="sticky top-0 z-10 admin-table-sticky-head">
<thead>
<tr>
<th class="px-4 py-3 text-xs">{{ t('admin.wecom.auditHeaders.time') }}</th>
<th class="px-4 py-3 text-xs">{{ t('admin.wecom.auditHeaders.source') }}</th>
@@ -57,7 +58,7 @@ const {
<td colspan="6" class="px-4 admin-table-empty">{{ t('admin.wecom.noAuditData') }}</td>
</tr>
<tr v-for="row in filteredWecomLoginAudits" :key="row.id">
<td class="px-4 py-3 text-xs text-muted whitespace-nowrap">{{ row.created_at || '-' }}</td>
<td class="px-4 py-3 text-xs text-muted whitespace-nowrap" :title="row.created_at || '-'">{{ formatLocalDateTime(row.created_at) }}</td>
<td class="px-4 py-3 text-xs text-secondary">{{ t('admin.wecom.sources.' + row.source) }}</td>
<td class="px-4 py-3 text-xs text-secondary">{{ row.username || '-' }}</td>
<td class="px-4 py-3">