@liujitcn/kratos-admin-core 0.0.65 → 0.0.67

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 (59) hide show
  1. package/dist/package/declarations/src/api/base/v1/login.d.ts +1 -3
  2. package/dist/package/declarations/src/api/base/v1/secret_crypto.d.ts +9 -0
  3. package/dist/package/declarations/src/components/CodeBlock/index.vue.d.ts +15 -0
  4. package/dist/package/declarations/src/components/Dialog/PasswordVerifyDialog.vue.d.ts +3 -7
  5. package/dist/package/declarations/src/components/ProForm/components/ProFormItem.vue.d.ts +6 -6
  6. package/dist/package/declarations/src/components/ProForm/components/SecretInput.vue.d.ts +23 -0
  7. package/dist/package/declarations/src/components/ProForm/interface/index.d.ts +14 -1
  8. package/dist/package/declarations/src/components/YamlEditor/index.vue.d.ts +7 -1
  9. package/dist/package/declarations/src/locales/generated.d.ts +388 -0
  10. package/dist/package/declarations/src/rpc/base/v1/login.d.ts +2 -39
  11. package/dist/package/declarations/src/rpc/base/v1/mfa.d.ts +3 -3
  12. package/dist/package/declarations/src/rpc/base/v1/oauth.d.ts +2 -2
  13. package/dist/package/declarations/src/rpc/base/v1/secret_crypto.d.ts +37 -0
  14. package/dist/package/declarations/src/rpc/common/v1/types.d.ts +4 -4
  15. package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +3 -3
  16. package/dist/package/declarations/src/security.d.ts +1 -1
  17. package/dist/package/declarations/src/utils/secretCrypto.d.ts +19 -0
  18. package/dist/package/declarations/src/views/demo/components/DemoDetailDrawer.vue.d.ts +15 -0
  19. package/dist/package/declarations/src/views/demo/components/DemoFormDialog.vue.d.ts +69 -0
  20. package/dist/package/declarations/src/views/demo/demo-data.d.ts +145 -0
  21. package/dist/package/declarations/src/views/demo/table/index.vue.d.ts +3 -0
  22. package/dist/package/declarations/src/views/demo/tree-grid/index.vue.d.ts +3 -0
  23. package/dist/package/declarations/src/views/demo/tree-table/index.vue.d.ts +3 -0
  24. package/dist/package/src/api/base/v1/login.ts +0 -12
  25. package/dist/package/src/api/base/v1/secret_crypto.ts +35 -0
  26. package/dist/package/src/components/CodeBlock/index.vue +156 -0
  27. package/dist/package/src/components/Dialog/PasswordVerifyDialog.vue +4 -8
  28. package/dist/package/src/components/ProForm/components/ProFormItem.vue +29 -2
  29. package/dist/package/src/components/ProForm/components/SecretInput.vue +117 -0
  30. package/dist/package/src/components/ProForm/interface/index.ts +16 -0
  31. package/dist/package/src/components/YamlEditor/index.vue +103 -7
  32. package/dist/package/src/locales/README.md +1 -1
  33. package/dist/package/src/locales/en-US.json +98 -1
  34. package/dist/package/src/locales/ja-JP.json +98 -1
  35. package/dist/package/src/locales/zh-CN.json +98 -1
  36. package/dist/package/src/locales/zh-TW.json +98 -1
  37. package/dist/package/src/modules/kratosAdmin.ts +11 -1
  38. package/dist/package/src/rpc/base/v1/login.ts +2 -42
  39. package/dist/package/src/rpc/base/v1/mfa.ts +3 -3
  40. package/dist/package/src/rpc/base/v1/oauth.ts +2 -2
  41. package/dist/package/src/rpc/base/v1/secret_crypto.ts +49 -0
  42. package/dist/package/src/rpc/common/v1/types.ts +4 -4
  43. package/dist/package/src/rpc/system/admin/v1/auth.ts +3 -3
  44. package/dist/package/src/security.ts +1 -1
  45. package/dist/package/src/utils/index.ts +2 -1
  46. package/dist/package/src/utils/request.ts +5 -4
  47. package/dist/package/src/utils/{passwordCrypto.ts → secretCrypto.ts} +112 -50
  48. package/dist/package/src/views/demo/components/DemoDetailDrawer.vue +108 -0
  49. package/dist/package/src/views/demo/components/DemoFormDialog.vue +470 -0
  50. package/dist/package/src/views/demo/demo-data.ts +279 -0
  51. package/dist/package/src/views/demo/table/index.vue +391 -0
  52. package/dist/package/src/views/demo/tree-grid/index.vue +272 -0
  53. package/dist/package/src/views/demo/tree-table/index.vue +346 -0
  54. package/dist/package/src/views/login/components/LoginForm.vue +2 -2
  55. package/dist/package/types/generated/components.d.ts +4 -1
  56. package/package.json +14 -2
  57. package/src/runtime-messages.ts +39 -0
  58. package/types/generated/components.d.ts +4 -1
  59. package/dist/package/declarations/src/utils/passwordCrypto.d.ts +0 -6
