@liujitcn/kratos-admin-system 0.0.21 → 0.0.24

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 (106) hide show
  1. package/dist/package/declarations/src/api/system/base_language.d.ts +5 -4
  2. package/dist/package/declarations/src/api/system/base_translation.d.ts +7 -4
  3. package/dist/package/declarations/src/api/system/ops_monitoring.d.ts +19 -0
  4. package/dist/package/declarations/src/api/system/ops_monitoring_sse.d.ts +12 -0
  5. package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +9 -32
  6. package/dist/package/declarations/src/components/DynamicTranslationEditor.vue.d.ts +3 -6
  7. package/dist/package/declarations/src/components/dynamicTranslation.d.ts +11 -17
  8. package/dist/package/declarations/src/locales/generated.d.ts +6536 -0
  9. package/dist/package/declarations/src/rpc/base/v1/ai_session.d.ts +12 -2
  10. package/dist/package/declarations/src/rpc/base/v1/ai_tool.d.ts +9 -1
  11. package/dist/package/declarations/src/rpc/base/v1/config.d.ts +35 -0
  12. package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +1 -1
  13. package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +23 -7
  14. package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +7 -77
  15. package/dist/package/declarations/src/rpc/system/admin/v1/base_job.d.ts +9 -1
  16. package/dist/package/declarations/src/rpc/system/admin/v1/base_language.d.ts +7 -2
  17. package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +5 -40
  18. package/dist/package/declarations/src/rpc/system/admin/v1/base_migration.d.ts +6 -6
  19. package/dist/package/declarations/src/rpc/system/admin/v1/base_role.d.ts +13 -1
  20. package/dist/package/declarations/src/rpc/system/admin/v1/base_translation.d.ts +54 -81
  21. package/dist/package/declarations/src/rpc/system/admin/v1/base_user.d.ts +11 -1
  22. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen.d.ts +11 -11
  23. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_table.d.ts +11 -1
  24. package/dist/package/declarations/src/rpc/system/admin/v1/common.d.ts +13 -0
  25. package/dist/package/declarations/src/rpc/system/admin/v1/ops_monitoring.d.ts +222 -0
  26. package/dist/package/declarations/src/views/tool/ops-monitoring/index.vue.d.ts +3 -0
  27. package/dist/package/src/api/base/ai_message.ts +2 -2
  28. package/dist/package/src/api/system/base_language.ts +13 -15
  29. package/dist/package/src/api/system/base_translation.ts +17 -6
  30. package/dist/package/src/api/system/ops_monitoring.ts +88 -0
  31. package/dist/package/src/api/system/ops_monitoring_sse.ts +49 -0
  32. package/dist/package/src/components/DynamicTranslationCell.vue +199 -126
  33. package/dist/package/src/components/DynamicTranslationEditor.vue +109 -78
  34. package/dist/package/src/components/dynamicTranslation.ts +11 -31
  35. package/dist/package/src/locales/README.md +7 -5
  36. package/dist/package/src/locales/en-US.json +876 -872
  37. package/dist/package/src/locales/es-ES.json +900 -895
  38. package/dist/package/src/locales/fr-FR.json +896 -891
  39. package/dist/package/src/locales/generated.ts +22 -0
  40. package/dist/package/src/locales/ja-JP.json +876 -872
  41. package/dist/package/src/locales/ko-KR.json +881 -876
  42. package/dist/package/src/locales/zh-CN.json +876 -872
  43. package/dist/package/src/locales/zh-TW.json +876 -871
  44. package/dist/package/src/module.ts +3 -17
  45. package/dist/package/src/rpc/base/v1/ai_session.ts +13 -2
  46. package/dist/package/src/rpc/base/v1/ai_tool.ts +10 -1
  47. package/dist/package/src/rpc/base/v1/config.ts +47 -0
  48. package/dist/package/src/rpc/system/admin/v1/auth.ts +1 -1
  49. package/dist/package/src/rpc/system/admin/v1/base_config.ts +24 -7
  50. package/dist/package/src/rpc/system/admin/v1/base_dict.ts +7 -79
  51. package/dist/package/src/rpc/system/admin/v1/base_job.ts +10 -1
  52. package/dist/package/src/rpc/system/admin/v1/base_language.ts +8 -2
  53. package/dist/package/src/rpc/system/admin/v1/base_menu.ts +5 -41
  54. package/dist/package/src/rpc/system/admin/v1/base_migration.ts +8 -8
  55. package/dist/package/src/rpc/system/admin/v1/base_role.ts +14 -1
  56. package/dist/package/src/rpc/system/admin/v1/base_translation.ts +54 -81
  57. package/dist/package/src/rpc/system/admin/v1/base_user.ts +12 -1
  58. package/dist/package/src/rpc/system/admin/v1/code_gen.ts +11 -11
  59. package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +12 -1
  60. package/dist/package/src/rpc/system/admin/v1/common.ts +21 -0
  61. package/dist/package/src/rpc/system/admin/v1/ops_monitoring.ts +255 -0
  62. package/dist/package/src/views/ai/chat/components/ChatPanel.vue +36 -36
  63. package/dist/package/src/views/ai/chat/components/SessionPanel.vue +6 -6
  64. package/dist/package/src/views/ai/chat/components/XSender.vue +20 -20
  65. package/dist/package/src/views/ai/chat/index.vue +33 -32
  66. package/dist/package/src/views/ai/chat/message.ts +16 -15
  67. package/dist/package/src/views/base/api/index.vue +55 -56
  68. package/dist/package/src/views/base/area/index.vue +18 -19
  69. package/dist/package/src/views/base/config/index.vue +143 -133
  70. package/dist/package/src/views/base/dept/index.vue +42 -43
  71. package/dist/package/src/views/base/dict/index.vue +49 -45
  72. package/dist/package/src/views/base/dict/item.vue +54 -49
  73. package/dist/package/src/views/base/job/index.vue +51 -52
  74. package/dist/package/src/views/base/job/log.vue +18 -18
  75. package/dist/package/src/views/{tool → base}/language/index.vue +51 -47
  76. package/dist/package/src/views/base/log/index.vue +40 -40
  77. package/dist/package/src/views/base/menu/index.vue +220 -177
  78. package/dist/package/src/views/base/migration/index.vue +24 -24
  79. package/dist/package/src/views/base/post/index.vue +42 -43
  80. package/dist/package/src/views/base/role/index.vue +54 -55
  81. package/dist/package/src/views/base/tenant/index.vue +42 -43
  82. package/dist/package/src/views/base/user/components/dept-tree.vue +1 -1
  83. package/dist/package/src/views/base/user/index.vue +69 -71
  84. package/dist/package/src/views/profile/components/base.vue +9 -9
  85. package/dist/package/src/views/profile/components/password.vue +19 -20
  86. package/dist/package/src/views/profile/components/security.vue +20 -20
  87. package/dist/package/src/views/profile/index.vue +3 -3
  88. package/dist/package/src/views/tool/api-doc/index.vue +1 -1
  89. package/dist/package/src/views/tool/code-gen/code-preview/index.vue +13 -13
  90. package/dist/package/src/views/tool/code-gen/columns/index.vue +89 -89
  91. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +5 -5
  92. package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +21 -21
  93. package/dist/package/src/views/tool/code-gen/components/CodePreviewPane.vue +5 -5
  94. package/dist/package/src/views/tool/code-gen/config.ts +60 -60
  95. package/dist/package/src/views/tool/code-gen/preview/data.ts +2 -2
  96. package/dist/package/src/views/tool/code-gen/preview/index.vue +30 -31
  97. package/dist/package/src/views/tool/code-gen/proto/index.vue +43 -43
  98. package/dist/package/src/views/tool/code-gen/table/index.vue +95 -95
  99. package/dist/package/src/views/tool/ops-monitoring/index.vue +1175 -0
  100. package/dist/package/src/views/tool/project-doc/index.vue +7 -7
  101. package/package.json +2 -2
  102. package/dist/package/declarations/src/rpc/base/v1/enum.d.ts +0 -43
  103. package/dist/package/declarations/src/rpc/system/common/v1/enum.d.ts +0 -67
  104. package/dist/package/src/rpc/base/v1/enum.ts +0 -54
  105. package/dist/package/src/rpc/system/common/v1/enum.ts +0 -80
  106. /package/dist/package/declarations/src/views/{tool → base}/language/index.vue.d.ts +0 -0
