Browse Source

预归档/收集库

master
xuhuajiao 2 years ago
parent
commit
aa136eabc3
  1. 6
      src/views/collectReorganizi/collectionLibrary/anjuan/index.vue
  2. 7
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  3. 3
      src/views/collectReorganizi/collectionLibrary/file/index.vue
  4. 69
      src/views/collectReorganizi/collectionLibrary/index.vue
  5. 5
      src/views/collectReorganizi/collectionLibrary/juannei/index.vue
  6. 4
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  7. 19
      src/views/prearchiveLibrary/data.json
  8. 33
      src/views/prearchiveLibrary/index.vue
  9. 43
      src/views/prearchiveLibrary/mixins/index.js
  10. 10
      src/views/prearchiveLibrary/module/batchFile.vue
  11. 1
      src/views/prearchiveLibrary/module/form.vue
  12. 71
      src/views/prearchiveLibrary/module/moveFile.vue
  13. 31
      src/views/prearchiveLibrary/module/scope.vue
  14. 32
      src/views/prearchiveLibrary/module/tree.json

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

@ -1,6 +1,6 @@
<template>
<div>
<AnjuanContent v-if="selectedCategory.isType === 3 || selectedCategory.isType === 5" ref="ajContent" class="ajContent" :selected-category="selectedCategory" />
<AnjuanContent v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2" ref="ajContent" class="ajContent" :selected-category="selectedCategory" />
<el-drawer
v-else
class="anjuan-drawer"
@ -19,7 +19,7 @@
</template>
<script>
import AnjuanContent from './content.vue'
import AnjuanContent from './content'
export default {
name: 'Anjuan',
components: { AnjuanContent },
@ -43,7 +43,7 @@ export default {
created() {
},
mounted() {
console.log('nei', this.selectedCategory.arrangeType)
},
methods: {
closeDrawer() {

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

@ -18,7 +18,7 @@
>
<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.isType === 5 ? '文件':'卷内'" prop="children_num" width="55" align="center" />
<el-table-column :label=" selectedCategory.arrangeType === 1 ? '文件':'卷内'" prop="children_num" width="55" align="center" />
<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
@ -121,7 +121,7 @@ export default {
methods: {
openJuannei(data) {
// this.$emit('openJuannei', '')
if (this.selectedCategory.isType === 2) {
if (this.selectedCategory.arrangeType === 3) {
this.$parent.$parent.$parent.$emit('openJuannei', data)
} else {
this.$parent.$parent.$emit('openJuannei', data)
@ -155,7 +155,6 @@ export default {
}
console.log('tableDoubleClick', row)
this.arcId = row.id
console.log(this.selectedCategory.isType)
if (this.selectedCategory.isType !== 5) {
this.$refs.archivesInfo.isHasFile = false
@ -163,7 +162,7 @@ export default {
this.$refs.archivesInfo.isHasFile = true
}
if (this.selectedCategory.isType === 3) {
if (this.selectedCategory.arrangeType === 2) {
this.$refs.archivesInfo.detailTitle = '案卷详情'
} else {
this.$refs.archivesInfo.detailTitle = '文件详情'

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

@ -6,8 +6,7 @@
:wrapper-closable="false"
:show-close="false"
direction="rtl"
:size="((selectedCategory.isType === 3 && isAjNo === 0) || (selectedCategory.isType === 2 && isAjNo === 1)) ? '80%' : (isAjNo === 1) ? '90%' : (selectedCategory.isType === 5) ? '90%' : '70%'"
:size="(selectedCategory.arrangeType ===3 && isAjNo === 1 ) ? '80%' : (isAjNo === 1) ? '90%' : (selectedCategory.arrangeType === 1) ? '90%' : '70%'"
>
<CollectHeader :is-title-type="isTitleType" :selected-category="selectedCategory" :selections="selections" :test="test" />
<span class="closed-btn" @click="closeDrawer" />

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

@ -7,8 +7,8 @@
<span class="left-bottom-line" />
<div class="arc-left-tree">
<h3 class="arc-title arc-title-top">档案门类</h3>
<el-tree
ref="archivesTree"
<!-- <el-tree
ref="tree"
v-loading="crud.loading"
class="arc-tree arc-tree-01"
:data="treeJson"
@ -31,7 +31,22 @@
{{ data.cnName }}
</span>
</span>
</el-tree> -->
<div class="tree-scroll">
<el-tree ref="categroyTree" v-loading="crud.loading" class="arc-tree arc-tree-01" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @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" class="iconArch">
{{ data.cnName }}
</span>
<span v-if="data.isType === 3" class="iconFile">
{{ data.cnName }}
</span>
</span>
</el-tree>
</div>
<h3 class="arc-title arc-title-bottom">快速筛选</h3>
<el-tree
ref="tree"
@ -66,10 +81,10 @@
<div class="container-right tab-content">
<span class="right-top-line" />
<span class="left-bottom-line" />
<Project v-if="selectedCategory.isType === 2" ref="projectEle" :selected-category="selectedCategory" :data="sharedData" @openAnjuan="handleOpenAnjuan" />
<Anjuan v-if="selectedCategory.isType === 2 || selectedCategory.isType === 3 || selectedCategory.isType === 5" ref="anjuanEle" :selected-category="selectedCategory" :data="sharedData" @openJuannei="handleOpenJuannei" />
<Juannei v-if="selectedCategory.isType === 2 || selectedCategory.isType === 3 || selectedCategory.isType === 4" ref="juanneiEle" :data="sharedData" :selected-category="selectedCategory" @openFile="handleOpenFile" />
<File v-if="selectedCategory.isType !== 1" ref="fileEle" :selected-category="selectedCategory" />
<Project v-if="selectedCategory.arrangeType === 3" ref="projectEle" :selected-category="selectedCategory" :data="sharedData" @openAnjuan="handleOpenAnjuan" />
<Anjuan v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="anjuanEle" :selected-category="selectedCategory" :data="sharedData" @openJuannei="handleOpenJuannei" />
<Juannei v-if="selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="juanneiEle" :data="sharedData" :selected-category="selectedCategory" @openFile="handleOpenFile" />
<File v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="fileEle" :selected-category="selectedCategory" />
</div>
</div>
</div>
@ -90,7 +105,7 @@ export default {
cruds() {
return [
CRUD({
title: '收集库', url: 'api/archives-type/menu',
title: '收集库', url: 'api/category/menu',
crudMethod: { ...crudCategory },
optShow: {
add: false,
@ -119,6 +134,28 @@ export default {
mounted() {
},
methods: {
filterData(data) {
return data.filter(node => {
if (node.children && node.children.length > 0) {
node.children = this.filterData(node.children) //
}
return node.isType !== 3 // isType3
})
},
// filterData(nodes) {
// nodes.forEach(node => {
// if (node.isType === 3) {
// const parent = nodes.find(item => item.id === node.parentId)
// if (parent) {
// parent.sonNum = parent.sonNum ? parent.sonNum + 1 : 1
// }
// }
// if (node.children && node.children.length > 0) {
// this.filterData(node.children)
// }
// })
// return nodes.filter(node => node.isType !== 3)
// },
//
findNode(tree, func) {
for (const node of tree) {
@ -138,11 +175,14 @@ export default {
}
},
[CRUD.HOOK.afterRefresh]() {
this.crud.data = this.filterData(this.crud.data)
console.log(this.crud.data)
this.$nextTick(() => {
let currentKey
if (localStorage.getItem('currentArchivesKey')) {
currentKey = JSON.parse(localStorage.getItem('currentArchivesKey'))
//
if (this.$refs.archivesTree.getCurrentKey(currentKey.id) == null) {
if (this.$refs.categroyTree.getCurrentKey(currentKey.id) == null) {
localStorage.removeItem('currentArchivesKey')
}
//
@ -165,20 +205,22 @@ export default {
}
if (currentKey.id) {
//
this.$refs.archivesTree.setCurrentKey(currentKey.id)
this.$refs.categroyTree.setCurrentKey(currentKey.id)
this.$nextTick(() => {
//
const selectedKey = this.$refs.archivesTree.getCurrentNode()
if (this.$refs.archivesTree.getNode(selectedKey) && this.$refs.archivesTree.getNode(selectedKey).parent) {
this.expandParents(this.$refs.archivesTree.getNode(selectedKey).parent)
const selectedKey = this.$refs.categroyTree.getCurrentNode()
if (this.$refs.categroyTree.getNode(selectedKey) && this.$refs.categroyTree.getNode(selectedKey).parent) {
this.expandParents(this.$refs.categroyTree.getNode(selectedKey).parent)
}
//
this.handleNodeClick(selectedKey)
})
}
})
},
handleNodeClick(val) {
console.log(val)
console.log(val.arrangeType)
this.selectedCategory = val
//
localStorage.setItem('currentArchivesKey', JSON.stringify(val))
@ -200,7 +242,8 @@ export default {
})
},
handleOpenJuannei(data) {
if (this.selectedCategory.isType === 5 || (this.selectedCategory.isType === 3 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1) || (this.selectedCategory.isType === 2 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1)) {
// selectedCategory.arrangeType !== 0 && selectedCategory.arrangeType !== null
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.$nextTick(() => {
this.$refs.fileEle.test = data

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

@ -6,7 +6,7 @@
:wrapper-closable="false"
:show-close="false"
direction="rtl"
:size="selectedCategory.isType === 3 ? '90%' :'80%'"
:size="selectedCategory.arrangeType === 2 ? '90%' :'80%'"
>
<CollectHeader :is-title-type="isTitleType" :selected-category="selectedCategory" :selections="selections" :test="test" />
<el-table
@ -111,7 +111,7 @@ export default {
this.junneiData = tableData.data.list.content
},
mounted() {
console.log('nei2', this.selectedCategory.arrangeType)
},
methods: {
openFile(data) {
@ -149,7 +149,6 @@ export default {
}
console.log('tableDoubleClick', row)
this.arcId = row.id
console.log(this.selectedCategory.isType)
this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.detailTitle = '卷内详情'
this.$refs.archivesInfo.archivesInfoVisible = true

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

@ -1,6 +1,6 @@
<template>
<div class="collect-header">
<h4 :class="classType">{{ collectTitle }} <span v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.isType === 3 || selectedCategory.isType === 5) )"> > {{ test }}</span></h4>
<h4 :class="classType">{{ collectTitle }} <span v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 1 || selectedCategory.isType === 2) )"> > {{ test }}</span></h4>
<div v-if="isTitleType !== 6" class="head-search">
<!-- 搜索 -->
<el-input v-model="query.blurry" clearable size="small" :placeholder="placeholderType" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" />
@ -309,7 +309,7 @@ export default {
if (this.isTitleType === 2) {
return '项目'
} else if (this.isTitleType === 3) {
if (this.selectedCategory.isType === 5) {
if (this.selectedCategory.arrangeType === 1) {
return '文件'
} else {
if (this.activeIndex === 1) {

19
src/views/prearchiveLibrary/data.json

@ -1,19 +0,0 @@
[
{
"id": 1,
"label": "预归档库",
"isType": 1,
"children": [
{
"id": 2,
"isType": 2,
"label": "收文"
},
{
"id": 3,
"isType": 2,
"label": "发文"
}
]
}
]

33
src/views/prearchiveLibrary/index.vue

@ -125,8 +125,8 @@
</template>
<script>
import CRUD, { presenter, header } from '@crud/crud'
import { preLibraryCrud } from './mixins/index'
import { FetchCategoryMenu } from '@/api/system/category/category'
import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation'
@ -134,7 +134,6 @@ import pagination from '@crud/Pagination'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
// import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import dataJson from './data.json'
import tableJson from './table.json'
import eForm from './module/form'
import batchFile from './module/batchFile'
@ -160,7 +159,7 @@ export default {
})
]
},
mixins: [presenter(), header()],
mixins: [presenter(), header(), preLibraryCrud],
data() {
return {
permission: {
@ -173,7 +172,6 @@ export default {
children: 'children',
label: 'cnName'
},
treeList: [],
table: [],
deleteVisible: false,
mergeVisible: false,
@ -190,36 +188,9 @@ export default {
computed: {
},
created() {
this.treeList = dataJson
this.table = tableJson
},
methods: {
filterData(data) {
return data.filter(node => {
if (node.children && node.children.length > 0) {
node.children = this.filterData(node.children) //
}
return node.isType !== 3 // isType3
})
},
//
findNode(tree, func) {
for (const node of tree) {
if (func(node)) return node
if (node.children) {
const res = this.findNode(node.children, func)
if (res) return res
}
}
return null
},
//
expandParents(node) {
node.expanded = true
if (node.parent) {
this.expandParents(node.parent)
}
},
[CRUD.HOOK.beforeToAdd](crud, form, btn) {
},
[CRUD.HOOK.afterRefresh]() {

43
src/views/prearchiveLibrary/mixins/index.js

@ -0,0 +1,43 @@
// import qs from 'qs'
// import { exportFile } from '@/utils/index'
// import { FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields } from '@/api/archivesManage/archivesList'
export const preLibraryCrud = {
// 组件共用属性
data() {
return {
}
},
// 组件共用方法
methods: {
filterData(data) {
return data.filter(node => {
if (node.children && node.children.length > 0) {
node.children = this.filterData(node.children) // 递归处理子节点
}
return node.isType !== 3 // 过滤掉isType为3的节点
})
},
// 逆归实现 获取指定元素
findNode(tree, func) {
for (const node of tree) {
if (func(node)) return node
if (node.children) {
const res = this.findNode(node.children, func)
if (res) return res
}
}
return null
},
// 展开选中的父级
expandParents(node) {
node.expanded = true
if (node.parent) {
this.expandParents(node.parent)
}
}
},
// 组件挂载时的共用方法
mounted() {
}
}

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

@ -102,6 +102,7 @@
</template>
<script>
import { preLibraryCrud } from '../mixins/index'
import { FetchInitFieldMateList, FetchInitFieldMate } from '@/api/system/fieldMate'
import { FetchDocumentMenu } from '@/api/system/fileLibrary/fileLibrary'
import { FetchCategoryMenu } from '@/api/system/category/category'
@ -113,6 +114,7 @@ import ScopeModule from './scope'
export default {
name: 'BatchFile',
components: { Treeselect, ScopeModule },
mixins: [preLibraryCrud],
data() {
return {
batchVisible: false,
@ -180,14 +182,6 @@ export default {
// this.selectStatus.push({ mode: true, value: '' })
// })
},
filterData(data) {
return data.filter(node => {
if (node.children && node.children.length > 0) {
node.children = this.filterData(node.children) //
}
return node.isType !== 3 // isType3
})
},
//
getCategoryDataTree() {
FetchCategoryMenu().then(res => {

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

@ -17,7 +17,6 @@
</template>
<script>
import PreviewForm from '@/views/components/category/PreviewForm'
import addJson from '../add.json'
export default {

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

@ -6,7 +6,15 @@
<div class="setting-dialog">
<div class="move-main">
<div class="move-left">
<el-tree :data="treeList" :props="defaultProps" @node-click="handleNodeClick" />
<el-tree
ref="treeMove"
v-loading="crud.loading"
:data="crud.data"
node-key="id"
:props="defaultProps"
:expand-on-click-node="false"
@node-click="handleNodeClick"
/>
</div>
<div class="move-right">
<h4>整编库已整理列表</h4>
@ -38,33 +46,74 @@
</template>
<script>
import dataJson from './tree.json'
import { preLibraryCrud } from '../mixins/index'
import CRUD, { presenter, header, crud } from '@crud/crud'
import Vue from 'vue'
export default {
name: 'MoveFile',
components: { },
cruds() {
return [
CRUD({
title: '移动', url: 'api/category/menu',
crudMethod: {}, sort: []
})
]
},
mixins: [presenter(), header(), crud(), preLibraryCrud],
data() {
return {
moveVisible: false,
treeList: [],
radio: 1,
defaultProps: {
children: 'children',
label: 'label'
},
defaultProps: { children: 'children', label: 'cnName' },
currentPage: 1
}
},
created() {
this.treeList = dataJson
},
methods: {
getRowKey(row) {
return row.id
},
[CRUD.HOOK.afterRefresh]() {
this.crud.data = this.filterData(this.crud.data)
this.$nextTick(() => {
if (this.$refs.treeMove) {
let currentKey
if (this.crud.data[0].isType === 1) {
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.handleNodeClick(selectedKey)
})
}
})
},
//
handleNodeClick(val) {
if (val) {
this.selectedCategory = val
if (val.pid !== '0') {
Vue.set(this.selectedCategory, 'parentName', this.$refs.treeMove.getNode(val.pid).data.cnName)
}
}
},
handleClose(done) {
this.moveVisible = false
done()
},
handleNodeClick(data) {
console.log(data)
},
handleSizeChange(val) {
console.log(`每页 ${val}`)
},

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

@ -54,6 +54,7 @@
</template>
<script>
import { preLibraryCrud } from '../mixins/index'
import { FetchInitArchivesScope, FetchSonArchivesScope } from '@/api/system/archivesScope'
import CRUD, { presenter, header, crud } from '@crud/crud'
import Vue from 'vue'
@ -68,7 +69,7 @@ export default {
})
]
},
mixins: [presenter(), header(), crud()],
mixins: [presenter(), header(), crud(), preLibraryCrud],
data() {
return {
scopeVisible: false,
@ -87,32 +88,6 @@ export default {
getRowKey(row) {
return row.id
},
filterData(data) {
return data.filter(node => {
if (node.children && node.children.length > 0) {
node.children = this.filterData(node.children) //
}
return node.isType !== 3 // isType3
})
},
//
findNode(tree, func) {
for (const node of tree) {
if (func(node)) return node
if (node.children) {
const res = this.findNode(node.children, func)
if (res) return res
}
}
return null
},
//
expandParents(node) {
node.expanded = true
if (node.parent) {
this.expandParents(node.parent)
}
},
[CRUD.HOOK.afterRefresh]() {
this.crud.data = this.filterData(this.crud.data)
this.$nextTick(() => {
@ -134,7 +109,7 @@ export default {
this.expandParents(this.$refs.tree2.getNode(selectedKey).parent)
}
//
this.handleNodeClick(selectedKey)
this.handleNodeClick2(selectedKey)
})
}
})

32
src/views/prearchiveLibrary/module/tree.json

@ -1,32 +0,0 @@
[
{
"id": 1,
"label": "档案门类",
"children": [
{
"id": 2,
"label": "文书档案",
"children": [
{
"id": 4,
"label": "文书档案(案卷)"
},
{
"id": 5,
"label": "文书档案(文件)"
}
]
},
{
"id": 3,
"label": "基建档案",
"children": [
{
"id": 6,
"label": "基建档案(项目)"
}
]
}
]
}
]
Loading…
Cancel
Save