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.
Files changed (143) hide show
  1. package/dist/api/index.d.ts +19 -1
  2. package/dist/api/index.js +85 -66
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/api/schema.d.ts +448 -1
  5. package/dist/assets/icons/ph-subset.json.js +1 -1
  6. package/dist/components/FormContainer/index.vue.js +87 -75
  7. package/dist/components/FormContainer/index.vue.js.map +1 -1
  8. package/dist/components/UserPicker/UserAvatar.vue.d.ts +8 -0
  9. package/dist/components/UserPicker/UserAvatar.vue.js +8 -0
  10. package/dist/components/UserPicker/UserAvatar.vue.js.map +1 -0
  11. package/dist/components/UserPicker/UserAvatar2.vue.js +38 -0
  12. package/dist/components/UserPicker/UserAvatar2.vue.js.map +1 -0
  13. package/dist/components/UserPicker/index.vue.js +1 -1
  14. package/dist/components/UserPicker/index2.vue.js +328 -186
  15. package/dist/components/UserPicker/index2.vue.js.map +1 -1
  16. package/dist/index.js +248 -246
  17. package/dist/lib/runtime.js +1 -1
  18. package/dist/lib/watermark.d.ts +1 -1
  19. package/dist/locales/en-US.d.ts +62 -3
  20. package/dist/locales/en-US.js +65 -6
  21. package/dist/locales/en-US.js.map +1 -1
  22. package/dist/locales/kernelMenuTitles.js +1 -0
  23. package/dist/locales/kernelMenuTitles.js.map +1 -1
  24. package/dist/locales/zh-CN.d.ts +62 -3
  25. package/dist/locales/zh-CN.js +65 -6
  26. package/dist/locales/zh-CN.js.map +1 -1
  27. package/dist/router/viewRegistry.js +6 -6
  28. package/dist/router/viewRegistry.js.map +1 -1
  29. package/dist/style.css +1 -1
  30. package/dist/theme/naive-theme.js +80 -77
  31. package/dist/theme/naive-theme.js.map +1 -1
  32. package/dist/types/api.d.ts +91 -0
  33. package/dist/types/api.js +17 -15
  34. package/dist/types/api.js.map +1 -1
  35. package/dist/utils/shake.d.ts +1 -0
  36. package/dist/utils/shake.js +30 -0
  37. package/dist/utils/shake.js.map +1 -0
  38. package/dist/views/login/LoginForm.vue.js +2 -2
  39. package/dist/views/login/LoginForm2.vue.js +135 -135
  40. package/dist/views/login/LoginForm2.vue.js.map +1 -1
  41. package/dist/views/login/components/LoginDesk.vue.js +1 -1
  42. package/dist/views/login/components/LoginDesk2.vue.js +59 -47
  43. package/dist/views/login/components/LoginDesk2.vue.js.map +1 -1
  44. package/dist/views/personal/notice2.vue.js +1 -1
  45. package/dist/views/personal/notice2.vue.js.map +1 -1
  46. package/dist/views/personal/sessions.vue.js +2 -2
  47. package/dist/views/personal/sessions2.vue.js +41 -40
  48. package/dist/views/personal/sessions2.vue.js.map +1 -1
  49. package/dist/views/system/ai-usage/index.vue.js +3 -3
  50. package/dist/views/system/ai-usage/index2.vue.js +13 -12
  51. package/dist/views/system/ai-usage/index2.vue.js.map +1 -1
  52. package/dist/views/system/config/components/AdvancedSection.vue.js +3 -3
  53. package/dist/views/system/config/components/AdvancedSection2.vue.js +2 -1
  54. package/dist/views/system/config/components/AdvancedSection2.vue.js.map +1 -1
  55. package/dist/views/system/dict/index.vue.js +2 -2
  56. package/dist/views/system/dict/index2.vue.js +12 -1
  57. package/dist/views/system/dict/index2.vue.js.map +1 -1
  58. package/dist/views/system/file/index2.vue.js +1 -0
  59. package/dist/views/system/file/index2.vue.js.map +1 -1
  60. package/dist/views/system/job/index.vue.js +3 -3
  61. package/dist/views/system/job/index2.vue.js +182 -181
  62. package/dist/views/system/job/index2.vue.js.map +1 -1
  63. package/dist/views/system/job-log/components/AttemptTable2.vue.js +8 -3
  64. package/dist/views/system/job-log/components/AttemptTable2.vue.js.map +1 -1
  65. package/dist/views/system/job-log/index.vue.js +1 -1
  66. package/dist/views/system/job-log/index2.vue.js +5 -5
  67. package/dist/views/system/job-log/index2.vue.js.map +1 -1
  68. package/dist/views/system/log/exception/index.vue.js +2 -2
  69. package/dist/views/system/log/exception/index2.vue.js +8 -5
  70. package/dist/views/system/log/exception/index2.vue.js.map +1 -1
  71. package/dist/views/system/log/login/index2.vue.js +21 -12
  72. package/dist/views/system/log/login/index2.vue.js.map +1 -1
  73. package/dist/views/system/log/op/index.vue.js +2 -2
  74. package/dist/views/system/log/op/index2.vue.js +50 -40
  75. package/dist/views/system/log/op/index2.vue.js.map +1 -1
  76. package/dist/views/system/menu/components/ButtonManager.vue.js +2 -2
  77. package/dist/views/system/menu/components/ButtonManager2.vue.js +45 -36
  78. package/dist/views/system/menu/components/ButtonManager2.vue.js.map +1 -1
  79. package/dist/views/system/menu/index.vue.js +2 -2
  80. package/dist/views/system/menu/index2.vue.js +11 -11
  81. package/dist/views/system/menu/index2.vue.js.map +1 -1
  82. package/dist/views/system/module/index.vue.js +1 -1
  83. package/dist/views/system/module/index2.vue.js +171 -117
  84. package/dist/views/system/module/index2.vue.js.map +1 -1
  85. package/dist/views/system/notice/index.vue.js +3 -3
  86. package/dist/views/system/notice/index2.vue.js +1 -0
  87. package/dist/views/system/notice/index2.vue.js.map +1 -1
  88. package/dist/views/system/org/index.vue.js +2 -2
  89. package/dist/views/system/org/index2.vue.js +70 -67
  90. package/dist/views/system/org/index2.vue.js.map +1 -1
  91. package/dist/views/system/position/index.vue.js +2 -2
  92. package/dist/views/system/position/index2.vue.js +57 -48
  93. package/dist/views/system/position/index2.vue.js.map +1 -1
  94. package/dist/views/system/recycle/index.vue.js +1 -1
  95. package/dist/views/system/recycle/index2.vue.js +3 -1
  96. package/dist/views/system/recycle/index2.vue.js.map +1 -1
  97. package/dist/views/system/role/components/GrantMenuSheet.vue.d.ts +2 -0
  98. package/dist/views/system/role/components/GrantMenuSheet.vue.js +2 -2
  99. package/dist/views/system/role/components/GrantMenuSheet2.vue.js +54 -49
  100. package/dist/views/system/role/components/GrantMenuSheet2.vue.js.map +1 -1
  101. package/dist/views/system/role/components/GrantMenuTable.vue.js +1 -1
  102. package/dist/views/system/role/components/GrantMenuTable2.vue.js +159 -195
  103. package/dist/views/system/role/components/GrantMenuTable2.vue.js.map +1 -1
  104. package/dist/views/system/role/components/grantMenuGroups.d.ts +54 -0
  105. package/dist/views/system/role/components/grantMenuGroups.js +116 -76
  106. package/dist/views/system/role/components/grantMenuGroups.js.map +1 -1
  107. package/dist/views/system/role/index.vue.js +2 -2
  108. package/dist/views/system/role/index2.vue.js +152 -145
  109. package/dist/views/system/role/index2.vue.js.map +1 -1
  110. package/dist/views/system/session/index2.vue.js +39 -35
  111. package/dist/views/system/session/index2.vue.js.map +1 -1
  112. package/dist/views/system/user/components/UserGrantEffectiveTable.vue.d.ts +10 -0
  113. package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js +5 -0
  114. package/dist/views/system/user/components/UserGrantEffectiveTable.vue.js.map +1 -0
  115. package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js +96 -0
  116. package/dist/views/system/user/components/UserGrantEffectiveTable2.vue.js.map +1 -0
  117. package/dist/views/system/user/components/UserGrantMenuSheet.vue.d.ts +13 -0
  118. package/dist/views/system/user/components/UserGrantMenuSheet.vue.js +8 -0
  119. package/dist/views/system/user/components/UserGrantMenuSheet.vue.js.map +1 -0
  120. package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js +216 -0
  121. package/dist/views/system/user/components/UserGrantMenuSheet2.vue.js.map +1 -0
  122. package/dist/views/system/user/components/UserGrantMenuTable.vue.d.ts +13 -0
  123. package/dist/views/system/user/components/UserGrantMenuTable.vue.js +8 -0
  124. package/dist/views/system/user/components/UserGrantMenuTable.vue.js.map +1 -0
  125. package/dist/views/system/user/components/UserGrantMenuTable2.vue.js +186 -0
  126. package/dist/views/system/user/components/UserGrantMenuTable2.vue.js.map +1 -0
  127. package/dist/views/system/user/components/UserGrantNodeRow.vue.d.ts +31 -0
  128. package/dist/views/system/user/components/UserGrantNodeRow.vue.js +8 -0
  129. package/dist/views/system/user/components/UserGrantNodeRow.vue.js.map +1 -0
  130. package/dist/views/system/user/components/UserGrantNodeRow2.vue.js +171 -0
  131. package/dist/views/system/user/components/UserGrantNodeRow2.vue.js.map +1 -0
  132. package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.d.ts +21 -0
  133. package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js +5 -0
  134. package/dist/views/system/user/components/UserGrantOverviewDrawer.vue.js.map +1 -0
  135. package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js +178 -0
  136. package/dist/views/system/user/components/UserGrantOverviewDrawer2.vue.js.map +1 -0
  137. package/dist/views/system/user/components/userGrantState.d.ts +64 -0
  138. package/dist/views/system/user/components/userGrantState.js +117 -0
  139. package/dist/views/system/user/components/userGrantState.js.map +1 -0
  140. package/dist/views/system/user/index.vue.js +2 -2
  141. package/dist/views/system/user/index2.vue.js +250 -207
  142. package/dist/views/system/user/index2.vue.js.map +1 -1
  143. package/package.json +3 -3
