smart-admin-web 10.23.1 → 10.25.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 +20 -1
- package/dist/api/index.js +23 -8
- package/dist/api/index.js.map +1 -1
- package/dist/api/schema.d.ts +321 -2
- 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/createSmartAdmin.d.ts +2 -0
- package/dist/createSmartAdmin.js +41 -39
- package/dist/createSmartAdmin.js.map +1 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/locales/en-US.d.ts +3 -2
- package/dist/locales/en-US.js +5 -3
- package/dist/locales/en-US.js.map +1 -1
- package/dist/locales/zh-CN.d.ts +3 -2
- package/dist/locales/zh-CN.js +5 -3
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/naive-theme.js +152 -136
- package/dist/theme/naive-theme.js.map +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 +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, 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, 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>;
|
package/dist/api/index.js
CHANGED
|
@@ -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)),
|
|
@@ -724,7 +739,7 @@ export {
|
|
|
724
739
|
$ as cacheApi,
|
|
725
740
|
U as callApi,
|
|
726
741
|
z as configApi,
|
|
727
|
-
|
|
742
|
+
k as dashboardApi,
|
|
728
743
|
S as dayRange,
|
|
729
744
|
V as dictAdminApi,
|
|
730
745
|
J as dictApi,
|
|
@@ -743,10 +758,10 @@ export {
|
|
|
743
758
|
Q as noticeApi,
|
|
744
759
|
R as orgApi,
|
|
745
760
|
r as pageParams,
|
|
746
|
-
|
|
747
|
-
|
|
761
|
+
L as personalApi,
|
|
762
|
+
K as positionApi,
|
|
748
763
|
Y as recycleApi,
|
|
749
|
-
|
|
764
|
+
F as roleApi,
|
|
750
765
|
H as sessionApi,
|
|
751
766
|
p as toPage,
|
|
752
767
|
T as toWireRows,
|