diff --git a/src/api/collect/collect.js b/src/api/collect/collect.js
index bc4e8d2..c1dfb54 100644
--- a/src/api/collect/collect.js
+++ b/src/api/collect/collect.js
@@ -153,6 +153,24 @@ export function FetchArchivesAdjust(data) {
})
}
+// 拆卷
+export function FetchDisbandArchives(data) {
+ return request({
+ url: 'api/collect/disbandArchives',
+ method: 'post',
+ data
+ })
+}
+
+// 合卷
+export function FetchMergeArchives(data) {
+ return request({
+ url: 'api/collect/mergeArchives',
+ method: 'post',
+ data
+ })
+}
+
export default {
collectAdd,
collectEdit,
@@ -168,5 +186,7 @@ export default {
FetchBatchUpdate,
FetchUpdateArchivesNo,
FetchDoArchivesAdjust,
- FetchArchivesAdjust
+ FetchArchivesAdjust,
+ FetchDisbandArchives,
+ FetchMergeArchives
}
diff --git a/src/utils/upload.js b/src/utils/upload.js
index 05090ed..c2cd09f 100644
--- a/src/utils/upload.js
+++ b/src/utils/upload.js
@@ -17,6 +17,7 @@ export function BatchImport(api, params) {
data.append('categoryId', params.categoryId)
data.append('categoryLevel', params.categoryLevel)
data.append('replicated', params.replicated)
+ data.append('parentsId', params.parentsId)
const config = {
headers: {
'Authorization': getToken()
diff --git a/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue b/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
index 63cf920..01610cf 100644
--- a/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
+++ b/src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
@@ -127,11 +127,13 @@ export default {
activeIndex(newValue) {
if (newValue === 1) {
this.title = '文件'
- if (this.selectedCategory.arrangeType === 3) {
- this.getCommonData(3, this.parentsData.parentsProjectId)
- } else {
- 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 {
this.title = '案卷'
if (this.selectedCategory.arrangeType === 3) {
@@ -242,11 +244,12 @@ export default {
this.page.size = size
this.page.page = 1
if (this.activeIndex === 1) {
- if (this.selectedCategory.arrangeType === 3) {
- this.getViewTable(3, this.parentsData.parentsProjectId)
- } else {
- this.getViewTable(3, null)
- }
+ // if (this.selectedCategory.arrangeType === 3) {
+ // this.getViewTable(3, this.parentsData.parentsProjectId)
+ // } else {
+ // this.getViewTable(3, null)
+ // }
+ this.getViewTable(3, null)
} else {
if (this.selectedCategory.arrangeType === 3) {
this.getViewTable(2, this.parentsData.parentsProjectId)
@@ -258,11 +261,12 @@ export default {
handleCurrentPage(val) {
this.page.page = val
if (this.activeIndex === 1) {
- if (this.selectedCategory.arrangeType === 3) {
- this.getViewTable(3, this.parentsData.parentsProjectId)
- } else {
- this.getViewTable(3, null)
- }
+ // if (this.selectedCategory.arrangeType === 3) {
+ // this.getViewTable(3, this.parentsData.parentsProjectId)
+ // } else {
+ // this.getViewTable(3, null)
+ // }
+ this.getViewTable(3, null)
} else {
if (this.selectedCategory.arrangeType === 3) {
this.getViewTable(2, this.parentsData.parentsProjectId)
diff --git a/src/views/collectReorganizi/collectionLibrary/mixins/index.js b/src/views/collectReorganizi/collectionLibrary/mixins/index.js
index 6c58411..0ca28cd 100644
--- a/src/views/collectReorganizi/collectionLibrary/mixins/index.js
+++ b/src/views/collectReorganizi/collectionLibrary/mixins/index.js
@@ -52,11 +52,16 @@ export const collectionLibraryCrud = {
} else if (this.isTitleType === 3) {
if (this.selectedCategory.arrangeType === 1) {
this.parentsId = null
- this.$parent.getTableDisplayFieldsLoading = true
} else {
- this.parentsId = this.parentsData.parentsProjectId
- this.$parent.getTableDisplayFieldsLoading = true
+ console.log('未整理理理理2')
+ console.log(this.activeIndex)
+ if (this.activeIndex === 1) {
+ this.parentsId = null
+ } else {
+ this.parentsId = this.parentsData.parentsProjectId
+ }
}
+ this.$parent.getTableDisplayFieldsLoading = true
} else if (this.isTitleType === 4) {
// 卷内
this.$parent.$parent.getTableDisplayFieldsLoading = true
diff --git a/src/views/collectReorganizi/collectionLibrary/module/bulkImport/index.vue b/src/views/collectReorganizi/collectionLibrary/module/bulkImport/index.vue
index c2c00ac..7d28ee1 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/bulkImport/index.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/bulkImport/index.vue
@@ -5,7 +5,7 @@
下载模板
- {{ selectedCategory.cnName }}
+ {{ selectedCategory.cnName+ '-' + typeName }}
上传导入
@@ -42,7 +42,7 @@
- 上传并导入
+ 上传并导入
@@ -61,6 +61,7 @@ import { exportFile } from '@/utils/index'
import { mapGetters } from 'vuex'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import { BatchImport } from '@/utils/upload'
+
export default {
name: 'BulkImport',
components: { },
@@ -83,9 +84,10 @@ export default {
default: () => []
}
},
+ inject: ['parentsData'],
data() {
return {
- // 批量导入
+ importLoading: false,
bulkImportVisible: false,
rules: {},
form: {
@@ -106,7 +108,19 @@ export default {
computed: {
...mapGetters([
'baseApi'
- ])
+ ]),
+ typeName() {
+ if (this.collectLevel === 2) {
+ return '案卷'
+ } else if (this.collectLevel === 3) {
+ if (this.selectedCategory.arrangeType === 1) {
+ return '文件'
+ } else {
+ return '案卷卷内'
+ }
+ }
+ return ''
+ }
},
created() {
},
@@ -129,7 +143,7 @@ export default {
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
- 'categoryName': this.selectedCategory.cnName
+ 'categoryName': this.selectedCategory.cnName + '-' + this.typeName
}
console.log(params)
exportFile(this.baseApi + '/api/collect/exportTemplate?' + qs.stringify(params, { indices: false }))
@@ -158,11 +172,27 @@ export default {
}
this.$refs[formName].validate((valid) => {
if (valid) {
+ this.importLoading = true
+ let parentsId
+ if (this.collectLevel === 2) {
+ if (this.selectedCategory.arrangeType === 3) {
+ parentsId = this.parentsData.parentsProjectId
+ } else {
+ parentsId = null
+ }
+ } else if (this.collectLevel === 3) {
+ if (this.selectedCategory.arrangeType === 1) {
+ parentsId = null
+ } else {
+ parentsId = this.parentsData.parentsAnjuanId
+ }
+ }
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'file': this.excelList[0],
- 'replicated': this.form.replicated.join(',')
+ 'replicated': this.form.replicated.join(','),
+ 'parentsId': parentsId
}
console.log(params)
BatchImport(this.baseApi + '/api/collect/batchImport', params).then(res => {
@@ -174,6 +204,7 @@ export default {
} else {
this.$message.error('批量导入失败')
}
+ this.importLoading = false
})
} else {
console.log('error submit!!')
@@ -186,6 +217,7 @@ export default {
this.$refs.form.resetFields()
this.bulkImportVisible = false
this.excelList = []
+ this.importLoading = false
// 关闭弹框
// done()
}
diff --git a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
index a291696..8b59926 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
@@ -67,7 +67,7 @@
批量导入
批量修改
- 案卷顺序调整
+ 案卷顺序调整
卷内顺序调整
文件顺序调整
档号更新
@@ -179,24 +179,10 @@
-
-
-
-
-
拆卷之后,对应的案卷数据将会自动删除
-
你是否还要继续?
-
-
-
-
-
-
+
-
+
@@ -286,7 +272,7 @@
import CRUD, { crud } from '@crud/crud'
import { collectionLibraryCrud } from '../mixins/index'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
-import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile, FetchUpdateArchivesNo } from '@/api/collect/collect'
+import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile, FetchUpdateArchivesNo, FetchDisbandArchives } from '@/api/collect/collect'
import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { FetchDictionaryTree } from '@/api/system/dict'
import Treeselect from '@riophae/vue-treeselect'
@@ -354,7 +340,6 @@ export default {
delAllLoading: false,
deleteVisible: false,
moveVisible: false,
- uncoilVisible: false,
filingVisible: false,
returnVisible: false,
downloadVisible: false,
@@ -773,8 +758,6 @@ export default {
this.$refs.fileSeqAdjustmentRef.isJuannei = false
})
}
-
- this.$refs.fileSeqAdjustmentRef.adjustmentVisible = true
this.$nextTick(() => {
this.$refs.fileSeqAdjustmentRef.getDoArchivesAdjust()
})
@@ -828,10 +811,33 @@ export default {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
- this.uncoilVisible = true
- },
- handleUncoilConfirm() {
- this.uncoilVisible = false
+ this.$confirm('拆卷之后,对应的案卷数据将会自动删除' + '你是否还要继续?', '提示', {
+ confirmButtonText: '继续',
+ cancelButtonText: '取消',
+ type: 'warning',
+ dangerouslyUseHTMLString: true
+ }).then(() => {
+ const archivesIds = []
+ this.selections.forEach(val => {
+ archivesIds.push(val.id)
+ })
+ const params = {
+ 'categoryId': this.selectedCategory.id,
+ 'archivesIds': archivesIds
+ }
+ console.log(params)
+ FetchDisbandArchives(params).then((res) => {
+ if (res.code !== 500) {
+ this.crud.notify('拆卷成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
+ this.handleSearch(this.collectLevel)
+ } else {
+ this.crud.notify('拆卷失败', CRUD.NOTIFICATION_TYPE.ERROR)
+ }
+ }).catch(err => {
+ console.log(err)
+ })
+ }).catch(() => {
+ })
},
// 合卷
handleCombineFile() {
@@ -839,15 +845,32 @@ export default {
this.$message('合卷操作至少勾选2个案卷,请重试!')
return false
}
- this.$refs.combineFileRef.combineFileVisible = true
+ this.$refs.combineFileRef.getTargetList()
},
// 插件
handleInsertFile() {
- if (this.selections.length !== 1) {
- this.$message('插卷操作只可勾选唯一目标条目,请先确认!')
- return false
+ if (this.collectLevel === 3) {
+ if (this.selections.length === 0) {
+ this.$confirm('您未勾选条目,否则直接选择所有条目' + '你是否还要继续?', '提示', {
+ confirmButtonText: '继续',
+ cancelButtonText: '取消',
+ type: 'warning',
+ dangerouslyUseHTMLString: true
+ }).then(() => {
+ this.$refs.insertFileRef.getInsertViewTable()
+ }).catch(() => {
+ })
+ } else {
+ this.$refs.insertFileRef.getInsertViewTable()
+ }
+ } else {
+ if (this.selections.length !== 1) {
+ this.$message('插卷操作只可勾选唯一目标条目,请先确认!')
+ return false
+ } else {
+ this.$refs.insertFileRef.getInsertViewTable()
+ }
}
- this.$refs.insertFileRef.insertFileVisible = true
},
// 移动
handleCollectMoveFile() {
@@ -996,11 +1019,9 @@ export default {
},
closeDialog(data) {
this.formVisible = false
- // this.$parent.$parent.getTableDisplayFieldsLoading = true
setTimeout(() => {
this.handleSearch(this.collectLevel)
})
- console.log('this', this)
}
}
}
diff --git a/src/views/collectReorganizi/collectionLibrary/module/combineFile/index.vue b/src/views/collectReorganizi/collectionLibrary/module/combineFile/index.vue
index 6190bdb..61af5ae 100644
--- a/src/views/collectReorganizi/collectionLibrary/module/combineFile/index.vue
+++ b/src/views/collectReorganizi/collectionLibrary/module/combineFile/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -14,29 +14,42 @@