Browse Source

预归档api

master
xuhuajiao 1 year ago
parent
commit
540af2bc23
  1. 52
      src/api/prearchiveLibrary/prearchiveLibrary.js
  2. 5
      src/components/Crud/crud.js
  3. 21
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  4. 151
      src/views/collectReorganizi/collectionLibrary/module/fileSeqAdjustment/index.vue
  5. 27
      src/views/components/category/PreviewForm.vue
  6. 196
      src/views/prearchiveLibrary/index.vue
  7. 19
      src/views/prearchiveLibrary/module/form.vue
  8. 46
      src/views/prearchiveLibrary/table.json
  9. 109
      src/views/prearchiveLibrary/treeList.vue
  10. 8
      src/views/system/fileLibraryManage/index.vue

52
src/api/prearchiveLibrary/prearchiveLibrary.js

@ -0,0 +1,52 @@
import request from '@/utils/request'
import qs from 'qs'
export function FetchInitPreDocument(params) {
return request({
url: 'api/re-document/initPreDocument' + '?' + qs.stringify(params, { indices: false }),
method: 'get'
})
}
export function FetchInitDocumentsViewTable(params) {
return request({
url: 'api/re-document/initDocumentsViewTable',
method: 'get',
params
})
}
export function add(data) {
return request({
url: 'api/re-document/editDocument',
method: 'post',
data
})
}
export function edit(data) {
return request({
url: 'api/re-document/editDocument',
method: 'post',
data
})
}
export function del(ids) {
const params = { id: ids[0] }
return request({
url: 'api/re-document/deleteDocument',
method: 'delete',
params
})
}
export function FetchDoeditDocument(params) {
return request({
url: 'api/re-document/doeditDocument',
method: 'get',
params
})
}
export default { add, edit, del, FetchInitPreDocument, FetchInitDocumentsViewTable, FetchDoeditDocument }

5
src/components/Crud/crud.js

