@liujitcn/kratos-admin-system 0.0.26 → 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 (58) 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 +941 -0
  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/en-US.json +2 -0
  24. package/dist/package/src/locales/generated.ts +2 -0
  25. package/dist/package/src/locales/ja-JP.json +935 -0
  26. package/dist/package/src/locales/zh-CN.json +2 -0
  27. package/dist/package/src/locales/zh-TW.json +2 -0
  28. package/dist/package/src/rpc/common/v1/enum.ts +16 -6
  29. package/dist/package/src/rpc/system/admin/v1/base_api.ts +11 -1
  30. package/dist/package/src/rpc/system/admin/v1/base_config.ts +4 -4
  31. package/dist/package/src/rpc/system/admin/v1/base_dict.ts +5 -5
  32. package/dist/package/src/rpc/system/admin/v1/{base_translation.ts → base_i18n.ts} +4 -4
  33. package/dist/package/src/rpc/system/admin/v1/base_menu.ts +3 -3
  34. package/dist/package/src/rpc/system/admin/v1/code_gen_column.ts +1 -1
  35. package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +1 -1
  36. package/dist/package/src/rpc/system/admin/v1/project_document.ts +9 -0
  37. package/dist/package/src/views/ai/chat/message.ts +12 -2
  38. package/dist/package/src/views/base/api/index.vue +20 -20
  39. package/dist/package/src/views/base/config/index.vue +11 -11
  40. package/dist/package/src/views/base/dept/index.vue +8 -8
  41. package/dist/package/src/views/base/dict/index.vue +9 -9
  42. package/dist/package/src/views/base/dict/item.vue +9 -9
  43. package/dist/package/src/views/base/job/index.vue +11 -11
  44. package/dist/package/src/views/base/language/index.vue +9 -9
  45. package/dist/package/src/views/base/menu/index.vue +14 -9
  46. package/dist/package/src/views/base/post/index.vue +8 -8
  47. package/dist/package/src/views/base/role/index.vue +8 -8
  48. package/dist/package/src/views/base/tenant/index.vue +8 -8
  49. package/dist/package/src/views/base/user/index.vue +8 -8
  50. package/dist/package/src/views/tool/code-gen/columns/index.vue +8 -53
  51. package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +1 -1
  52. package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +3 -12
  53. package/dist/package/src/views/tool/code-gen/preview/index.vue +3 -6
  54. package/dist/package/src/views/tool/code-gen/proto/index.vue +7 -8
  55. package/dist/package/src/views/tool/code-gen/table/index.vue +2 -2
  56. package/dist/package/src/views/tool/ops-monitoring/index.vue +23 -25
  57. package/package.json +2 -2
  58. package/dist/package/declarations/src/api/system/base_translation.d.ts +0 -10
@@ -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", {
@@ -166,7 +166,7 @@ const formData = reactive<BaseUserFormState>({
166
166
  /** 头像 */
167
167
  avatar: "",
168
168
  /** 用户状态 */
169
- status: Status.ENABLE,
169
+ status: Status.STATUS_ENABLE,
170
170
  /** 备注名 */
171
171
  remark: ""
172
172
  });
@@ -273,8 +273,8 @@ const baseRoleOptions = ref<SelectOptionResponse_Option[]>([]);
273
273
  const basePostOptions = ref<SelectOptionResponse_Option[]>([]);
274
274
  const tenantOptions = ref<SelectOptionResponse_Option[]>([]);
275
275
  const statusOptions = computed<ProFormOption[]>(() => [
276
- { label: t("common.status.enabled"), value: Status.ENABLE },
277
- { label: t("common.status.disabled"), value: Status.DISABLE }
276
+ { label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
277
+ { label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
278
278
  ]);
279
279
  const resetPwdFields = computed<ProFormField[]>(() => [
280
280
  {
@@ -442,8 +442,8 @@ const columns = computed<ColumnProps[]>(() => [
442
442
  search: { el: "select" },
443
443
  cellType: "status",
444
444
  statusProps: {
445
- activeValue: Status.ENABLE,
446
- inactiveValue: Status.DISABLE,
445
+ activeValue: Status.STATUS_ENABLE,
446
+ inactiveValue: Status.STATUS_DISABLE,
447
447
  activeText: t("common.status.enabled"),
448
448
  inactiveText: t("common.status.disabled"),
449
449
  disabled: scope => isProtectedManagementUser(scope.row as BaseUser) || !BUTTONS.value["base:user:status"],
@@ -690,7 +690,7 @@ function resetForm() {
690
690
  formData.pwd = "";
691
691
  formData.gender = 3;
692
692
  formData.avatar = "";
693
- formData.status = Status.ENABLE;
693
+ formData.status = Status.STATUS_ENABLE;
694
694
  formData.remark = "";
695
695
  baseRoleOptions.value = [];
696
696
  basePostOptions.value = [];
@@ -768,8 +768,8 @@ async function handleBeforeSetStatus(row: BaseUser) {
768
768
  return false;
769
769
  }
770
770
 
771
- const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
772
- const action = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
771
+ const nextStatus = row.status === Status.STATUS_ENABLE ? Status.STATUS_DISABLE : Status.STATUS_ENABLE;
772
+ const action = t(nextStatus === Status.STATUS_ENABLE ? "common.status.enabled" : "common.status.disabled");
773
773
  const userName = row.nick_name || row.user_name || `ID:${row.id}`;
774
774
  try {
775
775
  await ElMessageBox.confirm(t("system.base.user.message.confirm_status", { action, name: userName }), t("common.title.notice"), {