@liujitcn/kratos-admin-system 0.0.25 → 0.0.27

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 (62) hide show
  1. package/dist/package/declarations/src/api/system/base_i18n.d.ts +10 -0
  2. package/dist/package/declarations/src/api/system/code_gen_i18n.d.ts +1 -1
  3. package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +3 -3
  4. package/dist/package/declarations/src/components/dynamicTranslation.d.ts +1 -1
  5. package/dist/package/declarations/src/locales/generated.d.ts +9 -2800
  6. package/dist/package/declarations/src/rpc/common/v1/enum.d.ts +15 -6
  7. package/dist/package/declarations/src/rpc/system/admin/v1/base_api.d.ts +10 -1
  8. package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +4 -4
  9. package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +5 -5
  10. package/dist/package/declarations/src/rpc/system/admin/v1/{base_translation.d.ts → base_i18n.d.ts} +3 -3
  11. package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +3 -3
  12. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_column.d.ts +1 -1
  13. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_table.d.ts +1 -1
  14. package/dist/package/declarations/src/rpc/system/admin/v1/project_document.d.ts +8 -0
  15. package/dist/package/declarations/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue.d.ts +1 -1
  16. package/dist/package/src/api/base/sse.ts +3 -2
  17. package/dist/package/src/api/system/{base_translation.ts → base_i18n.ts} +5 -5
  18. package/dist/package/src/api/system/code_gen_i18n.ts +1 -1
  19. package/dist/package/src/components/Ai.vue +9 -2
  20. package/dist/package/src/components/DynamicTranslationCell.vue +9 -9
  21. package/dist/package/src/components/DynamicTranslationEditor.vue +3 -3
  22. package/dist/package/src/components/dynamicTranslation.ts +1 -1
  23. package/dist/package/src/locales/README.md +0 -4
  24. package/dist/package/src/locales/en-US.json +2 -0
  25. package/dist/package/src/locales/generated.ts +0 -6
  26. package/dist/package/src/locales/ja-JP.json +721 -719
  27. package/dist/package/src/locales/zh-CN.json +2 -0
  28. package/dist/package/src/locales/zh-TW.json +2 -0
  29. package/dist/package/src/rpc/common/v1/enum.ts +16 -6
  30. package/dist/package/src/rpc/system/admin/v1/base_api.ts +11 -1
  31. package/dist/package/src/rpc/system/admin/v1/base_config.ts +4 -4
  32. package/dist/package/src/rpc/system/admin/v1/base_dict.ts +5 -5
  33. package/dist/package/src/rpc/system/admin/v1/{base_translation.ts → base_i18n.ts} +4 -4
  34. package/dist/package/src/rpc/system/admin/v1/base_menu.ts +3 -3
  35. package/dist/package/src/rpc/system/admin/v1/code_gen_column.ts +1 -1
  36. package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +1 -1
  37. package/dist/package/src/rpc/system/admin/v1/project_document.ts +9 -0
  38. package/dist/package/src/views/ai/chat/message.ts +12 -2
  39. package/dist/package/src/views/base/api/index.vue +20 -20
  40. package/dist/package/src/views/base/config/index.vue +11 -11
  41. package/dist/package/src/views/base/dept/index.vue +8 -8
  42. package/dist/package/src/views/base/dict/index.vue +9 -9
  43. package/dist/package/src/views/base/dict/item.vue +9 -9
  44. package/dist/package/src/views/base/job/index.vue +11 -11
  45. package/dist/package/src/views/base/language/index.vue +9 -9
  46. package/dist/package/src/views/base/menu/index.vue +14 -9
  47. package/dist/package/src/views/base/post/index.vue +8 -8
  48. package/dist/package/src/views/base/role/index.vue +8 -8
  49. package/dist/package/src/views/base/tenant/index.vue +8 -8
  50. package/dist/package/src/views/base/user/index.vue +8 -8
  51. package/dist/package/src/views/tool/code-gen/columns/index.vue +8 -53
  52. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +1 -1
  53. package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +3 -12
  54. package/dist/package/src/views/tool/code-gen/preview/index.vue +3 -6
  55. package/dist/package/src/views/tool/code-gen/proto/index.vue +7 -8
  56. package/dist/package/src/views/tool/code-gen/table/index.vue +2 -2
  57. package/dist/package/src/views/tool/ops-monitoring/index.vue +23 -25
  58. package/package.json +2 -2
  59. package/dist/package/declarations/src/api/system/base_translation.d.ts +0 -10
  60. package/dist/package/src/locales/es-ES.json +0 -933
  61. package/dist/package/src/locales/fr-FR.json +0 -933
  62. package/dist/package/src/locales/ko-KR.json +0 -933
