@liujitcn/kratos-admin-system 0.0.49 → 0.0.51
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 +44 -8
- package/dist/package/declarations/src/api/system/admin/v1/base_i18n_custom.d.ts +18 -0
- package/dist/package/declarations/src/api/system/admin/v1/base_redact_output_policy.d.ts +4 -1
- package/dist/package/declarations/src/api/system/admin/v1/base_redact_storage_policy.d.ts +3 -1
- package/dist/package/declarations/src/api/system/admin/v1/base_tenant.d.ts +2 -2
- package/dist/package/declarations/src/api/system/admin/v1/base_tenant_project.d.ts +23 -0
- package/dist/package/declarations/src/api/system/admin/v1/base_tenant_project_grant.d.ts +16 -0
- package/dist/package/declarations/src/components/tenant-project/TenantProjectManager.vue.d.ts +29 -0
- package/dist/package/declarations/src/components/tenant-project/TenantProjectSelect.vue.d.ts +31 -0
- package/dist/package/declarations/src/components/tenant-project/TenantProjectText.vue.d.ts +19 -0
- package/dist/package/declarations/src/components/tenant-project/tenant-project-manager-data.d.ts +14 -0
- package/dist/package/declarations/src/components/tenant-project/tenant-project-manager.d.ts +40 -0
- package/dist/package/declarations/src/components/tenant-project-grant/ProjectGrantDialog.vue.d.ts +8 -0
- package/dist/package/declarations/src/index.d.ts +2 -0
- package/dist/package/declarations/src/locales/generated.d.ts +196 -0
- package/dist/package/declarations/src/rpc/base/v1/config.d.ts +11 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_i18n_custom.d.ts +105 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_output_policy.d.ts +8 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_redact_storage_policy.d.ts +25 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant.d.ts +10 -1
- package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant_project.d.ts +141 -0
- package/dist/package/declarations/src/rpc/system/admin/v1/base_tenant_project_grant.d.ts +105 -0
- package/dist/package/declarations/src/views/ai/chat/components/SessionPanel.vue.d.ts +2 -2
- package/dist/package/declarations/src/views/ai/chat/components/speech-recognition.d.ts +33 -0
- package/dist/package/declarations/src/views/base/i18n-custom/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/tenant-project/index.vue.d.ts +3 -0
- package/dist/package/declarations/src/views/base/tenant-project-grant/index.vue.d.ts +3 -0
- package/dist/package/src/api/system/admin/v1/base_i18n_custom.ts +72 -0
- package/dist/package/src/api/system/admin/v1/base_redact_output_policy.ts +7 -0
- package/dist/package/src/api/system/admin/v1/base_redact_storage_policy.ts +7 -0
- package/dist/package/src/api/system/admin/v1/base_tenant.ts +3 -2
- package/dist/package/src/api/system/admin/v1/base_tenant_project.ts +94 -0
- package/dist/package/src/api/system/admin/v1/base_tenant_project_grant.ts +63 -0
- package/dist/package/src/components/tenant-project/TenantProjectManager.vue +431 -0
- package/dist/package/src/components/tenant-project/TenantProjectSelect.vue +83 -0
- package/dist/package/src/components/tenant-project/TenantProjectText.vue +37 -0
- package/dist/package/src/components/tenant-project/tenant-project-manager-data.ts +26 -0
- package/dist/package/src/components/tenant-project/tenant-project-manager.ts +48 -0
- package/dist/package/src/components/tenant-project-grant/ProjectGrantDialog.vue +108 -0
- package/dist/package/src/index.ts +12 -0
- package/dist/package/src/locales/README.md +1 -1
- package/dist/package/src/locales/en-US.json +51 -2
- package/dist/package/src/locales/ja-JP.json +51 -2
- package/dist/package/src/locales/zh-CN.json +51 -2
- package/dist/package/src/locales/zh-TW.json +51 -2
- package/dist/package/src/module.ts +3 -3
- package/dist/package/src/rpc/base/v1/config.ts +12 -0
- package/dist/package/src/rpc/system/admin/v1/base_i18n_custom.ts +126 -0
- package/dist/package/src/rpc/system/admin/v1/base_redact_output_policy.ts +9 -0
- package/dist/package/src/rpc/system/admin/v1/base_redact_storage_policy.ts +30 -0
- package/dist/package/src/rpc/system/admin/v1/base_tenant.ts +11 -1
- package/dist/package/src/rpc/system/admin/v1/base_tenant_project.ts +166 -0
- package/dist/package/src/rpc/system/admin/v1/base_tenant_project_grant.ts +128 -0
- package/dist/package/src/views/ai/chat/components/XSender.vue +21 -28
- package/dist/package/src/views/ai/chat/components/speech-recognition.ts +156 -0
- package/dist/package/src/views/base/api-log/index.vue +3 -3
- package/dist/package/src/views/base/config/index.vue +3 -3
- package/dist/package/src/views/base/data-access-log/index.vue +3 -3
- package/dist/package/src/views/base/dept/index.vue +10 -45
- package/dist/package/src/views/base/dict/index.vue +3 -3
- package/dist/package/src/views/base/dict/item.vue +3 -3
- package/dist/package/src/views/base/file/index.vue +12 -3
- package/dist/package/src/views/base/i18n-custom/index.vue +321 -0
- package/dist/package/src/views/base/job/index.vue +85 -161
- package/dist/package/src/views/base/login-log/index.vue +13 -4
- package/dist/package/src/views/base/login-policy/index.vue +109 -40
- package/dist/package/src/views/base/menu/index.vue +3 -3
- package/dist/package/src/views/base/message/index.vue +9 -32
- package/dist/package/src/views/base/message-category/index.vue +2 -4
- package/dist/package/src/views/base/oauth-client/index.vue +8 -42
- package/dist/package/src/views/base/online-session/index.vue +8 -27
- package/dist/package/src/views/base/operation-log/index.vue +3 -3
- package/dist/package/src/views/base/permission-log/index.vue +3 -3
- package/dist/package/src/views/base/policy-evaluation-log/index.vue +3 -3
- package/dist/package/src/views/base/post/index.vue +9 -42
- package/dist/package/src/views/base/redact-output-policy/index.vue +19 -7
- package/dist/package/src/views/base/redact-rule/index.vue +70 -53
- package/dist/package/src/views/base/redact-storage-policy/index.vue +18 -7
- package/dist/package/src/views/base/role/index.vue +14 -48
- package/dist/package/src/views/base/tenant/index.vue +163 -19
- package/dist/package/src/views/base/tenant-project/index.vue +12 -0
- package/dist/package/src/views/base/tenant-project-grant/index.vue +338 -0
- package/dist/package/src/views/base/user/index.vue +30 -51
- package/dist/package/src/views/profile/components/login-log.vue +15 -2
- package/dist/package/src/views/profile/components/password.vue +1 -1
- package/dist/package/src/views/profile/components/security.vue +2 -2
- package/dist/package/src/views/tool/code-gen/components/CodeGenLocaleEditor.vue +2 -2
- package/dist/package/src/views/tool/code-gen/config.ts +2 -1
- package/package.json +2 -2
- /package/dist/package/declarations/src/components/{ChangePasswordForm.vue.d.ts → account/ChangePasswordForm.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{ForcedPasswordDialog.vue.d.ts → account/ForcedPasswordDialog.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{Ai.vue.d.ts → ai/Ai.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{DynamicI18nCell.vue.d.ts → i18n/DynamicI18nCell.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{DynamicI18nEditor.vue.d.ts → i18n/DynamicI18nEditor.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{dynamicI18n.d.ts → i18n/dynamicI18n.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{LogTable.vue.d.ts → log/LogTable.vue.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{log.d.ts → log/log.d.ts} +0 -0
- /package/dist/package/declarations/src/components/{Notification.vue.d.ts → notification/Notification.vue.d.ts} +0 -0
- /package/dist/package/src/components/{ChangePasswordForm.vue → account/ChangePasswordForm.vue} +0 -0
- /package/dist/package/src/components/{ForcedPasswordDialog.vue → account/ForcedPasswordDialog.vue} +0 -0
- /package/dist/package/src/components/{Ai.vue → ai/Ai.vue} +0 -0
- /package/dist/package/src/components/{DynamicI18nCell.vue → i18n/DynamicI18nCell.vue} +0 -0
- /package/dist/package/src/components/{DynamicI18nEditor.vue → i18n/DynamicI18nEditor.vue} +0 -0
- /package/dist/package/src/components/{dynamicI18n.ts → i18n/dynamicI18n.ts} +0 -0
- /package/dist/package/src/components/{LogTable.vue → log/LogTable.vue} +0 -0
- /package/dist/package/src/components/{log.ts → log/log.ts} +0 -0
- /package/dist/package/src/components/{Notification.vue → notification/Notification.vue} +0 -0
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
62
|
<script setup lang="ts">
|
|
63
|
-
import { computed, reactive, ref } from "vue";
|
|
63
|
+
import { computed, onMounted, reactive, ref } from "vue";
|
|
64
64
|
import { useDebounceFn } from "@vueuse/core";
|
|
65
65
|
import { ElMessage, ElMessageBox } from "element-plus";
|
|
66
66
|
import { CirclePlus, Delete, EditPen, RefreshLeft } from "@element-plus/icons-vue";
|
|
@@ -82,13 +82,11 @@ import { BaseUserIDType } from "@liujitcn/kratos-admin-system/rpc/system/common/
|
|
|
82
82
|
import { defBaseDeptService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_dept";
|
|
83
83
|
import { defBaseRoleService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_role";
|
|
84
84
|
import { defBasePostService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_post";
|
|
85
|
-
import { defBaseTenantService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_tenant";
|
|
86
85
|
import type { SelectOptionResponse_Option, TreeOptionResponse_Option } from "@liujitcn/kratos-admin-system/rpc/common/v1/common";
|
|
87
86
|
import { Status } from "@liujitcn/kratos-admin-system/rpc/common/v1/enum";
|
|
88
87
|
import { buildPageRequest, normalizeSelectedIds } from "@liujitcn/kratos-admin-core/table";
|
|
89
88
|
import { PASSWORD_CRYPTO_SCENE, encryptPassword } from "@liujitcn/kratos-admin-core/security";
|
|
90
|
-
import {
|
|
91
|
-
import { useUserStore } from "@liujitcn/kratos-admin-core/stores/runtime";
|
|
89
|
+
import { useTenantScope } from "@liujitcn/kratos-admin-core/tenant";
|
|
92
90
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
93
91
|
|
|
94
92
|
/** 用户表单状态,前端保留明文密码并在提交前加密。 */
|
|
@@ -124,7 +122,7 @@ type DeptFilterNode = {
|
|
|
124
122
|
};
|
|
125
123
|
|
|
126
124
|
const { BUTTONS } = useAuthButtons();
|
|
127
|
-
const
|
|
125
|
+
const { isDefaultTenant, tenantColumns, tenantFormField, toRequestTenantId, loadTenantOptions } = useTenantScope();
|
|
128
126
|
const proTable = ref<ProTableInstance>();
|
|
129
127
|
const formDialogRef = ref<InstanceType<typeof FormDialog>>();
|
|
130
128
|
const resetPwdFormDialogRef = ref<InstanceType<typeof FormDialog>>();
|
|
@@ -188,7 +186,7 @@ const resetPwdTargetName = ref("");
|
|
|
188
186
|
const rules = computed(() => ({
|
|
189
187
|
tenant_id: [
|
|
190
188
|
{
|
|
191
|
-
required:
|
|
189
|
+
required: isDefaultTenant.value,
|
|
192
190
|
message: t("common.validation.required_select", { field: t("common.field.tenant") }),
|
|
193
191
|
trigger: "change"
|
|
194
192
|
}
|
|
@@ -292,7 +290,7 @@ const resetPwdRules = computed(() => ({
|
|
|
292
290
|
const basedDeptOptions = ref<TreeOptionResponse_Option[]>([]);
|
|
293
291
|
const baseRoleOptions = ref<SelectOptionResponse_Option[]>([]);
|
|
294
292
|
const basePostOptions = ref<SelectOptionResponse_Option[]>([]);
|
|
295
|
-
const
|
|
293
|
+
const undeletableRoleIds = ref(new Set<number>());
|
|
296
294
|
const statusOptions = computed<ProFormOption[]>(() => [
|
|
297
295
|
{ label: t("common.status.enabled"), value: Status.STATUS_ENABLE },
|
|
298
296
|
{ label: t("common.status.disabled"), value: Status.STATUS_DISABLE }
|
|
@@ -324,8 +322,9 @@ const resetPwdFields = computed<ProFormField[]>(() => [
|
|
|
324
322
|
}
|
|
325
323
|
]);
|
|
326
324
|
|
|
327
|
-
|
|
328
|
-
|
|
325
|
+
onMounted(() => {
|
|
326
|
+
if (isDefaultTenant.value) void loadTenantOptions();
|
|
327
|
+
});
|
|
329
328
|
|
|
330
329
|
/** 当前编辑用户是否绑定 super 或 tenant 内置角色。 */
|
|
331
330
|
const isProtectedUserRole = computed(() => {
|
|
@@ -338,19 +337,7 @@ const isSuperEditUser = computed(() => Boolean(formData.id && formData.user_name
|
|
|
338
337
|
|
|
339
338
|
/** 用户表单字段配置。 */
|
|
340
339
|
const formFields = computed<ProFormField[]>(() => [
|
|
341
|
-
{
|
|
342
|
-
prop: "tenant_id",
|
|
343
|
-
label: t("common.field.tenant"),
|
|
344
|
-
component: "select",
|
|
345
|
-
props: {
|
|
346
|
-
placeholder: t("common.placeholder.select"),
|
|
347
|
-
filterable: true,
|
|
348
|
-
disabled: Boolean(formData.id),
|
|
349
|
-
onChange: handleFormTenantChange
|
|
350
|
-
},
|
|
351
|
-
visible: () => isDefaultTenant.value,
|
|
352
|
-
options: tenantOptions.value
|
|
353
|
-
},
|
|
340
|
+
tenantFormField({ label: t("common.field.tenant"), disabledOnEdit: true, props: { onChange: handleFormTenantChange } }),
|
|
354
341
|
{
|
|
355
342
|
prop: "user_name",
|
|
356
343
|
label: t("system.base.user.field.user_name"),
|
|
@@ -463,20 +450,8 @@ const formFields = computed<ProFormField[]>(() => [
|
|
|
463
450
|
|
|
464
451
|
/** 用户表格列配置。 */
|
|
465
452
|
const columns = computed<ColumnProps[]>(() => [
|
|
466
|
-
{ type: "selection", width: 55, selectable: row => !
|
|
467
|
-
...(
|
|
468
|
-
? ([
|
|
469
|
-
{
|
|
470
|
-
prop: "tenant_id",
|
|
471
|
-
label: t("common.field.tenant"),
|
|
472
|
-
minWidth: 140,
|
|
473
|
-
align: "left",
|
|
474
|
-
showOverflowTooltip: true,
|
|
475
|
-
search: { el: "select", key: "tenant_id", props: { filterable: true }, order: 1 },
|
|
476
|
-
enum: requestTenantOptions
|
|
477
|
-
}
|
|
478
|
-
] satisfies ColumnProps[])
|
|
479
|
-
: []),
|
|
453
|
+
{ type: "selection", width: 55, selectable: row => !isDeleteProtectedManagementUser(row as BaseUser) },
|
|
454
|
+
...tenantColumns({ label: t("common.field.tenant"), order: 1 }),
|
|
480
455
|
{ prop: "user_name", label: t("system.base.user.field.user_name"), minWidth: 140, search: { el: "input" } },
|
|
481
456
|
{ prop: "user_code", label: t("system.base.user.field.user_code"), minWidth: 140, search: { el: "input" } },
|
|
482
457
|
{ prop: "nick_name", label: t("system.base.user.field.nick_name_short"), minWidth: 100, search: { el: "input" } },
|
|
@@ -546,7 +521,7 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
546
521
|
type: "danger",
|
|
547
522
|
link: true,
|
|
548
523
|
icon: Delete,
|
|
549
|
-
hidden: scope =>
|
|
524
|
+
hidden: scope => isDeleteProtectedManagementUser(scope.row as BaseUser) || !BUTTONS.value["base:user:delete"],
|
|
550
525
|
onClick: scope => handleDelete(scope.row as BaseUser)
|
|
551
526
|
}
|
|
552
527
|
]
|
|
@@ -623,7 +598,7 @@ function changeTreeFilter(value: string) {
|
|
|
623
598
|
* 请求用户分页列表,并统一处理分页参数。
|
|
624
599
|
*/
|
|
625
600
|
async function requestBaseUserTable(params: PageBaseUserRequest) {
|
|
626
|
-
const tenantId =
|
|
601
|
+
const tenantId = toRequestTenantId(params.tenant_id);
|
|
627
602
|
if (tenantId !== selectedTenantId.value) {
|
|
628
603
|
selectedTenantId.value = tenantId;
|
|
629
604
|
initParam.dept_id = undefined;
|
|
@@ -640,13 +615,15 @@ async function requestBaseUserTable(params: PageBaseUserRequest) {
|
|
|
640
615
|
|
|
641
616
|
/** 读取当前列表关联选项使用的租户。 */
|
|
642
617
|
function getOptionTenantId() {
|
|
643
|
-
return
|
|
618
|
+
return toRequestTenantId(selectedTenantId.value);
|
|
644
619
|
}
|
|
645
620
|
|
|
646
621
|
/** 请求角色关联选项。 */
|
|
647
622
|
async function requestRoleOptions() {
|
|
648
623
|
const response = await defBaseRoleService.OptionBaseRole({ tenant_id: getOptionTenantId() });
|
|
649
|
-
|
|
624
|
+
const options = response.list ?? [];
|
|
625
|
+
updateUndeletableRoleIds(options);
|
|
626
|
+
return { data: options };
|
|
650
627
|
}
|
|
651
628
|
|
|
652
629
|
/** 请求部门关联选项。 */
|
|
@@ -679,26 +656,18 @@ async function loadFormOptions() {
|
|
|
679
656
|
basedDeptOptions.value = [];
|
|
680
657
|
return;
|
|
681
658
|
}
|
|
682
|
-
const tenantId =
|
|
659
|
+
const tenantId = toRequestTenantId(formData.tenant_id);
|
|
683
660
|
const [optionBaseRoleResponse, optionBaseDeptResponse, optionBasePostResponse] = await Promise.all([
|
|
684
661
|
defBaseRoleService.OptionBaseRole({ tenant_id: tenantId }),
|
|
685
662
|
defBaseDeptService.OptionBaseDept({ tenant_id: tenantId }),
|
|
686
663
|
defBasePostService.OptionBasePost({ tenant_id: tenantId })
|
|
687
664
|
]);
|
|
688
665
|
baseRoleOptions.value = optionBaseRoleResponse.list || [];
|
|
666
|
+
updateUndeletableRoleIds(baseRoleOptions.value);
|
|
689
667
|
basePostOptions.value = optionBasePostResponse.list || [];
|
|
690
668
|
basedDeptOptions.value = optionBaseDeptResponse.list || [];
|
|
691
669
|
}
|
|
692
670
|
|
|
693
|
-
/**
|
|
694
|
-
* 加载租户下拉选项。
|
|
695
|
-
*/
|
|
696
|
-
async function loadTenantOptions() {
|
|
697
|
-
if (!isDefaultTenant.value || tenantOptions.value.length) return;
|
|
698
|
-
const response = await defBaseTenantService.OptionBaseTenant({ keyword: "" });
|
|
699
|
-
tenantOptions.value = response.list ?? [];
|
|
700
|
-
}
|
|
701
|
-
|
|
702
671
|
/**
|
|
703
672
|
* 切换用户表单租户时,清空角色和部门并重新加载选项。
|
|
704
673
|
*/
|
|
@@ -865,7 +834,7 @@ function handleDelete(selected?: number | string | Array<number | string> | Base
|
|
|
865
834
|
: selected && typeof selected === "object"
|
|
866
835
|
? [selected]
|
|
867
836
|
: [];
|
|
868
|
-
if (userList.some(
|
|
837
|
+
if (userList.some(isDeleteProtectedManagementUser)) {
|
|
869
838
|
ElMessage.warning(t("system.base.user.message.protected_account"));
|
|
870
839
|
return;
|
|
871
840
|
}
|
|
@@ -908,4 +877,14 @@ function handleDelete(selected?: number | string | Array<number | string> | Base
|
|
|
908
877
|
function isProtectedManagementUser(row?: BaseUser) {
|
|
909
878
|
return Boolean(row?.is_protected);
|
|
910
879
|
}
|
|
880
|
+
|
|
881
|
+
/** 判断用户是否禁止通过用户管理删除。 */
|
|
882
|
+
function isDeleteProtectedManagementUser(row?: BaseUser) {
|
|
883
|
+
return isProtectedManagementUser(row) || Boolean(row?.role_id && undeletableRoleIds.value.has(row.role_id));
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
/** 根据角色选项同步不可删除的内置角色编号。 */
|
|
887
|
+
function updateUndeletableRoleIds(options: SelectOptionResponse_Option[]) {
|
|
888
|
+
undeletableRoleIds.value = new Set(options.filter(option => option.disabled).map(option => option.value));
|
|
889
|
+
}
|
|
911
890
|
</script>
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
import { computed, ref } from "vue";
|
|
21
21
|
import ProTable from "@liujitcn/kratos-admin-core/components/ProTable";
|
|
22
22
|
import type { ColumnProps, ProTableInstance } from "@liujitcn/kratos-admin-core/components/ProTable/interface";
|
|
23
|
+
import { formatDateTime } from "@liujitcn/kratos-admin-core/format";
|
|
23
24
|
import { buildPageRequest } from "@liujitcn/kratos-admin-core/table";
|
|
24
25
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
25
26
|
import { defBaseLoginLogService } from "@liujitcn/kratos-admin-system/api/system/admin/v1/base_login_log";
|
|
@@ -44,7 +45,13 @@ const resultOptions = computed<Array<[number, string]>>(() => [
|
|
|
44
45
|
[BaseLogResult.BASE_LOG_RESULT_ERROR, t("system.base.log.result.error")]
|
|
45
46
|
]);
|
|
46
47
|
const columns = computed<ColumnProps[]>(() => [
|
|
47
|
-
{
|
|
48
|
+
{
|
|
49
|
+
prop: "occurred_at",
|
|
50
|
+
label: t("system.profile.login_log.field.occurred_at"),
|
|
51
|
+
minWidth: 180,
|
|
52
|
+
align: "center",
|
|
53
|
+
render: scope => formatDateTime((scope.row as BaseLoginLog).occurred_at)
|
|
54
|
+
},
|
|
48
55
|
{
|
|
49
56
|
prop: "login_type",
|
|
50
57
|
label: t("system.profile.login_log.field.login_type"),
|
|
@@ -58,7 +65,13 @@ const columns = computed<ColumnProps[]>(() => [
|
|
|
58
65
|
render: scope => enumLabel(resultOptions.value, (scope.row as BaseLoginLog).result)
|
|
59
66
|
},
|
|
60
67
|
{ prop: "client_ip", label: t("system.profile.login_log.field.client_ip"), minWidth: 140 },
|
|
61
|
-
{
|
|
68
|
+
{
|
|
69
|
+
prop: "device_id",
|
|
70
|
+
label: t("system.profile.login_log.field.device_id"),
|
|
71
|
+
minWidth: 160,
|
|
72
|
+
align: "left",
|
|
73
|
+
render: scope => (scope.row as BaseLoginLog).device_id || (scope.row as BaseLoginLog).user_agent || "--"
|
|
74
|
+
},
|
|
62
75
|
{ prop: "reason", label: t("system.profile.login_log.field.reason"), minWidth: 180 }
|
|
63
76
|
]);
|
|
64
77
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
<script setup lang="ts">
|
|
19
19
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
20
|
-
import ChangePasswordForm from "../../../components/ChangePasswordForm.vue";
|
|
20
|
+
import ChangePasswordForm from "../../../components/account/ChangePasswordForm.vue";
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<style scoped lang="scss">
|
|
@@ -413,10 +413,10 @@ function getCurrentSecurityPath() {
|
|
|
413
413
|
return resolveFrontendRouteURL(router, { path: route.path, query });
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
/**
|
|
416
|
+
/** 拉取当前用户三方账号绑定状态,空列表字段省略时不展示绑定项。 */
|
|
417
417
|
async function loadOauthBindings() {
|
|
418
418
|
const result = await defProfileOauthService.ListOauthBinding({});
|
|
419
|
-
oauthBindings.value = result.bindings.map(withOauthProviderDisplay);
|
|
419
|
+
oauthBindings.value = (result.bindings ?? []).map(withOauthProviderDisplay);
|
|
420
420
|
}
|
|
421
421
|
|
|
422
422
|
/** 拉取当前用户 MFA 状态。 */
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
<script setup lang="ts">
|
|
12
12
|
import { computed } from "vue";
|
|
13
|
-
import DynamicI18nEditor from "@liujitcn/kratos-admin-system/components/DynamicI18nEditor.vue";
|
|
14
|
-
import { getEditableLanguageOptions, type DynamicI18nValue } from "@liujitcn/kratos-admin-system/components/dynamicI18n";
|
|
13
|
+
import DynamicI18nEditor from "@liujitcn/kratos-admin-system/components/i18n/DynamicI18nEditor.vue";
|
|
14
|
+
import { getEditableLanguageOptions, type DynamicI18nValue } from "@liujitcn/kratos-admin-system/components/i18n/dynamicI18n";
|
|
15
15
|
import type { CodeGenLocaleConfig } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
|
|
16
16
|
|
|
17
17
|
/** 代码生成描述使用统一国际化入口,按字段保存回语言配置。 */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getEditableLanguageOptions } from "@liujitcn/kratos-admin-system/components/dynamicI18n";
|
|
1
|
+
import { getEditableLanguageOptions } from "@liujitcn/kratos-admin-system/components/i18n/dynamicI18n";
|
|
2
2
|
import type { CodeGenLocaleConfig } from "@liujitcn/kratos-admin-system/rpc/system/admin/v1/base_i18n";
|
|
3
3
|
import type { FormRules } from "element-plus";
|
|
4
4
|
import { t } from "@liujitcn/kratos-admin-core";
|
|
@@ -80,6 +80,7 @@ const codeGenFormComponentLabelKeys: Record<ProFormComponentType, string> = {
|
|
|
80
80
|
switch: "system.code.gen.component.switch",
|
|
81
81
|
checkbox: "system.code.gen.component.checkbox",
|
|
82
82
|
select: "system.code.gen.component.select",
|
|
83
|
+
"tenant-select": "system.code.gen.component.select",
|
|
83
84
|
dict: "system.code.gen.component.dict",
|
|
84
85
|
"radio-group": "system.code.gen.component.radio_group",
|
|
85
86
|
"checkbox-group": "system.code.gen.component.checkbox_group",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liujitcn/kratos-admin-system",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.51",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "kratos-admin system management module",
|
|
7
7
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"sortablejs": "^1.15.2",
|
|
17
17
|
"swagger-ui-dist": "^5.32.15",
|
|
18
18
|
"vue-element-plus-x": "^2.0.3",
|
|
19
|
-
"@liujitcn/kratos-admin-core": "0.0.
|
|
19
|
+
"@liujitcn/kratos-admin-core": "0.0.51"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@element-plus/icons-vue": "^2.3.1",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/package/declarations/src/components/{dynamicI18n.d.ts → i18n/dynamicI18n.d.ts}
RENAMED
|
File without changes
|
/package/dist/package/declarations/src/components/{LogTable.vue.d.ts → log/LogTable.vue.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/package/src/components/{ChangePasswordForm.vue → account/ChangePasswordForm.vue}
RENAMED
|
File without changes
|
/package/dist/package/src/components/{ForcedPasswordDialog.vue → account/ForcedPasswordDialog.vue}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|