@liujitcn/kratos-admin-system 0.0.26 → 0.0.28

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 (71) 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/api/system/runtime_log.d.ts +13 -0
  4. package/dist/package/declarations/src/api/system/runtime_log_sse.d.ts +8 -0
  5. package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +3 -3
  6. package/dist/package/declarations/src/components/dynamicTranslation.d.ts +1 -1
  7. package/dist/package/declarations/src/locales/generated.d.ts +1057 -0
  8. package/dist/package/declarations/src/rpc/common/v1/enum.d.ts +15 -6
  9. package/dist/package/declarations/src/rpc/system/admin/v1/base_api.d.ts +10 -1
  10. package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +4 -4
  11. package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +5 -5
  12. package/dist/package/declarations/src/rpc/system/admin/v1/{base_translation.d.ts → base_i18n.d.ts} +3 -3
  13. package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +3 -3
  14. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_column.d.ts +1 -1
  15. package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_table.d.ts +1 -1
  16. package/dist/package/declarations/src/rpc/system/admin/v1/ops_monitoring.d.ts +4 -0
  17. package/dist/package/declarations/src/rpc/system/admin/v1/project_document.d.ts +6 -0
  18. package/dist/package/declarations/src/rpc/system/admin/v1/runtime_log.d.ts +96 -0
  19. package/dist/package/declarations/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue.d.ts +1 -1
  20. package/dist/package/declarations/src/views/tool/runtime-log/index.vue.d.ts +3 -0
  21. package/dist/package/src/api/base/sse.ts +3 -2
  22. package/dist/package/src/api/system/{base_translation.ts → base_i18n.ts} +5 -5
  23. package/dist/package/src/api/system/code_gen_i18n.ts +1 -1
  24. package/dist/package/src/api/system/runtime_log.ts +80 -0
  25. package/dist/package/src/api/system/runtime_log_sse.ts +40 -0
  26. package/dist/package/src/components/Ai.vue +9 -2
  27. package/dist/package/src/components/DynamicTranslationCell.vue +9 -9
  28. package/dist/package/src/components/DynamicTranslationEditor.vue +3 -3
  29. package/dist/package/src/components/dynamicTranslation.ts +1 -1
  30. package/dist/package/src/locales/en-US.json +33 -2
  31. package/dist/package/src/locales/generated.ts +2 -0
  32. package/dist/package/src/locales/ja-JP.json +964 -0
  33. package/dist/package/src/locales/zh-CN.json +33 -2
  34. package/dist/package/src/locales/zh-TW.json +33 -2
  35. package/dist/package/src/rpc/common/v1/enum.ts +16 -6
  36. package/dist/package/src/rpc/system/admin/v1/base_api.ts +11 -1
  37. package/dist/package/src/rpc/system/admin/v1/base_config.ts +4 -4
  38. package/dist/package/src/rpc/system/admin/v1/base_dict.ts +5 -5
  39. package/dist/package/src/rpc/system/admin/v1/{base_translation.ts → base_i18n.ts} +4 -4
  40. package/dist/package/src/rpc/system/admin/v1/base_menu.ts +3 -3
  41. package/dist/package/src/rpc/system/admin/v1/code_gen_column.ts +1 -1
  42. package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +1 -1
  43. package/dist/package/src/rpc/system/admin/v1/ops_monitoring.ts +4 -0
  44. package/dist/package/src/rpc/system/admin/v1/project_document.ts +6 -0
  45. package/dist/package/src/rpc/system/admin/v1/runtime_log.ts +113 -0
  46. package/dist/package/src/views/ai/chat/message.ts +12 -2
  47. package/dist/package/src/views/base/api/index.vue +20 -20
  48. package/dist/package/src/views/base/config/index.vue +11 -11
  49. package/dist/package/src/views/base/dept/index.vue +8 -8
  50. package/dist/package/src/views/base/dict/index.vue +9 -9
  51. package/dist/package/src/views/base/dict/item.vue +9 -9
  52. package/dist/package/src/views/base/job/index.vue +11 -11
  53. package/dist/package/src/views/base/language/index.vue +9 -9
  54. package/dist/package/src/views/base/menu/index.vue +14 -9
  55. package/dist/package/src/views/base/post/index.vue +8 -8
  56. package/dist/package/src/views/base/role/index.vue +8 -8
  57. package/dist/package/src/views/base/tenant/index.vue +8 -8
  58. package/dist/package/src/views/base/user/index.vue +8 -8
  59. package/dist/package/src/views/tool/api-doc/index.vue +14 -6
  60. package/dist/package/src/views/tool/code-gen/code-preview/index.vue +17 -0
  61. package/dist/package/src/views/tool/code-gen/columns/index.vue +8 -53
  62. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +97 -15
  63. package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +3 -12
  64. package/dist/package/src/views/tool/code-gen/preview/index.vue +3 -6
  65. package/dist/package/src/views/tool/code-gen/proto/index.vue +7 -8
  66. package/dist/package/src/views/tool/code-gen/table/index.vue +34 -2
  67. package/dist/package/src/views/tool/ops-monitoring/index.vue +153 -49
  68. package/dist/package/src/views/tool/project-doc/index.vue +9 -4
  69. package/dist/package/src/views/tool/runtime-log/index.vue +883 -0
  70. package/package.json +2 -2
  71. package/dist/package/declarations/src/api/system/base_translation.d.ts +0 -10
