@liujitcn/kratos-admin-system 0.0.20 → 0.0.23

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 (118) hide show
  1. package/README.md +51 -50
  2. package/dist/package/declarations/src/api/system/base_language.d.ts +52 -0
  3. package/dist/package/declarations/src/api/system/base_translation.d.ts +10 -0
  4. package/dist/package/declarations/src/api/system/code_gen_i18n.d.ts +8 -0
  5. package/dist/package/declarations/src/api/system/ops_monitoring.d.ts +19 -0
  6. package/dist/package/declarations/src/api/system/ops_monitoring_sse.d.ts +12 -0
  7. package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +16 -0
  8. package/dist/package/declarations/src/components/DynamicTranslationEditor.vue.d.ts +20 -0
  9. package/dist/package/declarations/src/components/dynamicTranslation.d.ts +38 -0
  10. package/dist/package/declarations/src/locales/generated.d.ts +6536 -0
  11. package/dist/package/declarations/src/rpc/base/v1/ai_session.d.ts +12 -2
  12. package/dist/package/declarations/src/rpc/base/v1/ai_tool.d.ts +9 -1
  13. package/dist/package/declarations/src/rpc/base/v1/config.d.ts +35 -0
  14. package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +1 -1
  15. package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +23 -2
  16. package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +9 -0
  17. package/dist/package/declarations/src/rpc/system/admin/v1/base_job.d.ts +9 -1
  18. package/dist/package/declarations/src/rpc/system/admin/v1/base_language.d.ts +119 -0
  19. package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +6 -1
  20. package/dist/package/declarations/src/rpc/system/admin/v1/base_migration.d.ts +6 -6
  21. package/dist/package/declarations/src/rpc/system/admin/v1/base_role.d.ts +13 -1
  22. package/dist/package/declarations/src/rpc/system/admin/v1/base_translation.d.ts +75 -0
  23. package/dist/package/declarations/src/rpc/system/admin/v1/base_user.d.ts +11 -1
  24. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen.d.ts +13 -11
  25. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_column.d.ts +7 -0
  26. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_table.d.ts +24 -1
  27. package/dist/package/declarations/src/rpc/system/admin/v1/common.d.ts +13 -0
  28. package/dist/package/declarations/src/rpc/system/admin/v1/ops_monitoring.d.ts +222 -0
  29. package/dist/package/declarations/src/views/base/language/index.vue.d.ts +3 -0
  30. package/dist/package/declarations/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue.d.ts +23 -0
  31. package/dist/package/declarations/src/views/tool/code-gen/config.d.ts +7 -7
  32. package/dist/package/declarations/src/views/tool/ops-monitoring/index.vue.d.ts +3 -0
  33. package/dist/package/src/api/base/ai_message.ts +7 -12
  34. package/dist/package/src/api/base/sse.ts +3 -1
  35. package/dist/package/src/api/system/base_language.ts +135 -0
  36. package/dist/package/src/api/system/base_translation.ts +33 -0
  37. package/dist/package/src/api/system/code_gen_column.ts +17 -3
  38. package/dist/package/src/api/system/code_gen_i18n.ts +18 -0
  39. package/dist/package/src/api/system/code_gen_table.ts +12 -4
  40. package/dist/package/src/api/system/ops_monitoring.ts +88 -0
  41. package/dist/package/src/api/system/ops_monitoring_sse.ts +49 -0
  42. package/dist/package/src/components/DynamicTranslationCell.vue +249 -0
  43. package/dist/package/src/components/DynamicTranslationEditor.vue +197 -0
  44. package/dist/package/src/components/dynamicTranslation.ts +66 -0
  45. package/dist/package/src/locales/README.md +30 -0
  46. package/dist/package/src/locales/en-US.json +933 -0
  47. package/dist/package/src/locales/es-ES.json +933 -0
  48. package/dist/package/src/locales/fr-FR.json +933 -0
  49. package/dist/package/src/locales/generated.ts +22 -0
  50. package/dist/package/src/locales/ja-JP.json +933 -0
  51. package/dist/package/src/locales/ko-KR.json +933 -0
  52. package/dist/package/src/locales/zh-CN.json +933 -0
  53. package/dist/package/src/locales/zh-TW.json +933 -0
  54. package/dist/package/src/module.ts +6 -2
  55. package/dist/package/src/rpc/base/v1/ai_session.ts +13 -2
  56. package/dist/package/src/rpc/base/v1/ai_tool.ts +10 -1
  57. package/dist/package/src/rpc/base/v1/config.ts +47 -0
  58. package/dist/package/src/rpc/system/admin/v1/auth.ts +1 -1
  59. package/dist/package/src/rpc/system/admin/v1/base_config.ts +24 -2
  60. package/dist/package/src/rpc/system/admin/v1/base_dict.ts +9 -0
  61. package/dist/package/src/rpc/system/admin/v1/base_job.ts +10 -1
  62. package/dist/package/src/rpc/system/admin/v1/base_language.ts +141 -0
  63. package/dist/package/src/rpc/system/admin/v1/base_menu.ts +6 -1
  64. package/dist/package/src/rpc/system/admin/v1/base_migration.ts +8 -8
  65. package/dist/package/src/rpc/system/admin/v1/base_role.ts +14 -1
  66. package/dist/package/src/rpc/system/admin/v1/base_translation.ts +90 -0
  67. package/dist/package/src/rpc/system/admin/v1/base_user.ts +12 -1
  68. package/dist/package/src/rpc/system/admin/v1/code_gen.ts +16 -12
  69. package/dist/package/src/rpc/system/admin/v1/code_gen_column.ts +8 -0
  70. package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +27 -1
  71. package/dist/package/src/rpc/system/admin/v1/common.ts +21 -0
  72. package/dist/package/src/rpc/system/admin/v1/ops_monitoring.ts +255 -0
  73. package/dist/package/src/views/ai/chat/components/AiMarkdown.vue +1 -6
  74. package/dist/package/src/views/ai/chat/components/ChatPanel.vue +75 -58
  75. package/dist/package/src/views/ai/chat/components/SessionPanel.vue +20 -9
  76. package/dist/package/src/views/ai/chat/components/XSender.vue +36 -23
  77. package/dist/package/src/views/ai/chat/index.vue +58 -41
  78. package/dist/package/src/views/ai/chat/message.ts +29 -27
  79. package/dist/package/src/views/base/api/index.vue +121 -84
  80. package/dist/package/src/views/base/area/index.vue +81 -32
  81. package/dist/package/src/views/base/config/index.vue +300 -96
  82. package/dist/package/src/views/base/dept/index.vue +110 -62
  83. package/dist/package/src/views/base/dict/index.vue +145 -62
  84. package/dist/package/src/views/base/dict/item.vue +155 -64
  85. package/dist/package/src/views/base/job/index.vue +134 -82
  86. package/dist/package/src/views/base/job/log.vue +24 -25
  87. package/dist/package/src/views/base/language/index.vue +260 -0
  88. package/dist/package/src/views/base/log/index.vue +68 -46
  89. package/dist/package/src/views/base/menu/index.vue +344 -200
  90. package/dist/package/src/views/base/migration/index.vue +49 -29
  91. package/dist/package/src/views/base/post/index.vue +128 -60
  92. package/dist/package/src/views/base/role/index.vue +145 -79
  93. package/dist/package/src/views/base/tenant/index.vue +132 -64
  94. package/dist/package/src/views/base/user/components/dept-tree.vue +2 -1
  95. package/dist/package/src/views/base/user/index.vue +194 -116
  96. package/dist/package/src/views/profile/components/base.vue +45 -28
  97. package/dist/package/src/views/profile/components/password.vue +45 -30
  98. package/dist/package/src/views/profile/components/security.vue +90 -54
  99. package/dist/package/src/views/profile/index.vue +10 -9
  100. package/dist/package/src/views/tool/api-doc/index.vue +6 -2
  101. package/dist/package/src/views/tool/code-gen/code-preview/index.vue +32 -16
  102. package/dist/package/src/views/tool/code-gen/columns/index.vue +382 -273
  103. package/dist/package/src/views/tool/code-gen/columns/option-copy.ts +1 -6
  104. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +118 -0
  105. package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +65 -36
  106. package/dist/package/src/views/tool/code-gen/components/CodePreviewPane.vue +8 -5
  107. package/dist/package/src/views/tool/code-gen/config.ts +116 -79
  108. package/dist/package/src/views/tool/code-gen/preview/data.ts +19 -17
  109. package/dist/package/src/views/tool/code-gen/preview/index.vue +96 -59
  110. package/dist/package/src/views/tool/code-gen/proto/index.vue +110 -62
  111. package/dist/package/src/views/tool/code-gen/table/index.vue +201 -121
  112. package/dist/package/src/views/tool/ops-monitoring/index.vue +1175 -0
  113. package/dist/package/src/views/tool/project-doc/index.vue +17 -15
  114. package/package.json +6 -2
  115. package/dist/package/declarations/src/rpc/base/v1/enum.d.ts +0 -43
  116. package/dist/package/declarations/src/rpc/system/common/v1/enum.d.ts +0 -67
  117. package/dist/package/src/rpc/base/v1/enum.ts +0 -54
  118. package/dist/package/src/rpc/system/common/v1/enum.ts +0 -80
