smart-admin-web 10.20.1 → 10.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +19 -1
- package/dist/api/index.js +85 -66
- package/dist/api/index.js.map +1 -1
- package/dist/api/schema.d.ts +448 -1
- package/dist/assets/icons/ph-subset.json.js +1 -1
- package/dist/components/FormContainer/index.vue.js +87 -75
- package/dist/components/FormContainer/index.vue.js.map +1 -1
- package/dist/components/UserPicker/UserAvatar.vue.d.ts +8 -0
- package/dist/components/UserPicker/UserAvatar.vue.js +8 -0
- package/dist/components/UserPicker/UserAvatar.vue.js.map +1 -0
- package/dist/components/UserPicker/UserAvatar2.vue.js +38 -0
- package/dist/components/UserPicker/UserAvatar2.vue.js.map +1 -0
- package/dist/components/UserPicker/index.vue.js +1 -1
- package/dist/components/UserPicker/index2.vue.js +328 -186
- package/dist/components/UserPicker/index2.vue.js.map +1 -1
- package/dist/index.js +248 -246
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/watermark.d.ts +1 -1
- package/dist/locales/en-US.d.ts +62 -3
- package/dist/locales/en-US.js +65 -6
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/kernelMenuTitles.js +1 -0
- package/dist/locales/kernelMenuTitles.js.map +1 -1
- package/dist/locales/zh-CN.d.ts +62 -3
- package/dist/locales/zh-CN.js +65 -6
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/router/viewRegistry.js +6 -6
- package/dist/router/viewRegistry.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/naive-theme.js +80 -77
- package/dist/theme/naive-theme.js.map +1 -1
- package/dist/types/api.d.ts +91 -0
- package/dist/types/api.js +17 -15
- package/dist/types/api.js.map +1 -1
- package/dist/utils/shake.d.ts +1 -0
- package/dist/utils/shake.js +30 -0
- package/dist/utils/shake.js.map +1 -0
- package/dist/views/login/LoginForm.vue.js +2 -2
- package/dist/views/login/LoginForm2.vue.js +135 -135
- package/dist/views/login/LoginForm2.vue.js.map +1 -1
- package/dist/views/login/components/LoginDesk.vue.js +1 -1
- package/dist/views/login/components/LoginDesk2.vue.js +59 -47
- package/dist/views/login/components/LoginDesk2.vue.js.map +1 -1
- package/dist/views/personal/notice2.vue.js +1 -1
- package/dist/views/personal/notice2.vue.js.map +1 -1
- package/dist/views/personal/sessions.vue.js +2 -2
- package/dist/views/personal/sessions2.vue.js +41 -40
- package/dist/views/personal/sessions2.vue.js.map +1 -1
- package/dist/views/system/ai-usage/index.vue.js +3 -3
- package/dist/views/system/ai-usage/index2.vue.js +13 -12
- package/dist/views/system/ai-usage/index2.vue.js.map +1 -1
- package/dist/views/system/config/components/AdvancedSection.vue.js +3 -3
- package/dist/views/system/config/components/AdvancedSection2.vue.js +2 -1
- package/dist/views/system/config/components/AdvancedSection2.vue.js.map +1 -1
- package/dist/views/system/dict/index.vue.js +2 -2
- package/dist/views/system/dict/index2.vue.js +12 -1
- package/dist/views/system/dict/index2.vue.js.map +1 -1
- package/dist/views/system/file/index2.vue.js +1 -0
- package/dist/views/system/file/index2.vue.js.map +1 -1
- package/dist/views/system/job/index.vue.js +3 -3
- package/dist/views/system/job/index2.vue.js +182 -181
- package/dist/views/system/job/index2.vue.js.map +1 -1
- package/dist/views/system/job-log/components/AttemptTable2.vue.js +8 -3
- package/dist/views/system/job-log/components/AttemptTable2.vue.js.map +1 -1
- package/dist/views/system/job-log/index.vue.js +1 -1
- package/dist/views/system/job-log/index2.vue.js +5 -5
- package/dist/views/system/job-log/index2.vue.js.map +1 -1
- package/dist/views/system/log/exception/index.vue.js +2 -2
- package/dist/views/system/log/exception/index2.vue.js +8 -5
- package/dist/views/system/log/exception/index2.vue.js.map +1 -1
- package/dist/views/system/log/login/index2.vue.js +21 -12
- package/dist/views/system/log/login/index2.vue.js.map +1 -1
- package/dist/views/system/log/op/index.vue.js +2 -2
- package/dist/views/system/log/op/index2.vue.js +50 -40
- package/dist/views/system/log/op/index2.vue.js.map +1 -1
- package/dist/views/system/menu/components/ButtonManager.vue.js +2 -2
- package/dist/views/system/menu/components/ButtonManager2.vue.js +45 -36
- package/dist/views/system/menu/components/ButtonManager2.vue.js.map +1 -1
- package/dist/views/system/menu/index.vue.js +2 -2
- package/dist/views/system/menu/index2.vue.js +11 -11
- package/dist/views/system/menu/index2.vue.js.map +1 -1
- package/dist/views/system/module/index.vue.js +1 -1
- package/dist/views/system/module/index2.vue.js +171 -117
- package/dist/views/system/module/index2.vue.js.map +1 -1
- package/dist/views/system/notice/index.vue.js +3 -3
- package/dist/views/system/notice/index2.vue.js +1 -0
- package/dist/views/system/notice/index2.vue.js.map +1 -1
- package/dist/views/system/org/index.vue.js +2 -2
- package/dist/views/system/org/index2.vue.js +70 -67
- package/dist/views/system/org/index2.vue.js.map +1 -1
- package/dist/views/system/position/index.vue.js +2 -2
- package/dist/views/system/position/index2.vue.js +57 -48
- package/dist/views/system/position/index2.vue.js.map +1 -1
- package/dist/views/system/recycle/index.vue.js +1 -1
- package/dist/views/system/recycle/index2.vue.js +3 -1
- package/dist/views/system/recycle/index2.vue.js.map +1 -1
- package/dist/views/system/role/components/GrantMenuSheet.vue.d.ts +2 -0
- package/dist/views/system/role/components/GrantMenuSheet.vue.js +2 -2
- package/dist/views/system/role/components/GrantMenuSheet2.vue.js +54 -49
- package/dist/views/system/role/components/GrantMenuSheet2.vue.js.map +1 -1
- package/dist/views/system/role/components/GrantMenuTable.vue.js +1 -1
- package/dist/views/system/role/components/GrantMenuTable2.vue.js +159 -195
- package/dist/views/system/role/components/GrantMenuTable2.vue.js.map +1 -1
- package/dist/views/system/role/components/grantMenuGroups.d.ts +54 -0
- package/dist/views/system/role/components/grantMenuGroups.js +116 -76
- package/dist/views/system/role/components/grantMenuGroups.js.map +1 -1
- package/dist/views/system/role/index.vue.js +2 -2
- package/dist/views/system/role/index2.vue.js +152 -145
- package/dist/views/system/role/index2.vue.js.map +1 -1
- package/dist/views/system/session/index2.vue.js +39 -35
- package/dist/views/system/session/index2.vue.js.map +1 -1
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.d.ts +10 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js +5 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js +96 -0
- package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.d.ts +13 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantMenuSheet.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js +216 -0
- package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.d.ts +13 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantMenuTable.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantMenuTable2.vue.js +186 -0
- package/dist/views/system/user/components/UserGrantMenuTable2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.d.ts +31 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.js +8 -0
- package/dist/views/system/user/components/UserGrantNodeRow.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantNodeRow2.vue.js +171 -0
- package/dist/views/system/user/components/UserGrantNodeRow2.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.d.ts +21 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js +5 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js.map +1 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js +178 -0
- package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js.map +1 -0
- package/dist/views/system/user/components/userGrantState.d.ts +64 -0
- package/dist/views/system/user/components/userGrantState.js +117 -0
- package/dist/views/system/user/components/userGrantState.js.map +1 -0
- package/dist/views/system/user/index.vue.js +2 -2
- package/dist/views/system/user/index2.vue.js +250 -207
- package/dist/views/system/user/index2.vue.js.map +1 -1
- package/package.json +3 -3
package/dist/api/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { components } from './schema';
|
|
2
|
-
import { AddUserInput, AddUserOutput, AiProviderAddInput, AiProviderPreset, AiProviderUpdateInput, AiProviderView, AiTestResult, AiUsageGroupBy, AiUsageSummary, AiUsageTrendPoint, ChunkInitOutput, ConfigInput, CronPreviewOutput, DashboardSummary, DataScopeType, DictItem, DictItemInput, DictTypeInput, DuplicateStrategy, FileUploadOutput, ImportCommitResult, ImportPreview, ImportRow, JobDashboard, JobHandlersOutput, JobInput, LastLoginInfo, LoginOutput, ModuleInput, ModuleRow, MyModulesOutput, MySessionItem, NoticeMineItem, NoticePublishInput, OnlineSessionItem, OrgInput, PermissionRouteItem, PositionInput, RoleInput, ServerInfoOutput, SysAiUsageLog, SysConfig, SysDictItem, SysDictType, SysExceptionLog, SysFile, SysJob, SysJobLog, SysLoginLog, SysNotice, SysOpLog, SysOrg, SysPosition, SysRole, SysRoleDataScope, UpdateUserInput, UserDetail, UserItem, UserProfile, UserShortcutItem, WorkbenchTodoSummary } from '../types/api';
|
|
2
|
+
import { AddUserInput, AddUserOutput, AiProviderAddInput, AiProviderPreset, AiProviderUpdateInput, AiProviderView, AiTestResult, AiUsageGroupBy, AiUsageSummary, AiUsageTrendPoint, ChunkInitOutput, ConfigInput, CronPreviewOutput, DashboardSummary, DataScopeType, DictItem, DictItemInput, DictTypeInput, DuplicateStrategy, FileUploadOutput, ImportCommitResult, ImportPreview, ImportRow, JobDashboard, JobHandlersOutput, JobInput, LastLoginInfo, LoginOutput, ModuleInput, ModuleRow, MyModulesOutput, MySessionItem, NoticeMineItem, NoticePublishInput, OnlineSessionItem, OrgInput, PermissionRouteItem, PositionInput, RoleInput, ServerInfoOutput, SysAiUsageLog, SysConfig, SysDictItem, SysDictType, SysExceptionLog, SysFile, SysJob, SysJobLog, SysLoginLog, SysNotice, SysOpLog, SysOrg, SysPosition, SysRole, SysRoleDataScope, UpdateUserInput, UserDetail, UserItem, UserMenuEffect, UserMenuEffective, UserMenuGrantItem, UserMenuGrantPageItem, UserMenuGrantStatus, UserMenuGrantUpsert, UserProfile, UserShortcutItem, WorkbenchTodoSummary } from '../types/api';
|
|
3
3
|
import { MenuInput, MenuNode, MenuTreeNode } from '../types/menu';
|
|
4
4
|
import { WatermarkSettings } from '../lib/watermark';
|
|
5
5
|
/** 业务错误(含后端 code / msgKey);视图 catch 后经 translateError 展示。 */
|
|
@@ -321,6 +321,24 @@ export declare const userApi: {
|
|
|
321
321
|
resetPassword: (id: number, newPassword?: string | null) => Promise<string>;
|
|
322
322
|
/** 专用启停端点(非全量 update)。 */
|
|
323
323
|
setEnabled: (id: number, enabled: boolean) => Promise<boolean>;
|
|
324
|
+
/** 某用户的单独授权记录(授权菜单弹窗回显)。 */
|
|
325
|
+
getMenuGrants: (id: number) => Promise<UserMenuGrantItem[]>;
|
|
326
|
+
/** 某用户的有效权限与来源:能否授、能否编辑及原因、委派最长天数、模块清单,一次取齐。 */
|
|
327
|
+
getEffectiveMenus: (id: number) => Promise<UserMenuEffective>;
|
|
328
|
+
/** 按变更集保存单独授权:没提到的记录原样保留。 */
|
|
329
|
+
setMenuGrants: (userId: number, upserts: UserMenuGrantUpsert[], removes: number[]) => Promise<boolean>;
|
|
330
|
+
/** 单独授权一览:分页 + 筛选(用户 / 授权人模糊,效果、状态精确)。 */
|
|
331
|
+
menuGrantPage: (params: {
|
|
332
|
+
page: number;
|
|
333
|
+
pageSize: number;
|
|
334
|
+
user?: string;
|
|
335
|
+
grantor?: string;
|
|
336
|
+
effect?: UserMenuEffect;
|
|
337
|
+
status?: UserMenuGrantStatus;
|
|
338
|
+
}) => Promise<{
|
|
339
|
+
items: UserMenuGrantPageItem[];
|
|
340
|
+
total: number;
|
|
341
|
+
}>;
|
|
324
342
|
/** 下载用户导入模板(xlsx)。[ActiveSession],无需独立权限码。 */
|
|
325
343
|
importTemplate: () => Promise<Blob>;
|
|
326
344
|
/**
|
package/dist/api/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var b = Object.defineProperty;
|
|
2
2
|
var P = (e, t, i) => t in e ? b(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
3
|
var y = (e, t, i) => P(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
-
import { client as s, LONG_TIMEOUT_MS as
|
|
5
|
-
import { runtime as
|
|
6
|
-
class
|
|
7
|
-
constructor(i, o, n,
|
|
8
|
-
super(
|
|
4
|
+
import { client as s, LONG_TIMEOUT_MS as u } from "./client.js";
|
|
5
|
+
import { runtime as f } from "../lib/runtime.js";
|
|
6
|
+
class l extends Error {
|
|
7
|
+
constructor(i, o, n, d) {
|
|
8
|
+
super(d ?? o ?? `Error ${i}`);
|
|
9
9
|
y(this, "code");
|
|
10
10
|
y(this, "msgKey");
|
|
11
11
|
y(this, "args");
|
|
@@ -15,11 +15,11 @@ class u extends Error {
|
|
|
15
15
|
function a(e) {
|
|
16
16
|
const { data: t, error: i, response: o } = e;
|
|
17
17
|
if (i != null) {
|
|
18
|
-
const
|
|
19
|
-
if (typeof
|
|
20
|
-
throw new
|
|
18
|
+
const d = i;
|
|
19
|
+
if (typeof d.code == "number")
|
|
20
|
+
throw new l(d.code, d.msgKey, d.args, d.message);
|
|
21
21
|
const h = i;
|
|
22
|
-
throw new
|
|
22
|
+
throw new l(
|
|
23
23
|
o.status,
|
|
24
24
|
void 0,
|
|
25
25
|
void 0,
|
|
@@ -28,25 +28,25 @@ function a(e) {
|
|
|
28
28
|
}
|
|
29
29
|
const n = t ?? {};
|
|
30
30
|
if (typeof n.code == "number" && n.code !== 0)
|
|
31
|
-
throw new
|
|
31
|
+
throw new l(n.code, n.msgKey, n.args, n.message);
|
|
32
32
|
return n.data;
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function U(e, t, i) {
|
|
35
35
|
const o = s.request;
|
|
36
36
|
return o(e, t, i === void 0 ? void 0 : { body: i }).then((n) => a(n));
|
|
37
37
|
}
|
|
38
38
|
const r = (e) => ({
|
|
39
39
|
Current: e.page,
|
|
40
40
|
Size: e.pageSize
|
|
41
|
-
}),
|
|
41
|
+
}), x = (e) => ({
|
|
42
42
|
...r(e),
|
|
43
43
|
Keyword: e.keyword,
|
|
44
44
|
Number: e.number,
|
|
45
45
|
Name: e.name,
|
|
46
46
|
SortField: e.sortField,
|
|
47
47
|
SortOrder: e.sortOrder
|
|
48
|
-
}),
|
|
49
|
-
function
|
|
48
|
+
}), S = (e) => !e || e.length !== 2 ? { start: void 0, end: void 0 } : { start: e[0] || void 0, end: e[1] ? `${e[1]} 23:59:59` : void 0 };
|
|
49
|
+
function p(e) {
|
|
50
50
|
const t = a(e);
|
|
51
51
|
return { items: t.items, total: t.total };
|
|
52
52
|
}
|
|
@@ -54,18 +54,18 @@ async function m(e) {
|
|
|
54
54
|
const { data: t, error: i, response: o } = e;
|
|
55
55
|
if (!o.ok) {
|
|
56
56
|
const h = i ?? {};
|
|
57
|
-
throw typeof h.code == "number" ? new
|
|
57
|
+
throw typeof h.code == "number" ? new l(h.code, h.msgKey, h.args, h.message) : new l(o.status, void 0, void 0, o.statusText);
|
|
58
58
|
}
|
|
59
|
-
const n = t,
|
|
60
|
-
if (
|
|
61
|
-
if (
|
|
59
|
+
const n = t, d = o.headers.get("content-type") ?? "";
|
|
60
|
+
if (d.includes("spreadsheet") || d.includes("octet-stream")) return n;
|
|
61
|
+
if (d.includes("json") || d.includes("text/plain")) {
|
|
62
62
|
const h = JSON.parse(await n.text());
|
|
63
63
|
if (typeof h.code == "number" && h.code !== 0)
|
|
64
|
-
throw new
|
|
64
|
+
throw new l(h.code, h.msgKey, h.args, h.message);
|
|
65
65
|
} else if (new Uint8Array(await n.slice(0, 1).arrayBuffer())[0] === 123) {
|
|
66
66
|
const c = JSON.parse(await n.text());
|
|
67
67
|
if (typeof c.code == "number" && c.code !== 0)
|
|
68
|
-
throw new
|
|
68
|
+
throw new l(c.code, c.msgKey, c.args, c.message);
|
|
69
69
|
}
|
|
70
70
|
return n;
|
|
71
71
|
}
|
|
@@ -148,17 +148,17 @@ const C = {
|
|
|
148
148
|
bindComplete: (e) => s.POST("/api/v1/auth/mfa/bind/complete", { body: e }).then((t) => a(t)),
|
|
149
149
|
recovery: (e) => s.POST("/api/v1/auth/mfa/recovery", { body: e }).then((t) => a(t)),
|
|
150
150
|
clear: (e) => s.POST("/api/v1/sys/mfa/clear", { body: e }).then((t) => a(t))
|
|
151
|
-
},
|
|
151
|
+
}, q = {
|
|
152
152
|
list: () => s.GET("/api/v1/sys/mfa/high-sensitivity", {}).then((e) => a(e)),
|
|
153
153
|
add: (e) => s.POST("/api/v1/sys/mfa/high-sensitivity", { body: e }).then((t) => a(t)),
|
|
154
154
|
remove: (e) => s.DELETE("/api/v1/sys/mfa/high-sensitivity/{id}", { params: { path: { id: e } } }).then((t) => a(t))
|
|
155
|
-
},
|
|
155
|
+
}, D = {
|
|
156
156
|
/** 登录页可用的外部登录方式(启用的);空数组 = 不显 SSO 区。 */
|
|
157
157
|
providers: () => s.GET("/api/v1/auth/external/providers", {}).then((e) => a(e)),
|
|
158
158
|
/** 管理端全量列表(含已禁用);系统配置「第三方登录」Tab。 */
|
|
159
159
|
providersAll: () => s.GET("/api/v1/auth/external/providers/all", {}).then((e) => a(e)),
|
|
160
160
|
/** 发起某 provider 登录的 URL(顶层浏览器导航,不走 fetch —— 后端 302 跳 IdP)。 */
|
|
161
|
-
authorizeUrl: (e) => `${
|
|
161
|
+
authorizeUrl: (e) => `${f.apiBase}/api/v1/auth/external/${encodeURIComponent(e)}/authorize`,
|
|
162
162
|
/** 一次性票据换令牌(登录回调后);票据无效/过期/已用抛 40014。 */
|
|
163
163
|
exchange: (e) => s.POST("/api/v1/auth/external/exchange", { body: { ticket: e } }).then((t) => a(t)),
|
|
164
164
|
/** 认领未绑定 SSO 的 pending-link(账密登录后);票据无效 40014,已被他人绑 40017。 */
|
|
@@ -223,7 +223,7 @@ const C = {
|
|
|
223
223
|
SortOrder: e.sortOrder
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
}).then((t) =>
|
|
226
|
+
}).then((t) => p(t)),
|
|
227
227
|
/** 用户详情(含 roleIds,编辑回显 + 提交时原样带回避免清空角色)。 */
|
|
228
228
|
detail: (e) => s.GET("/api/v1/sys/user/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
229
229
|
/** 新增用户;返回新 Id + 实际生效的初始口令(留空 password 时后端随机生成,不接住就没人知道这个号的密码)。 */
|
|
@@ -239,6 +239,25 @@ const C = {
|
|
|
239
239
|
}).then((i) => a(i)),
|
|
240
240
|
/** 专用启停端点(非全量 update)。 */
|
|
241
241
|
setEnabled: (e, t) => s.PUT("/api/v1/sys/user/{id}/enabled", { params: { path: { id: e } }, body: { enabled: t } }).then((i) => a(i)),
|
|
242
|
+
// ── 单独授权 ──
|
|
243
|
+
/** 某用户的单独授权记录(授权菜单弹窗回显)。 */
|
|
244
|
+
getMenuGrants: (e) => s.GET("/api/v1/sys/user/{id}/menus", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
245
|
+
/** 某用户的有效权限与来源:能否授、能否编辑及原因、委派最长天数、模块清单,一次取齐。 */
|
|
246
|
+
getEffectiveMenus: (e) => s.GET("/api/v1/sys/user/{id}/menus/effective", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
247
|
+
/** 按变更集保存单独授权:没提到的记录原样保留。 */
|
|
248
|
+
setMenuGrants: (e, t, i) => s.PUT("/api/v1/sys/user/menu", { body: { userId: e, upserts: t, removes: i } }).then((o) => a(o)),
|
|
249
|
+
/** 单独授权一览:分页 + 筛选(用户 / 授权人模糊,效果、状态精确)。 */
|
|
250
|
+
menuGrantPage: (e) => s.GET("/api/v1/sys/user/menu-grants/page", {
|
|
251
|
+
params: {
|
|
252
|
+
query: {
|
|
253
|
+
...r(e),
|
|
254
|
+
User: e.user,
|
|
255
|
+
Grantor: e.grantor,
|
|
256
|
+
Effect: e.effect,
|
|
257
|
+
Status: e.status
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}).then((t) => p(t)),
|
|
242
261
|
// ── 导入 / 导出 ──
|
|
243
262
|
/** 下载用户导入模板(xlsx)。[ActiveSession],无需独立权限码。 */
|
|
244
263
|
importTemplate: () => s.GET("/api/v1/sys/user/import/template", { parseAs: "blob" }).then((e) => m(e)),
|
|
@@ -247,7 +266,7 @@ const C = {
|
|
|
247
266
|
* bodySerializer 建 FormData(与 fileApi.upload 同型)。
|
|
248
267
|
*/
|
|
249
268
|
importPreview: (e, t) => s.POST("/api/v1/sys/user/import/preview", {
|
|
250
|
-
timeout:
|
|
269
|
+
timeout: u,
|
|
251
270
|
body: {
|
|
252
271
|
file: e,
|
|
253
272
|
mapping: t ? JSON.stringify(t) : void 0
|
|
@@ -259,18 +278,18 @@ const C = {
|
|
|
259
278
|
}).then((i) => g(a(i))),
|
|
260
279
|
/** 对前端改过的行重新校验(不碰文件)。 */
|
|
261
280
|
importValidate: (e) => s.POST("/api/v1/sys/user/import/validate", {
|
|
262
|
-
timeout:
|
|
281
|
+
timeout: u,
|
|
263
282
|
body: { rows: T(e) }
|
|
264
283
|
}).then((t) => g(a(t))),
|
|
265
284
|
/** 下载错误报告 xlsx(原列 +「错误原因」列)。 */
|
|
266
285
|
importErrorReport: (e) => s.POST("/api/v1/sys/user/import/error-report", {
|
|
267
|
-
timeout:
|
|
286
|
+
timeout: u,
|
|
268
287
|
body: { rows: T(e) },
|
|
269
288
|
parseAs: "blob"
|
|
270
289
|
}).then((t) => m(t)),
|
|
271
290
|
/** 按策略提交导入(部分提交:有错行跳过;服务端重校验,不信任前端 Errors)。 */
|
|
272
291
|
importCommit: (e, t = 0) => s.POST("/api/v1/sys/user/import/commit", {
|
|
273
|
-
timeout:
|
|
292
|
+
timeout: u,
|
|
274
293
|
body: { rows: T(e), strategy: t }
|
|
275
294
|
}).then((i) => O(a(i))),
|
|
276
295
|
/**
|
|
@@ -278,7 +297,7 @@ const C = {
|
|
|
278
297
|
* 返回 blob,不进信封。
|
|
279
298
|
*/
|
|
280
299
|
export: (e) => s.GET("/api/v1/sys/user/export", {
|
|
281
|
-
timeout:
|
|
300
|
+
timeout: u,
|
|
282
301
|
params: {
|
|
283
302
|
query: {
|
|
284
303
|
Account: e.account,
|
|
@@ -312,7 +331,7 @@ const C = {
|
|
|
312
331
|
SortOrder: e.sortOrder
|
|
313
332
|
}
|
|
314
333
|
}
|
|
315
|
-
}).then((t) =>
|
|
334
|
+
}).then((t) => p(t)),
|
|
316
335
|
add: (e) => s.POST("/api/v1/sys/position/add", { body: e }).then((t) => a(t)),
|
|
317
336
|
update: (e, t) => s.PUT("/api/v1/sys/position/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
318
337
|
remove: (e) => s.DELETE("/api/v1/sys/position/{id}", { params: { path: { id: e } } }).then((t) => a(t))
|
|
@@ -320,7 +339,7 @@ const C = {
|
|
|
320
339
|
/** 角色分页;搜索键 name → PascalCase Name。列表用 + 用户/授权页拉一大页当下拉源。 */
|
|
321
340
|
page: (e) => s.GET("/api/v1/sys/role/page", {
|
|
322
341
|
params: { query: { ...r(e), Name: e.name } }
|
|
323
|
-
}).then((t) =>
|
|
342
|
+
}).then((t) => p(t)),
|
|
324
343
|
add: (e) => s.POST("/api/v1/sys/role/add", { body: e }).then((t) => a(t)),
|
|
325
344
|
update: (e, t) => s.PUT("/api/v1/sys/role/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
326
345
|
remove: (e) => s.DELETE("/api/v1/sys/role/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -356,7 +375,7 @@ const C = {
|
|
|
356
375
|
ExcludedKeys: e.excludedKeys
|
|
357
376
|
}
|
|
358
377
|
}
|
|
359
|
-
}).then((t) =>
|
|
378
|
+
}).then((t) => p(t)),
|
|
360
379
|
add: (e) => s.POST("/api/v1/sys/config", { body: e }).then((t) => a(t)),
|
|
361
380
|
update: (e, t) => s.PUT("/api/v1/sys/config/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
362
381
|
remove: (e) => s.DELETE("/api/v1/sys/config/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -380,7 +399,7 @@ const C = {
|
|
|
380
399
|
* 返回的 viewUrl 是签名直链,写进 sys.site.logo 随批量保存生效。FormData 写法同 fileApi.upload。
|
|
381
400
|
*/
|
|
382
401
|
uploadLogo: (e) => s.POST("/api/v1/sys/config/logo", {
|
|
383
|
-
timeout:
|
|
402
|
+
timeout: u,
|
|
384
403
|
body: { file: e },
|
|
385
404
|
bodySerializer: (t) => {
|
|
386
405
|
const i = new FormData();
|
|
@@ -397,10 +416,10 @@ const C = {
|
|
|
397
416
|
)
|
|
398
417
|
};
|
|
399
418
|
function v(e) {
|
|
400
|
-
const { start: t, end: i } =
|
|
419
|
+
const { start: t, end: i } = S(e);
|
|
401
420
|
return { StartTime: t, EndTime: i };
|
|
402
421
|
}
|
|
403
|
-
const
|
|
422
|
+
const M = {
|
|
404
423
|
/** 登录日志分页;账号模糊 + 成败 + 时间范围。 */
|
|
405
424
|
loginPage: (e) => s.GET("/api/v1/sys/log/login/page", {
|
|
406
425
|
params: {
|
|
@@ -411,7 +430,7 @@ const B = {
|
|
|
411
430
|
...v(e.createTime)
|
|
412
431
|
}
|
|
413
432
|
}
|
|
414
|
-
}).then((t) =>
|
|
433
|
+
}).then((t) => p(t)),
|
|
415
434
|
/** 清空登录日志(硬删,不可恢复)。 */
|
|
416
435
|
loginClear: () => s.DELETE("/api/v1/sys/log/login", {}).then((e) => a(e)),
|
|
417
436
|
/** 操作日志分页;操作名模糊 + 成败 + 操作人(精确)+ 接口路径(模糊)+ 时间范围——审计要能答"谁在什么时候干了什么"。 */
|
|
@@ -426,7 +445,7 @@ const B = {
|
|
|
426
445
|
...v(e.createTime)
|
|
427
446
|
}
|
|
428
447
|
}
|
|
429
|
-
}).then((t) =>
|
|
448
|
+
}).then((t) => p(t)),
|
|
430
449
|
/** 清空操作日志(硬删,不可恢复)。 */
|
|
431
450
|
opClear: () => s.DELETE("/api/v1/sys/log/op", {}).then((e) => a(e)),
|
|
432
451
|
/**
|
|
@@ -434,7 +453,7 @@ const B = {
|
|
|
434
453
|
* 返回 blob,不进信封。
|
|
435
454
|
*/
|
|
436
455
|
opExport: (e) => s.GET("/api/v1/sys/log/op/export", {
|
|
437
|
-
timeout:
|
|
456
|
+
timeout: u,
|
|
438
457
|
params: {
|
|
439
458
|
query: {
|
|
440
459
|
Title: e.title,
|
|
@@ -457,10 +476,10 @@ const B = {
|
|
|
457
476
|
...v(e.createTime)
|
|
458
477
|
}
|
|
459
478
|
}
|
|
460
|
-
}).then((t) =>
|
|
479
|
+
}).then((t) => p(t)),
|
|
461
480
|
/** 清空异常日志(硬删,不可恢复)。 */
|
|
462
481
|
exceptionClear: () => s.DELETE("/api/v1/sys/log/exception", {}).then((e) => a(e))
|
|
463
|
-
},
|
|
482
|
+
}, B = {
|
|
464
483
|
/** 服务器运行快照(CPU/内存/磁盘/运行时;后端含一次约 500ms 的 CPU 采样)。 */
|
|
465
484
|
server: () => s.GET("/api/v1/sys/monitor/server", {}).then((e) => a(e))
|
|
466
485
|
}, $ = {
|
|
@@ -488,7 +507,7 @@ const B = {
|
|
|
488
507
|
/** 字典类型分页;搜索键 code/name → PascalCase Code/Name 查询参。 */
|
|
489
508
|
typePage: (e) => s.GET("/api/v1/sys/dict/type/page", {
|
|
490
509
|
params: { query: { ...r(e), Code: e.code, Name: e.name } }
|
|
491
|
-
}).then((t) =>
|
|
510
|
+
}).then((t) => p(t)),
|
|
492
511
|
typeAdd: (e) => s.POST("/api/v1/sys/dict/type", { body: e }).then((t) => a(t)),
|
|
493
512
|
typeUpdate: (e, t) => s.PUT("/api/v1/sys/dict/type/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
494
513
|
typeRemove: (e) => s.DELETE("/api/v1/sys/dict/type/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -507,10 +526,10 @@ const B = {
|
|
|
507
526
|
/** 文件分页;搜索键 originalName → 后端 FileName 模糊过滤。 */
|
|
508
527
|
page: (e) => s.GET("/api/v1/sys/file/page", {
|
|
509
528
|
params: { query: { ...r(e), FileName: e.originalName } }
|
|
510
|
-
}).then((t) =>
|
|
529
|
+
}).then((t) => p(t)),
|
|
511
530
|
/** 上传单个文件:bodySerializer 建 FormData(字段名 file),openapi-fetch 对 FormData 不注入 json header,浏览器自动补 boundary(client.ts 无需改)。 */
|
|
512
531
|
upload: (e) => s.POST("/api/v1/sys/file/upload", {
|
|
513
|
-
timeout:
|
|
532
|
+
timeout: u,
|
|
514
533
|
body: { file: e },
|
|
515
534
|
bodySerializer: (t) => {
|
|
516
535
|
const i = new FormData();
|
|
@@ -519,12 +538,12 @@ const B = {
|
|
|
519
538
|
}).then((t) => a(t)),
|
|
520
539
|
/** 下载:parseAs blob 取原始字节(非信封,不套 unwrap);Bearer 由 client 拦截器自动带。 */
|
|
521
540
|
download: (e) => s.GET("/api/v1/sys/file/{id}/download", {
|
|
522
|
-
timeout:
|
|
541
|
+
timeout: u,
|
|
523
542
|
params: { path: { id: e } },
|
|
524
543
|
parseAs: "blob"
|
|
525
544
|
}).then((t) => {
|
|
526
545
|
if (!t.response.ok)
|
|
527
|
-
throw new
|
|
546
|
+
throw new l(t.response.status, void 0, void 0, t.response.statusText);
|
|
528
547
|
return t.data;
|
|
529
548
|
}),
|
|
530
549
|
remove: (e) => s.DELETE("/api/v1/sys/file/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -535,18 +554,18 @@ const B = {
|
|
|
535
554
|
chunkInit: (e) => s.POST("/api/v1/sys/file/chunk/init", { body: e }).then((t) => a(t)),
|
|
536
555
|
/** 上传单个分片(multipart:uploadId + index + chunk),同 upload 用 bodySerializer 建 FormData。 */
|
|
537
556
|
chunkUpload: (e, t, i) => s.POST("/api/v1/sys/file/chunk", {
|
|
538
|
-
timeout:
|
|
557
|
+
timeout: u,
|
|
539
558
|
body: { uploadId: e, index: t, chunk: i },
|
|
540
559
|
bodySerializer: (o) => {
|
|
541
|
-
const n = o,
|
|
542
|
-
return
|
|
560
|
+
const n = o, d = new FormData();
|
|
561
|
+
return d.append("uploadId", n.uploadId), d.append("index", String(n.index)), d.append("chunk", n.chunk), d;
|
|
543
562
|
}
|
|
544
563
|
}).then((o) => a(o)),
|
|
545
564
|
/** 完成:触发服务端合并 + 哈希校验 + 三道关 + 落库。 */
|
|
546
|
-
chunkComplete: (e) => s.POST("/api/v1/sys/file/chunk/complete", { timeout:
|
|
565
|
+
chunkComplete: (e) => s.POST("/api/v1/sys/file/chunk/complete", { timeout: u, body: e }).then((t) => a(t))
|
|
547
566
|
}, H = {
|
|
548
567
|
/** 在线会话分页(只读)。后端仅支持按 UserId 过滤,这里不带业务搜索。 */
|
|
549
|
-
online: (e) => s.GET("/api/v1/sys/session/online", { params: { query: r(e) } }).then((t) =>
|
|
568
|
+
online: (e) => s.GET("/api/v1/sys/session/online", { params: { query: r(e) } }).then((t) => p(t)),
|
|
550
569
|
/** 强制下线:按 sessionId 踢会话。 */
|
|
551
570
|
kick: (e) => s.DELETE("/api/v1/sys/session/{sessionId}", { params: { path: { sessionId: e } } }).then((t) => a(t))
|
|
552
571
|
}, Q = {
|
|
@@ -554,14 +573,14 @@ const B = {
|
|
|
554
573
|
/** 管理端分页(全量);搜索键 title/type → PascalCase 查询参。 */
|
|
555
574
|
page: (e) => s.GET("/api/v1/sys/notice/page", {
|
|
556
575
|
params: { query: { ...r(e), Title: e.title, Type: e.type } }
|
|
557
|
-
}).then((t) =>
|
|
576
|
+
}).then((t) => p(t)),
|
|
558
577
|
publish: (e) => s.POST("/api/v1/sys/notice", { body: e }).then((t) => a(t)),
|
|
559
578
|
remove: (e) => s.DELETE("/api/v1/sys/notice/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
560
579
|
// ── 用户端(任何登录用户) ──
|
|
561
580
|
/** 我的通知分页(含已读标记);onlyUnread 供"未读"页签用。 */
|
|
562
581
|
mine: (e) => s.GET("/api/v1/sys/notice/mine", {
|
|
563
582
|
params: { query: { ...r(e), OnlyUnread: e.onlyUnread } }
|
|
564
|
-
}).then((t) =>
|
|
583
|
+
}).then((t) => p(t)),
|
|
565
584
|
/** 当前用户未读通知数(顶栏角标轮询)。 */
|
|
566
585
|
unreadCount: () => s.GET("/api/v1/sys/notice/unread-count", {}).then((e) => a(e)),
|
|
567
586
|
markRead: (e) => s.PUT("/api/v1/sys/notice/{id}/read", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -586,7 +605,7 @@ const B = {
|
|
|
586
605
|
SortOrder: e.sortOrder
|
|
587
606
|
}
|
|
588
607
|
}
|
|
589
|
-
}).then((t) =>
|
|
608
|
+
}).then((t) => p(t)),
|
|
590
609
|
add: (e) => s.POST("/api/v1/sys/job", { body: e }).then((t) => a(t)),
|
|
591
610
|
update: (e, t) => s.PUT("/api/v1/sys/job/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
592
611
|
remove: (e) => s.DELETE("/api/v1/sys/job/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -617,7 +636,7 @@ const B = {
|
|
|
617
636
|
StartTo: (i = e.startRange) != null && i[1] ? `${e.startRange[1]} 23:59:59` : void 0
|
|
618
637
|
}
|
|
619
638
|
}
|
|
620
|
-
}).then((o) =>
|
|
639
|
+
}).then((o) => p(o));
|
|
621
640
|
},
|
|
622
641
|
/** 终止一次执行(跨节点写终止旗标,目标节点最迟 KillPollSeconds 后停)。 */
|
|
623
642
|
kill: (e) => s.POST("/api/v1/sys/job/log/{id}/kill", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -628,7 +647,7 @@ const B = {
|
|
|
628
647
|
}, Y = {
|
|
629
648
|
page: (e) => (t) => s.GET("/api/v1/sys/recycle/{type}/page", {
|
|
630
649
|
params: { path: { type: e }, query: r(t) }
|
|
631
|
-
}).then((i) =>
|
|
650
|
+
}).then((i) => p(i)),
|
|
632
651
|
restore: (e, t) => s.POST("/api/v1/sys/recycle/{type}/{id}/restore", { params: { path: { type: e, id: t } } }).then((i) => a(i)),
|
|
633
652
|
purge: (e, t) => s.DELETE("/api/v1/sys/recycle/{type}/{id}", { params: { path: { type: e, id: t } } }).then((i) => a(i))
|
|
634
653
|
}, Z = {
|
|
@@ -641,7 +660,7 @@ const B = {
|
|
|
641
660
|
Enabled: e.enabled
|
|
642
661
|
}
|
|
643
662
|
}
|
|
644
|
-
}).then((t) =>
|
|
663
|
+
}).then((t) => p(t)),
|
|
645
664
|
get: (e) => s.GET("/api/v1/sys/ai/provider/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
646
665
|
/** 厂商预置清单(协议/BaseUrl/鉴权方式/起步模型),新增抽屉选预设用。 */
|
|
647
666
|
presets: () => s.GET("/api/v1/sys/ai/provider/presets", {}).then((e) => a(e)),
|
|
@@ -695,30 +714,30 @@ const B = {
|
|
|
695
714
|
Success: e.success
|
|
696
715
|
}
|
|
697
716
|
}
|
|
698
|
-
}).then((t) =>
|
|
717
|
+
}).then((t) => p(t))
|
|
699
718
|
};
|
|
700
719
|
export {
|
|
701
|
-
|
|
720
|
+
l as ApiError,
|
|
702
721
|
Z as aiProviderApi,
|
|
703
722
|
ee as aiUsageApi,
|
|
704
723
|
C as authApi,
|
|
705
724
|
$ as cacheApi,
|
|
706
|
-
|
|
725
|
+
U as callApi,
|
|
707
726
|
z as configApi,
|
|
708
727
|
L as dashboardApi,
|
|
709
|
-
|
|
728
|
+
S as dayRange,
|
|
710
729
|
V as dictAdminApi,
|
|
711
730
|
J as dictApi,
|
|
712
|
-
|
|
731
|
+
D as externalAuthApi,
|
|
713
732
|
_ as fileApi,
|
|
714
|
-
|
|
733
|
+
q as highSensApi,
|
|
715
734
|
X as jobApi,
|
|
716
|
-
|
|
717
|
-
|
|
735
|
+
x as listQuery,
|
|
736
|
+
M as logApi,
|
|
718
737
|
W as menuApi,
|
|
719
738
|
I as mfaApi,
|
|
720
739
|
j as moduleApi,
|
|
721
|
-
|
|
740
|
+
B as monitorApi,
|
|
722
741
|
O as normalizeCommit,
|
|
723
742
|
g as normalizePreview,
|
|
724
743
|
Q as noticeApi,
|
|
@@ -729,7 +748,7 @@ export {
|
|
|
729
748
|
Y as recycleApi,
|
|
730
749
|
K as roleApi,
|
|
731
750
|
H as sessionApi,
|
|
732
|
-
|
|
751
|
+
p as toPage,
|
|
733
752
|
T as toWireRows,
|
|
734
753
|
a as unwrap,
|
|
735
754
|
m as unwrapDownload,
|