@@ -3,14 +3,8 @@ 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 模块注册,供 System 页面、组件和代码生成页面使用。
7
- import enUS from "./locales/en-US.json";
8
- import jaJP from "./locales/ja-JP.json";
9
- import zhCN from "./locales/zh-CN.json";
10
- import zhTW from "./locales/zh-TW.json";
11
- import koKR from "./locales/ko-KR.json";
12
- import frFR from "./locales/fr-FR.json";
13
- import esES from "./locales/es-ES.json";
6
+ // 语言包由同步脚本生成并注册,供 System 页面、组件和代码生成页面使用。
7
+ import { LOCALE_MESSAGES } from "./locales/generated";
14
8
 
15
9
  const viewModules = import.meta.glob<{ default: Component }>("./views/**/*.vue");
16
10
 
@@ -23,13 +17,5 @@ export const systemAdminModule = defineAdminModule({
23
17
  routeOptions: {
24
18
  Profile: { reuseTabAcrossQuery: true }
25
19
  },
26
- messages: {
27
- "zh-CN": zhCN,
28
- "zh-TW": zhTW,
29
- "ko-KR": koKR,
30
- "fr-FR": frFR,
31
- "es-ES": esES,
32
- "en-US": enUS,
33
- "ja-JP": jaJP
34
- }
20
+ messages: LOCALE_MESSAGES
35
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,11 +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";
12
- import type { BaseConfigTranslation } from "./base_translation";
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
+ }
13
28
 
14
29
  /** 系统配置分页查询条件 */
15
30
  export interface PageBaseConfigRequest {
@@ -67,8 +82,10 @@ export interface BaseConfigForm {
67
82
  key: string;
68
83
  /** 配置value */
69
84
  value: string;
70
- /** 配置名称及文本/富文本值的多语言翻译 */
71
- translations: BaseConfigTranslation[];
85
+ /** 配置名称多语言翻 */
86
+ name_translations: BaseTranslation[];
87
+ /** 配置value文本/富文本配置值的多语言翻译 */
88
+ value_translations: BaseTranslation[];
72
89
  /** 状态 */
73
90
  status: Status;
74
91
  }
@@ -117,14 +134,14 @@ export interface BaseConfig {
117
134
  key: string;
118
135
  /** 配置value */
119
136
  value: string;
120
- /** 配置名称及文本/富文本值的多语言翻译 */
121
- translations: BaseConfigTranslation[];
122
137
  /** 状态:枚举【Status】 */
123
138
  status: Status;
124
139
  /** 创建时间 */
125
140
  created_at: string;
126
141
  /** 更新时间 */
127
142
  updated_at: string;
143
+ /** 配置名称及文本/富文本配置值的多语言翻译 */
144
+ translations: BaseTranslation[];
128
145
  }
129
146
 
130
147
  /** Admin系统配置服务 */
@@ -7,7 +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 { TranslationStatus } from "./base_translation";
10
+ import type { BaseTranslation } from "./base_translation";
11
11
 
12
12
  /** 字典选项查询条件 */
13
13
  export interface OptionBaseDictRequest {
@@ -102,7 +102,7 @@ export interface BaseDictForm {
102
102
  /** 字典名称 */
103
103
  name: string;
104
104
  /** 非主语言翻译 */
105
- translations: BaseDictTranslation[];
105
+ translations: BaseTranslation[];
106
106
  /** 状态 */
107
107
  status: Status;
108
108
  }
@@ -128,7 +128,7 @@ export interface BaseDictItemForm {
128
128
  /** 排序 */
129
129
  sort: number;
130
130
  /** 非主语言翻译 */
131
- translations: BaseDictItemTranslation[];
131
+ translations: BaseTranslation[];
132
132
  /** 状态 */
133
133
  status: Status;
134
134
  }
@@ -193,14 +193,14 @@ export interface BaseDict {
193
193
  code: string;
194
194
  /** 字典名称 */
195
195
  name: string;
196
- /** 非主语言翻译 */
197
- translations: BaseDictTranslation[];
198
196
  /** 状态 */
199
197
  status: Status;
200
198
  /** 创建时间 */
201
199
  created_at: string;
202
200
  /** 更新时间 */
203
201
  updated_at: string;
202
+ /** 非主语言翻译 */
203
+ translations: BaseTranslation[];
204
204
  }
205
205
 
206
206
  /** 字典项 */
@@ -217,86 +217,14 @@ export interface BaseDictItem {
217
217
  tag_type: string;
218
218
  /** 排序 */
219
219
  sort: number;
220
- /** 非主语言翻译 */
221
- translations: BaseDictItemTranslation[];
222
220
  /** 状态 */
223
221
  status: Status;
224
222
  /** 创建时间 */
225
223
  created_at: string;
226
224
  /** 更新时间 */
227
225
  updated_at: string;
228
- }
229
-
230
- /** 字典翻译 */
231
- export interface BaseDictTranslation {
232
- /** 主键ID */
233
- id: number;
234
- /** 字典ID */
235
- dict_id: number;
236
- /** 语言代码 */
237
- locale: string;
238
- /** 字典名称 */
239
- name: string;
240
- /** 翻译状态 */
241
- translation_status: TranslationStatus;
242
- /** 中文源文SHA-256 */
243
- source_hash: string;
244
- /** 机器翻译提供方 */
245
- translation_provider: string;
246
- /** 最近机器翻译时间 */
247
- translated_at: string;
248
- /** 审核人ID */
249
- reviewed_by: number;
250
- /** 审核时间 */
251
- reviewed_at: string;
252
- /** 创建人ID */
253
- created_by: number;
254
- /** 更新人ID */
255
- updated_by: number;
256
- /** 创建时间 */
257
- created_at: string;
258
- /** 更新时间 */
259
- updated_at: string;
260
- /** 删除时间 */
261
- deleted_at: number;
262
- /** 中文源文是否已变化 */
263
- source_changed: boolean;
264
- }
265
-
266
- /** 字典项翻译 */
267
- export interface BaseDictItemTranslation {
268
- /** 主键ID */
269
- id: number;
270
- /** 字典项ID */
271
- dict_item_id: number;
272
- /** 语言代码 */
273
- locale: string;
274
- /** 字典项标签 */
275
- label: string;
276
- /** 翻译状态 */
277
- translation_status: TranslationStatus;
278
- /** 中文源文SHA-256 */
279
- source_hash: string;
280
- /** 机器翻译提供方 */
281
- translation_provider: string;
282
- /** 最近机器翻译时间 */
283
- translated_at: string;
284
- /** 审核人ID */
285
- reviewed_by: number;
286
- /** 审核时间 */
287
- reviewed_at: string;
288
- /** 创建人ID */
289
- created_by: number;
290
- /** 更新人ID */
291
- updated_by: number;
292
- /** 创建时间 */
293
- created_at: string;
294
- /** 更新时间 */
295
- updated_at: string;
296
- /** 删除时间 */
297
- deleted_at: number;
298
- /** 中文源文是否已变化 */
299
- source_changed: boolean;
226
+ /** 非主语言翻译 */
227
+ translations: BaseTranslation[];
300
228
  }
301
229
 
302
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 {
@@ -62,8 +62,6 @@ export interface BaseLanguageForm {
62
62
  native_name: string;
63
63
  /** 排序,值越小越靠前 */
64
64
  sort: number;
65
- /** 是否主语言 */
66
- is_primary: boolean;
67
65
  /** 启用状态 */
68
66
  status: Status;
69
67
  }
@@ -116,6 +114,12 @@ export interface SetBaseLanguageStatusRequest {
116
114
  status: Status;
117
115
  }
118
116
 
117
+ /** 设置主语言请求参数 */
118
+ export interface SetBaseLanguagePrimaryRequest {
119
+ /** 语言ID */
120
+ id: number;
121
+ }
122
+
119
123
  /** Admin语言管理服务 */
120
124
  export interface BaseLanguageService {
121
125
  /** 查询启用语言选项 */
@@ -132,4 +136,6 @@ export interface BaseLanguageService {
132
136
  DeleteBaseLanguage(request: DeleteBaseLanguageRequest): Promise<Empty>;
133
137
  /** 设置语言状态 */
134
138
  SetBaseLanguageStatus(request: SetBaseLanguageStatusRequest): Promise<Empty>;
139
+ /** 设置主语言 */
140
+ SetBaseLanguagePrimary(request: SetBaseLanguagePrimaryRequest): Promise<Empty>;
135
141
  }
@@ -8,8 +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";
12
- import type { TranslationStatus } from "./base_translation";
11
+ import type { BaseTranslation } from "./base_translation";
12
+ import type { BaseMenuType } from "./common";
13
13
 
14
14
  /** 菜单选项查询条件 */
15
15
  export interface OptionBaseMenuRequest {
@@ -72,7 +72,7 @@ export interface BaseMenuForm {
72
72
  /** 分配的API列表 */
73
73
  api: string[];
74
74
  /** 非主语言翻译 */
75
- translations: BaseMenuTranslation[];
75
+ translations: BaseTranslation[];
76
76
  /** 排序 */
77
77
  sort: number;
78
78
  /** 状态 */
@@ -125,8 +125,6 @@ export interface BaseMenu {
125
125
  meta:
126
126
  | BaseMenuMeta
127
127
  | undefined;
128
- /** 非主语言翻译 */
129
- translations: BaseMenuTranslation[];
130
128
  /** 排序 */
131
129
  sort: number;
132
130
  /** 状态 */
@@ -139,6 +137,8 @@ export interface BaseMenu {
139
137
  children: BaseMenu[];
140
138
  /** 是否存在子节点 */
141
139
  has_children: boolean;
140
+ /** 非主语言翻译 */
141
+ translations: BaseTranslation[];
142
142
  }
143
143
 
144
144
  /** 菜单元信息 */
@@ -195,42 +195,6 @@ export interface BaseMenuParams {
195
195
  value: string;
196
196
  }
197
197
 
198
- /** 菜单翻译 */
199
- export interface BaseMenuTranslation {
200
- /** 主键ID */
201
- id: number;
202
- /** 菜单ID */
203
- menu_id: number;
204
- /** 语言代码 */
205
- locale: string;
206
- /** 菜单标题 */
207
- title: string;
208
- /** 翻译状态 */
209
- translation_status: TranslationStatus;
210
- /** 中文源文SHA-256 */
211
- source_hash: string;
212
- /** 机器翻译提供方 */
213
- translation_provider: string;
214
- /** 最近机器翻译时间 */
215
- translated_at: string;
216
- /** 审核人ID */
217
- reviewed_by: number;
218
- /** 审核时间 */
219
- reviewed_at: string;
220
- /** 创建人ID */
221
- created_by: number;
222
- /** 更新人ID */
223
- updated_by: number;
224
- /** 创建时间 */
225
- created_at: string;
226
- /** 更新时间 */
227
- updated_at: string;
228
- /** 删除时间 */
229
- deleted_at: number;
230
- /** 中文源文是否已变化 */
231
- source_changed: boolean;
232
- }
233
-
234
198
  /** Admin菜单管理服务 */
235
199
  export interface BaseMenuService {
236
200
  /** 查询菜单树形选择 */
@@ -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 {