|
@ -227,7 +227,7 @@ export const archivesCrud = { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
// 著录界面-form/详情-api
|
|
|
// 著录界面-form/详情-api
|
|
|
handleForm(type, title) { |
|
|
|
|
|
|
|
|
handleForm(type, title, isAnOrJuan) { |
|
|
if (type === 'add') { |
|
|
if (type === 'add') { |
|
|
this.formTitle = '新增' + title |
|
|
this.formTitle = '新增' + title |
|
|
this.arcId = null |
|
|
this.arcId = null |
|
@ -244,14 +244,31 @@ export const archivesCrud = { |
|
|
categoryId: this.categoryId, |
|
|
categoryId: this.categoryId, |
|
|
archivesId: this.arcId |
|
|
archivesId: this.arcId |
|
|
} |
|
|
} |
|
|
this.getFormInfo(params, type) |
|
|
|
|
|
|
|
|
this.getFormInfo(params, type, isAnOrJuan) |
|
|
}, |
|
|
}, |
|
|
getFormInfo(params, type) { |
|
|
|
|
|
|
|
|
getFormInfo(params, type, isAnOrJuan) { |
|
|
FetchFormDisplayFields(params).then(data => { |
|
|
FetchFormDisplayFields(params).then(data => { |
|
|
this.formPreviewData = data.showFiled |
|
|
this.formPreviewData = data.showFiled |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
if (type === 'edit') { |
|
|
if (type === 'edit') { |
|
|
this.$refs.previewForm.addOrUpdateForm = data.echo |
|
|
this.$refs.previewForm.addOrUpdateForm = data.echo |
|
|
|
|
|
} else { |
|
|
|
|
|
if (this.recycleMain.selectedCategory.isType !== 5) { |
|
|
|
|
|
// 新增时拿到项目和案卷的相同的字段的值
|
|
|
|
|
|
this.formPreviewData.forEach(item => { |
|
|
|
|
|
if (isAnOrJuan === 1) { |
|
|
|
|
|
if (this.recycleMain.selectedCategory.isType !== 3) { |
|
|
|
|
|
if (this.recycleMain.projectSelection[item.fieldName]) { |
|
|
|
|
|
this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.projectSelection)) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} else if (isAnOrJuan === 2) { |
|
|
|
|
|
if (this.recycleMain.anjuanSelection[item.fieldName]) { |
|
|
|
|
|
this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.anjuanSelection)) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
this.isDesFormType = 'arcives' |
|
|
this.isDesFormType = 'arcives' |
|
|
this.$refs.previewForm.FetchNoFormatField(this.categoryId) |
|
|
this.$refs.previewForm.FetchNoFormatField(this.categoryId) |
|
|