@@ -1,22 +1,5 @@
1
- import type { PasswordCrypto } from "../../common/v1/types";
1
+ import type { SecretCrypto } from "../../common/v1/types";
2
2
  import type { Empty } from "../../google/protobuf/empty";
3
- /** 密码加密场景枚举。 */
4
- export declare enum PasswordCryptoScene {
5
- /** PASSWORD_CRYPTO_SCENE_UNSPECIFIED - 未指定密码加密场景。 */
6
- PASSWORD_CRYPTO_SCENE_UNSPECIFIED = 0,
7
- /** PASSWORD_CRYPTO_SCENE_LOGIN - 登录密码加密场景。 */
8
- PASSWORD_CRYPTO_SCENE_LOGIN = 1,
9
- /** PASSWORD_CRYPTO_SCENE_CREATE_BASE_USER - 新增后台用户密码加密场景。 */
10
- PASSWORD_CRYPTO_SCENE_CREATE_BASE_USER = 2,
11
- /** PASSWORD_CRYPTO_SCENE_RESET_BASE_USER_PASSWORD - 重置后台用户密码加密场景。 */
12
- PASSWORD_CRYPTO_SCENE_RESET_BASE_USER_PASSWORD = 3,
13
- /** PASSWORD_CRYPTO_SCENE_UPDATE_USER_PASSWORD - 个人修改密码加密场景。 */
14
- PASSWORD_CRYPTO_SCENE_UPDATE_USER_PASSWORD = 4,
15
- /** PASSWORD_CRYPTO_SCENE_MFA - 多因素认证敏感操作场景。 */
16
- PASSWORD_CRYPTO_SCENE_MFA = 5,
17
- /** PASSWORD_CRYPTO_SCENE_CONFIGURE_PASSWORD_POLICY - 密码策略初始化密码配置场景。 */
18
- PASSWORD_CRYPTO_SCENE_CONFIGURE_PASSWORD_POLICY = 6
19
- }
20
3
  /**
21
4
  * LoginStatus 表示登录请求当前所处的认证阶段。
22
5
  * 只有 AUTHENTICATED 或 PASSWORD_CHANGE_REQUIRED 才会携带正式访问令牌,MFA 状态必须继续完成挑战。
@@ -38,11 +21,6 @@ export interface CaptchaRequest {
38
21
  /** 验证码类型,random 表示随机选择当前支持的验证码类型 */
39
22
  type: string;
40
23
  }
41
- /** 密码临时公钥获取条件 */
42
- export interface PasswordPublicKeyRequest {
43
- /** 使用场景 */
44
- scene: PasswordCryptoScene;
45
- }
46
24
  /** 登出请求条件 */
47
25
  export interface LogoutRequest {
48
26
  }
@@ -69,19 +47,6 @@ export interface VerifyCaptchaResponse {
69
47
  /** 有效时间,单位秒 */
70
48
  expires_in: number;
71
49
  }
72
- /** 密码临时公钥响应 */
73
- export interface PasswordPublicKeyResponse {
74
- /** 临时密钥ID */
75
- key_id: string;
76
- /** 临时公钥 */
77
- public_key: string;
78
- /** 加密算法 */
79
- algorithm: string;
80
- /** 随机值 */
81
- nonce: string;
82
- /** 有效时间,单位秒 */
83
- expires_in: number;
84
- }
85
50
  /** 刷新令牌请求参数 */