@@ -479,6 +479,7 @@
479
479
  "system.ai.chat.action.collapse_sessions": "收起会话栏",
480
480
  "system.ai.chat.action.expand_sessions": "展开会话栏",
481
481
  "system.ai.chat.action.new_conversation": "新建会话",
482
+ "system.ai.chat.action.open_assistant": "打开AI助手",
482
483
  "system.ai.chat.action.conversation_menu": "会话操作",
483
484
  "system.ai.chat.action.rename": "重命名",
484
485
  "system.ai.chat.action.continue": "继续",
@@ -486,6 +487,7 @@
486
487
  "system.ai.chat.title.error_detail": "错误详情",
487
488
  "system.ai.chat.title.runtime": "运行明细",
488
489
  "system.ai.chat.title.recent_conversations": "最近对话",
490
+ "system.ai.chat.title.assistant": "AI助手",
489
491
  "system.ai.chat.field.input_tokens": "输入",
490
492
  "system.ai.chat.field.output_tokens": "输出",
491
493
  "system.ai.chat.field.cache_tokens": "缓存读取",
@@ -479,6 +479,7 @@
479
479
  "system.ai.chat.action.collapse_sessions": "收起會話欄",
480
480
  "system.ai.chat.action.expand_sessions": "展開會話欄",
481
481
  "system.ai.chat.action.new_conversation": "新建會話",
482
+ "system.ai.chat.action.open_assistant": "開啟 AI 助手",
482
483
  "system.ai.chat.action.conversation_menu": "會話操作",
483
484
  "system.ai.chat.action.rename": "重新命名",
484
485
  "system.ai.chat.action.continue": "繼續",
@@ -486,6 +487,7 @@
486
487
  "system.ai.chat.title.error_detail": "錯誤詳情",
487
488
  "system.ai.chat.title.runtime": "執行明細",
488
489
  "system.ai.chat.title.recent_conversations": "最近對話",
490
+ "system.ai.chat.title.assistant": "AI 助手",
489
491
  "system.ai.chat.field.input_tokens": "輸入",
490
492
  "system.ai.chat.field.output_tokens": "輸出",
491
493
  "system.ai.chat.field.cache_tokens": "快取讀取",
@@ -8,10 +8,20 @@
8
8
 
9
9
  /** 状态 */
10
10
  export enum Status {
11
- /** UNKNOWN - 未知状态 */
12
- UNKNOWN = 0,
13
- /** ENABLE - 启用 */
14
- ENABLE = 1,
15
- /** DISABLE - 禁用 */
16
- DISABLE = 2,
11
+ /** STATUS_UNSPECIFIED - 未知状态 */
12
+ STATUS_UNSPECIFIED = 0,
13
+ /** STATUS_ENABLE - 启用 */
14
+ STATUS_ENABLE = 1,
15
+ /** STATUS_DISABLE - 禁用 */
16
+ STATUS_DISABLE = 2,
17
+ }
18
+
19
+ /** 定时任务日志状态 */
20
+ export enum BaseJobLogStatus {
21
+ /** BASE_JOB_LOG_STATUS_UNSPECIFIED - 未指定定时任务日志状态 */
22
+ BASE_JOB_LOG_STATUS_UNSPECIFIED = 0,
23
+ /** BASE_JOB_LOG_STATUS_SUCCESS - 成功 */
24
+ BASE_JOB_LOG_STATUS_SUCCESS = 1,
25
+ /** BASE_JOB_LOG_STATUS_FAIL - 失败 */
26
+ BASE_JOB_LOG_STATUS_FAIL = 2,
17
27
  }
