up实现查看日志功能

This commit is contained in:
2026-04-29 17:09:08 +08:00
parent 81ae9304a3
commit 43002c4745
8 changed files with 593 additions and 123 deletions
@@ -8,6 +8,7 @@ import { useRouter } from 'vue-router'
import UsersTab from '@/views/sysadmin/UsersTab.vue'
import GroupsTab from '@/views/sysadmin/GroupsTab.vue'
import LogsTab from '@/views/sysadmin/LogsTab.vue'
import OperationLogsTab from '@/views/sysadmin/OperationLogsTab.vue'
const { t } = useI18n()
const userStore = useUserStore()
@@ -22,11 +23,13 @@ const loading = ref(false)
const usersTabRef = ref(null)
const groupsTabRef = ref(null)
const logsTabRef = ref(null)
const operationLogsTabRef = ref(null)
const tabs = [
{ id: 'users', label: t('sysadmin.tab_users') },
{ id: 'groups', label: t('sysadmin.tab_groups') },
{ id: 'logs', label: t('sysadmin.tab_logs') },
{ id: 'operation_logs', label: t('sysadmin.tab_operation_logs') },
{ id: 'customer', label: t('customer.title'), to: '/customer' },
]
@@ -93,6 +96,7 @@ onMounted(() => {
<UsersTab v-if="activeTab === 'users'" ref="usersTabRef" />
<GroupsTab v-else-if="activeTab === 'groups'" ref="groupsTabRef" />
<LogsTab v-else-if="activeTab === 'logs'" ref="logsTabRef" />
<OperationLogsTab v-else-if="activeTab === 'operation_logs'" ref="operationLogsTabRef" />
</KeepAlive>
</div>