smart-admin-web 10.25.0 → 10.27.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 +170 -5
- package/dist/api/index.js +206 -116
- package/dist/api/index.js.map +1 -1
- package/dist/api/schema.d.ts +1477 -113
- package/dist/assets/icons/ph-subset.json.js +1 -1
- package/dist/components/FilePathUpload/index.vue.d.ts +35 -0
- package/dist/components/FilePathUpload/index.vue.js +47 -0
- package/dist/components/FilePathUpload/index.vue.js.map +1 -0
- package/dist/components/FilePathUpload/index2.vue.js +5 -0
- package/dist/components/FilePathUpload/index2.vue.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +302 -294
- package/dist/index.js.map +1 -1
- package/dist/layouts/NoticeBell.vue.js +2 -2
- package/dist/layouts/NoticeBell2.vue.js +203 -146
- package/dist/layouts/NoticeBell2.vue.js.map +1 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/locales/en-US.d.ts +144 -0
- package/dist/locales/en-US.js +139 -0
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/kernelMenuTitles.js +10 -0
- package/dist/locales/kernelMenuTitles.js.map +1 -1
- package/dist/locales/zh-CN.d.ts +144 -0
- package/dist/locales/zh-CN.js +139 -0
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/router/viewRegistry.js +8 -8
- package/dist/router/viewRegistry.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/error.js +22 -18
- package/dist/utils/error.js.map +1 -1
- package/dist/utils/filePathUpload.d.ts +14 -0
- package/dist/utils/filePathUpload.js +84 -0
- package/dist/utils/filePathUpload.js.map +1 -0
- package/dist/views/system/file-path/access.d.ts +15 -0
- package/dist/views/system/file-path/access.js +49 -0
- package/dist/views/system/file-path/access.js.map +1 -0
- package/dist/views/system/file-path/components/PathForm.vue.d.ts +18 -0
- package/dist/views/system/file-path/components/PathForm.vue.js +8 -0
- package/dist/views/system/file-path/components/PathForm.vue.js.map +1 -0
- package/dist/views/system/file-path/components/PathForm2.vue.js +529 -0
- package/dist/views/system/file-path/components/PathForm2.vue.js.map +1 -0
- package/dist/views/system/file-path/components/PathTab.vue.d.ts +3 -0
- package/dist/views/system/file-path/components/PathTab.vue.js +8 -0
- package/dist/views/system/file-path/components/PathTab.vue.js.map +1 -0
- package/dist/views/system/file-path/components/PathTab2.vue.js +226 -0
- package/dist/views/system/file-path/components/PathTab2.vue.js.map +1 -0
- package/dist/views/system/file-path/components/ServerForm.vue.d.ts +20 -0
- package/dist/views/system/file-path/components/ServerForm.vue.js +8 -0
- package/dist/views/system/file-path/components/ServerForm.vue.js.map +1 -0
- package/dist/views/system/file-path/components/ServerForm2.vue.js +328 -0
- package/dist/views/system/file-path/components/ServerForm2.vue.js.map +1 -0
- package/dist/views/system/file-path/components/ServerTab.vue.d.ts +7 -0
- package/dist/views/system/file-path/components/ServerTab.vue.js +8 -0
- package/dist/views/system/file-path/components/ServerTab.vue.js.map +1 -0
- package/dist/views/system/file-path/components/ServerTab2.vue.js +181 -0
- package/dist/views/system/file-path/components/ServerTab2.vue.js.map +1 -0
- package/dist/views/system/file-path/index.vue.d.ts +3 -0
- package/dist/views/system/file-path/index.vue.js +8 -0
- package/dist/views/system/file-path/index.vue.js.map +1 -0
- package/dist/views/system/file-path/index2.vue.js +61 -0
- package/dist/views/system/file-path/index2.vue.js.map +1 -0
- package/dist/views/system/file-path/rules.d.ts +61 -0
- package/dist/views/system/file-path/rules.js +53 -0
- package/dist/views/system/file-path/rules.js.map +1 -0
- package/package.json +1 -1
package/dist/api/index.js
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
1
|
var b = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
2
|
+
var f = (e, t, i) => t in e ? b(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var v = (e, t, i) => f(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
4
|
import { client as s, LONG_TIMEOUT_MS as u } from "./client.js";
|
|
5
|
-
import { runtime as
|
|
6
|
-
class
|
|
7
|
-
constructor(i, o, n,
|
|
8
|
-
super(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
import { runtime as P } from "../lib/runtime.js";
|
|
6
|
+
class y extends Error {
|
|
7
|
+
constructor(i, o, n, r) {
|
|
8
|
+
super(r ?? o ?? `Error ${i}`);
|
|
9
|
+
v(this, "code");
|
|
10
|
+
v(this, "msgKey");
|
|
11
|
+
v(this, "args");
|
|
12
12
|
this.name = "ApiError", this.code = i, this.msgKey = o, this.args = n;
|
|
13
13
|
}
|
|
14
14
|
}
|
|
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
|
|
21
|
-
const
|
|
22
|
-
throw new
|
|
18
|
+
const r = i;
|
|
19
|
+
if (typeof r.code == "number")
|
|
20
|
+
throw new y(r.code, r.msgKey, r.args, r.message);
|
|
21
|
+
const p = i;
|
|
22
|
+
throw new y(
|
|
23
23
|
o.status,
|
|
24
24
|
void 0,
|
|
25
25
|
void 0,
|
|
26
|
-
|
|
26
|
+
p.title ?? p.detail ?? o.statusText
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
const n = t ?? {};
|
|
30
30
|
if (typeof n.code == "number" && n.code !== 0)
|
|
31
|
-
throw new
|
|
31
|
+
throw new y(n.code, n.msgKey, n.args, n.message);
|
|
32
32
|
return n.data;
|
|
33
33
|
}
|
|
34
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
|
-
const
|
|
38
|
+
const d = (e) => ({
|
|
39
39
|
Current: e.page,
|
|
40
40
|
Size: e.pageSize
|
|
41
41
|
}), x = (e) => ({
|
|
42
|
-
...
|
|
42
|
+
...d(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
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
|
|
49
|
+
function h(e) {
|
|
50
50
|
const t = a(e);
|
|
51
51
|
return { items: t.items, total: t.total };
|
|
52
52
|
}
|
|
53
|
-
async function
|
|
53
|
+
async function c(e) {
|
|
54
54
|
const { data: t, error: i, response: o } = e;
|
|
55
55
|
if (!o.ok) {
|
|
56
|
-
const
|
|
57
|
-
throw typeof
|
|
56
|
+
const p = i ?? {};
|
|
57
|
+
throw typeof p.code == "number" ? new y(p.code, p.msgKey, p.args, p.message) : new y(o.status, void 0, void 0, o.statusText);
|
|
58
58
|
}
|
|
59
|
-
const n = t,
|
|
60
|
-
if (
|
|
61
|
-
if (
|
|
62
|
-
const
|
|
63
|
-
if (typeof
|
|
64
|
-
throw new
|
|
59
|
+
const n = t, r = o.headers.get("content-type") ?? "";
|
|
60
|
+
if (r.includes("spreadsheet") || r.includes("octet-stream")) return n;
|
|
61
|
+
if (r.includes("json") || r.includes("text/plain")) {
|
|
62
|
+
const p = JSON.parse(await n.text());
|
|
63
|
+
if (typeof p.code == "number" && p.code !== 0)
|
|
64
|
+
throw new y(p.code, p.msgKey, p.args, p.message);
|
|
65
65
|
} else if (new Uint8Array(await n.slice(0, 1).arrayBuffer())[0] === 123) {
|
|
66
|
-
const
|
|
67
|
-
if (typeof
|
|
68
|
-
throw new l
|
|
66
|
+
const l = JSON.parse(await n.text());
|
|
67
|
+
if (typeof l.code == "number" && l.code !== 0)
|
|
68
|
+
throw new y(l.code, l.msgKey, l.args, l.message);
|
|
69
69
|
}
|
|
70
70
|
return n;
|
|
71
71
|
}
|
|
@@ -127,7 +127,7 @@ function T(e) {
|
|
|
127
127
|
};
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
const
|
|
130
|
+
const k = {
|
|
131
131
|
login: (e) => s.POST("/api/v1/auth/login", { body: e }).then((t) => a(t)),
|
|
132
132
|
logout: () => s.POST("/api/v1/auth/logout", {}).then((e) => a(e)),
|
|
133
133
|
captcha: () => s.GET("/api/v1/auth/captcha", {}).then((e) => a(e)),
|
|
@@ -143,22 +143,22 @@ const C = {
|
|
|
143
143
|
smsLoginSend: (e) => s.POST("/api/v1/auth/sms/send", { body: e }).then((t) => a(t)),
|
|
144
144
|
/** 免密登录:手机号 + 短信码换令牌。 */
|
|
145
145
|
smsLogin: (e) => s.POST("/api/v1/auth/sms/login", { body: e }).then((t) => a(t))
|
|
146
|
-
},
|
|
146
|
+
}, q = {
|
|
147
147
|
bindStart: (e) => s.POST("/api/v1/auth/mfa/bind/start", { body: e }).then((t) => a(t)),
|
|
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
|
+
}, I = {
|
|
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
|
+
}, C = {
|
|
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) => `${P.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。 */
|
|
@@ -177,7 +177,7 @@ const C = {
|
|
|
177
177
|
removeProvider: (e) => s.DELETE("/api/v1/sys/external-auth/providers/{code}", { params: { path: { code: e } } }).then((t) => a(t)),
|
|
178
178
|
/** 连接测试:用表单里的值,机密留空取已保存的;不落库,失败原因在 checks 里。 */
|
|
179
179
|
testProvider: (e) => s.POST("/api/v1/sys/external-auth/providers/test", { body: e }).then((t) => a(t))
|
|
180
|
-
},
|
|
180
|
+
}, D = {
|
|
181
181
|
/** 工作台首页统计([ActiveSession]:任何登录用户可取,无需权限码)。 */
|
|
182
182
|
summary: () => s.GET("/api/v1/dashboard/summary", {}).then((e) => a(e))
|
|
183
183
|
}, L = {
|
|
@@ -214,7 +214,7 @@ const C = {
|
|
|
214
214
|
// sortField/sortOrder:SmartTable 排序;后端按实体列白名单校验(非法忽略回退默认),见 PagedListExtensions.OrderBySafe。
|
|
215
215
|
params: {
|
|
216
216
|
query: {
|
|
217
|
-
...
|
|
217
|
+
...d(e),
|
|
218
218
|
Account: e.account,
|
|
219
219
|
Name: e.name,
|
|
220
220
|
OrgId: e.orgId,
|
|
@@ -223,16 +223,16 @@ const C = {
|
|
|
223
223
|
SortOrder: e.sortOrder
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
}).then((t) =>
|
|
226
|
+
}).then((t) => h(t)),
|
|
227
227
|
/**
|
|
228
228
|
* 选择器数据源(仅启用用户,只回 id / 姓名 / 账号):不占用户页权限码,没有「用户-查询」的角色也能选人。
|
|
229
229
|
* keyword 同时匹配姓名与账号;范围同 page。人员选择器一律走它,不走 page。
|
|
230
230
|
*/
|
|
231
231
|
options: (e) => s.GET("/api/v1/sys/user/options", {
|
|
232
232
|
params: {
|
|
233
|
-
query: { ...
|
|
233
|
+
query: { ...d(e), Keyword: e.keyword, OrgId: e.orgId }
|
|
234
234
|
}
|
|
235
|
-
}).then((t) =>
|
|
235
|
+
}).then((t) => h(t)),
|
|
236
236
|
/** 用户详情(含 roleIds,编辑回显 + 提交时原样带回避免清空角色)。 */
|
|
237
237
|
detail: (e) => s.GET("/api/v1/sys/user/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
238
238
|
/** 新增用户;返回新 Id + 实际生效的初始口令(留空 password 时后端随机生成,不接住就没人知道这个号的密码)。 */
|
|
@@ -259,17 +259,17 @@ const C = {
|
|
|
259
259
|
menuGrantPage: (e) => s.GET("/api/v1/sys/user/menu-grants/page", {
|
|
260
260
|
params: {
|
|
261
261
|
query: {
|
|
262
|
-
...
|
|
262
|
+
...d(e),
|
|
263
263
|
User: e.user,
|
|
264
264
|
Grantor: e.grantor,
|
|
265
265
|
Effect: e.effect,
|
|
266
266
|
Status: e.status
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
}).then((t) =>
|
|
269
|
+
}).then((t) => h(t)),
|
|
270
270
|
// ── 导入 / 导出 ──
|
|
271
271
|
/** 下载用户导入模板(xlsx)。[ActiveSession],无需独立权限码。 */
|
|
272
|
-
importTemplate: () => s.GET("/api/v1/sys/user/import/template", { parseAs: "blob" }).then((e) =>
|
|
272
|
+
importTemplate: () => s.GET("/api/v1/sys/user/import/template", { parseAs: "blob" }).then((e) => c(e)),
|
|
273
273
|
/**
|
|
274
274
|
* 上传 xlsx 预览校验。multipart:`file` + 可选 `mapping`(JSON 字符串:表头→列 Key)。
|
|
275
275
|
* bodySerializer 建 FormData(与 fileApi.upload 同型)。
|
|
@@ -295,7 +295,7 @@ const C = {
|
|
|
295
295
|
timeout: u,
|
|
296
296
|
body: { rows: T(e) },
|
|
297
297
|
parseAs: "blob"
|
|
298
|
-
}).then((t) =>
|
|
298
|
+
}).then((t) => c(t)),
|
|
299
299
|
/** 按策略提交导入(部分提交:有错行跳过;服务端重校验,不信任前端 Errors)。 */
|
|
300
300
|
importCommit: (e, t = 0) => s.POST("/api/v1/sys/user/import/commit", {
|
|
301
301
|
timeout: u,
|
|
@@ -320,7 +320,7 @@ const C = {
|
|
|
320
320
|
}
|
|
321
321
|
},
|
|
322
322
|
parseAs: "blob"
|
|
323
|
-
}).then((t) =>
|
|
323
|
+
}).then((t) => c(t))
|
|
324
324
|
}, R = {
|
|
325
325
|
/** 全部机构(平铺,按 Sort、Id 排序)。前端 buildTree 拼树。下拉 / 树表复用。 */
|
|
326
326
|
list: () => s.GET("/api/v1/sys/org/list", {}).then((e) => a(e)),
|
|
@@ -331,28 +331,28 @@ const C = {
|
|
|
331
331
|
remove: (e) => s.DELETE("/api/v1/sys/org/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
332
332
|
/** 复制机构子树(整支克隆挂到源节点同级),返回新根 Id。 */
|
|
333
333
|
copy: (e, t) => s.POST("/api/v1/sys/org/{id}/copy", { params: { path: { id: e } }, body: t }).then((i) => a(i))
|
|
334
|
-
},
|
|
334
|
+
}, F = {
|
|
335
335
|
/** 职位分页;搜索键 name → PascalCase Name;sortField/sortOrder → 后端安全排序。下拉(拉大页)/ SmartTable 复用。 */
|
|
336
336
|
page: (e) => s.GET("/api/v1/sys/position/page", {
|
|
337
337
|
params: {
|
|
338
338
|
query: {
|
|
339
|
-
...
|
|
339
|
+
...d(e),
|
|
340
340
|
Name: e.name,
|
|
341
341
|
SortField: e.sortField,
|
|
342
342
|
SortOrder: e.sortOrder
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
|
-
}).then((t) =>
|
|
345
|
+
}).then((t) => h(t)),
|
|
346
346
|
/** 选择器数据源(全部职位,按排序,只回 id / name):不占职位页权限码。 */
|
|
347
347
|
options: () => s.GET("/api/v1/sys/position/options", {}).then((e) => a(e)),
|
|
348
348
|
add: (e) => s.POST("/api/v1/sys/position/add", { body: e }).then((t) => a(t)),
|
|
349
349
|
update: (e, t) => s.PUT("/api/v1/sys/position/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
350
350
|
remove: (e) => s.DELETE("/api/v1/sys/position/{id}", { params: { path: { id: e } } }).then((t) => a(t))
|
|
351
|
-
},
|
|
351
|
+
}, K = {
|
|
352
352
|
/** 角色分页;搜索键 name → PascalCase Name。列表用 + 用户/授权页拉一大页当下拉源。 */
|
|
353
353
|
page: (e) => s.GET("/api/v1/sys/role/page", {
|
|
354
|
-
params: { query: { ...
|
|
355
|
-
}).then((t) =>
|
|
354
|
+
params: { query: { ...d(e), Name: e.name } }
|
|
355
|
+
}).then((t) => h(t)),
|
|
356
356
|
/** 选择器数据源(仅启用角色,按排序,只回 id / name):不占角色页权限码。 */
|
|
357
357
|
options: () => s.GET("/api/v1/sys/role/options", {}).then((e) => a(e)),
|
|
358
358
|
add: (e) => s.POST("/api/v1/sys/role/add", { body: e }).then((t) => a(t)),
|
|
@@ -382,7 +382,7 @@ const C = {
|
|
|
382
382
|
page: (e) => s.GET("/api/v1/sys/config/page", {
|
|
383
383
|
params: {
|
|
384
384
|
query: {
|
|
385
|
-
...
|
|
385
|
+
...d(e),
|
|
386
386
|
ConfigKey: e.configKey,
|
|
387
387
|
Name: e.name,
|
|
388
388
|
GroupCode: e.groupCode,
|
|
@@ -390,7 +390,7 @@ const C = {
|
|
|
390
390
|
ExcludedKeys: e.excludedKeys
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
}).then((t) =>
|
|
393
|
+
}).then((t) => h(t)),
|
|
394
394
|
add: (e) => s.POST("/api/v1/sys/config", { body: e }).then((t) => a(t)),
|
|
395
395
|
update: (e, t) => s.PUT("/api/v1/sys/config/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
396
396
|
remove: (e) => s.DELETE("/api/v1/sys/config/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -430,7 +430,7 @@ const C = {
|
|
|
430
430
|
(e) => a(e)
|
|
431
431
|
)
|
|
432
432
|
};
|
|
433
|
-
function
|
|
433
|
+
function m(e) {
|
|
434
434
|
const { start: t, end: i } = S(e);
|
|
435
435
|
return { StartTime: t, EndTime: i };
|
|
436
436
|
}
|
|
@@ -439,28 +439,28 @@ const M = {
|
|
|
439
439
|
loginPage: (e) => s.GET("/api/v1/sys/log/login/page", {
|
|
440
440
|
params: {
|
|
441
441
|
query: {
|
|
442
|
-
...
|
|
442
|
+
...d(e),
|
|
443
443
|
Account: e.account,
|
|
444
444
|
Success: e.success,
|
|
445
|
-
...
|
|
445
|
+
...m(e.createTime)
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
}).then((t) =>
|
|
448
|
+
}).then((t) => h(t)),
|
|
449
449
|
/** 清空登录日志(硬删,不可恢复)。 */
|
|
450
450
|
loginClear: () => s.DELETE("/api/v1/sys/log/login", {}).then((e) => a(e)),
|
|
451
451
|
/** 操作日志分页;操作名模糊 + 成败 + 操作人(精确)+ 接口路径(模糊)+ 时间范围——审计要能答"谁在什么时候干了什么"。 */
|
|
452
452
|
opPage: (e) => s.GET("/api/v1/sys/log/op/page", {
|
|
453
453
|
params: {
|
|
454
454
|
query: {
|
|
455
|
-
...
|
|
455
|
+
...d(e),
|
|
456
456
|
Title: e.title,
|
|
457
457
|
Success: e.success,
|
|
458
458
|
OperatorId: e.operatorId,
|
|
459
459
|
Path: e.path,
|
|
460
|
-
...
|
|
460
|
+
...m(e.createTime)
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
}).then((t) =>
|
|
463
|
+
}).then((t) => h(t)),
|
|
464
464
|
/** 清空操作日志(硬删,不可恢复)。 */
|
|
465
465
|
opClear: () => s.DELETE("/api/v1/sys/log/op", {}).then((e) => a(e)),
|
|
466
466
|
/**
|
|
@@ -475,23 +475,23 @@ const M = {
|
|
|
475
475
|
Success: e.success,
|
|
476
476
|
OperatorId: e.operatorId,
|
|
477
477
|
Path: e.path,
|
|
478
|
-
...
|
|
478
|
+
...m(e.createTime),
|
|
479
479
|
columns: e.columns
|
|
480
480
|
}
|
|
481
481
|
},
|
|
482
482
|
parseAs: "blob"
|
|
483
|
-
}).then((t) =>
|
|
483
|
+
}).then((t) => c(t)),
|
|
484
484
|
/** 异常日志分页;接口路径模糊 + 异常类型模糊 + 时间范围。 */
|
|
485
485
|
exceptionPage: (e) => s.GET("/api/v1/sys/log/exception/page", {
|
|
486
486
|
params: {
|
|
487
487
|
query: {
|
|
488
|
-
...
|
|
488
|
+
...d(e),
|
|
489
489
|
Path: e.path,
|
|
490
490
|
ExceptionType: e.exceptionType,
|
|
491
|
-
...
|
|
491
|
+
...m(e.createTime)
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
}).then((t) =>
|
|
494
|
+
}).then((t) => h(t)),
|
|
495
495
|
/** 清空异常日志(硬删,不可恢复)。 */
|
|
496
496
|
exceptionClear: () => s.DELETE("/api/v1/sys/log/exception", {}).then((e) => a(e))
|
|
497
497
|
}, B = {
|
|
@@ -521,8 +521,8 @@ const M = {
|
|
|
521
521
|
}, V = {
|
|
522
522
|
/** 字典类型分页;搜索键 code/name → PascalCase Code/Name 查询参。 */
|
|
523
523
|
typePage: (e) => s.GET("/api/v1/sys/dict/type/page", {
|
|
524
|
-
params: { query: { ...
|
|
525
|
-
}).then((t) =>
|
|
524
|
+
params: { query: { ...d(e), Code: e.code, Name: e.name } }
|
|
525
|
+
}).then((t) => h(t)),
|
|
526
526
|
typeAdd: (e) => s.POST("/api/v1/sys/dict/type", { body: e }).then((t) => a(t)),
|
|
527
527
|
typeUpdate: (e, t) => s.PUT("/api/v1/sys/dict/type/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
528
528
|
typeRemove: (e) => s.DELETE("/api/v1/sys/dict/type/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -540,8 +540,8 @@ const M = {
|
|
|
540
540
|
}, _ = {
|
|
541
541
|
/** 文件分页;搜索键 originalName → 后端 FileName 模糊过滤。 */
|
|
542
542
|
page: (e) => s.GET("/api/v1/sys/file/page", {
|
|
543
|
-
params: { query: { ...
|
|
544
|
-
}).then((t) =>
|
|
543
|
+
params: { query: { ...d(e), FileName: e.originalName } }
|
|
544
|
+
}).then((t) => h(t)),
|
|
545
545
|
/** 上传单个文件:bodySerializer 建 FormData(字段名 file),openapi-fetch 对 FormData 不注入 json header,浏览器自动补 boundary(client.ts 无需改)。 */
|
|
546
546
|
upload: (e) => s.POST("/api/v1/sys/file/upload", {
|
|
547
547
|
timeout: u,
|
|
@@ -558,7 +558,7 @@ const M = {
|
|
|
558
558
|
parseAs: "blob"
|
|
559
559
|
}).then((t) => {
|
|
560
560
|
if (!t.response.ok)
|
|
561
|
-
throw new
|
|
561
|
+
throw new y(t.response.status, void 0, void 0, t.response.statusText);
|
|
562
562
|
return t.data;
|
|
563
563
|
}),
|
|
564
564
|
remove: (e) => s.DELETE("/api/v1/sys/file/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -572,47 +572,134 @@ const M = {
|
|
|
572
572
|
timeout: u,
|
|
573
573
|
body: { uploadId: e, index: t, chunk: i },
|
|
574
574
|
bodySerializer: (o) => {
|
|
575
|
-
const n = o,
|
|
576
|
-
return
|
|
575
|
+
const n = o, r = new FormData();
|
|
576
|
+
return r.append("uploadId", n.uploadId), r.append("index", String(n.index)), r.append("chunk", n.chunk), r;
|
|
577
577
|
}
|
|
578
578
|
}).then((o) => a(o)),
|
|
579
579
|
/** 完成:触发服务端合并 + 哈希校验 + 三道关 + 落库。 */
|
|
580
580
|
chunkComplete: (e) => s.POST("/api/v1/sys/file/chunk/complete", { timeout: u, body: e }).then((t) => a(t))
|
|
581
581
|
}, H = {
|
|
582
|
+
/** 文件服务器分页;keyword 模糊匹配名称或根路径。 */
|
|
583
|
+
page: (e) => s.GET("/api/v1/sys/file-server/page", {
|
|
584
|
+
params: {
|
|
585
|
+
query: { ...d(e), Keyword: e.keyword, Enabled: e.enabled }
|
|
586
|
+
}
|
|
587
|
+
}).then((t) => h(t)),
|
|
588
|
+
get: (e) => s.GET("/api/v1/sys/file-server/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
589
|
+
add: (e) => s.POST("/api/v1/sys/file-server/add", { body: e }).then((t) => a(t)),
|
|
590
|
+
update: (e, t) => s.PUT("/api/v1/sys/file-server/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
591
|
+
remove: (e) => s.DELETE("/api/v1/sys/file-server/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
592
|
+
/** 测试连接:用表单里当前填的值,不要求先保存;失败原因在返回体里,不抛异常。 */
|
|
593
|
+
test: (e) => s.POST("/api/v1/sys/file-server/test", { body: e }).then((t) => a(t)),
|
|
594
|
+
/** 一批文件服务器的在线状态;不缓存,每次现连。 */
|
|
595
|
+
status: (e) => s.GET("/api/v1/sys/file-server/status", { params: { query: { ids: e } } }).then((t) => a(t)),
|
|
596
|
+
/** 下拉选项(配文件路径时选服务器)。 */
|
|
597
|
+
options: () => s.GET("/api/v1/sys/file-server/options", {}).then((e) => a(e))
|
|
598
|
+
}, Q = {
|
|
599
|
+
/** 文件路径分页;keyword 模糊匹配编码或名称。 */
|
|
600
|
+
page: (e) => s.GET("/api/v1/sys/file-path/page", {
|
|
601
|
+
params: {
|
|
602
|
+
query: {
|
|
603
|
+
...d(e),
|
|
604
|
+
Keyword: e.keyword,
|
|
605
|
+
ServerId: e.serverId,
|
|
606
|
+
Enabled: e.enabled
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}).then((t) => h(t)),
|
|
610
|
+
get: (e) => s.GET("/api/v1/sys/file-path/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
611
|
+
add: (e) => s.POST("/api/v1/sys/file-path/add", { body: e }).then((t) => a(t)),
|
|
612
|
+
/** 编码是业务引用它的键,保存后不能改,所以更新入参里没有 code。 */
|
|
613
|
+
update: (e, t) => s.PUT("/api/v1/sys/file-path/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
614
|
+
remove: (e) => s.DELETE("/api/v1/sys/file-path/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
615
|
+
/** 测试连接:用弹窗里当前选的服务器、子文件夹和读写方式,不要求先保存。 */
|
|
616
|
+
test: (e) => s.POST("/api/v1/sys/file-path/test", { body: e }).then((t) => a(t)),
|
|
617
|
+
/** 一批文件路径的在线状态;不缓存,每次现连。 */
|
|
618
|
+
status: (e) => s.GET("/api/v1/sys/file-path/status", { params: { query: { ids: e } } }).then((t) => a(t)),
|
|
619
|
+
/** 配置页的环境信息:白名单根目录,以及当前平台能不能用账号连接共享。 */
|
|
620
|
+
environment: () => s.GET("/api/v1/sys/file-path/environment", {}).then((e) => a(e))
|
|
621
|
+
}, W = {
|
|
622
|
+
/** 单文件上传:返回相对文件夹的路径,业务存它、之后凭它下载。subPath 仅「业务指定路径」命名规则用。 */
|
|
623
|
+
upload: (e, t, i, o) => s.POST("/api/v1/sys/file-path/upload/{code}", {
|
|
624
|
+
timeout: u,
|
|
625
|
+
signal: o,
|
|
626
|
+
params: { path: { code: e } },
|
|
627
|
+
body: { file: t, subPath: i },
|
|
628
|
+
bodySerializer: (n) => {
|
|
629
|
+
const r = n, p = new FormData();
|
|
630
|
+
return p.append("file", r.file), r.subPath && p.append("subPath", r.subPath), p;
|
|
631
|
+
}
|
|
632
|
+
}).then((n) => a(n)),
|
|
633
|
+
/** 分片初始化:服务端按声明的文件名、大小拦规则,通过才建暂存会话,分片大小与片数以它返回的为准。 */
|
|
634
|
+
chunkInit: (e, t, i) => s.POST("/api/v1/sys/file-path/upload/{code}/chunk/init", {
|
|
635
|
+
signal: i,
|
|
636
|
+
params: { path: { code: e } },
|
|
637
|
+
body: { ...t, subPath: t.subPath ?? null }
|
|
638
|
+
}).then((o) => a(o)),
|
|
639
|
+
/** 上传一个分片(multipart:uploadId + index + chunk),同 upload 用 bodySerializer 建 FormData。 */
|
|
640
|
+
chunk: (e, t, i, o, n) => s.POST("/api/v1/sys/file-path/upload/{code}/chunk", {
|
|
641
|
+
timeout: u,
|
|
642
|
+
signal: n,
|
|
643
|
+
params: { path: { code: e } },
|
|
644
|
+
body: { uploadId: t, index: i, chunk: o },
|
|
645
|
+
bodySerializer: (r) => {
|
|
646
|
+
const p = r, l = new FormData();
|
|
647
|
+
return l.append("uploadId", p.uploadId), l.append("index", String(p.index)), l.append("chunk", p.chunk), l;
|
|
648
|
+
}
|
|
649
|
+
}).then((r) => {
|
|
650
|
+
a(r);
|
|
651
|
+
}),
|
|
652
|
+
/** 完成:服务端合并、按实际大小和当前规则再校验、核对哈希后写入。 */
|
|
653
|
+
chunkComplete: (e, t, i) => s.POST("/api/v1/sys/file-path/upload/{code}/chunk/complete", {
|
|
654
|
+
timeout: u,
|
|
655
|
+
signal: i,
|
|
656
|
+
params: { path: { code: e } },
|
|
657
|
+
body: { uploadId: t }
|
|
658
|
+
}).then((o) => a(o)),
|
|
659
|
+
/** 下载:parseAs blob 取原始字节;业务失败服务端回 200 + 信封,unwrapDownload 会辨出来抛 ApiError。 */
|
|
660
|
+
download: (e, t, i) => s.GET("/api/v1/sys/file-path/download/{code}", {
|
|
661
|
+
timeout: u,
|
|
662
|
+
params: { path: { code: e }, query: { path: t, name: i } },
|
|
663
|
+
parseAs: "blob"
|
|
664
|
+
}).then((o) => c(o))
|
|
665
|
+
}, X = {
|
|
582
666
|
/** 在线会话分页(只读)。后端仅支持按 UserId 过滤,这里不带业务搜索。 */
|
|
583
|
-
online: (e) => s.GET("/api/v1/sys/session/online", { params: { query:
|
|
667
|
+
online: (e) => s.GET("/api/v1/sys/session/online", { params: { query: d(e) } }).then((t) => h(t)),
|
|
584
668
|
/** 强制下线:按 sessionId 踢会话。 */
|
|
585
669
|
kick: (e) => s.DELETE("/api/v1/sys/session/{sessionId}", { params: { path: { sessionId: e } } }).then((t) => a(t))
|
|
586
|
-
},
|
|
670
|
+
}, Y = {
|
|
587
671
|
// ── 管理端 ──
|
|
588
672
|
/** 管理端分页(全量);搜索键 title/type → PascalCase 查询参。 */
|
|
589
673
|
page: (e) => s.GET("/api/v1/sys/notice/page", {
|
|
590
|
-
params: { query: { ...
|
|
591
|
-
}).then((t) =>
|
|
674
|
+
params: { query: { ...d(e), Title: e.title, Type: e.type } }
|
|
675
|
+
}).then((t) => h(t)),
|
|
592
676
|
publish: (e) => s.POST("/api/v1/sys/notice", { body: e }).then((t) => a(t)),
|
|
593
677
|
remove: (e) => s.DELETE("/api/v1/sys/notice/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
594
678
|
// ── 用户端(任何登录用户) ──
|
|
595
|
-
/** 我的通知分页(含已读标记);onlyUnread 供"未读"
|
|
679
|
+
/** 我的通知分页(含已读标记);onlyUnread 供"未读"页签用,types 供铃铛页签用。 */
|
|
596
680
|
mine: (e) => s.GET("/api/v1/sys/notice/mine", {
|
|
597
|
-
params: {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
681
|
+
params: {
|
|
682
|
+
query: { ...d(e), OnlyUnread: e.onlyUnread, Types: e.types }
|
|
683
|
+
}
|
|
684
|
+
}).then((t) => h(t)),
|
|
685
|
+
/** 当前用户未读通知数(顶栏角标轮询);带 types 只数这几种类型。 */
|
|
686
|
+
unreadCount: (e) => s.GET("/api/v1/sys/notice/unread-count", { params: { query: { Types: e } } }).then((t) => a(t)),
|
|
601
687
|
markRead: (e) => s.PUT("/api/v1/sys/notice/{id}/read", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
602
|
-
|
|
603
|
-
|
|
688
|
+
/** 全部标为已读;带 types 只标这几种类型。 */
|
|
689
|
+
markAllRead: (e) => s.PUT("/api/v1/sys/notice/read-all", { params: { query: { Types: e } } }).then((t) => a(t))
|
|
690
|
+
}, Z = {
|
|
604
691
|
tree: () => s.GET("/api/v1/sys/menu/tree", {}).then((e) => a(e)),
|
|
605
692
|
/** 可授权路由清单(后端 EndpointDataSource 实时算出,含消费方自建控制器);喂菜单表单「权限码」下拉,免手敲。 */
|
|
606
693
|
routes: () => s.GET("/api/v1/sys/menu/routes", {}).then((e) => a(e)),
|
|
607
694
|
add: (e) => s.POST("/api/v1/sys/menu/add", { body: e }).then((t) => a(t)),
|
|
608
695
|
update: (e, t) => s.PUT("/api/v1/sys/menu/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
609
696
|
remove: (e) => s.DELETE("/api/v1/sys/menu/{id}", { params: { path: { id: e } } }).then((t) => a(t))
|
|
610
|
-
},
|
|
697
|
+
}, ee = {
|
|
611
698
|
/** 任务分页;搜索键 name/status/handlerKind → PascalCase 查询参。行含全列,编辑表单直接用行数据。 */
|
|
612
699
|
page: (e) => s.GET("/api/v1/sys/job/page", {
|
|
613
700
|
params: {
|
|
614
701
|
query: {
|
|
615
|
-
...
|
|
702
|
+
...d(e),
|
|
616
703
|
Name: e.name,
|
|
617
704
|
Status: e.status,
|
|
618
705
|
HandlerKind: e.handlerKind,
|
|
@@ -620,7 +707,7 @@ const M = {
|
|
|
620
707
|
SortOrder: e.sortOrder
|
|
621
708
|
}
|
|
622
709
|
}
|
|
623
|
-
}).then((t) =>
|
|
710
|
+
}).then((t) => h(t)),
|
|
624
711
|
add: (e) => s.POST("/api/v1/sys/job", { body: e }).then((t) => a(t)),
|
|
625
712
|
update: (e, t) => s.PUT("/api/v1/sys/job/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
626
713
|
remove: (e) => s.DELETE("/api/v1/sys/job/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -643,7 +730,7 @@ const M = {
|
|
|
643
730
|
return s.GET("/api/v1/sys/job/log/page", {
|
|
644
731
|
params: {
|
|
645
732
|
query: {
|
|
646
|
-
...
|
|
733
|
+
...d(e),
|
|
647
734
|
JobId: e.jobId,
|
|
648
735
|
RunStatus: e.runStatus,
|
|
649
736
|
FireInstanceId: e.fireInstanceId,
|
|
@@ -651,7 +738,7 @@ const M = {
|
|
|
651
738
|
StartTo: (i = e.startRange) != null && i[1] ? `${e.startRange[1]} 23:59:59` : void 0
|
|
652
739
|
}
|
|
653
740
|
}
|
|
654
|
-
}).then((o) =>
|
|
741
|
+
}).then((o) => h(o));
|
|
655
742
|
},
|
|
656
743
|
/** 终止一次执行(跨节点写终止旗标,目标节点最迟 KillPollSeconds 后停)。 */
|
|
657
744
|
kill: (e) => s.POST("/api/v1/sys/job/log/{id}/kill", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -659,23 +746,23 @@ const M = {
|
|
|
659
746
|
logClear: (e) => s.POST("/api/v1/sys/job/log/clear", { body: e }).then((t) => a(t)),
|
|
660
747
|
/** 监控仪表盘(今日成败/在飞/趋势/即将执行/集群节点)。 */
|
|
661
748
|
dashboard: () => s.GET("/api/v1/sys/job/dashboard", {}).then((e) => a(e))
|
|
662
|
-
},
|
|
749
|
+
}, te = {
|
|
663
750
|
page: (e) => (t) => s.GET("/api/v1/sys/recycle/{type}/page", {
|
|
664
|
-
params: { path: { type: e }, query:
|
|
665
|
-
}).then((i) =>
|
|
751
|
+
params: { path: { type: e }, query: d(t) }
|
|
752
|
+
}).then((i) => h(i)),
|
|
666
753
|
restore: (e, t) => s.POST("/api/v1/sys/recycle/{type}/{id}/restore", { params: { path: { type: e, id: t } } }).then((i) => a(i)),
|
|
667
754
|
purge: (e, t) => s.DELETE("/api/v1/sys/recycle/{type}/{id}", { params: { path: { type: e, id: t } } }).then((i) => a(i))
|
|
668
|
-
},
|
|
755
|
+
}, se = {
|
|
669
756
|
/** 厂商分页(含模型清单);搜索键 keyword/enabled → PascalCase 查询参。 */
|
|
670
757
|
page: (e) => s.GET("/api/v1/sys/ai/provider/page", {
|
|
671
758
|
params: {
|
|
672
759
|
query: {
|
|
673
|
-
...
|
|
760
|
+
...d(e),
|
|
674
761
|
Keyword: e.keyword,
|
|
675
762
|
Enabled: e.enabled
|
|
676
763
|
}
|
|
677
764
|
}
|
|
678
|
-
}).then((t) =>
|
|
765
|
+
}).then((t) => h(t)),
|
|
679
766
|
get: (e) => s.GET("/api/v1/sys/ai/provider/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
680
767
|
/** 厂商预置清单(协议/BaseUrl/鉴权方式/起步模型),新增抽屉选预设用。 */
|
|
681
768
|
presets: () => s.GET("/api/v1/sys/ai/provider/presets", {}).then((e) => a(e)),
|
|
@@ -687,7 +774,7 @@ const M = {
|
|
|
687
774
|
remove: (e) => s.DELETE("/api/v1/sys/ai/provider/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
688
775
|
/** 测试连接:用库里当前配置发一条最小对话;失败原因在返回体里,不抛异常。 */
|
|
689
776
|
test: (e) => s.POST("/api/v1/sys/ai/provider/{id}/test", { params: { path: { id: e } } }).then((t) => a(t))
|
|
690
|
-
},
|
|
777
|
+
}, ae = {
|
|
691
778
|
/** 区间总计 + 按维度分组聚合(groupBy 切换四个 Tab 共用这一个接口)。 */
|
|
692
779
|
summary: (e) => s.GET("/api/v1/sys/ai/usage/summary", {
|
|
693
780
|
params: {
|
|
@@ -719,7 +806,7 @@ const M = {
|
|
|
719
806
|
page: (e) => s.GET("/api/v1/sys/ai/usage/page", {
|
|
720
807
|
params: {
|
|
721
808
|
query: {
|
|
722
|
-
...
|
|
809
|
+
...d(e),
|
|
723
810
|
From: e.from,
|
|
724
811
|
To: e.to,
|
|
725
812
|
ProviderCode: e.providerCode,
|
|
@@ -729,44 +816,47 @@ const M = {
|
|
|
729
816
|
Success: e.success
|
|
730
817
|
}
|
|
731
818
|
}
|
|
732
|
-
}).then((t) =>
|
|
819
|
+
}).then((t) => h(t))
|
|
733
820
|
};
|
|
734
821
|
export {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
822
|
+
y as ApiError,
|
|
823
|
+
se as aiProviderApi,
|
|
824
|
+
ae as aiUsageApi,
|
|
825
|
+
k as authApi,
|
|
739
826
|
$ as cacheApi,
|
|
740
827
|
U as callApi,
|
|
741
828
|
z as configApi,
|
|
742
|
-
|
|
829
|
+
D as dashboardApi,
|
|
743
830
|
S as dayRange,
|
|
744
831
|
V as dictAdminApi,
|
|
745
832
|
J as dictApi,
|
|
746
|
-
|
|
833
|
+
C as externalAuthApi,
|
|
747
834
|
_ as fileApi,
|
|
748
|
-
|
|
749
|
-
|
|
835
|
+
Q as filePathApi,
|
|
836
|
+
W as filePathFileApi,
|
|
837
|
+
H as fileServerApi,
|
|
838
|
+
I as highSensApi,
|
|
839
|
+
ee as jobApi,
|
|
750
840
|
x as listQuery,
|
|
751
841
|
M as logApi,
|
|
752
|
-
|
|
753
|
-
|
|
842
|
+
Z as menuApi,
|
|
843
|
+
q as mfaApi,
|
|
754
844
|
j as moduleApi,
|
|
755
845
|
B as monitorApi,
|
|
756
846
|
O as normalizeCommit,
|
|
757
847
|
g as normalizePreview,
|
|
758
|
-
|
|
848
|
+
Y as noticeApi,
|
|
759
849
|
R as orgApi,
|
|
760
|
-
|
|
850
|
+
d as pageParams,
|
|
761
851
|
L as personalApi,
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
852
|
+
F as positionApi,
|
|
853
|
+
te as recycleApi,
|
|
854
|
+
K as roleApi,
|
|
855
|
+
X as sessionApi,
|
|
856
|
+
h as toPage,
|
|
767
857
|
T as toWireRows,
|
|
768
858
|
a as unwrap,
|
|
769
|
-
|
|
859
|
+
c as unwrapDownload,
|
|
770
860
|
N as userApi
|
|
771
861
|
};
|
|
772
862
|
//# sourceMappingURL=index.js.map
|