Browse Source

收集库-管理

master
xuhuajiao 1 year ago
parent
commit
865ae8b056
  1. 28
      src/api/collect/collect.js
  2. 6
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  3. 3
      src/views/collectReorganizi/collectionLibrary/index.vue
  4. 6
      src/views/collectReorganizi/collectionLibrary/juannei/index.vue
  5. 12
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  6. 45
      src/views/collectReorganizi/collectionLibrary/module/bulkImport/index.vue
  7. 122
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  8. 22
      src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/data.json
  9. 196
      src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/index.vue
  10. 117
      src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/tree.json
  11. 147
      src/views/collectReorganizi/collectionLibrary/module/fileSeqAdjustment/index.vue
  12. 6
      src/views/collectReorganizi/collectionLibrary/project/index.vue
  13. 2
      src/views/prearchiveLibrary/module/moveFile.vue

28
src/api/collect/collect.js

@ -1,4 +1,5 @@
import request from '@/utils/request'
import qs from 'qs'
// 根据门类父id获取卷内列表列
export function FetchInitCategoryViewTable(params) {
@ -12,9 +13,8 @@ export function FetchInitCategoryViewTable(params) {
// 根据门类父id获取卷内列表
export function FetchInitCategoryView(params) {
return request({
url: 'api/collect/initCategoryView',
method: 'get',
params
url: 'api/collect/initCategoryView' + '?' + qs.stringify(params, { indices: false }),
method: 'get'
})
}
@ -135,6 +135,24 @@ export function FetchUpdateArchivesNo(data) {
})
}
// 档案预调整
export function FetchDoArchivesAdjust(data) {
return request({
url: 'api/collect/doArchivesAdjust',
method: 'post',
data
})
}
// 档案调整
export function FetchArchivesAdjust(data) {
return request({
url: 'api/collect/archivesAdjust',
method: 'post',
data
})
}
export default {
collectAdd,
collectEdit,
@ -148,5 +166,7 @@ export default {
FetchAddArchivesFile,
FetchDeleteArchivesFile,
FetchBatchUpdate,
FetchUpdateArchivesNo
FetchUpdateArchivesNo,
FetchDoArchivesAdjust,
FetchArchivesAdjust
}

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

@ -19,7 +19,11 @@
>
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column :label="selectedCategory.arrangeType === 1 || (selectedCategory.arrangeType !==1 && activeIndex===1) ? '原文':'卷内'" prop="child" width="55" align="center" />
<el-table-column :label="selectedCategory.arrangeType === 1 || (selectedCategory.arrangeType !==1 && activeIndex===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>
<template slot="header">
<el-tooltip

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

@ -238,6 +238,9 @@ export default {
'archive_year': null, //
'fonds_no': null //
}
this.parentsProjectId = null
this.parentsAnjuanId = null
this.parentsJuanneiId = null
//
localStorage.setItem('currentArchivesKey', JSON.stringify(val))
this.selectedCategory = val

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

@ -27,7 +27,11 @@
>
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="原文" prop="child" width="55" align="center" />
<el-table-column label="原文" 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>
<template slot="header">
<el-tooltip

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

@ -63,20 +63,17 @@ export const collectionLibraryCrud = {
this.parentsId = this.parentsData.parentsAnjuanId
} else if (this.isTitleType === 6) {
// 原文
console.log('fff')
if (this.selectedCategory.arrangeType === 1) {
console.log('ggg')
this.parentsId = this.parentsData.parentsAnjuanId
this.$parent.getTableDisplayFieldsLoading = true
} else {
console.log('ddd')
this.$parent.$parent.getTableDisplayFieldsLoading = true
this.parentsId = this.parentsData.parentsJuanneiId
}
}
setTimeout(() => {
this.getViewTableList(categoryLevel, this.parentsId, 'search')
this.getViewTable(categoryLevel, this.parentsId, 'search')
}, 200)
},
getViewTable(categoryLevel, parentsId, type) {
@ -114,7 +111,8 @@ export const collectionLibraryCrud = {
'project_class': this.query.project_class,
'archive_ctg_no': this.query.archive_ctg_no,
'page': this.page.page - 1,
'size': this.page.size
'size': this.page.size,
'sort': this.arrySort
}
FetchInitCategoryView(params).then((res) => {
if (res.code !== 500) {
@ -149,7 +147,6 @@ export const collectionLibraryCrud = {
}
} else if (categoryLevel === 3) {
if (this.isTitleType === 3) {
console.log('2222')
// 案卷下的未整理 / 文件为主页时
const wjObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList
this.anjuanData = res.list.content
@ -165,7 +162,6 @@ export const collectionLibraryCrud = {
}
} else {
// 卷内
console.log('5555')
this.junneiData = res.list.content
this.page.total = res.list.totalElements
if (type === 'search') {
@ -186,8 +182,6 @@ export const collectionLibraryCrud = {
}
}
this.getTableDisplayFieldsLoading = false
console.log(this.parentsData)
// this.crud.refresh()
this.crud.selections = []
if (categoryLevel === 3) {
// 按件

45
src/views/collectReorganizi/collectionLibrary/module/bulkImport/index.vue

@ -1,6 +1,6 @@
<template>
<!-- 批量导入 -->
<el-dialog title="批量导入" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="bulkImportVisible">
<el-dialog title="批量导入" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="bulkImportVisible" :before-close="handleCloseDialog">
<div class="setting-dialog">
<div class="bulk-import-item">
<h4 class="bulk-import-title1">下载模板</h4>
@ -18,6 +18,7 @@
<div v-for="item in excelList" :key="item.name" class="file-list">
<i class="iconfont icon-xiaowenjian" />
{{ item.name }}
<i class="el-icon-close" @click="deleteFile(item)" />
</div>
</el-form-item>
<el-form-item label="导入类型" prop="type">
@ -86,12 +87,7 @@ export default {
return {
//
bulkImportVisible: false,
rules: {
name: [
{ required: true, message: '请输入活动名称', trigger: 'blur' },
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
]
},
rules: {},
form: {
file: null,
type: '追加',
@ -104,13 +100,7 @@ export default {
label: '追加'
}
],
fieldsOptions: [],
fileNames: '', // - name
formatType: '', // - type
postfix: '', // -
fileSize: '', // -
filePath: '', // - path
nowDate: '' //
fieldsOptions: []
}
},
computed: {
@ -153,6 +143,14 @@ export default {
this.excelList.push(files[i])
}
},
// X
deleteFile(file) {
const index = this.excelList.indexOf(file)
this.excelList.splice(index, 1)
if (this.excelList.length === 0) {
this.$message.info('已清空要导入的Excel数据文件!')
}
},
onSubmitImport(formName) {
if (this.excelList.length === 0) {
this.$message.error('请先上传Excel')
@ -163,14 +161,16 @@ export default {
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'file': this.form.file,
'file': this.excelList[0],
'replicated': this.form.replicated.join(',')
}
console.log(params)
BatchImport(this.baseApi + '/api/collect/batchImport', params).then(res => {
console.log(res)
if (res.data.code !== 500) {
this.$message.error('批量导入成功')
this.$message.success(res.data.data)
this.$emit('close-dialog')
this.handleCloseDialog()
} else {
this.$message.error('批量导入失败')
}
@ -180,6 +180,14 @@ export default {
return false
}
})
},
handleCloseDialog(done) {
//
this.$refs.form.resetFields()
this.bulkImportVisible = false
this.excelList = []
//
// done()
}
}
}
@ -215,6 +223,7 @@ export default {
.input-import{
margin-top: 0;
overflow: hidden;
}
.upload-excel{
color: #545B65;
@ -258,8 +267,8 @@ export default {
font-size: 12px;
color: #A6ADB6;
i{
font-size: 12px;
color: #A6ADB6;
font-size: 12px !important;
color: #A6ADB6 !important;
}
}
}

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

@ -67,9 +67,9 @@
<el-menu-item v-if="isTitleType !== 2" index="2-1" @click="handleBlukImport">批量导入</el-menu-item>
<!-- 项目 / 案卷 / 卷内 / 文件-->
<el-menu-item v-if="activeIndex !== 1 || (isTitleType === 3 && selectedCategory.arrangeType === 1 && activeIndex === 1)" index="2-2" @click="handleBlukEditing">批量修改</el-menu-item>
<el-menu-item v-if="(isTitleType === 3 && selectedCategory.arrangeType === 2) && activeIndex === 0" index="2-3" @click="handleAdjustment('anjuan')">案卷顺序调整</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-12" @click="handleJnSeqAdjustment">卷内顺序调整</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && selectedCategory.arrangeType === 1" index="2-3" @click="handleAdjustment('file')">文件顺序调整</el-menu-item>
<el-menu-item v-if="(isTitleType === 3 && selectedCategory.arrangeType === 2) && activeIndex === 0" index="2-3" @click="handleJnSeqAdjustment('anjuan')">案卷顺序调整</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-12" @click="handleJnSeqAdjustment('juannei')">卷内顺序调整</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && selectedCategory.arrangeType === 1" index="2-3" @click="handleJnSeqAdjustment('file')">文件顺序调整</el-menu-item>
<el-menu-item v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 1|| selectedCategory.arrangeType === 2) && activeIndex === 1) && isTitleType !== 4" index="2-4" @click="handleFileNumberUpdate(0)">档号更新</el-menu-item>
<!-- 案卷 -->
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-5" @click="handleFileNumberUpdate(1)">卷内档号更新</el-menu-item>
@ -174,10 +174,10 @@
<!-- 批量修改 -->
<BlukEditing ref="blukEditingRef" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
<!-- 档案调整 -->
<FileNumberAdjustment ref="fileNumberAdjustmentRef" :selected-category="selectedCategory" :collect-level="collectLevel" />
<!-- <FileNumberAdjustment ref="fileNumberAdjustmentRef" :selected-category="selectedCategory" :collect-level="collectLevel" /> -->
<!-- 卷内顺序调整 -->
<FileSeqAdjustment ref="fileSeqAdjustmentRef" :selected-category="selectedCategory" />
<!-- 案卷/文件/卷内 顺序调整 -->
<FileSeqAdjustment ref="fileSeqAdjustmentRef" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
<!-- 拆卷 -->
<el-dialog class="tip-dialog" title="拆卷" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="uncoilVisible">
@ -228,20 +228,6 @@
</div>
</el-dialog>
<!-- 导出 -->
<el-dialog class="tip-dialog" title="导出" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="exportVisible">
<div class="setting-dialog">
<div class="tip-content">
<p class="tipMsg">此操作将导出所选数据</p>
<span>你是否还要继续?</span>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="downloadVisible = false">取消</el-button>
<el-button v-loading="delAllLoading" type="primary" @click.native="handleExportConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<!-- 打印 -->
<Print ref="printRef" />
<!-- 四性检测 -->
@ -310,7 +296,7 @@ import PreviewForm from '@/views/components/category/PreviewForm'
import UploadOriginal from './uploadOriginal/index'
import BlukImport from './bulkImport/index'
import BlukEditing from './blukEditing/index'
import FileNumberAdjustment from './fileNumberAdjustment/index'
// import FileNumberAdjustment from './fileNumberAdjustment/index'
import FileSeqAdjustment from './fileSeqAdjustment/index'
import CombineFile from './combineFile/index'
import InsertFile from './insertFile/index'
@ -324,7 +310,7 @@ import { mapGetters } from 'vuex'
export default {
name: 'CollectHeader',
components: { Treeselect, PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileNumberAdjustment, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper },
components: { Treeselect, PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper },
mixins: [collectionLibraryCrud, crud()],
props: {
selectedCategory: {
@ -370,7 +356,6 @@ export default {
moveVisible: false,
uncoilVisible: false,
filingVisible: false,
exportVisible: false,
returnVisible: false,
downloadVisible: false,
recoverVisible: false,
@ -759,35 +744,40 @@ export default {
this.$refs.blukEditingRef.bulkEditingVisible = true
})
},
// /
handleAdjustment(type) {
// //
handleJnSeqAdjustment(type) {
if (type === 'juannei') {
if (this.selections.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
if (this.selections.length > 1) {
this.$message('卷内顺序调整操作只可勾选唯一目标条目,请先确认!')
return false
}
this.$nextTick(() => {
this.$refs.fileSeqAdjustmentRef.titleAdjustment = '卷内顺序调整'
this.$refs.fileSeqAdjustmentRef.isJuannei = true
})
} else {
if (this.selections.length < 2) {
this.$message('请选择多个' + (type === 'file' ? '文件' : '案卷') + '后进行操作!')
return false
}
this.$nextTick(() => {
if (type === 'anjuan') {
this.$refs.fileNumberAdjustmentRef.titleAdjustment = '案卷顺序调整'
this.$refs.fileSeqAdjustmentRef.titleAdjustment = '案卷顺序调整'
} else {
this.$refs.fileNumberAdjustmentRef.titleAdjustment = '文件顺序调整'
}
this.$refs.fileNumberAdjustmentRef.adjustmentVisible = true
// if (this.selections.length === 0) {
// this.$refs.fileNumberAdjustmentRef.adjustmentTipVisible = true
// } else {
// this.$refs.fileNumberAdjustmentRef.adjustmentVisible = true
// }
},
//
handleJnSeqAdjustment() {
if (this.selections.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
this.$refs.fileSeqAdjustmentRef.titleAdjustment = '文件顺序调整'
}
if (this.selections.length > 1) {
this.$message('顺序调整操作只可勾选唯一目标条目,请先确认!')
return false
this.$refs.fileSeqAdjustmentRef.isJuannei = false
})
}
this.$refs.fileSeqAdjustmentRef.adjustmentVisible = true
this.$nextTick(() => {
this.$refs.fileSeqAdjustmentRef.getDoArchivesAdjust()
})
},
//
handleFileNumberUpdate(type) {
@ -801,7 +791,13 @@ export default {
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
// updateType 1. 2.
let updateType
if (type === 0) {
updateType = 1
} else {
updateType = 2
}
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
@ -809,7 +805,8 @@ export default {
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesIds
'archivesIds': archivesIds,
'updateType': updateType
}
console.log(params)
FetchUpdateArchivesNo(params).then((res) => {
@ -822,7 +819,6 @@ export default {
}).catch(err => {
console.log(err)
})
}
}).catch(() => {
})
},
@ -885,10 +881,38 @@ export default {
},
//
handleExport() {
this.exportVisible = true
},
handleExportConfirm() {
this.exportVisible = false
if (this.selections.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
// const archivesIds = []
// this.selections.forEach(val => {
// archivesIds.push(val.id)
// })
// const params = {
// 'categoryId': this.selectedCategory.id,
// 'categoryLevel': this.collectLevel,
// 'archivesIds': archivesIds
// }
// console.log(params)
// FetchUpdateArchivesNo(params).then((res) => {
// if (res.code !== 500) {
// this.crud.notify('', CRUD.NOTIFICATION_TYPE.SUCCESS)
// this.handleSearch(this.collectLevel)
// } else {
// this.crud.notify(res.message, CRUD.NOTIFICATION_TYPE.ERROR)
// }
// }).catch(err => {
// console.log(err)
// })
}).catch(() => {
})
},
//
handlePrint() {

22
src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/data.json

@ -1,22 +0,0 @@
[
{
"id": 1,
"label": "字段A",
"isType": 1
},
{
"id": 2,
"label": "字段B",
"isType": 0
},
{
"id": 3,
"label": "字段C",
"isType": 1
},
{
"id": 4,
"label": "字段D",
"isType": 1
}
]

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

@ -1,41 +1,50 @@
<template>
<!-- 移动 -->
<el-dialog class="collectMoveFile-dialog" title="移动" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="collectMoveFileVisible">
<el-dialog class="collectMoveFile-dialog" title="移动" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="collectMoveFileVisible" @opened="opened">
<div class="collectMove-main">
<div class="collectMove-left">
<h3 class="arc-title arc-title-top">档案门类</h3>
<el-tree :data="treeList" :props="defaultProps" @node-click="handleNodeClick">
<span slot-scope="{ node, data }" class="custom-tree-node">
<span v-if="data.isType===1 " class="iconFolder">
{{ data.cnName }}
</span>
<span v-if="data.isType===2 || data.isType === 3 || data.isType===5" class="iconArch">
{{ data.cnName }}
</span>
<span v-if="data.isType===4" class="iconFile">
{{ data.cnName }}
</span>
</span>
</el-tree>
<CategoryTree ref="categoryTree" @nodeClick="handleNodeClick" />
</div>
<div class="collectMove-right">
<div class="head-search">
<el-input v-model="query.blurry" clearable size="small" placeholder="输入题名或档号搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
<el-input v-model="query.search" clearable size="small" placeholder="输入题名或档号搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
<rrOperation />
</div>
<div class="table-list">
<el-table :data="crud.data" style="width: 100%" height="380">
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column prop="number" label="题名" width="120" />
<el-table-column prop="operator" label="档号" width="120" />
<el-table-column prop="operationType" label="年度" width="120" />
<el-table-column prop="file" label="所属门类" width="160" />
<el-table-column prop="createDate" label="所属分类" width="200" />
<el-table-column prop="createDate" label="起始时间" width="200" />
<el-table-column prop="createDate" label="终止时间" width="200" />
<el-table
ref="table"
v-loading="loading"
lazy
:data="tableData"
style="width: 100%;"
height="calc(100%)"
:row-key="getRowKey"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
highlight-current-row
@selection-change="selectionChangeHandler"
@row-click="clickRowHandler"
>
<el-table-column type="selection" align="center" width="55" />
<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">
<el-tooltip
class="item"
effect="dark"
:content="field.fieldCnName"
placement="top-start"
>
<span>{{ field.fieldCnName }}</span>
</el-tooltip>
</template>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
v-if="tableData.length !== 0"
:current-page="page.page"
:total="page.total"
:page-size="page.size"
@ -67,12 +76,13 @@
</template>
<script>
import CategoryTree from '@/views/components/categoryTree'
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect'
import CRUD, { presenter, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import treeJson from './tree.json'
export default {
name: 'CollectMoveFile',
components: { rrOperation },
components: { CategoryTree, rrOperation },
mixins: [presenter(), crud()],
cruds() {
return CRUD({
@ -90,16 +100,20 @@ export default {
},
data() {
return {
query: {
blurry: ''
},
collectMoveFileVisible: false,
treeList: [],
defaultProps: {
children: 'children',
label: 'label'
label: 'cnName'
},
query: {
search: ''
},
currentCategory: null,
collectMoveFileVisible: false,
loading: false,
arrySort: [],
tableData: [],
tableDisplayFields: [],
selections: [],
page: {
page: 1,
size: 10,
@ -109,16 +123,96 @@ export default {
}
},
created() {
this.treeList = treeJson.data
},
mounted() {
},
methods: {
handleComfireCollectMoveFile() {
this.collectMoveFileVisible = false
getRowKey(row) {
return row.id
},
opened() {
this.refresh()
},
refresh() {
if (this.$refs.treeMove) {
let currentKey
if (this.crud.data[0].isType === 1) {
console.log(currentKey)
currentKey = this.findNode(this.crud.data[0].children, (node) => {
return node.isType !== 1
})
} else {
currentKey = this.crud.data[0]
}
//
this.$refs.treeMove.setCurrentKey(currentKey.id)
this.$nextTick(() => {
//
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)
}
//
this.handleMoveNodeClick(selectedKey)
})
}
},
handleNodeClick(data) {
console.log(data)
if (data) {
this.currentCategory = data
this.getViewTable()
}
},
getViewTable() {
this.loading = true
this.tableDisplayFields = []
FetchInitCategoryViewTable({ categoryId: this.currentCategory.id, categoryLevel: 3 }).then((res) => {
if (res) {
this.arrySort = []
this.tableDisplayFields = res
const orderSortArry = this.tableDisplayFields.filter(item => item.displayOrder).sort((a, b) => a.displayOrder - b.displayOrder)
orderSortArry.forEach(item => {
if (item.displayOrderBy) {
this.arrySort.push(item.fieldName + ',' + item.displayOrderBy)
}
})
this.$nextTick(() => {
this.getViewTableList()
})
this.loading = false
}
})
},
getViewTableList() {
this.tableData = []
this.loading = true
const params = {
'categoryId': this.currentCategory.id,
'categoryLevel': 3,
'search': this.query.search,
'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
})
},
clickRowHandler(row) {
this.selections = []
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row)
this.selections.push(row)
},
selectionChangeHandler(selection, row) {
this.selections = selection
},
handleComfireCollectMoveFile() {
this.collectMoveFileVisible = false
},
handleSizeChange(size) {
this.page.size = size
@ -149,28 +243,14 @@ export default {
border: 1px solid #E6E8ED;
.collectMove-left{
width: 297px;
.arc-title{
position: relative;
height: 48px;
line-height: 48px;
text-align: center;
font-size: 16px;
color: #0C0E1E;
background-color: #F3F5F8;
&::after{
content: "";
position: absolute;
right: 12px;
bottom: 0;
}
}
.arc-title-top{
&::after{
width: 44px;
height: 35px;
background: url("~@/assets/images/collect/daml.png") no-repeat;
background-size: 100% 100%;
overflow: hidden;
overflow-y: scroll;
.elect-cont-left{
width: auto !important;
margin-right: 0 !important;
}
::v-deep .container-left{
min-height: calc(100%) !important;
}
}
.collectMove-right{

117
src/views/collectReorganizi/collectionLibrary/module/collectMoveFile/tree.json

@ -1,117 +0,0 @@
{
"code": 200,
"message": "操作成功",
"data": [
{
"id": "0ED1F5CF0EBAC01B914132",
"cnName": "档案",
"enName": "archives",
"pid": "0",
"isType": 1,
"categorySeq": 0,
"children": [
{
"id": "D70C5574B8DCE7A65F7037",
"cnName": "文书档案",
"enName": null,
"pid": "0ED1F5CF0EBAC01B914132",
"isType": 1,
"categorySeq": null,
"children": [
{
"id": "F0F59CC713C83AE4BAB99B",
"cnName": "文书档案(案卷)",
"enName": "tb_2023_06_21_1687319104861",
"pid": "D70C5574B8DCE7A65F7037",
"isType": 3,
"categorySeq": 1,
"children": [
{
"id": "CD135F6A77018CE04D4FDB",
"cnName": "文书档案(卷内)",
"enName": "tb_2023_06_21_1687319123605",
"pid": "F0F59CC713C83AE4BAB99B",
"isType": 4,
"categorySeq": null,
"children": [],
"remark": null,
"typeMetic": true,
"create_by": "admin",
"update_by": "admin",
"create_time": 1687319124000,
"update_time": 1687319124000
}
],
"remark": null,
"typeMetic": true,
"create_by": "admin",
"update_by": "admin",
"create_time": 1687319105000,
"update_time": 1687319114000
},
{
"id": "005E76FEC5A2AAB368CA1F",
"cnName": "文书档案(资料)",
"enName": "tb_2023_06_21_1687330804487",
"pid": "D70C5574B8DCE7A65F7037",
"isType": 5,
"categorySeq": 2,
"children": [],
"remark": null,
"typeMetic": true,
"create_by": "admin",
"update_by": "admin",
"create_time": 1687330805000,
"update_time": 1687330811000
}
],
"remark": null,
"typeMetic": true,
"create_by": "admin",
"update_by": "admin",
"create_time": 1687243138000,
"update_time": 1687243138000
},
{
"id": "D70C5574B8DCE7A65F7038",
"cnName": "基建档案",
"enName": null,
"pid": "0ED1F5CF0EBAC01B914132",
"isType": 1,
"categorySeq": null,
"children": [
{
"id": "F0F59CC713C83AE4BAB99B",
"cnName": "基建档案(项目)",
"enName": "tb_2023_06_21_1687319104861",
"pid": "D70C5574B8DCE7A65F7037",
"isType": 2,
"categorySeq": 1,
"children": [
],
"remark": null,
"typeMetic": true,
"create_by": "admin",
"update_by": "admin",
"create_time": 1687319105000,
"update_time": 1687319114000
}
],
"remark": null,
"typeMetic": true,
"create_by": "admin",
"update_by": "admin",
"create_time": 1687243138000,
"update_time": 1687243138000
}
],
"remark": "",
"typeMetic": true,
"create_by": null,
"update_by": "admin",
"create_time": null,
"update_time": 1655112365000
}
],
"timestamp": 1688967875784
}

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

@ -1,16 +1,31 @@
<template>
<!-- 卷内顺序调整 -->
<div>
<el-dialog class="adjust-dialog" title="卷内顺序调整" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="adjustmentVisible" @opened="opened">
<el-dialog class="adjust-dialog" :title="titleAdjustment" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="adjustmentVisible" @opened="opened">
<div class="setting-dialog">
<div class="base-info">
<p>案卷档号YXK-2022-JJ-001</p>
<p>案卷题名案卷名称123</p>
<div v-if="isJuannei" class="base-info">
<p>案卷档号{{ selections.length !== 0 && selections[0].archive_no }}</p>
<p>案卷题名{{ selections.length !== 0 && selections[0].maintitle }}</p>
</div>
<i class="drag-tip">提示请通过拖动鼠标来调整当前顺序</i>
<el-table :data="sortTableData" :tree-props="{children: 'childrens'}" class="category-sort" style="width: 100%;" row-key="id">
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column prop="archive_no" label="字段名称" />
<el-table
ref="table"
:data="sortTableData"
:tree-props="{children: 'childrens'}"
class="category-sort"
style="width: 100%;"
row-key="id"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<template v-for="(field, index) in queryFields">
<el-table-column
v-if="field !== 'id'"
:key="index"
:prop="field"
:label="queryCnFields[index]"
:width="field === 'archive_no' ? '250px' : '120px'"
/>
</template>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="adjustmentVisible = false">取消</el-button>
@ -22,6 +37,7 @@
</template>
<script>
import { FetchDoArchivesAdjust, FetchArchivesAdjust } from '@/api/collect/collect'
import Sortable from 'sortablejs'
export default {
name: 'FileSeqAdjustment',
@ -33,43 +49,27 @@ export default {
default: function() {
return {}
}
},
collectLevel: {
type: Number,
default: function() {
return null
}
},
selections: {
type: Array,
default: () => []
}
},
data() {
return {
titleAdjustment: '',
isJuannei: false,
adjustmentVisible: false,
sortTableData: [
{
'case_no': '746DF968E7E629CAEFF889',
'responsibleby': '发文机关003',
'children_num': 0,
'tid': '',
'medium_qty': '1',
'maintitle': '发文标题003',
'security_class': '秘密',
'archive_year': 2023,
'archive_no': 'AA001-Y-WS.W-2023-001-001',
'created_date': '2023-07-02',
'id': '17D5B3A9B0A0092CA96DAE',
'is_storage': 2,
'is_borrow': 3
},
{
'case_no': '746DF968E7E629CAEFF889',
'responsibleby': '',
'children_num': 0,
'tid': '',
'medium_qty': '0',
'maintitle': '卷册01002',
'security_class': '秘密',
'archive_year': 2023,
'archive_no': 'AA001-Y-WS.W-2023-001-002',
'created_date': '',
'id': '8B7D6D926100324DFCCDA5',
'is_storage': 2,
'is_borrow': 3
}
]
categoryB: null,
sortTableData: [],
queryCnFields: [],
queryFields: []
}
},
watch: {
@ -81,13 +81,37 @@ export default {
mounted() {
},
methods: {
getDoArchivesAdjust() {
const archivesIds = this.selections.map(item => item.id)
let params
if (this.isJuannei) {
params = {
'categoryId': this.selectedCategory.id,
'archivesIds': archivesIds,
'categoryLevel': 3
}
} else {
params = {
'categoryId': this.selectedCategory.id,
'archivesIds': archivesIds,
'categoryLevel': this.collectLevel
}
}
FetchDoArchivesAdjust(params).then((res) => {
console.log(res)
this.categoryB = res.category.id
this.sortTableData = res.list
this.queryCnFields = res.queryCnFields
this.queryFields = res.queryFields
}).catch(err => {
console.log(err)
})
},
//
rowDrop(className, targetName) {
//
const tbody = document.querySelector('.' + className + ' .el-table__body-wrapper tbody')
const that = this
Sortable.create(tbody, {
//
draggable: '.el-table__row',
onEnd({ newIndex, oldIndex }) {
if (newIndex === oldIndex) return
@ -99,22 +123,35 @@ export default {
this.rowDrop('category-sort', 'sortTableData')
},
handleSort() {
const data = this.sortTableData.map((value, index) => {
return { id: value.id, sort: index + 1 }
const archivesIds = []
const sequences = []
this.sortTableData.map((value, index) => {
archivesIds.push(value.id)
sequences.push(index + 1)
})
this.sortTableData.forEach((item, index) => {
item.categorySeq = index + 1
const params = {
'categoryId': this.categoryB,
'archivesIds': archivesIds,
'sequences': sequences
}
console.log(params)
FetchArchivesAdjust(params).then((res) => {
if (res !== 500) {
this.$message({
message: '保存成功',
type: 'success',
duration: 2500
})
this.adjustmentVisible = false
this.$emit('close-dialog')
} else {
this.$message({
message: '调整顺序失败',
type: 'error',
duration: 2500
})
}
})
console.log(data)
// sort(data).then(() => {
// this.sortVisible = false
// this.$message({
// message: '',
// type: 'success',
// duration: 2500
// })
// this.$emit('treeNodeSort', this.sortTableData)
// })
}
}

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

@ -20,7 +20,11 @@
>
<el-table-column type="selection" :reserve-selection="true" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="案卷" prop="child" width="55" align="center" />
<el-table-column label="案卷" 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>
<template slot="header">
<el-tooltip

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

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

Loading…
Cancel
Save