86
51
  export interface RefreshTokenRequest {
87
52
  /** 更新令牌;未填写时由服务端从HttpOnly Cookie读取。 */
@@ -105,7 +70,7 @@ export interface LoginRequest {
105
70
  /** 用户名,必选项。 */
106
71
  user_name: string;
107
72
  /** 用户的密码,必选项。 */
108
- password: PasswordCrypto | undefined;
73
+ password: SecretCrypto | undefined;
109
74
  /** 验证码 */
110
75
  captcha_code: string;
111
76
  /** 验证码Id */
@@ -142,8 +107,6 @@ export interface LoginService {
142
107
  Captcha(request: CaptchaRequest): Promise<CaptchaResponse>;
143
108
  /** 验证码预校验 */
144
109
  VerifyCaptcha(request: VerifyCaptchaRequest): Promise<VerifyCaptchaResponse>;
145
- /** 获取密码临时公钥 */
146
- PasswordPublicKey(request: PasswordPublicKeyRequest): Promise<PasswordPublicKeyResponse>;
147
110
  /** 登出 */
148
111
  Logout(request: LogoutRequest): Promise<Empty>;
149
112
  /** 刷新认证令牌 */
@@ -1,4 +1,4 @@
1
- import type { PasswordCrypto } from "../../common/v1/types";
1
+ import type { SecretCrypto } from "../../common/v1/types";
2
2
  import type { Empty } from "../../google/protobuf/empty";
3
3
  import type { LoginResponse } from "./login";
4
4
  /** 多因素认证校验请求。 */
@@ -63,7 +63,7 @@ export interface MfaStatusResponse {
63
63
  /** 开始绑定多因素认证请求。 */
64
64
  export interface BeginMfaSetupRequest {
65
65
  /** 当前登录密码 */
66
- password: PasswordCrypto | undefined;
66
+ password: SecretCrypto | undefined;
67
67
  /** 强制绑定场景下的临时票据 */
68
68
  setup_ticket: string;
69
69
  }
@@ -111,7 +111,7 @@ export interface BeginMfaDisableResponse {
111
111
  /** 禁用多因素认证请求。 */
112
112
  export interface DisableMfaRequest {
113
113
  /** 当前登录密码 */
114
- password: PasswordCrypto | undefined;
114
+ password: SecretCrypto | undefined;
115
115
  /** TOTP 动态口令 */
116
116
  code: string;
117
117
  /** WebAuthn 禁用挑战 ID */
@@ -1,4 +1,4 @@
1
- import type { PasswordCrypto } from "../../common/v1/types";
1
+ import type { SecretCrypto } from "../../common/v1/types";
2
2
  import type { Empty } from "../../google/protobuf/empty";
3
3
  import type { LoginStatus } from "./login";
4
4
  /** 个人中心三方账号绑定列表查询条件 */
@@ -59,7 +59,7 @@ export interface BindOauthSessionRequest {
59
59
  /** 用户名 */
60
60
  user_name: string;
61
61
  /** 用户密码 */
62
- password: PasswordCrypto | undefined;
62
+ password: SecretCrypto | undefined;
63
63
  /** 验证码 */
64
64
  captcha_code: string;
65
65
  /** 验证码Id */
@@ -0,0 +1,37 @@
1
+ /** 敏感字段临时公钥获取条件 */
2
+ export interface GetSecretPublicKeyRequest {
3
+ }
4
+ /** 敏感字段临时公钥响应 */
5
+ export interface GetSecretPublicKeyResponse {
6
+ /** 临时密钥ID */
7
+ key_id: string;
8
+ /** 临时公钥 */
9
+ public_key: string;
10
+ /** 加密算法 */
11
+ algorithm: string;
12
+ /** 随机值 */
13
+ nonce: string;
14
+ /** 有效时间,单位秒 */
15
+ expires_in: number;
16
+ }
17
+ /** 密钥字段查看条件 */
18
+ export interface RevealSecretFieldRequest {
19
+ /** 资源标识,如 ai_provider、base_oauth_provider、base_message_provider */
20
+ resource: string;
21
+ /** 记录ID */
22
+ id: number;
23
+ /** 字段名,如 api_key、client_secret */
24
+ field: string;
25
+ }
26
+ /** 密钥字段查看响应 */
27
+ export interface RevealSecretFieldResponse {
28
+ /** 密钥明文 */
29
+ text: string;
30
+ }
31
+ /** 敏感字段加密公共服务 */
32
+ export interface SecretCryptoService {
33
+ /** 获取敏感字段临时公钥,同一次提交的多个密文字段共用该公钥 */
34
+ GetSecretPublicKey(request: GetSecretPublicKeyRequest): Promise<GetSecretPublicKeyResponse>;
35
+ /** 查看密钥字段明文,仅允许查询注册过的密钥字段 */
36
+ RevealSecretField(request: RevealSecretFieldRequest): Promise<RevealSecretFieldResponse>;
37
+ }
@@ -43,8 +43,8 @@ export interface BytesValues {
43
43
  /** 值列表。 */
44
44
  value: Uint8Array[];
45
45
  }
46
- /** 密码密文。 */
47
- export interface PasswordCrypto {
46
+ /** 敏感字段密文,密码与各类密钥字段统一使用。 */
47
+ export interface SecretCrypto {
48
48
  /** 临时密钥ID */
49
49
  key_id: string;
50
50
  /** 随机值 */
@@ -55,6 +55,6 @@ export interface PasswordCrypto {
55
55
  encrypted_key: string;
56
56
  /** 初始化向量 */
57
57
  iv: string;
58
- /** 密码加密数据 */
59
- ciphertext: string;
58
+ /** 传输时为密文,服务端解密后回填明文 */
59
+ text: string;
60
60
  }
@@ -1,4 +1,4 @@
1
- import type { PasswordCrypto, StringValues } from "../../../common/v1/types";
1
+ import type { SecretCrypto, StringValues } from "../../../common/v1/types";
2
2
  import type { Empty } from "../../../google/protobuf/empty";
3
3
  import type { BaseUserIDType } from "../../common/v1/common";
4
4
  import type { BaseMenuType } from "./common";
@@ -151,9 +151,9 @@ export interface RouteParams {
151
151
  /** 用户密码表单 */
152
152
  export interface UserPasswordForm {
153
153
  /** 原密码 */
154
- old_pwd: PasswordCrypto | undefined;
154
+ old_pwd: SecretCrypto | undefined;
155
155
  /** 新密码 */
156
- new_pwd: PasswordCrypto | undefined;
156
+ new_pwd: SecretCrypto | undefined;
157
157
  }
158
158
  /** 用户手机号表单 */
159
159
  export interface UserPhoneForm {
@@ -1,5 +1,5 @@
1
1
  export * from "./utils/oauthProvider";
2
- export * from "./utils/passwordCrypto";
2
+ export * from "./utils/secretCrypto";
3
3
  export * from "./utils/passwordStrength";
4
4
  export * from "./utils/webauthn";
5
5
  export * from "./utils/clipboard";
@@ -0,0 +1,19 @@
1
+ import type { GetSecretPublicKeyResponse } from "../rpc/base/v1/secret_crypto";
2
+ import type { SecretCrypto } from "../rpc/common/v1/types";
3
+ import type { ProFormField } from "../components/ProForm/interface";
4
+ /** 获取敏感字段一次性临时公钥,同一次提交的多个密文字段共用该公钥。 */
5
+ export declare function fetchSecretPublicKey(): Promise<GetSecretPublicKeyResponse>;
6
+ /** encodeSecretFields 在提交前把声明 secret 的字段统一加密为 SecretCrypto,返回模型浅克隆且不改动原表单。 */
7
+ export declare function encodeSecretFields(fields: ProFormField[], model: Record<string, any>): Promise<Record<string, any>>;
8
+ /** 使用已获取的临时公钥加密单个敏感值,供一次取钥加密多个字段的场景复用。 */
9
+ export declare function encryptWithPublicKey(publicKey: GetSecretPublicKeyResponse, value: string): Promise<SecretCrypto>;
10
+ /** 加密单个敏感字段值,自动获取一次性临时公钥。 */
11
+ export declare function encryptSecret(value: string): Promise<SecretCrypto>;
12
+ /** SecretRevealHandler 按资源标识与字段名查看密钥明文的实现。 */
13
+ export type SecretRevealHandler = (resource: string, id: number, field: string) => Promise<string>;
14
+ /** registerSecretRevealHandler 注册密钥明文查看实现,由业务模块在启动时注入。 */
15
+ export declare function registerSecretRevealHandler(handler: SecretRevealHandler): void;
16
+ /** revealSecret 查看注册过的密钥字段明文。 */
17
+ export declare function revealSecret(resource: string, id: number, field: string): Promise<string>;
18
+ /** 加密密码字段:去除首尾空白且不允许为空。 */
19
+ export declare function encryptPassword(value: string): Promise<SecretCrypto>;
@@ -0,0 +1,15 @@
1
+ import type { DemoDetailModel } from "../demo-data";
2
+ /** 组件入参:modelValue 控制显隐,detail 为页面组装好的详情模型。 */
3
+ type __VLS_Props = {
4
+ /** 抽屉显隐,v-model 双向绑定。 */
5
+ modelValue: boolean;
6
+ /** 详情模型,为空时抽屉仅显示标题占位。 */
7
+ detail: DemoDetailModel | null;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ "update:modelValue": (value: boolean) => any;
11
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
13
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,69 @@
1
+ /** 表单数据模型:字段名与 formFields 的 prop 一一对应。 */
2
+ declare const formData: {
3
+ name: string;
4
+ password: string;
5
+ intro: string;
6
+ count: number;
7
+ color: string;
8
+ enabled: boolean;
9
+ agreed: boolean;
10
+ invite_code: string;
11
+ mode: string;
12
+ level: string;
13
+ tenant_id: number | undefined;
14
+ gender: number;
15
+ visibility: string;
16
+ hobbies: string[];
17
+ dept_id: number | undefined;
18
+ birthday: string;
19
+ range: string[];
20
+ cron: string;
21
+ members: number[];
22
+ avatar: string;
23
+ gallery: never[];
24
+ attachment: {
25
+ name: string;
26
+ size?: number | undefined;
27
+ url?: string | undefined;
28
+ raw?: {
29
+ uid: number;
30
+ isDirectory?: boolean | undefined;
31
+ readonly lastModified: number;
32
+ readonly name: string;
33
+ readonly webkitRelativePath: string;
34
+ readonly size: number;
35
+ readonly type: string;
36
+ arrayBuffer: () => Promise<ArrayBuffer>;
37
+ bytes: () => Promise<Uint8Array<ArrayBuffer>>;
38
+ slice: (start?: number, end?: number, contentType?: string) => Blob;
39
+ stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
40
+ text: () => Promise<string>;
41
+ } | undefined;
42
+ response?: unknown;
43
+ percentage?: number | undefined;
44
+ uid?: number | undefined;
45
+ status?: import("element-plus").UploadStatus | undefined;
46
+ } | undefined;
47
+ attachments: never[];
48
+ content: string;
49
+ config: string;
50
+ aliases: string[];
51
+ properties: {
52
+ key: string;
53
+ value: string;
54
+ }[];
55
+ };
56
+ /**
57
+ * 打开弹窗:支持传入初始值(编辑回填演示)。
58
+ * 真实项目中可在 open 的 load 回调里请求详情接口后再回填。
59
+ */
60
+ declare function open(initial?: Partial<typeof formData>): void;
61
+ declare const __VLS_export: import("vue").DefineComponent<{}, {
62
+ open: typeof open;
63
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
64
+ submit: (data: Record<string, any>) => any;
65
+ }, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
66
+ onSubmit?: ((data: Record<string, any>) => any) | undefined;
67
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
68
+ declare const _default: typeof __VLS_export;
69
+ export default _default;
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Demo 演示模块共享的静态 mock 数据与类型。
3
+ *
4
+ * 约定:
5
+ * - 全部数据纯前端静态维护,不调用任何后端接口;真实项目中对应字段来自 RPC 返回结构。
6
+ * - 记录内容本身是"业务数据",与表格列头等 UI 文案不同,不进入语言包(与真实项目一致)。
7
+ * - avatar 使用内联 SVG data URL,避免依赖外网图片服务,离线环境也能渲染图片列。
8
+ */
9
+ /** Demo 通用状态值:与 base.v1 Status 枚举保持一致(1 启用 / 2 禁用),core 不反向依赖业务 RPC。 */
10
+ export declare const STATUS_ENABLE = 1;
11
+ /** 禁用状态值。 */
12
+ export declare const STATUS_DISABLE = 2;
13
+ /** Demo 员工记录,左树右表页面的行数据结构。 */
14
+ export interface DemoEmployee {
15
+ /** 员工ID。 */
16
+ id: number;
17
+ /** 姓名列表格首列。 */
18
+ name: string;
19
+ /** 所属部门ID,关联左侧部门树的 id。 */
20
+ dept_id: number;
21
+ /** 邮箱,演示普通文本列。 */
22
+ email: string;
23
+ /** 手机号。 */
24
+ phone: string;
25
+ /** 头像,演示 cellType: "image" 图片列。 */
26
+ avatar: string;
27
+ /** 薪资(单位:分),演示 cellType: "money" 金额列,金额列按分换算展示。 */
28
+ salary: number;
29
+ /** 状态,1 启用 / 0 停用,演示 cellType: "status" 状态开关列。 */
30
+ status: number;
31
+ /** 入职日期,演示日期区间搜索。 */
32
+ entry_date: string;
33
+ }
34
+ /** Demo 项目记录,纯表格页面的行数据结构。 */
35
+ export interface DemoProject {
36
+ /** 项目ID。 */
37
+ id: number;
38
+ /** 项目名称,演示 input 搜索 + tag 标签列。 */
39
+ name: string;
40
+ /** 项目等级,演示 tag: true + enum tagType 标签列。 */
41
+ level: string;
42
+ /** 负责人。 */
43
+ owner: string;
44
+ /** 状态,1 启用 / 0 停用。 */
45
+ status: number;
46
+ /** 预算金额(单位:分),演示 cellType: "money" 金额列,金额列按分换算展示。 */
47
+ budget: number;
48
+ /** 任务总数,放在多级表头“任务情况”下。 */
49
+ task_total: number;
50
+ /** 完成进度(0-100),演示 render 自定义渲染进度条列。 */
51
+ progress: number;
52
+ /** 所属城市(演示级联选择搜索),格式:省份/城市。 */
53
+ region: string[];
54
+ /** 创建时间,演示日期区间搜索。 */
55
+ created_at: string;
56
+ }
57
+ /** Demo 目录节点,树形表格页面的行数据结构(children 内嵌子级行)。 */
58
+ export interface DemoCatalog {
59
+ /** 节点ID。 */
60
+ id: number;
61
+ /** 目录名称,作为树形展开列。 */
62
+ name: string;
63
+ /** 编码。 */
64
+ code: string;
65
+ /** 负责人。 */
66
+ owner: string;
67
+ /** 状态,1 启用 / 0 停用。 */
68
+ status: number;
69
+ /** 文档数量。 */
70
+ doc_count: number;
71
+ /** 子级目录,树形表格通过 tree-props.children 识别。 */
72
+ children?: DemoCatalog[];
73
+ }
74
+ /** 部门树节点,左侧 TreeFilter 静态数据结构。 */
75
+ export interface DemoDeptNode {
76
+ /** 部门ID,字符串形式以匹配 TreeFilter 默认选中逻辑。 */
77
+ id: string;
78
+ /** 部门名称。 */
79
+ name: string;
80
+ /** 部门人数,展示在树节点右侧。 */
81
+ count: number;
82
+ /** 子部门。 */
83
+ children?: DemoDeptNode[];
84
+ }
85
+ /** 详情抽屉单条字段:label 走 t() 文案,value 为记录内容。 */
86
+ export interface DemoDetailField {
87
+ /** 字段中文名。 */
88
+ label: string;
89
+ /** 字段值。 */
90
+ value: string;
91
+ /** 是否用 el-tag 展示。 */
92
+ tag?: boolean;
93
+ /** el-tag 展示类型(success/info/warning/danger)。 */
94
+ tagType?: "success" | "info" | "warning" | "danger";
95
+ }
96
+ /** 详情抽屉信息分组,一组对应一个 el-descriptions 区块。 */
97
+ export interface DemoDetailSection {
98
+ /** 分组标题。 */
99
+ title: string;
100
+ /** 分组内字段。 */
101
+ fields: DemoDetailField[];
102
+ }
103
+ /** 详情抽屉入参模型,由各页面从行数据组装。 */
104
+ export interface DemoDetailModel {
105
+ /** 抽屉标题。 */
106
+ title: string;
107
+ /** 基本信息分组。 */
108
+ sections: DemoDetailSection[];
109
+ /** 流程步骤,演示 el-steps。 */
110
+ steps: {
111
+ title: string;
112
+ description: string;
113
+ }[];
114
+ /** 操作时间线,演示 el-timeline。 */
115
+ timeline: {
116
+ title: string;
117
+ timestamp: string;
118
+ type: "primary" | "success" | "warning" | "danger" | "info";
119
+ }[];
120
+ /** 原始数据,演示 JSON 预览。 */
121
+ raw: Record<string, unknown>;
122
+ }
123
+ /** 左侧部门树静态数据:三层结构演示树的展开、搜索与联动。 */
124
+ export declare const demoDeptTree: DemoDeptNode[];
125
+ /** 员工静态数据:覆盖图片列、金额列、状态列与部门树联动过滤演示。 */
126
+ export declare const demoEmployees: DemoEmployee[];
127
+ /** 项目等级枚举选项:同时用于标签列展示与搜索下拉、表单单选。 */
128
+ export declare const demoLevelOptions: {
129
+ label: string;
130
+ value: string;
131
+ tagType: string;
132
+ }[];
133
+ /** 城市级联静态数据:演示搜索区 cascader 与 tree-select 控件。 */
134
+ export declare const demoRegionTree: {
135
+ value: string;
136
+ label: string;
137
+ children: {
138
+ value: string;
139
+ label: string;
140
+ }[];
141
+ }[];
142
+ /** 项目静态数据:25 条覆盖分页、多级表头、进度条、标签列等展示场景。 */
143
+ export declare const demoProjects: DemoProject[];
144
+ /** 目录树静态数据:三层嵌套演示树形表格的展开、折叠与子级操作。 */
145
+ export declare const demoCatalogTree: DemoCatalog[];
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -5,8 +5,6 @@ import type {
5
5
  LogoutRequest,
6
6
  LoginRequest,
7
7
  LoginResponse,
8
- PasswordPublicKeyRequest,
9
- PasswordPublicKeyResponse,
10
8
  RefreshTokenRequest,
11
9
  RefreshTokenResponse,
12
10
  VerifyCaptchaRequest,
@@ -17,7 +15,6 @@ import type { Empty } from "../../../rpc/google/protobuf/empty";
17
15
 
18
16
  const CAPTCHA_URL = "/v1/base/captcha";
19
17
  const CAPTCHA_VERIFY_URL = "/v1/base/captcha/verify";
20
- const PASSWORD_PUBLIC_KEY_URL = "/v1/base/password-public-key";
21
18
  const SESSION_URL = "/v1/base/session";
22
19
  const TOKEN_URL = "/v1/base/token";
23
20
 
@@ -41,15 +38,6 @@ export class LoginServiceImpl implements LoginService {
41
38
  headers: { Authorization: "no-auth" }
42
39
  });
43
40
  }
44
- /** 获取密码临时公钥 */
45
- PasswordPublicKey(request: PasswordPublicKeyRequest): Promise<PasswordPublicKeyResponse> {
46
- return service<PasswordPublicKeyRequest, PasswordPublicKeyResponse>({
47
- url: `${PASSWORD_PUBLIC_KEY_URL}`,
48
- method: "get",
49
- params: request,
50
- headers: { Authorization: "no-auth" }
51
- });
52
- }
53
41
  /** 登录 */
54
42
  Login(request: LoginRequest): Promise<LoginResponse> {
55
43
  return service<LoginRequest, LoginResponse>({
@@ -0,0 +1,35 @@
1
+ import service from "../../../utils/request";
2
+ import type {
3
+ GetSecretPublicKeyRequest,
4
+ GetSecretPublicKeyResponse,
5
+ RevealSecretFieldRequest,
6
+ RevealSecretFieldResponse,
7
+ SecretCryptoService
8
+ } from "../../../rpc/base/v1/secret_crypto";
9
+
10
+ const SECRET_PUBLIC_KEY_URL = "/v1/base/secret-public-key";
11
+ const SECRET_FIELD_REVEAL_URL = "/v1/base/secret-field/reveal";
12
+
13
+ /** 敏感字段加密公共服务 */
14
+ export class SecretCryptoServiceImpl implements SecretCryptoService {
15
+ /** 获取敏感字段临时公钥 */
16
+ GetSecretPublicKey(request: GetSecretPublicKeyRequest): Promise<GetSecretPublicKeyResponse> {
17
+ return service<GetSecretPublicKeyRequest, GetSecretPublicKeyResponse>({
18
+ url: `${SECRET_PUBLIC_KEY_URL}`,
19
+ method: "get",
20
+ params: request,
21
+ headers: { Authorization: "no-auth" }
22
+ });
23
+ }
24
+
25
+ /** 查看密钥字段明文 */
26
+ RevealSecretField(request: RevealSecretFieldRequest): Promise<RevealSecretFieldResponse> {
27
+ return service<RevealSecretFieldRequest, RevealSecretFieldResponse>({
28
+ url: `${SECRET_FIELD_REVEAL_URL}`,
29
+ method: "post",
30
+ data: request
31
+ });
32
+ }
33
+ }
34
+
35
+ export const defSecretCryptoService = new SecretCryptoServiceImpl();