Browse Source

归档/详情/回收站

master
xuhuajiao 1 year ago
parent
commit
b4b0840581
  1. 38
      src/api/collect/collect.js
  2. 4
      src/main.js
  3. 25
      src/views/archiveUtilize/archiveEditing/module/onlineEditing.vue
  4. 2
      src/views/collectReorganizi/collectionLibrary/anjuan/tableList.vue
  5. 6
      src/views/collectReorganizi/collectionLibrary/index.vue
  6. 2
      src/views/collectReorganizi/collectionLibrary/juannei/index.vue
  7. 1
      src/views/collectReorganizi/collectionLibrary/mixins/index.js
  8. 191
      src/views/collectReorganizi/collectionLibrary/module/archivesFilling/index.vue
  9. 28
      src/views/collectReorganizi/collectionLibrary/module/archivesInfo/index.vue
  10. 142
      src/views/collectReorganizi/collectionLibrary/module/collectHeader.vue
  11. 9
      src/views/collectReorganizi/collectionLibrary/module/fourTest/index.vue
  12. 4
      src/views/collectReorganizi/collectionLibrary/project/index.vue
  13. 3
      src/views/collectReorganizi/recycled/index.vue
  14. 108
      src/views/components/archivesDetail/project.vue
  15. 232
      src/views/components/archivesListModule/index.vue

38
src/api/collect/collect.js