@@ -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 l } from "./client.js";
5
- import { runtime as S } from "../lib/runtime.js";
6
- class u extends Error {
7
- constructor(i, o, n, p) {
8
- super(p ?? o ?? `Error ${i}`);
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 p = i;
19
- if (typeof p.code == "number")
20
- throw new u(p.code, p.msgKey, p.args, p.message);
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 u(
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 u(n.code, n.msgKey, n.args, n.message);
31
+ throw new l(n.code, n.msgKey, n.args, n.message);
32
32
  return n.data;
33
33
  }
34
- function x(e, t, i) {
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
- }), U = (e) => ({
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
- }), f = (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 d(e) {
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 u(h.code, h.msgKey, h.args, h.message) : new u(o.status, void 0, void 0, o.statusText);
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, p = o.headers.get("content-type") ?? "";
60
- if (p.includes("spreadsheet") || p.includes("octet-stream")) return n;
61
- if (p.includes("json") || p.includes("text/plain")) {
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 u(h.code, h.msgKey, h.args, h.message);
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 u(c.code, c.msgKey, c.args, c.message);
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
- }, D = {
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
- }, q = {
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) => `${S.apiBase}/api/v1/auth/external/${encodeURIComponent(e)}/authorize`,
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) => d(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: l,
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: l,
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: l,
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: l,
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: l,
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) => d(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) => d(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) => d(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: l,
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 } = f(e);
419
+ const { start: t, end: i } = S(e);
401
420
  return { StartTime: t, EndTime: i };
402
421
  }
403
- const B = {
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) => d(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) => d(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: l,
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) => d(t)),
479
+ }).then((t) => p(t)),
461
480
  /** 清空异常日志(硬删,不可恢复)。 */
