From 64a0a1fe3d7a4a99af69ddeb399bff26213515c7 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Thu, 31 Oct 2024 11:24:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=85=A7=E7=89=87=E4=B8=8A=E4=BC=A0=E9=99=90?= =?UTF-8?q?=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../keyPersonnel/components/form/form_basic.vue | 1 + .../userManage/personnel/components/form/form_basic.vue | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue b/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue index 380eace..18cffd7 100644 --- a/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue +++ b/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue @@ -20,6 +20,7 @@ v-model:file-list="fileList" action="/api/business/personApi/uploadFile" list-type="picture-card" + :limit="5" :on-success="handleAvatarSuccess" :on-error="handleAvatarError" :on-preview="handlePictureCardPreview" diff --git a/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue b/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue index f38cb8e..e2efa15 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue @@ -42,6 +42,7 @@ v-model:file-list="fileList" action="/api/business/personApi/uploadFile" list-type="picture-card" + :limit="5" :on-success="handleAvatarSuccess" :on-error="handleAvatarError" :on-preview="handlePictureCardPreview" @@ -191,7 +192,7 @@ onMounted(async () => { watch( () => [userInfo.value?.depId, userInfo.value?.majorId], async ([newDepId, newMajorId], [oldDepId, oldMajorId]) => { - if (newDepId != oldDepId) { + if (newDepId && newDepId != oldDepId) { majorOptions.value = await getMajorList(newDepId); classOptions.value = []; userInfo.value.personSetId = ""; @@ -200,6 +201,12 @@ onMounted(async () => { if (newMajorId && newMajorId != oldMajorId) { classOptions.value = await getClassList(newMajorId); } + if (!newDepId) { + majorOptions.value = []; + userInfo.value.personSetId = ""; + userInfo.value.majorId = ""; + classOptions.value = await getClassList(""); + } }, { deep: true, immediate: false } );