diff --git a/src/api/collect/collect.js b/src/api/collect/collect.js new file mode 100644 index 0000000..0db561e --- /dev/null +++ b/src/api/collect/collect.js @@ -0,0 +1,21 @@ +import request from '@/utils/request' + +// 根据门类父id获取卷内列表列 +export function FetchInitCategoryViewTable(params) { + return request({ + url: 'api/collect/initCategoryViewTable', + method: 'get', + params + }) +} + +// 根据门类父id获取卷内列表 +export function FetchInitSingleCategoryView(params) { + return request({ + url: 'api/collect/initSingleCategoryView', + method: 'get', + params + }) +} + +export default { FetchInitCategoryViewTable, FetchInitSingleCategoryView } diff --git a/src/api/prearchiveLibrary/prearchiveLibrary.js b/src/api/prearchiveLibrary/prearchiveLibrary.js index edd3204..a297c96 100644 --- a/src/api/prearchiveLibrary/prearchiveLibrary.js +++ b/src/api/prearchiveLibrary/prearchiveLibrary.js @@ -83,4 +83,30 @@ export function FetchMove(data) { }) } -export default { add, prearchEdit, del, FetchInitPreDocument, FetchInitDocumentsViewTable, FetchDoeditDocument, FetchBatchToFile, FetchMergeToFile, FetchMove } +// 详情 +export function FetchArchivesDetails(params) { + return request({ + url: 'api/re-document/archivesDetails', + method: 'get', + params + }) +} + +// 根据预归档档案获取电子原文列表 +export function FetchFileListByDocumentId(params) { + return request({ + url: 'api/re-document/getFileListByDocumentId', + method: 'get', + params + }) +} + +export function FetchArchivesMetadata(params) { + return request({ + url: 'api/re-document/archivesMetadata', + method: 'get', + params + }) +} + +export default { add, prearchEdit, del, FetchInitPreDocument, FetchInitDocumentsViewTable, FetchDoeditDocument, FetchBatchToFile, FetchMergeToFile, FetchMove, FetchArchivesDetails, FetchFileListByDocumentId, FetchArchivesMetadata } diff --git a/src/assets/styles/yxk-admin.scss b/src/assets/styles/yxk-admin.scss index 4a03122..29220ab 100644 --- a/src/assets/styles/yxk-admin.scss +++ b/src/assets/styles/yxk-admin.scss @@ -765,7 +765,7 @@ .field-setting-dialog, .edit-form-dialog{ .el-dialog{ - width: 536px; + width: 600px; .el-dialog__body { .el-form-item{ &:nth-child(odd){ diff --git a/src/utils/upload.js b/src/utils/upload.js index beb99dc..3d4b14c 100644 --- a/src/utils/upload.js +++ b/src/utils/upload.js @@ -21,6 +21,17 @@ export function archivesUpload(api, file, categoryId) { return axios.post(api, data, config) } +// 档案上传附件 +export function reDocumentUpload(api, file, documentId) { + var data = new FormData() + data.append('file', file) + data.append('documentId', documentId) + const config = { + headers: { 'Authorization': getToken() } + } + return axios.post(api, data, config) +} + // 上传模型 export function modelUpload(api, file, name) { var data = new FormData() diff --git a/src/views/components/category/PreviewForm.vue b/src/views/components/category/PreviewForm.vue index 2b2f907..4e74fef 100644 --- a/src/views/components/category/PreviewForm.vue +++ b/src/views/components/category/PreviewForm.vue @@ -77,9 +77,9 @@
- + - +
@@ -88,9 +88,9 @@
- + - +
@@ -101,10 +101,10 @@
- + - +
@@ -124,6 +124,8 @@ import { FetchSonDictionaryList } from '@/api/system/dict' import { FetchFondsAll } from '@/api/system/fonds' import { FetchArchivesClassTree, FetchSonArchivesClass } from '@/api/system/archivesClass' import { parseTime, getCurrentTime } from '@/utils/index' +import { reDocumentUpload } from '@/utils/upload' +import { mapGetters } from 'vuex' export default { name: 'PreviewForm', @@ -144,6 +146,12 @@ export default { return {} } }, + selectedDocument: { + type: Object, + default: function() { + return {} + } + }, arcId: { type: String, default: '' @@ -201,9 +209,16 @@ export default { mergeFileCategory: null } }, + computed: { + ...mapGetters([ + 'baseApi' + ]) + }, watch: { selectedCategory: function(newValue, oldValue) { }, + selectedDocument: function(newValue, oldValue) { + }, arcId: function(newValue, oldValue) { }, parentsId: function(newValue, oldValue) { @@ -728,14 +743,13 @@ export default { } else { this.px = '' } - this.uploadSave() // 上传附件 - // archivesUpload(this.baseApi + '/api/archives/uploadFile', this.file, this.categoryId).then(res => { - // if (res.data.code === 200) { - // this.filePath = res.data.data - // this.uploadSave() - // } - // }) + reDocumentUpload(this.baseApi + '/api/re-document/uploadFile', this.file, this.selectedDocument.id).then(res => { + if (res.data.code === 200) { + this.filePath = res.data.data + this.uploadSave() + } + }) }, // 上传附件 - 选择上传即保存 uploadSave() { @@ -888,5 +902,4 @@ export default { } } } - diff --git a/src/views/prearchiveLibrary/index.vue b/src/views/prearchiveLibrary/index.vue index 02d8540..080c262 100644 --- a/src/views/prearchiveLibrary/index.vue +++ b/src/views/prearchiveLibrary/index.vue @@ -43,6 +43,7 @@ ref="table" v-loading="crud.loading" :data="crud.data" + @row-click="clickRowHandler" @select="crud.selectChange" @select-all="crud.selectAllChange" @selection-change="crud.selectionChangeHandler" @@ -68,11 +69,11 @@ - + - + @@ -104,7 +105,7 @@
- +