462
481
  exceptionClear: () => s.DELETE("/api/v1/sys/log/exception", {}).then((e) => a(e))
463
- }, M = {
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) => d(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) => d(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: l,
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: l,
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 u(t.response.status, void 0, void 0, t.response.statusText);
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: l,
557
+ timeout: u,
539
558
  body: { uploadId: e, index: t, chunk: i },
540
559
  bodySerializer: (o) => {
541
- const n = o, p = new FormData();
542
- return p.append("uploadId", n.uploadId), p.append("index", String(n.index)), p.append("chunk", n.chunk), p;
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: l, body: e }).then((t) => a(t))
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) => d(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) => d(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) => d(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) => d(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) => d(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) => d(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) => d(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) => d(t))
717
+ }).then((t) => p(t))
699
718
  };
700
719
  export {
701
- u as ApiError,
720
+ l as ApiError,
702
721
  Z as aiProviderApi,
703
722
  ee as aiUsageApi,
704
723
  C as authApi,
705
724
  $ as cacheApi,
706
- x as callApi,
725
+ U as callApi,
707
726
  z as configApi,
708
727
  L as dashboardApi,
709
- f as dayRange,
728
+ S as dayRange,
710
729
  V as dictAdminApi,
711
730
  J as dictApi,
712
- q as externalAuthApi,
731
+ D as externalAuthApi,
713
732
  _ as fileApi,
714
- D as highSensApi,
733
+ q as highSensApi,
715
734
  X as jobApi,
716
- U as listQuery,
717
- B as logApi,
735
+ x as listQuery,
736
+ M as logApi,
718
737
  W as menuApi,
719
738
  I as mfaApi,
720
739
  j as moduleApi,
721
- M as monitorApi,
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
- d as toPage,
751
+ p as toPage,
733
752
  T as toWireRows,
734
753
  a as unwrap,
735
754
  m as unwrapDownload,