Browse Source

照片上传限制

master^2
suyanyan 2 weeks ago
parent
commit
64a0a1fe3d
2 changed files with 9 additions and 1 deletions
  1. +1
    -0
      SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue
  2. +8
    -1
      SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue

+ 1
- 0
SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue View File

@@ -20,6 +20,7 @@
v-model:file-list="fileList" v-model:file-list="fileList"
action="/api/business/personApi/uploadFile" action="/api/business/personApi/uploadFile"
list-type="picture-card" list-type="picture-card"
:limit="5"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:on-error="handleAvatarError" :on-error="handleAvatarError"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"


+ 8
- 1
SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue View File

@@ -42,6 +42,7 @@
v-model:file-list="fileList" v-model:file-list="fileList"
action="/api/business/personApi/uploadFile" action="/api/business/personApi/uploadFile"
list-type="picture-card" list-type="picture-card"
:limit="5"
:on-success="handleAvatarSuccess" :on-success="handleAvatarSuccess"
:on-error="handleAvatarError" :on-error="handleAvatarError"
:on-preview="handlePictureCardPreview" :on-preview="handlePictureCardPreview"
@@ -191,7 +192,7 @@ onMounted(async () => {
watch( watch(
() => [userInfo.value?.depId, userInfo.value?.majorId], () => [userInfo.value?.depId, userInfo.value?.majorId],
async ([newDepId, newMajorId], [oldDepId, oldMajorId]) => { async ([newDepId, newMajorId], [oldDepId, oldMajorId]) => {
if (newDepId != oldDepId) {
if (newDepId && newDepId != oldDepId) {
majorOptions.value = await getMajorList(newDepId); majorOptions.value = await getMajorList(newDepId);
classOptions.value = []; classOptions.value = [];
userInfo.value.personSetId = ""; userInfo.value.personSetId = "";
@@ -200,6 +201,12 @@ onMounted(async () => {
if (newMajorId && newMajorId != oldMajorId) { if (newMajorId && newMajorId != oldMajorId) {
classOptions.value = await getClassList(newMajorId); classOptions.value = await getClassList(newMajorId);
} }
if (!newDepId) {
majorOptions.value = [];
userInfo.value.personSetId = "";
userInfo.value.majorId = "";
classOptions.value = await getClassList("");
}
}, },
{ deep: true, immediate: false } { deep: true, immediate: false }
); );


Loading…
Cancel
Save