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()