@liujitcn/kratos-admin-system 0.0.21 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package/declarations/src/api/system/base_language.d.ts +5 -4
- package/dist/package/declarations/src/api/system/base_translation.d.ts +7 -4
- package/dist/package/declarations/src/api/system/ops_monitoring.d.ts +19 -0
- package/dist/package/declarations/src/api/system/ops_monitoring_sse.d.ts +12 -0
- package/dist/package/declarations/src/components/DynamicTranslationCell.vue.d.ts +9 -32
- package/dist/package/declarations/src/components/DynamicTranslationEditor.vue.d.ts +3 -6
- package/dist/package/declarations/src/components/dynamicTranslation.d.ts +11 -17
- package/dist/package/declarations/src/locales/generated.d.ts +6536 -0
- package/dist/package/declarations/src/rpc/base/v1/ai_session.d.ts +12 -2
- package/dist/package/declarations/src/rpc/base/v1/ai_tool.d.ts +9 -1
- package/dist/package/declarations/src/rpc/base/v1/config.d.ts +35 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/auth.d.ts +1 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/base_config.d.ts +23 -7
- package/dist/package/declarations/src/rpc/system/admin/v1/base_dict.d.ts +7 -77
- package/dist/package/declarations/src/rpc/system/admin/v1/base_job.d.ts +9 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/base_language.d.ts +7 -2
- package/dist/package/declarations/src/rpc/system/admin/v1/base_menu.d.ts +5 -40
- package/dist/package/declarations/src/rpc/system/admin/v1/base_migration.d.ts +6 -6
- package/dist/package/declarations/src/rpc/system/admin/v1/base_role.d.ts +13 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/base_translation.d.ts +54 -81
- package/dist/package/declarations/src/rpc/system/admin/v1/base_user.d.ts +11 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/code_gen.d.ts +11 -11
- package/dist/package/declarations/src/rpc/system/admin/v1/code_gen_table.d.ts +11 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/common.d.ts +13 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/ops_monitoring.d.ts +222 -0
- package/dist/package/declarations/src/views/tool/ops-monitoring/index.vue.d.ts +3 -0
- package/dist/package/src/api/base/ai_message.ts +2 -2
- package/dist/package/src/api/system/base_language.ts +13 -15
- package/dist/package/src/api/system/base_translation.ts +17 -6
- package/dist/package/src/api/system/ops_monitoring.ts +88 -0
- package/dist/package/src/api/system/ops_monitoring_sse.ts +49 -0
- package/dist/package/src/components/DynamicTranslationCell.vue +199 -126
- package/dist/package/src/components/DynamicTranslationEditor.vue +109 -78
- package/dist/package/src/components/dynamicTranslation.ts +11 -31
- package/dist/package/src/locales/README.md +7 -5
- package/dist/package/src/locales/en-US.json +876 -872
- package/dist/package/src/locales/es-ES.json +900 -895
- package/dist/package/src/locales/fr-FR.json +896 -891
- package/dist/package/src/locales/generated.ts +22 -0
- package/dist/package/src/locales/ja-JP.json +876 -872
- package/dist/package/src/locales/ko-KR.json +881 -876
- package/dist/package/src/locales/zh-CN.json +876 -872
- package/dist/package/src/locales/zh-TW.json +876 -871
- package/dist/package/src/module.ts +3 -17
- package/dist/package/src/rpc/base/v1/ai_session.ts +13 -2
- package/dist/package/src/rpc/base/v1/ai_tool.ts +10 -1
- package/dist/package/src/rpc/base/v1/config.ts +47 -0
- package/dist/package/src/rpc/system/admin/v1/auth.ts +1 -1
- package/dist/package/src/rpc/system/admin/v1/base_config.ts +24 -7
- package/dist/package/src/rpc/system/admin/v1/base_dict.ts +7 -79
- package/dist/package/src/rpc/system/admin/v1/base_job.ts +10 -1
- package/dist/package/src/rpc/system/admin/v1/base_language.ts +8 -2
- package/dist/package/src/rpc/system/admin/v1/base_menu.ts +5 -41
- package/dist/package/src/rpc/system/admin/v1/base_migration.ts +8 -8
- package/dist/package/src/rpc/system/admin/v1/base_role.ts +14 -1
- package/dist/package/src/rpc/system/admin/v1/base_translation.ts +54 -81
- package/dist/package/src/rpc/system/admin/v1/base_user.ts +12 -1
- package/dist/package/src/rpc/system/admin/v1/code_gen.ts +11 -11
- package/dist/package/src/rpc/system/admin/v1/code_gen_table.ts +12 -1
- package/dist/package/src/rpc/system/admin/v1/common.ts +21 -0
- package/dist/package/src/rpc/system/admin/v1/ops_monitoring.ts +255 -0
- package/dist/package/src/views/ai/chat/components/ChatPanel.vue +36 -36
- package/dist/package/src/views/ai/chat/components/SessionPanel.vue +6 -6
- package/dist/package/src/views/ai/chat/components/XSender.vue +20 -20
- package/dist/package/src/views/ai/chat/index.vue +33 -32
- package/dist/package/src/views/ai/chat/message.ts +16 -15
- package/dist/package/src/views/base/api/index.vue +55 -56
- package/dist/package/src/views/base/area/index.vue +18 -19
- package/dist/package/src/views/base/config/index.vue +143 -133
- package/dist/package/src/views/base/dept/index.vue +42 -43
- package/dist/package/src/views/base/dict/index.vue +49 -45
- package/dist/package/src/views/base/dict/item.vue +54 -49
- package/dist/package/src/views/base/job/index.vue +51 -52
- package/dist/package/src/views/base/job/log.vue +18 -18
- package/dist/package/src/views/{tool → base}/language/index.vue +51 -47
- package/dist/package/src/views/base/log/index.vue +40 -40
- package/dist/package/src/views/base/menu/index.vue +220 -177
- package/dist/package/src/views/base/migration/index.vue +24 -24
- package/dist/package/src/views/base/post/index.vue +42 -43
- package/dist/package/src/views/base/role/index.vue +54 -55
- package/dist/package/src/views/base/tenant/index.vue +42 -43
- package/dist/package/src/views/base/user/components/dept-tree.vue +1 -1
- package/dist/package/src/views/base/user/index.vue +69 -71
- package/dist/package/src/views/profile/components/base.vue +9 -9
- package/dist/package/src/views/profile/components/password.vue +19 -20
- package/dist/package/src/views/profile/components/security.vue +20 -20
- package/dist/package/src/views/profile/index.vue +3 -3
- package/dist/package/src/views/tool/api-doc/index.vue +1 -1
- package/dist/package/src/views/tool/code-gen/code-preview/index.vue +13 -13
- package/dist/package/src/views/tool/code-gen/columns/index.vue +89 -89
- package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +5 -5
- package/dist/package/src/views/tool/code-gen/components/CodeGenProgressDialog.vue +21 -21
- package/dist/package/src/views/tool/code-gen/components/CodePreviewPane.vue +5 -5
- package/dist/package/src/views/tool/code-gen/config.ts +60 -60
- package/dist/package/src/views/tool/code-gen/preview/data.ts +2 -2
- package/dist/package/src/views/tool/code-gen/preview/index.vue +30 -31
- package/dist/package/src/views/tool/code-gen/proto/index.vue +43 -43
- package/dist/package/src/views/tool/code-gen/table/index.vue +95 -95
- package/dist/package/src/views/tool/ops-monitoring/index.vue +1175 -0
- package/dist/package/src/views/tool/project-doc/index.vue +7 -7
- package/package.json +2 -2
- package/dist/package/declarations/src/rpc/base/v1/enum.d.ts +0 -43
- package/dist/package/declarations/src/rpc/system/common/v1/enum.d.ts +0 -67
- package/dist/package/src/rpc/base/v1/enum.ts +0 -54
- package/dist/package/src/rpc/system/common/v1/enum.ts +0 -80
- /package/dist/package/declarations/src/views/{tool → base}/language/index.vue.d.ts +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<TreeFilter
|
|
5
5
|
:key="`dept-filter-${selectedTenantId ?? 0}`"
|
|
6
6
|
label="name"
|
|
7
|
-
:title="t('system.user.title.
|
|
7
|
+
:title="t('system.base.user.title.department_list')"
|
|
8
8
|
:request-api="requestDeptTreeFilter"
|
|
9
9
|
:show-all="false"
|
|
10
10
|
:default-value="deptFilterValue"
|
|
@@ -26,12 +26,11 @@
|
|
|
26
26
|
<FormDialog
|
|
27
27
|
v-model="dialog.visible"
|
|
28
28
|
ref="formDialogRef"
|
|
29
|
-
:title="t(dialog.editing ? 'system.user.action.edit' : 'system.user.action.create')"
|
|
29
|
+
:title="t(dialog.editing ? 'system.base.user.action.edit' : 'system.base.user.action.create')"
|
|
30
30
|
width="800px"
|
|
31
31
|
:model="formData"
|
|
32
32
|
:fields="formFields"
|
|
33
33
|
:rules="rules"
|
|
34
|
-
label-width="90px"
|
|
35
34
|
@confirm="handleSubmit"
|
|
36
35
|
@close="handleCloseDialog"
|
|
37
36
|
>
|
|
@@ -43,12 +42,11 @@
|
|
|
43
42
|
<FormDialog
|
|
44
43
|
v-model="resetPwdDialog.visible"
|
|
45
44
|
ref="resetPwdFormDialogRef"
|
|
46
|
-
:title="t('system.user.title.
|
|
45
|
+
:title="t('system.base.user.title.reset_password', { name: resetPwdTargetName })"
|
|
47
46
|
width="520px"
|
|
48
47
|
:model="resetPwdForm"
|
|
49
48
|
:fields="resetPwdFields"
|
|
50
49
|
:rules="resetPwdRules"
|
|
51
|
-
label-width="90px"
|
|
52
50
|
@confirm="handleConfirmResetPassword"
|
|
53
51
|
@close="handleCloseResetPasswordDialog"
|
|
54
52
|
>
|
|
@@ -182,65 +180,65 @@ const rules = computed(() => ({
|
|
|
182
180
|
tenant_id: [
|
|
183
181
|
{
|
|
184
182
|
required: true,
|
|
185
|
-
message: t("
|
|
183
|
+
message: t("common.validation.required_select", { field: t("system.base.user.field.tenant") }),
|
|
186
184
|
trigger: "change"
|
|
187
185
|
}
|
|
188
186
|
],
|
|
189
187
|
user_name: [
|
|
190
188
|
{
|
|
191
189
|
required: true,
|
|
192
|
-
message: t("
|
|
190
|
+
message: t("common.validation.required_input", { field: t("system.base.user.field.user_name") }),
|
|
193
191
|
trigger: "blur"
|
|
194
192
|
},
|
|
195
193
|
{
|
|
196
194
|
max: 50,
|
|
197
|
-
message: t("
|
|
195
|
+
message: t("common.validation.max_length", { field: t("system.base.user.field.user_name"), max: 50 }),
|
|
198
196
|
trigger: "blur"
|
|
199
197
|
}
|
|
200
198
|
],
|
|
201
199
|
user_code: [
|
|
202
200
|
{
|
|
203
201
|
required: true,
|
|
204
|
-
message: t("
|
|
202
|
+
message: t("common.validation.required_input", { field: t("system.base.user.field.user_code") }),
|
|
205
203
|
trigger: "blur"
|
|
206
204
|
},
|
|
207
205
|
{
|
|
208
206
|
max: 30,
|
|
209
|
-
message: t("
|
|
207
|
+
message: t("common.validation.max_length", { field: t("system.base.user.field.user_code"), max: 30 }),
|
|
210
208
|
trigger: "blur"
|
|
211
209
|
}
|
|
212
210
|
],
|
|
213
211
|
nick_name: [
|
|
214
212
|
{
|
|
215
213
|
required: true,
|
|
216
|
-
message: t("
|
|
214
|
+
message: t("common.validation.required_input", { field: t("system.base.user.field.nick_name") }),
|
|
217
215
|
trigger: "blur"
|
|
218
216
|
},
|
|
219
217
|
{
|
|
220
218
|
max: 30,
|
|
221
|
-
message: t("
|
|
219
|
+
message: t("common.validation.max_length", { field: t("system.base.user.field.nick_name"), max: 30 }),
|
|
222
220
|
trigger: "blur"
|
|
223
221
|
}
|
|
224
222
|
],
|
|
225
223
|
dept_id: [
|
|
226
224
|
{
|
|
227
225
|
required: true,
|
|
228
|
-
message: t("
|
|
226
|
+
message: t("common.validation.required_select", { field: t("system.base.user.field.department") }),
|
|
229
227
|
trigger: "change"
|
|
230
228
|
}
|
|
231
229
|
],
|
|
232
230
|
role_id: [
|
|
233
231
|
{
|
|
234
232
|
required: true,
|
|
235
|
-
message: t("
|
|
233
|
+
message: t("common.validation.required_select", { field: t("system.base.user.field.role") }),
|
|
236
234
|
trigger: "change"
|
|
237
235
|
}
|
|
238
236
|
],
|
|
239
237
|
phone: [
|
|
240
|
-
{ max: 20, message: t("
|
|
238
|
+
{ max: 20, message: t("common.validation.max_length", { field: t("common.field.phone"), max: 20 }), trigger: "blur" },
|
|
241
239
|
{
|
|
242
240
|
pattern: /^1[3-9]\d{9}$/,
|
|
243
|
-
message: t("common.validation.
|
|
241
|
+
message: t("common.validation.phone_invalid"),
|
|
244
242
|
trigger: "blur"
|
|
245
243
|
}
|
|
246
244
|
],
|
|
@@ -251,21 +249,21 @@ const rules = computed(() => ({
|
|
|
251
249
|
status: [
|
|
252
250
|
{
|
|
253
251
|
required: true,
|
|
254
|
-
message: t("
|
|
252
|
+
message: t("common.validation.required_select", { field: t("common.field.status") }),
|
|
255
253
|
trigger: "change"
|
|
256
254
|
}
|
|
257
255
|
],
|
|
258
256
|
remark: [
|
|
259
257
|
{
|
|
260
258
|
max: 500,
|
|
261
|
-
message: t("
|
|
259
|
+
message: t("common.validation.max_length", { field: t("common.field.remark"), max: 500 }),
|
|
262
260
|
trigger: "blur"
|
|
263
261
|
}
|
|
264
262
|
]
|
|
265
263
|
}));
|
|
266
264
|
const resetPwdRules = computed(() => ({
|
|
267
265
|
pwd: [
|
|
268
|
-
{ required: true, message: t("system.user.placeholder.
|
|
266
|
+
{ required: true, message: t("system.base.user.placeholder.new_password"), trigger: "blur" },
|
|
269
267
|
{ validator: validatePasswordField, trigger: "blur" }
|
|
270
268
|
]
|
|
271
269
|
}));
|
|
@@ -281,13 +279,13 @@ const statusOptions = computed<ProFormOption[]>(() => [
|
|
|
281
279
|
const resetPwdFields = computed<ProFormField[]>(() => [
|
|
282
280
|
{
|
|
283
281
|
prop: "pwd",
|
|
284
|
-
label: t("system.user.field.
|
|
282
|
+
label: t("system.base.user.field.new_password"),
|
|
285
283
|
component: "password",
|
|
286
|
-
props: { placeholder: t("system.user.placeholder.
|
|
284
|
+
props: { placeholder: t("system.base.user.placeholder.new_password"), showPassword: true }
|
|
287
285
|
},
|
|
288
286
|
{
|
|
289
287
|
prop: "resetPwdStrength",
|
|
290
|
-
label: t("system.user.field.
|
|
288
|
+
label: t("system.base.user.field.password_strength"),
|
|
291
289
|
component: "slot",
|
|
292
290
|
slotName: "resetPwdStrength"
|
|
293
291
|
}
|
|
@@ -309,10 +307,10 @@ const isSuperEditUser = computed(() => Boolean(formData.id && formData.user_name
|
|
|
309
307
|
const formFields = computed<ProFormField[]>(() => [
|
|
310
308
|
{
|
|
311
309
|
prop: "tenant_id",
|
|
312
|
-
label: t("system.user.field.tenant"),
|
|
310
|
+
label: t("system.base.user.field.tenant"),
|
|
313
311
|
component: "select",
|
|
314
312
|
props: {
|
|
315
|
-
placeholder: t("system.user.placeholder.tenant"),
|
|
313
|
+
placeholder: t("system.base.user.placeholder.tenant"),
|
|
316
314
|
filterable: true,
|
|
317
315
|
disabled: Boolean(formData.id),
|
|
318
316
|
onChange: handleFormTenantChange
|
|
@@ -322,36 +320,36 @@ const formFields = computed<ProFormField[]>(() => [
|
|
|
322
320
|
},
|
|
323
321
|
{
|
|
324
322
|
prop: "user_name",
|
|
325
|
-
label: t("system.user.field.
|
|
323
|
+
label: t("system.base.user.field.user_name"),
|
|
326
324
|
component: "input",
|
|
327
|
-
props: { placeholder: t("system.user.placeholder.
|
|
325
|
+
props: { placeholder: t("system.base.user.placeholder.user_name"), disabled: Boolean(formData.id) }
|
|
328
326
|
},
|
|
329
327
|
{
|
|
330
328
|
prop: "user_code",
|
|
331
|
-
label: t("system.user.field.
|
|
329
|
+
label: t("system.base.user.field.user_code"),
|
|
332
330
|
component: "input",
|
|
333
|
-
props: { placeholder: t("system.user.placeholder.
|
|
331
|
+
props: { placeholder: t("system.base.user.placeholder.user_code"), disabled: Boolean(formData.id) }
|
|
334
332
|
},
|
|
335
333
|
{
|
|
336
334
|
prop: "nick_name",
|
|
337
|
-
label: t("system.user.field.
|
|
335
|
+
label: t("system.base.user.field.nick_name"),
|
|
338
336
|
component: "input",
|
|
339
|
-
props: { placeholder: t("system.user.placeholder.
|
|
337
|
+
props: { placeholder: t("system.base.user.placeholder.nick_name") }
|
|
340
338
|
},
|
|
341
339
|
{
|
|
342
340
|
prop: "role_id",
|
|
343
|
-
label: t("system.user.field.role"),
|
|
341
|
+
label: t("system.base.user.field.role"),
|
|
344
342
|
component: "select",
|
|
345
343
|
options: baseRoleOptions.value.map(item => ({ label: item.label, value: item.value, disabled: item.disabled })),
|
|
346
344
|
props: { placeholder: t("common.placeholder.select"), disabled: isProtectedUserRole.value }
|
|
347
345
|
},
|
|
348
346
|
{
|
|
349
347
|
prop: "dept_id",
|
|
350
|
-
label: t("system.user.field.department"),
|
|
348
|
+
label: t("system.base.user.field.department"),
|
|
351
349
|
component: "tree-select",
|
|
352
350
|
options: basedDeptOptions.value as unknown as ProFormOption[],
|
|
353
351
|
props: {
|
|
354
|
-
placeholder: t("system.user.placeholder.department"),
|
|
352
|
+
placeholder: t("system.base.user.placeholder.department"),
|
|
355
353
|
filterable: true,
|
|
356
354
|
checkStrictly: true,
|
|
357
355
|
renderAfterExpand: false,
|
|
@@ -360,44 +358,44 @@ const formFields = computed<ProFormField[]>(() => [
|
|
|
360
358
|
},
|
|
361
359
|
{
|
|
362
360
|
prop: "post_id",
|
|
363
|
-
label: t("system.user.field.post"),
|
|
361
|
+
label: t("system.base.user.field.post"),
|
|
364
362
|
component: "select",
|
|
365
363
|
options: basePostOptions.value.map(item => ({ label: item.label, value: item.value, disabled: item.disabled })),
|
|
366
|
-
props: { placeholder: t("system.user.placeholder.post"), clearable: true, filterable: true }
|
|
364
|
+
props: { placeholder: t("system.base.user.placeholder.post"), clearable: true, filterable: true }
|
|
367
365
|
},
|
|
368
366
|
{
|
|
369
367
|
prop: "phone",
|
|
370
368
|
label: t("common.field.phone"),
|
|
371
369
|
component: "input",
|
|
372
|
-
props: { placeholder: t("common.validation.
|
|
370
|
+
props: { placeholder: t("common.validation.phone_required") }
|
|
373
371
|
},
|
|
374
372
|
{
|
|
375
373
|
prop: "pwd",
|
|
376
|
-
label: t("system.user.field.password"),
|
|
374
|
+
label: t("system.base.user.field.password"),
|
|
377
375
|
component: "password",
|
|
378
|
-
props: { placeholder: t("system.user.placeholder.password"), showPassword: true },
|
|
376
|
+
props: { placeholder: t("system.base.user.placeholder.password"), showPassword: true },
|
|
379
377
|
visible: model => !model.id
|
|
380
378
|
},
|
|
381
379
|
{
|
|
382
380
|
prop: "passwordStrength",
|
|
383
|
-
label: t("system.user.field.
|
|
381
|
+
label: t("system.base.user.field.password_strength"),
|
|
384
382
|
component: "slot",
|
|
385
383
|
slotName: "passwordStrength",
|
|
386
384
|
visible: model => !model.id
|
|
387
385
|
},
|
|
388
|
-
{ prop: "gender", label: t("system.user.field.gender"), component: "dict", props: { code: "base_user_gender" } },
|
|
386
|
+
{ prop: "gender", label: t("system.base.user.field.gender"), component: "dict", props: { code: "base_user_gender" } },
|
|
389
387
|
{
|
|
390
388
|
prop: "status",
|
|
391
|
-
label: t("
|
|
389
|
+
label: t("common.field.status"),
|
|
392
390
|
component: "radio-group",
|
|
393
391
|
options: statusOptions.value,
|
|
394
392
|
props: { disabled: isSuperEditUser.value }
|
|
395
393
|
},
|
|
396
394
|
{
|
|
397
395
|
prop: "remark",
|
|
398
|
-
label: t("
|
|
396
|
+
label: t("common.field.remark"),
|
|
399
397
|
component: "textarea",
|
|
400
|
-
props: { placeholder: t("
|
|
398
|
+
props: { placeholder: t("common.placeholder.remark") }
|
|
401
399
|
}
|
|
402
400
|
]);
|
|
403
401
|
|
|
@@ -408,7 +406,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
408
406
|
? ([
|
|
409
407
|
{
|
|
410
408
|
prop: "tenant_id",
|
|
411
|
-
label: t("system.user.field.
|
|
409
|
+
label: t("system.base.user.field.tenant_short"),
|
|
412
410
|
minWidth: 140,
|
|
413
411
|
showOverflowTooltip: true,
|
|
414
412
|
search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
|
|
@@ -416,22 +414,22 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
416
414
|
}
|
|
417
415
|
] satisfies ColumnProps[])
|
|
418
416
|
: []),
|
|
419
|
-
{ prop: "user_name", label: t("system.user.field.
|
|
420
|
-
{ prop: "user_code", label: t("system.user.field.
|
|
421
|
-
{ prop: "nick_name", label: t("system.user.field.
|
|
422
|
-
{ prop: "role_id", label: t("system.user.field.role"), minWidth: 140, enum: requestRoleOptions },
|
|
417
|
+
{ prop: "user_name", label: t("system.base.user.field.user_name"), minWidth: 140, search: { el: "input" } },
|
|
418
|
+
{ prop: "user_code", label: t("system.base.user.field.user_code"), minWidth: 140, search: { el: "input" } },
|
|
419
|
+
{ prop: "nick_name", label: t("system.base.user.field.nick_name_short"), minWidth: 100, search: { el: "input" } },
|
|
420
|
+
{ prop: "role_id", label: t("system.base.user.field.role"), minWidth: 140, enum: requestRoleOptions },
|
|
423
421
|
{
|
|
424
422
|
prop: "dept_id",
|
|
425
|
-
label: t("system.user.field.
|
|
423
|
+
label: t("system.base.user.field.department_short"),
|
|
426
424
|
minWidth: 180,
|
|
427
425
|
showOverflowTooltip: true,
|
|
428
426
|
enum: requestDeptOptions
|
|
429
427
|
},
|
|
430
|
-
{ prop: "post_id", label: t("system.user.field.
|
|
428
|
+
{ prop: "post_id", label: t("system.base.user.field.post_short"), minWidth: 120, enum: requestPostOptions },
|
|
431
429
|
{ prop: "phone", label: t("common.field.phone"), minWidth: 130, search: { el: "input" } },
|
|
432
430
|
{
|
|
433
431
|
prop: "gender",
|
|
434
|
-
label: t("system.user.field.gender"),
|
|
432
|
+
label: t("system.base.user.field.gender"),
|
|
435
433
|
minWidth: 90,
|
|
436
434
|
align: "center",
|
|
437
435
|
dictCode: "base_user_gender",
|
|
@@ -439,7 +437,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
439
437
|
},
|
|
440
438
|
{
|
|
441
439
|
prop: "status",
|
|
442
|
-
label: t("
|
|
440
|
+
label: t("common.field.status"),
|
|
443
441
|
minWidth: 100,
|
|
444
442
|
search: { el: "select" },
|
|
445
443
|
cellType: "status",
|
|
@@ -452,18 +450,18 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
452
450
|
beforeChange: scope => handleBeforeSetStatus(scope.row as BaseUser)
|
|
453
451
|
}
|
|
454
452
|
},
|
|
455
|
-
{ prop: "remark", label: t("
|
|
456
|
-
{ prop: "created_at", label: t("
|
|
457
|
-
{ prop: "updated_at", label: t("
|
|
453
|
+
{ prop: "remark", label: t("common.field.remark"), minWidth: 160 },
|
|
454
|
+
{ prop: "created_at", label: t("common.field.created_at"), minWidth: 180 },
|
|
455
|
+
{ prop: "updated_at", label: t("common.field.updated_at"), minWidth: 180 },
|
|
458
456
|
{
|
|
459
457
|
prop: "operation",
|
|
460
|
-
label: t("
|
|
458
|
+
label: t("common.field.action"),
|
|
461
459
|
width: 260,
|
|
462
460
|
fixed: "right",
|
|
463
461
|
cellType: "actions",
|
|
464
462
|
actions: [
|
|
465
463
|
{
|
|
466
|
-
label: t("system.user.action.
|
|
464
|
+
label: t("system.base.user.action.reset_password"),
|
|
467
465
|
type: "primary",
|
|
468
466
|
link: true,
|
|
469
467
|
icon: RefreshLeft,
|
|
@@ -730,9 +728,9 @@ async function handleConfirmResetPassword() {
|
|
|
730
728
|
resetPwdFormDialogRef.value?.validate()?.then(async valid => {
|
|
731
729
|
if (!valid) return;
|
|
732
730
|
|
|
733
|
-
const pwd = await encryptPassword(resetPwdForm.pwd, PASSWORD_CRYPTO_SCENE.
|
|
731
|
+
const pwd = await encryptPassword(resetPwdForm.pwd, PASSWORD_CRYPTO_SCENE.PASSWORD_CRYPTO_SCENE_RESET_BASE_USER_PASSWORD);
|
|
734
732
|
defBaseUserService.ResetBaseUserPassword({ id: resetPwdForm.id, pwd }).then(() => {
|
|
735
|
-
ElMessage.success(t("system.user.message.
|
|
733
|
+
ElMessage.success(t("system.base.user.message.reset_password_success", { name: resetPwdTargetName.value }));
|
|
736
734
|
handleCloseResetPasswordDialog();
|
|
737
735
|
});
|
|
738
736
|
});
|
|
@@ -748,13 +746,13 @@ const handleSubmit = useDebounceFn(() => {
|
|
|
748
746
|
const submitData = JSON.parse(JSON.stringify(formData)) as BaseUserFormState;
|
|
749
747
|
const baseUser = {
|
|
750
748
|
...submitData,
|
|
751
|
-
pwd: submitData.id ? undefined : await encryptPassword(submitData.pwd, PASSWORD_CRYPTO_SCENE.
|
|
749
|
+
pwd: submitData.id ? undefined : await encryptPassword(submitData.pwd, PASSWORD_CRYPTO_SCENE.PASSWORD_CRYPTO_SCENE_CREATE_BASE_USER)
|
|
752
750
|
} as BaseUserForm;
|
|
753
751
|
const request = submitData.id
|
|
754
752
|
? defBaseUserService.UpdateBaseUser({ base_user: baseUser })
|
|
755
753
|
: defBaseUserService.CreateBaseUser({ base_user: baseUser });
|
|
756
754
|
request.then(() => {
|
|
757
|
-
ElMessage.success(t(submitData.id ? "system.user.message.
|
|
755
|
+
ElMessage.success(t(submitData.id ? "system.base.user.message.update_success" : "system.base.user.message.create_success"));
|
|
758
756
|
handleCloseDialog();
|
|
759
757
|
refreshTable();
|
|
760
758
|
});
|
|
@@ -766,7 +764,7 @@ const handleSubmit = useDebounceFn(() => {
|
|
|
766
764
|
*/
|
|
767
765
|
async function handleBeforeSetStatus(row: BaseUser) {
|
|
768
766
|
if (isProtectedManagementUser(row)) {
|
|
769
|
-
ElMessage.warning(t("system.user.message.
|
|
767
|
+
ElMessage.warning(t("system.base.user.message.protected_account"));
|
|
770
768
|
return false;
|
|
771
769
|
}
|
|
772
770
|
|
|
@@ -774,13 +772,13 @@ async function handleBeforeSetStatus(row: BaseUser) {
|
|
|
774
772
|
const action = t(nextStatus === Status.ENABLE ? "common.status.enabled" : "common.status.disabled");
|
|
775
773
|
const userName = row.nick_name || row.user_name || `ID:${row.id}`;
|
|
776
774
|
try {
|
|
777
|
-
await ElMessageBox.confirm(t("system.user.message.
|
|
775
|
+
await ElMessageBox.confirm(t("system.base.user.message.confirm_status", { action, name: userName }), t("common.title.notice"), {
|
|
778
776
|
confirmButtonText: t("common.action.confirm"),
|
|
779
777
|
cancelButtonText: t("common.action.cancel"),
|
|
780
778
|
type: "warning"
|
|
781
779
|
});
|
|
782
780
|
await defBaseUserService.SetBaseUserStatus({ id: row.id, status: nextStatus });
|
|
783
|
-
ElMessage.success(t("
|
|
781
|
+
ElMessage.success(t("common.message.status_success", { action }));
|
|
784
782
|
refreshTable();
|
|
785
783
|
return true;
|
|
786
784
|
} catch {
|
|
@@ -798,24 +796,24 @@ function handleDelete(selected?: number | string | Array<number | string> | Base
|
|
|
798
796
|
? [selected]
|
|
799
797
|
: [];
|
|
800
798
|
if (userList.some(isProtectedManagementUser)) {
|
|
801
|
-
ElMessage.warning(t("system.user.message.
|
|
799
|
+
ElMessage.warning(t("system.base.user.message.protected_account"));
|
|
802
800
|
return;
|
|
803
801
|
}
|
|
804
802
|
const userIds = normalizeSelectedIds(
|
|
805
803
|
userList.length ? userList.map(item => item.id) : (selected as number | string | Array<number | string> | undefined)
|
|
806
804
|
).join(",");
|
|
807
805
|
if (!userIds) {
|
|
808
|
-
ElMessage.warning(t("
|
|
806
|
+
ElMessage.warning(t("common.message.select_delete_item"));
|
|
809
807
|
return;
|
|
810
808
|
}
|
|
811
809
|
|
|
812
810
|
const confirmMessage = userList.length
|
|
813
811
|
? userList.length === 1
|
|
814
|
-
? t("system.user.message.
|
|
812
|
+
? t("system.base.user.message.confirm_delete_single", {
|
|
815
813
|
name: userList[0].nick_name || userList[0].user_name || `ID:${userList[0].id}`
|
|
816
814
|
})
|
|
817
|
-
: t("system.user.message.
|
|
818
|
-
: t("system.user.message.
|
|
815
|
+
: t("system.base.user.message.confirm_delete_batch", { count: userList.length })
|
|
816
|
+
: t("system.base.user.message.confirm_delete_selected");
|
|
819
817
|
|
|
820
818
|
ElMessageBox.confirm(confirmMessage, t("common.title.warning"), {
|
|
821
819
|
confirmButtonText: t("common.action.confirm"),
|
|
@@ -824,12 +822,12 @@ function handleDelete(selected?: number | string | Array<number | string> | Base
|
|
|
824
822
|
}).then(
|
|
825
823
|
() => {
|
|
826
824
|
defBaseUserService.DeleteBaseUser({ id: userIds }).then(() => {
|
|
827
|
-
ElMessage.success(t("system.user.message.
|
|
825
|
+
ElMessage.success(t("system.base.user.message.delete_success"));
|
|
828
826
|
refreshTable();
|
|
829
827
|
});
|
|
830
828
|
},
|
|
831
829
|
() => {
|
|
832
|
-
ElMessage.info(t("system.user.message.
|
|
830
|
+
ElMessage.info(t("system.base.user.message.delete_canceled"));
|
|
833
831
|
}
|
|
834
832
|
);
|
|
835
833
|
}
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
<div class="avatar-copy">
|
|
21
21
|
<strong>{{ t("system.profile.account.field.avatar") }}</strong>
|
|
22
|
-
<p>{{ t("system.profile.account.message.
|
|
22
|
+
<p>{{ t("system.profile.account.message.avatar_hint") }}</p>
|
|
23
23
|
</div>
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
<div class="detail-grid">
|
|
27
27
|
<div class="detail-item">
|
|
28
|
-
<span class="detail-label">{{ t("system.profile.account.field.
|
|
28
|
+
<span class="detail-label">{{ t("system.profile.account.field.user_name") }}</span>
|
|
29
29
|
<span class="detail-value">{{ profile.user_name || "--" }}</span>
|
|
30
30
|
</div>
|
|
31
31
|
<div class="detail-item">
|
|
32
|
-
<span class="detail-label">{{ t("system.profile.account.field.
|
|
32
|
+
<span class="detail-label">{{ t("system.profile.account.field.nick_name") }}</span>
|
|
33
33
|
<span class="detail-value">{{ profile.nick_name || "--" }}</span>
|
|
34
34
|
</div>
|
|
35
35
|
<div class="detail-item">
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<span class="detail-value">{{ profile.dept_name || "--" }}</span>
|
|
50
50
|
</div>
|
|
51
51
|
<div class="detail-item detail-item--wide">
|
|
52
|
-
<span class="detail-label">{{ t("
|
|
52
|
+
<span class="detail-label">{{ t("common.field.created_at") }}</span>
|
|
53
53
|
<span class="detail-value">{{ profile.created_at || "--" }}</span>
|
|
54
54
|
</div>
|
|
55
55
|
</div>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
:width="520"
|
|
62
62
|
@closed="handleDialogClosed"
|
|
63
63
|
>
|
|
64
|
-
<ProForm ref="accountFormRef" :model="accountForm" :fields="accountFormFields"
|
|
64
|
+
<ProForm ref="accountFormRef" :model="accountForm" :fields="accountFormFields" />
|
|
65
65
|
<template #footer>
|
|
66
66
|
<div class="dialog-footer">
|
|
67
67
|
<el-button @click="accountDialogVisible = false">{{ t("common.action.cancel") }}</el-button>
|
|
@@ -111,9 +111,9 @@ const accountForm = reactive<Pick<UserProfileForm, "nick_name" | "gender">>({
|
|
|
111
111
|
const accountFormFields = computed<ProFormField[]>(() => [
|
|
112
112
|
{
|
|
113
113
|
prop: "nick_name",
|
|
114
|
-
label: t("system.profile.account.field.
|
|
114
|
+
label: t("system.profile.account.field.nick_name"),
|
|
115
115
|
component: "input",
|
|
116
|
-
props: { placeholder: t("system.profile.account.placeholder.
|
|
116
|
+
props: { placeholder: t("system.profile.account.placeholder.nick_name") }
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
prop: "gender",
|
|
@@ -182,10 +182,10 @@ async function handleFileChange(event: Event) {
|
|
|
182
182
|
avatar: uploadResult.url
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
|
-
ElMessage.success(t("system.profile.account.message.
|
|
185
|
+
ElMessage.success(t("system.profile.account.message.avatar_updated"));
|
|
186
186
|
emit("refreshed");
|
|
187
187
|
} catch (_error) {
|
|
188
|
-
ElMessage.error(t("system.profile.account.message.
|
|
188
|
+
ElMessage.error(t("system.profile.account.message.avatar_upload_failed"));
|
|
189
189
|
} finally {
|
|
190
190
|
target.value = "";
|
|
191
191
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<h3>{{ t("system.profile.password.title") }}</h3>
|
|
8
8
|
<p>{{ t("system.profile.password.description") }}</p>
|
|
9
9
|
</div>
|
|
10
|
-
<el-tag type="warning" effect="plain">{{ t("system.profile.password.value.
|
|
10
|
+
<el-tag type="warning" effect="plain">{{ t("system.profile.password.value.strong_recommended") }}</el-tag>
|
|
11
11
|
</div>
|
|
12
12
|
</template>
|
|
13
13
|
<div class="password-layout">
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
:model="passwordForm"
|
|
18
18
|
:fields="passwordFormFields"
|
|
19
19
|
:rules="passwordFormRules"
|
|
20
|
-
label-width="96px"
|
|
21
20
|
/>
|
|
22
21
|
<PasswordStrength :password="passwordForm.new_pwd" class="password-form-wrap__strength" />
|
|
23
22
|
<div class="password-footer">
|
|
@@ -30,18 +29,18 @@
|
|
|
30
29
|
<div class="password-tips">
|
|
31
30
|
<div class="tip-card">
|
|
32
31
|
<span class="tip-badge">01</span>
|
|
33
|
-
<strong>{{ t("system.profile.password.tip.
|
|
34
|
-
<p>{{ t("system.profile.password.tip.
|
|
32
|
+
<strong>{{ t("system.profile.password.tip.unique_title") }}</strong>
|
|
33
|
+
<p>{{ t("system.profile.password.tip.unique_description") }}</p>
|
|
35
34
|
</div>
|
|
36
35
|
<div class="tip-card">
|
|
37
36
|
<span class="tip-badge">02</span>
|
|
38
|
-
<strong>{{ t("system.profile.password.tip.
|
|
39
|
-
<p>{{ t("system.profile.password.tip.
|
|
37
|
+
<strong>{{ t("system.profile.password.tip.strength_title") }}</strong>
|
|
38
|
+
<p>{{ t("system.profile.password.tip.strength_description") }}</p>
|
|
40
39
|
</div>
|
|
41
40
|
<div class="tip-card">
|
|
42
41
|
<span class="tip-badge">03</span>
|
|
43
|
-
<strong>{{ t("system.profile.password.tip.
|
|
44
|
-
<p>{{ t("system.profile.password.tip.
|
|
42
|
+
<strong>{{ t("system.profile.password.tip.record_title") }}</strong>
|
|
43
|
+
<p>{{ t("system.profile.password.tip.record_description") }}</p>
|
|
45
44
|
</div>
|
|
46
45
|
</div>
|
|
47
46
|
</div>
|
|
@@ -90,31 +89,31 @@ const passwordForm = reactive<UserPasswordFormState>({
|
|
|
90
89
|
const passwordFormFields = computed<ProFormField[]>(() => [
|
|
91
90
|
{
|
|
92
91
|
prop: "old_pwd",
|
|
93
|
-
label: t("system.profile.password.field.
|
|
92
|
+
label: t("system.profile.password.field.old_password"),
|
|
94
93
|
component: "password",
|
|
95
|
-
props: { placeholder: t("system.profile.password.placeholder.
|
|
94
|
+
props: { placeholder: t("system.profile.password.placeholder.old_password") }
|
|
96
95
|
},
|
|
97
96
|
{
|
|
98
97
|
prop: "new_pwd",
|
|
99
|
-
label: t("system.profile.password.field.
|
|
98
|
+
label: t("system.profile.password.field.new_password"),
|
|
100
99
|
component: "password",
|
|
101
|
-
props: { placeholder: t("system.profile.password.placeholder.
|
|
100
|
+
props: { placeholder: t("system.profile.password.placeholder.new_password") }
|
|
102
101
|
},
|
|
103
102
|
{
|
|
104
103
|
prop: "confirm_pwd",
|
|
105
|
-
label: t("system.profile.password.field.
|
|
104
|
+
label: t("system.profile.password.field.confirm_password"),
|
|
106
105
|
component: "password",
|
|
107
|
-
props: { placeholder: t("system.profile.password.placeholder.
|
|
106
|
+
props: { placeholder: t("system.profile.password.placeholder.confirm_password") }
|
|
108
107
|
}
|
|
109
108
|
]);
|
|
110
109
|
|
|
111
110
|
const passwordFormRules = computed(() => ({
|
|
112
|
-
old_pwd: [{ required: true, message: t("system.profile.password.placeholder.
|
|
111
|
+
old_pwd: [{ required: true, message: t("system.profile.password.placeholder.old_password"), trigger: "blur" }],
|
|
113
112
|
new_pwd: [
|
|
114
|
-
{ required: true, message: t("system.profile.password.placeholder.
|
|
113
|
+
{ required: true, message: t("system.profile.password.placeholder.new_password"), trigger: "blur" },
|
|
115
114
|
{ validator: validatePasswordStrength, trigger: "blur" }
|
|
116
115
|
],
|
|
117
|
-
confirm_pwd: [{ required: true, message: t("system.profile.password.placeholder.
|
|
116
|
+
confirm_pwd: [{ required: true, message: t("system.profile.password.placeholder.confirm_password"), trigger: "blur" }]
|
|
118
117
|
}));
|
|
119
118
|
|
|
120
119
|
/** 统一计算当前新密码强度,供展示和提交校验复用。 */
|
|
@@ -128,14 +127,14 @@ async function handleSubmitPassword() {
|
|
|
128
127
|
return;
|
|
129
128
|
}
|
|
130
129
|
if (!passwordStrength.value.isValid) {
|
|
131
|
-
ElMessage.error(t("system.profile.password.message.
|
|
130
|
+
ElMessage.error(t("system.profile.password.message.strength_insufficient"));
|
|
132
131
|
return;
|
|
133
132
|
}
|
|
134
133
|
|
|
135
134
|
submitLoading.value = true;
|
|
136
135
|
try {
|
|
137
|
-
const oldPwd = await encryptPassword(passwordForm.old_pwd, PASSWORD_CRYPTO_SCENE.
|
|
138
|
-
const newPwd = await encryptPassword(passwordForm.new_pwd, PASSWORD_CRYPTO_SCENE.
|
|
136
|
+
const oldPwd = await encryptPassword(passwordForm.old_pwd, PASSWORD_CRYPTO_SCENE.PASSWORD_CRYPTO_SCENE_UPDATE_USER_PASSWORD);
|
|
137
|
+
const newPwd = await encryptPassword(passwordForm.new_pwd, PASSWORD_CRYPTO_SCENE.PASSWORD_CRYPTO_SCENE_UPDATE_USER_PASSWORD);
|
|
139
138
|
const userPassword: UserPasswordForm = {
|
|
140
139
|
old_pwd: oldPwd,
|
|
141
140
|
new_pwd: newPwd
|