@@ -3,6 +3,9 @@ import { User } from "@element-plus/icons-vue";
3
3
  import { defineAdminModule } from "@liujitcn/kratos-admin-core";
4
4
  import Ai from "./components/Ai.vue";
5
5
 
6
+ // 语言包由同步脚本生成并注册,供 System 页面、组件和代码生成页面使用。
7
+ import { LOCALE_MESSAGES } from "./locales/generated";
8
+
6
9
  const viewModules = import.meta.glob<{ default: Component }>("./views/**/*.vue");
7
10
 
8
11
  /** System 管理端业务模块。 */
@@ -10,8 +13,9 @@ export const systemAdminModule = defineAdminModule({
10
13
  name: "system",
11
14
  views: viewModules,
12
15
  headerTools: [{ name: "ai", component: Ai }],
13
- userMenuActions: [{ name: "profile", label: "个人中心", menuName: "Profile", icon: User }],
16
+ userMenuActions: [{ name: "profile", labelKey: "system.profile.title", menuName: "Profile", icon: User }],
14
17
  routeOptions: {
15
18
  Profile: { reuseTabAcrossQuery: true }
16
- }
19
+ },
20
+ messages: LOCALE_MESSAGES
17
21
  });
@@ -6,8 +6,19 @@
6
6
 