@ -233,6 +233,40 @@ export function FetchFourCheck(data) {
}
// 归档
export function FetchBecomeDocumentConfirm(data) {
return request({
url: 'api/collect/becomeDocumentConfirm',
method: 'post',
data
})
}
// 彻底删除档案
export function FetchCompleteDelArchives(data) {
return request({
url: 'api/collect/completeDelArchives',
method: 'post',
data
})
}
// 恢复档案
export function FetchRestoreArchives(data) {
return request({
url: 'api/collect/restoreArchives',
method: 'post',
data
})
}
export function FetchBusinessFlowTitle(params) {
return request({
url: 'api/collect/getBusinessFlowTitle',
method: 'get',
params
})
}
export function FetchBecomeDocument(data) {
return request({
url: 'api/collect/becomeDocument',
@ -265,5 +299,9 @@ export default {
FetchReturnReDocument,
FetchPreFastToArchives,
FetchFourCheck,
FetchBecomeDocumentConfirm,
FetchCompleteDelArchives,
FetchRestoreArchives,
FetchBusinessFlowTitle,
FetchBecomeDocument
}

4
src/main.js

@ -28,6 +28,10 @@ import 'echarts-gl'
import uploader from 'vue-simple-uploader'
import ArchivesListModule from './views/components/archivesListModule/index'
Vue.component('ArchivesListModule', ArchivesListModule)
// 加载用户主题
if (localStorage.getItem('themeValue')) {
window.document.documentElement.setAttribute('data-theme', localStorage.getItem('themeValue'))

25
src/views/archiveUtilize/archiveEditing/module/onlineEditing.vue

@ -2,6 +2,11 @@
<div>
<div class="head-container">
<crudOperation />
<div class="online-right-handle">
<el-button size="mini"><i class="iconfont icon-shangchuan2" />附件上传</el-button>
<el-button size="mini"><i class="iconfont icon-fabu" />发布</el-button>
<el-button size="mini"><i class="iconfont icon-huifu" />取消发布</el-button>
</div>
</div>
<el-table
ref="table"
@ -14,14 +19,14 @@
<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 prop="username" label="档号" align="center" />
<el-table-column prop="description" label="题名" />
<el-table-column prop="browser" label="操作人" align="center" />
<el-table-column prop="username" label="文档名称" align="center" />
<el-table-column prop="browser" label="创建人" align="center" />
<el-table-column prop="createTime" label="加入时间" width="200">
<template slot-scope="scope">
<div>{{ scope.row.createTime | parseTime }}</div>
</template>
</el-table-column>
<el-table-column prop="username" label="状态" align="center" />
</el-table>
<pagination v-if="crud.data.length !== 0" />
@ -174,12 +179,16 @@ export default {
</script>
<style lang="scss" scoped>
::v-deep .el-checkbox-group{
.el-checkbox{
margin-right: 10px !important;
}
.head-container{
display: flex;
justify-content: space-between;
margin: 20px 0;
}
// ::v-deep .el-checkbox-group{
// .el-checkbox{
// margin-right: 10px !important;
// }
// }
::v-deep .el-pagination{
margin: 24px 0 10px 0 !important
}

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

@ -54,7 +54,7 @@
/>
</div>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" />
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" :is-title-type="isTitleType" />
</div>
</template>

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

@ -94,6 +94,10 @@ export default {
isRecycle: {
type: Boolean,
default: false
},
isdel: {
type: Boolean,
default: false
}
},
provide() {
@ -133,6 +137,8 @@ export default {
}
},
watch: {
isdel: function(newValue, oldValue) {
},
isRecycle: function(newValue, oldValue) {
}
},

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

@ -62,7 +62,7 @@
/>
</div>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" />
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" :is-title-type="isTitleType" />
<span class="closed-btn" @click="closeDrawer" />
</el-drawer>
</template>

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

@ -105,6 +105,7 @@ export const collectionLibraryCrud = {
'parentId': parentsId,
'categoryId': this.selectedCategory.id,
'categoryLevel': categoryLevel,
'isdel': this.parentsData.isdel,
'search': this.query.search,
'retention': this.smartQuery.retention,
'security_class': this.smartQuery.security_class,

191
src/views/collectReorganizi/collectionLibrary/module/archivesFilling/index.vue

@ -0,0 +1,191 @@
<template>
<!-- 归档审批 -->
<el-dialog class="detail-dialog" :visible.sync="archivesFillingVisible" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body title="流程详情" :before-close="handleCloseDialog" @opened="opened">
<div class="setting-dialog">
<div style="padding-top: 20px;">
<el-form ref="form" :model="form" inline :rules="rules" label-width="80px">
<el-row>
<el-form-item label="标题" prop="title">
<el-input v-model="form.title" style="width: 572px;" />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="全宗" prop="fondsNo">
<el-input v-model="form.fondsNo" disabled />
</el-form-item>
<el-form-item label="申请人" prop="applicant">
<el-input v-model="form.applicant" disabled />
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" type="textarea" :rows="3" style="width: 572px;" />
</el-form-item>
</el-row>
</el-form>
</div>
<div class="detail-tab tab-content">
<ul class="tab-nav">
<li :class="{'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">档案列表</li>
<!-- <li :class="{'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">任务列表</li>
<li :class="{'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">流程图</li> -->
</ul>
<div v-if="activeIndex == 0" class="double-click-btn"><i class="iconfont icon-zhuyi-lan" /><span>双击列表数据查看详情</span></div>
<!-- <component :is="comName" class="component-cont" /> -->
<ArchivesListModule v-if="activeIndex == 0" ref="archivesListModule" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" />
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleComfired">确定</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import { FetchFondsDetail } from '@/api/system/fonds'
import { mapGetters } from 'vuex'
import { FetchBusinessFlowTitle, FetchBecomeDocument } from '@/api/collect/collect'
import ArchivesListModule from '@/views/components/archivesListModule/index'
export default {
name: 'ArchivesFilling',
components: { ArchivesListModule },
props: {
selectedCategory: {
type: Object,
default: function() {
return {}
}
},
collectLevel: {
type: Number,
default: function() {
return null
}
},
selections: {
type: Array,
default: () => []
}
},
data() {
return {
archivesFillingVisible: false,
activeIndex: 0,
form: {
title: null,
username: null,
fondsNo: null,
remarks: null
},
rules: {
title: [
{ required: true, message: '标题不可为空', trigger: 'blur' }
]
}
}
},
computed: {
// comName: function() {
// if (this.activeIndex === 0) {
// return 'ArchivesListModule'
// } else if (this.activeIndex === 1) {
// return ''
// } else if (this.activeIndex === 2) {
// return ''
// }
// return 'ArchivesListModule'
// }
...mapGetters([
'user',
'baseApi'
])
},
mounted() {
},
methods: {
getFondsDetail() {
FetchFondsDetail({ id: this.user.fonds.id }).then((res) => {
this.form.fondsNo = res.fondsNo
if (res.fondsNo) {
this.getBusinessFlowTitle()
}
}).catch(err => {
console.log(err)
})
},
getBusinessFlowTitle() {
const params = {
'username': this.user.username,
'fondsNo': this.form.fondsNo
}
FetchBusinessFlowTitle(params).then((res) => {
if (res.code !== 500) {
console.log(res)
this.form.title = res
} else {
this.$message.error('失败')
}
}).catch(err => {
console.log(err)
})
},
handleComfired() {
this.$refs.form.validate((valid) => {
if (valid) {
const archivesIds = []
this.selections.forEach(val => {
archivesIds.push(val.id)
})
const params = {
'title': this.form.title,
'applicant': this.user.username,
'fondsNo': this.form.fondsNo,
'remarks': this.form.remarks,
'archivesIds': archivesIds,
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel
}
FetchBecomeDocument(params).then((res) => {
if (res.code !== 500) {
this.$message.success('归档操作提交成功')
this.archivesFillingVisible = false
this.handleSearch(this.collectLevel)
} else {
const message = JSON.parse(res.message)
this.$message.error(message.fail.join(',') + '归档操作提交失败')
}
}).catch(err => {
console.log(err)
})
}
})
},
changeActiveTab(data) {
this.activeIndex = data
if (this.activeIndex === 0) {
console.log(this.$refs.archivesListModule)
}
},
opened() {
if (this.activeIndex === 0) {
this.form.applicant = this.user.username
this.getFondsDetail()
this.$refs.archivesListModule.getViewTable()
}
},
handleCloseDialog() {
// this.form = {}
this.archivesFillingVisible = false
}
}
}
</script>
<style lang='scss' scoped>
.detail-dialog{
.detail-tab .tab-nav{
margin: 0 0 18px 0;
}
}
</style>

28
src/views/collectReorganizi/collectionLibrary/module/archivesInfo/index.vue

@ -7,7 +7,9 @@
<!-- tab -->
<ul class="tab-nav">
<li :class="{'active-tab-nav': archivesTabIndex == 0}" @click="changeActiveTab(0)">基本信息</li>
<li v-if="isHasFile" :class="{'active-tab-nav': archivesTabIndex == 1}" @click="changeActiveTab(1)">附件</li>
<li v-if="isHasFile" :class="{'active-tab-nav': archivesTabIndex == 1}" @click="changeActiveTab(1)">原文列表</li>
<li v-if="!isHasFile && isTitleType === 3" :class="{'active-tab-nav': archivesTabIndex == 5}" @click="changeActiveTab(5)">文件列表</li>
<li v-if="!isHasFile && isTitleType === 2" :class="{'active-tab-nav': archivesTabIndex == 5}" @click="changeActiveTab(5)">案卷列表</li>
<li :class="{'active-tab-nav': archivesTabIndex == 2}" @click="changeActiveTab(2)">元数据</li>
<li v-if="isFourTest" :class="{'active-tab-nav': archivesTabIndex == 3}" @click="changeActiveTab(3)">四性检测</li>
<li v-if="isFourTest && isHasFile" :class="{'active-tab-nav': archivesTabIndex == 4}" @click="changeActiveTab(4)">操作记录</li>
@ -31,8 +33,9 @@
</code>
</pre>
</div>
<FourTestInfo v-if="archivesTabIndex==3" />
<HandleInfo v-if="archivesTabIndex==4" />
<FourTestInfo v-if="archivesTabIndex===3" />
<HandleInfo v-if="archivesTabIndex===4" />
<ArchivesListModule v-show="archivesTabIndex===5" ref="archivesListModuleRef" :selected-category="selectedCategory" :is-title-type="isTitleType" />
</div>
</div>
</el-dialog>
@ -62,6 +65,10 @@ export default {
default: function() {
return ''
}
},
isTitleType: {
type: Number,
default: 2
}
},
data() {
@ -83,13 +90,11 @@ export default {
},
methods: {
getDetial(collectLevel, rowId) {
console.log(this.arcId)
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': collectLevel,
'id': rowId
}
console.log(params)
FetchDetailsById(params).then(data => {
this.archivesDetailsData = data.showFiled
.filter(field => field.fieldName in data.echo)
@ -106,23 +111,25 @@ export default {
'categoryLevel': collectLevel,
'archivesId': rowId
}
console.log('metaData', metaDataParams)
FetchArchivesMetadata(metaDataParams).then(data => {
this.archivesDetailsMetadata = data
})
},
setXml() {
const xmlstr = this.archivesDetailsMetadata
// console.log('xmlstr:', xmlstr)
// console.log('xmljson:', this.$x2js.xml2js(xmlstr))
// console.log('jsonxml:', this.$x2js.js2xml(this.$x2js.xml2js(xmlstr)))
// this.xml_show = vkbeautify.xml(xmlstr)
this.xml_show = this.showXml(xmlstr)
},
changeActiveTab(index) {
this.archivesTabIndex = index
if (this.archivesTabIndex === 2) {
this.setXml()
} else if (this.archivesTabIndex === 5) {
if (this.selectedCategory.arrangeType === 3) {
this.$refs.archivesListModuleRef.collectLevelList = 1
}
this.$refs.archivesListModuleRef.parentId = this.arcId
this.$refs.archivesListModuleRef.isDetail = true
this.$refs.archivesListModuleRef.getViewTable()
}
this.$nextTick(() => {
if (this.$refs.uploadFile) {
@ -134,6 +141,7 @@ export default {
// -
handleClose(done) {
this.archivesInfoVisible = false
localStorage.removeItem('collectLevelList')
done()
},
// xml

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

@ -196,33 +196,8 @@
<!-- 快速组卷 -->
<QuickPaper ref="quickPaperRef" :selected-category="selectedCategory" :arc-id="arcId" :collect-level="collectLevel" @close-dialog="closeDialog" />
<!-- 回收站 - 恢复 -->
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="recoverVisible">
<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="recoverVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleRecover">确定</el-button>
</div>
</div>
</el-dialog>
<!-- 回收站 - 彻底删除 -->
<el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="completelyDeleteVisible">
<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="completelyDeleteVisible = false">取消</el-button>
<el-button type="primary" @click.native="handleCompletelyDelete">确定</el-button>
</div>
</div>
</el-dialog>
<!-- 归档 -->
<ArchivesFilling ref="archivesFillingRef" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
</div>
<div style="height: 30px; line-height: 30px; padding: 0 20px; font-size: 12px;"> <span v-if="(isTitleType !== 2 && selectedCategory.arrangeType === 3 ) || ((isTitleType === 4 || isTitleType === 6) && selectedCategory.arrangeType === 2) || (isTitleType === 6 && selectedCategory.arrangeType === 1)">{{ test }}</span></div>
</div>
@ -232,7 +207,8 @@
import CRUD, { crud } from '@crud/crud'
import { collectionLibraryCrud } from '../mixins/index'
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile, FetchUpdateArchivesNo, FetchDisbandArchives, FetchReturnReDocument, FetchBecomeDocument } from '@/api/collect/collect'
// FetchBecomeDocumentConfirm
import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle, FetchDeleteArchivesFile, FetchUpdateArchivesNo, FetchDisbandArchives, FetchReturnReDocument, FetchCompleteDelArchives, FetchRestoreArchives } from '@/api/collect/collect'
import { FetchArchivesClassTree } from '@/api/system/archivesClass'
import { FetchDictionaryTree } from '@/api/system/dict'
import Treeselect from '@riophae/vue-treeselect'
@ -251,13 +227,14 @@ import CollectMoveFile from './collectMoveFile/index'
import Print from './print/index'
import FourTest from './fourTest/index'
import QuickPaper from './quickPaper/index'
import ArchivesFilling from './archivesFilling/index'
import qs from 'qs'
import { downloadFile, exportFile } from '@/utils/index'
import { mapGetters } from 'vuex'
export default {
name: 'CollectHeader',
components: { Treeselect, PreviewForm, UploadOriginal, BigUpload, BlukImport, BlukEditing, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper },
components: { Treeselect, PreviewForm, UploadOriginal, BigUpload, BlukImport, BlukEditing, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper, ArchivesFilling },
mixins: [collectionLibraryCrud, crud()],
props: {
selectedCategory: {
@ -856,32 +833,33 @@ export default {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
this.$confirm('此操作将会把所选条目提交归档' + '<span>你是否还要继续?</span>', '提示', {
confirmButtonText: '继续',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
const archivesIds = this.selections.map(item => item.id)
const params = {
'categoryId': this.selectedCategory.id,
'categoryLevel': this.collectLevel,
'archivesIds': archivesIds
}
console.log(params)
FetchBecomeDocument(params).then((res) => {
console.log(res)
this.$refs.archivesFillingRef.archivesFillingVisible = true
// this.$confirm('' + '<span></span>', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning',
// dangerouslyUseHTMLString: true
// }).then(() => {
// const archivesIds = this.selections.map(item => item.id)
// const params = {
// 'categoryId': this.selectedCategory.id,
// 'categoryLevel': this.collectLevel,
// 'archivesIds': archivesIds
// }
// console.log(params)
// FetchBecomeDocumentConfirm(params).then((res) => {
// console.log(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)
// this.crud.notify('', CRUD.NOTIFICATION_TYPE.ERROR)
// }
}).catch(err => {
console.log(err)
})
}).catch(() => {
})
// }).catch(err => {
// console.log(err)
// })
// }).catch(() => {
// })
},
// 退
handleReturn() {
@ -1029,10 +1007,34 @@ export default {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
this.recoverVisible = true
},
handleRecover() {
this.recoverVisible = 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
}
FetchRestoreArchives(params).then((res) => {
if (res.code !== 500) {
console.log(res)
this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
this.handleSearch(this.collectLevel)
} else {
this.crud.notify('回复所选档案失败', CRUD.NOTIFICATION_TYPE.ERROR)
}
}).catch(err => {
console.log(err)
})
}).catch(() => {
})
},
// -
toCompletelyDelete() {
@ -1040,10 +1042,34 @@ export default {
this.$message('您还未勾选需要操作的条目,请先确认!')
return false
}
this.completelyDeleteVisible = true
},
handleCompletelyDelete() {
this.completelyDeleteVisible = 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
}
FetchCompleteDelArchives(params).then((res) => {
if (res.code !== 500) {
this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
this.handleSearch(this.collectLevel)
} else {
this.crud.notify('删除所选档案失败', CRUD.NOTIFICATION_TYPE.ERROR)
}
}).catch(err => {
console.log(err)
})
}).catch(() => {
})
},
closeDialog(data) {
this.formVisible = false

9
src/views/collectReorganizi/collectionLibrary/module/fourTest/index.vue

@ -75,10 +75,17 @@ export default {
FetchFourCheck(params).then(res => {
console.log(res)
if (res.code !== 500) {
// if (res.result) {
this.$message({
message: '检测成功',
message: '检测成功' + res.success.length + '条数据, 检测失败' + res.fail.length + '条数据',
type: 'success'
})
// } else {
// this.$message({
// message: '' + res.fail.length + '',
// type: 'success'
// })
// }
} else {
this.$message({
message: '检测失败',

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

@ -55,7 +55,8 @@
/>
</div>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" />
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" :is-title-type="isTitleType" />
<!-- <ProjectDetail ref="projectDetail" :selected-category="selectedCategory" :arc-id="arcId" /> -->
</div>
</template>
@ -64,6 +65,7 @@ import { collectionLibraryCrud } from '../mixins/index'
import { header, form } from '@crud/crud'
import CollectHeader from '../module/collectHeader.vue'
import ArchivesInfo from '../module/archivesInfo/index'
// import ProjectDetail from '@/views/components/archivesDetail/project'
export default {
name: 'Project',

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

@ -1,6 +1,6 @@
<template>
<div>
<CollectModule :is-recycle="isRecycle" />
<CollectModule :is-recycle="isRecycle" :isdel="isdel" />
</div>
</template>
@ -12,6 +12,7 @@ export default {
components: { CollectModule },
data() {
return {
isdel: true,
isRecycle: true
}
},

108
src/views/components/archivesDetail/project.vue

@ -42,28 +42,40 @@
</el-col>
</el-row>
</div>
<!-- 附件 -->
<!-- <UploadFile v-if="archivesTabIndex==1" ref="uploadFile" class="item-content" :is-upload-detail="false" :category-id="categoryId" :arc-id="arcId" /> -->
<!-- <ArchivesList v-if="archivesTabIndex==1" ref="dialogList" class="item-content" :is-upload-detail="false" :category-id="categoryId" :arc-id="arcId" /> -->
<div v-if="archivesTabIndex==1">
<el-table
ref="table"
v-loading="tableLoading"
class="archives-table"
:data="tableData"
style="min-width: 100%"
height="500"
@row-click="clickRowHandler"
height="calc(100vh - 600px)"
highlight-current-row
style="width: 100%;"
:row-key="rowKey"
@cell-dblclick="tableDoubleClick"
@selection-change="selectionChangeHandler"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column prop="isType" label="所属表" align="center" />
<el-table-column prop="group" label="所属全宗" min-width="60" align="center" />
<el-table-column prop="category" label="门类名称" min-width="85" align="center" />
<el-table-column prop="number" label="档号" min-width="85" align="center" />
<el-table-column prop="title" label="题名" show-overflow-tooltip min-width="140" align="center" />
<el-table-column :label="selectedCategory.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>
<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>
<!-- @size-change="sizeChangeHandler($event)" @current-change="pageChangeHandler" -->
<el-pagination :page-size.sync="page.size" :total="page.total" :current-page.sync="page.page" style="margin-top: 8px;" layout="total, prev, pager, next, sizes" />
</div>
<!-- 元数据 -->
<div v-if="archivesTabIndex==2" class="metadata-cont item-content">
@ -85,8 +97,8 @@
<script>
import { form } from '@crud/crud'
import { FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList'
import AnjuanDetail from './anjuan.vue'
import { FetchDetailsById, FetchArchivesMetadata } from '@/api/collect/collect'
import AnjuanDetail from './anjuan'
export default {
name: 'ArchivesInfo',
components: { AnjuanDetail },
@ -94,10 +106,10 @@ export default {
form({})
],
props: {
categoryId: {
type: String,
selectedCategory: {
type: Object,
default: function() {
return ''
return {}
}
},
arcId: {
@ -105,6 +117,10 @@ export default {
default: function() {
return ''
}
},
isTitleType: {
type: Number,
default: 2
}
},
data() {
@ -156,49 +172,35 @@ export default {
mounted() {
},
methods: {
getDetial(rowId) {
getDetial(collectLevel, rowId) {
const params = {
// categoryId: this.categoryId,
categoryId: 'B073E8430B85B4821E7360',
// archivesId: rowId
archivesId: '2946C34412182B73FBC287'
}
FetchArchivesDetails(params).then(data => {
this.archivesDetailsData = data
// /
this.archivesDetailsData.forEach(item => {
if (item.fieldName === 'borrow_type') {
if (item.context === 1) {
item.context = '待登记'
} else if (item.context === 2) {
item.context = '待借阅'
} else if (item.context === 3) {
item.context = '待归还'
} else if (item.context === 4 || item.context === '' || item.context === null) {
item.context = '-'
} else if (item.context === -1) {
item.context = '在库'
}
'categoryId': this.selectedCategory.id,
'categoryLevel': collectLevel,
'id': rowId
}
FetchDetailsById(params).then(data => {
this.archivesDetailsData = data.showFiled
.filter(field => field.fieldName in data.echo)
.map(field => ({
editLength: field.editLength,
isLine: field.isLine,
fieldCnName: field.fieldCnName,
fieldName: field.fieldName,
context: data.echo[field.fieldName]
}))
})
// - tid/''
if (!this.isTidOrBorrow) {
const indexBorrow = this.archivesDetailsData.findIndex(item => item.fieldName === 'borrow_type')
const indexTid = this.archivesDetailsData.findIndex(item => item.fieldName === 'tid')
this.archivesDetailsData.splice(indexBorrow, 1)
this.archivesDetailsData.splice(indexTid, 1)
const metaDataParams = {
'categoryId': this.selectedCategory.id,
'categoryLevel': collectLevel,
'archivesId': rowId
}
})
FetchArchivesMetadata(params).then(data => {
console.log('metaData', metaDataParams)
FetchArchivesMetadata(metaDataParams).then(data => {
this.archivesDetailsMetadata = data
})
},
setXml() {
const xmlstr = this.archivesDetailsMetadata
// console.log('xmlstr:', xmlstr)
// console.log('xmljson:', this.$x2js.xml2js(xmlstr))
// console.log('jsonxml:', this.$x2js.js2xml(this.$x2js.xml2js(xmlstr)))
// this.xml_show = vkbeautify.xml(xmlstr)
this.xml_show = this.showXml(xmlstr)
},
changeActiveTab(index) {

232
src/views/components/archivesListModule/index.vue

@ -0,0 +1,232 @@
<template>
<div>
<el-table
ref="table"
v-loading="tableLoading"
class="archives-table"
:data="tableData"
height="calc(100vh - 600px)"
highlight-current-row
style="width: 100%;"
:row-key="rowKey"
@cell-dblclick="tableDoubleClick"
>
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column :label="selectedCategory.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>
<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>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" />
</div>
</template>
<script>
import ArchivesInfo from '@/views/collectReorganizi/collectionLibrary/module/archivesInfo/index'
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect'
export default {
name: 'ArchivesListModule',
components: { ArchivesInfo },
props: {
selectedCategory: {
type: Object,
default: function() {
return {}
}
},
collectLevel: {
type: Number,
default: function() {
return null
}
},
selections: {
type: Array,
default: () => []
},
isTitleType: {
type: Number,
default: 2
}
},
data() {
return {
tableLoading: false,
tableDisplayFields: [],
tableData: [],
arrySort: [],
arcId: null,
isDetail: false,
parentId: null,
setType: null,
rowType: null,
collectLevelList: null
}
},
watch: {
isTitleType: function(newValue, oldValue) {
console.log('newValue222', newValue)
}
},
mounted() {
},
methods: {
rowKey(row) {
return row.id
},
// table -
tableDoubleClick(row) {
console.log(row.id)
this.arcId = row.id
this.$nextTick(() => {
if (this.selectedCategory.arrangeType === 3) {
console.log('dddddddd', localStorage.getItem('collectLevelList'))
console.log('collectLevelList', this.collectLevelList)
localStorage.setItem('collectLevelList', this.collectLevelList)
//
this.isDetail = true
if (localStorage.getItem('collectLevelList') === '2') {
this.$refs.archivesInfo.isHasFile = false
this.$refs.archivesInfo.detailTitle = '案卷详情'
this.$refs.archivesInfo.isHasModuleFile = true
this.$refs.archivesInfo.parentId = row.id
this.$refs.archivesInfo.getDetial(2, row.id)
} else if (localStorage.getItem('collectLevelList') === '3') {
this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.isFourTest = true
this.$refs.archivesInfo.detailTitle = '卷内详情'
this.$refs.archivesInfo.parentId = row.id
this.$refs.archivesInfo.getDetial(3, row.id)
} else {
console.log('111')
}
} else if (this.selectedCategory.arrangeType === 2) {
//
this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.isFourTest = true
this.$refs.archivesInfo.detailTitle = '卷内详情'
this.$refs.archivesInfo.parentId = row.id
this.$refs.archivesInfo.getDetial(3, row.id)
} else {
//
this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.isHasModuleFile = false
this.$refs.archivesInfo.detailTitle = '文件详情'
this.$refs.archivesInfo.parentId = row.id
this.$refs.archivesInfo.getDetial(3, row.id)
}
this.$refs.archivesInfo.isFourTest = true
this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0
})
},
getViewTable() {
this.tableData = []
this.tableLoading = true
let params
let collectLevel
if (this.isDetail) {
if (this.selectedCategory.arrangeType === 3) {
console.log('ttt', localStorage.getItem('collectLevelList'))
console.log('ggg', this.collectLevelList)
if (localStorage.getItem('collectLevelList') === '2') {
collectLevel = 3
} else if (localStorage.getItem('collectLevelList') === '3') {
collectLevel = 4
} else {
collectLevel = 2
}
console.log(collectLevel)
} else if (this.selectedCategory.arrangeType === 2) {
collectLevel = 3
} else {
collectLevel = 4
}
params = {
categoryId: this.selectedCategory.id,
categoryLevel: collectLevel
}
} else {
params = {
categoryId: this.selectedCategory.id,
categoryLevel: this.collectLevel
}
}
FetchInitCategoryViewTable(params).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)
}
})
if (this.isDetail) {
this.getViewTableList()
} else {
this.tableData = this.selections
this.tableLoading = false
}
}
})
},
getViewTableList() {
let collectLevel
if (this.selectedCategory.arrangeType === 3) {
console.log('rrr', localStorage.getItem('collectLevelList'))
if (localStorage.getItem('collectLevelList') === '2') {
collectLevel = 3
} else if (localStorage.getItem('collectLevelList') === '3') {
collectLevel = 4
} else {
collectLevel = 2
}
} else if (this.selectedCategory.arrangeType === 2) {
collectLevel = 3
} else {
collectLevel = 4
}
const params = {
'parentId': this.parentId,
'categoryId': this.selectedCategory.id,
'categoryLevel': collectLevel,
'page': 0,
'size': 100,
'sort': this.arrySort
}
FetchInitCategoryView(params).then((res) => {
if (res.code !== 500) {
this.tableData = res.list.content
this.collectLevelList = res.categoryLevel
}
this.tableLoading = false
})
}
}
}
</script>
<style lang='scss' scoped>
@import "~@/assets/styles/collect-reorganizi.scss";
</style>
Loading…
Cancel
Save