From d9a4f4ee3485870a7251819803c1c3b6d69843ae Mon Sep 17 00:00:00 2001 From: Mickeywaugh Date: Fri, 5 Jun 2026 14:10:17 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat(types):=20=E4=BF=AE=E8=A1=A5=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E7=9A=84API=E9=80=9A=E7=94=A8=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/api/index.ts | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/types/api/index.ts diff --git a/src/types/api/index.ts b/src/types/api/index.ts new file mode 100644 index 00000000..edaf523e --- /dev/null +++ b/src/types/api/index.ts @@ -0,0 +1,44 @@ + + +export interface PageQueryParams { + pageNum: number; + pageSize: number; + [key: string]: any; +} + + +export interface OptionItem { + label: string; + value: string | number; + meta?: any; + children?: OptionItem[]; +} + +export interface ExcelResult { + /** 状态码 */ + code: number; + /** 无效数据条数 */ + invalidCount: number; + /** 有效数据条数 */ + validCount: number; + /** 错误信息 */ + messageList: Array; +} + +export interface PageResult { + total: number; + list: T[]; +} + +export interface ApiResponse { + code: number; + msg: string; + data: T; +} + +export interface BaseEntity { + id: number; + createTime: string; + updateTime: string; +} + From 1da0816b3494ab8e913ffa2dfc11aa2f883095ba Mon Sep 17 00:00:00 2001 From: Mickeywaugh Date: Fri, 5 Jun 2026 15:08:51 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86config=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=E7=9A=84token=E5=88=B7=E6=96=B0=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/dict/types.ts | 2 ++ src/utils/request.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/api/system/dict/types.ts b/src/api/system/dict/types.ts index ae0465fc..6f400164 100644 --- a/src/api/system/dict/types.ts +++ b/src/api/system/dict/types.ts @@ -61,6 +61,8 @@ export interface DictItem { status: number; /** 排序 */ sort?: number; + /** 标签类型(后端返回的原始码) */ + tagType?: unknown; } /** 字典项表单对象 */ diff --git a/src/utils/request.ts b/src/utils/request.ts index 7a37eb09..46ab484d 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -34,7 +34,7 @@ http.interceptors.request.use( // 响应拦截器 http.interceptors.response.use( - (response: AxiosResponse) => { + (response: AxiosResponse): any => { const { responseType } = response.config; // 二进制数据直接返回 @@ -64,8 +64,8 @@ http.interceptors.response.use( // Token 过期:尝试刷新 token 后自动重试一次 if (code === ApiCodeEnum.ACCESS_TOKEN_INVALID) { - // 已重试过,直接跳登录 - if (retriedConfigs.has(config)) { + // config 不存在时无法重试,直接跳登录 + if (!config || retriedConfigs.has(config)) { await redirectToLogin("登录已过期,请重新登录"); return Promise.reject(new Error("Token Invalid")); } From 132501ea4edfe3803d33f702042eb852e438087b Mon Sep 17 00:00:00 2001 From: Mickeywaugh Date: Fri, 5 Jun 2026 15:10:01 +0800 Subject: [PATCH 3/4] =?UTF-8?q?refactor(system):=20=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84=EF=BC=8C?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/dict/index.ts | 2 +- src/types/api/index.ts | 3 +- src/views/system/config/index.vue | 405 ++++---- src/views/system/dict/dict-item.vue | 420 ++++---- src/views/system/dict/index.vue | 439 ++++---- src/views/system/log/index.vue | 155 ++- src/views/system/notice/index.vue | 658 ++++++------ src/views/system/role/index.vue | 669 ++++++------- src/views/system/tenant/index.vue | 1434 ++++++++++++--------------- src/views/system/tenant/plan.vue | 604 +++++------ src/views/system/user/index.vue | 649 ++++++------ 11 files changed, 2421 insertions(+), 3017 deletions(-) diff --git a/src/api/system/dict/index.ts b/src/api/system/dict/index.ts index 481fce53..c6fc8e0f 100644 --- a/src/api/system/dict/index.ts +++ b/src/api/system/dict/index.ts @@ -8,7 +8,7 @@ import type { DictItemForm, DictItemOption, } from "./types"; -import type { OptionItem } from "@/api/common"; + const DICT_BASE_URL = "/api/v1/dicts"; diff --git a/src/types/api/index.ts b/src/types/api/index.ts index edaf523e..e55859e2 100644 --- a/src/types/api/index.ts +++ b/src/types/api/index.ts @@ -28,10 +28,11 @@ export interface ExcelResult { export interface PageResult { total: number; list: T[]; + params: PageQueryParams; } export interface ApiResponse { - code: number; + code: number | string; msg: string; data: T; } diff --git a/src/views/system/config/index.vue b/src/views/system/config/index.vue index e9141a95..e7b8f5fd 100644 --- a/src/views/system/config/index.vue +++ b/src/views/system/config/index.vue @@ -1,14 +1,9 @@ diff --git a/src/views/system/log/index.vue b/src/views/system/log/index.vue index 38042336..7bcaf5c0 100644 --- a/src/views/system/log/index.vue +++ b/src/views/system/log/index.vue @@ -1,27 +1,14 @@ - + diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 2d640c81..c697d869 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -3,7 +3,12 @@ - + @@ -17,13 +22,24 @@
新增 - + 删除
- + @@ -43,22 +59,43 @@ 字典数据 - + 编辑 - + 删除 - + @pagination="fetchData" + />
- + @@ -91,206 +128,207 @@ diff --git a/src/views/system/log/index.vue b/src/views/system/log/index.vue index 7bcaf5c0..ee3d8438 100644 --- a/src/views/system/log/index.vue +++ b/src/views/system/log/index.vue @@ -3,12 +3,25 @@ - + - + @@ -47,8 +60,13 @@ - + @@ -87,75 +105,76 @@ diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index 413c9145..f1095680 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -3,11 +3,21 @@ - + - + @@ -24,16 +34,33 @@
- + 新增通知 - + 删除
- + @@ -83,32 +110,68 @@ 查看 - + 发布 - + 撤回 - + 编辑 - + 删除 - +
- + - + diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 4ecf2be1..0e1e9c80 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -4,7 +4,12 @@ - + @@ -18,14 +23,25 @@
新增 - + 删除
- + @@ -43,25 +59,54 @@ - +
- + @@ -83,8 +128,15 @@ - + @@ -95,7 +147,12 @@ - + diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index c079d4e0..9f36a628 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -3,11 +3,21 @@ - + - + @@ -23,17 +33,39 @@
- + 新增 - + 删除
- - + + @@ -55,50 +87,110 @@ - +
- + - + - + - + @@ -115,15 +207,28 @@ - + - + - + 正常 禁用 @@ -143,15 +248,30 @@ - + - - + + @@ -160,13 +280,22 @@
升级场景
升级套餐后,将解锁更多功能菜单,需在套餐功能配置中手动启用。
降级场景(红色 / warning)
- +
- - + +
仅展示当前套餐包含的功能
- + @@ -190,7 +338,12 @@ diff --git a/src/views/system/tenant/plan.vue b/src/views/system/tenant/plan.vue index 291d0e8a..923813a8 100644 --- a/src/views/system/tenant/plan.vue +++ b/src/views/system/tenant/plan.vue @@ -3,11 +3,21 @@ - + - + @@ -23,13 +33,24 @@
- + 新增
- + @@ -44,25 +65,55 @@ - +
- + @@ -77,7 +128,12 @@ - + @@ -91,7 +147,12 @@ - +