7
7
  /* eslint-disable */
8
8
  import type { Timestamp } from "../../google/protobuf/timestamp";
9
- import type { AiToolCall } from "./ai_tool";
10
- import type { AiMessageStatus, Terminal } from "./enum";
9
+ import type { AiToolCall, Terminal } from "./ai_tool";
10
+
11
+ /** AI 助手消息状态。 */
12
+ export enum AiMessageStatus {
13
+ /** AI_MESSAGE_STATUS_UNSPECIFIED - 未指定 AI 助手消息状态。 */
14
+ AI_MESSAGE_STATUS_UNSPECIFIED = 0,
15
+ /** AI_MESSAGE_STATUS_GENERATING - 生成中。 */
16
+ AI_MESSAGE_STATUS_GENERATING = 1,
17
+ /** AI_MESSAGE_STATUS_SUCCESS - 成功。 */
18
+ AI_MESSAGE_STATUS_SUCCESS = 2,
19
+ /** AI_MESSAGE_STATUS_FAILED - 失败。 */
20
+ AI_MESSAGE_STATUS_FAILED = 3,
21
+ }
11
22
 
12
23
  /** AI 助手消息列表查询条件 */
13
24
  export interface ListAiMessageRequest {
@@ -5,7 +5,16 @@
5
5
  // source: base/v1/ai_tool.proto
6
6
 
7
7
  /* eslint-disable */
8
- import type { Terminal } from "./enum";
8
+
9
+ /** 终端类型。 */
10
+ export enum Terminal {
11
+ /** TERMINAL_UNSPECIFIED - 未指定终端类型。 */
12
+ TERMINAL_UNSPECIFIED = 0,
13
+ /** TERMINAL_APP - 移动端。 */
14
+ TERMINAL_APP = 1,
15
+ /** TERMINAL_ADMIN - 管理端。 */
16
+ TERMINAL_ADMIN = 2,
17
+ }
9
18
 
10
19
  /** AI 助手快捷入口列表查询条件 */
11
20
  export interface ListAiShortcutRequest {
@@ -0,0 +1,47 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc unknown
5
+ // source: base/v1/config.proto
6
+
7
+ /* eslint-disable */
8
+
9
+ /** 系统配置位置。 */
10
+ export enum BaseConfigSite {
11
+ /** BASE_CONFIG_SITE_UNSPECIFIED - 未指定系统配置位置。 */
12
+ BASE_CONFIG_SITE_UNSPECIFIED = 0,
13
+ /** BASE_CONFIG_SITE_SYSTEM - 系统内使用。 */
14
+ BASE_CONFIG_SITE_SYSTEM = 1,
15
+ /** BASE_CONFIG_SITE_ADMIN - 管理端。 */
16
+ BASE_CONFIG_SITE_ADMIN = 2,
17
+ /** BASE_CONFIG_SITE_APP - 移动端。 */
18
+ BASE_CONFIG_SITE_APP = 3,
19
+ }
20
+
21
+ /** 获取系统配置条件 */
22
+ export interface GetConfigRequest {
23
+ /** 位置:枚举【BaseConfigSite】 */
24
+ site: BaseConfigSite;
25
+ }
26
+
27
+ /** 系统配置项 */
28
+ export interface ConfigItem {
29
+ /** 配置ID */
30
+ id: number;
31
+ /** 配置key */
32
+ key: string;
33
+ /** 配置value */
34
+ value: string;
35
+ }
36
+
37
+ /** 系统配置查询结果 */
38
+ export interface GetConfigResponse {
39
+ /** 系统配置列表 */
40
+ configs: ConfigItem[];
41
+ }
42
+
43
+ /** Base系统配置公共服务 */
44
+ export interface ConfigService {
45
+ /** 获取系统配置 */
46
+ GetConfig(request: GetConfigRequest): Promise<GetConfigResponse>;
47
+ }
@@ -7,7 +7,7 @@
7
7
  /* eslint-disable */
8
8
  import type { PasswordCrypto, StringValues } from "../../../common/v1/types";
9
9
  import type { Empty } from "../../../google/protobuf/empty";
10
- import type { BaseMenuType } from "../../common/v1/enum";
10
+ import type { BaseMenuType } from "./common";
11
11
 
12
12
  /** 登录用户菜单树查询参数 */
13
13
  export interface TreeUserMenuRequest {
@@ -5,10 +5,26 @@
5
5
  // source: system/admin/v1/base_config.proto
6
6
 
7
7
  /* eslint-disable */
8
- import type { BaseConfigSite } from "../../../base/v1/enum";
8
+ import type { BaseConfigSite } from "../../../base/v1/config";
9
9
  import type { Status } from "../../../common/v1/enum";
10
10
  import type { Empty } from "../../../google/protobuf/empty";
11
- import type { BaseConfigType } from "../../common/v1/enum";
11
+ import type { BaseTranslation } from "./base_translation";
12
+
13
+ /** 系统配置类型。 */
14
+ export enum BaseConfigType {
15
+ /** BASE_CONFIG_TYPE_UNSPECIFIED - 未指定系统配置类型。 */
16
+ BASE_CONFIG_TYPE_UNSPECIFIED = 0,
17
+ /** BASE_CONFIG_TYPE_TEXT - 文本。 */
18
+ BASE_CONFIG_TYPE_TEXT = 1,
19
+ /** BASE_CONFIG_TYPE_IMAGE - 图片。 */
20
+ BASE_CONFIG_TYPE_IMAGE = 2,
21
+ /** BASE_CONFIG_TYPE_RICH_TEXT - 富文本。 */
22
+ BASE_CONFIG_TYPE_RICH_TEXT = 3,
23
+ /** BASE_CONFIG_TYPE_DICT - 字典。 */
24
+ BASE_CONFIG_TYPE_DICT = 4,
25
+ /** BASE_CONFIG_TYPE_BOOLEAN - 布尔。 */
26
+ BASE_CONFIG_TYPE_BOOLEAN = 5,
27
+ }
12
28
 
13
29
  /** 系统配置分页查询条件 */
14
30
  export interface PageBaseConfigRequest {
@@ -66,6 +82,10 @@ export interface BaseConfigForm {
66
82
  key: string;
67
83
  /** 配置value */
68
84
  value: string;
85
+ /** 配置名称多语言翻 */
86
+ name_translations: BaseTranslation[];
87
+ /** 配置value文本/富文本配置值的多语言翻译 */
88
+ value_translations: BaseTranslation[];
69
89
  /** 状态 */
70
90
  status: Status;
71
91
  }
@@ -120,6 +140,8 @@ export interface BaseConfig {
120
140
  created_at: string;
121
141
  /** 更新时间 */
122
142
  updated_at: string;
143
+ /** 配置名称及文本/富文本配置值的多语言翻译 */
144
+ translations: BaseTranslation[];
123
145
  }
124
146
 
125
147
  /** Admin系统配置服务 */
@@ -7,6 +7,7 @@
7
7
  /* eslint-disable */
8
8
  import type { Status } from "../../../common/v1/enum";
9
9
  import type { Empty } from "../../../google/protobuf/empty";
10
+ import type { BaseTranslation } from "./base_translation";
10
11
 
11
12
  /** 字典选项查询条件 */
12
13
  export interface OptionBaseDictRequest {
@@ -100,6 +101,8 @@ export interface BaseDictForm {
100
101
  code: string;
101
102
  /** 字典名称 */
102
103
  name: string;
104
+ /** 非主语言翻译 */
105
+ translations: BaseTranslation[];
103
106
  /** 状态 */
104
107
  status: Status;
105
108
  }
@@ -124,6 +127,8 @@ export interface BaseDictItemForm {
124
127
  tag_type: string;
125
128
  /** 排序 */
126
129
  sort: number;
130
+ /** 非主语言翻译 */
131
+ translations: BaseTranslation[];
127
132
  /** 状态 */
128
133
  status: Status;
129
134
  }
@@ -194,6 +199,8 @@ export interface BaseDict {
194
199
  created_at: string;
195
200
  /** 更新时间 */
196
201
  updated_at: string;
202
+ /** 非主语言翻译 */
203
+ translations: BaseTranslation[];
197
204
  }
198
205
 
199
206
  /** 字典项 */
@@ -216,6 +223,8 @@ export interface BaseDictItem {
216
223
  created_at: string;
217
224
  /** 更新时间 */
218
225
  updated_at: string;
226
+ /** 非主语言翻译 */
227
+ translations: BaseTranslation[];
219
228
  }
220
229
 
221
230
  /** Admin字典服务 */
@@ -7,7 +7,16 @@
7
7
  /* eslint-disable */
8
8
  import type { Status } from "../../../common/v1/enum";
9
9
  import type { Empty } from "../../../google/protobuf/empty";
10
- import type { BaseJobLogStatus } from "../../common/v1/enum";
10
+
11
+ /** 定时任务日志状态。 */
12
+ export enum BaseJobLogStatus {
13
+ /** BASE_JOB_LOG_STATUS_UNSPECIFIED - 未指定定时任务日志状态。 */
14
+ BASE_JOB_LOG_STATUS_UNSPECIFIED = 0,
15
+ /** BASE_JOB_LOG_STATUS_SUCCESS - 成功。 */
16
+ BASE_JOB_LOG_STATUS_SUCCESS = 1,
17
+ /** BASE_JOB_LOG_STATUS_FAIL - 失败。 */
18
+ BASE_JOB_LOG_STATUS_FAIL = 2,
19
+ }
11
20
 
12
21
  /** 定时任务分页查询条件 */
13
22
  export interface PageBaseJobRequest {
@@ -0,0 +1,141 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc unknown
5
+ // source: system/admin/v1/base_language.proto
6
+
7
+ /* eslint-disable */
8
+ import type { Status } from "../../../common/v1/enum";
9
+ import type { Empty } from "../../../google/protobuf/empty";
10
+
11
+ /** 语言选项查询条件 */
12
+ export interface OptionBaseLanguageRequest {
13
+ /** 是否只返回启用语言 */
14
+ enabled_only?: boolean | undefined;
15
+ }
16
+
17
+ /** 语言选项响应 */
18
+ export interface OptionBaseLanguageResponse {
19
+ /** 语言选项 */
20
+ base_languages: BaseLanguage[];
21
+ }
22
+
23
+ /** 语言分页查询条件 */
24
+ export interface PageBaseLanguageRequest {
25
+ /** 语言名称 */
26
+ language_name: string;
27
+ /** 语言代码 */
28
+ language_code: string;
29
+ /** 启用状态 */
30
+ status?:
31
+ | Status
32
+ | undefined;
33
+ /** 当前页码 */
34
+ page_num: number;
35
+ /** 每页数量 */
36
+ page_size: number;
37
+ }
38
+
39
+ /** 语言分页响应 */
40
+ export interface PageBaseLanguageResponse {
41
+ /** 语言列表 */
42
+ base_languages: BaseLanguage[];
43
+ /** 总数 */
44
+ total: number;
45
+ }
46
+
47
+ /** 语言详情查询条件 */
48
+ export interface GetBaseLanguageRequest {
49
+ /** 语言ID */
50
+ id: number;
51
+ }
52
+
53
+ /** 语言表单 */
54
+ export interface BaseLanguageForm {
55
+ /** 语言ID */
56
+ id: number;
57
+ /** 标准语言代码 */
58
+ language_code: string;
59
+ /** 语言名称 */
60
+ language_name: string;
61
+ /** 本地语言名称 */
62
+ native_name: string;
63
+ /** 排序,值越小越靠前 */
64
+ sort: number;
65
+ /** 启用状态 */
66
+ status: Status;
67
+ }
68
+
69
+ /** 语言 */
70
+ export interface BaseLanguage {
71
+ /** 语言ID */
72
+ id: number;
73
+ /** 标准语言代码 */
74
+ language_code: string;
75
+ /** 语言名称 */
76
+ language_name: string;
77
+ /** 本地语言名称 */
78
+ native_name: string;
79
+ /** 排序 */
80
+ sort: number;
81
+ /** 是否主语言 */
82
+ is_primary: boolean;
83
+ /** 启用状态 */
84
+ status: Status;
85
+ /** 创建时间 */
86
+ created_at: string;
87
+ /** 更新时间 */
88
+ updated_at: string;
89
+ }
90
+
91
+ /** 创建语言请求参数 */
92
+ export interface CreateBaseLanguageRequest {
93
+ /** 语言表单 */
94
+ base_language: BaseLanguageForm | undefined;
95
+ }
96
+
97
+ /** 更新语言请求参数 */
98
+ export interface UpdateBaseLanguageRequest {
99
+ /** 语言表单 */
100
+ base_language: BaseLanguageForm | undefined;
101
+ }
102
+
103
+ /** 删除语言请求参数 */
104
+ export interface DeleteBaseLanguageRequest {
105
+ /** 语言ID列表 */
106
+ id: string;
107
+ }
108
+
109
+ /** 设置语言状态请求参数 */
110
+ export interface SetBaseLanguageStatusRequest {
111
+ /** 语言ID */
112
+ id: number;
113
+ /** 启用状态 */
114
+ status: Status;
115
+ }
116
+
117
+ /** 设置主语言请求参数 */
118
+ export interface SetBaseLanguagePrimaryRequest {
119
+ /** 语言ID */
120
+ id: number;
121
+ }
122
+
123
+ /** Admin语言管理服务 */
124
+ export interface BaseLanguageService {
125
+ /** 查询启用语言选项 */
126
+ OptionBaseLanguage(request: OptionBaseLanguageRequest): Promise<OptionBaseLanguageResponse>;
127
+ /** 查询语言分页列表 */
128
+ PageBaseLanguage(request: PageBaseLanguageRequest): Promise<PageBaseLanguageResponse>;
129
+ /** 查询语言详情 */
130
+ GetBaseLanguage(request: GetBaseLanguageRequest): Promise<BaseLanguageForm>;
131
+ /** 创建语言 */
132
+ CreateBaseLanguage(request: CreateBaseLanguageRequest): Promise<Empty>;
133
+ /** 更新语言 */
134
+ UpdateBaseLanguage(request: UpdateBaseLanguageRequest): Promise<Empty>;
135
+ /** 删除语言 */
136
+ DeleteBaseLanguage(request: DeleteBaseLanguageRequest): Promise<Empty>;
137
+ /** 设置语言状态 */
138
+ SetBaseLanguageStatus(request: SetBaseLanguageStatusRequest): Promise<Empty>;
139
+ /** 设置主语言 */
140
+ SetBaseLanguagePrimary(request: SetBaseLanguagePrimaryRequest): Promise<Empty>;
141
+ }
@@ -8,7 +8,8 @@
8
8
  import type { TreeOptionResponse } from "../../../common/v1/common";
9
9
  import type { Status } from "../../../common/v1/enum";
10
10
  import type { Empty } from "../../../google/protobuf/empty";
11
- import type { BaseMenuType } from "../../common/v1/enum";
11
+ import type { BaseTranslation } from "./base_translation";
12
+ import type { BaseMenuType } from "./common";
12
13
 
13
14
  /** 菜单选项查询条件 */
14
15
  export interface OptionBaseMenuRequest {
@@ -70,6 +71,8 @@ export interface BaseMenuForm {
70
71
  | undefined;
71
72
  /** 分配的API列表 */
72
73
  api: string[];
74
+ /** 非主语言翻译 */
75
+ translations: BaseTranslation[];
73
76
  /** 排序 */
74
77
  sort: number;
75
78
  /** 状态 */
@@ -134,6 +137,8 @@ export interface BaseMenu {
134
137
  children: BaseMenu[];
135
138
  /** 是否存在子节点 */
136
139
  has_children: boolean;
140
+ /** 非主语言翻译 */
141
+ translations: BaseTranslation[];
137
142
  }
138
143
 
139
144
  /** 菜单元信息 */
@@ -10,14 +10,14 @@
10
10
  export interface PageBaseMigrationRequest {
11
11
  /** 数据源 */
12
12
  data_source: string;
13
- /** 迁移版本 */
14
- version?:
15
- | string
16
- | undefined;
17
13
  /** 迁移模块 */
18
14
  module?:
19
15
  | string
20
16
  | undefined;
17
+ /** 迁移版本 */
18
+ version?:
19
+ | string
20
+ | undefined;
21
21
  /** 当前页码 */
22
22
  page_num: number;
23
23
  /** 每一页的行数 */
@@ -28,14 +28,14 @@ export interface PageBaseMigrationRequest {
28
28
  export interface BaseMigrationListItem {
29
29
  /** 主键 */
30
30
  id: number;
31
+ /** 迁移模块 */
32
+ module: string;
31
33
  /** 数据源 */
32
34
  data_source: string;
33
35
  /** 迁移版本 */
34
36
  version: string;
35
37
  /** 创建时间 */
36
38
  created_at: string;
37
- /** 迁移模块 */
38
- module: string;
39
39
  }
40
40
 
41
41
  /** 数据库迁移记录分页响应 */
@@ -56,6 +56,8 @@ export interface GetBaseMigrationRequest {
56
56
  export interface BaseMigration {
57
57
  /** 主键 */
58
58
  id: number;
59
+ /** 迁移模块 */
60
+ module: string;
59
61
  /** 数据源 */
60
62
  data_source: string;
61
63
  /** 迁移版本 */
@@ -68,8 +70,6 @@ export interface BaseMigration {
68
70
  description: string;
69
71
  /** 创建时间 */
70
72
  created_at: string;
71
- /** 迁移模块 */
72
- module: string;
73
73
  }
74
74
 
75
75
  /** 数据库迁移服务 */
@@ -8,7 +8,20 @@
8
8
  import type { SelectOptionResponse } from "../../../common/v1/common";
9
9
  import type { Status } from "../../../common/v1/enum";
10
10
  import type { Empty } from "../../../google/protobuf/empty";
11
- import type { BaseRoleDataScope } from "../../common/v1/enum";
11
+
12
+ /** 角色数据范围。 */
13
+ export enum BaseRoleDataScope {
14
+ /** BASE_ROLE_DATA_SCOPE_UNSPECIFIED - 未指定角色数据范围。 */
15
+ BASE_ROLE_DATA_SCOPE_UNSPECIFIED = 0,
16
+ /** BASE_ROLE_DATA_SCOPE_ALL - 全部数据。 */
17
+ BASE_ROLE_DATA_SCOPE_ALL = 1,
18
+ /** BASE_ROLE_DATA_SCOPE_DEPT_AND_CHILDREN - 部门及子部门数据。 */
19
+ BASE_ROLE_DATA_SCOPE_DEPT_AND_CHILDREN = 2,
20
+ /** BASE_ROLE_DATA_SCOPE_SELF_DEPT - 本部门数据。 */
21
+ BASE_ROLE_DATA_SCOPE_SELF_DEPT = 3,
22
+ /** BASE_ROLE_DATA_SCOPE_SELF_USER - 本人数据。 */
23
+ BASE_ROLE_DATA_SCOPE_SELF_USER = 4,
24
+ }
12
25
 
13
26
  /** 角色选项查询条件 */
14
27
  export interface OptionBaseRoleRequest {
@@ -0,0 +1,90 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc unknown
5
+ // source: system/admin/v1/base_translation.proto
6
+
7
+ /* eslint-disable */
8
+ import type { Empty } from "../../../google/protobuf/empty";
9
+
10
+ /** 统一翻译表目标类型,和 base_translation.target_type 的值一一对应。 */
11
+ export enum TranslationTargetType {
12
+ /** TRANSLATION_TARGET_TYPE_UNSPECIFIED - 未指定统一翻译表目标类型。 */
13
+ TRANSLATION_TARGET_TYPE_UNSPECIFIED = 0,
14
+ /** TRANSLATION_TARGET_TYPE_BASE_CONFIG_VALUE - 系统配置值。 */
15
+ TRANSLATION_TARGET_TYPE_BASE_CONFIG_VALUE = 1,
16
+ /** TRANSLATION_TARGET_TYPE_BASE_CONFIG_NAME - 系统配置名称。 */
17
+ TRANSLATION_TARGET_TYPE_BASE_CONFIG_NAME = 2,
18
+ /** TRANSLATION_TARGET_TYPE_BASE_DICT - 字典名称。 */
19
+ TRANSLATION_TARGET_TYPE_BASE_DICT = 3,
20
+ /** TRANSLATION_TARGET_TYPE_BASE_DICT_ITEM - 字典项标签。 */
21
+ TRANSLATION_TARGET_TYPE_BASE_DICT_ITEM = 4,
22
+ /** TRANSLATION_TARGET_TYPE_BASE_MENU - 菜单标题。 */
23
+ TRANSLATION_TARGET_TYPE_BASE_MENU = 5,
24
+ }
25
+
26
+ /** 翻译单个文本请求。 */
27
+ export interface DraftBaseTranslationRequest {
28
+ /** 待翻译文本 */
29
+ source: string;
30
+ /** 目标语言区域,不传时翻译所有启用的非主语言 */
31
+ locale?: string | undefined;
32
+ }
33
+
34
+ /** 翻译单个文本响应。 */
35
+ export interface DraftBaseTranslationResponse {
36
+ /** 翻译结果 */
37
+ translations: DraftBaseTranslationItem[];
38
+ }
39
+
40
+ /** 翻译单个文本响应。 */
41
+ export interface DraftBaseTranslationItem {
42
+ /** 目标语言区域 */
43
+ locale: string;
44
+ /** 翻译文本 */
45
+ translation: string;
46
+ }
47
+
48
+ /** 修改单个翻译信息请求。 */
49
+ export interface UpdateBaseTranslationRequest {
50
+ /** 翻译记录ID,大于零时优先按ID更新;ID不存在时根据目标信息更新或新增 */
51
+ id: number;
52
+ /** 翻译目标类型,ID为零时用于查询或新增 */
53
+ target_type: TranslationTargetType;
54
+ /** 目标资源ID,ID为零时用于查询或新增 */
55
+ target_id: number;
56
+ /** 目标语言区域,ID为零时用于查询或新增 */
57
+ locale: string;
58
+ /** 翻译文本 */
59
+ name: string;
60
+ }
61
+
62
+ /** 国际化翻译信息 */
63
+ export interface BaseTranslation {
64
+ /** 翻译记录ID */
65
+ id: number;
66
+ /** 翻译目标类型 */
67
+ target_type: TranslationTargetType;
68
+ /** 目标资源ID */
69
+ target_id: number;
70
+ /** 语言区域 */
71
+ locale: string;
72
+ /** 翻译文本 */
73
+ name: string;
74
+ }
75
+
76
+ /** 代码生成单语言国际化配置 */
77
+ export interface CodeGenLocaleConfig {
78
+ /** 业务或字段描述 */
79
+ comment: string;
80
+ /** 左树描述 */
81
+ left_tree_comment: string;
82
+ }
83
+
84
+ /** 国际化翻译信息服务。 */
85
+ export interface BaseTranslationService {
86
+ /** 翻译单个文本。 */
87
+ DraftBaseTranslation(request: DraftBaseTranslationRequest): Promise<DraftBaseTranslationResponse>;
88
+ /** 修改国际化翻译信息 */
89
+ UpdateBaseTranslation(request: UpdateBaseTranslationRequest): Promise<Empty>;
90
+ }
@@ -11,7 +11,18 @@ import type { Status } from "../../../common/v1/enum";
11
11
  import type { PasswordCrypto } from "../../../common/v1/types";
12
12
  import type { Empty } from "../../../google/protobuf/empty";
13
13
  import type { Timestamp } from "../../../google/protobuf/timestamp";
14
- import type { BaseUserGender } from "../../common/v1/enum";
14
+
15
+ /** 用户性别。 */
16
+ export enum BaseUserGender {
17
+ /** BASE_USER_GENDER_UNSPECIFIED - 未指定用户性别。 */
18
+ BASE_USER_GENDER_UNSPECIFIED = 0,
19
+ /** BASE_USER_GENDER_SECRET - 保密。 */
20
+ BASE_USER_GENDER_SECRET = 1,
21
+ /** BASE_USER_GENDER_MALE - 男。 */
22
+ BASE_USER_GENDER_MALE = 2,
23
+ /** BASE_USER_GENDER_FEMALE - 女。 */
24
+ BASE_USER_GENDER_FEMALE = 3,
25
+ }
15
26
 
16
27
  /** 用户选项查询条件 */
17
28
  export interface OptionBaseUserRequest {
@@ -9,31 +9,31 @@ import type { Empty } from "../../../google/protobuf/empty";
9
9
 
10
10
  /** 代码生成任务状态 */
11
11
  export enum CodeGenTaskStatus {
12
- /** CODE_GEN_TASK_STATUS_UNSPECIFIED - 未指定 */
12
+ /** CODE_GEN_TASK_STATUS_UNSPECIFIED - 未指定代码生成任务状态。 */
13
13
  CODE_GEN_TASK_STATUS_UNSPECIFIED = 0,
14
- /** CODE_GEN_TASK_STATUS_PENDING - 等待执行 */
14
+ /** CODE_GEN_TASK_STATUS_PENDING - 等待执行。 */
15
15
  CODE_GEN_TASK_STATUS_PENDING = 1,
16
- /** CODE_GEN_TASK_STATUS_RUNNING - 正在执行 */
16
+ /** CODE_GEN_TASK_STATUS_RUNNING - 正在执行。 */
17
17
  CODE_GEN_TASK_STATUS_RUNNING = 2,
18
- /** CODE_GEN_TASK_STATUS_SUCCEEDED - 执行成功 */
18
+ /** CODE_GEN_TASK_STATUS_SUCCEEDED - 执行成功。 */
19
19
  CODE_GEN_TASK_STATUS_SUCCEEDED = 3,
20
- /** CODE_GEN_TASK_STATUS_FAILED - 执行失败 */
20
+ /** CODE_GEN_TASK_STATUS_FAILED - 执行失败。 */
21
21
  CODE_GEN_TASK_STATUS_FAILED = 4,
22
22
  }
23
23
 
24
24
  /** 代码生成步骤状态 */
25
25
  export enum CodeGenTaskStepStatus {
26
- /** CODE_GEN_TASK_STEP_STATUS_UNSPECIFIED - 未指定 */
26
+ /** CODE_GEN_TASK_STEP_STATUS_UNSPECIFIED - 未指定代码生成步骤状态。 */
27
27
  CODE_GEN_TASK_STEP_STATUS_UNSPECIFIED = 0,
28
- /** CODE_GEN_TASK_STEP_STATUS_PENDING - 等待执行 */
28
+ /** CODE_GEN_TASK_STEP_STATUS_PENDING - 等待执行。 */
29
29
  CODE_GEN_TASK_STEP_STATUS_PENDING = 1,
30
- /** CODE_GEN_TASK_STEP_STATUS_RUNNING - 正在执行 */
30
+ /** CODE_GEN_TASK_STEP_STATUS_RUNNING - 正在执行。 */
31
31
  CODE_GEN_TASK_STEP_STATUS_RUNNING = 2,
32
- /** CODE_GEN_TASK_STEP_STATUS_SUCCEEDED - 执行成功 */
32
+ /** CODE_GEN_TASK_STEP_STATUS_SUCCEEDED - 执行成功。 */
33
33
  CODE_GEN_TASK_STEP_STATUS_SUCCEEDED = 3,
34
- /** CODE_GEN_TASK_STEP_STATUS_FAILED - 执行失败 */
34
+ /** CODE_GEN_TASK_STEP_STATUS_FAILED - 执行失败。 */
35
35
  CODE_GEN_TASK_STEP_STATUS_FAILED = 4,
36
- /** CODE_GEN_TASK_STEP_STATUS_SKIPPED - 无需处理 */
36
+ /** CODE_GEN_TASK_STEP_STATUS_SKIPPED - 无需处理。 */
37
37
  CODE_GEN_TASK_STEP_STATUS_SKIPPED = 5,
38
38
  }
39
39
 
@@ -78,7 +78,11 @@ export interface PreviewCodeGenResponse {
78
78
  /** 预览文件列表 */
79
79
  files: CodeGenPreviewFile[];
80
80
  /** 本次生效输出路径 */
81
- output_paths: CodeGenOutputPaths | undefined;
81
+ output_paths:
82
+ | CodeGenOutputPaths
83
+ | undefined;
84
+ /** 正式生成前必须补齐的翻译配置 */
85
+ missing_translations: string[];
82
86
  }
83
87
 
84
88
  /** 启动代码生成任务条件 */
@@ -6,6 +6,7 @@
6
6
 
7
7
  /* eslint-disable */
8
8
  import type { Empty } from "../../../google/protobuf/empty";
9
+ import type { CodeGenLocaleConfig } from "./base_translation";
9
10
 
10
11
  /** 代码生成字段配置查询条件 */
11
12
  export interface ListCodeGenColumnRequest {
@@ -97,6 +98,13 @@ export interface CodeGenColumn {
97
98
  | undefined;
98
99
  /** 排序 */
99
100
  sort: number;
101
+ /** 按语言区域索引的字段国际化配置 */
102
+ i18n_config: Map<string, CodeGenLocaleConfig>;
103
+ }
104
+
105
+ export interface CodeGenColumn_I18nConfigEntry {
106
+ key: string;
107
+ value: CodeGenLocaleConfig | undefined;
100
108
  }
101
109
 
102
110
  /** 代码生成字段查询条件配置 */