From d2778c0eb272e8795289317b2d05e55a73bc4c87 Mon Sep 17 00:00:00 2001 From: RubyLiu Date: Wed, 7 Feb 2024 16:20:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=88=9B=E5=BB=BA=E7=BB=84=E7=BB=87=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E5=BF=85=E5=A1=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/addOrganizationModal.vue | 17 ++++++++++------- .../organizationAndProject/locale/en-US.ts | 1 + .../organizationAndProject/locale/zh-CN.ts | 1 + 3 files changed, 12 insertions(+), 7 deletions(-) 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': '开启后的项目展示在项目切换列表',