Browse Source

预归档库

master
xuhuajiao 3 months ago
parent
commit
e736f219de
  1. 10
      src/api/system/category/category.js
  2. 11
      src/api/system/fieldMate.js
  3. 11
      src/api/system/fileLibrary/fileLibrary.js
  4. 4
      src/assets/styles/prearchive-library.scss
  5. 4
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  6. 4
      src/views/collectReorganizi/collectionLibrary/module/fileSeqAdjustment/index.vue
  7. 34
      src/views/components/category/PreviewForm.vue
  8. 18
      src/views/prearchiveLibrary/index.vue
  9. 59
      src/views/prearchiveLibrary/module/batchFile.vue
  10. 98
      src/views/prearchiveLibrary/module/moveFile.vue
  11. 53
      src/views/prearchiveLibrary/module/scope.vue
  12. 63
      src/views/prearchiveLibrary/treeList.vue

10
src/api/system/category/category.js

@ -130,4 +130,12 @@ export function FetchInitCategoryInputFieldByPid(params) {
}) })
} }
export default { add, edit, del, FetchCategoryMenu, FetchInitCategoryField, FetchCategoryFieldManage, FetchUpardicSort, FetchInitCategoryFieldByPid, FetchInitCategoryInputFieldByPid }
export function FetchMenuByFondsId(params) {
return request({
url: 'api/category/menuByFondsId',
method: 'get',
params
})
}
export default { add, edit, del, FetchCategoryMenu, FetchInitCategoryField, FetchCategoryFieldManage, FetchUpardicSort, FetchInitCategoryFieldByPid, FetchInitCategoryInputFieldByPid, FetchMenuByFondsId }

11
src/api/system/fieldMate.js

@ -68,4 +68,13 @@ export function FetchDetailsByDocumentIdAndCategoryId(params) {
}) })
} }
export default { add, edit, del, FetchInitFieldMateList, FetchCheckRepeat, FetchInitFieldMate, FetchMateByDocumentId, FetchDetailsByDocumentIdAndCategoryId }
// 新的 --- 根据预归档库获取对应规则
export function FetchMateByDocumentIdShow(params) {
return request({
url: 'api/fieldMate/getMateByDocumentIdShow',
method: 'get',
params
})
}
export default { add, edit, del, FetchInitFieldMateList, FetchCheckRepeat, FetchInitFieldMate, FetchMateByDocumentId, FetchDetailsByDocumentIdAndCategoryId, FetchMateByDocumentIdShow }

11
src/api/system/fileLibrary/fileLibrary.js

@ -78,4 +78,13 @@ export function FetchInitDocumentFieldByPid(params) {
}) })
} }
export default { add, edit, del, sort, FetchDocumentMenu, FetchDocumentFieldManage, FetchInitDocumentFieldByPid }
// 获取预归档库菜单
export function FetchMenuPerpare(params) {
return request({
url: 'api/document/menu_perpare',
method: 'get',
params
})
}
export default { add, edit, del, sort, FetchDocumentMenu, FetchDocumentFieldManage, FetchInitDocumentFieldByPid, FetchMenuPerpare }

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

