@liujitcn/kratos-admin-system 0.0.20 → 0.0.21
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.
- package/README.md +51 -50
- package/dist/package/declarations/src/api/system/base_language.d.ts +51 -0
- package/dist/package/declarations/src/api/system/base_translation.d.ts +7 -0
- package/dist/package/declarations/src/api/system/code_gen_i18n.d.ts +8 -0
- package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +39 -0
- package/dist/package/declarations/src/components/DynamicTranslationEditor.vue.d.ts +23 -0
- package/dist/package/declarations/src/components/dynamicTranslation.d.ts +44 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +5 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +79 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_language.d.ts +114 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +40 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_translation.d.ts +102 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/code_gen.d.ts +2 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_column.d.ts +7 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_table.d.ts +13 -0
- package/dist/package/declarations/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue.d.ts +23 -0
- package/dist/package/declarations/src/views/tool/code-gen/config.d.ts +7 -7
- package/dist/package/declarations/src/views/tool/language/index.vue.d.ts +3 -0
- package/dist/package/src/api/base/ai_message.ts +7 -12
- package/dist/package/src/api/base/sse.ts +3 -1
- package/dist/package/src/api/system/base_language.ts +137 -0
- package/dist/package/src/api/system/base_translation.ts +22 -0
- package/dist/package/src/api/system/code_gen_column.ts +17 -3
- package/dist/package/src/api/system/code_gen_i18n.ts +18 -0
- package/dist/package/src/api/system/code_gen_table.ts +12 -4
- package/dist/package/src/components/DynamicTranslationCell.vue +176 -0
- package/dist/package/src/components/DynamicTranslationEditor.vue +166 -0
- package/dist/package/src/components/dynamicTranslation.ts +86 -0
- package/dist/package/src/locales/README.md +28 -0
- package/dist/package/src/locales/en-US.json +929 -0
- package/dist/package/src/locales/es-ES.json +928 -0
- package/dist/package/src/locales/fr-FR.json +928 -0
- package/dist/package/src/locales/ja-JP.json +929 -0
- package/dist/package/src/locales/ko-KR.json +928 -0
- package/dist/package/src/locales/zh-CN.json +929 -0
- package/dist/package/src/locales/zh-TW.json +928 -0
- package/dist/package/src/module.ts +19 -1
- package/dist/package/src/rpc/system/admin/v1/base_config.ts +5 -0
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +81 -0
- package/dist/package/src/rpc/system/admin/v1/base_language.ts +135 -0
- package/dist/package/src/rpc/system/admin/v1/base_menu.ts +41 -0
- package/dist/package/src/rpc/system/admin/v1/base_translation.ts +117 -0
- package/dist/package/src/rpc/system/admin/v1/code_gen.ts +5 -1
- package/dist/package/src/rpc/system/admin/v1/code_gen_column.ts +8 -0
- package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +15 -0
- package/dist/package/src/views/ai/chat/components/AiMarkdown.vue +1 -6
- package/dist/package/src/views/ai/chat/components/ChatPanel.vue +70 -53
- package/dist/package/src/views/ai/chat/components/SessionPanel.vue +20 -9
- package/dist/package/src/views/ai/chat/components/XSender.vue +36 -23
- package/dist/package/src/views/ai/chat/index.vue +55 -39
- package/dist/package/src/views/ai/chat/message.ts +18 -17
- package/dist/package/src/views/base/api/index.vue +121 -83
- package/dist/package/src/views/base/area/index.vue +81 -31
- package/dist/package/src/views/base/config/index.vue +272 -78
- package/dist/package/src/views/base/dept/index.vue +110 -61
- package/dist/package/src/views/base/dict/index.vue +137 -58
- package/dist/package/src/views/base/dict/item.vue +147 -61
- package/dist/package/src/views/base/job/index.vue +134 -81
- package/dist/package/src/views/base/job/log.vue +21 -22
- package/dist/package/src/views/base/log/index.vue +68 -46
- package/dist/package/src/views/base/menu/index.vue +257 -156
- package/dist/package/src/views/base/migration/index.vue +49 -29
- package/dist/package/src/views/base/post/index.vue +128 -59
- package/dist/package/src/views/base/role/index.vue +145 -78
- package/dist/package/src/views/base/tenant/index.vue +132 -63
- package/dist/package/src/views/base/user/components/dept-tree.vue +2 -1
- package/dist/package/src/views/base/user/index.vue +192 -112
- package/dist/package/src/views/profile/components/base.vue +44 -27
- package/dist/package/src/views/profile/components/password.vue +43 -27
- package/dist/package/src/views/profile/components/security.vue +89 -53
- package/dist/package/src/views/profile/index.vue +10 -9
- package/dist/package/src/views/tool/api-doc/index.vue +6 -2
- package/dist/package/src/views/tool/code-gen/code-preview/index.vue +30 -14
- package/dist/package/src/views/tool/code-gen/columns/index.vue +382 -273
- package/dist/package/src/views/tool/code-gen/columns/option-copy.ts +1 -6
- package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +118 -0
- package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +65 -36
- package/dist/package/src/views/tool/code-gen/components/CodePreviewPane.vue +8 -5
- package/dist/package/src/views/tool/code-gen/config.ts +114 -77
- package/dist/package/src/views/tool/code-gen/preview/data.ts +19 -17
- package/dist/package/src/views/tool/code-gen/preview/index.vue +96 -58
- package/dist/package/src/views/tool/code-gen/proto/index.vue +110 -62
- package/dist/package/src/views/tool/code-gen/table/index.vue +197 -117
- package/dist/package/src/views/tool/language/index.vue +256 -0
- package/dist/package/src/views/tool/project-doc/index.vue +17 -15
- package/package.json +6 -2
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<FormDialog
|
|
13
13
|
v-model="dialog.visible"
|
|
14
14
|
ref="formDialogRef"
|
|
15
|
-
:title="dialog.
|
|
15
|
+
:title="t(dialog.titleKey, { resource: t('system.tenant.resource') })"
|
|
16
16
|
width="780px"
|
|
17
17
|
:model="formData"
|
|
18
18
|
:fields="formFields"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script setup lang="ts">
|
|
28
|
-
import { reactive, ref } from "vue";
|
|
28
|
+
import { computed, reactive, ref } from "vue";
|
|
29
29
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
30
30
|
import { CirclePlus, Delete, EditPen } from "@element-plus/icons-vue";
|
|
31
31
|
import type { ColumnProps, HeaderActionProps, ProTableInstance } from "@liujitcn/kratos-admin-core/components/ProTable/interface";
|
|
@@ -34,9 +34,14 @@ import FormDialog from "@liujitcn/kratos-admin-core/components/Dialog/FormDialog
|
|
|
34
34
|
import type { ProFormField, ProFormOption } from "@liujitcn/kratos-admin-core/components/ProForm/interface";
|
|
35
35
|
import { useAuthButtons } from "@liujitcn/kratos-admin-core/auth";
|
|
36
36
|
import { defBaseTenantService } from "@liujitcn/kratos-admin-system/api/system/base_tenant";
|
|
37
|
-
import type {
|
|
37
|
+
import type {
|
|
38
|
+
BaseTenant,
|
|
39
|
+
BaseTenantForm,
|
|
40
|
+
PageBaseTenantRequest
|
|
41
|
+
} from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_tenant";
|
|
38
42
|
import { Status } from "@liujitcn/kratos-admin-system/rpc/common/v1/enum";
|
|
39
43
|
import { buildPageRequest, normalizeSelectedIds } from "@liujitcn/kratos-admin-core/table";
|
|
44
|
+
import { t } from "@liujitcn/kratos-admin-core";
|
|
40
45
|
|
|
41
46
|
defineOptions({
|
|
42
47
|
name: "BaseTenant",
|
|
@@ -48,7 +53,7 @@ const proTable = ref<ProTableInstance>();
|
|
|
48
53
|
const formDialogRef = ref<InstanceType<typeof FormDialog>>();
|
|
49
54
|
|
|
50
55
|
const dialog = reactive({
|
|
51
|
-
|
|
56
|
+
titleKey: "system.common.action.createResource",
|
|
52
57
|
visible: false
|
|
53
58
|
});
|
|
54
59
|
|
|
@@ -70,74 +75,125 @@ const formData = reactive<BaseTenantForm>({
|
|
|
70
75
|
});
|
|
71
76
|
|
|
72
77
|
/** 租户表单校验规则。 */
|
|
73
|
-
const rules =
|
|
78
|
+
const rules = computed(() => ({
|
|
74
79
|
name: [
|
|
75
|
-
{
|
|
76
|
-
|
|
80
|
+
{
|
|
81
|
+
required: true,
|
|
82
|
+
message: t("system.common.validation.requiredInput", { field: t("system.tenant.field.name") }),
|
|
83
|
+
trigger: "blur"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
max: 100,
|
|
87
|
+
message: t("system.common.validation.maxLength", { field: t("system.tenant.field.name"), max: 100 }),
|
|
88
|
+
trigger: "blur"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
contact_name: [
|
|
92
|
+
{
|
|
93
|
+
max: 50,
|
|
94
|
+
message: t("system.common.validation.maxLength", { field: t("system.tenant.field.contactName"), max: 50 }),
|
|
95
|
+
trigger: "blur"
|
|
96
|
+
}
|
|
77
97
|
],
|
|
78
|
-
contact_name: [{ max: 50, message: "联系人不能超过 50 个字符", trigger: "blur" }],
|
|
79
98
|
contact_phone: [
|
|
80
|
-
{
|
|
81
|
-
|
|
99
|
+
{
|
|
100
|
+
max: 20,
|
|
101
|
+
message: t("system.common.validation.maxLength", { field: t("system.tenant.field.contactPhone"), max: 20 }),
|
|
102
|
+
trigger: "blur"
|
|
103
|
+
},
|
|
104
|
+
{ pattern: /^1[3-9]\d{9}$/, message: t("system.tenant.message.phoneInvalid"), trigger: "blur" }
|
|
82
105
|
],
|
|
83
|
-
status: [
|
|
84
|
-
|
|
85
|
-
|
|
106
|
+
status: [
|
|
107
|
+
{
|
|
108
|
+
required: true,
|
|
109
|
+
message: t("system.common.validation.requiredSelect", { field: t("system.common.field.status") }),
|
|
110
|
+
trigger: "change"
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
remark: [
|
|
114
|
+
{
|
|
115
|
+
max: 500,
|
|
116
|
+
message: t("system.common.validation.maxLength", { field: t("system.common.field.remark"), max: 500 }),
|
|
117
|
+
trigger: "blur"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}));
|
|
86
121
|
|
|
87
|
-
const statusOptions
|
|
88
|
-
{ label: "
|
|
89
|
-
{ label: "
|
|
90
|
-
];
|
|
122
|
+
const statusOptions = computed<ProFormOption[]>(() => [
|
|
123
|
+
{ label: t("common.status.enabled"), value: Status.ENABLE },
|
|
124
|
+
{ label: t("common.status.disabled"), value: Status.DISABLE }
|
|
125
|
+
]);
|
|
91
126
|
|
|
92
127
|
/** 租户表单字段配置。 */
|
|
93
|
-
const formFields
|
|
128
|
+
const formFields = computed<ProFormField[]>(() => [
|
|
94
129
|
{
|
|
95
130
|
prop: "code",
|
|
96
|
-
label: "
|
|
131
|
+
label: t("system.tenant.field.code"),
|
|
97
132
|
component: "input",
|
|
98
133
|
props: { disabled: true },
|
|
99
134
|
visible: model => Boolean(model.id)
|
|
100
135
|
},
|
|
101
|
-
{
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
136
|
+
{
|
|
137
|
+
prop: "name",
|
|
138
|
+
label: t("system.tenant.field.name"),
|
|
139
|
+
component: "input",
|
|
140
|
+
props: { placeholder: t("system.common.validation.requiredInput", { field: t("system.tenant.field.name") }) }
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
prop: "contact_name",
|
|
144
|
+
label: t("system.tenant.field.contactName"),
|
|
145
|
+
component: "input",
|
|
146
|
+
props: { placeholder: t("system.common.validation.requiredInput", { field: t("system.tenant.field.contactName") }) }
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
prop: "contact_phone",
|
|
150
|
+
label: t("system.tenant.field.contactPhone"),
|
|
151
|
+
component: "input",
|
|
152
|
+
props: { placeholder: t("system.common.validation.requiredInput", { field: t("system.tenant.field.contactPhone") }) }
|
|
153
|
+
},
|
|
154
|
+
{ prop: "status", label: t("system.common.field.status"), component: "radio-group", options: statusOptions.value },
|
|
155
|
+
{
|
|
156
|
+
prop: "remark",
|
|
157
|
+
label: t("system.common.field.remark"),
|
|
158
|
+
component: "textarea",
|
|
159
|
+
props: { placeholder: t("system.common.placeholder.remark"), rows: 3 },
|
|
160
|
+
colSpan: 24
|
|
161
|
+
}
|
|
162
|
+
]);
|
|
107
163
|
|
|
108
164
|
/** 租户表格列配置。 */
|
|
109
|
-
const columns
|
|
165
|
+
const columns = computed<ColumnProps[]>(() => [
|
|
110
166
|
{ type: "selection", width: 55, selectable: row => !isProtectedManagementTenant(row as BaseTenant) },
|
|
111
|
-
{ prop: "code", label: "
|
|
112
|
-
{ prop: "name", label: "
|
|
113
|
-
{ prop: "contact_name", label: "
|
|
114
|
-
{ prop: "contact_phone", label: "
|
|
167
|
+
{ prop: "code", label: t("system.tenant.field.code"), minWidth: 140, search: { el: "input", order: 1 } },
|
|
168
|
+
{ prop: "name", label: t("system.tenant.field.name"), minWidth: 160, search: { el: "input", order: 2 } },
|
|
169
|
+
{ prop: "contact_name", label: t("system.tenant.field.contactName"), minWidth: 120 },
|
|
170
|
+
{ prop: "contact_phone", label: t("system.tenant.field.contactPhone"), minWidth: 140 },
|
|
115
171
|
{
|
|
116
172
|
prop: "status",
|
|
117
|
-
label: "
|
|
173
|
+
label: t("system.common.field.status"),
|
|
118
174
|
minWidth: 100,
|
|
119
175
|
search: { el: "select" },
|
|
120
176
|
cellType: "status",
|
|
121
177
|
statusProps: {
|
|
122
178
|
activeValue: Status.ENABLE,
|
|
123
179
|
inactiveValue: Status.DISABLE,
|
|
124
|
-
activeText: "
|
|
125
|
-
inactiveText: "
|
|
180
|
+
activeText: t("common.status.enabled"),
|
|
181
|
+
inactiveText: t("common.status.disabled"),
|
|
126
182
|
disabled: scope => isProtectedManagementTenant(scope.row as BaseTenant) || !BUTTONS.value["base:tenant:status"],
|
|
127
183
|
beforeChange: scope => handleBeforeSetStatus(scope.row as BaseTenant)
|
|
128
184
|
}
|
|
129
185
|
},
|
|
130
|
-
{ prop: "created_at", label: "
|
|
131
|
-
{ prop: "updated_at", label: "
|
|
186
|
+
{ prop: "created_at", label: t("system.common.field.createdAt"), minWidth: 180 },
|
|
187
|
+
{ prop: "updated_at", label: t("system.common.field.updatedAt"), minWidth: 180 },
|
|
132
188
|
{
|
|
133
189
|
prop: "operation",
|
|
134
|
-
label: "
|
|
190
|
+
label: t("system.common.field.operation"),
|
|
135
191
|
width: 150,
|
|
136
192
|
fixed: "right",
|
|
137
193
|
cellType: "actions",
|
|
138
194
|
actions: [
|
|
139
195
|
{
|
|
140
|
-
label: "
|
|
196
|
+
label: t("common.action.edit"),
|
|
141
197
|
type: "primary",
|
|
142
198
|
link: true,
|
|
143
199
|
icon: EditPen,
|
|
@@ -146,7 +202,7 @@ const columns: ColumnProps[] = [
|
|
|
146
202
|
onClick: (scope, params) => handleOpenDialog((params?.tenantId as number | undefined) ?? (scope.row as BaseTenant).id)
|
|
147
203
|
},
|
|
148
204
|
{
|
|
149
|
-
label: "
|
|
205
|
+
label: t("common.action.delete"),
|
|
150
206
|
type: "danger",
|
|
151
207
|
link: true,
|
|
152
208
|
icon: Delete,
|
|
@@ -155,26 +211,26 @@ const columns: ColumnProps[] = [
|
|
|
155
211
|
}
|
|
156
212
|
]
|
|
157
213
|
}
|
|
158
|
-
];
|
|
214
|
+
]);
|
|
159
215
|
|
|
160
216
|
/** 租户顶部按钮配置。 */
|
|
161
|
-
const headerActions
|
|
217
|
+
const headerActions = computed<HeaderActionProps[]>(() => [
|
|
162
218
|
{
|
|
163
|
-
label: "
|
|
219
|
+
label: t("common.action.create"),
|
|
164
220
|
type: "success",
|
|
165
221
|
icon: CirclePlus,
|
|
166
222
|
hidden: () => !BUTTONS.value["base:tenant:create"],
|
|
167
223
|
onClick: () => handleOpenDialog()
|
|
168
224
|
},
|
|
169
225
|
{
|
|
170
|
-
label: "
|
|
226
|
+
label: t("common.action.delete"),
|
|
171
227
|
type: "danger",
|
|
172
228
|
icon: Delete,
|
|
173
229
|
hidden: () => !BUTTONS.value["base:tenant:delete"],
|
|
174
230
|
disabled: scope => !scope.selectedList.length,
|
|
175
231
|
onClick: scope => handleDelete(scope.selectedList as BaseTenant[])
|
|
176
232
|
}
|
|
177
|
-
];
|
|
233
|
+
]);
|
|
178
234
|
|
|
179
235
|
/**
|
|
180
236
|
* 请求租户列表,并由 ProTable 统一维护分页与搜索参数。
|
|
@@ -203,7 +259,7 @@ function isProtectedManagementTenant(row?: BaseTenant) {
|
|
|
203
259
|
*/
|
|
204
260
|
async function handleOpenDialog(tenantId?: number) {
|
|
205
261
|
resetForm();
|
|
206
|
-
dialog.
|
|
262
|
+
dialog.titleKey = tenantId ? "system.common.action.editResource" : "system.common.action.createResource";
|
|
207
263
|
dialog.visible = true;
|
|
208
264
|
if (!tenantId) return;
|
|
209
265
|
|
|
@@ -246,7 +302,11 @@ function handleSubmit() {
|
|
|
246
302
|
? defBaseTenantService.UpdateBaseTenant({ base_tenant: submitData })
|
|
247
303
|
: defBaseTenantService.CreateBaseTenant({ base_tenant: submitData });
|
|
248
304
|
request.then(() => {
|
|
249
|
-
ElMessage.success(
|
|
305
|
+
ElMessage.success(
|
|
306
|
+
t(submitData.id ? "system.common.message.updateSuccess" : "system.common.message.createSuccess", {
|
|
307
|
+
resource: t("system.tenant.resource")
|
|
308
|
+
})
|
|
309
|
+
);
|
|
250
310
|
handleCloseDialog();
|
|
251
311
|
refreshTable();
|
|
252
312
|
});
|
|
@@ -258,20 +318,29 @@ function handleSubmit() {
|
|
|
258
318
|
*/
|
|
259
319
|
async function handleBeforeSetStatus(row: BaseTenant) {
|
|
260
320
|
if (isProtectedManagementTenant(row)) {
|
|
261
|
-
ElMessage.warning("
|
|
321
|
+
ElMessage.warning(t("system.tenant.message.protectedStatus"));
|
|
262
322
|
return false;
|
|
263
323
|
}
|
|
264
324
|
|
|
265
325
|
const nextStatus = row.status === Status.ENABLE ? Status.DISABLE : Status.ENABLE;
|
|
266
|
-
const text = nextStatus === Status.ENABLE ? "
|
|
326
|
+
const text = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
|
|
267
327
|
try {
|
|
268
|
-
await ElMessageBox.confirm(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
328
|
+
await ElMessageBox.confirm(
|
|
329
|
+
t("system.common.dialog.statusChange", {
|
|
330
|
+
action: text,
|
|
331
|
+
resource: t("system.tenant.resource"),
|
|
332
|
+
field: t("system.tenant.field.name"),
|
|
333
|
+
value: row.name || `ID:${row.id}`
|
|
334
|
+
}),
|
|
335
|
+
t("common.title.notice"),
|
|
336
|
+
{
|
|
337
|
+
confirmButtonText: t("common.action.confirm"),
|
|
338
|
+
cancelButtonText: t("common.action.cancel"),
|
|
339
|
+
type: "warning"
|
|
340
|
+
}
|
|
341
|
+
);
|
|
273
342
|
await defBaseTenantService.SetBaseTenantStatus({ id: row.id, status: nextStatus });
|
|
274
|
-
ElMessage.success(
|
|
343
|
+
ElMessage.success(t("system.common.message.statusSuccess", { action: text }));
|
|
275
344
|
refreshTable();
|
|
276
345
|
return true;
|
|
277
346
|
} catch {
|
|
@@ -289,7 +358,7 @@ function handleDelete(selected?: number | string | Array<number | string> | Base
|
|
|
289
358
|
? [selected as BaseTenant]
|
|
290
359
|
: [];
|
|
291
360
|
if (tenantList.some(isProtectedManagementTenant)) {
|
|
292
|
-
ElMessage.warning("
|
|
361
|
+
ElMessage.warning(t("system.tenant.message.protectedDelete"));
|
|
293
362
|
return;
|
|
294
363
|
}
|
|
295
364
|
|
|
@@ -299,29 +368,29 @@ function handleDelete(selected?: number | string | Array<number | string> | Base
|
|
|
299
368
|
: normalizeSelectedIds(selected as number | string | Array<number | string>)
|
|
300
369
|
).join(",");
|
|
301
370
|
if (!tenantIds) {
|
|
302
|
-
ElMessage.warning("
|
|
371
|
+
ElMessage.warning(t("system.common.message.selectDeleteItem"));
|
|
303
372
|
return;
|
|
304
373
|
}
|
|
305
374
|
|
|
306
375
|
const confirmMessage = tenantList.length
|
|
307
376
|
? tenantList.length === 1
|
|
308
|
-
?
|
|
309
|
-
:
|
|
310
|
-
: "
|
|
377
|
+
? `${t("system.common.dialog.deleteSingle", { resource: t("system.tenant.resource") })}\n${t("system.common.dialog.resourceField", { field: t("system.tenant.field.name"), value: tenantList[0].name || `ID:${tenantList[0].id}` })}`
|
|
378
|
+
: t("system.common.dialog.deleteBatch", { count: tenantList.length, unit: "", resource: t("system.tenant.resource") })
|
|
379
|
+
: t("system.common.dialog.deleteSelected", { resource: t("system.tenant.resource") });
|
|
311
380
|
|
|
312
|
-
ElMessageBox.confirm(confirmMessage, "
|
|
313
|
-
confirmButtonText: "
|
|
314
|
-
cancelButtonText: "
|
|
381
|
+
ElMessageBox.confirm(confirmMessage, t("common.title.warning"), {
|
|
382
|
+
confirmButtonText: t("common.action.confirm"),
|
|
383
|
+
cancelButtonText: t("common.action.cancel"),
|
|
315
384
|
type: "warning"
|
|
316
385
|
}).then(
|
|
317
386
|
() => {
|
|
318
387
|
defBaseTenantService.DeleteBaseTenant({ id: tenantIds }).then(() => {
|
|
319
|
-
ElMessage.success("
|
|
388
|
+
ElMessage.success(t("system.common.message.deleteSuccess", { resource: t("system.tenant.resource") }));
|
|
320
389
|
refreshTable();
|
|
321
390
|
});
|
|
322
391
|
},
|
|
323
392
|
() => {
|
|
324
|
-
ElMessage.info("
|
|
393
|
+
ElMessage.info(t("system.common.dialog.cancelDelete", { resource: t("system.tenant.resource") }));
|
|
325
394
|
}
|
|
326
395
|
);
|
|
327
396
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- 部门树 -->
|
|
2
2
|
<template>
|
|
3
3
|
<el-card shadow="never">
|
|
4
|
-
<el-input v-model="name" placeholder="
|
|
4
|
+
<el-input v-model="name" :placeholder="t('system.dept.field.name')" clearable>
|
|
5
5
|
<template #prefix>
|
|
6
6
|
<el-icon><Search /></el-icon>
|
|
7
7
|
</template>
|
|
@@ -27,6 +27,7 @@ import { useVModel } from "@vueuse/core";
|
|
|
27
27
|
import { ElTree } from "element-plus";
|
|
28
28
|
import { defBaseDeptService } from "@liujitcn/kratos-admin-system/api/system/base_dept";
|
|
29
29
|
import { TreeOptionResponse_Option } from "@liujitcn/kratos-admin-system/rpc/common/v1/common";
|
|
30
|
+
import { t } from "@liujitcn/kratos-admin-core";
|
|
30
31
|
const props = defineProps({
|
|
31
32
|
modelValue: {
|
|
32
33
|
type: [Number],
|