From ffbe422c63468bc70572038b2e8f18b8e4d529c4 Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Tue, 1 Jul 2025 16:48:49 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/archivesMIOD/miodLibrary/index.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/archivesMIOD/miodLibrary/index.vue b/src/views/archivesMIOD/miodLibrary/index.vue index 550b0fa..dd50d14 100644 --- a/src/views/archivesMIOD/miodLibrary/index.vue +++ b/src/views/archivesMIOD/miodLibrary/index.vue @@ -389,15 +389,16 @@ export default { 'search': data.echo.host_department } FetchBorrowerdsByIds(hostParams).then(res => { - console.log('res', res) if (res && res.length !== 0) { this.$refs.previewForm.hostDepartmentTags = res - // const ids = res.map(item => item.id) - // this.$set(this.$refs.previewForm.addOrUpdateForm, 'miodDepts', ids) + const ids = res.map(item => item.id) + this.$set(this.$refs.previewForm.addOrUpdateForm, 'host_department', ids) } else { - // this.$set(this.$refs.previewForm.addOrUpdateForm, 'miodDepts', null) + this.$set(this.$refs.previewForm.addOrUpdateForm, 'host_department', null) } }) + } else { + this.$refs.previewForm.hostDepartmentTags = [] } } else { console.log('add') @@ -647,6 +648,8 @@ export default { this.formVisible = false this.$refs.previewForm.miodDeptsTags = [] this.$refs.previewForm.miodDeptsSelections = [] + this.$refs.previewForm.hostDepartmentTags = [] + this.$refs.previewForm.hostDepartmentSelections = [] this.$refs.previewForm.deptsValid = false if (this.$refs.previewForm.$refs['addOrUpdateForm']) { this.$refs.previewForm.$refs['addOrUpdateForm'].clearValidate()