@ -4,7 +4,7 @@
.move-form{ .move-form{
::v-deep .el-dialog{ ::v-deep .el-dialog{
width: 828px;
width: 1000px;
} }
.move-main{ .move-main{
display: flex; display: flex;
@ -19,7 +19,7 @@
} }
.move-right{ .move-right{
width:550px;
width:705px;
overflow: hidden; overflow: hidden;
h4{ h4{
position: relative; position: relative;

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

@ -300,7 +300,7 @@
:data="repeatData" :data="repeatData"
row-key="id" row-key="id"
> >
<el-table-column label="所属门类" prop="createBy" />
<el-table-column label="所属门类" prop="categoryName" />
<el-table-column v-if="repeatResponseData.delcount === 0" label="所属位置" prop="collectFormal"> <el-table-column v-if="repeatResponseData.delcount === 0" label="所属位置" prop="collectFormal">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.collectFormal === 1">收集库</div> <div v-if="scope.row.collectFormal === 1">收集库</div>
@ -313,7 +313,7 @@
<div v-if="scope.row.isDeleteMan">回收站</div> <div v-if="scope.row.isDeleteMan">回收站</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="题名" prop="maintitle" />
<el-table-column label="题名" prop="maintitle" show-overflow-tooltip min-width="130" />
<el-table-column label="创建人" prop="createBy" /> <el-table-column label="创建人" prop="createBy" />
<el-table-column label="创建时间" prop="createTime" align="center" width="160"> <el-table-column label="创建时间" prop="createTime" align="center" width="160">
<template slot-scope="scope"> <template slot-scope="scope">

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

@ -143,15 +143,17 @@ export default {
this.btnLoading = true this.btnLoading = true
const archivesIds = [] const archivesIds = []
const sequences = [] const sequences = []
this.sortTableData.map((value, index) => { this.sortTableData.map((value, index) => {
archivesIds.push(value.id) archivesIds.push(value.id)
sequences.push(index + 1)
sequences.push(this.form.number + index)
}) })
const params = { const params = {
'categoryId': this.categoryB, 'categoryId': this.categoryB,
'archivesIds': archivesIds, 'archivesIds': archivesIds,
'sequences': sequences 'sequences': sequences
} }
console.log('params', params)
FetchArchivesAdjust(params).then((res) => { FetchArchivesAdjust(params).then((res) => {
if (res !== 500) { if (res !== 500) {
this.$message({ message: '保存成功', type: 'success', offset: 8 }) this.$message({ message: '保存成功', type: 'success', offset: 8 })

34
src/views/components/category/PreviewForm.vue

@ -4,7 +4,23 @@
<el-form ref="addOrUpdateForm" :model="addOrUpdateForm" :rules="rules" :validate-on-rule-change="false" label-width="125px"> <el-form ref="addOrUpdateForm" :model="addOrUpdateForm" :rules="rules" :validate-on-rule-change="false" label-width="125px">
<el-row :gutter="4" style="padding:0 20px"> <el-row :gutter="4" style="padding:0 20px">
<draggable v-bind="{draggable:'.drag-item',animation:500}" :disabled="!isDraggable" @update="datadragEnd"> <draggable v-bind="{draggable:'.drag-item',animation:500}" :disabled="!isDraggable" @update="datadragEnd">
<el-col v-for="(item,index) in formPreviewData" v-show="item.fieldName !== 'barcode' && item.fieldName !== 'is_entity'" :key="index" :class="['drag-item',item.fieldName === 'barcode'? 'barcode-input': (item.fieldName === 'fonds_no' && (isDesFormType === 'arcives' || isDesFormType === 'manageArcives') ? ((collectLevel ===1 || (isTitleType===3 && selectedCategory.arrangeType !== 1) || (isTitleType===4 && selectedCategory.arrangeType !== 2)) ? 'disabled-fonds-xm' : 'disabled-fonds') : '')]" :span="item.isLine || item.fieldName === 'barcode' ? 24 : 12">
<el-col
v-for="(item,index) in formPreviewData"
v-show="item.fieldName !== 'barcode' && item.fieldName !== 'is_entity'"
:key="index"
:class="[
'drag-item',
item.fieldName === 'barcode' ?
'barcode-input' :
(item.fieldName === 'fonds_no' && (isDesFormType === 'arcives' || isDesFormType === 'manageArcives')?
((collectLevel === 1 || (isTitleType === 3 && selectedCategory.arrangeType!== 1) || (isTitleType === 4 && selectedCategory.arrangeType!== 2))?
'disabled-fonds-xm' : 'disabled-fonds') :
(item.fieldName === 'fonds_no' && (isDesFormType === 'prearchiveLibrary' || isDesFormType === 'mergeFile')?
'disabled-fonds' : '')
)
]"
:span="item.isLine || item.fieldName === 'barcode' ? 24 : 12"
>
<el-form-item :label="item.fieldCnName" :prop="item.fieldName"> <el-form-item :label="item.fieldCnName" :prop="item.fieldName">
<!-- select :load-options="loadOptions"--> <!-- select :load-options="loadOptions"-->
<treeselect <treeselect
@ -17,7 +33,7 @@
:flat="false" :flat="false"
:multiple="false" :multiple="false"
:style="{ width: item.editLength+'px'}" :style="{ width: item.editLength+'px'}"
:disabled="isDisabled|| (item.fieldName === 'fonds_no' && (isDesFormType === 'arcives' || isDesFormType === 'manageArcives')) "
:disabled="isDisabled|| (item.fieldName === 'fonds_no' && isDesFormType !== 'category') "
:validate-event="!isDisabled" :validate-event="!isDisabled"
no-options-text="无数据" no-options-text="无数据"
@select="selectTree" @select="selectTree"
@ -34,7 +50,7 @@
:rows="item.isInputClass === 'textarea' ? 3 : ''" :rows="item.isInputClass === 'textarea' ? 3 : ''"
:class="{'input-popover':(item.isInputClass === 'popover')}" :class="{'input-popover':(item.isInputClass === 'popover')}"
:style="{ width: item.editLength+'px'}" :style="{ width: item.editLength+'px'}"
:disabled="isDisabled || (item.fieldName === 'archival_category_code') || (item.fieldName === 'fonds_no'&& (isDesFormType === 'arcives' || isDesFormType === 'manageArcives')) "
:disabled="isDisabled || (item.fieldName === 'archival_category_code') || (item.fieldName === 'fonds_no' && isDesFormType !== 'category') "
:validate-event="!isDisabled" :validate-event="!isDisabled"
@mousewheel.native.prevent @mousewheel.native.prevent
@DOMMouseScroll.native.prevent @DOMMouseScroll.native.prevent
@ -719,7 +735,7 @@ export default {
// popover - // popover -
handleCurrentFieldName(item) { handleCurrentFieldName(item) {
this.currentFieldName = item.fieldName this.currentFieldName = item.fieldName
if (item.fieldName === 'fonds_no' && (this.isDesFormType === 'arcives' || this.isDesFormType === 'manageArcives')) {
if (item.fieldName === 'fonds_no' && this.isDesFormType !== 'category') {
return false return false
} }
this.getAllSubset(item) this.getAllSubset(item)
@ -784,7 +800,7 @@ export default {
if (item.fieldName === 'is_entity') { if (item.fieldName === 'is_entity') {
this.$set(this.addOrUpdateForm, item.fieldName, 1) this.$set(this.addOrUpdateForm, item.fieldName, 1)
} }
if (item.fieldName === 'fonds_no' && (this.isDesFormType === 'arcives' || this.isDesFormType === 'manageArcives')) {
if (item.fieldName === 'fonds_no' && this.isDesFormType !== 'category') {
this.$set(this.addOrUpdateForm, item.fieldName, this.selectedCategory.fondsNo) this.$set(this.addOrUpdateForm, item.fieldName, this.selectedCategory.fondsNo)
} }
const rule = { const rule = {
@ -1000,8 +1016,10 @@ export default {
'documentId': categoryId, 'documentId': categoryId,
'delMan': null, 'delMan': null,
'jsonString': JSON.stringify(this.addOrUpdateForm), 'jsonString': JSON.stringify(this.addOrUpdateForm),
'fileJsonString': this.fileJsonString
'fileJsonString': this.fileJsonString,
'fondsAffiliation': this.selectedDocument.fondsId
} }
console.log('params', params)
prearchEdit(params).then(res => { prearchEdit(params).then(res => {
if (res) { if (res) {
this.$message({ message: res.message, type: 'success', offset: 8 }) this.$message({ message: res.message, type: 'success', offset: 8 })
@ -1014,7 +1032,7 @@ export default {
} else if (this.isDesFormType === 'mergeFile') { } else if (this.isDesFormType === 'mergeFile') {
// //
const params = { const params = {
'fondsAffiliation': this.user.fonds.id.toString(),
'fondsAffiliation': this.selectedCategory.fondsId,
'archivesId': null, 'archivesId': null,
'archivesIds': this.mergeFileArcIds, 'archivesIds': this.mergeFileArcIds,
'documentId': categoryId, 'documentId': categoryId,
@ -1022,6 +1040,8 @@ export default {
'archivesNo': this.addOrUpdateForm.archive_no, 'archivesNo': this.addOrUpdateForm.archive_no,
'jsonString': JSON.stringify(this.addOrUpdateForm) 'jsonString': JSON.stringify(this.addOrUpdateForm)
} }
console.log('合并成件this.selectedCategory', this.selectedCategory)
console.log('params', params)
FetchMergeToFile(params).then(res => { FetchMergeToFile(params).then(res => {
if (res.code !== 500) { if (res.code !== 500) {
this.$message({ message: res, type: 'success', offset: 8 }) this.$message({ message: res, type: 'success', offset: 8 })

18
src/views/prearchiveLibrary/index.vue

@ -89,6 +89,7 @@
:normalizer="normalizer" :normalizer="normalizer"
flat flat
:multiple="false" :multiple="false"
:default-expand-level="6"
placeholder="请选择档案门类" placeholder="请选择档案门类"
@select="handleSelectCategory" @select="handleSelectCategory"
/> />
@ -133,7 +134,7 @@
<script> <script>
import CRUD, { presenter, header } from '@crud/crud' import CRUD, { presenter, header } from '@crud/crud'
import { preLibraryCrud } from './mixins/index' import { preLibraryCrud } from './mixins/index'
import { FetchCategoryMenu, FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import { FetchMenuByFondsId, FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import PrearchiveCrud from '@/api/prearchiveLibrary/prearchiveLibrary' import PrearchiveCrud from '@/api/prearchiveLibrary/prearchiveLibrary'
import rrOperation from '@crud/RR.operation' import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation' import crudOperation from '@crud/CRUD.operation'
@ -218,6 +219,7 @@ export default {
methods: { methods: {
[CRUD.HOOK.beforeRefresh]() { [CRUD.HOOK.beforeRefresh]() {
this.crud.query.documentId = this.selectedDocument.id this.crud.query.documentId = this.selectedDocument.id
this.crud.query.fondsAffiliation = this.selectedDocument.fondsId
this.crud.query.sort = this.arrySort this.crud.query.sort = this.arrySort
}, },
formLoadingShow(loadingType) { formLoadingShow(loadingType) {
@ -292,7 +294,12 @@ export default {
}) })
}, },
handleFormMerge() { handleFormMerge() {
console.log('this.selectedDocumentmMerge', this.selectedDocument)
this.selectedCategory = this.selectedCategoryMerge this.selectedCategory = this.selectedCategoryMerge
this.selectedCategory.fondsId = this.selectedDocument.fondsId
this.selectedCategory.fondsNo = this.selectedDocument.fondsNo
console.log('this.selectedCategory', this.selectedCategory)
// let categoryLevel // let categoryLevel
// if (this.selectedCategoryMerge.arrangeType === 1) { // if (this.selectedCategoryMerge.arrangeType === 1) {
// categoryLevel = 3 // categoryLevel = 3
@ -398,8 +405,12 @@ export default {
this.$refs.moveForm.moveArc = this.crud.selections this.$refs.moveForm.moveArc = this.crud.selections
}, },
getCategoryDataTree() { getCategoryDataTree() {
FetchCategoryMenu().then(res => {
const params = {
'fondsId': this.selectedDocument.fondsId
}
FetchMenuByFondsId(params).then(res => {
this.categoryTree = this.filterData(res) this.categoryTree = this.filterData(res)
console.log('this.categoryTree222', this.categoryTree)
}) })
}, },
handleSelectCategory(val) { handleSelectCategory(val) {
@ -430,4 +441,7 @@ export default {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
.preview-dialog .el-dialog .preview-content {
height: calc(100vh - 290px) !important;
}
</style> </style>

59
src/views/prearchiveLibrary/module/batchFile.vue

@ -111,9 +111,9 @@
<script> <script>
import { preLibraryCrud } from '../mixins/index' import { preLibraryCrud } from '../mixins/index'
import { FetchInitFieldMate, FetchMateByDocumentId, FetchDetailsByDocumentIdAndCategoryId } from '@/api/system/fieldMate'
import { FetchInitFieldMate, FetchMateByDocumentIdShow, FetchDetailsByDocumentIdAndCategoryId } from '@/api/system/fieldMate'
import { FetchInitDocumentFieldByPid } from '@/api/system/fileLibrary/fileLibrary' import { FetchInitDocumentFieldByPid } from '@/api/system/fileLibrary/fileLibrary'
import { FetchCategoryMenu, FetchInitCategoryFieldByPid } from '@/api/system/category/category'
import { FetchMenuByFondsId, FetchInitCategoryFieldByPid } from '@/api/system/category/category'
import { FetchArchivesScopeByCategoryId } from '@/api/system/archivesScope' import { FetchArchivesScopeByCategoryId } from '@/api/system/archivesScope'
import { FetchCheckRepeat } from '@/api/system/fieldMate' import { FetchCheckRepeat } from '@/api/system/fieldMate'
import { FetchBatchToFile } from '@/api/prearchiveLibrary/prearchiveLibrary' import { FetchBatchToFile } from '@/api/prearchiveLibrary/prearchiveLibrary'
@ -197,9 +197,10 @@ export default {
// //
getMateByDocumentId() { getMateByDocumentId() {
const params = { const params = {
'documentId': this.selectedDocument.id
'documentId': this.selectedDocument.id,
'fondsId': this.selectedDocument.fondsId
} }
FetchMateByDocumentId(params).then(res => {
FetchMateByDocumentIdShow(params).then(res => {
this.rulesOptions = res.map(item => { this.rulesOptions = res.map(item => {
const json = {} const json = {}
json.label = item.ruleName json.label = item.ruleName
@ -211,13 +212,31 @@ export default {
getInitDetail(id) { getInitDetail(id) {
FetchInitFieldMate({ 'id': id }).then((res) => { FetchInitFieldMate({ 'id': id }).then((res) => {
this.selectedCategoryName = res.categoryName this.selectedCategoryName = res.categoryName
this.batchCategory = res.fieldMateDetails[0].pid.categoryId
this.form.categoryId = res.fieldMateDetails[0].pid.categoryId.pid this.form.categoryId = res.fieldMateDetails[0].pid.categoryId.pid
this.getArchivesScopeByCategoryId() this.getArchivesScopeByCategoryId()
const targetNode = this.findNodeWithId(this.categoryTree, this.form.categoryId)
this.batchCategory = targetNode
console.log(targetNode)
console.log('batchCategory', this.batchCategory)
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
}) })
}, },
findNodeWithId(tree, targetId) {
for (const node of tree) {
if (node.id === targetId) {
return node
}
if (node.children && node.children.length > 0) {
const result = this.findNodeWithId(node.children, targetId)
if (result) {
return result
}
}
}
return null
},
selectRules(val) { selectRules(val) {
this.getInitDetail(val) this.getInitDetail(val)
this.selectStatus = [] this.selectStatus = []
@ -228,8 +247,12 @@ export default {
}, },
// //
getCategoryDataTree() { getCategoryDataTree() {
FetchCategoryMenu().then(res => {
const params = {
'fondsId': this.selectedDocument.fondsId
}
FetchMenuByFondsId(params).then(res => {
this.categoryTree = this.filterData(res) this.categoryTree = this.filterData(res)
console.log('this.categoryTree', this.categoryTree)
}) })
}, },
// pid // pid
@ -252,6 +275,7 @@ export default {
// //
this.rightLoading = true this.rightLoading = true
FetchInitCategoryFieldByPid({ categoryId: categoryId, categoryLevel: 3, isType: 2 }).then((res) => { FetchInitCategoryFieldByPid({ categoryId: categoryId, categoryLevel: 3, isType: 2 }).then((res) => {
console.log('this.allCorrField')
this.allCorrField = res.sort((a, b) => { this.allCorrField = res.sort((a, b) => {
if (a.isInput !== b.isInput) { if (a.isInput !== b.isInput) {
return a.isInput ? -1 : 1 return a.isInput ? -1 : 1
@ -262,15 +286,19 @@ export default {
res.forEach((item, index) => { res.forEach((item, index) => {
this.selectStatus.push({ mode: true, fiedType: 1, value: '', field: item, isInput: item.isInput }) this.selectStatus.push({ mode: true, fiedType: 1, value: '', field: item, isInput: item.isInput })
}) })
console.log('his.selectStatus', this.selectStatus)
if (this.form.scope) { if (this.form.scope) {
const indexClass = res.findIndex(item => item.fieldName === 'archive_ctg_no') const indexClass = res.findIndex(item => item.fieldName === 'archive_ctg_no')
console.log('indexClass', indexClass)
const indexRetention = res.findIndex(item => item.fieldName === 'retention') const indexRetention = res.findIndex(item => item.fieldName === 'retention')
console.log('indexRetention', indexRetention)
if (indexClass !== -1 && this.scopeSelection[0].archivesClass !== null) { if (indexClass !== -1 && this.scopeSelection[0].archivesClass !== null) {
this.selectStatus.splice(indexClass, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].archivesClass.name, field: this.allCorrField[indexClass], isInput: this.allCorrField[indexClass].isInput }) this.selectStatus.splice(indexClass, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].archivesClass.name, field: this.allCorrField[indexClass], isInput: this.allCorrField[indexClass].isInput })
} }
if (indexRetention !== -1 && this.scopeSelection[0].retention !== '') { if (indexRetention !== -1 && this.scopeSelection[0].retention !== '') {
this.selectStatus.splice(indexRetention, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].retention, field: this.allCorrField[indexRetention], isInput: this.allCorrField[indexRetention].isInput }) this.selectStatus.splice(indexRetention, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].retention, field: this.allCorrField[indexRetention], isInput: this.allCorrField[indexRetention].isInput })
} }
console.log('his.selectStatus222', this.selectStatus)
} }
this.rightLoading = false this.rightLoading = false
@ -289,16 +317,19 @@ export default {
res.forEach((item, index) => { res.forEach((item, index) => {
this.selectStatus.push({ mode: false, fiedType: item.categoryFieldId && item.categoryFieldId.isDefaultValue === '' ? 1 : 2, value: item.categoryFieldId && item.categoryFieldId.isDefaultValue === '' ? (item.documentFieldId && item.documentFieldId.fieldCnName) : item.categoryFieldId && item.categoryFieldId.isDefaultValue, field: item.documentFieldId, isInput: item.documentFieldId && item.documentFieldId.isInput }) this.selectStatus.push({ mode: false, fiedType: item.categoryFieldId && item.categoryFieldId.isDefaultValue === '' ? 1 : 2, value: item.categoryFieldId && item.categoryFieldId.isDefaultValue === '' ? (item.documentFieldId && item.documentFieldId.fieldCnName) : item.categoryFieldId && item.categoryFieldId.isDefaultValue, field: item.documentFieldId, isInput: item.documentFieldId && item.documentFieldId.isInput })
}) })
console.log('this.selectStatus444444444', this.selectStatus)
if (this.form.scope) { if (this.form.scope) {
const indexClass = res.findIndex(item => item.categoryFieldId.fieldName === 'archive_ctg_no') const indexClass = res.findIndex(item => item.categoryFieldId.fieldName === 'archive_ctg_no')
console.log('indexClass', indexClass)
const indexRetention = res.findIndex(item => item.categoryFieldId.fieldName === 'retention') const indexRetention = res.findIndex(item => item.categoryFieldId.fieldName === 'retention')
console.log('indexRetention', indexRetention)
if (indexClass !== -1 && this.scopeSelection[0].archivesClass !== null) { if (indexClass !== -1 && this.scopeSelection[0].archivesClass !== null) {
this.selectStatus.splice(indexClass, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].archivesClass.name, field: this.allFieldData[indexClass].documentFieldId, isInput: this.allFieldData[indexClass].documentFieldId.isInput }) this.selectStatus.splice(indexClass, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].archivesClass.name, field: this.allFieldData[indexClass].documentFieldId, isInput: this.allFieldData[indexClass].documentFieldId.isInput })
} }
if (indexRetention !== -1 && this.scopeSelection[0].retention !== '') { if (indexRetention !== -1 && this.scopeSelection[0].retention !== '') {
this.selectStatus.splice(indexRetention, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].retention, field: this.allFieldData[indexRetention].documentFieldId, isInput: this.allFieldData[indexRetention].documentFieldId.isInput }) this.selectStatus.splice(indexRetention, 1, { mode: false, fiedType: 2, value: this.scopeSelection[0].retention, field: this.allFieldData[indexRetention].documentFieldId, isInput: this.allFieldData[indexRetention].documentFieldId.isInput })
} }
console.log('his.selectStatus555555', this.selectStatus)
} }
this.fieldLoading = false this.fieldLoading = false
@ -345,6 +376,7 @@ export default {
// //
selectScope() { selectScope() {
this.$refs.scopeModule.scopeVisible = true this.$refs.scopeModule.scopeVisible = true
this.$refs.scopeModule.opened(this.selectedDocument)
this.$nextTick(() => { this.$nextTick(() => {
if (this.form.categoryId) { if (this.form.categoryId) {
this.$refs.scopeModule.$refs.tree2.setCurrentKey(this.form.categoryId) this.$refs.scopeModule.$refs.tree2.setCurrentKey(this.form.categoryId)
@ -477,10 +509,12 @@ export default {
} }
const indices = getIndicesByMode(false) const indices = getIndicesByMode(false)
console.log(indices) console.log(indices)
console.log('allCorrField', this.allCorrField)
const filteredFields = indices.map(index => this.selectStatus[index]) const filteredFields = indices.map(index => this.selectStatus[index])
const categoryCorrField = indices.map(index => this.allCorrField[index]) const categoryCorrField = indices.map(index => this.allCorrField[index])
console.log('filteredFields', filteredFields) console.log('filteredFields', filteredFields)
console.log('categoryCorrField', categoryCorrField) console.log('categoryCorrField', categoryCorrField)
console.log('this.allFieldData', this.allFieldData)
let dtos let dtos
if (!this.isCorrField) { if (!this.isCorrField) {
@ -512,9 +546,15 @@ export default {
}) })
} else { } else {
dtos = this.allFieldData.map((item, index) => { dtos = this.allFieldData.map((item, index) => {
if (this.selectStatus[index].fiedType === 2) {
console.log('this.selectStatus[index].field.fieldName', this.selectStatus[index])
console.log('this.selectStatus[index].field.fieldName', this.selectStatus[index].field.fieldName)
}
return { return {
'categoryValue': item.categoryFieldId.fieldName, 'categoryValue': item.categoryFieldId.fieldName,
'documentValue': this.selectStatus[index].fiedType === 2 ? item.categoryFieldId.isDefaultValue : this.selectStatus[index].field.fieldName,
// 'documentValue': this.selectStatus[index].fiedType === 2 ? item.categoryFieldId.isDefaultValue : this.selectStatus[index].field.fieldName,
'documentValue': this.selectStatus[index].fiedType === 2 && this.selectStatus[index].value !== '' ? this.selectStatus[index].value : item.categoryFieldId.isDefaultValue,
'getType': this.selectStatus[index].fiedType, 'getType': this.selectStatus[index].fiedType,
'isRequired': item.categoryFieldId.isRequired 'isRequired': item.categoryFieldId.isRequired
} }
@ -524,7 +564,8 @@ export default {
return item.id return item.id
}) })
const params = { const params = {
'fondsAffiliation': this.user.fonds.id.toString(),
'archival_category_code': this.batchCategory.code,
'fondsAffiliation': this.selectedDocument.fondsId,
'archivesIds': archivesIds, 'archivesIds': archivesIds,
'documentId': this.selectedDocument.id, 'documentId': this.selectedDocument.id,
'categoryId': this.form.categoryId, 'categoryId': this.form.categoryId,

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

@ -8,8 +8,7 @@
<div class="move-left"> <div class="move-left">
<el-tree <el-tree
ref="treeMove" ref="treeMove"
v-loading="crud.loading"
:data="crud.data"
:data="categoryTree"
node-key="id" node-key="id"
default-expand-all default-expand-all
:props="defaultProps" :props="defaultProps"
@ -20,7 +19,7 @@
<div class="move-right"> <div class="move-right">
<div style="padding: 10px;"> <div style="padding: 10px;">
<el-input v-model="query.search" placeholder="输入题名或档号搜索" style="width: 200px;" /> <el-input v-model="query.search" placeholder="输入题名或档号搜索" style="width: 200px;" />
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getViewTableList">搜索</el-button>
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getViewTableList('search')">搜索</el-button>
</div> </div>
<div class="raido-main"> <div class="raido-main">
<!-- @select="handleSelect" <!-- @select="handleSelect"
@ -39,6 +38,16 @@
@row-click="clickRowHandler" @row-click="clickRowHandler"
> >
<el-table-column type="selection" align="center" width="55" /> <el-table-column type="selection" align="center" width="55" />
<el-table-column label="序号" width="55" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span>{{ (page.page === 1 ? 0 : (page.page === 0 ? 0 : page.page - 1)) * page.size + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column :label="selectedCategoryMove.arrangeType === 1 ? '原文':'卷内'" prop="child" width="55" align="center">
<template slot-scope="scope">
{{ scope.row.child === '' ? 0 : scope.row.child }}
</template>
</el-table-column>
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> <el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot="header"> <template slot="header">
<el-tooltip <el-tooltip
@ -78,23 +87,15 @@
<script> <script>
import { preLibraryCrud } from '../mixins/index' import { preLibraryCrud } from '../mixins/index'
import CRUD, { presenter, header, crud } from '@crud/crud'
import { FetchMove } from '@/api/prearchiveLibrary/prearchiveLibrary' import { FetchMove } from '@/api/prearchiveLibrary/prearchiveLibrary'
import { FetchMenuByFondsId } from '@/api/system/category/category'
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect' import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect'
import { FetchInitSearchFonds } from '@/api/archiveUtilize/archiveUtilize'
// import { FetchInitSearchFonds } from '@/api/archiveUtilize/archiveUtilize'
import Vue from 'vue' import Vue from 'vue'
export default { export default {
name: 'MoveFile', name: 'MoveFile',
components: { }, components: { },
cruds() {
return [
CRUD({
title: '移动', url: 'api/category/menu',
crudMethod: {}, sort: []
})
]
},
mixins: [presenter(), header(), crud(), preLibraryCrud],
mixins: [preLibraryCrud],
props: { props: {
selectedDocument: { selectedDocument: {
type: Object, type: Object,
@ -105,6 +106,7 @@ export default {
}, },
data() { data() {
return { return {
categoryTree: [],
archivesBtnLoading: false, archivesBtnLoading: false,
selectedCategoryMove: {}, selectedCategoryMove: {},
query: { query: {
@ -135,35 +137,38 @@ export default {
getRowKey(row) { getRowKey(row) {
return row.id return row.id
}, },
[CRUD.HOOK.afterRefresh]() {
this.crud.data = this.filterData(this.crud.data)
},
opened() { opened() {
this.refresh() this.refresh()
}, },
refresh() { refresh() {
const params = {
'fondsId': this.selectedDocument.fondsId
}
FetchMenuByFondsId(params).then(res => {
this.categoryTree = this.filterData(res)
if (this.$refs.treeMove) { if (this.$refs.treeMove) {
let currentKey let currentKey
if (this.crud.data[0].isType === 1) {
console.log(currentKey)
currentKey = this.findNode(this.crud.data[0].children, (node) => {
console.log('this.categoryTree[0]', this.categoryTree[0])
if (this.categoryTree[0].isType === 1) {
currentKey = this.findNode(this.categoryTree[0].children, (node) => {
return node.isType !== 1 return node.isType !== 1
}) })
} else { } else {
currentKey = this.crud.data[0]
currentKey = this.categoryTree[0]
} }
//
this.$refs.treeMove.setCurrentKey(currentKey.id)
this.$nextTick(() => { this.$nextTick(() => {
//
this.$refs.treeMove.setCurrentKey(currentKey.id)
const selectedKey = this.$refs.treeMove.getCurrentNode() const selectedKey = this.$refs.treeMove.getCurrentNode()
if (this.$refs.treeMove.getNode(selectedKey) && this.$refs.treeMove.getNode(selectedKey).parent) {
this.expandParents(this.$refs.treeMove.getNode(selectedKey).parent)
}
// if (this.$refs.treeMove.getNode(selectedKey) && this.$refs.treeMove.getNode(selectedKey).parent) {
// this.expandParents(this.$refs.treeMove.getNode(selectedKey).parent)
// }
// //
this.handleMoveNodeClick(selectedKey) this.handleMoveNodeClick(selectedKey)
}) })
} }
})
}, },
// //
handleMoveNodeClick(val) { handleMoveNodeClick(val) {
@ -174,6 +179,7 @@ export default {
} }
this.page.page = 1 this.page.page = 1
this.page.size = 10 this.page.size = 10
this.query.search = null
this.getViewTable() this.getViewTable()
} }
}, },
@ -197,11 +203,36 @@ export default {
} }
}) })
}, },
getViewTableList() {
getViewTableList(type) {
if (type === 'search') {
this.page.page = 1
}
this.tableData = [] this.tableData = []
this.loading = true this.loading = true
FetchInitSearchFonds().then(res => {
const allFondsIds = res.map(item => item.fondsId)
console.log('selectedCategoryMove', this.selectedCategoryMove)
// FetchInitSearchFonds().then(res => {
// const allFondsIds = res.map(item => item.fondsId)
// const params = {
// 'categoryId': this.selectedCategoryMove.id,
// 'categoryLevel': 3,
// 'ignore': true,
// 'isdel': false,
// 'collectFormal': 1,
// 'search': this.query.search,
// 'fonds_no': allFondsIds.join(','),
// 'page': this.page.page - 1,
// 'size': this.page.size
// }
// FetchInitCategoryView(params).then((res) => {
// console.log(res)
// if (res.code !== 500) {
// this.tableData = res.list.content
// this.page.total = res.list.totalElements
// }
// this.loading = false
// })
// })
const params = { const params = {
'categoryId': this.selectedCategoryMove.id, 'categoryId': this.selectedCategoryMove.id,
'categoryLevel': 3, 'categoryLevel': 3,
@ -209,9 +240,10 @@ export default {
'isdel': false, 'isdel': false,
'collectFormal': 1, 'collectFormal': 1,
'search': this.query.search, 'search': this.query.search,
'fonds_no': allFondsIds.join(','),
'fonds_no': this.selectedDocument.fondsId,
'page': this.page.page - 1, 'page': this.page.page - 1,
'size': this.page.size
'size': this.page.size,
'sort': this.arrySort
} }
FetchInitCategoryView(params).then((res) => { FetchInitCategoryView(params).then((res) => {
console.log(res) console.log(res)
@ -221,7 +253,6 @@ export default {
} }
this.loading = false this.loading = false
}) })
})
}, },
getFonds() { getFonds() {
@ -284,7 +315,6 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import "~@/assets/styles/prearchive-library.scss"; @import "~@/assets/styles/prearchive-library.scss";
.el-pagination{ .el-pagination{
padding-right: 5px; padding-right: 5px;
margin: 25px 0 !important; margin: 25px 0 !important;

53
src/views/prearchiveLibrary/module/scope.vue

@ -7,11 +7,11 @@
<div class="move-main"> <div class="move-main">
<div class="move-left"> <div class="move-left">
<!--门类树状结构--> <!--门类树状结构-->
<!-- v-loading="loadingTree" -->
<div class="tree-scroll"> <div class="tree-scroll">
<el-tree <el-tree
ref="tree2" ref="tree2"
v-loading="crud.loading"
:data="crud.data"
:data="categoryTree"
node-key="id" node-key="id"
default-expand-all default-expand-all
:props="defaultProps" :props="defaultProps"
@ -64,26 +64,28 @@
<script> <script>
import { preLibraryCrud } from '../mixins/index' import { preLibraryCrud } from '../mixins/index'
import { FetchMenuByFondsId } from '@/api/system/category/category'
import { FetchInitArchivesScope, FetchSonArchivesScope } from '@/api/system/archivesScope' import { FetchInitArchivesScope, FetchSonArchivesScope } from '@/api/system/archivesScope'
import CRUD, { presenter, header, crud } from '@crud/crud'
import Vue from 'vue'
// import Vue from 'vue'
export default { export default {
name: 'ScopeModule', name: 'ScopeModule',
components: { }, components: { },
cruds() {
return [
CRUD({
title: '归档范围', url: 'api/category/menu',
crudMethod: {}, sort: []
})
]
},
mixins: [presenter(), header(), crud(), preLibraryCrud],
// cruds() {
// return [
// CRUD({
// title: '', url: 'api/category/menuByFondsId',
// crudMethod: {}, sort: []
// })
// ]
// },
mixins: [preLibraryCrud],
data() { data() {
return { return {
scopeVisible: false, scopeVisible: false,
selectedCategory: null, selectedCategory: null,
loading: false, loading: false,
loadingTree: false,
categoryTree: [],
tableData: [], tableData: [],
selections: [], selections: [],
defaultProps: { children: 'children', label: 'cnName' } defaultProps: { children: 'children', label: 'cnName' }
@ -98,21 +100,27 @@ export default {
getRowKey(row) { getRowKey(row) {
return row.id return row.id
}, },
[CRUD.HOOK.afterRefresh]() {
this.crud.data = this.filterData(this.crud.data)
opened(selectedDocument) {
console.log('selectedDocument444', selectedDocument)
const params = {
'fondsId': selectedDocument.fondsId
}
FetchMenuByFondsId(params).then(res => {
this.categoryTree = this.filterData(res)
this.$nextTick(() => { this.$nextTick(() => {
if (this.$refs.tree2) { if (this.$refs.tree2) {
let currentKey let currentKey
if (this.crud.data[0].isType === 1) {
currentKey = this.findNode(this.crud.data[0].children, (node) => {
if (this.categoryTree[0].isType === 1) {
currentKey = this.findNode(this.categoryTree[0].children, (node) => {
return node.isType !== 1 return node.isType !== 1
}) })
} else { } else {
currentKey = this.crud.data[0]
currentKey = this.categoryTree[0]
} }
this.$nextTick(() => {
// //
this.$refs.tree2.setCurrentKey(currentKey.id) this.$refs.tree2.setCurrentKey(currentKey.id)
this.$nextTick(() => {
// //
const selectedKey = this.$refs.tree2.getCurrentNode() const selectedKey = this.$refs.tree2.getCurrentNode()
if (this.$refs.tree2.getNode(selectedKey) && this.$refs.tree2.getNode(selectedKey).parent) { if (this.$refs.tree2.getNode(selectedKey) && this.$refs.tree2.getNode(selectedKey).parent) {
@ -123,6 +131,7 @@ export default {
}) })
} }
}) })
})
}, },
// //
handleNodeClick2(val) { handleNodeClick2(val) {
@ -130,9 +139,9 @@ export default {
console.log('handleNodeClick233', val.isType) console.log('handleNodeClick233', val.isType)
if (val) { if (val) {
this.selectedCategory = val this.selectedCategory = val
if (val.pid !== '0') {
Vue.set(this.selectedCategory, 'parentName', this.$refs.tree2.getNode(val.pid).data.cnName)
}
// if (val.pid !== '0') {
// Vue.set(this.selectedCategory, 'parentName', this.$refs.tree2.getNode(val.pid).data.cnName)
// }
this.loading = true this.loading = true
this.getInitArchivesScope(this.selectedCategory) this.getInitArchivesScope(this.selectedCategory)
} }

63
src/views/prearchiveLibrary/treeList.vue

@ -5,13 +5,13 @@
<span class="left-bottom-line" /> <span class="left-bottom-line" />
<!--门类树状结构--> <!--门类树状结构-->
<div class="tree-scroll"> <div class="tree-scroll">
<el-tree ref="tree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick">
<el-tree ref="tree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="keyId" :expand-on-click-node="false" highlight-current default-expand-all @node-click="handleNodeClick">
<span slot-scope="{ node, data }" class="custom-tree-node"> <span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.isType === 1 " class="iconFolder"> <span v-if="data.isType === 1 " class="iconFolder">
{{ data.cnName }}
{{ data.label }}
</span> </span>
<span v-if="data.isType === 2" class="iconFile"> <span v-if="data.isType === 2" class="iconFile">
{{ data.cnName }}
{{ data.label }}
</span> </span>
</span> </span>
</el-tree> </el-tree>
@ -22,6 +22,7 @@
<script> <script>
import CRUD, { presenter, header } from '@crud/crud' import CRUD, { presenter, header } from '@crud/crud'
import { preLibraryCrud } from './mixins/index' import { preLibraryCrud } from './mixins/index'
import { mapGetters } from 'vuex'
export default { export default {
name: 'PrearchiveTree', name: 'PrearchiveTree',
@ -29,7 +30,7 @@ export default {
cruds() { cruds() {
return [ return [
CRUD({ CRUD({
title: '预归档库', url: 'api/document/menu',
title: '预归档库', url: 'api/document/menu_perpare',
crudMethod: { }, crudMethod: { },
optShow: { optShow: {
add: false, add: false,
@ -58,39 +59,55 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters([
'user'
])
}, },
created() { created() {
}, },
methods: { methods: {
[CRUD.HOOK.beforeToAdd](crud, form, btn) {
[CRUD.HOOK.beforeRefresh](crud) {
this.crud.query.page = null
this.crud.query.size = null
this.crud.query.fondsId = this.user.fonds.id
const ids = this.user.roles.map(item => { return item.id })
this.crud.query.roleIds = ids.join(',')
}, },
[CRUD.HOOK.afterRefresh]() { [CRUD.HOOK.afterRefresh]() {
this.crud.data = this.filterData(this.crud.data)
this.$nextTick(() => {
let currentKey
if (this.crud.data[0].isType === 1) {
currentKey = this.findNode(this.crud.data[0].children, (node) => {
return node.isType !== 1
this.crud.data = this.crud.data.map((item, index) => {
const newItem = {
...item.fonds,
keyId: item.fonds.fonds_id,
isType: 1,
label: item.fonds.fonds_name,
children: item.document.map((doc, childIndex) => {
// id
const uniqueChildId = `${item.fonds.fonds_id}_${doc.id}_${childIndex}`
return {
...doc,
keyId: uniqueChildId,
fondsId: item.fonds.fonds_id,
fondsNo: item.fonds.fonds_no,
label: doc.cnName
}
}) })
} else {
currentKey = this.crud.data[0]
} }
//
this.$refs.tree.setCurrentKey(currentKey.id)
return newItem
})
this.$nextTick(() => { this.$nextTick(() => {
//
const selectedKey = this.$refs.tree.getCurrentNode()
if (this.$refs.tree.getNode(selectedKey) && this.$refs.tree.getNode(selectedKey).parent) {
this.expandParents(this.$refs.tree.getNode(selectedKey).parent)
if (this.crud.data.length > 0 && this.crud.data[0].children && this.crud.data[0].children.length > 0) {
const targetNode = this.crud.data[0].children[0]
const node = this.$refs.tree.getNode(targetNode.keyId)
if (node) {
this.$refs.tree.setCurrentKey(targetNode.keyId)
this.handleNodeClick(node.data)
}
} }
//
this.handleNodeClick(selectedKey)
})
}) })
}, },
// //
handleNodeClick(val) { handleNodeClick(val) {
console.log('val', val)
if (val) { if (val) {
this.$emit('nodeClick', val) this.$emit('nodeClick', val)
} }

Loading…
Cancel
Save