diff --git a/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue b/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue
index 1e47bdba2c..f8caa3f716 100644
--- a/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue
+++ b/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue
@@ -34,7 +34,12 @@
>
-
+
();
const formRef = ref();
const loading = ref(false);
+ const userStore = useUserStore();
const emit = defineEmits<{
(e: 'cancel', shouldSearch: boolean): void;
@@ -95,15 +101,12 @@
const form = reactive<{ name: string; userIds: string[]; description: string }>({
name: '',
- userIds: [],
+ userIds: userStore.id ? [userStore.id] : [],
description: '',
});
- const currentVisible = ref(props.visible);
+ const currentVisible = defineModel('visible', { default: false });
- watchEffect(() => {
- currentVisible.value = props.visible;
- });
const handleCancel = (shouldSearch = false) => {
emit('cancel', shouldSearch);
formRef.value?.resetFields();
diff --git a/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts b/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
index e9d92a4fa0..64a1503476 100644
--- a/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
+++ b/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
@@ -57,6 +57,7 @@ export default {
'system.organization.subordinateOrg': 'Subordinate organization',
'system.organization.searchUserPlaceholder': 'Search by name/email/phone number',
'system.organization.searchIndexPlaceholder': 'Search by name/id',
+ 'system.organization.organizationAdminRequired': 'Organization administrator cannot be empty',
'system.project.enableTitle': 'Start project',
'system.project.endTitle': 'Close project',
'system.project.enableContent': 'The project after opening is displayed in the organization switching list',
diff --git a/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts b/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
index 5c479cc28d..9141e11bc6 100644
--- a/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
+++ b/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
@@ -53,6 +53,7 @@ export default {
'system.organization.subordinateOrg': '所属组织',
'system.organization.searchIndexPlaceholder': '通过ID或名称搜索',
'system.organization.searchUserPlaceholder': '通过名称/邮箱/手机搜索',
+ 'system.organization.organizationAdminRequired': '组织管理员不能为空',
'system.project.enableTitle': '开启项目',
'system.project.endTitle': '结束项目',
'system.project.enableContent': '开启后的项目展示在项目切换列表',