@ -139,8 +139,13 @@ function CRUD(options) {
table.store.states.treeData = {} table.store.states.treeData = {}
table.store.states.lazyTreeNodeMap = {} table.store.states.lazyTreeNodeMap = {}
} }
if (Array.isArray(data)) {
crud.page.total = data.totalElements !== null ? data.totalElements : data.length crud.page.total = data.totalElements !== null ? data.totalElements : data.length
crud.data = data.content ? data.content : data crud.data = data.content ? data.content : data
} else {
crud.page.total = data.list.totalElements
crud.data = data.list.content
}
crud.resetDataStatus() crud.resetDataStatus()
// time 毫秒后显示表格 // time 毫秒后显示表格
setTimeout(() => { setTimeout(() => {

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

@ -43,6 +43,7 @@
<el-menu-item v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1)" index="2-4" @click="handleFileNumberUpdate">档号更新</el-menu-item> <el-menu-item v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1)" index="2-4" @click="handleFileNumberUpdate">档号更新</el-menu-item>
<!-- 案卷 --> <!-- 案卷 -->
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-5" @click="handleFileNumberUpdate">卷内档号更新</el-menu-item> <el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-5" @click="handleFileNumberUpdate">卷内档号更新</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-12" @click="handleFileSeqAdjustment">卷内顺序调整</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1" index="2-6" @click="handleUncoil">拆卷</el-menu-item> <el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1" index="2-6" @click="handleUncoil">拆卷</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1" index="2-7" @click="handleCombineFile">合卷</el-menu-item> <el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1" index="2-7" @click="handleCombineFile">合卷</el-menu-item>
<el-menu-item v-if="isTitleType === 3 && selectedCategory.arrangeType !== 1" index="2-8" @click="handleInsertFile">插件</el-menu-item> <el-menu-item v-if="isTitleType === 3 && selectedCategory.arrangeType !== 1" index="2-8" @click="handleInsertFile">插件</el-menu-item>
@ -148,6 +149,9 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 卷内顺序调整 -->
<FileSeqAdjustment ref="fileSeqAdjustmentRef" :selected-category="selectedCategory" />
<!-- 拆卷 --> <!-- 拆卷 -->
<el-dialog class="tip-dialog" title="拆卷" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="uncoilVisible"> <el-dialog class="tip-dialog" title="拆卷" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="uncoilVisible">
<div class="setting-dialog"> <div class="setting-dialog">
@ -270,6 +274,7 @@ import UploadOriginal from './uploadOriginal/index'
import BlukImport from './bulkImport/index' import BlukImport from './bulkImport/index'
import BlukEditing from './blukEditing/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 CombineFile from './combineFile/index'
import InsertFile from './insertFile/index' import InsertFile from './insertFile/index'
import CollectMoveFile from './collectMoveFile/index' import CollectMoveFile from './collectMoveFile/index'
@ -280,7 +285,7 @@ import QuickPaper from './quickPaper/index'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name: 'CollectHeader', name: 'CollectHeader',
components: { PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileNumberAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper },
components: { PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileNumberAdjustment, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper },
mixins: [], mixins: [],
props: { props: {
selectedCategory: { selectedCategory: {
@ -465,7 +470,7 @@ export default {
return false return false
} }
if (this.selections.length > 1) { if (this.selections.length > 1) {
this.$message('编辑操作只可勾选唯一目标条目,请先确认!')
this.$message('上传操作只可勾选唯一目标条目,请先确认!')
return false return false
} }
} }
@ -513,6 +518,18 @@ export default {
handleUpdateConfirm() { handleUpdateConfirm() {
this.updateVisible = false this.updateVisible = false
}, },
//
handleFileSeqAdjustment() {
if (this.selections.length === 0) {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
if (this.selections.length > 1) {
this.$message('顺序调整操作只可勾选唯一目标条目,请先确认!')
return false
}
this.$refs.fileSeqAdjustmentRef.adjustmentVisible = true
},
// //
handleUncoil() { handleUncoil() {
if (this.selections.length === 0) { if (this.selections.length === 0) {

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

@ -0,0 +1,151 @@
<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">
<div class="setting-dialog">
<div class="base-info">
<p>案卷档号YXK-2022-JJ-001</p>
<p>案卷题名案卷名称123</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>
<div slot="footer" class="dialog-footer">
<el-button @click="adjustmentVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleSort">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import Sortable from 'sortablejs'
export default {
name: 'FileSeqAdjustment',
components: { },
mixins: [],
props: {
selectedCategory: {
type: Object,
default: function() {
return {}
}
}
},
data() {
return {
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
}
]
}
},
watch: {
selectedCategory: function(newValue, oldValue) {
}
},
created() {
},
mounted() {
},
methods: {
//
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
that[targetName].splice(newIndex, 0, that[targetName].splice(oldIndex, 1)[0])
}
})
},
opened() {
this.rowDrop('category-sort', 'sortTableData')
},
handleSort() {
const data = this.sortTableData.map((value, index) => {
return { id: value.id, sort: index + 1 }
})
this.sortTableData.forEach((item, index) => {
item.categorySeq = index + 1
})
console.log(data)
// sort(data).then(() => {
// this.sortVisible = false
// this.$message({
// message: '',
// type: 'success',
// duration: 2500
// })
// this.$emit('treeNodeSort', this.sortTableData)
// })
}
}
}
</script>
<style lang='scss' scoped>
.adjust-dialog{
::v-deep .el-dialog{
width: 815px;
.el-dialog__body{
padding: 16px 0 30px 0;
}
}
}
.base-info{
display: flex;
justify-content: space-between;
color: #0c0e1e;
padding: 0 20px 30px 20px;
p{
flex: 1;
}
}
.drag-tip {
display: block;
padding-left: 20px;
padding-bottom: 10px;
font-style: normal;
font-weight: bold;
font-size: 12px;
}
</style>

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

@ -45,14 +45,16 @@
</el-col> </el-col>
</draggable> </draggable>
</el-row> </el-row>
<el-row v-if="!isHasCode" class="preview-form-bottom">
<el-row v-if="!isHasCode && isDesFormType !== 'prearchiveLibrary'" class="preview-form-bottom">
<el-col v-for="(item,index) in formPreviewData.slice(formPreviewData.length-1,formPreviewData.length)" :key="'barcode'+index"> <el-col v-for="(item,index) in formPreviewData.slice(formPreviewData.length-1,formPreviewData.length)" :key="'barcode'+index">
<el-form-item :label="item.fieldCnName" :prop="item.fieldName"> <el-form-item :label="item.fieldCnName" :prop="item.fieldName">
<el-input v-model="addOrUpdateForm[item.fieldName]" type="text" style="width: 510px" :disabled="isDisabled" :validate-event="!isDisabled" @keyup.enter.native="isRepeatHandle(item)" @blur="isRepeatHandle(item)" /> <el-input v-model="addOrUpdateForm[item.fieldName]" type="text" style="width: 510px" :disabled="isDisabled" :validate-event="!isDisabled" @keyup.enter.native="isRepeatHandle(item)" @blur="isRepeatHandle(item)" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row v-if="isDesFormType === 'prearchiveLibrary'" class="preview-form-bottom">
<el-col class="upload-wm"> <el-col class="upload-wm">
<el-form-item label="电子原件" :prop="fileOriginal">
<el-form-item label="电子原件" prop="fileOriginal">
<el-input v-model="fileOriginal" type="text" style="width: 420px" /> <el-input v-model="fileOriginal" type="text" style="width: 420px" />
<el-upload <el-upload
class="upload-btn" class="upload-btn"
@ -89,6 +91,7 @@
<script> <script>
import { crud } from '@crud/crud' import { crud } from '@crud/crud'
import { edit, FetchDoeditIsRepeat } from '@/api/archivesManage/archivesList' import { edit, FetchDoeditIsRepeat } from '@/api/archivesManage/archivesList'
import { prearchEdit } from '@/api/prearchiveLibrary/prearchiveLibrary'
import { getNoFormatField } from '@/api/system/category/fileNoFormat' import { getNoFormatField } from '@/api/system/category/fileNoFormat'
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
@ -387,6 +390,7 @@ export default {
// //
editFormRow() { editFormRow() {
this.rules = {} this.rules = {}
console.log(this.formPreviewData)
this.formPreviewData.map(item => { this.formPreviewData.map(item => {
if (item.isInputClass === 'select') { if (item.isInputClass === 'select') {
this.$set(item, 'options', []) this.$set(item, 'options', [])
@ -450,6 +454,24 @@ export default {
delete this.addOrUpdateForm.id delete this.addOrUpdateForm.id
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
if (this.isDesFormType === 'prearchiveLibrary') {
const params = {
'id': null,
'documentId': categoryId,
'delMan': null,
'fileJsonString': JSON.stringify(this.addOrUpdateForm)
}
console.log(this.addOrUpdateForm)
prearchEdit(params).then(res => {
if (res) {
this.$message.success(res)
this.$emit('emitTableList')
this.crud.refresh()
localStorage.setItem('isForm', true)
localStorage.removeItem('isDelt')
}
})
} else {
const params = { const params = {
'id': this.arcId, 'id': this.arcId,
'categoryId': categoryId, 'categoryId': categoryId,
@ -466,6 +488,7 @@ export default {
localStorage.removeItem('isDelt') localStorage.removeItem('isDelt')
} }
}) })
}
} else { } else {
console.log('error submit!!') console.log('error submit!!')
return false return false

196
src/views/prearchiveLibrary/index.vue

@ -3,30 +3,14 @@
<!-- 门类列表 --> <!-- 门类列表 -->
<div class="container-main"> <div class="container-main">
<div class="elect-cont-left"> <div class="elect-cont-left">
<div class="container-left">
<span class="right-top-line" />
<span class="left-bottom-line" />
<!--门类树状结构-->
<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">
<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="iconFile">
{{ data.cnName }}
</span>
</span>
</el-tree>
</div>
</div>
<TreeList @nodeClick="handleNodeClick" />
</div> </div>
<div class="elect-cont-right"> <div class="elect-cont-right">
<!--工具栏--> <!--工具栏-->
<div class="head-container"> <div class="head-container">
<div class="head-search"> <div class="head-search">
<!-- 搜索 --> <!-- 搜索 -->
<el-input v-model="query.name" 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 /> <rrOperation />
</div> </div>
<crudOperation :permission="permission"> <crudOperation :permission="permission">
@ -55,21 +39,27 @@
<el-table <el-table
ref="table" ref="table"
v-loading="crud.loading" v-loading="crud.loading"
:data="table"
:data="crud.table"
@select="crud.selectChange" @select="crud.selectChange"
@select-all="crud.selectAllChange" @select-all="crud.selectAllChange"
@selection-change="crud.selectionChangeHandler" @selection-change="crud.selectionChangeHandler"
> >
<el-table-column type="selection" align="center" width="55" /> <el-table-column type="selection" align="center" width="55" />
<el-table-column type="index" label="份号" align="center" width="55" />
<el-table-column label="标题" prop="title" :show-overflow-tooltip="true" width="200" />
<el-table-column label="发文字号" prop="number" />
<el-table-column label="成文日期" prop="date" />
<el-table-column label="机构或问题" prop="problem" />
<el-table-column label="公文标识" prop="officialIdent" />
<el-table-column label="文种" prop="recordType" />
<el-table-column label="密级" prop="seClassification" />
<el-table-column label="保管期限" prop="period" />
<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-table>
<!--分页组件--> <!--分页组件-->
<pagination v-if="crud.data.length !== 0" /> <pagination v-if="crud.data.length !== 0" />
@ -125,26 +115,25 @@
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 } from '@/api/system/category/category' import { FetchCategoryMenu } from '@/api/system/category/category'
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'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import Treeselect from '@riophae/vue-treeselect' import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css' import '@riophae/vue-treeselect/dist/vue-treeselect.css'
// import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import tableJson from './table.json'
import TreeList from './treeList'
import eForm from './module/form' import eForm from './module/form'
import batchFile from './module/batchFile' import batchFile from './module/batchFile'
import moveFile from './module/moveFile' import moveFile from './module/moveFile'
import Vue from 'vue'
export default { export default {
name: 'PrearchiveLibrary', name: 'PrearchiveLibrary',
components: { eForm, batchFile, moveFile, Treeselect, rrOperation, crudOperation, pagination },
components: { TreeList, eForm, batchFile, moveFile, Treeselect, rrOperation, crudOperation, pagination },
cruds() { cruds() {
return [ return [
CRUD({ CRUD({
title: '预归档库', url: 'api/document/menu',
crudMethod: { },
title: '预归档库', url: 'api/re-document/initPreDocument',
crudMethod: { ...PrearchiveCrud },
optShow: { optShow: {
add: false, add: false,
edit: false, edit: false,
@ -152,7 +141,8 @@ export default {
download: true, download: true,
group: false, group: false,
reset: true reset: true
}
},
queryOnPresenterCreated: false
}) })
] ]
}, },
@ -165,11 +155,10 @@ export default {
del: ['admin', 'prearchiveLibrary:del'], del: ['admin', 'prearchiveLibrary:del'],
sort: ['admin', 'prearchiveLibrary:sort'] sort: ['admin', 'prearchiveLibrary:sort']
}, },
defaultProps: {
children: 'children',
label: 'cnName'
},
table: [],
tableDisplayFields: [], // table-list-title
arrySort: [],
selectedDocument: {},
formPreviewData: [],
deleteVisible: false, deleteVisible: false,
mergeVisible: false, mergeVisible: false,
categoryTree: [], categoryTree: [],
@ -185,68 +174,55 @@ export default {
computed: { computed: {
}, },
created() { created() {
this.table = tableJson
}, },
methods: { methods: {
[CRUD.HOOK.beforeToAdd](crud, form, btn) {
[CRUD.HOOK.beforeRefresh]() {
this.crud.query.documentId = this.selectedDocument.id
this.crud.query.sort = this.arrySort
}, },
[CRUD.HOOK.afterRefresh]() {
this.crud.data = this.filterData(this.crud.data)
let currentKey
if (localStorage.getItem('documentCategoryKey')) {
currentKey = JSON.parse(localStorage.getItem('documentCategoryKey'))
} else {
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]
}
handleNodeClick(data) {
this.selectedDocument = data
this.getInitDocumentsViewTable()
},
getInitDocumentsViewTable() {
PrearchiveCrud.FetchInitDocumentsViewTable({ documentId: this.selectedDocument.id }).then(data => {
if (data) {
this.arrySort = []
this.tableDisplayFields = data
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.$refs.tree.setCurrentKey(currentKey.id)
})
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.tableDisplayFields.length !== 0) {
this.crud.toQuery()
} }
//
this.handleNodeClick(selectedKey)
}) })
},
//
handleNodeClick(val) {
if (val) {
this.crud.selectionChangeHandler([val])
this.$refs.eform.pid = val.id
this.selectedCategory = val
if (val.pid !== '0') {
Vue.set(this.selectedCategory, 'parentName', this.$refs.tree.getNode(val.pid).data.cnName)
}
//
localStorage.setItem('documentCategoryKey', JSON.stringify(val))
// if (this.$refs.tree.getNode(val.pid) && this.$refs.tree.getNode(val.pid).childNodes) {
// this.brotherNodeNum = this.$refs.tree.getNode(val.pid).childNodes.length
// }
} }
})
}, },
// -form/-api // -form/-api
handleForm(type) { handleForm(type) {
this.mergeVisible = false this.mergeVisible = false
this.$refs.eform.formVisible = true
this.$refs.eform.selectedCategory = this.selectedDocument
let params
if (type === 'add') { if (type === 'add') {
this.$refs.eform.formTitle = '新增文件' this.$refs.eform.formTitle = '新增文件'
params = {
documentId: this.selectedDocument.id,
archivesId: null
}
} else if (type === 'edit') { } else if (type === 'edit') {
this.$refs.eform.formTitle = '编辑文件' this.$refs.eform.formTitle = '编辑文件'
params = {
documentId: this.selectedDocument.id,
archivesId: this.crud.selections[0].id
} }
//
const params = {
categoryId: this.categoryId,
archivesId: this.arcId
} }
this.getFormInfo(params, type)
this.getFormInfo(params)
}, },
// //
toDelete(data) { toDelete(data) {
@ -272,34 +248,36 @@ export default {
// this.crud.refresh() // this.crud.refresh()
// }) // })
}, },
getFormInfo(params, type, isAnOrJuan) {
// FetchFormDisplayFields(params).then(data => {
// this.formPreviewData = data.showFiled
// this.$nextTick(() => {
getFormInfo(params) {
PrearchiveCrud.FetchDoeditDocument(params).then(data => {
const showFiledAll = data.showFiled.filter(item => item.displayOrder).sort((a, b) => a.displayOrder - b.displayOrder)
this.$nextTick(() => {
this.$refs.eform.formPreviewData = showFiledAll
this.$refs.eform.formVisible = true
// if (type === 'edit') { // if (type === 'edit') {
// this.$refs.previewForm.addOrUpdateForm = data.echo // this.$refs.previewForm.addOrUpdateForm = data.echo
// } else { // } else {
// if (this.recycleMain.selectedCategory.isType !== 5) {
// //
// this.formPreviewData.forEach(item => {
// if (isAnOrJuan === 1) {
// if (this.recycleMain.selectedCategory.isType !== 3) {
// if (this.recycleMain.projectSelection[item.fieldName]) {
// this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.projectSelection))
// }
// }
// } else if (isAnOrJuan === 2) {
// if (this.recycleMain.anjuanSelection[item.fieldName]) {
// this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.anjuanSelection))
// }
// }
// })
// }
// // if (this.recycleMain.selectedDocument.isType !== 5) {
// // //
// // this.formPreviewData.forEach(item => {
// // if (isAnOrJuan === 1) {
// // if (this.recycleMain.selectedDocument.isType !== 3) {
// // if (this.recycleMain.projectSelection[item.fieldName]) {
// // this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.projectSelection))
// // }
// // }
// // } else if (isAnOrJuan === 2) {
// // if (this.recycleMain.anjuanSelection[item.fieldName]) {
// // this.$refs.previewForm.addOrUpdateForm = JSON.parse(JSON.stringify(this.recycleMain.anjuanSelection))
// // }
// // }
// // })
// // }
// } // }
// this.isDesFormType = 'arcives' // this.isDesFormType = 'arcives'
// this.$refs.previewForm.FetchNoFormatField(this.categoryId) // this.$refs.previewForm.FetchNoFormatField(this.categoryId)
// })
// })
})
})
}, },
handleBatch() { handleBatch() {
this.$refs.batchForm.batchVisible = true this.$refs.batchForm.batchVisible = true
@ -339,10 +317,4 @@ export default {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
[data-theme=dark] .elect-cont-left .container-left {
min-height: calc(100vh - 158px);
}
.tree-scroll{
font-size: 14px;
}
</style> </style>

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

@ -10,7 +10,7 @@
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<!-- :loading="crud.status.cu === 2" --> <!-- :loading="crud.status.cu === 2" -->
<el-button type="text" @click="formVisible = false">取消</el-button> <el-button type="text" @click="formVisible = false">取消</el-button>
<el-button type="primary" @click="formVisible = false">确定</el-button>
<el-button type="primary" @click="handlerArchivesSubmit">确定</el-button>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
@ -18,7 +18,8 @@
<script> <script>
import PreviewForm from '@/views/components/category/PreviewForm' import PreviewForm from '@/views/components/category/PreviewForm'
import addJson from '../add.json'
// import { add, edit } from '@/api/prearchiveLibrary/prearchiveLibrary'
// import addJson from '../add.json'
export default { export default {
components: { PreviewForm }, components: { PreviewForm },
data() { data() {
@ -30,20 +31,24 @@ export default {
selectedCategory: null, selectedCategory: null,
parentsId: null, parentsId: null,
arcId: null, arcId: null,
isDesFormType: 'arcives',
isDisabled: true,
isDesFormType: 'prearchiveLibrary',
isDisabled: false,
isHasCode: false isHasCode: false
} }
}, },
created() { created() {
this.formPreviewData = addJson
// this.formPreviewData = addJson
}, },
methods: { methods: {
handleClose(done) { handleClose(done) {
done() done()
this.formVisible = false this.formVisible = false
}, },
save() {
handlerArchivesSubmit() {
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id)
this.selections = []
}
// save() {
// this.loading = true // this.loading = true
// if (this.title === '') { // if (this.title === '') {
// const addData = this.formData.fields.map((item) => { // const addData = this.formData.fields.map((item) => {
@ -77,7 +82,7 @@ export default {
// this.$emit('refresh') // this.$emit('refresh')
// }) // })
// } // }
}
// }
} }
} }
</script> </script>

46
src/views/prearchiveLibrary/table.json

@ -1,46 +0,0 @@
[
{
"id": 1,
"title": "归档文件标题1",
"number": "[2020] 1号",
"date": "2020-10-01",
"problem": "档案室",
"officialIdent": "-",
"recordType": "决议",
"seClassification": "机密",
"period": "永久"
},
{
"id": 2,
"title": "归档文件标题2",
"number": "[2020] 2号",
"date": "2020-10-01",
"problem": "档案室",
"officialIdent": "-",
"recordType": "决议",
"seClassification": "机密",
"period": "永久"
},
{
"id": 3,
"title": "归档文件标题3",
"number": "[2020] 3号",
"date": "2020-10-01",
"problem": "档案室",
"officialIdent": "-",
"recordType": "决议",
"seClassification": "机密",
"period": "永久"
},
{
"id": 4,
"title": "归档文件标题4",
"number": "[2020] 4号",
"date": "2020-10-01",
"problem": "档案室",
"officialIdent": "-",
"recordType": "决议",
"seClassification": "机密",
"period": "永久"
}
]

109
src/views/prearchiveLibrary/treeList.vue

@ -0,0 +1,109 @@
<template>
<div class="container-left">
<span class="right-top-line" />
<span class="left-bottom-line" />
<!--门类树状结构-->
<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">
<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="iconFile">
{{ data.cnName }}
</span>
</span>
</el-tree>
</div>
</div>
</template>
<script>
import CRUD, { presenter, header } from '@crud/crud'
import { preLibraryCrud } from './mixins/index'
export default {
name: 'PrearchiveTree',
components: { },
cruds() {
return [
CRUD({
title: '预归档库', url: 'api/document/menu',
crudMethod: { },
optShow: {
add: false,
edit: false,
del: false,
download: true,
group: false,
reset: true
}
})
]
},
mixins: [presenter(), header(), preLibraryCrud],
data() {
return {
permission: {
add: ['admin', 'prearchiveLibrary:add'],
edit: ['admin', 'prearchiveLibrary:edit'],
del: ['admin', 'prearchiveLibrary:del'],
sort: ['admin', 'prearchiveLibrary:sort']
},
defaultProps: {
children: 'children',
label: 'cnName'
}
}
},
computed: {
},
created() {
},
methods: {
[CRUD.HOOK.beforeToAdd](crud, form, btn) {
},
[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
})
} else {
currentKey = this.crud.data[0]
}
//
this.$refs.tree.setCurrentKey(currentKey.id)
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)
}
//
this.handleNodeClick(selectedKey)
})
})
},
//
handleNodeClick(val) {
if (val) {
this.$emit('nodeClick', val)
}
}
}
}
</script>
<style lang='scss' scoped>
[data-theme=dark] .elect-cont-left .container-left {
min-height: calc(100vh - 158px);
}
.tree-scroll{
font-size: 14px;
}
</style>

