From 5b713692516db586f2d401a163192c62a963137a Mon Sep 17 00:00:00 2001 From: Charles7c Date: Thu, 2 May 2024 20:22:10 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=20queryForm=20?= =?UTF-8?q?=E7=9A=84=20Query=20=E7=B1=BB=E5=9E=8B=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/monitor/online.ts | 2 +- src/apis/monitor/type.ts | 6 +- src/apis/system/dict.ts | 4 +- src/apis/system/file.ts | 2 +- src/apis/system/notice.ts | 2 +- src/apis/system/role.ts | 2 +- src/apis/system/storage.ts | 2 +- src/apis/system/type.ts | 72 +++++++++++-------- src/types/api.d.ts | 1 - src/views/login/index.vue | 10 +-- src/views/monitor/log/login/index.vue | 7 +- src/views/monitor/log/operation/index.vue | 8 +-- src/views/monitor/online/index.vue | 6 +- src/views/system/dept/index.vue | 4 +- src/views/system/dict/index.vue | 5 +- src/views/system/dict/item/index.vue | 6 +- src/views/system/file/main/FileMain/index.vue | 7 +- src/views/system/menu/index.vue | 4 +- src/views/system/notice/index.vue | 6 +- src/views/system/role/index.vue | 5 +- src/views/system/storage/index.vue | 6 +- src/views/system/user/index.vue | 11 +-- 22 files changed, 82 insertions(+), 96 deletions(-) diff --git a/src/apis/monitor/online.ts b/src/apis/monitor/online.ts index d4c6765..b5f7cb8 100644 --- a/src/apis/monitor/online.ts +++ b/src/apis/monitor/online.ts @@ -4,7 +4,7 @@ import type * as Monitor from './type' const BASE_URL = '/monitor/online' /** @desc 查询在线用户列表 */ -export function listOnlineUser(query: Monitor.OnlineUserQuery) { +export function listOnlineUser(query: Monitor.OnlineUserPageQuery) { return http.get>(`${BASE_URL}`, query) } diff --git a/src/apis/monitor/type.ts b/src/apis/monitor/type.ts index 9f4d9c8..a09317e 100644 --- a/src/apis/monitor/type.ts +++ b/src/apis/monitor/type.ts @@ -13,10 +13,12 @@ export interface OnlineUserResp { createUserString: string createTime: string } -export interface OnlineUserQuery extends PageQuery { +export interface OnlineUserQuery { nickname?: string loginTime?: string + sort: Array } +export interface OnlineUserPageQuery extends OnlineUserQuery, PageQuery {} /** 系统日志类型 */ export interface LogResp { @@ -52,4 +54,4 @@ export interface LogQuery { status?: number sort: Array } -export interface LogPageQuery extends PageQuery, LogQuery {} +export interface LogPageQuery extends LogQuery, PageQuery {} diff --git a/src/apis/system/dict.ts b/src/apis/system/dict.ts index e67499a..4fc76c6 100644 --- a/src/apis/system/dict.ts +++ b/src/apis/system/dict.ts @@ -4,7 +4,7 @@ import type * as System from './type' const BASE_URL = '/system/dict' /** @desc 查询字典列表 */ -export function listDict(query: System.DictQuery) { +export function listDict(query: System.DictPageQuery) { return http.get>(`${BASE_URL}`, query) } @@ -29,7 +29,7 @@ export function deleteDict(id: string) { } /** @desc 查询字典项列表 */ -export function listDictItem(query: System.DictItemQuery) { +export function listDictItem(query: System.DictItemPageQuery) { return http.get>(`${BASE_URL}/item`, query) } diff --git a/src/apis/system/file.ts b/src/apis/system/file.ts index 9ccc92e..eb2bf55 100644 --- a/src/apis/system/file.ts +++ b/src/apis/system/file.ts @@ -4,7 +4,7 @@ import type * as System from './type' const BASE_URL = '/system/file' /** @desc 查询文件列表 */ -export function listFile(query: System.FileQuery) { +export function listFile(query: System.FilePageQuery) { return http.get>(`${BASE_URL}`, query) } diff --git a/src/apis/system/notice.ts b/src/apis/system/notice.ts index fd1e01d..724aac1 100644 --- a/src/apis/system/notice.ts +++ b/src/apis/system/notice.ts @@ -4,7 +4,7 @@ import type * as System from './type' const BASE_URL = '/system/notice' /** @desc 查询公告列表 */ -export function listNotice(query: System.NoticeQuery) { +export function listNotice(query: System.NoticePageQuery) { return http.get>(`${BASE_URL}`, query) } diff --git a/src/apis/system/role.ts b/src/apis/system/role.ts index 2b9df10..b09cb37 100644 --- a/src/apis/system/role.ts +++ b/src/apis/system/role.ts @@ -4,7 +4,7 @@ import type * as System from './type' const BASE_URL = '/system/role' /** @desc 查询角色列表 */ -export function listRole(query: System.RoleQuery) { +export function listRole(query: System.RolePageQuery) { return http.get>(`${BASE_URL}`, query) } diff --git a/src/apis/system/storage.ts b/src/apis/system/storage.ts index 7b44840..baa6277 100644 --- a/src/apis/system/storage.ts +++ b/src/apis/system/storage.ts @@ -4,7 +4,7 @@ import type * as System from './type' const BASE_URL = '/system/storage' /** @desc 查询存储列表 */ -export function listStorage(query: System.StorageQuery) { +export function listStorage(query: System.StoragePageQuery) { return http.get>(`${BASE_URL}`, query) } diff --git a/src/apis/system/type.ts b/src/apis/system/type.ts index f4fb156..f34e251 100644 --- a/src/apis/system/type.ts +++ b/src/apis/system/type.ts @@ -29,7 +29,7 @@ export interface UserQuery { deptId?: string sort: Array } -export interface UserPageQuery extends PageQuery, UserQuery {} +export interface UserPageQuery extends UserQuery, PageQuery {} /** 系统角色类型 */ export interface RoleResp { @@ -62,9 +62,11 @@ export interface RoleDetailResp { updateTime: string disabled: boolean } -export interface RoleQuery extends PageQuery { +export interface RoleQuery { description?: string + sort: Array } +export interface RolePageQuery extends RoleQuery, PageQuery {} /** 系统菜单类型 */ export interface MenuResp { @@ -116,25 +118,6 @@ export interface DeptQuery { sort: Array } -/** 系统公告类型 */ -export interface NoticeResp { - id: string - title: string - content: string - status: number - type: string - effectiveTime: string - terminateTime: string - createUserString: string - createTime: string - updateUserString: string - updateTime: string -} -export interface NoticeQuery extends PageQuery { - title?: string - type?: string -} - /** 系统字典类型 */ export interface DictResp { id: string @@ -147,9 +130,11 @@ export interface DictResp { updateUserString: string updateTime: string } -export interface DictQuery extends PageQuery { +export interface DictQuery { description?: string + sort: Array } +export interface DictPageQuery extends DictQuery, PageQuery {} export type DictItemResp = { id: string label: string @@ -164,11 +149,34 @@ export type DictItemResp = { updateUserString: string updateTime: string } -export interface DictItemQuery extends PageQuery { +export interface DictItemQuery { description?: string status?: number + sort: Array dictId: string } +export interface DictItemPageQuery extends DictItemQuery, PageQuery {} + +/** 系统公告类型 */ +export interface NoticeResp { + id: string + title: string + content: string + status: number + type: string + effectiveTime: string + terminateTime: string + createUserString: string + createTime: string + updateUserString: string + updateTime: string +} +export interface NoticeQuery { + title?: string + type?: string + sort: Array +} +export interface NoticePageQuery extends NoticeQuery, PageQuery {} /** 系统文件类型 */ export type FileItem = { @@ -184,18 +192,19 @@ export type FileItem = { updateUserString: string updateTime: string } -export interface FileQuery extends PageQuery { - name?: string - type?: string -} -/** 文件资源统计 */ +/** 文件资源统计信息 */ export interface FileStatisticsResp { type: string size: number - formattedSize: string number: number data: Array } +export interface FileQuery { + name?: string + type?: string + sort: Array +} +export interface FilePageQuery extends FileQuery, PageQuery {} /** 系统存储类型 */ export type StorageResp = { @@ -217,10 +226,12 @@ export type StorageResp = { updateUserString: string updateTime: string } -export interface StorageQuery extends PageQuery { +export interface StorageQuery { description?: string status?: number + sort: Array } +export interface StoragePageQuery extends StorageQuery, PageQuery {} /** 系统参数类型 */ export interface OptionResp { @@ -232,7 +243,6 @@ export interface OptionResp { export interface OptionQuery { code: Array } - /** 基础配置类型 */ export interface BasicConfigResp { site_favicon: string diff --git a/src/types/api.d.ts b/src/types/api.d.ts index 9515d20..f388014 100644 --- a/src/types/api.d.ts +++ b/src/types/api.d.ts @@ -17,5 +17,4 @@ interface PageRes { interface PageQuery { page: number size: number - sort: Array } diff --git a/src/views/login/index.vue b/src/views/login/index.vue index ffc0fca..0187fed 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -133,8 +133,11 @@ const onOauth = async (source: string) => { &-logo { width: 100%; height: 104px; + font-weight: 700; + font-size: 20px; + line-height: 32px; display: flex; - padding: 0px 20px; + padding: 0 20px; align-items: center; justify-content: start; background-image: url('/src/assets/images/login_h5.jpg'); @@ -175,10 +178,7 @@ const onOauth = async (source: string) => { } :deep(.arco-tabs-tab) { color: var(--color-text-2); - margin-right: 20px; - margin-top: 0px; - margin-left: 0px; - margin-bottom: 0px; + margin: 0 20px 0 0; } :deep(.arco-tabs-tab-title) { font-size: 16px; diff --git a/src/views/monitor/log/login/index.vue b/src/views/monitor/log/login/index.vue index 23bec2b..bb93e38 100644 --- a/src/views/monitor/log/login/index.vue +++ b/src/views/monitor/log/login/index.vue @@ -45,7 +45,7 @@