From 0a7237d7335b619c628b95b99e2bd2f1637173af Mon Sep 17 00:00:00 2001 From: bunny <1319900154@qq.com> Date: Wed, 23 Oct 2024 13:46:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=A7=A9=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=A5=E5=BF=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReadMe.md | 6 +- src/api/v1/files.ts | 2 +- src/enums/baseConstant.ts | 2 +- src/store/configuration/emailTemplate.ts | 4 +- src/store/configuration/emailUsers.ts | 4 +- src/store/configuration/menuIcon.ts | 4 +- src/store/i18n/i18n.ts | 2 +- src/store/i18n/i18nType.ts | 4 +- src/store/monitor/files.ts | 4 +- src/store/monitor/quartzExecuteLog.ts | 4 +- src/store/monitor/userLoginLog.ts | 14 +- src/store/scheduler/schedulers.ts | 4 +- src/store/scheduler/schedulersGroup.ts | 4 +- src/store/system/adminUser.ts | 2 +- src/store/system/dept.ts | 4 +- src/store/system/power.ts | 4 +- src/store/system/role.ts | 4 +- src/views/account-settings/utils/columns.ts | 22 +- .../configuration/menuIcon/utils/hooks.ts | 2 + src/views/monitor/userLoginLog/index.vue | 30 -- .../userLoginLog/user-login-log-dialog.vue | 23 -- .../monitor/userLoginLog/utils/columns.ts | 12 +- src/views/monitor/userLoginLog/utils/hooks.ts | 3 - src/views/monitor/userLoginLog/utils/types.ts | 8 - src/views/welcome/index.vue | 299 +++++++----------- 25 files changed, 148 insertions(+), 323 deletions(-) diff --git a/ReadMe.md b/ReadMe.md index b5471c5..d92ded4 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -212,7 +212,5 @@ docker build -f Dockerfile -t bunny_auth_web:1.0.0 . && docker run -p 80:80 --na # 展望未来 -1. 数据库备份时上传到Minio -2. 数据库备份后可恢复 -3. 定时邮件发送参数可在前端配置,动态形式 -4. 首页看板内容 \ No newline at end of file +1. 定时邮件发送参数可在前端配置,动态形式 +2. 首页看板内容 \ No newline at end of file diff --git a/src/api/v1/files.ts b/src/api/v1/files.ts index e05c0a2..156a487 100644 --- a/src/api/v1/files.ts +++ b/src/api/v1/files.ts @@ -6,7 +6,7 @@ export const fetchGetFilesList = (data: any) => { return http.request>('get', `files/getFilesList/${data.currentPage}/${data.pageSize}`, { params: data }); }; -/** 系统文件管理---根据I下载系统文件d */ +/** 系统文件管理---根据Id下载系统文件 */ export const downloadFilesByFileId = (data: any) => { return http.request('get', `files/downloadFilesByFileId/${data.id}`, { responseType: 'blob' }); }; diff --git a/src/enums/baseConstant.ts b/src/enums/baseConstant.ts index cc3fdc5..08f4d12 100644 --- a/src/enums/baseConstant.ts +++ b/src/enums/baseConstant.ts @@ -35,5 +35,5 @@ export const userStatus = [ /** * * 分页默认数组个数 */ -export const pageSizes: number[] = [15, 30, 50, 100, 150, 200, 300]; +export const pageSizes: number[] = [15, 30, 50, 100, 150]; export const tableSelectButtonClass = computed(() => ['!h-[20px]', 'reset-margin', '!text-gray-500', 'dark:!text-white', 'dark:hover:!text-primary']); diff --git a/src/store/configuration/emailTemplate.ts b/src/store/configuration/emailTemplate.ts index 532b919..88ecfa2 100644 --- a/src/store/configuration/emailTemplate.ts +++ b/src/store/configuration/emailTemplate.ts @@ -31,8 +31,8 @@ export const useEmailTemplateStore = defineStore('emailTemplateStore', { // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/configuration/emailUsers.ts b/src/store/configuration/emailUsers.ts index 3aba21d..8e44000 100644 --- a/src/store/configuration/emailUsers.ts +++ b/src/store/configuration/emailUsers.ts @@ -26,8 +26,8 @@ export const useEmailUsersStore = defineStore('emailUsersStore', { // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/configuration/menuIcon.ts b/src/store/configuration/menuIcon.ts index 987b24c..e1d0a96 100644 --- a/src/store/configuration/menuIcon.ts +++ b/src/store/configuration/menuIcon.ts @@ -22,8 +22,8 @@ export const useMenuIconStore = defineStore('menuIconStore', { // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/i18n/i18n.ts b/src/store/i18n/i18n.ts index a145b57..c36615c 100644 --- a/src/store/i18n/i18n.ts +++ b/src/store/i18n/i18n.ts @@ -19,7 +19,7 @@ export const userI18nStore = defineStore('i18nStore', { pagination: { currentPage: 1, pageSize: 150, - total: 100, + total: 1, pageSizes, background: true, }, diff --git a/src/store/i18n/i18nType.ts b/src/store/i18n/i18nType.ts index 9e5699d..7a9f795 100644 --- a/src/store/i18n/i18nType.ts +++ b/src/store/i18n/i18nType.ts @@ -14,8 +14,8 @@ export const userI18nTypeStore = defineStore('i18nTypeStore', { // ? 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/monitor/files.ts b/src/store/monitor/files.ts index ac14dbc..7ca96d5 100644 --- a/src/store/monitor/files.ts +++ b/src/store/monitor/files.ts @@ -30,8 +30,8 @@ export const useFilesStore = defineStore('filesStore', { // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/monitor/quartzExecuteLog.ts b/src/store/monitor/quartzExecuteLog.ts index d824364..401a72c 100644 --- a/src/store/monitor/quartzExecuteLog.ts +++ b/src/store/monitor/quartzExecuteLog.ts @@ -30,8 +30,8 @@ export const useQuartzExecuteLogStore = defineStore('quartzExecuteLogStore', { // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/monitor/userLoginLog.ts b/src/store/monitor/userLoginLog.ts index bf20a94..145ec8e 100644 --- a/src/store/monitor/userLoginLog.ts +++ b/src/store/monitor/userLoginLog.ts @@ -14,12 +14,8 @@ export const useUserLoginLogStore = defineStore('userLoginLogStore', { datalist: [], // 查询表单 form: { - // 用户Id - userId: undefined, // 用户名 username: undefined, - // 登录token - token: undefined, // 登录Ip ipAddress: undefined, // 登录Ip归属地 @@ -30,18 +26,12 @@ export const useUserLoginLogStore = defineStore('userLoginLogStore', { type: undefined, // 标识客户端是否是通过Ajax发送请求的 xRequestedWith: undefined, - // 用户代理的品牌和版本 - secChUa: undefined, - // 用户代理是否在手机设备上运行 - secChUaMobile: undefined, - // 用户代理的底层操作系统/平台 - secChUaPlatform: undefined, }, // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/scheduler/schedulers.ts b/src/store/scheduler/schedulers.ts index 6123e5e..6f2379d 100644 --- a/src/store/scheduler/schedulers.ts +++ b/src/store/scheduler/schedulers.ts @@ -34,8 +34,8 @@ export const useSchedulersStore = defineStore('schedulersStore', { // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/scheduler/schedulersGroup.ts b/src/store/scheduler/schedulersGroup.ts index 3ca5e01..468f715 100644 --- a/src/store/scheduler/schedulersGroup.ts +++ b/src/store/scheduler/schedulersGroup.ts @@ -24,8 +24,8 @@ export const useSchedulersGroupStore = defineStore('schedulersGroupStore', { // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/system/adminUser.ts b/src/store/system/adminUser.ts index b7e0129..63411d5 100644 --- a/src/store/system/adminUser.ts +++ b/src/store/system/adminUser.ts @@ -45,7 +45,7 @@ export const useAdminUserStore = defineStore('adminUserStore', { pagination: { currentPage: 1, pageSize: 150, - total: 100, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/system/dept.ts b/src/store/system/dept.ts index 6eee5a7..075818d 100644 --- a/src/store/system/dept.ts +++ b/src/store/system/dept.ts @@ -26,8 +26,8 @@ export const useDeptStore = defineStore('deptStore', { // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/system/power.ts b/src/store/system/power.ts index cec13c2..12891c4 100644 --- a/src/store/system/power.ts +++ b/src/store/system/power.ts @@ -26,8 +26,8 @@ export const usePowerStore = defineStore('powerStore', { // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/store/system/role.ts b/src/store/system/role.ts index 2418ebf..aa396f7 100644 --- a/src/store/system/role.ts +++ b/src/store/system/role.ts @@ -24,8 +24,8 @@ export const useRoleStore = defineStore('roleStore', { // 分页查询结果 pagination: { currentPage: 1, - pageSize: 150, - total: 100, + pageSize: 30, + total: 1, pageSizes, }, // 加载 diff --git a/src/views/account-settings/utils/columns.ts b/src/views/account-settings/utils/columns.ts index 2ff19f8..9c2c28b 100644 --- a/src/views/account-settings/utils/columns.ts +++ b/src/views/account-settings/utils/columns.ts @@ -10,33 +10,19 @@ import AccountManagementIcon from '@iconify-icons/ri/profile-line'; import AccountManagement from '@/views/account-settings/account-management.vue'; export const columns: TableColumnList = [ - // { type: 'index', index: (index: number) => index + 1, label: '序号', width: 60 }, - // // 用户名 - // { label: $t('userLoginLog_username'), prop: 'username', width: 180 }, + { type: 'index', index: (index: number) => index + 1, label: '序号', width: 60 }, + // 用户名 + { label: $t('userLoginLog_username'), prop: 'username', width: 180 }, // // 登录Ip // { label: $t('userLoginLog_ipAddress'), prop: 'ipAddress', width: 140 }, // 登录Ip归属地 { label: $t('userLoginLog_ipRegion'), prop: 'ipRegion' }, // // 登录时代理 - // { label: $t('userLoginLog_userAgent'), prop: 'userAgent', width: 200 }, + // { label: $t('userLoginLog_userAgent'), prop: 'userAgent' }, // 操作类型 { label: $t('userLoginLog_type'), prop: 'type' }, // // 标识客户端是否是通过Ajax发送请求的 // { label: $t('userLoginLog_xRequestedWith'), prop: 'xRequestedWith', width: 150 }, - // 用户代理的品牌和版本 - { - label: $t('userLoginLog_secChUa'), - prop: 'secChUa', - formatter: ({ secChUa }) => { - const regex = /"([^"]+)";/; - const match = regex.exec(secChUa); - return match ? match[1] : secChUa; - }, - }, - // // 用户代理是否在手机设备上运行 - // { label: $t('userLoginLog_secChUaMobile'), prop: 'secChUaMobile', width: 130 }, - // 用户代理的底层操作系统/平台 - { label: $t('userLoginLog_secChUaPlatform'), prop: 'secChUaPlatform' }, // 创建时间也就是操作时间 { label: $t('op_time'), diff --git a/src/views/configuration/menuIcon/utils/hooks.ts b/src/views/configuration/menuIcon/utils/hooks.ts index 162ac24..8636ef0 100644 --- a/src/views/configuration/menuIcon/utils/hooks.ts +++ b/src/views/configuration/menuIcon/utils/hooks.ts @@ -15,7 +15,9 @@ export const deleteIds = ref([]); */ export async function onSearch() { menuIconStore.loading = true; + await menuIconStore.getMenuIconList(); + menuIconStore.loading = false; } diff --git a/src/views/monitor/userLoginLog/index.vue b/src/views/monitor/userLoginLog/index.vue index f372d1e..a738edb 100644 --- a/src/views/monitor/userLoginLog/index.vue +++ b/src/views/monitor/userLoginLog/index.vue @@ -60,21 +60,11 @@ onMounted(() => { diff --git a/src/views/monitor/userLoginLog/utils/columns.ts b/src/views/monitor/userLoginLog/utils/columns.ts index 22e62dc..57796a8 100644 --- a/src/views/monitor/userLoginLog/utils/columns.ts +++ b/src/views/monitor/userLoginLog/utils/columns.ts @@ -5,26 +5,18 @@ import { $t } from '@/plugins/i18n'; export const columns: TableColumnList = [ { type: 'selection', align: 'left' }, { type: 'index', index: (index: number) => index + 1, label: '序号', width: 60 }, - // 用户Id - { label: $t('userLoginLog_userId'), prop: 'userId', width: 180 }, // 用户名 { label: $t('userLoginLog_username'), prop: 'username', width: 180 }, // 登录Ip - { label: $t('userLoginLog_ipAddress'), prop: 'ipAddress', width: 140 }, + { label: $t('userLoginLog_ipAddress'), prop: 'ipAddress', width: 130 }, // 登录Ip归属地 { label: $t('userLoginLog_ipRegion'), prop: 'ipRegion', width: 100 }, // 登录时代理 - { label: $t('userLoginLog_userAgent'), prop: 'userAgent', width: 200 }, + { label: $t('userLoginLog_userAgent'), prop: 'userAgent' }, // 操作类型 { label: $t('userLoginLog_type'), prop: 'type', width: 130 }, // 标识客户端是否是通过Ajax发送请求的 { label: $t('userLoginLog_xRequestedWith'), prop: 'xRequestedWith', width: 150 }, - // 用户代理的品牌和版本 - { label: $t('userLoginLog_secChUa'), prop: 'secChUa', width: 150 }, - // 用户代理是否在手机设备上运行 - { label: $t('userLoginLog_secChUaMobile'), prop: 'secChUaMobile', width: 130 }, - // 用户代理的底层操作系统/平台 - { label: $t('userLoginLog_secChUaPlatform'), prop: 'secChUaPlatform', width: 130 }, // 登录token { label: $t('userLoginLog_token'), prop: 'token', width: 200 }, { label: $t('table.updateTime'), prop: 'updateTime', sortable: true, width: 160 }, diff --git a/src/views/monitor/userLoginLog/utils/hooks.ts b/src/views/monitor/userLoginLog/utils/hooks.ts index 837ef0c..943923e 100644 --- a/src/views/monitor/userLoginLog/utils/hooks.ts +++ b/src/views/monitor/userLoginLog/utils/hooks.ts @@ -37,9 +37,6 @@ export function onView(row: any) { userAgent: row.userAgent, type: row.type, xRequestedWith: row.xRequestedWith, - secChUa: row.secChUa, - secChUaMobile: row.secChUaMobile, - secChUaPlatform: row.secChUaPlatform, }, }, draggable: true, diff --git a/src/views/monitor/userLoginLog/utils/types.ts b/src/views/monitor/userLoginLog/utils/types.ts index ebe8edc..bc2ca13 100644 --- a/src/views/monitor/userLoginLog/utils/types.ts +++ b/src/views/monitor/userLoginLog/utils/types.ts @@ -17,14 +17,6 @@ export interface FormItemProps { type: string; // 标识客户端是否是通过Ajax发送请求的 xRequestedWith: string; - // 用户代理的品牌和版本 - secChUa: string; - // 用户代理是否在手机设备上运行 - secChUaMobile: string; - // 用户代理的设备模型 - secChUaModel: string; - // 用户代理的底层操作系统/平台 - secChUaPlatform: string; } // 添加或修改表单Props diff --git a/src/views/welcome/index.vue b/src/views/welcome/index.vue index 0d5deea..d8eb95b 100644 --- a/src/views/welcome/index.vue +++ b/src/views/welcome/index.vue @@ -1,213 +1,134 @@