8
src/views/system/fileLibraryManage/index.vue

@ -52,10 +52,10 @@
<span class="left-bottom-line" /> <span class="left-bottom-line" />
<ul class="tab-nav"> <ul class="tab-nav">
<li :class="{'active-tab-nav': activeIndex == 0}" @click="changeActiveTab(0)">基本信息<i /></li> <li :class="{'active-tab-nav': activeIndex == 0}" @click="changeActiveTab(0)">基本信息<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 1}" @click="changeActiveTab(1)">字段管理<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 2}" @click="changeActiveTab(2)">著录界面设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 3}" @click="changeActiveTab(3)">列表界面设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3" :class="{'active-tab-nav': activeIndex == 4}" @click="changeActiveTab(4)">排序规则设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3 && selectedCategory.cnName !== '电子原文表'" :class="{'active-tab-nav': activeIndex == 1}" @click="changeActiveTab(1)">字段管理<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3 && selectedCategory.cnName !== '电子原文表'" :class="{'active-tab-nav': activeIndex == 2}" @click="changeActiveTab(2)">著录界面设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3 && selectedCategory.cnName !== '电子原文表'" :class="{'active-tab-nav': activeIndex == 3}" @click="changeActiveTab(3)">列表界面设置<i /></li>
<li v-if="selectedCategory.isType && selectedCategory.isType === 3 && selectedCategory.cnName !== '电子原文表'" :class="{'active-tab-nav': activeIndex == 4}" @click="changeActiveTab(4)">排序规则设置<i /></li>
<!-- 最右侧装饰img --> <!-- 最右侧装饰img -->
<span class="tab-right-img" /> <span class="tab-right-img" />
</ul> </ul>

Loading…
Cancel
Save