From 9cdbf814675f2cf902cb3cd5e5ba0cbc10fd20e9 Mon Sep 17 00:00:00 2001 From: AN <1983933789@qq.com> Date: Thu, 5 Jun 2025 11:16:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=A1=A5=E5=85=A8=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/typings/api/monitor.api.d.ts | 15 ++++--- src/typings/api/system.api.d.ts | 43 +++++++++++-------- .../config/modules/config-operate-drawer.vue | 2 +- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/src/typings/api/monitor.api.d.ts b/src/typings/api/monitor.api.d.ts index acec1ce6..06bc1ebe 100644 --- a/src/typings/api/monitor.api.d.ts +++ b/src/typings/api/monitor.api.d.ts @@ -10,6 +10,9 @@ declare namespace Api { * backend api module: "monitor" */ namespace Monitor { + /** 业务操作类型 */ + type BusinessType = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'; + /** oper log */ type OperLog = Common.CommonRecord<{ /** 日志主键 */ @@ -19,13 +22,13 @@ declare namespace Api { /** 系统模块 */ title: string; /** 操作类型 */ - businessType: number; + businessType: Monitor.BusinessType; /** 方法名称 */ method: string; /** 请求方式 */ requestMethod: string; /** 操作类别 */ - operatorType: number; + operatorType: string; /** 操作人员 */ operName: string; /** 部门名称 */ @@ -41,7 +44,7 @@ declare namespace Api { /** 返回参数 */ jsonResult: string; /** 操作状态 */ - status: number; + status: Common.EnableStatus; /** 错误消息 */ errorMsg: string; /** 操作时间 */ @@ -70,7 +73,7 @@ declare namespace Api { /** 客户端 */ clientKey: string; /** 设备类型 */ - deviceType: string; + deviceType: System.DeviceType; /** 登录IP地址 */ ipaddr: string; /** 登录地点 */ @@ -80,7 +83,7 @@ declare namespace Api { /** 操作系统 */ os: string; /** 登录状态(0成功 1失败) */ - status: string; + status: Common.EnableStatus; /** 提示消息 */ msg: string; /** 访问时间 */ @@ -149,7 +152,7 @@ declare namespace Api { /** 所在部门 */ deptName: string; /** 设备类型 */ - deviceType: string; + deviceType: System.DeviceType; /** 登录时间 */ loginTime: number; /** 令牌ID */ diff --git a/src/typings/api/system.api.d.ts b/src/typings/api/system.api.d.ts index 23e5c82f..d91b0fef 100644 --- a/src/typings/api/system.api.d.ts +++ b/src/typings/api/system.api.d.ts @@ -34,7 +34,7 @@ declare namespace Api { /** 显示顺序 */ roleSort: number; /** 角色状态(0正常 1停用) */ - status: string; + status: Common.EnableStatus; /** 是否管理员 */ superAdmin: boolean; }>; @@ -115,7 +115,7 @@ declare namespace Api { /** 密码 */ password: string; /** 帐号状态(0正常 1停用) */ - status: string; + status: Common.EnableStatus; /** 最后登录IP */ loginIp: string; /** 最后登录时间 */ @@ -356,7 +356,7 @@ declare namespace Api { /** 字典键值 */ dictValue: string; /** 是否默认(Y是 N否) */ - isDefault: string; + isDefault: Common.YesOrNoStatus; /** 表格回显样式 */ listClass: NaiveUI.ThemeColor; /** 备注 */ @@ -402,7 +402,7 @@ declare namespace Api { /** 邮箱 */ email: string; /** 部门状态(0正常 1停用) */ - status: string; + status: Common.EnableStatus; /** 子部门 */ children: Dept[]; }>; @@ -440,7 +440,7 @@ declare namespace Api { /** 显示顺序 */ postSort: number; /** 状态(0正常 1停用) */ - status: string; + status: Common.EnableStatus; /** 备注 */ remark: string; }>; @@ -476,7 +476,7 @@ declare namespace Api { /** 参数键值 */ configValue: string; /** 是否内置 */ - configType: string; + configType: Common.YesOrNoStatus; /** 备注 */ remark: string; }>; @@ -523,7 +523,7 @@ declare namespace Api { /** 用户数量(-1不限制) */ accountCount: number; /** 租户状态(0正常 1停用) */ - status: string; + status: Common.EnableStatus; /** 删除标志(0代表存在 1代表删除) */ delFlag: string; }>; @@ -577,7 +577,7 @@ declare namespace Api { /** 菜单树选择项是否关联显示 */ menuCheckStrictly: boolean; /** 状态(0正常 1停用) */ - status: string; + status: Common.EnableStatus; /** 删除标志(0代表存在 1代表删除) */ delFlag: string; }>; @@ -602,6 +602,9 @@ declare namespace Api { /** tenant package select list */ type TenantPackageSelectList = Common.CommonRecord>; + /** 通知公告类型 */ + type NoticeType = '1' | '2'; + /** notice */ type Notice = Common.CommonRecord<{ /** 公告ID */ @@ -611,11 +614,11 @@ declare namespace Api { /** 公告标题 */ noticeTitle: string; /** 公告类型 */ - noticeType: string; + noticeType: System.NoticeType; /** 公告内容 */ noticeContent: string; /** 公告状态 */ - status: string; + status: Common.EnableStatus; /** 创建者 */ createByName: string; /** 备注 */ @@ -635,6 +638,12 @@ declare namespace Api { /** notice list */ type NoticeList = Api.Common.PaginatingQueryRecord; + /** 授权类型 */ + type GrantType = 'password' | 'sms' | 'password' | 'email' | 'xcx' | 'social'; + + /** 设备类型 */ + type DeviceType = 'pc' | 'android' | 'ios' | 'xcx'; + /** client */ type Client = Common.CommonRecord<{ /** id */ @@ -646,17 +655,17 @@ declare namespace Api { /** 客户端秘钥 */ clientSecret: string; /** 授权类型 */ - grantType: string; + grantType: System.GrantType; /** 授权类型列表 */ - grantTypeList: string[]; + grantTypeList: System.GrantType[]; /** 设备类型 */ - deviceType: string; + deviceType: System.DeviceType; /** token活跃超时时间 */ activeTimeout: number; /** token固定超时 */ timeout: number; /** 状态 */ - status: string; + status: Common.EnableStatus; /** 删除标志(0代表存在 1代表删除) */ delFlag: string; }>; @@ -758,13 +767,13 @@ declare namespace Api { /** 自定义域名 */ domain: string; /** 是否https(Y=是,N=否) */ - isHttps: Api.Common.YesOrNoStatus; + isHttps: Common.YesOrNoStatus; /** 域 */ region: string; /** 桶权限类型 */ - accessPolicy: Api.System.OssAccessPolicy; + accessPolicy: System.OssAccessPolicy; /** 是否默认(0=是,1=否) */ - status: Api.Common.EnableStatus; + status: Common.EnableStatus; /** 扩展字段 */ ext1: string; /** 备注 */ diff --git a/src/views/system/config/modules/config-operate-drawer.vue b/src/views/system/config/modules/config-operate-drawer.vue index c08053fa..03847042 100644 --- a/src/views/system/config/modules/config-operate-drawer.vue +++ b/src/views/system/config/modules/config-operate-drawer.vue @@ -47,7 +47,7 @@ function createDefaultModel(): Model { configName: '', configKey: '', configValue: '', - configType: '', + configType: 'Y', remark: '' }; }