feat: extend operation log service and repository with pagination support

This commit is contained in:
张翔
2026-03-18 22:34:43 +08:00
parent 157aee2ffc
commit 8a0cd64829
81 changed files with 8842 additions and 509 deletions
@@ -133,7 +133,9 @@ const username = ref(localStorage.getItem('username') || 'Admin')
const activeMenu = computed(() => route.path)
const handleCommand = (command: string) => {
if (command === 'logout') {
if (command === 'profile') {
router.push('/profile')
} else if (command === 'logout') {
localStorage.clear()
router.push('/login')
}
@@ -2,7 +2,7 @@
<div class="login-container">
<el-card class="login-card">
<template #header>
<h2>Novalon 管理系统</h2>
<h2>登录 - Novalon 管理系统</h2>
</template>
<el-form
:model="formState"
@@ -51,6 +51,7 @@ import { reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import request from '@/utils/request'
import { onMounted } from 'vue'
const router = useRouter()
const loading = ref(false)
@@ -60,12 +61,17 @@ const formState = reactive({
password: ''
})
onMounted(() => {
document.title = '登录 - Novalon 管理系统'
})
const onFinish = async () => {
loading.value = true
try {
const res: any = await request.post('/auth/login', formState)
localStorage.setItem('token', res.token)
localStorage.setItem('userId', res.userId)
localStorage.setItem('username', res.username)
ElMessage.success('登录成功')
router.push('/')
} catch (error: any) {