@@ -208,7 +208,7 @@ export interface OptionOpenApiServiceRequest {
208
208
 
209
209
  /** OpenAPI业务服务选项响应 */
210
210
  export interface OptionOpenApiServiceResponse {
211
- /** OpenAPI文档选项列表 */
211
+ /** OpenAPI文档列表 */
212
212
  list: OpenApiServiceOption[];
213
213
  }
214
214
 
@@ -218,6 +218,16 @@ export interface OpenApiServiceOption {
218
218
  key: string;
219
219
  /** OpenAPI文档名称 */
220
220
  name: string;
221
+ /** OpenAPI接口列表 */
222
+ operations: OpenApiServiceOperation[];
223
+ }
224
+
225
+ /** OpenAPI业务服务接口 */
226
+ export interface OpenApiServiceOperation {
227
+ /** HTTP请求路径 */
228
+ path: string;
229
+ /** HTTP请求方法 */
230
+ method: string;
221
231
  }
222
232
 
223
233
  /** AdminAPI服务 */
@@ -8,7 +8,7 @@
8
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 { BaseTranslation } from "./base_translation";
11
+ import type { BaseI18n } from "./base_i18n";
12
12
 
13
13
  /** 系统配置类型。 */
14
14
  export enum BaseConfigType {
@@ -83,9 +83,9 @@ export interface BaseConfigForm {
83
83
  /** 配置value */
84
84
  value: string;
85
85
  /** 配置名称多语言翻 */
86
- name_translations: BaseTranslation[];
86
+ name_translations: BaseI18n[];
87
87
  /** 配置value文本/富文本配置值的多语言翻译 */
88
- value_translations: BaseTranslation[];
88
+ value_translations: BaseI18n[];
89
89
  /** 状态 */
90
90
  status: Status;
91
91
  }
@@ -141,7 +141,7 @@ export interface BaseConfig {
141
141
  /** 更新时间 */
142
142
  updated_at: string;
143
143
  /** 配置名称及文本/富文本配置值的多语言翻译 */
144
- translations: BaseTranslation[];
144
+ translations: BaseI18n[];
145
145
  }
146
146
 
147
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 { BaseTranslation } from "./base_translation";
10
+ import type { BaseI18n } from "./base_i18n";
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: BaseTranslation[];
105
+ translations: BaseI18n[];
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: BaseTranslation[];
131
+ translations: BaseI18n[];
132
132
  /** 状态 */
133
133
  status: Status;
134
134
  }
@@ -200,7 +200,7 @@ export interface BaseDict {
200
200
  /** 更新时间 */
201
201
  updated_at: string;
202
202
  /** 非主语言翻译 */
203
- translations: BaseTranslation[];
203
+ translations: BaseI18n[];
204
204
  }
205
205
 
206
206
  /** 字典项 */
@@ -224,7 +224,7 @@ export interface BaseDictItem {
224
224
  /** 更新时间 */
225
225
  updated_at: string;
226
226
  /** 非主语言翻译 */
227
- translations: BaseTranslation[];
227
+ translations: BaseI18n[];
228
228
  }
229
229
 
230
230
  /** Admin字典服务 */
@@ -2,12 +2,12 @@
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.11.8
4
4
  // protoc unknown
5
- // source: system/admin/v1/base_translation.proto
5
+ // source: system/admin/v1/base_i18n.proto
6
6
 
7
7
  /* eslint-disable */
8
8
  import type { Empty } from "../../../google/protobuf/empty";
9
9
 
10
- /** 统一翻译表目标类型,和 base_translation.target_type 的值一一对应。 */
10
+ /** 统一翻译表目标类型,和 base_i18n.target_type 的值一一对应。 */
11
11
  export enum TranslationTargetType {
12
12
  /** TRANSLATION_TARGET_TYPE_UNSPECIFIED - 未指定统一翻译表目标类型。 */
13
13
  TRANSLATION_TARGET_TYPE_UNSPECIFIED = 0,
@@ -60,7 +60,7 @@ export interface UpdateBaseTranslationRequest {
60
60
  }
61
61
 
62
62
  /** 国际化翻译信息 */
63
- export interface BaseTranslation {
63
+ export interface BaseI18n {
64
64
  /** 翻译记录ID */
65
65
  id: number;
66
66
  /** 翻译目标类型 */
@@ -82,7 +82,7 @@ export interface CodeGenLocaleConfig {
82
82
  }
83
83
 
84
84
  /** 国际化翻译信息服务。 */
85
- export interface BaseTranslationService {
85
+ export interface BaseI18nService {
86
86
  /** 翻译单个文本。 */
87
87
  DraftBaseTranslation(request: DraftBaseTranslationRequest): Promise<DraftBaseTranslationResponse>;
88
88
  /** 修改国际化翻译信息 */
@@ -8,7 +8,7 @@
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 { BaseTranslation } from "./base_translation";
11
+ import type { BaseI18n } from "./base_i18n";
12
12
  import type { BaseMenuType } from "./common";
13
13
 
14
14
  /** 菜单选项查询条件 */
@@ -72,7 +72,7 @@ export interface BaseMenuForm {
72
72
  /** 分配的API列表 */
73
73
  api: string[];
74
74
  /** 非主语言翻译 */
75
- translations: BaseTranslation[];
75
+ translations: BaseI18n[];
76
76
  /** 排序 */
77
77
  sort: number;
78
78
  /** 状态 */
@@ -138,7 +138,7 @@ export interface BaseMenu {
138
138
  /** 是否存在子节点 */
139
139
  has_children: boolean;
140
140
  /** 非主语言翻译 */
141
- translations: BaseTranslation[];
141
+ translations: BaseI18n[];
142
142
  }
143
143
 
144
144
  /** 菜单元信息 */
@@ -6,7 +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
+ import type { CodeGenLocaleConfig } from "./base_i18n";
10
10
 
11
11
  /** 代码生成字段配置查询条件 */
12
12
  export interface ListCodeGenColumnRequest {
@@ -6,7 +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
+ import type { CodeGenLocaleConfig } from "./base_i18n";
10
10
 
11
11
  /** 代码生成表状态。 */
12
12
  export enum CodeGenTableStatus {
@@ -68,6 +68,15 @@ export interface ProjectDocument {
68
68
  path: string;
69
69
  /** Markdown文档内容 */
70
70
  content: string;
71
+ /** 按语言标识索引的Markdown翻译内容 */
72
+ locale: Map<string, string>;
73
+ /** Markdown文件更新时间,RFC3339格式 */
74
+ updated_at: string;
75
+ }
76
+
77
+ export interface ProjectDocument_LocaleEntry {
78
+ key: string;
79
+ value: string;
71
80
  }
72
81
 
73
82
  /** 项目文档服务 */
@@ -15,6 +15,7 @@ import type { AiStreamPayload, AIFlowBlock, ChatMessageItem, ReplySourceTag } fr
15
15
  const THINKING_MESSAGE_ID_PREFIX = "ai-thinking";
16
16
  const LOCAL_USER_MESSAGE_ID_PREFIX = "ai-user-local";
17
17
  const PENDING_STREAM_MESSAGE_ID = "pending";
18
+ const DEFAULT_SESSION_TITLES = new Set(["新对话", "新對話", "New conversation"]);
18
19
  const thinkingMessageContent = () => t("system.ai.chat.message.thinking");
19
20
 
20
21
  /** 生成流式消息分组键,确保同一轮回复只更新当前占位气泡。 */
@@ -44,13 +45,22 @@ export function resolveTimestamp(timestamp?: { seconds?: number; nanos?: number
44
45
  export function normalizeSession(session?: Partial<AiSession> | null): AiSession {
45
46
  return {
46
47
  id: String(session?.id ?? ""),
47
- title: String(session?.title ?? t("system.ai.chat.value.new_conversation")),
48
- summary: String(session?.summary ?? ""),
48
+ title: resolveSessionText(session?.title, true),
49
+ summary: resolveSessionText(session?.summary, false),
49
50
  updated_at: session?.updated_at,
50
51
  terminal: Number(session?.terminal ?? Terminal.TERMINAL_ADMIN)
51
52
  };
52
53
  }
53
54
 
55
+ /** 将服务端生成的默认会话文案切换到当前语言,兼容历史数据。 */
56
+ function resolveSessionText(value: unknown, fallbackWhenEmpty: boolean) {
57
+ const text = String(value ?? "");
58
+ if ((fallbackWhenEmpty && !text) || DEFAULT_SESSION_TITLES.has(text)) {
59
+ return t("system.ai.chat.value.new_conversation");
60
+ }
61
+ return text;
62
+ }
63
+
54
64
  /** 将会话列表收敛成可安全渲染的数组。 */
55
65
  export function normalizeSessionList(list?: AiSession[] | null) {
56
66
  if (!Array.isArray(list)) return [];
@@ -172,8 +172,8 @@ const editForm = reactive({
172
172
  id: 0,
173
173
  tool_name: "",
174
174
  tool_prompts: [] as string[],
175
- mcp_status: Status.ENABLE,
176
- agent_status: Status.ENABLE
175
+ mcp_status: Status.STATUS_ENABLE,
176
+ agent_status: Status.STATUS_ENABLE
177
177
  });
178
178
 
179
179
  const requestBodyRows = computed(() => schemaRows(detailDoc.value?.request_body));
@@ -202,8 +202,8 @@ const editFields = computed<ProFormField[]>(() => [
202
202
  label: t("system.base.api.field.mcp_status"),
203
203
  component: "switch",
204
204
  props: {
205
- activeValue: Status.ENABLE,
206
- inactiveValue: Status.DISABLE,
205
+ activeValue: Status.STATUS_ENABLE,
206
+ inactiveValue: Status.STATUS_DISABLE,
207
207
  activeText: t("common.status.enabled"),
208
208
  inactiveText: t("common.status.disabled")
209
209
  }
@@ -213,8 +213,8 @@ const editFields = computed<ProFormField[]>(() => [
213
213
  label: t("system.base.api.field.agent_status"),
214
214
  component: "switch",
215
215
  props: {
216
- activeValue: Status.ENABLE,
217
- inactiveValue: Status.DISABLE,
216
+ activeValue: Status.STATUS_ENABLE,
217
+ inactiveValue: Status.STATUS_DISABLE,
218
218
  activeText: t("common.status.enabled"),
219
219
  inactiveText: t("common.status.disabled")
220
220
  }
@@ -222,8 +222,8 @@ const editFields = computed<ProFormField[]>(() => [
222
222
  ]);
223
223
 
224
224
  const statusOptions = computed(() => [
225
- { label: t("common.status.enabled"), value: Status.ENABLE },
226
- { label: t("common.status.disabled"), value: Status.DISABLE }
225
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
226
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
227
227
  ]);
228
228
 
229
229
  /** API 表格列配置。 */
@@ -250,8 +250,8 @@ const columns = computed<ColumnProps[]>(() => [
250
250
  search: { el: "select" },
251
251
  cellType: "status",
252
252
  statusProps: {
253
- activeValue: Status.ENABLE,
254
- inactiveValue: Status.DISABLE,
253
+ activeValue: Status.STATUS_ENABLE,
254
+ inactiveValue: Status.STATUS_DISABLE,
255
255
  activeText: t("common.status.enabled"),
256
256
  inactiveText: t("common.status.disabled"),
257
257
  disabled: () => !BUTTONS.value["base:api:mcp-status"],
@@ -266,8 +266,8 @@ const columns = computed<ColumnProps[]>(() => [
266
266
  search: { el: "select" },
267
267
  cellType: "status",
268
268
  statusProps: {
269
- activeValue: Status.ENABLE,
270
- inactiveValue: Status.DISABLE,
269
+ activeValue: Status.STATUS_ENABLE,
270
+ inactiveValue: Status.STATUS_DISABLE,
271
271
  activeText: t("common.status.enabled"),
272
272
  inactiveText: t("common.status.disabled"),
273
273
  disabled: () => !BUTTONS.value["base:api:agent-status"],
@@ -358,8 +358,8 @@ function handleCloseEditDialog() {
358
358
  editForm.id = 0;
359
359
  editForm.tool_name = "";
360
360
  editForm.tool_prompts = [];
361
- editForm.mcp_status = Status.ENABLE;
362
- editForm.agent_status = Status.ENABLE;
361
+ editForm.mcp_status = Status.STATUS_ENABLE;
362
+ editForm.agent_status = Status.STATUS_ENABLE;
363
363
  editDialogRef.value?.clearValidate();
364
364
  }
365
365
 
@@ -383,8 +383,8 @@ async function handleSubmitEdit() {
383
383
  * MCP 工具状态切换前进行二次确认,并调用状态接口完成持久化。
384
384
  */
385
385
  async function handleBeforeSetMcpStatus(row: BaseApi) {
386
- const nextStatus = row.mcp_status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
387
- const action = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
386
+ const nextStatus = row.mcp_status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
387
+ const action = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
388
388
  const apiName = row.desc || row.operation || `ID:${row.id}`;
389
389
  try {
390
390
  await ElMessageBox.confirm(t("system.base.api.message.confirm_mcp_status", { action, api: apiName }), t("common.title.notice"), {
@@ -405,8 +405,8 @@ async function handleBeforeSetMcpStatus(row: BaseApi) {
405
405
  * Agent 工具状态切换前进行二次确认,并调用状态接口完成持久化。
406
406
  */
407
407
  async function handleBeforeSetAgentStatus(row: BaseApi) {
408
- const nextStatus = row.agent_status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
409
- const action = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
408
+ const nextStatus = row.agent_status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
409
+ const action = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
410
410
  const apiName = row.desc || row.operation || `ID:${row.id}`;
411
411
  try {
412
412
  await ElMessageBox.confirm(t("system.base.api.message.confirm_agent_status", { action, api: apiName }), t("common.title.notice"), {
@@ -435,8 +435,8 @@ function formatToolPrompts(prompts: string[]) {
435
435
  * 格式化 API 工具状态。
436
436
  */
437
437
  function formatStatus(status: Status) {
438
- if (status === Status.ENABLE) return t("common.status.enabled");
439
- if (status === Status.DISABLE) return t("common.status.disabled");
438
+ if (status === Status.STATUS_ENABLE) return t("common.status.enabled");
439
+ if (status === Status.STATUS_DISABLE) return t("common.status.disabled");
440
440
  return t("common.value.unknown");
441
441
  }
442
442
 
@@ -95,11 +95,11 @@ import type {
95
95
  BaseConfigForm,
96
96
  PageBaseConfigRequest
97
97
  } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_config";
98
- import type { BaseTranslation } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
98
+ import type { BaseI18n } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
99
99
  import { BaseConfigSite } from "@liujitcn/kratos-admin-system/rpc/base/v1/config";
100
100
  import { Status } from "@liujitcn/kratos-admin-system/rpc/common/v1/enum";
101
101
  import { BaseConfigType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_config";
102
- import { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
102
+ import { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
103
103
  import { buildPageRequest, normalizeSelectedIds } from "@liujitcn/kratos-admin-core/table";
104
104
  import { t } from "@liujitcn/kratos-admin-core";
105
105
  import DynamicTranslationEditor from "@liujitcn/kratos-admin-system/components/DynamicTranslationEditor.vue";
@@ -145,7 +145,7 @@ const formData = reactive<BaseConfigFormState>({
145
145
  /** 配置value */
146
146
  value: "",
147
147
  /** 状态 */
148
- status: Status.ENABLE,
148
+ status: Status.STATUS_ENABLE,
149
149
  /** 配置名称非主语言翻译。 */
150
150
  name_translations: [],
151
151
  /** 配置文本或富文本值的非主语言翻译。 */
@@ -178,7 +178,7 @@ function updateConfigTranslations(targetType: TranslationTargetType, values: Dyn
178
178
  target_type: targetType,
179
179
  target_id: formData.id,
180
180
  name: item.text
181
- }) as BaseTranslation
181
+ }) as BaseI18n
182
182
  );
183
183
  if (targetType === TranslationTargetType.TRANSLATION_TARGET_TYPE_BASE_CONFIG_NAME) {
184
184
  formData.name_translations = next;
@@ -253,8 +253,8 @@ const rules = computed(() => ({
253
253
  }));
254
254
 
255
255
  const statusOptions = computed<ProFormOption[]>(() => [
256
- { label: t("common.status.enabled"), value: Status.ENABLE },
257
- { label: t("common.status.disabled"), value: Status.DISABLE }
256
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
257
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
258
258
  ]);
259
259
 
260
260
  /** 字典类系统配置与字典编码的映射关系。 */
@@ -391,8 +391,8 @@ const columns = computed<ColumnProps[]>(() => [
391
391
  search: { el: "select" },
392
392
  cellType: "status",
393
393
  statusProps: {
394
- activeValue: Status.ENABLE,
395
- inactiveValue: Status.DISABLE,
394
+ activeValue: Status.STATUS_ENABLE,
395
+ inactiveValue: Status.STATUS_DISABLE,
396
396
  activeText: t("common.status.enabled"),
397
397
  inactiveText: t("common.status.disabled"),
398
398
  disabled: () => !BUTTONS.value["base:config:status"],
@@ -575,7 +575,7 @@ function resetForm() {
575
575
  formData.value = "";
576
576
  formData.name_translations = [];
577
577
  formData.value_translations = [];
578
- formData.status = Status.ENABLE;
578
+ formData.status = Status.STATUS_ENABLE;
579
579
  }
580
580
 
581
581
  /**
@@ -617,8 +617,8 @@ const handleRefreshCache = useDebounceFn(() => {
617
617
  * 在系统配置状态切换前先完成确认与接口调用,避免首屏渲染触发误操作。
618
618
  */
619
619
  async function handleBeforeSetStatus(row: BaseConfig) {
620
- const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
621
- const text = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
620
+ const nextStatus = row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
621
+ const text = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
622
622
  const configName = row.name || row.key || `ID:${row.id}`;
623
623
  try {
624
624
  await ElMessageBox.confirm(
@@ -71,8 +71,8 @@ const deptOptions = ref<TreeOptionResponse_Option[]>([]);
71
71
  const tenantOptions = ref<SelectOptionResponse_Option[]>([]);
72
72
  const currentTenantId = ref<number | undefined>();
73
73
  const statusOptions = computed<ProFormOption[]>(() => [
74
- { label: t("common.status.enabled"), value: Status.ENABLE },
75
- { label: t("common.status.disabled"), value: Status.DISABLE }
74
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
75
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
76
76
  ]);
77
77
 
78
78
  const formData = reactive<BaseDeptFormState>({
@@ -87,7 +87,7 @@ const formData = reactive<BaseDeptFormState>({
87
87
  /** 排序 */
88
88
  sort: 1,
89
89
  /** 菜单状态 */
90
- status: Status.ENABLE,
90
+ status: Status.STATUS_ENABLE,
91
91
  /** 备注 */
92
92
  remark: ""
93
93
  });
@@ -206,8 +206,8 @@ const columns = computed<ColumnProps[]>(() => [
206
206
  search: { el: "select" },
207
207
  cellType: "status",
208
208
  statusProps: {
209
- activeValue: Status.ENABLE,
210
- inactiveValue: Status.DISABLE,
209
+ activeValue: Status.STATUS_ENABLE,
210
+ inactiveValue: Status.STATUS_DISABLE,
211
211
  activeText: t("common.status.enabled"),
212
212
  inactiveText: t("common.status.disabled"),
213
213
  disabled: () => !BUTTONS.value["base:dept:status"],
@@ -408,7 +408,7 @@ function resetForm() {
408
408
  formData.parent_id = 0;
409
409
  formData.name = "";
410
410
  formData.sort = 1;
411
- formData.status = Status.ENABLE;
411
+ formData.status = Status.STATUS_ENABLE;
412
412
  formData.remark = "";
413
413
  deptOptions.value = [];
414
414
  }
@@ -440,8 +440,8 @@ function handleSubmit() {
440
440
  * 在部门状态切换前先完成确认与接口调用,避免首屏渲染触发误操作。
441
441
  */
442
442
  async function handleBeforeSetStatus(row: BaseDept) {
443
- const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
444
- const text = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
443
+ const nextStatus = row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
444
+ const text = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
445
445
  const deptName = row.name || `ID:${row.id}`;
446
446
  try {
447
447
  await ElMessageBox.confirm(
@@ -50,7 +50,7 @@ import { loadEnabledBaseLanguages } from "@liujitcn/kratos-admin-system/api/syst
50
50
  import type { BaseDict, BaseDictForm, PageBaseDictRequest } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_dict";
51
51
  import router, { navigateTo } from "@liujitcn/kratos-admin-core/navigation";
52
52
  import { Status } from "@liujitcn/kratos-admin-system/rpc/common/v1/enum";
53
- import { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
53
+ import { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
54
54
  import { buildPageRequest, normalizeSelectedIds } from "@liujitcn/kratos-admin-core/table";
55
55
  import { t } from "@liujitcn/kratos-admin-core";
56
56
  import DynamicTranslationEditor from "@liujitcn/kratos-admin-system/components/DynamicTranslationEditor.vue";
@@ -86,7 +86,7 @@ const formData = reactive<BaseDictForm>({
86
86
  /** 非主语言翻译 */
87
87
  translations: [],
88
88
  /** 状态 */
89
- status: Status.ENABLE
89
+ status: Status.STATUS_ENABLE
90
90
  });
91
91
 
92
92
  const rules = computed(() => ({
@@ -116,8 +116,8 @@ const rules = computed(() => ({
116
116
  }));
117
117
 
118
118
  const statusOptions = computed<ProFormOption[]>(() => [
119
- { label: t("common.status.enabled"), value: Status.ENABLE },
120
- { label: t("common.status.disabled"), value: Status.DISABLE }
119
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
120
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
121
121
  ]);
122
122
 
123
123
  /** 字典表单字段配置。 */
@@ -168,8 +168,8 @@ const columns = computed<ColumnProps[]>(() => [
168
168
  search: { el: "select" },
169
169
  cellType: "status",
170
170
  statusProps: {
171
- activeValue: Status.ENABLE,
172
- inactiveValue: Status.DISABLE,
171
+ activeValue: Status.STATUS_ENABLE,
172
+ inactiveValue: Status.STATUS_DISABLE,
173
173
  activeText: t("common.status.enabled"),
174
174
  inactiveText: t("common.status.disabled"),
175
175
  disabled: () => !BUTTONS.value["base:dict:status"],
@@ -282,7 +282,7 @@ function resetForm() {
282
282
  formData.code = "";
283
283
  formData.name = "";
284
284
  formData.translations = [];
285
- formData.status = Status.ENABLE;
285
+ formData.status = Status.STATUS_ENABLE;
286
286
  translationValues.value = normalizeDynamicTranslations(undefined, "name");
287
287
  }
288
288
 
@@ -314,8 +314,8 @@ function handleSubmit() {
314
314
  * 在字典状态切换前先完成确认与接口调用,避免首屏渲染触发误操作。
315
315
  */
316
316
  async function handleBeforeSetStatus(row: BaseDict) {
317
- const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
318
- const action = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
317
+ const nextStatus = row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
318
+ const action = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
319
319
  const dictName = row.name || row.code || String(row.id);
320
320
  try {
321
321
  await ElMessageBox.confirm(
@@ -69,7 +69,7 @@ import type {
69
69
  PageBaseDictItemRequest
70
70
  } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_dict";
71
71
  import { Status } from "@liujitcn/kratos-admin-system/rpc/common/v1/enum";
72
- import { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
72
+ import { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
73
73
  import { buildPageRequest, normalizeSelectedIds } from "@liujitcn/kratos-admin-core/table";
74
74
  import { t } from "@liujitcn/kratos-admin-core";
75
75
  import DynamicTranslationEditor from "@liujitcn/kratos-admin-system/components/DynamicTranslationEditor.vue";
@@ -115,7 +115,7 @@ const formData = reactive<BaseDictItemForm>({
115
115
  /** 排序 */
116
116
  sort: 1,
117
117
  /** 状态 */
118
- status: Status.ENABLE
118
+ status: Status.STATUS_ENABLE
119
119
  });
120
120
 
121
121
  const rules = computed(() => ({
@@ -139,8 +139,8 @@ const rules = computed(() => ({
139
139
  }));
140
140
 
141
141
  const statusOptions = computed<ProFormOption[]>(() => [
142
- { label: t("common.status.enabled"), value: Status.ENABLE },
143
- { label: t("common.status.disabled"), value: Status.DISABLE }
142
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
143
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
144
144
  ]);
145
145
 
146
146
  /** 字典项表单字段配置。 */
@@ -236,8 +236,8 @@ const columns = computed<ColumnProps[]>(() => [
236
236
  search: { el: "select" },
237
237
  cellType: "status",
238
238
  statusProps: {
239
- activeValue: Status.ENABLE,
240
- inactiveValue: Status.DISABLE,
239
+ activeValue: Status.STATUS_ENABLE,
240
+ inactiveValue: Status.STATUS_DISABLE,
241
241
  activeText: t("common.status.enabled"),
242
242
  inactiveText: t("common.status.disabled"),
243
243
  disabled: () => !BUTTONS.value["base:dict-item:status"],
@@ -354,7 +354,7 @@ function resetForm() {
354
354
  formData.translations = [];
355
355
  formData.tag_type = "";
356
356
  formData.sort = 1;
357
- formData.status = Status.ENABLE;
357
+ formData.status = Status.STATUS_ENABLE;
358
358
  translationValues.value = normalizeDynamicTranslations(undefined, "label");
359
359
  }
360
360
 
@@ -389,8 +389,8 @@ function handleSubmit() {
389
389
  * 在字典项状态切换前先完成确认与接口调用,避免首屏渲染触发误操作。
390
390
  */
391
391
  async function handleBeforeSetStatus(row: BaseDictItem) {
392
- const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
393
- const action = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
392
+ const nextStatus = row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
393
+ const action = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
394
394
  const itemName = row.label || row.value || `ID:${row.id}`;
395
395
  try {
396
396
  await ElMessageBox.confirm(