Browse Source

大文件上传

master
xuhuajiao 1 year ago
parent
commit
cd18963555
  1. 2
      src/assets/styles/archives-manage.scss
  2. 2
      src/assets/styles/prearchive-library.scss
  3. 7
      src/assets/styles/yxk-admin.scss
  4. 8
      src/views/archivesManage/managementLibrary/mixins/index.js
  5. 5
      src/views/collectReorganizi/collectionLibrary/anjuan/content.vue
  6. 23
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  7. 3
      src/views/collectReorganizi/collectionLibrary/file/index.vue
  8. 6
      src/views/collectReorganizi/collectionLibrary/index.vue
  9. 2
      src/views/collectReorganizi/collectionLibrary/juannei/index.vue
  10. 18
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  11. 4
      src/views/collectReorganizi/collectionLibrary/module/blukEditing/index.vue
  12. 44
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  13. 7
      src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue
  14. 301
      src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload.vue
  15. 45
      src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload2.vue
  16. 69
      src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/index.vue
  17. 2
      src/views/collectReorganizi/collectionLibrary/project/index.vue
  18. 1
      src/views/prearchiveLibrary/module/moveFile.vue

2
src/assets/styles/archives-manage.scss

@ -151,7 +151,7 @@
.is-scrolling-left, .is-scrolling-left,
.is-scrolling-middle, .is-scrolling-middle,
.is-scrolling-right{ .is-scrolling-right{
max-height: calc(100vh - 434px) !important;
max-height: calc(100vh - 352px) !important;
} }
} }
.base-info .row-state{ .base-info .row-state{

2
src/assets/styles/prearchive-library.scss

@ -47,7 +47,7 @@
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
height: 360px; height: 360px;
overflow: hidden;
// overflow: hidden;
// overflow-y: scroll; // overflow-y: scroll;
.el-radio{ .el-radio{
width: 100%; width: 100%;

7
src/assets/styles/yxk-admin.scss

@ -355,9 +355,11 @@
background: transparent; background: transparent;
@include tree_font_color; @include tree_font_color;
} }
// table // table
.el-table{ .el-table{
width: 100%;
display: flex;
flex-direction: column;
background: transparent; background: transparent;
tr{ tr{
background: transparent; background: transparent;
@ -366,6 +368,9 @@
background-color: transparent; background-color: transparent;
} }
} }
.el-table__body-wrapper {
flex: 1;
}
.el-table__header-wrapper, .el-table__header-wrapper,
.el-table__header{ .el-table__header{

8
src/views/archivesManage/managementLibrary/mixins/index.js

@ -56,8 +56,6 @@ export const manageLibraryCrud = {
if (this.selectedCategory.arrangeType === 1) { if (this.selectedCategory.arrangeType === 1) {
this.parentsId = null this.parentsId = null
} else { } else {
console.log('未整理理理理2')
console.log(this.activeIndex)
if (this.activeIndex === 1) { if (this.activeIndex === 1) {
this.parentsId = null this.parentsId = null
} else { } else {
@ -70,16 +68,19 @@ export const manageLibraryCrud = {
this.$parent.$parent.getTableDisplayFieldsLoading = true this.$parent.$parent.getTableDisplayFieldsLoading = true
this.parentsId = this.parentsData.parentsAnjuanId this.parentsId = this.parentsData.parentsAnjuanId
} else if (this.isTitleType === 6) { } else if (this.isTitleType === 6) {
console.log('isTitleType', this.isTitleType)
// 原文 // 原文
if (this.selectedCategory.arrangeType === 1) { if (this.selectedCategory.arrangeType === 1) {
this.parentsId = this.parentsData.parentsAnjuanId this.parentsId = this.parentsData.parentsAnjuanId
this.$parent.getTableDisplayFieldsLoading = true this.$parent.getTableDisplayFieldsLoading = true
} else { } else {
this.$parent.$parent.getTableDisplayFieldsLoading = true this.$parent.$parent.getTableDisplayFieldsLoading = true
if (this.parentsData.isTabFile) {
this.parentsId = this.parentsData.parentsAnjuanId
} else {
this.parentsId = this.parentsData.parentsJuanneiId this.parentsId = this.parentsData.parentsJuanneiId
} }
} }
}
setTimeout(() => { setTimeout(() => {
this.getViewTable(categoryLevel, this.parentsId, 'search') this.getViewTable(categoryLevel, this.parentsId, 'search')
@ -105,7 +106,6 @@ export const manageLibraryCrud = {
}) })
}, },
getViewTableList(categoryLevel, parentsId, type) { getViewTableList(categoryLevel, parentsId, type) {
console.log('list', parentsId)
const params = { const params = {
'parentId': parentsId, 'parentId': parentsId,
'categoryId': this.selectedCategory.id, 'categoryId': this.selectedCategory.id,

5
src/views/collectReorganizi/collectionLibrary/anjuan/content.vue

@ -6,7 +6,7 @@
<!-- 最右侧装饰img --> <!-- 最右侧装饰img -->
<span class="tab-right-img" /> <span class="tab-right-img" />
</ul> </ul>
<TableListMoudle ref="tableList" :is-title-type="isTitleType" :selected-category="selectedCategory" :active-index="activeIndex" :test="test" :is-recycle="isRecycle" :smart-query="smartQuery" />
<TableListMoudle ref="tableList" :is-title-type="isTitleType" :selected-category="selectedCategory" :active-index="activeIndex" :is-recycle="isRecycle" :smart-query="smartQuery" />
</div> </div>
</template> </template>
@ -40,8 +40,7 @@ export default {
data() { data() {
return { return {
isTitleType: 3, isTitleType: 3,
activeIndex: 0,
test: ''
activeIndex: 0
} }
}, },
created() { created() {

23
src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<CollectHeader ref="collectHeaderRef" :is-title-type="isTitleType" :selected-category="selectedCategory" :arc-id="arcId" :selections="selections" :active-index="activeIndex" :test="test" :is-recycle="isRecycle" />
<CollectHeader ref="collectHeaderRef" :is-title-type="isTitleType" :selected-category="selectedCategory" :arc-id="arcId" :selections="selections" :active-index="activeIndex" :is-recycle="isRecycle" />
<div class="collect-table"> <div class="collect-table">
<el-table <el-table
ref="table" ref="table"
@ -86,10 +86,6 @@ export default {
type: Number, type: Number,
default: 0 default: 0
}, },
test: {
type: String,
default: ''
},
isRecycle: { isRecycle: {
type: Boolean, type: Boolean,
default: false default: false
@ -129,12 +125,6 @@ export default {
if (newValue === 1) { if (newValue === 1) {
this.title = '文件' this.title = '文件'
this.getCommonData(3, null) this.getCommonData(3, null)
// if (this.selectedCategory.arrangeType === 3) {
// console.log('2222')
// this.getCommonData(3, this.parentsData.parentsProjectId)
// } else {
// this.getCommonData(3, null)
// }
} else { } else {
this.title = '案卷' this.title = '案卷'
if (this.selectedCategory.arrangeType === 3) { if (this.selectedCategory.arrangeType === 3) {
@ -244,13 +234,7 @@ export default {
handleSizeChange(size) { handleSizeChange(size) {
this.page.size = size this.page.size = size
this.page.page = 1 this.page.page = 1
console.log('this.activeIndex', this.activeIndex)
if (this.activeIndex === 1) { if (this.activeIndex === 1) {
// if (this.selectedCategory.arrangeType === 3) {
// this.getViewTable(3, this.parentsData.parentsProjectId)
// } else {
// this.getViewTable(3, null)
// }
this.getViewTable(3, null) this.getViewTable(3, null)
} else { } else {
if (this.selectedCategory.arrangeType === 3) { if (this.selectedCategory.arrangeType === 3) {
@ -265,11 +249,6 @@ export default {
handleCurrentPage(val) { handleCurrentPage(val) {
this.page.page = val this.page.page = val
if (this.activeIndex === 1) { if (this.activeIndex === 1) {
// if (this.selectedCategory.arrangeType === 3) {
// this.getViewTable(3, this.parentsData.parentsProjectId)
// } else {
// this.getViewTable(3, null)
// }
this.getViewTable(3, null) this.getViewTable(3, null)
} else { } else {
if (this.selectedCategory.arrangeType === 3) { if (this.selectedCategory.arrangeType === 3) {

3
src/views/collectReorganizi/collectionLibrary/file/index.vue

@ -168,9 +168,6 @@ export default {
}, },
// table - // table -
tableDoubleClick(row) { tableDoubleClick(row) {
// console.log('tableDoubleClick', row)
// this.arcId = row.id
// console.log(this.selectedCategory.isType)
}, },
// table - row // table - row
clickRowHandler(row) { clickRowHandler(row) {

6
src/views/collectReorganizi/collectionLibrary/index.vue

@ -128,7 +128,8 @@ export default {
'medium_type': null, // 'medium_type': null, //
'archive_year': null, // 'archive_year': null, //
'fonds_no': null // 'fonds_no': null //
}
},
isTabFile: false
} }
}, },
watch: { watch: {
@ -374,7 +375,6 @@ export default {
}, },
handleOpenAnjuan(data, parentId) { handleOpenAnjuan(data, parentId) {
this.parentsProjectId = parentId this.parentsProjectId = parentId
console.log('this.parentsProjectId', this.parentsProjectId)
this.$refs.anjuanEle.anjuanDrawer = true this.$refs.anjuanEle.anjuanDrawer = true
this.activeIndex = 0 this.activeIndex = 0
if (this.$refs.anjuanEle.$refs.ajContent) { if (this.$refs.anjuanEle.$refs.ajContent) {
@ -387,7 +387,6 @@ export default {
}, },
handleOpenJuannei(data, parentId) { handleOpenJuannei(data, parentId) {
this.parentsAnjuanId = parentId this.parentsAnjuanId = parentId
console.log('this.parentsAnjuanId', this.parentsAnjuanId)
if (this.selectedCategory.arrangeType === 1 || (this.selectedCategory.arrangeType === 3 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1) || (this.selectedCategory.arrangeType === 2 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1)) { if (this.selectedCategory.arrangeType === 1 || (this.selectedCategory.arrangeType === 3 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1) || (this.selectedCategory.arrangeType === 2 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1)) {
this.$refs.fileEle.fileDrawer = true this.$refs.fileEle.fileDrawer = true
this.$nextTick(() => { this.$nextTick(() => {
@ -406,7 +405,6 @@ export default {
}, },
handleOpenFile(data, parentId) { handleOpenFile(data, parentId) {
this.parentsJuanneiId = parentId this.parentsJuanneiId = parentId
console.log('this.parentsJuanneiId', this.parentsJuanneiId)
this.$refs.fileEle.fileDrawer = true this.$refs.fileEle.fileDrawer = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.fileEle.getCommonData(4, this.parentsJuanneiId) this.$refs.fileEle.getCommonData(4, this.parentsJuanneiId)

2
src/views/collectReorganizi/collectionLibrary/juannei/index.vue

@ -156,7 +156,6 @@ export default {
if (this.timer) { if (this.timer) {
clearTimeout(this.timer) clearTimeout(this.timer)
} }
console.log('tableDoubleClick', row)
this.arcId = row.id this.arcId = row.id
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.archivesInfo.isHasFile = true this.$refs.archivesInfo.isHasFile = true
@ -187,7 +186,6 @@ export default {
}, },
// //
handleCurrentChange(selection, row) { handleCurrentChange(selection, row) {
console.log('触发单选', row)
this.selections = selection this.selections = selection
}, },
handleSizeChange(size) { handleSizeChange(size) {

18
src/views/collectReorganizi/collectionLibrary/mixins/index.js

@ -1,5 +1,3 @@
// import qs from 'qs'
// import { exportFile } from '@/utils/index'
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect' import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect'
import { crud } from '@crud/crud' import { crud } from '@crud/crud'
export const collectionLibraryCrud = { export const collectionLibraryCrud = {
@ -53,8 +51,6 @@ export const collectionLibraryCrud = {
if (this.selectedCategory.arrangeType === 1) { if (this.selectedCategory.arrangeType === 1) {
this.parentsId = null this.parentsId = null
} else { } else {
console.log('未整理理理理2')
console.log(this.activeIndex)
if (this.activeIndex === 1) { if (this.activeIndex === 1) {
this.parentsId = null this.parentsId = null
} else { } else {
@ -67,22 +63,17 @@ export const collectionLibraryCrud = {
this.$parent.$parent.getTableDisplayFieldsLoading = true this.$parent.$parent.getTableDisplayFieldsLoading = true
this.parentsId = this.parentsData.parentsAnjuanId this.parentsId = this.parentsData.parentsAnjuanId
} else if (this.isTitleType === 6) { } else if (this.isTitleType === 6) {
console.log('isTitleTypehh', this.isTitleType)
// 原文 // 原文
if (this.selectedCategory.arrangeType === 1) { if (this.selectedCategory.arrangeType === 1) {
this.parentsId = this.parentsData.parentsAnjuanId this.parentsId = this.parentsData.parentsAnjuanId
console.log('this.parentsId1', this.parentsId)
this.$parent.getTableDisplayFieldsLoading = true this.$parent.getTableDisplayFieldsLoading = true
} else { } else {
this.$parent.$parent.getTableDisplayFieldsLoading = true this.$parent.$parent.getTableDisplayFieldsLoading = true
console.log('this.parentsData', this.parentsData)
console.log('this.activeIndex', this.activeIndex)
console.log('this.selectedCategory.arrangeType', this.selectedCategory.arrangeType)
console.log('this.parentsData.parentsAnjuanId', this.parentsData.parentsAnjuanId)
console.log('this.parentsData.parentsJuanneiId', this.parentsData.parentsJuanneiId)
console.log('this.categoryLevel', categoryLevel)
if (this.parentsData.isTabFile) {
this.parentsId = this.parentsData.parentsAnjuanId
} else {
this.parentsId = this.parentsData.parentsJuanneiId this.parentsId = this.parentsData.parentsJuanneiId
console.log('this.parentsId2', this.parentsId)
}
} }
} }
@ -110,7 +101,6 @@ export const collectionLibraryCrud = {
}) })
}, },
getViewTableList(categoryLevel, parentsId, type) { getViewTableList(categoryLevel, parentsId, type) {
console.log('list', parentsId)
const params = { const params = {
'parentId': parentsId, 'parentId': parentsId,
'categoryId': this.selectedCategory.id, 'categoryId': this.selectedCategory.id,

4
src/views/collectReorganizi/collectionLibrary/module/blukEditing/index.vue

@ -235,13 +235,11 @@ export default {
'categoryId': this.selectedCategory.id, 'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel 'categoryLevel': this.collectLevel
} }
console.log(params)
FetchInitCategoryInputFieldByPid(params).then(data => { FetchInitCategoryInputFieldByPid(params).then(data => {
this.fieldItemOptions = data this.fieldItemOptions = data
}) })
}, },
selectField(val) { selectField(val) {
console.log(val)
if (val.mateData === 3) { if (val.mateData === 3) {
if (this.selectedCategory.arrangeType === 3 && val.fieldName === 'project_class') { if (this.selectedCategory.arrangeType === 3 && val.fieldName === 'project_class') {
this.getDictsList() this.getDictsList()
@ -337,7 +335,6 @@ export default {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
const archivesIds = this.selections.map(item => item.id) const archivesIds = this.selections.map(item => item.id)
console.log(this.editForm)
const params = { const params = {
'archivesIds': archivesIds, 'archivesIds': archivesIds,
'categoryId': this.selectedCategory.id, 'categoryId': this.selectedCategory.id,
@ -347,7 +344,6 @@ export default {
'updateContext': this.editForm.updateContext, 'updateContext': this.editForm.updateContext,
'updateType': this.editForm.updateType 'updateType': this.editForm.updateType
} }
console.log(params)
FetchBatchUpdate(params).then(res => { FetchBatchUpdate(params).then(res => {
this.$emit('close-dialog') this.$emit('close-dialog')
this.handleCloseDialog() this.handleCloseDialog()

44
src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue

@ -289,15 +289,17 @@ export default {
type: Number, type: Number,
default: 0 default: 0
}, },
test: {
type: String,
default: function() {
return ''
}
isTabFile: {
type: Boolean,
default: false
}, },
isRecycle: { isRecycle: {
type: Boolean, type: Boolean,
default: false default: false
},
test: {
type: String,
default: ''
} }
}, },
inject: ['parentsData'], inject: ['parentsData'],
@ -392,7 +394,15 @@ export default {
} }
}, },
isTitleType: function(newValue, oldValue) { isTitleType: function(newValue, oldValue) {
console.log('newValue', newValue)
console.log('isTitleType', newValue)
},
activeIndex: function(newValue, oldValue) {
console.log('activeIndex', newValue)
if (newValue === 1) {
this.parentsData.isTabFile = true
} else {
this.parentsData.isTabFile = false
}
} }
}, },
created() { created() {
@ -446,7 +456,6 @@ export default {
filteredItems = this.addLevelToDictionaryList(filteredItems, 1) filteredItems = this.addLevelToDictionaryList(filteredItems, 1)
if (this.selectedCategory.arrangeType === 3 && this.isTitleType === 3) { if (this.selectedCategory.arrangeType === 3 && this.isTitleType === 3) {
this.projectOptions = filteredItems this.projectOptions = filteredItems
// console.log(this.projectOptions)
} else { } else {
this.projectOptions = this.filterData(filteredItems, filteredItems[0].id) this.projectOptions = this.filterData(filteredItems, filteredItems[0].id)
} }
@ -496,7 +505,6 @@ export default {
this.formTitle = '新增' + this.collectTitle this.formTitle = '新增' + this.collectTitle
this.arcId = null this.arcId = null
} else if (type === 'edit') { } else if (type === 'edit') {
console.log(this.selections)
if (this.selections.length === 0) { if (this.selections.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!') this.$message('您还未勾选需要操作的条目,请先确认!')
return false return false
@ -578,8 +586,6 @@ export default {
handleDelConfirm() { handleDelConfirm() {
this.delAllLoading = true this.delAllLoading = true
if (this.collectLevel === 4) { if (this.collectLevel === 4) {
console.log(this.parentsData)
console.log(this.selections)
const params = this.selections.map((item) => { const params = this.selections.map((item) => {
const json = {} const json = {}
json.archivesId = item.archive_id json.archivesId = item.archive_id
@ -589,9 +595,7 @@ export default {
json.id = item.id json.id = item.id
return json return json
}) })
console.log(params)
FetchDeleteArchivesFile(params).then((res) => { FetchDeleteArchivesFile(params).then((res) => {
console.log(res)
if (res === 'SUCCESS') { if (res === 'SUCCESS') {
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.delAllLoading = false this.delAllLoading = false
@ -614,7 +618,6 @@ export default {
'categoryLevel': this.collectLevel, 'categoryLevel': this.collectLevel,
'archivesIds': archivesIds 'archivesIds': archivesIds
} }
console.log(params)
collectDel(params).then((res) => { collectDel(params).then((res) => {
if (res.includes('成功')) { if (res.includes('成功')) {
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
@ -642,7 +645,6 @@ export default {
'archivesIds': archivesIds, 'archivesIds': archivesIds,
'parentsId': this.parentsData.parentsAnjuanId 'parentsId': this.parentsData.parentsAnjuanId
} }
console.log(params)
FetchRemoveArchivesSingle(params).then((res) => { FetchRemoveArchivesSingle(params).then((res) => {
if (res === true) { if (res === true) {
this.crud.notify('移出成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('移出成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
@ -671,11 +673,15 @@ export default {
} else { } else {
if (this.selectedCategory.arrangeType === 1) { if (this.selectedCategory.arrangeType === 1) {
this.arcId = this.parentsData.parentsAnjuanId this.arcId = this.parentsData.parentsAnjuanId
} else {
if (this.parentsData.isTabFile) {
this.arcId = this.parentsData.parentsAnjuanId
} else { } else {
this.arcId = this.parentsData.parentsJuanneiId this.arcId = this.parentsData.parentsJuanneiId
} }
} }
} }
}
if (uploadType === 0) { if (uploadType === 0) {
this.$refs.uploadOriginalRef.uploadTitle = '普通上传' this.$refs.uploadOriginalRef.uploadTitle = '普通上传'
} else if (uploadType === 1) { } else if (uploadType === 1) {
@ -763,7 +769,6 @@ export default {
'archivesIds': archivesIds, 'archivesIds': archivesIds,
'updateType': updateType 'updateType': updateType
} }
console.log(params)
FetchUpdateArchivesNo(params).then((res) => { FetchUpdateArchivesNo(params).then((res) => {
if (res.code !== 500) { if (res.code !== 500) {
this.crud.notify('档号更新成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('档号更新成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
@ -797,7 +802,6 @@ export default {
'categoryId': this.selectedCategory.id, 'categoryId': this.selectedCategory.id,
'archivesIds': archivesIds 'archivesIds': archivesIds
} }
console.log(params)
FetchDisbandArchives(params).then((res) => { FetchDisbandArchives(params).then((res) => {
if (res.code !== 500) { if (res.code !== 500) {
this.crud.notify('拆卷成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('拆卷成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
@ -829,7 +833,6 @@ export default {
type: 'warning', type: 'warning',
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
}).then(() => { }).then(() => {
console.log(this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData)
this.$refs.insertFileRef.fileNoSelectionData = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData this.$refs.insertFileRef.fileNoSelectionData = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData
this.$refs.insertFileRef.getInsertViewTable() this.$refs.insertFileRef.getInsertViewTable()
}).catch(() => { }).catch(() => {
@ -882,7 +885,6 @@ export default {
'categoryId': this.selectedCategory.id, 'categoryId': this.selectedCategory.id,
'archivesIds': archivesIds 'archivesIds': archivesIds
} }
console.log(params)
FetchReturnReDocument(params).then((res) => { FetchReturnReDocument(params).then((res) => {
if (res.code !== 500) { if (res.code !== 500) {
if (res === 0) { if (res === 0) {
@ -921,7 +923,6 @@ export default {
'categoryLevel': this.collectLevel, 'categoryLevel': this.collectLevel,
'archivesIds': archivesIds 'archivesIds': archivesIds
} }
console.log(params)
exportFile(this.baseApi + '/api/collect/exportDate?' + qs.stringify(params, { indices: false })) exportFile(this.baseApi + '/api/collect/exportDate?' + qs.stringify(params, { indices: false }))
}).catch(() => { }).catch(() => {
}) })
@ -932,18 +933,14 @@ export default {
this.$refs.printRef.form.printRange = '当页条目' this.$refs.printRef.form.printRange = '当页条目'
let currentTableData = [] let currentTableData = []
if (this.collectLevel === 2) { if (this.collectLevel === 2) {
console.log('案卷')
currentTableData = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData currentTableData = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData
} else if (this.collectLevel === 3) { } else if (this.collectLevel === 3) {
if (this.isTitleType === 3) { if (this.isTitleType === 3) {
console.log('文件')
currentTableData = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData currentTableData = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData
} else { } else {
console.log('卷内')
currentTableData = this.parentsData.$refs.juanneiEle.junneiData currentTableData = this.parentsData.$refs.juanneiEle.junneiData
} }
} }
console.log(currentTableData)
this.$refs.printRef.currentTable = JSON.parse(JSON.stringify(currentTableData)) this.$refs.printRef.currentTable = JSON.parse(JSON.stringify(currentTableData))
} else { } else {
this.$refs.printRef.form.printRange = '勾选条目' this.$refs.printRef.form.printRange = '勾选条目'
@ -980,7 +977,6 @@ export default {
'categoryLevel': this.collectLevel, 'categoryLevel': this.collectLevel,
'archivesIds': archivesIds 'archivesIds': archivesIds
} }
console.log(params)
exportFile(this.baseApi + '/api/collect/catalogDownload?' + qs.stringify(params, { indices: false })) exportFile(this.baseApi + '/api/collect/catalogDownload?' + qs.stringify(params, { indices: false }))
}).catch(() => { }).catch(() => {
}) })

7
src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue

@ -152,8 +152,9 @@ export default {
} }
}, },
open() { open() {
this.handleNodeClick()
if (this.currentCategory) {
this.getViewTable() this.getViewTable()
}
}, },
getViewTable() { getViewTable() {
this.loading = true this.loading = true
@ -220,10 +221,6 @@ export default {
this.moveSelections = selection this.moveSelections = selection
}, },
handleComfireCollectMoveFile() { handleComfireCollectMoveFile() {
console.log('this.collectLevel', this.collectLevel)
console.log('this.selectedCategory', this.selectedCategory)
console.log('this.selections', this.selections)
console.log(this.moveSelections)
if (this.moveSelections.length > 1) { if (this.moveSelections.length > 1) {
this.$message('该操作只可勾选唯一目标条目,请先确认!') this.$message('该操作只可勾选唯一目标条目,请先确认!')
return false return false

301
src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload.vue

@ -1,40 +1,33 @@
<template> <template>
<div>
<!--上传组件--> <!--上传组件-->
<div class="uploader-big">
<uploader <uploader
:auto-start="false" :auto-start="false"
:options="options" :options="options"
:file-status-text="statusText"
class="uploader-example"
@file-complete="fileComplete"
@complete="complete"
:file-status-text="fileStatusText"
@file-success="fileSuccess" @file-success="fileSuccess"
@files-added="filesAdded" @files-added="filesAdded"
@file-progress="onFileProgress"
@file-error="onFileError"
> >
<uploader-unsupport /> <uploader-unsupport />
<uploader-drop> <uploader-drop>
<p>将文件拖放到此处以上传</p> <p>将文件拖放到此处以上传</p>
<uploader-btn>选择文件</uploader-btn>
<uploader-btn :attrs="attrs">选择图片</uploader-btn>
<uploader-btn :directory="true">选择文件夹</uploader-btn>
<uploader-btn>
<slot>
<i class="iconfont icon-tianjiawenjian upload-icon" />
</slot>
</uploader-btn>
<!-- <uploader-btn :attrs="attrs">选择图片</uploader-btn>
<uploader-btn :directory="true">选择文件夹</uploader-btn> -->
</uploader-drop> </uploader-drop>
<!-- <uploader-list></uploader-list> -->
<uploader-files /> <uploader-files />
</uploader> </uploader>
<!-- <el-upload
class="upload-demo"
:action="uploadUrl"
:auto-upload="false"
:on-change="handleChange"
:before-upload="handleBeforeUpload"
:on-progress="handleProgress"
>
<el-button slot="trigger">选取文件</el-button>
<el-button style="margin-left: 10px" type="primary" :loading="uploading" :disabled="files.length === 0" @click="handleUpload">
上传文件
</el-button>
<el-progress :percentage="percent" />
</el-upload> -->
<!-- <div class="upload-big-button">
<el-button :disabled="disabled" @click="allStart()">全部开始</el-button>
<el-button @click="allStop()">全部暂停</el-button>
<el-button @click="allRemove()">全部移除</el-button>
</div> -->
</div> </div>
</template> </template>
@ -42,19 +35,34 @@
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import axios from 'axios' import axios from 'axios'
import SparkMD5 from 'spark-md5' import SparkMD5 from 'spark-md5'
import { getToken } from '@/utils/auth'
// import { archivesUpload } from '@/utils/upload'
import { getCurrentTime } from '@/utils/index'
export default { export default {
props: {
selectedCategory: {
type: Object,
default: function() {
return {}
}
},
arcId: {
type: String,
default: function() {
return ''
}
}
},
data() { data() {
return { return {
files: [], //
uploading: false, //
percent: 0, //
uploadUrl: this.baseApi + '/api/collect/uploadFiles', //
skip: false, skip: false,
options: { options: {
target: this.baseApi + '/api/file/upload',
target: 'http://192.168.99.67:11100/api/collect/upload',
// //
testChunks: true, testChunks: true,
// 使 HTTP , POST
uploadMethod: 'post',
parseTimeRemaining: function(timeRemaining, parsedTimeRemaining) { parseTimeRemaining: function(timeRemaining, parsedTimeRemaining) {
return parsedTimeRemaining return parsedTimeRemaining
.replace(/\syears?/, '年') .replace(/\syears?/, '年')
@ -71,22 +79,21 @@ export default {
return true return true
} }
return (result.data.uploaded || []).indexOf(chunk.offset + 1) >= 0 return (result.data.uploaded || []).indexOf(chunk.offset + 1) >= 0
},
headers: {
'Authorization': getToken()
} }
// headers: {
// // header
// "Access-Token": storage.get(ACCESS_TOKEN),
// },
}, },
attrs: { attrs: {
accept: 'image/*' accept: 'image/*'
}, },
statusText: {
//
fileStatusTextObj: {
success: '上传成功', success: '上传成功',
error: '上传出错了',
uploading: '上传中...',
paused: '暂停中...',
waiting: '等待中...',
cmd5: '计算文件MD5中...'
error: '上传错误',
uploading: '正在上传',
paused: '停止上传',
waiting: '等待中'
}, },
fileList: [], fileList: [],
disabled: true disabled: true
@ -98,99 +105,66 @@ export default {
]) ])
}, },
methods: { methods: {
//
async upload(file) {
const chunkSize = 1024 * 1024 // 1MB
const fileSize = file.size //
const chunks = Math.ceil(fileSize / chunkSize) //
const tasks = [] //
let uploaded = 0 //
//
for (let i = 0; i < chunks; i++) {
const start = i * chunkSize
const end = Math.min(start + chunkSize, fileSize)
tasks.push(
new Promise((resolve, reject) => {
const formData = new FormData()
formData.append('chunk_index', i) //
formData.append('chunk_count', chunks) //
formData.append('file_id', file.id) // ID
formData.append('chunk_data', file.slice(start, end)) //
axios
.post(this.uploadUrl, formData) //
.then(res => {
uploaded++
this.percent = Math.floor((uploaded / chunks) * 100)
console.log(this.percent)
resolve()
})
.catch(err => {
reject(err)
})
})
)
}
//
await Promise.all(tasks)
const res = await axios.post(this.uploadUrl, { file_id: file.id, chunks })
// URL
if (res.status === 200) {
return `${this.uploadUrl}/${file.id}`
fileStatusText(status, response) {
if (status === 'md5') {
return '校验MD5'
} else { } else {
throw new Error(res.data.message)
}
},
handleChange(files) {
this.files = files
},
async handleUpload() {
console.log('handleUpload')
try {
console.log('handleUpload2')
this.uploading = true
console.log(this.files)
const url = await this.upload(this.files)
// url
this.$message.success(`文件${this.files.name}上传成功!URL:${url}`)
// for (let i = 0; i < this.files.length; i++) {
// const file = this.files[i]
// console.log('file', file)
// }
} catch (err) {
console.log('handleUpload3')
this.$message.error(`文件上传失败!${err.message}`)
} finally {
console.log('handleUpload4')
this.uploading = false
}
},
handleBeforeUpload() {
// TODO:
},
handleProgress(event, file) {
//
this.percent = Math.floor((event.loaded / event.total) * 100)
return this.fileStatusTextObj[status]
} }
}, },
fileSuccess(rootFile, file, response, chunk) { fileSuccess(rootFile, file, response, chunk) {
this.nowDate = getCurrentTime()
console.log(this.fileList)
const testList = []
const promiseArray = this.fileList.map(async(item, index) => {
testList.push(item.file)
const json = {}
if (item.file.type.substring(0, item.file.type.indexOf('/')) === 'image') {
const fileBase64 = await this.getBase64(item)
const imgRes = await this.getImgPx(fileBase64)
item.file.px = imgRes.width + 'px*' + imgRes.height + 'px'
} else {
item.file.px = ''
}
json.file_name = item.file.name
json.file_size = item.file.size
json.file_type = item.file.name.substring(item.name.lastIndexOf('.') + 1, item.file.name.length)
// json.file_path = res.data.data
json.file_path = ''
json.sequence = null
json.archive_id = this.arcId
json.file_dpi = item.file.px
json.file_thumbnail = ''
json.create_time = this.nowDate
json.id = null
return json
})
const result = JSON.parse(response) const result = JSON.parse(response)
console.log(result)
console.log(result.data)
console.log(result.data.needMerge)
console.log(this.skip)
Promise.all(promiseArray)
.then((arrayUpload) => {
const fileInfo = { const fileInfo = {
categoryId: this.selectedCategory.id,
archivesId: this.arcId,
identifier: file.uniqueIdentifier, identifier: file.uniqueIdentifier,
filename: file.name, filename: file.name,
totalChunks: chunk.offset, totalChunks: chunk.offset,
totalSize: file.size
totalSize: file.size,
fileJsonString: JSON.stringify(arrayUpload)
} }
//
if (result.data.needMerge && !this.skip) {
axios.post(this.baseApi + '/api/file/merge', fileInfo).then((res) => {
if (res.code === 200) {
console.log('arrayUpload', arrayUpload)
axios.post('http://192.168.99.67:11100/api/collect/merge ', fileInfo, {
headers: {
'Authorization': getToken()
}
}).then((res) => {
console.log(res)
if (res.data.code === 200) {
console.log('上传成功') console.log('上传成功')
} else { } else {
console.log(res) console.log(res)
@ -198,16 +172,39 @@ export default {
}).catch(function(error) { }).catch(function(error) {
console.log(error) console.log(error)
}) })
} else {
console.log('上传成功,不需要合并')
}
})
.catch((error) => {
console.error(error)
})
//
// if (result.data.needMerge && !this.skip) {
// axios.post('http://192.168.99.67:11100/api/collect/merge ', fileInfo, {
// headers: {
// 'Authorization': getToken()
// }
// }).then((res) => {
// if (res.code === 200) {
// console.log('')
// } else {
// console.log(res)
// }
// }).catch(function(error) {
// console.log(error)
// })
// } else {
// console.log('')
// }
if (this.skip) { if (this.skip) {
this.skip = false this.skip = false
} }
}, },
fileComplete(rootFile) {
onFileError(rootFile, file, message, chunk) {
console.log('上传出错:' + message)
}, },
complete() {
//
onFileProgress(rootFile, file, chunk) {
console.log(`上传中 ${file.name},chunk:${chunk.startByte / 1024 / 1024} ~ ${chunk.endByte / 1024 / 1024}`)
}, },
filesAdded(file, fileList, event) { filesAdded(file, fileList, event) {
file.forEach((e) => { file.forEach((e) => {
@ -216,6 +213,13 @@ export default {
}) })
}, },
computeMD5(file) { computeMD5(file) {
const maxMessage = '上传文件大小不能超过 10GB!'
const maxSize = 10 * 1024 * 1024 * 1024
if (file && file.size > maxSize) {
this.$message.warning(maxMessage)
return false
}
const fileReader = new FileReader() const fileReader = new FileReader()
const time = new Date().getTime() const time = new Date().getTime()
const blobSlice = const blobSlice =
@ -224,11 +228,11 @@ export default {
File.prototype.webkitSlice File.prototype.webkitSlice
let currentChunk = 0 let currentChunk = 0
// //
const chunkSize = 5 * 1024 * 1024
const chunkSize = 10 * 1024 * 1024
const chunks = Math.ceil(file.size / chunkSize) const chunks = Math.ceil(file.size / chunkSize)
const spark = new SparkMD5.ArrayBuffer() const spark = new SparkMD5.ArrayBuffer()
// "MD5" // "MD5"
file.cmd5 = true // md5...
file.cmd5 = true
file.pause() file.pause()
loadNext() loadNext()
fileReader.onload = (e) => { fileReader.onload = (e) => {
@ -259,11 +263,9 @@ export default {
this.error(`文件${file.name}读取出错,请检查该文件`) this.error(`文件${file.name}读取出错,请检查该文件`)
file.cancel() file.cancel()
} }
function loadNext() { function loadNext() {
const start = currentChunk * chunkSize const start = currentChunk * chunkSize
const end =
start + chunkSize >= file.size ? file.size : start + chunkSize
const end = start + chunkSize >= file.size ? file.size : start + chunkSize
fileReader.readAsArrayBuffer(blobSlice.call(file.file, start, end)) fileReader.readAsArrayBuffer(blobSlice.call(file.file, start, end))
} }
}, },
@ -289,20 +291,45 @@ export default {
}) })
this.fileList = [] this.fileList = []
} }
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.upload-demo{
.uploader-big{
width: 100%;
.uploader{
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column;
justify-content: center; justify-content: center;
width: 100%;
text-align: center;
margin-bottom: 8px;
.uploader-drop{
padding: 20px 0;
border: none;
.uploader-btn{
width: 120px; width: 120px;
margin: 20px 0 30px 0;
.el-progress{
position: absolute;
left: 0;
bottom: -20px;
margin: 10px 0 0 0;
padding: 0;
border: none;
i{
font-size: 32px;
color: #1F55EB;
}
&:hover{
background-color: transparent;
}
}
}
}
.upload-big-button{
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
margin: 10px 0 5px 0;
} }
} }
</style> </style>

45
src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/bigUpload2.vue

@ -23,6 +23,7 @@
</template> </template>
<script> <script>
import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import axios from 'axios' import axios from 'axios'
import SparkMD5 from 'spark-md5' import SparkMD5 from 'spark-md5'
@ -45,19 +46,24 @@ export default {
const fileMd5Span = document.getElementById('fileMd5') const fileMd5Span = document.getElementById('fileMd5')
const fileInput = document.getElementById('fileInput') const fileInput = document.getElementById('fileInput')
const file = fileInput.files[0] const file = fileInput.files[0]
console.log('file', file)
this.getFileMd5(file).then((md5) => { this.getFileMd5(file).then((md5) => {
console.info(md5)
this.fileMd5 = md5
fileMd5Span.innerHTML = md5
console.log(md5)
console.log(md5._buff)
this.fileMd5 = md5._buff
fileMd5Span.innerHTML = md5._buff
}) })
}, },
uploadFile() { uploadFile() {
const fileInput = document.getElementById('fileInput') const fileInput = document.getElementById('fileInput')
const file = fileInput.files[0] const file = fileInput.files[0]
console.log(file)
this.getFileMd5(file)
if (!file) return if (!file) return
if (!this.fileMd5) return if (!this.fileMd5) return
// //
const fileArr = this.sliceFile(file) const fileArr = this.sliceFile(file)
console.log(fileArr)
// //
const fileName = file.name const fileName = file.name
@ -71,6 +77,7 @@ export default {
data.append('file', new File([e], fileName)) data.append('file', new File([e], fileName))
this.upload(data) this.upload(data)
}) })
console.log(fileArr)
}, },
/** /**
@ -79,8 +86,13 @@ export default {
getFileMd5(file) { getFileMd5(file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const fileReader = new FileReader() const fileReader = new FileReader()
const sparkMd5 = new SparkMD5.ArrayBuffer()
console.log('sparkMd5', sparkMd5)
console.log('fileReader', fileReader)
fileReader.onload = function(event) { fileReader.onload = function(event) {
const fileMd5 = SparkMD5.ArrayBuffer.hash(event.target.result)
console.log(event.target.result)
const fileMd5 = sparkMd5.append(event.target.result)
console.log(fileMd5)
resolve(fileMd5) resolve(fileMd5)
} }
fileReader.readAsArrayBuffer(file) fileReader.readAsArrayBuffer(file)
@ -88,8 +100,14 @@ export default {
}, },
upload(data) { upload(data) {
const uploadResult = document.getElementById('uploadResult') const uploadResult = document.getElementById('uploadResult')
axios.post(this.baseApi + '/api/uploadBig', data).then((res) => {
if (res.code === 200) {
axios.post(this.baseApi + '/api/collect/uploadBig', data, {
headers: {
'Authorization': getToken()
}
}).then((res) => {
console.log(res)
console.log(data.get('chunkNumber'))
if (res.data.code === 200) {
uploadResult.append('上传成功分片:' + data.get('chunkNumber') + '\t') uploadResult.append('上传成功分片:' + data.get('chunkNumber') + '\t')
} else { } else {
uploadResult.innerHTML = '上传失败' uploadResult.innerHTML = '上传失败'
@ -98,11 +116,17 @@ export default {
console.log(error) console.log(error)
}) })
}, },
checkFile() { checkFile() {
var checkFileRes = document.getElementById('checkFileRes') var checkFileRes = document.getElementById('checkFileRes')
axios.post(this.baseApi + '/api/checkFile').then((res) => {
if (res.code === 200) {
const data = new FormData()
data.append('md5', this.fileMd5)
axios.post(this.baseApi + '/api/collect/checkFile', data, {
headers: {
'Authorization': getToken()
}
}).then((res) => {
console.log(res)
if (res.data.code === 200) {
checkFileRes.innerHTML = '检测文件完整性成功:' + res checkFileRes.innerHTML = '检测文件完整性成功:' + res
} else { } else {
checkFileRes.innerHTML = '检测文件完整性失败' checkFileRes.innerHTML = '检测文件完整性失败'
@ -116,9 +140,12 @@ export default {
const chunks = [] const chunks = []
let start = 0 let start = 0
let end let end
console.log(this.chunkSize)
while (start < file.size) { while (start < file.size) {
end = Math.min(start + this.chunkSize, file.size) end = Math.min(start + this.chunkSize, file.size)
console.log('end', end)
chunks.push(file.slice(start, end)) chunks.push(file.slice(start, end))
console.log('chunks', chunks)
start = end start = end
} }
return chunks return chunks

69
src/views/collectReorganizi/collectionLibrary/module/uploadOriginal/index.vue

@ -1,10 +1,10 @@
<template> <template>
<div> <div>
<!-- 原文上传 --> <!-- 原文上传 -->
<el-dialog class="fileUpload-dialog" :title="uploadTitle" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="uploadVisible">
<el-dialog :class="[uploadType===1 ? 'big-file': 'fileUpload-dialog']" :title="uploadTitle" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="uploadVisible">
<div class="setting-dialog"> <div class="setting-dialog">
<div class="upload-container"> <div class="upload-container">
<i v-if="fileList.length === 0" class="iconfont icon-tianjiawenjian upload-icon" />
<i v-if="uploadType !== 1 && fileList.length === 0" class="iconfont icon-tianjiawenjian upload-icon" />
<div v-for="item in fileList" :key="item.name" class="file-list"> <div v-for="item in fileList" :key="item.name" class="file-list">
<i class="iconfont icon-xiaowenjian" /> <i class="iconfont icon-xiaowenjian" />
{{ item.name }} {{ item.name }}
@ -14,7 +14,7 @@
<input ref="fileInput" :key="key" type="file" :multiple="isMultiple" :accept="uploadType === 2 ? '.zip' :''" @change="handleFileChange"> <input ref="fileInput" :key="key" type="file" :multiple="isMultiple" :accept="uploadType === 2 ? '.zip' :''" @change="handleFileChange">
<div class="upload-zip"><i class="iconfont icon-shangchuan2" />点击上传</div> <div class="upload-zip"><i class="iconfont icon-shangchuan2" />点击上传</div>
</div> </div>
<BigUpload v-else-if="uploadType === 1" />
<BigUpload v-else-if="uploadType === 1" :selected-category="selectedCategory" :arc-id="arcId" />
<div v-if="uploadType === 2" class="el-upload__tip">上传限制文件类型zip</div> <div v-if="uploadType === 2" class="el-upload__tip">上传限制文件类型zip</div>
<div v-if="uploadType === 1" class="el-upload__tip">上传限制文件大小最大10GB/</div> <div v-if="uploadType === 1" class="el-upload__tip">上传限制文件大小最大10GB/</div>
</div> </div>
@ -120,20 +120,12 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
// input-upload change
handleFileChange(e) { handleFileChange(e) {
const files = e.target.files const files = e.target.files
this.file = files[0] this.file = files[0]
this.key++ this.key++
let maxMessage
let maxSize
// if (this.uploadType === 0) {
// maxSize = 10 * 1024 * 1024
// maxMessage = ' 10MB!'
// } else if (this.uploadType === 1) {
// maxSize = 10 * 1024 * 1024 * 1024
// maxMessage = ' 10GB!'
// }
const maxMessage = '上传文件大小不能超过 10MB!'
const maxSize = 10 * 1024 * 1024
if (this.file && this.file.size > maxSize) { if (this.file && this.file.size > maxSize) {
this.$message.warning(maxMessage) this.$message.warning(maxMessage)
this.fileList = [] this.fileList = []
@ -155,9 +147,8 @@ export default {
this.fileList.push(files[i]) this.fileList.push(files[i])
} }
} }
console.log('this.fileList', this.fileList)
}, },
handleUploadConfirm() {
handleUploadConfirm(bigData) {
if (this.fileList.length === 0) { if (this.fileList.length === 0) {
this.$message.info('请先选择相关文件!') this.$message.info('请先选择相关文件!')
return false return false
@ -167,7 +158,6 @@ export default {
upload(this.baseApi + '/api/collect/catalogUpload', upload(this.baseApi + '/api/collect/catalogUpload',
this.fileList[0] this.fileList[0]
).then(res => { ).then(res => {
console.log(res)
if (res.data.code === 200) { if (res.data.code === 200) {
this.$message.success('成功追加' + res.data.data + '附件') this.$message.success('成功追加' + res.data.data + '附件')
this.$emit('close-dialog') this.$emit('close-dialog')
@ -176,9 +166,16 @@ export default {
this.$message.error('上传附件失败!') this.$message.error('上传附件失败!')
} }
}) })
} else if (this.uploadType === 0) {
this.uplaodToList(this.fileList)
} else { } else {
this.uplaodToList(bigData)
}
},
uplaodToList(files) {
//
this.nowDate = getCurrentTime() this.nowDate = getCurrentTime()
const promiseArray = this.fileList.map(async(item, index) => {
const promiseArray = files.map(async(item, index) => {
const json = {} const json = {}
if (item.type.substring(0, item.type.indexOf('/')) === 'image') { if (item.type.substring(0, item.type.indexOf('/')) === 'image') {
const fileBase64 = await this.getBase64(item) const fileBase64 = await this.getBase64(item)
@ -200,20 +197,11 @@ export default {
json.id = null json.id = null
return json return json
}) })
Promise.all(promiseArray) Promise.all(promiseArray)
.then((arrayUpload) => { .then((arrayUpload) => {
console.log('this.arrayUpload', arrayUpload)
// const params = {
// 'archivesId': this.arcId,
// 'categoryId': this.selectedCategory.id,
// 'fileJsonString': JSON.stringify(arrayUpload)
// }
// console.log(params)
// //
archivesUpload(this.baseApi + '/api/collect/uploadFiles', archivesUpload(this.baseApi + '/api/collect/uploadFiles',
this.fileList,
files,
this.selectedCategory.id, this.selectedCategory.id,
this.arcId, this.arcId,
JSON.stringify(arrayUpload) JSON.stringify(arrayUpload)
@ -227,27 +215,10 @@ export default {
this.$message.error('上传附件失败!') this.$message.error('上传附件失败!')
} }
}) })
// FetchAddArchivesFile(params).then(res => {
// if (res.code !== 500) {
// this.$message.success('!')
// this.uploadVisible = false
// // this.uploadDetialVisible = true
// // if (this.uploadType === 2) {
// // this.detailUploadTitle = ''
// // } else {
// // this.detailUploadTitle = ''
// // }
// this.$emit('close-dialog')
// } else {
// this.$message.error('!')
// }
// })
}) })
.catch((error) => { .catch((error) => {
console.error(error) console.error(error)
}) })
}
}, },
// X // X
deleteFile(file) { deleteFile(file) {
@ -298,6 +269,7 @@ export default {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.upload-container{ .upload-container{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -356,4 +328,13 @@ export default {
width: 970px; width: 970px;
} }
} }
.big-file{
::v-deep .el-dialog{
width: 636px !important;
.upload-container{
width: 596px;
}
}
}
</style> </style>

2
src/views/collectReorganizi/collectionLibrary/project/index.vue

@ -126,7 +126,6 @@ export default {
this.$emit('myYearEvent', this.yearData) this.$emit('myYearEvent', this.yearData)
}, },
openAnjuan(data, parentId) { openAnjuan(data, parentId) {
// this.$emit('openAnjuan', '')
this.$emit('openAnjuan', data, parentId) this.$emit('openAnjuan', data, parentId)
}, },
rowKey(row) { rowKey(row) {
@ -134,7 +133,6 @@ export default {
}, },
// table // table
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
// console.log('', row, rowIndex)
let color = '' let color = ''
this.selections.forEach(item => { this.selections.forEach(item => {
if (item.id === row.id) { if (item.id === row.id) {

1
src/views/prearchiveLibrary/module/moveFile.vue

@ -32,7 +32,6 @@
lazy lazy
:data="tableData" :data="tableData"
style="width: 100%;" style="width: 100%;"
height="calc(100vh)"
:row-key="getRowKey" :row-key="getRowKey"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
highlight-current-row highlight-current-row

Loading…
Cancel
Save