@@ -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(
@@ -69,7 +69,7 @@ const formData = reactive<BaseJobForm>({
69
69
  /** cron表达式 */
70
70
  cron_expression: "",
71
71
  /** 状态 */
72
- status: Status.ENABLE
72
+ status: Status.STATUS_ENABLE
73
73
  });
74
74
 
75
75
  const rules = computed(() => ({
@@ -118,8 +118,8 @@ const rules = computed(() => ({
118
118
  }));
119
119
 
120
120
  const statusOptions = computed<ProFormOption[]>(() => [
121
- { label: t("common.status.enabled"), value: Status.ENABLE },
122
- { label: t("common.status.disabled"), value: Status.DISABLE }
121
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
122
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
123
123
  ]);
124
124
 
125
125
  /**
@@ -183,7 +183,7 @@ function renderOperationCell(scope: RenderScope<BaseJob>) {
183
183
  );
184
184
  }
185
185
 
186
- if (row.status === Status.ENABLE && (row.entry_id === undefined || row.entry_id === 0) && BUTTONS.value["base:job:start"]) {
186
+ if (row.status === Status.STATUS_ENABLE && (row.entry_id === undefined || row.entry_id === 0) && BUTTONS.value["base:job:start"]) {
187
187
  actionNodes.push(
188
188
  h(
189
189
  ElButton,
@@ -200,7 +200,7 @@ function renderOperationCell(scope: RenderScope<BaseJob>) {
200
200
  );
201
201
  }
202
202
 
203
- if (row.status === Status.ENABLE && row.entry_id > 0 && BUTTONS.value["base:job:stop"]) {
203
+ if (row.status === Status.STATUS_ENABLE && row.entry_id > 0 && BUTTONS.value["base:job:stop"]) {
204
204
  actionNodes.push(
205
205
  h(
206
206
  ElButton,
@@ -217,7 +217,7 @@ function renderOperationCell(scope: RenderScope<BaseJob>) {
217
217
  );
218
218
  }
219
219
 
220
- if (row.status === Status.ENABLE && (row.entry_id === undefined || row.entry_id === 0) && BUTTONS.value["base:job:exec"]) {
220
+ if (row.status === Status.STATUS_ENABLE && (row.entry_id === undefined || row.entry_id === 0) && BUTTONS.value["base:job:exec"]) {
221
221
  actionNodes.push(
222
222
  h(
223
223
  ElButton,
@@ -315,8 +315,8 @@ const columns = computed<ColumnProps[]>(() => [
315
315
  search: { el: "select" },
316
316
  cellType: "status",
317
317
  statusProps: {
318
- activeValue: Status.ENABLE,
319
- inactiveValue: Status.DISABLE,
318
+ activeValue: Status.STATUS_ENABLE,
319
+ inactiveValue: Status.STATUS_DISABLE,
320
320
  activeText: t("common.status.enabled"),
321
321
  inactiveText: t("common.status.disabled"),
322
322
  disabled: scope => (scope.row as BaseJob).entry_id === 0 || !BUTTONS.value["base:job:status"],
@@ -401,7 +401,7 @@ function resetForm() {
401
401
  formData.invoke_target = "";
402
402
  formData.args = [];
403
403
  formData.cron_expression = "";
404
- formData.status = Status.ENABLE;
404
+ formData.status = Status.STATUS_ENABLE;
405
405
  }
406
406
 
407
407
  /**
@@ -427,8 +427,8 @@ function handleSubmit() {
427
427
  * 在定时任务状态切换前先完成确认与接口调用,避免首屏渲染触发误操作。
428
428
  */
429
429
  async function handleBeforeSetStatus(row: BaseJob) {
430
- const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
431
- const action = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
430
+ const nextStatus = row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
431
+ const action = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
432
432
  const jobName = row.name || row.invoke_target || `ID:${row.id}`;
433
433
  try {
434
434
  await ElMessageBox.confirm(t("system.base.job.message.confirm_status", { action, name: jobName }), t("common.title.notice"), {
@@ -50,7 +50,7 @@ const formData = reactive<BaseLanguageForm>({
50
50
  language_name: "",
51
51
  native_name: "",
52
52
  sort: 100,
53
- status: Status.ENABLE
53
+ status: Status.STATUS_ENABLE
54
54
  });
55
55
 
56
56
  const rules = computed(() => ({
@@ -70,8 +70,8 @@ const rules = computed(() => ({
70
70
  }));
71
71
 
72
72
  const statusOptions = computed<ProFormOption[]>(() => [
73
- { label: t("common.status.enabled"), value: Status.ENABLE },
74
- { label: t("common.status.disabled"), value: Status.DISABLE }
73
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
74
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
75
75
  ]);
76
76
 
77
77
  const formFields = computed<ProFormField[]>(() => [
@@ -107,8 +107,8 @@ const columns = computed<ColumnProps[]>(() => [
107
107
  search: { el: "select" },
108
108
  cellType: "status",
109
109
  statusProps: {
110
- activeValue: Status.ENABLE,
111
- inactiveValue: Status.DISABLE,
110
+ activeValue: Status.STATUS_ENABLE,
111
+ inactiveValue: Status.STATUS_DISABLE,
112
112
  activeText: t("common.status.enabled"),
113
113
  inactiveText: t("common.status.disabled"),
114
114
  disabled: () => !BUTTONS.value["base:language:status"],
@@ -160,7 +160,7 @@ function handleCloseDialog() {
160
160
  function resetForm() {
161
161
  formDialogRef.value?.resetFields();
162
162
  formDialogRef.value?.clearValidate();
163
- Object.assign(formData, { id: 0, language_code: "", language_name: "", native_name: "", sort: 100, status: Status.ENABLE });
163
+ Object.assign(formData, { id: 0, language_code: "", language_name: "", native_name: "", sort: 100, status: Status.STATUS_ENABLE });
164
164
  }
165
165
 
166
166
  /** 提交语言表单。 */
@@ -183,18 +183,18 @@ function handleSubmit() {
183
183
 
184
184
  /** 设置语言状态前保护主语言。 */
185
185
  function handleBeforeSetStatus(row: BaseLanguage) {
186
- if (row.is_primary && row.status === Status.ENABLE) {
186
+ if (row.is_primary && row.status === Status.STATUS_ENABLE) {
187
187
  ElMessage.warning(t("system.base.language.message.primary_cannot_disable"));
188
188
  return Promise.resolve(false);
189
189
  }
190
190
  return ElMessageBox.confirm(
191
- t("system.base.language.message.confirm_status", { action: row.status === Status.ENABLE ? t("common.status.disabled") : t("common.status.enabled"), name: row.native_name }),
191
+ t("system.base.language.message.confirm_status", { action: row.status === Status.STATUS_ENABLE ? t("common.status.disabled") : t("common.status.enabled"), name: row.native_name }),
192
192
  t("common.title.warning"),
193
193
  { type: "warning", confirmButtonText: t("common.action.confirm"), cancelButtonText: t("common.action.cancel") }
194
194
  ).then(
195
195
  () =>
196
196
  defBaseLanguageService
197
- .SetBaseLanguageStatus({ id: row.id, status: row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE })
197
+ .SetBaseLanguageStatus({ id: row.id, status: row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE })
198
198
  .then(() => {
199
199
  invalidateEnabledBaseLanguages();
200
200
  void refreshAdminLanguageConfig();
@@ -16,8 +16,10 @@
16
16
  <FormDialog
17
17
  v-model="dialog.visible"
18
18
  ref="formDialogRef"
19
+ class="menu-form-dialog"
19
20
  :title="t(dialog.editing ? 'system.base.menu.action.edit' : 'system.base.menu.action.create')"
20
21
  width="1180px"
22
+ label-width="180px"
21
23
  :model="formData"
22
24
  :fields="formFields"
23
25
  :rules="rules"
@@ -77,7 +79,7 @@ import type {
77
79
  } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_menu";
78
80
  import { Status } from "@liujitcn/kratos-admin-system/rpc/common/v1/enum";
79
81
  import { BaseMenuType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/common";
80
- import { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_translation";
82
+ import { TranslationTargetType } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
81
83
  import { normalizeSelectedIds } from "@liujitcn/kratos-admin-core/table";
82
84
  import { t } from "@liujitcn/kratos-admin-core";
83
85
  import DynamicTranslationEditor from "@liujitcn/kratos-admin-system/components/DynamicTranslationEditor.vue";
@@ -159,7 +161,7 @@ function createDefaultMenuForm(): MenuFormState {
159
161
  api: [],
160
162
  translations: [],
161
163
  sort: 1,
162
- status: Status.ENABLE
164
+ status: Status.STATUS_ENABLE
163
165
  };
164
166
  }
165
167
 
@@ -249,8 +251,8 @@ watch(
249
251
  );
250
252
 
251
253
  const statusOptions = computed<ProFormOption[]>(() => [
252
- { label: t("common.status.enabled"), value: Status.ENABLE },
253
- { label: t("common.status.disabled"), value: Status.DISABLE }
254
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
255
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
254
256
  ]);
255
257
 
256
258
  const appAccessOptions = computed<ProFormOption[]>(() => [
@@ -339,8 +341,8 @@ const columns = computed<ColumnProps[]>(() => [
339
341
  search: { el: "select" },
340
342
  cellType: "status",
341
343
  statusProps: {
342
- activeValue: Status.ENABLE,
343
- inactiveValue: Status.DISABLE,
344
+ activeValue: Status.STATUS_ENABLE,
345
+ inactiveValue: Status.STATUS_DISABLE,
344
346
  activeText: t("common.status.enabled"),
345
347
  inactiveText: t("common.status.disabled"),
346
348
  disabled: () => !BUTTONS.value["base:menu:status"],
@@ -965,7 +967,7 @@ function normalizeMenuForm(data?: Partial<BaseMenuForm>): MenuFormState {
965
967
  ...data,
966
968
  parent_id: parentId,
967
969
  type: data?.type ?? BaseMenuType.BASE_MENU_TYPE_FOLDER,
968
- status: data?.status ?? Status.ENABLE,
970
+ status: data?.status ?? Status.STATUS_ENABLE,
969
971
  api: normalizeMenuApiSelection(data?.api),
970
972
  sort: data?.sort ?? 1,
971
973
  meta: normalizedMeta
@@ -1168,8 +1170,8 @@ async function handleSubmit() {
1168
1170
  * 在菜单状态切换前先完成确认与接口调用,避免首屏渲染触发误操作。
1169
1171
  */
1170
1172
  async function handleBeforeSetStatus(row: BaseMenu) {
1171
- const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
1172
- const action = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
1173
+ const nextStatus = row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
1174
+ const action = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
1173
1175
  const menuName = row.meta?.title || row.name || row.path || `ID:${row.id}`;
1174
1176
  try {
1175
1177
  await ElMessageBox.confirm(
@@ -1240,6 +1242,9 @@ function handleDeleteMenu(selected?: number | string | Array<number | string> |
1240
1242
  .table-box {
1241
1243
  height: 100%;
1242
1244
  }
1245
+ :global(.menu-form-dialog .el-form-item__label) {
1246
+ white-space: nowrap;
1247
+ }
1243
1248
  :deep(.menu-form__params .el-form-item__content) {
1244
1249
  align-items: flex-start;
1245
1250
  }
@@ -64,8 +64,8 @@ const dialog = reactive({
64
64
  });
65
65
  const tenantOptions = ref<SelectOptionResponse_Option[]>([]);
66
66
  const statusOptions = computed<ProFormOption[]>(() => [
67
- { label: t("common.status.enabled"), value: Status.ENABLE },
68
- { label: t("common.status.disabled"), value: Status.DISABLE }
67
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
68
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
69
69
  ]);
70
70
  const formData = reactive<BasePostFormState>({
71
71
  /** 岗位ID。 */
@@ -79,7 +79,7 @@ const formData = reactive<BasePostFormState>({
79
79
  /** 显示顺序。 */
80
80
  sort: 1,
81
81
  /** 状态。 */
82
- status: Status.ENABLE,
82
+ status: Status.STATUS_ENABLE,
83
83
  /** 备注。 */
84
84
  remark: ""
85
85
  });
@@ -201,8 +201,8 @@ const columns = computed<ColumnProps[]>(() => [
201
201
  search: { el: "select" },
202
202
  cellType: "status",
203
203
  statusProps: {
204
- activeValue: Status.ENABLE,
205
- inactiveValue: Status.DISABLE,
204
+ activeValue: Status.STATUS_ENABLE,
205
+ inactiveValue: Status.STATUS_DISABLE,
206
206
  activeText: t("common.status.enabled"),
207
207
  inactiveText: t("common.status.disabled"),
208
208
  disabled: () => !BUTTONS.value["base:post:status"],
@@ -304,7 +304,7 @@ function resetForm() {
304
304
  formData.name = "";
305
305
  formData.code = "";
306
306
  formData.sort = 1;
307
- formData.status = Status.ENABLE;
307
+ formData.status = Status.STATUS_ENABLE;
308
308
  formData.remark = "";
309
309
  }
310
310
 
@@ -330,8 +330,8 @@ function handleSubmit() {
330
330
 
331
331
  /** 在岗位状态切换前确认并提交。 */
332
332
  async function handleBeforeSetStatus(row: BasePost) {
333
- const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
334
- const text = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
333
+ const nextStatus = row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
334
+ const text = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
335
335
  try {
336
336
  await ElMessageBox.confirm(
337
337
  t("common.dialog.status_change", {
@@ -135,8 +135,8 @@ const dialog = reactive({
135
135
  const menuPermOptions = ref<TreeOptionResponse_Option[]>([]);
136
136
  const tenantOptions = ref<SelectOptionResponse_Option[]>([]);
137
137
  const statusOptions = computed<ProFormOption[]>(() => [
138
- { label: t("common.status.enabled"), value: Status.ENABLE },
139
- { label: t("common.status.disabled"), value: Status.DISABLE }
138
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
139
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
140
140
  ]);
141
141
  const protectedRoleCodes = new Set(["admin", "authuser", "user"]);
142
142
 
@@ -154,7 +154,7 @@ const formData = reactive<BaseRoleFormState>({
154
154
  /** 分配的菜单列表 */
155
155
  menus: [],
156
156
  /** 状态 */
157
- status: Status.ENABLE,
157
+ status: Status.STATUS_ENABLE,
158
158
  /** 备注 */
159
159
  remark: ""
160
160
  });
@@ -331,8 +331,8 @@ const columns = computed<ColumnProps[]>(() => [
331
331
  search: { el: "select" },
332
332
  cellType: "status",
333
333
  statusProps: {
334
- activeValue: Status.ENABLE,
335
- inactiveValue: Status.DISABLE,
334
+ activeValue: Status.STATUS_ENABLE,
335
+ inactiveValue: Status.STATUS_DISABLE,
336
336
  activeText: t("common.status.enabled"),
337
337
  inactiveText: t("common.status.disabled"),
338
338
  disabled: scope => !canChangeRoleStatus(scope.row as BaseRole) || !BUTTONS.value["base:role:status"],
@@ -479,7 +479,7 @@ function resetForm() {
479
479
  formData.code = "";
480
480
  formData.data_scope = 1;
481
481
  formData.menus = [];
482
- formData.status = Status.ENABLE;
482
+ formData.status = Status.STATUS_ENABLE;
483
483
  formData.remark = "";
484
484
  menuPermOptions.value = [];
485
485
  }
@@ -541,8 +541,8 @@ async function handleBeforeSetStatus(row: BaseRole) {
541
541
  return false;
542
542
  }
543
543
 
544
- const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
545
- const action = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
544
+ const nextStatus = row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
545
+ const action = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
546
546
  const roleName = row.name || row.code || `ID:${row.id}`;
547
547
  try {
548
548
  await ElMessageBox.confirm(t("system.base.role.message.confirm_status", { action, name: roleName }), t("common.title.notice"), {
@@ -68,7 +68,7 @@ const formData = reactive<BaseTenantForm>({
68
68
  /** 联系电话 */
69
69
  contact_phone: "",
70
70
  /** 状态 */
71
- status: Status.ENABLE,
71
+ status: Status.STATUS_ENABLE,
72
72
  /** 备注 */
73
73
  remark: ""
74
74
  });
@@ -119,8 +119,8 @@ const rules = computed(() => ({
119
119
  }));
120
120
 
121
121
  const statusOptions = computed<ProFormOption[]>(() => [
122
- { label: t("common.status.enabled"), value: Status.ENABLE },
123
- { label: t("common.status.disabled"), value: Status.DISABLE }
122
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
123
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
124
124
  ]);
125
125
 
126
126
  /** 租户表单字段配置。 */
@@ -174,8 +174,8 @@ const columns = computed<ColumnProps[]>(() => [
174
174
  search: { el: "select" },
175
175
  cellType: "status",
176
176
  statusProps: {
177
- activeValue: Status.ENABLE,
178
- inactiveValue: Status.DISABLE,
177
+ activeValue: Status.STATUS_ENABLE,
178
+ inactiveValue: Status.STATUS_DISABLE,
179
179
  activeText: t("common.status.enabled"),
180
180
  inactiveText: t("common.status.disabled"),
181
181
  disabled: scope => isProtectedManagementTenant(scope.row as BaseTenant) || !BUTTONS.value["base:tenant:status"],
@@ -285,7 +285,7 @@ function resetForm() {
285
285
  formData.name = "";
286
286
  formData.contact_name = "";
287
287
  formData.contact_phone = "";
288
- formData.status = Status.ENABLE;
288
+ formData.status = Status.STATUS_ENABLE;
289
289
  formData.remark = "";
290
290
  }
291
291
 
@@ -321,8 +321,8 @@ async function handleBeforeSetStatus(row: BaseTenant) {
321
321
  return false;
322
322
  }
323
323
 
324
- const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
325
- const text = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
324
+ const nextStatus = row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
325
+ const text = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
326
326
  try {
327
327
  await ElMessageBox.confirm(
328
328
  t("common.dialog.status_change", {