smart-admin-web 10.24.0 → 10.26.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 +26 -5
- package/dist/api/index.js +35 -17
- package/dist/api/index.js.map +1 -1
- package/dist/api/schema.d.ts +333 -6
- package/dist/components/OrgTreeSelect/index.vue.js +32 -20
- package/dist/components/OrgTreeSelect/index.vue.js.map +1 -1
- package/dist/components/RoleSelect/index.vue.js +12 -14
- package/dist/components/RoleSelect/index.vue.js.map +1 -1
- package/dist/components/UserPicker/index.vue.js +2 -2
- package/dist/components/UserPicker/index2.vue.js +179 -208
- package/dist/components/UserPicker/index2.vue.js.map +1 -1
- package/dist/components/UserSelect/index.vue.js +10 -10
- package/dist/components/UserSelect/index.vue.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 +6 -2
- package/dist/locales/en-US.js +8 -3
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/zh-CN.d.ts +6 -2
- package/dist/locales/zh-CN.js +8 -3
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/api.d.ts +22 -0
- package/dist/types/api.js.map +1 -1
- package/dist/views/system/user/index.vue.js +2 -2
- package/dist/views/system/user/index2.vue.js +266 -257
- package/dist/views/system/user/index2.vue.js.map +1 -1
- package/package.json +1 -1
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, UserMenuEffect, UserMenuEffective, UserMenuGrantItem, UserMenuGrantPageItem, UserMenuGrantStatus, UserMenuGrantUpsert, 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, NoticeType, OnlineSessionItem, OrgInput, OrgOption, PermissionRouteItem, PositionInput, PositionOption, RoleInput, RoleOption, 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, UserOption, 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 展示。 */
|
|
@@ -309,6 +309,19 @@ export declare const userApi: {
|
|
|
309
309
|
items: UserItem[];
|
|
310
310
|
total: number;
|
|
311
311
|
}>;
|
|
312
|
+
/**
|
|
313
|
+
* 选择器数据源(仅启用用户,只回 id / 姓名 / 账号):不占用户页权限码,没有「用户-查询」的角色也能选人。
|
|
314
|
+
* keyword 同时匹配姓名与账号;范围同 page。人员选择器一律走它,不走 page。
|
|
315
|
+
*/
|
|
316
|
+
options: (params: {
|
|
317
|
+
page: number;
|
|
318
|
+
pageSize: number;
|
|
319
|
+
keyword?: string;
|
|
320
|
+
orgId?: number;
|
|
321
|
+
}) => Promise<{
|
|
322
|
+
items: UserOption[];
|
|
323
|
+
total: number;
|
|
324
|
+
}>;
|
|
312
325
|
/** 用户详情(含 roleIds,编辑回显 + 提交时原样带回避免清空角色)。 */
|
|
313
326
|
detail: (id: number) => Promise<UserDetail>;
|
|
314
327
|
/** 新增用户;返回新 Id + 实际生效的初始口令(留空 password 时后端随机生成,不接住就没人知道这个号的密码)。 */
|
|
@@ -371,6 +384,8 @@ export declare const userApi: {
|
|
|
371
384
|
export declare const orgApi: {
|
|
372
385
|
/** 全部机构(平铺,按 Sort、Id 排序)。前端 buildTree 拼树。下拉 / 树表复用。 */
|
|
373
386
|
list: () => Promise<SysOrg[]>;
|
|
387
|
+
/** 选择器数据源(平铺 id / parentId / name,范围同 list):不占机构页权限码。机构下拉 / 树选择一律走它,不走 list。 */
|
|
388
|
+
options: () => Promise<OrgOption[]>;
|
|
374
389
|
add: (body: OrgInput) => Promise<number>;
|
|
375
390
|
update: (id: number, body: OrgInput) => Promise<boolean>;
|
|
376
391
|
remove: (id: number) => Promise<boolean>;
|
|
@@ -391,6 +406,8 @@ export declare const positionApi: {
|
|
|
391
406
|
items: SysPosition[];
|
|
392
407
|
total: number;
|
|
393
408
|
}>;
|
|
409
|
+
/** 选择器数据源(全部职位,按排序,只回 id / name):不占职位页权限码。 */
|
|
410
|
+
options: () => Promise<PositionOption[]>;
|
|
394
411
|
add: (body: PositionInput) => Promise<number>;
|
|
395
412
|
update: (id: number, body: PositionInput) => Promise<boolean>;
|
|
396
413
|
remove: (id: number) => Promise<boolean>;
|
|
@@ -405,6 +422,8 @@ export declare const roleApi: {
|
|
|
405
422
|
items: SysRole[];
|
|
406
423
|
total: number;
|
|
407
424
|
}>;
|
|
425
|
+
/** 选择器数据源(仅启用角色,按排序,只回 id / name):不占角色页权限码。 */
|
|
426
|
+
options: () => Promise<RoleOption[]>;
|
|
408
427
|
add: (body: RoleInput) => Promise<number>;
|
|
409
428
|
update: (id: number, body: RoleInput) => Promise<boolean>;
|
|
410
429
|
remove: (id: number) => Promise<boolean>;
|
|
@@ -643,19 +662,21 @@ export declare const noticeApi: {
|
|
|
643
662
|
}>;
|
|
644
663
|
publish: (body: NoticePublishInput) => Promise<number>;
|
|
645
664
|
remove: (id: number) => Promise<boolean>;
|
|
646
|
-
/** 我的通知分页(含已读标记);onlyUnread 供"未读"
|
|
665
|
+
/** 我的通知分页(含已读标记);onlyUnread 供"未读"页签用,types 供铃铛页签用。 */
|
|
647
666
|
mine: (params: {
|
|
648
667
|
page: number;
|
|
649
668
|
pageSize: number;
|
|
650
669
|
onlyUnread?: boolean;
|
|
670
|
+
types?: NoticeType[];
|
|
651
671
|
}) => Promise<{
|
|
652
672
|
items: NoticeMineItem[];
|
|
653
673
|
total: number;
|
|
654
674
|
}>;
|
|
655
|
-
/** 当前用户未读通知数(顶栏角标轮询)
|
|
656
|
-
unreadCount: () => Promise<number>;
|
|
675
|
+
/** 当前用户未读通知数(顶栏角标轮询);带 types 只数这几种类型。 */
|
|
676
|
+
unreadCount: (types?: NoticeType[]) => Promise<number>;
|
|
657
677
|
markRead: (id: number) => Promise<boolean>;
|
|
658
|
-
|
|
678
|
+
/** 全部标为已读;带 types 只标这几种类型。 */
|
|
679
|
+
markAllRead: (types?: NoticeType[]) => Promise<boolean>;
|
|
659
680
|
};
|
|
660
681
|
export declare const menuApi: {
|
|
661
682
|
tree: () => Promise<MenuTreeNode[]>;
|
package/dist/api/index.js
CHANGED
|
@@ -143,12 +143,12 @@ 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))
|
|
@@ -177,10 +177,10 @@ 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
|
+
}, k = {
|
|
181
181
|
/** 工作台首页统计([ActiveSession]:任何登录用户可取,无需权限码)。 */
|
|
182
182
|
summary: () => s.GET("/api/v1/dashboard/summary", {}).then((e) => a(e))
|
|
183
|
-
},
|
|
183
|
+
}, L = {
|
|
184
184
|
modules: () => s.GET("/api/v1/personal/modules", {}).then((e) => a(e)),
|
|
185
185
|
menu: (e) => s.GET("/api/v1/personal/menu", { params: { query: { moduleId: e } } }).then((t) => a(t)),
|
|
186
186
|
setDefaultModule: (e) => s.PUT("/api/v1/personal/default-module", { body: { moduleId: e } }).then((t) => a(t)),
|
|
@@ -224,6 +224,15 @@ const C = {
|
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
}).then((t) => p(t)),
|
|
227
|
+
/**
|
|
228
|
+
* 选择器数据源(仅启用用户,只回 id / 姓名 / 账号):不占用户页权限码,没有「用户-查询」的角色也能选人。
|
|
229
|
+
* keyword 同时匹配姓名与账号;范围同 page。人员选择器一律走它,不走 page。
|
|
230
|
+
*/
|
|
231
|
+
options: (e) => s.GET("/api/v1/sys/user/options", {
|
|
232
|
+
params: {
|
|
233
|
+
query: { ...r(e), Keyword: e.keyword, OrgId: e.orgId }
|
|
234
|
+
}
|
|
235
|
+
}).then((t) => p(t)),
|
|
227
236
|
/** 用户详情(含 roleIds,编辑回显 + 提交时原样带回避免清空角色)。 */
|
|
228
237
|
detail: (e) => s.GET("/api/v1/sys/user/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
229
238
|
/** 新增用户;返回新 Id + 实际生效的初始口令(留空 password 时后端随机生成,不接住就没人知道这个号的密码)。 */
|
|
@@ -315,12 +324,14 @@ const C = {
|
|
|
315
324
|
}, R = {
|
|
316
325
|
/** 全部机构(平铺,按 Sort、Id 排序)。前端 buildTree 拼树。下拉 / 树表复用。 */
|
|
317
326
|
list: () => s.GET("/api/v1/sys/org/list", {}).then((e) => a(e)),
|
|
327
|
+
/** 选择器数据源(平铺 id / parentId / name,范围同 list):不占机构页权限码。机构下拉 / 树选择一律走它,不走 list。 */
|
|
328
|
+
options: () => s.GET("/api/v1/sys/org/options", {}).then((e) => a(e)),
|
|
318
329
|
add: (e) => s.POST("/api/v1/sys/org/add", { body: e }).then((t) => a(t)),
|
|
319
330
|
update: (e, t) => s.PUT("/api/v1/sys/org/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
320
331
|
remove: (e) => s.DELETE("/api/v1/sys/org/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
321
332
|
/** 复制机构子树(整支克隆挂到源节点同级),返回新根 Id。 */
|
|
322
333
|
copy: (e, t) => s.POST("/api/v1/sys/org/{id}/copy", { params: { path: { id: e } }, body: t }).then((i) => a(i))
|
|
323
|
-
},
|
|
334
|
+
}, K = {
|
|
324
335
|
/** 职位分页;搜索键 name → PascalCase Name;sortField/sortOrder → 后端安全排序。下拉(拉大页)/ SmartTable 复用。 */
|
|
325
336
|
page: (e) => s.GET("/api/v1/sys/position/page", {
|
|
326
337
|
params: {
|
|
@@ -332,14 +343,18 @@ const C = {
|
|
|
332
343
|
}
|
|
333
344
|
}
|
|
334
345
|
}).then((t) => p(t)),
|
|
346
|
+
/** 选择器数据源(全部职位,按排序,只回 id / name):不占职位页权限码。 */
|
|
347
|
+
options: () => s.GET("/api/v1/sys/position/options", {}).then((e) => a(e)),
|
|
335
348
|
add: (e) => s.POST("/api/v1/sys/position/add", { body: e }).then((t) => a(t)),
|
|
336
349
|
update: (e, t) => s.PUT("/api/v1/sys/position/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
337
350
|
remove: (e) => s.DELETE("/api/v1/sys/position/{id}", { params: { path: { id: e } } }).then((t) => a(t))
|
|
338
|
-
},
|
|
351
|
+
}, F = {
|
|
339
352
|
/** 角色分页;搜索键 name → PascalCase Name。列表用 + 用户/授权页拉一大页当下拉源。 */
|
|
340
353
|
page: (e) => s.GET("/api/v1/sys/role/page", {
|
|
341
354
|
params: { query: { ...r(e), Name: e.name } }
|
|
342
355
|
}).then((t) => p(t)),
|
|
356
|
+
/** 选择器数据源(仅启用角色,按排序,只回 id / name):不占角色页权限码。 */
|
|
357
|
+
options: () => s.GET("/api/v1/sys/role/options", {}).then((e) => a(e)),
|
|
343
358
|
add: (e) => s.POST("/api/v1/sys/role/add", { body: e }).then((t) => a(t)),
|
|
344
359
|
update: (e, t) => s.PUT("/api/v1/sys/role/{id}", { params: { path: { id: e } }, body: t }).then((i) => a(i)),
|
|
345
360
|
remove: (e) => s.DELETE("/api/v1/sys/role/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
@@ -577,14 +592,17 @@ const M = {
|
|
|
577
592
|
publish: (e) => s.POST("/api/v1/sys/notice", { body: e }).then((t) => a(t)),
|
|
578
593
|
remove: (e) => s.DELETE("/api/v1/sys/notice/{id}", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
579
594
|
// ── 用户端(任何登录用户) ──
|
|
580
|
-
/** 我的通知分页(含已读标记);onlyUnread 供"未读"
|
|
595
|
+
/** 我的通知分页(含已读标记);onlyUnread 供"未读"页签用,types 供铃铛页签用。 */
|
|
581
596
|
mine: (e) => s.GET("/api/v1/sys/notice/mine", {
|
|
582
|
-
params: {
|
|
597
|
+
params: {
|
|
598
|
+
query: { ...r(e), OnlyUnread: e.onlyUnread, Types: e.types }
|
|
599
|
+
}
|
|
583
600
|
}).then((t) => p(t)),
|
|
584
|
-
/** 当前用户未读通知数(顶栏角标轮询)
|
|
585
|
-
unreadCount: () => s.GET("/api/v1/sys/notice/unread-count", {}).then((
|
|
601
|
+
/** 当前用户未读通知数(顶栏角标轮询);带 types 只数这几种类型。 */
|
|
602
|
+
unreadCount: (e) => s.GET("/api/v1/sys/notice/unread-count", { params: { query: { Types: e } } }).then((t) => a(t)),
|
|
586
603
|
markRead: (e) => s.PUT("/api/v1/sys/notice/{id}/read", { params: { path: { id: e } } }).then((t) => a(t)),
|
|
587
|
-
|
|
604
|
+
/** 全部标为已读;带 types 只标这几种类型。 */
|
|
605
|
+
markAllRead: (e) => s.PUT("/api/v1/sys/notice/read-all", { params: { query: { Types: e } } }).then((t) => a(t))
|
|
588
606
|
}, W = {
|
|
589
607
|
tree: () => s.GET("/api/v1/sys/menu/tree", {}).then((e) => a(e)),
|
|
590
608
|
/** 可授权路由清单(后端 EndpointDataSource 实时算出,含消费方自建控制器);喂菜单表单「权限码」下拉,免手敲。 */
|
|
@@ -724,18 +742,18 @@ export {
|
|
|
724
742
|
$ as cacheApi,
|
|
725
743
|
U as callApi,
|
|
726
744
|
z as configApi,
|
|
727
|
-
|
|
745
|
+
k as dashboardApi,
|
|
728
746
|
S as dayRange,
|
|
729
747
|
V as dictAdminApi,
|
|
730
748
|
J as dictApi,
|
|
731
749
|
D as externalAuthApi,
|
|
732
750
|
_ as fileApi,
|
|
733
|
-
|
|
751
|
+
I as highSensApi,
|
|
734
752
|
X as jobApi,
|
|
735
753
|
x as listQuery,
|
|
736
754
|
M as logApi,
|
|
737
755
|
W as menuApi,
|
|
738
|
-
|
|
756
|
+
q as mfaApi,
|
|
739
757
|
j as moduleApi,
|
|
740
758
|
B as monitorApi,
|
|
741
759
|
O as normalizeCommit,
|
|
@@ -743,10 +761,10 @@ export {
|
|
|
743
761
|
Q as noticeApi,
|
|
744
762
|
R as orgApi,
|
|
745
763
|
r as pageParams,
|
|
746
|
-
|
|
747
|
-
|
|
764
|
+
L as personalApi,
|
|
765
|
+
K as positionApi,
|
|
748
766
|
Y as recycleApi,
|
|
749
|
-
|
|
767
|
+
F as roleApi,
|
|
750
768
|
H as sessionApi,
|
|
751
769
|
p as toPage,
|
|
752
770
|
T as toWireRows,
|