21 changed files with 3746 additions and 191 deletions
-
13src/assets/styles/archives-manage.scss
-
135src/views/archiveKeeping/inStorage/index.vue
-
48src/views/archiveKeeping/inStorage/pendingInArchive/anjuan/content.vue
-
71src/views/archiveKeeping/inStorage/pendingInArchive/anjuan/index.vue
-
282src/views/archiveKeeping/inStorage/pendingInArchive/anjuan/tableList.vue
-
251src/views/archiveKeeping/inStorage/pendingInArchive/file/index.vue
-
22src/views/archiveKeeping/inStorage/pendingInArchive/index.vue
-
246src/views/archiveKeeping/inStorage/pendingInArchive/juannei/index.vue
-
324src/views/archiveKeeping/inStorage/pendingInArchive/mixins/index.js
-
292src/views/archiveKeeping/inStorage/pendingInArchive/module/archivesInfo/index.vue
-
367src/views/archiveKeeping/inStorage/pendingInArchive/module/collectHeader.vue
-
119src/views/archiveKeeping/inStorage/pendingInArchive/module/fourTestInfo/index.vue
-
81src/views/archiveKeeping/inStorage/pendingInArchive/module/handleInfo/index.vue
-
363src/views/archiveKeeping/inStorage/pendingInArchive/module/uploadFile/index.vue
-
195src/views/archiveKeeping/inStorage/pendingInArchive/project/index.vue
-
157src/views/archiveKeeping/inStorage/pendingInCase/index.vue
-
366src/views/archiveKeeping/inStorage/pendingInCase/module/inDialog.vue
-
437src/views/archiveKeeping/inventoryCheck/index.vue
-
9src/views/archiveKeeping/outStorage/index.vue
-
9src/views/archiveKeeping/storageLog/index.vue
-
2src/views/archivesManage/managementLibrary/anjuan/tableList.vue
@ -0,0 +1,48 @@ |
|||
<template> |
|||
<TableListMoudle ref="tableList" :is-title-type="isTitleType" :storage-category="storageCategory" :test="test" :smart-query="smartQuery" :storage-type="storageType" /> |
|||
</template> |
|||
|
|||
<script> |
|||
import TableListMoudle from './tableList' |
|||
export default { |
|||
name: 'AnjuanContent', |
|||
components: { TableListMoudle }, |
|||
props: { |
|||
data: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
storageCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
smartQuery: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
storageType: { |
|||
type: String, |
|||
default: 'in' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
isTitleType: 3, |
|||
test: '' |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
</style> |
|||
@ -0,0 +1,71 @@ |
|||
<template> |
|||
<div> |
|||
<AnjuanContent v-if="storageCategory.arrangeType === 1 || storageCategory.arrangeType === 2" ref="ajContent" class="ajContent" :storage-category="storageCategory" :smart-query="smartQuery" :storage-type="storageType" /> |
|||
<el-drawer |
|||
v-else |
|||
class="anjuan-drawer storage-drawer" |
|||
:with-header="false" |
|||
:visible.sync="anjuanDrawer" |
|||
:modal="false" |
|||
:wrapper-closable="true" |
|||
:show-close="false" |
|||
direction="rtl" |
|||
size="90%" |
|||
> |
|||
<AnjuanContent ref="ajContent" :storage-category="storageCategory" :smart-query="smartQuery" :storage-type="storageType" /> |
|||
<span class="closed-btn" @click="closeDrawer" /> |
|||
</el-drawer> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import AnjuanContent from './content' |
|||
export default { |
|||
name: 'Anjuan', |
|||
components: { AnjuanContent }, |
|||
props: { |
|||
data: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
storageCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
smartQuery: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
storageType: { |
|||
type: String, |
|||
default: 'in' |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
anjuanDrawer: false |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
closeDrawer() { |
|||
this.anjuanDrawer = false |
|||
this.$parent.parentsProjectId = null |
|||
this.$parent.parentsProjectRow = null |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
[data-theme=light] .ajContent{ |
|||
padding-top: 2px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,282 @@ |
|||
<template> |
|||
<div> |
|||
<CollectHeader ref="collectHeaderRef" :is-title-type="isTitleType" :storage-category="storageCategory" :arc-id="arcId" :selections="selections" :test="test" :storage-type="storageType" /> |
|||
<div class="collect-table"> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="getTableDisplayFieldsLoading" |
|||
class="archives-table" |
|||
:data="anjuanData" |
|||
highlight-current-row |
|||
style="width: 100%;" |
|||
height="calc(100vh - 400px)" |
|||
:row-class-name="tableRowClassName" |
|||
:row-key="rowKey" |
|||
@select-all="selectAll" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@cell-dblclick="tableDoubleClick" |
|||
@select="handleCurrentChange" |
|||
> |
|||
<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="storageType==='log'?'类型':'状态'" width="88" align="center"> |
|||
<template slot-scope="scope"> |
|||
<!-- <span class="row-state row-warehousing state-active">已入</span> --> |
|||
<span :class="['row-state', 'row-warehousing', scope.row.folder_location ? 'state-active' : '' ]">{{ scope.row.folder_location ? '已入': '未入' }}</span> |
|||
<!-- is_storage 为空的情况下即没装盒 / 0 未入 / 1 待入 / 2 已入 / 3 待出--> |
|||
<!-- <span :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column :label="storageCategory.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 prop="maintitle" label="题名" align="center" /> |
|||
<el-table-column prop="archive_no" label="档号" align="center" /> |
|||
<el-table-column label="存放位置" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!scope.row.folderLocationDetails">-</span> |
|||
<span v-else> |
|||
<el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag> |
|||
</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
v-if="anjuanData.length !== 0" |
|||
:current-page="page.page" |
|||
:total="page.total" |
|||
:page-size="page.size" |
|||
:pager-count="5" |
|||
layout="total, prev, pager, next, sizes" |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentPage" |
|||
/> |
|||
</div> |
|||
<!-- 档案详情 --> |
|||
<ArchivesInfo ref="archivesInfo" :storage-category="storageCategory" :arc-id="arcId" :is-title-type="isTitleType" :is-collect="false" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { header, form } from '@crud/crud' |
|||
import { manageLibraryCrud } from '../mixins/index' |
|||
import ArchivesInfo from '../module/archivesInfo/index' |
|||
import CollectHeader from '../module/collectHeader' |
|||
export default { |
|||
name: 'Sorted', |
|||
components: { ArchivesInfo, CollectHeader }, |
|||
mixins: [ |
|||
header(), |
|||
form({}), |
|||
manageLibraryCrud |
|||
], |
|||
props: { |
|||
isTitleType: { |
|||
type: Number, |
|||
default: 3 |
|||
}, |
|||
storageCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
test: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
isRecycle: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
smartQuery: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
storageType: { |
|||
type: String, |
|||
default: 'in' |
|||
} |
|||
}, |
|||
inject: ['parentsData'], |
|||
data() { |
|||
return { |
|||
categoryId: '', |
|||
arcId: '', |
|||
title: '', |
|||
selections: [], |
|||
yearData: [], |
|||
parentId: null |
|||
} |
|||
}, |
|||
computed: { |
|||
processedStatusText() { |
|||
return function(status) { |
|||
let text = '' |
|||
if (status === 1) { |
|||
text = '空闲' |
|||
} else if (status === 2) { |
|||
text = '退回' |
|||
} else if (status === 3) { |
|||
text = '开放' |
|||
} else if (status === 4) { |
|||
text = '销毁' |
|||
} else if (status === 5) { |
|||
text = '利用' |
|||
} else if (status === 6) { |
|||
text = '内部移交' |
|||
} else if (status === 7) { |
|||
text = '外部移交' |
|||
} |
|||
return text |
|||
} |
|||
} |
|||
}, |
|||
watch: { |
|||
storageCategory: function(newValue, oldValue) { |
|||
this.selections = [] |
|||
this.$refs.table.clearSelection() |
|||
if (newValue.arrangeType !== 1) { |
|||
this.title = '案卷' |
|||
} else { |
|||
this.title = '文件' |
|||
} |
|||
}, |
|||
tableDisplayFields(val) { |
|||
this.doLayout() |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
this.anjuanData = [{ id: '1' }, { id: '2' }] |
|||
}, |
|||
methods: { |
|||
getCommonData(categoryLevel, parentId, type) { |
|||
this.getViewTable(categoryLevel, parentId, type) |
|||
}, |
|||
rowKey(row) { |
|||
return row.id |
|||
}, |
|||
sendYearDataToParent() { |
|||
this.$parent.$parent.$emit('myYearEvent', this.yearData) |
|||
}, |
|||
openJuannei(data, parentId) { |
|||
// this.$emit('openJuannei', '这是来自案卷的通知') |
|||
if (this.storageCategory.arrangeType === 3) { |
|||
this.$parent.$parent.$parent.$emit('openJuannei', data, parentId) |
|||
} else { |
|||
this.$parent.$parent.$emit('openJuannei', data, parentId) |
|||
} |
|||
}, |
|||
// table选中加上选中状态 |
|||
tableRowClassName({ row, rowIndex }) { |
|||
let color = '' |
|||
this.selections.forEach(item => { |
|||
if (item.id === row.id) { |
|||
color = 'rowStyle' |
|||
} |
|||
}) |
|||
return color |
|||
}, |
|||
// table - 全选 |
|||
selectAll(val) { |
|||
this.selections = val |
|||
}, |
|||
// table - 双击查看详情 |
|||
tableDoubleClick(row) { |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
this.arcId = row.id |
|||
this.$nextTick(() => { |
|||
if (this.storageCategory.arrangeType !== 1) { |
|||
this.$refs.archivesInfo.isHasFile = false |
|||
this.$refs.archivesInfo.detailTitle = '案卷详情' |
|||
this.$refs.archivesInfo.getDetial(2, row.id) |
|||
} else { |
|||
this.$refs.archivesInfo.isHasFile = true |
|||
this.$refs.archivesInfo.detailTitle = '文件详情' |
|||
this.$refs.archivesInfo.getDetial(3, row.id) |
|||
} |
|||
this.$refs.archivesInfo.isFourTest = true |
|||
this.$refs.archivesInfo.archivesInfoVisible = true |
|||
this.$refs.archivesInfo.archivesTabIndex = 0 |
|||
}) |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
this.parentsData.smartQuery = { |
|||
'retention': null, |
|||
'security_class': null, |
|||
'doc_type': null, |
|||
'medium_type': null, |
|||
'archive_year': null, |
|||
'fonds_no': null |
|||
} |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
if (this.storageCategory.arrangeType === 1) { |
|||
this.title = '文件' |
|||
} else { |
|||
this.title = '案卷' |
|||
} |
|||
this.timer = setTimeout(() => { |
|||
this.parentId = row.id |
|||
this.openJuannei('所属' + this.title + ':' + row.archive_no, this.parentId) |
|||
}, 300) |
|||
this.selections = this.crud.selections |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
this.selections = selection |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
if (this.storageCategory.arrangeType === 3) { |
|||
this.getViewTable(2, this.parentsData.parentsProjectId) |
|||
} else if (this.storageCategory.arrangeType === 1) { |
|||
this.getViewTable(3, null) |
|||
} else { |
|||
this.getViewTable(2, null) |
|||
} |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
if (this.storageCategory.arrangeType === 3) { |
|||
this.getViewTable(2, this.parentsData.parentsProjectId) |
|||
} else if (this.storageCategory.arrangeType === 1) { |
|||
this.getViewTable(3, null) |
|||
} else { |
|||
this.getViewTable(2, null) |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
@mixin management-fixed-style{ |
|||
[data-theme="dark"] & { |
|||
background-color: #031435 !important; |
|||
-webkit-box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16); |
|||
box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16); |
|||
} |
|||
[data-theme="light"] & { |
|||
background-color: #fff; |
|||
} |
|||
} |
|||
.el-table { |
|||
::v-deep .el-table__fixed-right { |
|||
@include management-fixed-style; |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,251 @@ |
|||
<template> |
|||
<div> |
|||
<el-drawer |
|||
class="storage-drawer" |
|||
:with-header="false" |
|||
:visible.sync="fileDrawer" |
|||
:modal="false" |
|||
:wrapper-closable="false" |
|||
:show-close="false" |
|||
direction="rtl" |
|||
:size="((storageCategory.arrangeType === 2 && isAjNo === 0) || (storageCategory.arrangeType === 3 && isAjNo === 1)) ? '80%' : (isAjNo === 1) ? '90%' : (storageCategory.arrangeType === 1) ? '90%' : '70%'" |
|||
> |
|||
<CollectHeader ref="collectHeaderRef" :is-title-type="isTitleType" :storage-category="storageCategory" :selections="selections" :test="test" :is-recycle="isRecycle" /> |
|||
<span class="closed-btn" @click="closeDrawer" /> |
|||
<div> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading || getTableDisplayFieldsLoading" |
|||
class="archives-table" |
|||
:data="fileData" |
|||
highlight-current-row |
|||
style="width: 100%;" |
|||
height="calc(100vh - 400px)" |
|||
:row-class-name="tableRowClassName" |
|||
:row-key="rowKey" |
|||
@select-all="selectAll" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@cell-dblclick="tableDoubleClick" |
|||
@select="handleCurrentChange" |
|||
> |
|||
<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 prop="file_name" label="原文名称" show-overflow-tooltip min-width="140" /> |
|||
<el-table-column prop="file_type" label="格式" min-width="60" align="center" /> |
|||
<el-table-column prop="file_size" label="大小" min-width="85" align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ getFileSize(scope.row.file_size) }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="file_dpi" label="尺寸" min-width="85" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div v-if="!scope.row.file_dpi || scope.row.file_dpi === 'null'"> - </div> |
|||
<div v-else> {{ scope.row.file_dpi }} </div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'"> |
|||
<i class="fileIcon icon-image" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'xlsx' || scope.row.file_type === 'xls'"> |
|||
<i class="fileIcon icon-excel" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'docx' || scope.row.file_type === 'doc'"> |
|||
<i class="fileIcon icon-word" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'pdf'"> |
|||
<i class="fileIcon icon-pdf" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'ppt' || scope.row.file_type === 'pptx'"> |
|||
<i class="fileIcon icon-ppt" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'zip' || scope.row.file_type === 'rar'"> |
|||
<i class="fileIcon icon-zip" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'txt'"> |
|||
<i class="fileIcon icon-txt" /> |
|||
</div> |
|||
<div v-else> |
|||
<i class="fileIcon icon-other" /> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="create_time" label="创建时间" min-width="110" align="center" /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
v-if="fileData.length !== 0" |
|||
:current-page="page.page" |
|||
:total="page.total" |
|||
:page-size="page.size" |
|||
:pager-count="5" |
|||
layout="total, prev, pager, next, sizes" |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentPage" |
|||
/> |
|||
</div> |
|||
</el-drawer> |
|||
|
|||
<!-- 点击缩略图看大图 --> |
|||
<el-dialog class="preview-dialog" :append-to-body="true" :close-on-click-modal="false" :before-close="handleClose" :visible="showCoverVisible" title="查看大图"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog" style="max-height:calc(100vh - 230px); overflow:auto;"> |
|||
<img style="max-width:100%; object-fit: contain;" :src="previewSrc" :onerror="defaultImg"> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { manageLibraryCrud } from '../mixins/index' |
|||
import { header, form } from '@crud/crud' |
|||
import CollectHeader from '../module/collectHeader' |
|||
import { mapGetters } from 'vuex' |
|||
export default { |
|||
name: 'File', |
|||
components: { CollectHeader }, |
|||
mixins: [ |
|||
header(), |
|||
form({}), |
|||
manageLibraryCrud |
|||
], |
|||
props: { |
|||
storageCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isRecycle: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
smartQuery: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
} |
|||
}, |
|||
inject: ['parentsData'], |
|||
data() { |
|||
return { |
|||
defaultImg: 'this.src="' + require('@/assets/images/cover-bg.png') + '"', |
|||
isTitleType: 6, |
|||
fileDrawer: false, |
|||
test: '', |
|||
isAjNo: 0, |
|||
selections: [], |
|||
showCoverVisible: false, |
|||
previewSrc: null |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi' |
|||
]) |
|||
}, |
|||
watch: { |
|||
storageCategory: function(newValue, oldValue) { |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
getFileSize(fileSize) { |
|||
const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB' |
|||
const fileSizeInB = fileSize + 'B' |
|||
return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB |
|||
}, |
|||
getCommonData(categoryLevel, parentId, type) { |
|||
this.getViewTable(categoryLevel, parentId, type) |
|||
}, |
|||
closeDrawer() { |
|||
this.fileDrawer = false |
|||
if (this.storageCategory.arrangeType === 1) { |
|||
this.$parent.parentsAnjuanId = null |
|||
} else { |
|||
this.$parent.parentsJuanneiId = null |
|||
} |
|||
}, |
|||
rowKey(row) { |
|||
return row.id |
|||
}, |
|||
// table选中加上选中状态 |
|||
tableRowClassName({ row, rowIndex }) { |
|||
let color = '' |
|||
this.selections.forEach(item => { |
|||
if (item.id === row.id) { |
|||
color = 'rowStyle' |
|||
} |
|||
}) |
|||
return color |
|||
}, |
|||
// table - 全选 |
|||
selectAll(val) { |
|||
this.selections = val |
|||
}, |
|||
// table - 双击查看详情 |
|||
tableDoubleClick(row) { |
|||
// console.log('tableDoubleClick', row) |
|||
// this.arcId = row.id |
|||
// console.log(this.storageCategory.isType) |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
this.parentsData.smartQuery = { |
|||
'retention': null, |
|||
'security_class': null, |
|||
'doc_type': null, |
|||
'medium_type': null, |
|||
'archive_year': null, |
|||
'fonds_no': null |
|||
} |
|||
this.selections = this.crud.selections |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
this.selections = selection |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
if (this.storageCategory.arrangeType === 1) { |
|||
this.getViewTable(4, this.parentsData.parentsAnjuanId) |
|||
} else { |
|||
this.getViewTable(4, this.parentsData.parentsJuanneiId) |
|||
} |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
if (this.storageCategory.arrangeType === 1) { |
|||
this.getViewTable(4, this.parentsData.parentsAnjuanId) |
|||
} else { |
|||
this.getViewTable(4, this.parentsData.parentsJuanneiId) |
|||
} |
|||
}, |
|||
// dialog - close |
|||
handleClose(done) { |
|||
this.showCoverVisible = false |
|||
done() |
|||
}, |
|||
showCoverPreview(row) { |
|||
this.showCoverVisible = true |
|||
this.previewSrc = this.baseApi + '/downloadFile' + row.file_path |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
@import "~@/assets/styles/collect-reorganizi.scss"; |
|||
.svg-style{ |
|||
width: 60px; |
|||
height: 32px; |
|||
} |
|||
</style> |
|||
@ -1,22 +0,0 @@ |
|||
<template> |
|||
<div> |
|||
待入库档案 |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'PendingInArchive', |
|||
components: { |
|||
}, |
|||
data() { |
|||
return { |
|||
} |
|||
}, |
|||
methods: { |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
</style> |
|||
@ -0,0 +1,246 @@ |
|||
<template> |
|||
<el-drawer |
|||
class="storage-drawer" |
|||
:with-header="false" |
|||
:visible.sync="juanneiDrawer" |
|||
:modal="false" |
|||
:wrapper-closable="false" |
|||
:show-close="false" |
|||
direction="rtl" |
|||
:size="storageCategory.arrangeType === 2 ? '90%' :'80%'" |
|||
> |
|||
<CollectHeader ref="collectHeaderRef" :is-title-type="isTitleType" :storage-category="storageCategory" :selections="selections" :test="test" :is-recycle="isRecycle" :storage-type="storageType" /> |
|||
<div class="collect-table"> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="crud.loading || getTableDisplayFieldsLoading" |
|||
class="archives-table" |
|||
:data="junneiData" |
|||
highlight-current-row |
|||
style="width: 100%;" |
|||
height="calc(100vh - 400px)" |
|||
:row-class-name="tableRowClassName" |
|||
:row-key="rowKey" |
|||
@select-all="selectAll" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@cell-dblclick="tableDoubleClick" |
|||
@select="handleCurrentChange" |
|||
> |
|||
<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"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.child === '' ? 0 : scope.row.child }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="maintitle" label="题名" align="center" /> |
|||
<el-table-column prop="archive_no" label="档号" align="center" /> |
|||
<el-table-column label="存放位置" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!scope.row.folderLocationDetails">-</span> |
|||
<span v-else> |
|||
<el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag> |
|||
</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
v-if="junneiData.length !== 0" |
|||
:current-page="page.page" |
|||
:total="page.total" |
|||
:page-size="page.size" |
|||
:pager-count="5" |
|||
layout="total, prev, pager, next, sizes" |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentPage" |
|||
/> |
|||
</div> |
|||
<!-- 档案详情 --> |
|||
<ArchivesInfo ref="archivesInfo" :storage-category="storageCategory" :arc-id="arcId" :is-title-type="isTitleType" :is-collect="false" /> |
|||
<span class="closed-btn" @click="closeDrawer" /> |
|||
</el-drawer> |
|||
</template> |
|||
|
|||
<script> |
|||
import { manageLibraryCrud } from '../mixins/index' |
|||
import { header, form } from '@crud/crud' |
|||
import CollectHeader from '../module/collectHeader' |
|||
import ArchivesInfo from '../module/archivesInfo/index' |
|||
export default { |
|||
name: 'Juannei', |
|||
components: { CollectHeader, ArchivesInfo }, |
|||
mixins: [ |
|||
header(), |
|||
form({}), |
|||
manageLibraryCrud |
|||
], |
|||
props: { |
|||
storageCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isRecycle: { |
|||
type: Boolean, |
|||
default: false |
|||
}, |
|||
smartQuery: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
storageType: { |
|||
type: String, |
|||
default: 'in' |
|||
} |
|||
}, |
|||
inject: ['parentsData'], |
|||
data() { |
|||
return { |
|||
isTitleType: 4, |
|||
juanneiDrawer: false, |
|||
categoryId: '', |
|||
arcId: '', |
|||
test: '', |
|||
selections: [], |
|||
parentId: null |
|||
} |
|||
}, |
|||
computed: { |
|||
processedStatusText() { |
|||
return function(status) { |
|||
let text = '' |
|||
if (status === 1) { |
|||
text = '空闲' |
|||
} else if (status === 2) { |
|||
text = '退回' |
|||
} else if (status === 3) { |
|||
text = '开放' |
|||
} else if (status === 4) { |
|||
text = '销毁' |
|||
} else if (status === 5) { |
|||
text = '利用' |
|||
} else if (status === 6) { |
|||
text = '内部移交' |
|||
} else if (status === 7) { |
|||
text = '外部移交' |
|||
} |
|||
return text |
|||
} |
|||
} |
|||
}, |
|||
watch: { |
|||
storageCategory: function(newValue, oldValue) { |
|||
}, |
|||
tableDisplayFields(val) { |
|||
this.doLayout() |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
this.junneiData = [{ id: '3' }, { id: '4' }] |
|||
}, |
|||
methods: { |
|||
getCommonData(categoryLevel, parentId, type) { |
|||
this.getViewTable(categoryLevel, parentId, type) |
|||
}, |
|||
openFile(data, parentId) { |
|||
// this.$emit('openFile', '这是来自卷内的通知') |
|||
this.$emit('openFile', data, parentId) |
|||
}, |
|||
closeDrawer() { |
|||
this.juanneiDrawer = false |
|||
this.$parent.parentsAnjuanId = null |
|||
}, |
|||
rowKey(row) { |
|||
return row.id |
|||
}, |
|||
// table选中加上选中状态 |
|||
tableRowClassName({ row, rowIndex }) { |
|||
// console.log('添加类名', row, rowIndex) |
|||
let color = '' |
|||
this.selections.forEach(item => { |
|||
if (item.id === row.id) { |
|||
color = 'rowStyle' |
|||
} |
|||
}) |
|||
return color |
|||
}, |
|||
// table - 全选 |
|||
selectAll(val) { |
|||
this.selections = val |
|||
}, |
|||
// table - 双击查看详情 |
|||
tableDoubleClick(row) { |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
console.log('tableDoubleClick', row) |
|||
this.arcId = row.id |
|||
this.$nextTick(() => { |
|||
this.$refs.archivesInfo.isHasFile = true |
|||
this.$refs.archivesInfo.detailTitle = '卷内详情' |
|||
this.$refs.archivesInfo.archivesInfoVisible = true |
|||
this.$refs.archivesInfo.archivesTabIndex = 0 |
|||
this.$refs.archivesInfo.getDetial(3, row.id) |
|||
}) |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
this.parentsData.smartQuery = { |
|||
'retention': null, |
|||
'security_class': null, |
|||
'doc_type': null, |
|||
'medium_type': null, |
|||
'archive_year': null, |
|||
'fonds_no': null |
|||
} |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
this.timer = setTimeout(() => { |
|||
this.parentId = row.id |
|||
this.openFile('所属卷内:' + row.archive_no, this.parentId) |
|||
}, 300) |
|||
this.selections = this.crud.selections |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
console.log('触发单选', row) |
|||
this.selections = selection |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
this.getViewTable(3, this.parentsData.parentsAnjuanId) |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
this.getViewTable(3, this.parentsData.parentsAnjuanId) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
@mixin management-fixed-style{ |
|||
[data-theme="dark"] & { |
|||
background-color: #031435 !important; |
|||
-webkit-box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16); |
|||
box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16); |
|||
} |
|||
[data-theme="light"] & { |
|||
background-color: #fff; |
|||
} |
|||
} |
|||
.el-table { |
|||
::v-deep .el-table__fixed-right { |
|||
@include management-fixed-style; |
|||
} |
|||
} |
|||
</style> |
|||
@ -0,0 +1,324 @@ |
|||
|
|||
import { FetchInitCategoryViewTable } from '@/api/collect/collect' |
|||
import { FetchInitContorlView } from '@/api/archivesManage/library' |
|||
import { FetchDictionaryTree } from '@/api/system/dict' |
|||
import { crud } from '@crud/crud' |
|||
export const manageLibraryCrud = { |
|||
mixins: [crud()], |
|||
// 组件共用属性
|
|||
data() { |
|||
return { |
|||
getTableDisplayFieldsLoading: false, |
|||
tableDisplayFields: [], |
|||
projectData: [], |
|||
anjuanData: [], |
|||
junneiData: [], |
|||
fileData: [], |
|||
arrySort: [], |
|||
page: { |
|||
page: 1, |
|||
size: 10, |
|||
total: 0 |
|||
}, |
|||
timer: null, |
|||
query: { |
|||
search: null, |
|||
project_class: null, |
|||
archive_ctg_no: null |
|||
}, |
|||
classifyTree: [], |
|||
classifyLoading: false, |
|||
parentsId: null |
|||
} |
|||
}, |
|||
// 组件挂载时的共用方法
|
|||
mounted() { |
|||
}, |
|||
// 组件共用方法
|
|||
methods: { |
|||
// 缓存用户对于固定栏操作习惯
|
|||
statusBarChecked(val) { |
|||
this.fixedStatusBar = val |
|||
localStorage.setItem('statusBarFixedType', val) |
|||
}, |
|||
handleSearch(categoryLevel) { |
|||
console.log('selectStatus', this.selectStatus) |
|||
this.parentsData.$refs.classifyTree.setCurrentKey(null) |
|||
this.smartQuery = { |
|||
'retention': null, |
|||
'security_class': null, |
|||
'doc_type': null, |
|||
'medium_type': null, |
|||
'archive_year': null, |
|||
'fonds_no': null |
|||
} |
|||
// 2 项目 3 案卷 /文件 4 卷内 6 文件
|
|||
if (this.isTitleType === 2) { |
|||
this.parentsId = null |
|||
this.$parent.getTableDisplayFieldsLoading = true |
|||
} else if (this.isTitleType === 3) { |
|||
if (this.storageCategory.arrangeType === 1) { |
|||
this.parentsId = null |
|||
} else { |
|||
if (this.activeIndex === 1) { |
|||
this.parentsId = null |
|||
} else { |
|||
this.parentsId = this.parentsData.parentsProjectId |
|||
} |
|||
} |
|||
this.$parent.getTableDisplayFieldsLoading = true |
|||
} else if (this.isTitleType === 4) { |
|||
// 卷内
|
|||
this.$parent.$parent.getTableDisplayFieldsLoading = true |
|||
this.parentsId = this.parentsData.parentsAnjuanId |
|||
} else if (this.isTitleType === 6) { |
|||
// 原文
|
|||
if (this.storageCategory.arrangeType === 1) { |
|||
this.parentsId = this.parentsData.parentsAnjuanId |
|||
this.$parent.getTableDisplayFieldsLoading = true |
|||
} else { |
|||
this.$parent.$parent.getTableDisplayFieldsLoading = true |
|||
if (this.parentsData.isTabFile) { |
|||
this.parentsId = this.parentsData.parentsAnjuanId |
|||
} else { |
|||
this.parentsId = this.parentsData.parentsJuanneiId |
|||
} |
|||
} |
|||
} |
|||
setTimeout(() => { |
|||
this.getViewTable(categoryLevel, this.parentsId, 'search') |
|||
}, 200) |
|||
}, |
|||
getViewTable(categoryLevel, parentsId, type) { |
|||
this.getTableDisplayFieldsLoading = true |
|||
this.tableDisplayFields = [] |
|||
FetchInitCategoryViewTable({ categoryId: this.storageCategory.id, categoryLevel: categoryLevel }).then((res) => { |
|||
if (res) { |
|||
this.arrySort = [] |
|||
this.tableDisplayFields = res |
|||
const orderSortArry = this.tableDisplayFields.filter(item => item.queue).sort((a, b) => a.queue - b.queue) |
|||
orderSortArry.forEach(item => { |
|||
if (item.displayOrderBy) { |
|||
this.arrySort.push(item.fieldName + ',' + item.displayOrderBy) |
|||
} |
|||
}) |
|||
this.$nextTick(() => { |
|||
this.getViewTableList(categoryLevel, parentsId, type) |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
getViewTableList(categoryLevel, parentsId, type) { |
|||
console.log(this.smartQuery.fonds_no) |
|||
const params = { |
|||
'parentId': parentsId, |
|||
'categoryId': this.storageCategory.id, |
|||
'categoryLevel': categoryLevel, |
|||
'ignore': false, |
|||
'isdel': (this.parentsData.isdel && categoryLevel === 3) ? false : this.parentsData.isdel, |
|||
'checkTypes': this.selectStatus && this.selectStatus.length !== 0 ? this.selectStatus.join(',') : null, |
|||
'search': this.query.search, |
|||
'retention': this.smartQuery.retention, |
|||
'security_class': this.smartQuery.security_class, |
|||
'medium_type': this.smartQuery.medium_type, |
|||
'doc_type': this.smartQuery.doc_type, |
|||
'archive_year': this.smartQuery.archive_year, |
|||
'fonds_no': this.smartQuery.fonds_no, |
|||
'project_class': this.query.project_class, |
|||
'archive_ctg_no': this.query.archive_ctg_no, |
|||
'page': this.page.page - 1, |
|||
'size': this.page.size, |
|||
'sort': this.arrySort |
|||
} |
|||
FetchInitContorlView(params).then((res) => { |
|||
console.log('resssss', res) |
|||
if (res.code !== 500) { |
|||
this.parentsData.listCategory = res.category |
|||
if (categoryLevel === 1) { |
|||
// 项目
|
|||
const projectObj = this.parentsData.$refs.projectEle |
|||
this.projectData = res.list.content |
|||
this.page.total = res.list.totalElements |
|||
this.yearData = res.yearGroup |
|||
if (this.yearData && type !== 'quickFilter') { |
|||
this.$emit('myYearEvent', this.yearData) |
|||
} |
|||
if (type === 'search') { |
|||
projectObj.projectData = res.list.content |
|||
projectObj.page.total = res.list.totalElements |
|||
projectObj.getTableDisplayFieldsLoading = false |
|||
} |
|||
} else if (categoryLevel === 2) { |
|||
// 案卷
|
|||
const anjuanObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList |
|||
this.anjuanData = res.list.content |
|||
this.page.total = res.list.totalElements |
|||
this.yearData = res.yearGroup |
|||
if (this.yearData && type !== 'quickFilter') { |
|||
this.$parent.$parent.$emit('myYearEvent', this.yearData) |
|||
} |
|||
// 搜索/新增/编辑 非 案卷是主页的时候
|
|||
if (type === 'search') { |
|||
anjuanObj.anjuanData = res.list.content |
|||
anjuanObj.page.total = res.list.totalElements |
|||
anjuanObj.getTableDisplayFieldsLoading = false |
|||
} |
|||
} else if (categoryLevel === 3) { |
|||
if (this.isTitleType === 3) { |
|||
// 案卷下的未整理 / 文件为主页时
|
|||
const wjObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList |
|||
this.anjuanData = res.list.content |
|||
this.page.total = res.list.totalElements |
|||
this.yearData = res.yearGroup |
|||
if (this.yearData && type !== 'quickFilter') { |
|||
this.$parent.$parent.$emit('myYearEvent', this.yearData) |
|||
} |
|||
if (type === 'search') { |
|||
wjObj.anjuanData = res.list.content |
|||
wjObj.page.total = res.list.totalElements |
|||
wjObj.getTableDisplayFieldsLoading = false |
|||
} |
|||
} else { |
|||
// 卷内
|
|||
this.junneiData = res.list.content |
|||
this.page.total = res.list.totalElements |
|||
if (type === 'search') { |
|||
this.parentsData.$refs.juanneiEle.junneiData = res.list.content |
|||
this.parentsData.$refs.juanneiEle.page.total = res.list.totalElements |
|||
this.parentsData.$refs.juanneiEle.getTableDisplayFieldsLoading = false |
|||
} |
|||
} |
|||
} else { |
|||
// 原文
|
|||
this.fileData = res.list.content |
|||
this.page.total = res.list.totalElements |
|||
if (type === 'search') { |
|||
this.parentsData.$refs.fileEle.fileData = res.list.content |
|||
this.parentsData.$refs.fileEle.page.total = res.list.totalElements |
|||
this.parentsData.$refs.fileEle.getTableDisplayFieldsLoading = false |
|||
} |
|||
} |
|||
} |
|||
this.getTableDisplayFieldsLoading = false |
|||
this.crud.selections = [] |
|||
if (categoryLevel === 3) { |
|||
// 按件
|
|||
if (this.isTitleType === 3) { |
|||
const wjObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList |
|||
wjObj.selections = [] |
|||
wjObj.$refs.table.clearSelection() // 清空选中
|
|||
wjObj.$refs.table.setCurrentRow(-1) // 清除高亮
|
|||
} else { |
|||
const juanneiObj = this.parentsData.$refs.juanneiEle |
|||
juanneiObj.selections = [] |
|||
juanneiObj.$refs.table.clearSelection() |
|||
juanneiObj.$refs.table.setCurrentRow(-1) |
|||
} |
|||
} else if (categoryLevel === 2) { |
|||
// 按卷
|
|||
const anjuanObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList |
|||
anjuanObj.selections = [] |
|||
anjuanObj.$refs.table.clearSelection() |
|||
anjuanObj.$refs.table.setCurrentRow(-1) |
|||
} else if (categoryLevel === 1) { |
|||
// 项目
|
|||
const projectObj = this.parentsData.$refs.projectEle |
|||
projectObj.selections = [] |
|||
projectObj.$refs.table.clearSelection() |
|||
projectObj.$refs.table.setCurrentRow(-1) |
|||
} else { |
|||
const fileObj = this.parentsData.$refs.fileEle |
|||
fileObj.selections = [] |
|||
fileObj.$refs.table.clearSelection() |
|||
fileObj.$refs.table.setCurrentRow(-1) |
|||
} |
|||
}) |
|||
}, |
|||
// 项目级别 - 阶段分类
|
|||
getDictsList(type) { |
|||
FetchDictionaryTree().then((res) => { |
|||
const filterCodes = ['project_class'] |
|||
let filteredItems = JSON.parse(JSON.stringify(res)).filter(item => filterCodes.includes(item.dictionaryCode)) |
|||
filteredItems = this.addLevelToDictionaryList(filteredItems, 1) |
|||
|
|||
if (type === 1) { |
|||
let fiterData = [] |
|||
fiterData = filteredItems.flatMap(item => { |
|||
const level2Childs = item.childDictionarys.filter(child => { |
|||
return child.dictionaryParents === item.id && child.level === 2 |
|||
}) |
|||
return level2Childs |
|||
}) |
|||
if (this.parentsData.parentsProjectRow) { |
|||
console.log(this.parentsData.parentsProjectRow.project_class) |
|||
const anjuanObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList |
|||
anjuanObj.$refs.collectHeaderRef.projectOptions = [] |
|||
if (this.parentsData.parentsProjectRow.project_class !== '') { |
|||
const findDic = fiterData.find(item => item.dictionaryName === this.parentsData.parentsProjectRow.project_class) |
|||
anjuanObj.$refs.collectHeaderRef.projectOptions.push(findDic) |
|||
} else { |
|||
console.log(fiterData) |
|||
anjuanObj.$refs.collectHeaderRef.projectOptions = fiterData |
|||
} |
|||
} |
|||
} else { |
|||
if (this.storageCategory.arrangeType === 3) { |
|||
const projectObj = this.$refs.projectEle |
|||
// this.projectOptions = this.filterData(filteredItems, filteredItems[0].id)
|
|||
projectObj.$refs.collectHeaderRef.projectOptions = filteredItems.flatMap(item => { |
|||
const level2Childs = item.childDictionarys.filter(child => { |
|||
return child.dictionaryParents === item.id && child.level === 2 |
|||
}) |
|||
// 将满足条件的子项目的childDictionarys设置为空数组,因为项目页不需要
|
|||
level2Childs.forEach(child => { |
|||
child.childDictionarys = [] |
|||
}) |
|||
return level2Childs |
|||
}) |
|||
} |
|||
} |
|||
}).catch(err => { |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
// 显示第一级和第二级
|
|||
// filterData(data, targetId) {
|
|||
// return data.filter(item => {
|
|||
// if (item.id === targetId || item.dictionaryParents === targetId) {
|
|||
// if (item.childDictionarys && item.childDictionarys.length > 0) {
|
|||
// item.childDictionarys = this.filterData(item.childDictionarys, targetId)
|
|||
// }
|
|||
// return true
|
|||
// }
|
|||
// return false
|
|||
// })
|
|||
// },
|
|||
// 给筛选出来的数据加level 方便后面是否可点击
|
|||
addLevelToDictionaryList(dictionaryList, level) { |
|||
dictionaryList.forEach(dictionary => { |
|||
dictionary.level = level |
|||
if (dictionary.childDictionarys) { |
|||
dictionary.childDictionarys = this.addLevelToDictionaryList(dictionary.childDictionarys, level + 1) |
|||
} |
|||
}) |
|||
return dictionaryList |
|||
}, |
|||
normalizerProject(node) { |
|||
if ((node.childDictionarys && !node.childDictionarys.length) || node.childDictionarys === null) { |
|||
delete node.childDictionarys |
|||
} |
|||
return { |
|||
id: node.dictionaryName, |
|||
label: `${node.dictionaryName} - ${node.dictionaryCode}`, |
|||
children: node.childDictionarys, |
|||
isDisabled: this.isTitleType === 3 ? node.level !== 3 : node.level === 1 |
|||
} |
|||
}, |
|||
/* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */ |
|||
doLayout() { |
|||
this.$nextTick(() => { |
|||
this.$refs.table.doLayout() |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,292 @@ |
|||
<template> |
|||
<el-dialog class="detail-dialog" :title="detailTitle" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="archivesInfoVisible" :before-close="handleClose"> |
|||
<!-- <span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> --> |
|||
<div class="setting-dialog"> |
|||
<div class="detail-tab tab-content"> |
|||
<!-- 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 && 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> |
|||
</ul> |
|||
<!-- 基本信息 --> |
|||
<div v-if="archivesTabIndex==0" class="base-info item-content"> |
|||
<el-row> |
|||
<el-col v-for="(item,index) in filteredArray" :key="index" :span="item.isLine ? 24 : 12" class="base-info-item"> |
|||
<span>{{ item.fieldCnName }}:</span> |
|||
<p :style="{ width: ( item.editLength ? item.editLength+'px' : '' ), flex: ( !item.editLength ? 1 : '' )}">{{ item.context }}</p> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row v-for="(item,index) in archivesDetailsData" :key="index"> |
|||
<el-col v-if="item.fieldName === 'is_entity'" :span="24" class="base-info-item"> |
|||
<span>有无实体:</span> |
|||
<p style="flex:1">{{ item.context === 1 ? '有' : '无' }}</p> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
<!-- 附件 --> |
|||
<UploadFile v-if="archivesTabIndex==1" ref="uploadFile" class="item-content" :is-upload-detail="false" :storage-category="storageCategory" :arc-id="arcId" /> |
|||
<!-- 元数据 --> |
|||
<div v-if="archivesTabIndex==2" class="metadata-cont item-content"> |
|||
<pre v-highlightjs="xml_show"> |
|||
<code class="highlight_s"> |
|||
{[xml_show]} |
|||
</code> |
|||
</pre> |
|||
</div> |
|||
<FourTestInfo v-if="archivesTabIndex===3" /> |
|||
<HandleInfo v-if="archivesTabIndex===4" /> |
|||
<ArchivesListModule v-show="archivesTabIndex===5" ref="archivesListModuleRef" :storage-category="storageCategory" :is-title-type="isTitleType" :is-collect="isCollect" /> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import { form } from '@crud/crud' |
|||
import { FetchDetailsById, FetchArchivesMetadata } from '@/api/collect/collect' |
|||
import UploadFile from '../uploadFile/index' |
|||
import FourTestInfo from '../fourTestInfo/index' |
|||
import HandleInfo from '../handleInfo/index' |
|||
export default { |
|||
name: 'ArchivesInfo', |
|||
components: { UploadFile, FourTestInfo, HandleInfo }, |
|||
mixins: [ |
|||
form({}) |
|||
], |
|||
props: { |
|||
storageCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
arcId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
}, |
|||
isTitleType: { |
|||
type: Number, |
|||
default: 2 |
|||
}, |
|||
isCollect: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
detailTitle: '', |
|||
isHasFile: false, // 卷内/文件才有附件 |
|||
isFourTest: false, |
|||
isDetailsInfo: false, // 项目不显示最下面5行基本信息 |
|||
archivesInfoVisible: false, |
|||
archivesTabIndex: 0, |
|||
archivesDetailsData: [], |
|||
archivesDetailsMetadata: [], |
|||
xml_show: null |
|||
} |
|||
}, |
|||
computed: { |
|||
filteredArray() { |
|||
const lastIndex = this.archivesDetailsData.length - 1 |
|||
return this.archivesDetailsData |
|||
.filter((item, index) => index !== lastIndex || item.fieldName !== 'is_entity') |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
getDetial(collectLevel, rowId) { |
|||
const params = { |
|||
'categoryId': this.storageCategory.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] |
|||
})) |
|||
}) |
|||
const metaDataParams = { |
|||
'categoryId': this.storageCategory.id, |
|||
'categoryLevel': collectLevel, |
|||
'archivesId': rowId |
|||
} |
|||
FetchArchivesMetadata(metaDataParams).then(data => { |
|||
this.archivesDetailsMetadata = data |
|||
}) |
|||
}, |
|||
setXml() { |
|||
const xmlstr = this.archivesDetailsMetadata |
|||
this.xml_show = this.showXml(xmlstr) |
|||
}, |
|||
changeActiveTab(index) { |
|||
this.archivesTabIndex = index |
|||
if (this.archivesTabIndex === 2) { |
|||
this.setXml() |
|||
} else if (this.archivesTabIndex === 5) { |
|||
if (this.isTitleType === 2) { |
|||
this.$refs.archivesListModuleRef.detailLevel = 2 |
|||
} else if (this.isTitleType === 3) { |
|||
this.$refs.archivesListModuleRef.detailLevel = 3 |
|||
} else { |
|||
this.$refs.archivesListModuleRef.detailLevel = 4 |
|||
} |
|||
this.$refs.archivesListModuleRef.parentId = this.arcId |
|||
this.$refs.archivesListModuleRef.isDetail = true |
|||
this.$refs.archivesListModuleRef.getViewTable() |
|||
} |
|||
this.$nextTick(() => { |
|||
if (this.$refs.uploadFile) { |
|||
this.$refs.uploadFile.tableData = [] |
|||
this.$refs.uploadFile.getFileList() |
|||
} |
|||
}) |
|||
}, |
|||
// 删除 - 关闭 |
|||
handleClose(done) { |
|||
this.archivesInfoVisible = false |
|||
localStorage.removeItem('collectLevelList') |
|||
done() |
|||
}, |
|||
// xml格式化 |
|||
showXml(str) { |
|||
var that = this |
|||
var text = str |
|||
// 去掉多余的空格 |
|||
text = |
|||
'\n' + |
|||
text |
|||
.replace(/(<\w+)(\s.*?>)/g, function($0, name, props) { |
|||
return name + ' ' + props.replace(/\s+(\w+=)/g, ' $1') |
|||
}) |
|||
.replace(/>\s*?</g, '>\n<') |
|||
// 把注释编码 |
|||
text = text |
|||
.replace(/\n/g, '\r') |
|||
.replace(/<!--(.+?)-->/g, function($0, text) { |
|||
var ret = '<!--' + escape(text) + '-->' |
|||
return ret |
|||
}) |
|||
.replace(/\r/g, '\n') |
|||
|
|||
// 调整格式 |
|||
var rgx = /\n(<(([^\?]).+?)(?:\s|\s*?>|\s*?(\/)>)(?:.*?(?:(?:(\/)>)|(?:<(\/)\2>)))?)/gm |
|||
var nodeStack = [] |
|||
var output = text.replace(rgx, function( |
|||
$0, |
|||
all, |
|||
name, |
|||
isBegin, |
|||
isCloseFull1, |
|||
isCloseFull2, |
|||
isFull1, |
|||
isFull2 |
|||
) { |
|||
var isClosed = |
|||
isCloseFull1 === '/' || |
|||
isCloseFull2 === '/' || |
|||
isFull1 === '/' || |
|||
isFull2 === '/' |
|||
var prefix = '' |
|||
if (isBegin === '!') { |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
} else { |
|||
if (isBegin !== '/') { |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
if (!isClosed) { |
|||
nodeStack.push(name) |
|||
} |
|||
} else { |
|||
nodeStack.pop() |
|||
prefix = that.getPrefix(nodeStack.length) |
|||
} |
|||
} |
|||
var ret = '\n' + prefix + all |
|||
return ret |
|||
}) |
|||
var outputText = output.substring(1) |
|||
// 把注释还原并解码,调格式 |
|||
outputText = outputText |
|||
.replace(/\n/g, '\r') |
|||
.replace(/(\s*)<!--(.+?)-->/g, function($0, prefix, text) { |
|||
if (prefix.charAt(0) === '\r') prefix = prefix.substring(1) |
|||
text = unescape(text).replace(/\r/g, '\n') |
|||
var ret = |
|||
'\n' + prefix + '<!--' + text.replace(/^\s*/gm, prefix) + '-->' |
|||
return ret |
|||
}) |
|||
outputText = outputText.replace(/\s+$/g, '').replace(/\r/g, '\r\n') |
|||
return outputText |
|||
}, |
|||
getPrefix(prefixIndex) { |
|||
var span = ' ' |
|||
var output = [] |
|||
for (var i = 0; i < prefixIndex; ++i) { |
|||
output.push(span) |
|||
} |
|||
return output.join('') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.base-info, |
|||
.metadata-cont{ |
|||
background-color: #F6F8FC; |
|||
|
|||
} |
|||
// 档案详情 |
|||
.base-info{ |
|||
padding: 20px 0; |
|||
overflow: hidden; |
|||
overflow-y: scroll; |
|||
.base-info-item{ |
|||
display: flex; |
|||
flex-direction: row; |
|||
margin-bottom: 20px; |
|||
color: #545B65; |
|||
span{ |
|||
display: block; |
|||
width: 120px; |
|||
margin-right: 5px; |
|||
text-align: right; |
|||
color: #0C0E1E; |
|||
} |
|||
} |
|||
} |
|||
|
|||
code.hljs { |
|||
font-size: 12px; |
|||
color: #0C0E1E !important; |
|||
height: 530px !important; |
|||
} |
|||
::v-deep .hljs-name{ |
|||
color: #0C0E1E !important; |
|||
} |
|||
.base-info .base-info-item span.el-tag{ |
|||
width: auto; |
|||
color: #fff; |
|||
} |
|||
|
|||
.detail-tab .tab-nav{ |
|||
margin: 15px 0 18px 0; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,367 @@ |
|||
<template> |
|||
<div> |
|||
<div class="collect-header contorl-header"> |
|||
<h4 :class="classType">{{ collectTitle }} </h4> |
|||
<div v-if="isTitleType !== 6" class="head-search"> |
|||
<!-- 搜索 --> |
|||
<el-input v-model="query.search" clearable size="small" :placeholder="placeholderType" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="handleSearch(collectLevel)" @clear="handleSearch(collectLevel)" /> |
|||
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="handleSearch(collectLevel)">搜索</el-button> |
|||
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
<div v-if="isTitleType === 3 && storageType==='in'" class="handle-container" style="margin-left: 60px;"> |
|||
<el-button size="mini" :disabled="!selections.length" @click="handleIn"> |
|||
<i class="iconfont icon-ruku" /> |
|||
入库 |
|||
</el-button> |
|||
<el-button size="mini" :disabled="!selections.length" @click="handleHand"> |
|||
<i class="iconfont icon-rengongqueren" /> |
|||
人工确认 |
|||
</el-button> |
|||
</div> |
|||
<div v-if="isTitleType === 3 && storageType==='out'" class="handle-container" style="margin-left: 60px;"> |
|||
<el-button size="mini" :disabled="!selections.length" @click="handleOut"> |
|||
<i class="iconfont icon-chuku" /> |
|||
出库 |
|||
</el-button> |
|||
<el-button size="mini" :disabled="!selections.length" @click="handleHandOut"> |
|||
<i class="iconfont icon-rengongqueren" /> |
|||
人工确认 |
|||
</el-button> |
|||
</div> |
|||
<div v-if="(isTitleType === 2 || isTitleType === 3 ) && storageType==='log'" class="handle-container" style="margin-left: 60px;"> |
|||
<el-button size="mini" type="success" :disabled="selections.length === 0" @click="handleExport"><i class="iconfont icon-daochu" />导出</el-button> |
|||
</div> |
|||
|
|||
</div> |
|||
<!-- 入库对话框 --> |
|||
<inDialog ref="inDialogDom" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { crud } from '@crud/crud' |
|||
import { manageLibraryCrud } from '../mixins/index' |
|||
import inDialog from '../../pendingInCase/module/inDialog.vue' |
|||
import { mapGetters } from 'vuex' |
|||
|
|||
export default { |
|||
name: 'CollectHeader', |
|||
components: { inDialog }, |
|||
mixins: [manageLibraryCrud, crud()], |
|||
props: { |
|||
storageCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isTitleType: { |
|||
type: Number, |
|||
default: 2 |
|||
}, |
|||
test: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
}, |
|||
selections: { |
|||
type: Array, |
|||
default: function() { |
|||
return [] |
|||
} |
|||
}, |
|||
storageType: { |
|||
type: String, |
|||
default: 'in' |
|||
} |
|||
}, |
|||
inject: ['parentsData'], |
|||
data() { |
|||
return { |
|||
arcId: null |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi' |
|||
]), |
|||
collectTitle() { |
|||
if (this.isTitleType === 2) { |
|||
return '项目' |
|||
} else if (this.isTitleType === 3) { |
|||
if (this.storageCategory.arrangeType === 1) { |
|||
return '文件' |
|||
} else { |
|||
return '案卷' |
|||
} |
|||
} else if (this.isTitleType === 4) { |
|||
return '卷内' |
|||
} else if (this.isTitleType === 6) { |
|||
return '原文' |
|||
} |
|||
return '' |
|||
}, |
|||
collectLevel() { |
|||
if (this.isTitleType === 2) { |
|||
return 1 |
|||
} else if (this.isTitleType === 3) { |
|||
if (this.storageCategory.arrangeType === 1) { |
|||
return 3 |
|||
} else { |
|||
return 2 |
|||
} |
|||
} else if (this.isTitleType === 4) { |
|||
return 3 |
|||
} else if (this.isTitleType === 6) { |
|||
return 4 |
|||
} |
|||
return null |
|||
}, |
|||
classType() { |
|||
if (this.isTitleType === 2) { |
|||
return '' |
|||
} else if (this.isTitleType === 3) { |
|||
return 'is-anjuan' |
|||
} else if (this.isTitleType === 4) { |
|||
return 'is-juannei' |
|||
} else if (this.isTitleType === 6) { |
|||
return 'is-file' |
|||
} |
|||
return '' |
|||
}, |
|||
placeholderType() { |
|||
if (this.isTitleType === 2) { |
|||
return '输入项目名称或编号搜索' |
|||
} else if (this.isTitleType === 3 || this.isTitleType === 4) { |
|||
return '输入题名或档号搜索' |
|||
} |
|||
return '输入项目名称或编号搜索' |
|||
}, |
|||
projectPlaceholder() { |
|||
if (this.isTitleType === 2) { |
|||
return '请选择项目分类' |
|||
} else if (this.isTitleType === 3) { |
|||
return '请选择项目阶段' |
|||
} |
|||
return '请选择项目分类' |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
resetQuery() { |
|||
this.selectStatus = [] |
|||
this.query = { |
|||
'search': null, |
|||
'project_class': null, |
|||
'archive_ctg_no': null |
|||
} |
|||
this.handleSearch(this.collectLevel) |
|||
}, |
|||
// 入库 |
|||
handleIn() { |
|||
this.$refs.inDialogDom.dialogVisible = true |
|||
this.$refs.inDialogDom.isCaseOrArchives = 1 |
|||
// const caseIds = this.selections.map(item => { return item.id }) |
|||
// const index = this.selections.every((item) => item.storageType === 0) |
|||
// if (index) { |
|||
// const params = { |
|||
// caseIds: caseIds |
|||
// } |
|||
// initCasesByArchives(params).then(res => { |
|||
// this.$refs.inDialogDom.childData = res |
|||
// }) |
|||
// this.$refs.inDialogDom.dialogVisible = true |
|||
// } else { |
|||
// this.$alert('当前档案盒正在入库,请勿重复操作', '提示', { |
|||
// confirmButtonText: '确定', |
|||
// callback: action => {} |
|||
// }) |
|||
// } |
|||
}, |
|||
// 人工确认 |
|||
handleHand() { |
|||
if (this.selections.length > 0) { |
|||
this.$confirm('此操作将手动确认入库状态' + '<span>你是否还要继续?</span>', '提示', { |
|||
confirmButtonText: '继续', |
|||
cancelButtonText: '取消', |
|||
type: 'warning', |
|||
dangerouslyUseHTMLString: true |
|||
}).then(() => { |
|||
const bool = this.selections.every(item => item.storageType === 1) |
|||
if (bool) { // 全是'待入'状态弹出成功提示 |
|||
const params = this.selections.map(item => item.id) |
|||
console.log(params) |
|||
// readyCollectConfirm(params).then(res => { |
|||
// const handDialogDom = this.$refs.handDialogDom |
|||
// if (res.length === 1) { |
|||
// const params = res.map(item => item.caseId) |
|||
// collectConfirm(params).then(data => { |
|||
// this.$message({ message: '入库成功!', type: 'success', offset: 8 }) |
|||
// this.crud.refresh() |
|||
// }) |
|||
// } else if (res.length > 1) { |
|||
// handDialogDom.tableData = res |
|||
// this.$nextTick(() => { // 默认多选 |
|||
// handDialogDom.$refs.table.toggleAllSelection() |
|||
// }) |
|||
// handDialogDom.manyVisible = true |
|||
// } |
|||
// }) |
|||
} else { // 否则提示 |
|||
this.$alert('当前档案盒状态不为“待入”,不可人工确认', '提示', { |
|||
confirmButtonText: '确定', |
|||
callback: action => {} |
|||
}) |
|||
} |
|||
}).catch(() => { |
|||
}) |
|||
} else { |
|||
this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 }) |
|||
} |
|||
}, |
|||
// 出库 |
|||
handleOut() { |
|||
const bool = this.selections.every(item => item.storageType === 2) |
|||
if (bool) { |
|||
this.$confirm('此操作将出库当前所选择的档案' + '<span>你是否还要继续?</span>', '提示', { |
|||
confirmButtonText: '继续', |
|||
cancelButtonText: '取消', |
|||
type: 'warning', |
|||
dangerouslyUseHTMLString: true |
|||
}).then(() => { |
|||
this.handleConfirm() |
|||
}).catch(() => { |
|||
}) |
|||
} else { |
|||
this.$alert('当前档案盒正在出库,请勿重复操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
callback: action => {} |
|||
}) |
|||
} |
|||
}, |
|||
// 人工确认 |
|||
handleHandOut() { |
|||
const bool = this.selections.every(item => item.storageType === 3) |
|||
if (bool) { |
|||
const params = this.selections.map(item => { return item.id }) |
|||
console.log(params) |
|||
// grantConfirm(params).then(res => { |
|||
// if (res) { |
|||
// this.$message({ |
|||
// message: '出库成功!', |
|||
// type: 'success' |
|||
// }) |
|||
// this.crud.refresh() |
|||
// } else { |
|||
// this.$message.error('出库失败!') |
|||
// this.outVisible = false |
|||
// } |
|||
// }) |
|||
} else { |
|||
this.$alert('当前档案盒状态不为“待出”,不可人工确认', '提示', { |
|||
confirmButtonText: '确定', |
|||
callback: action => {} |
|||
}) |
|||
} |
|||
}, |
|||
handleConfirm() { |
|||
this.crud.downloadLoading = true |
|||
const params = this.selections.map(item => { return item.id }) |
|||
console.log(params) |
|||
// grant(params).then(res => { |
|||
// if (res) { |
|||
// this.crud.downloadLoading = false |
|||
// this.$message({ |
|||
// message: '出库成功!', |
|||
// type: 'success' |
|||
// }) |
|||
// this.outVisible = false |
|||
// this.crud.refresh() |
|||
// } else { |
|||
// this.$message.error('出库失败!') |
|||
// this.crud.downloadLoading = false |
|||
// this.outVisible = false |
|||
// } |
|||
// }) |
|||
}, |
|||
handleExport() { |
|||
if (this.selections.length === 0) { |
|||
this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 }) |
|||
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) |
|||
// exportFile(this.baseApi + '/api/control/exportDate?' + qs.stringify(params, { indices: false })) |
|||
}).catch(() => { |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
.collect-header{ |
|||
border-top: none !important; |
|||
padding: 20px 0 0 0 !important; |
|||
} |
|||
.manage-fixed-style{ |
|||
margin-bottom: 30px; |
|||
} |
|||
.contorl-header{ |
|||
flex-wrap: wrap; |
|||
// height: 94px; |
|||
.head-search{ |
|||
height: 32px; |
|||
margin-right: 0 !important; |
|||
margin-bottom: 10px !important; |
|||
} |
|||
} |
|||
::v-deep .vue-treeselect__list-item{ |
|||
width: 220px; |
|||
} |
|||
::v-deep .vue-treeselect__menu { |
|||
padding: 20px 0; |
|||
} |
|||
::v-deep .vue-treeselect__option--highlight{ |
|||
background: #f5f9fc !important; |
|||
color: #0348f3 !important; |
|||
} |
|||
::v-deep .vue-treeselect__option-arrow-container .vue-treeselect__option-arrow{ |
|||
color: #1c1c1c !important; |
|||
} |
|||
::v-deep .vue-treeselect__placeholder{ |
|||
font-size: 14px; |
|||
} |
|||
::v-deep .vue-treeselect__label-container{ |
|||
font-size: 14px; |
|||
height: 34px; |
|||
line-height: 34px; |
|||
color: #1c1c1c; |
|||
} |
|||
::v-deep .vue-treeselect__option.vue-treeselect__option--disabled{ |
|||
.vue-treeselect__label-container{ |
|||
color: #545b65 !important; |
|||
} |
|||
} |
|||
::v-deep.vue-treeselect--has-value .vue-treeselect__single-value{ |
|||
font-size: 14px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,119 @@ |
|||
<template> |
|||
<!--四性检测-档案详情内--> |
|||
<div class="fourTest-container"> |
|||
<el-table :data="tableData" style="min-width: 100%" height="calc(100vh - 440px)"> |
|||
<el-table-column prop="admin" label="检测人" min-width="60" /> |
|||
<el-table-column prop="createTime" label="检测时间" min-width="180"> |
|||
<template slot-scope="scope"> |
|||
<div>{{ scope.row.createTime | parseTime }}</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="truth" label="真实性" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.truth===1" class="four-icon iconfont icon-zhengque" /> |
|||
<span v-else class="four-icon iconfont icon-cuowu" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="integrity" label="完整性" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.integrity===1" class="four-icon iconfont icon-zhengque" /> |
|||
<span v-else class="four-icon iconfont icon-cuowu" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="availability" label="可用性" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.availability===1" class="four-icon iconfont icon-zhengque" /> |
|||
<span v-else class="four-icon iconfont icon-cuowu" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="safety" label="安全性" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.safety===1" class="four-icon iconfont icon-zhengque" /> |
|||
<span v-else class="four-icon iconfont icon-cuowu" /> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="createDate" label="检测结果" min-width="220"> |
|||
<template slot-scope="scope"> |
|||
<div>共检测{{ scope.row.totalNum }}项,<span class="testSuccess">通过{{ scope.row.successNum }}条</span>,<span class="testError">未通过{{ scope.row.errorNum }}条</span></div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
:current-page="page.page" |
|||
:total="page.total" |
|||
:page-size="page.size" |
|||
:pager-count="5" |
|||
layout="total, prev, pager, next, sizes" |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentPage" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
const data = [ |
|||
{ |
|||
'id': '005E76FEC5A2AAB368CA1F', |
|||
'admin': 'admin', |
|||
'archive_no': 'YXK-2022-JJ-001 ', |
|||
'maintitle': '文书档案001', |
|||
'createTime': 1660706815000, |
|||
'truth': 0, |
|||
'integrity': 1, |
|||
'availability': 0, |
|||
'safety': 0, |
|||
'totalNum': 5, |
|||
'successNum': 1, |
|||
'errorNum': 0 |
|||
}, |
|||
{ |
|||
'id': '005E76FEC5A2AAB368CA1F2', |
|||
'admin': 'admin', |
|||
'archive_no': 'YXK-2022-JJ-002 ', |
|||
'maintitle': '文书档案001', |
|||
'createTime': 1660706815000, |
|||
'truth': 0, |
|||
'integrity': 1, |
|||
'availability': 1, |
|||
'safety': 0, |
|||
'totalNum': 5, |
|||
'successNum': 1, |
|||
'errorNum': 0 |
|||
} |
|||
] |
|||
export default { |
|||
name: 'FourTestInfo', |
|||
components: { }, |
|||
mixins: [], |
|||
data() { |
|||
return { |
|||
tableData: [{}, {}], |
|||
page: { |
|||
page: 1, |
|||
size: 10, |
|||
total: 0 |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
mounted() { |
|||
this.tableData = data |
|||
}, |
|||
methods: { |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
@import "~@/assets/styles/collect-reorganizi.scss"; |
|||
</style> |
|||
@ -0,0 +1,81 @@ |
|||
<template> |
|||
<!--档案详情-操作记录--> |
|||
<div class="fourTest-container"> |
|||
<el-table :data="tableData" style="min-width: 100%" height="calc(100vh - 440px)"> |
|||
<el-table-column prop="type" label="操作类型" min-width="60" /> |
|||
<el-table-column prop="isAgree" label="处理意见" min-width="60" /> |
|||
<el-table-column prop="admin" label="处理人" min-width="60" /> |
|||
<el-table-column prop="createTime" label="处理时间" min-width="180"> |
|||
<template slot-scope="scope"> |
|||
<div>{{ scope.row.createTime | parseTime }}</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="remark" label="备注" min-width="60" /> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
:current-page="page.page" |
|||
:total="page.total" |
|||
:page-size="page.size" |
|||
:pager-count="5" |
|||
layout="total, prev, pager, next, sizes" |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentPage" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
const data = [ |
|||
{ |
|||
'id': '005E76FEC5A2AAB368CA1F', |
|||
'admin': 'admin', |
|||
'type': '预归档新增', |
|||
'isAgree': '同意', |
|||
'createTime': 1660706815000, |
|||
'remark': '' |
|||
}, |
|||
{ |
|||
'id': '005E76FEC5A2AAB368CA1F2', |
|||
'admin': 'admin', |
|||
'type': '装盒', |
|||
'isAgree': '拒绝', |
|||
'createTime': 1660706815000, |
|||
'remark': '' |
|||
} |
|||
] |
|||
export default { |
|||
name: 'HandleInfo', |
|||
components: { }, |
|||
mixins: [], |
|||
data() { |
|||
return { |
|||
tableData: [{}, {}], |
|||
page: { |
|||
page: 1, |
|||
size: 10, |
|||
total: 0 |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
mounted() { |
|||
this.tableData = data |
|||
}, |
|||
methods: { |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
@import "~@/assets/styles/collect-reorganizi.scss"; |
|||
</style> |
|||
@ -0,0 +1,363 @@ |
|||
<template> |
|||
<div class="upload-file"> |
|||
<!-- 上传附件curd --> |
|||
<div v-if="isUploadDetail" class="upload-curd"> |
|||
<div class="upload-btn"> |
|||
<el-button icon="el-icon-plus" size="small" type="primary">添加</el-button> |
|||
<input id="upFile" type="file" name="upFile" @change="changeFile($event)"> |
|||
</div> |
|||
<el-button icon="el-icon-delete" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button> |
|||
<el-button icon="el-icon-sort" @click="showSort">排序</el-button> |
|||
</div> |
|||
|
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
:data="tableData" |
|||
style="min-width: 100%" |
|||
height="calc(100vh - 382px)" |
|||
@row-click="clickRowHandler" |
|||
@selection-change="selectionChangeHandler" |
|||
> |
|||
<el-table-column v-if="isUploadDetail" type="selection" width="55" align="center" /> |
|||
<el-table-column type="index" label="序号" width="55" align="center" /> |
|||
<el-table-column prop="file_name" label="文件名称" show-overflow-tooltip min-width="140" /> |
|||
<el-table-column prop="file_type" label="格式" min-width="60" align="center" /> |
|||
<el-table-column prop="file_size" label="大小" min-width="85" align="center"> |
|||
<template slot-scope="scope"> |
|||
{{ getFileSize(scope.row.file_size) }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="file_dpi" label="分辨率" min-width="120" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div v-if="!scope.row.file_dpi || scope.row.file_dpi === 'null'"> - </div> |
|||
<div v-else> {{ scope.row.file_dpi }} </div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="file_thumbnail" label="缩览图" min-width="60" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div v-if="scope.row.file_type === 'jpg' || scope.row.file_type === 'jpeg' || scope.row.file_type === 'png' || scope.row.file_type === 'bmp'|| scope.row.file_type === 'gif'"> |
|||
<i class="fileIcon icon-image" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'xlsx' || scope.row.file_type === 'xls'"> |
|||
<i class="fileIcon icon-excel" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'docx' || scope.row.file_type === 'doc'"> |
|||
<i class="fileIcon icon-word" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'pdf'"> |
|||
<i class="fileIcon icon-pdf" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'ppt' || scope.row.file_type === 'pptx'"> |
|||
<i class="fileIcon icon-ppt" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'zip' || scope.row.file_type === 'rar'"> |
|||
<i class="fileIcon icon-zip" /> |
|||
</div> |
|||
<div v-else-if="scope.row.file_type === 'txt'"> |
|||
<i class="fileIcon icon-txt" /> |
|||
</div> |
|||
<div v-else> |
|||
<i class="fileIcon icon-other" /> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="create_time" label="创建时间" min-width="130" align="center" /> |
|||
</el-table> |
|||
|
|||
<!-- 排序 --> |
|||
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="排序" :visible.sync="sortVisible" @opened="opened"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<i class="drag-tip">提示:请通过拖动鼠标来调整当前顺序</i> |
|||
<el-table :data="sortTableData" class="file-sort" style="width: 100%;max-height: 70vh;" row-key="id"> |
|||
<el-table-column type="index" label="序号" width="100" align="center" /> |
|||
<el-table-column prop="file_name" label="文件名称" /> |
|||
</el-table> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click.native="handleSort">保存</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<!-- 删除附件 --> |
|||
<el-dialog title="删除附件" :append-to-body="true" :close-on-click-modal="false" :visible.sync="deleteVisible" :before-close="handleClose"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<div class="dialog-delt"> |
|||
<p><span>确定删除已选择的附件吗?</span></p> |
|||
</div> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
// import { FetchInitArchiveFilesView, FetchEditFile, FetchDeleteFile, FetchFileSort } from '@/api/archivesManage/archivesList' |
|||
import { FetchInitFileCategoryView } from '@/api/collect/collect' |
|||
import { archivesUpload } from '@/utils/upload' |
|||
import { downloadFile, getCurrentTime } from '@/utils/index' |
|||
import { mapGetters } from 'vuex' |
|||
import { form } from '@crud/crud' |
|||
import Sortable from 'sortablejs' |
|||
export default { |
|||
name: 'UploadFile', |
|||
components: {}, |
|||
mixins: [ |
|||
form({}) |
|||
], |
|||
inject: ['parentsData'], |
|||
props: { |
|||
isUploadDetail: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
storageCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
arcId: { |
|||
type: String, |
|||
default: function() { |
|||
return '' |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
defaultImg: 'this.src="' + require('@/assets/images/cover-bg.png') + '"', |
|||
tableData: [], // 附件list |
|||
selections: [], // table - 选中的 |
|||
showCoverVisible: false, // 查看大图dialog |
|||
sortTableData: [], // 排序data |
|||
sortVisible: false, // 排序dialog |
|||
deleteVisible: false, // 删除附件 dialog |
|||
deleteData: [], // 删除选中的data |
|||
file: null, // 附件 change |
|||
fileNames: '', // 附件 - name |
|||
formatType: '', // 附件 - type |
|||
postfix: '', // 附件 - 文件后缀 |
|||
fileSize: '', // 附件 - 大小 |
|||
filePath: '', // 附件 - path |
|||
px: '', // 附件 - 分辨率 |
|||
nowDate: '', // 当前时间 |
|||
previewSrc: '' // 查看大图src |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi' |
|||
]) |
|||
}, |
|||
watch: { |
|||
arcId: function(newValue, oldValue) { |
|||
} |
|||
}, |
|||
methods: { |
|||
getFileSize(fileSize) { |
|||
const fileSizeInKB = (fileSize / 1024).toFixed(2) + 'kB' |
|||
const fileSizeInB = fileSize + 'B' |
|||
return (fileSize / 1024) <= 0.01 ? fileSizeInB : fileSizeInKB |
|||
}, |
|||
// 选择附件 |
|||
async changeFile(e) { |
|||
this.file = e.target.files[0] |
|||
this.fileSize = this.file.size |
|||
this.formatType = this.file.type.substring(0, this.file.type.indexOf('/')) |
|||
this.fileNames = this.file.name |
|||
this.postfix = this.file.name.substring( |
|||
this.fileNames.lastIndexOf('.') + 1, |
|||
this.fileNames.length |
|||
) |
|||
if (this.formatType === 'image') { |
|||
const fileBase64 = await this.getBase64(this.file) |
|||
const res = await this.getImgPx(fileBase64) |
|||
this.px = res.width + 'px*' + res.height + 'px' |
|||
} else { |
|||
this.px = '' |
|||
} |
|||
// 上传附件 |
|||
archivesUpload(this.baseApi + '/api/archives/uploadFile', this.file, this.categoryId).then(res => { |
|||
if (res.data.code === 200) { |
|||
this.filePath = res.data.data |
|||
this.uploadSave() |
|||
} |
|||
}) |
|||
}, |
|||
// 上传附件 - 选择上传即保存 |
|||
uploadSave() { |
|||
this.nowDate = getCurrentTime() |
|||
const json = { |
|||
'file_name': this.fileNames, |
|||
'file_size': this.fileSize, |
|||
'file_type': this.postfix, |
|||
'file_path': this.filePath, |
|||
'sequence': null, |
|||
'archive_id': this.arcId, |
|||
'file_dpi': this.px, |
|||
'file_thumbnail': '', |
|||
'create_time': this.nowDate, |
|||
'id': null |
|||
} |
|||
const arrayUpload = [] |
|||
arrayUpload.push(json) |
|||
const params = { |
|||
'categoryId': this.categoryId, |
|||
'jsonString': JSON.stringify(arrayUpload) |
|||
} |
|||
console.log(params) |
|||
// FetchEditFile(params).then(data => { |
|||
// this.$message.success('上传附件成功!') |
|||
// this.crud.refresh() |
|||
// this.getFileList() |
|||
// }) |
|||
}, |
|||
// 将上传的图片转为base64 |
|||
getBase64(file) { |
|||
const reader = new FileReader() |
|||
reader.readAsDataURL(file) |
|||
return new Promise((resolve) => { |
|||
reader.onload = () => { |
|||
resolve(reader.result) |
|||
} |
|||
}) |
|||
}, |
|||
// 获取图片的分辨率 |
|||
getImgPx(img) { |
|||
const image = new Image() |
|||
image.src = img |
|||
return new Promise((resolve) => { |
|||
image.onload = () => { |
|||
const width = image.width |
|||
const height = image.height |
|||
resolve({ width, height }) |
|||
} |
|||
}) |
|||
}, |
|||
// 上传list |
|||
getFileList() { |
|||
const params = { |
|||
'categoryId': this.storageCategory.id, |
|||
'archivesId': this.arcId, |
|||
'page': 0, |
|||
'size': 10 |
|||
} |
|||
console.log(params) |
|||
FetchInitFileCategoryView(params).then(data => { |
|||
console.log('darta', data) |
|||
this.tableData = data.returnlist |
|||
}) |
|||
}, |
|||
// 下载附件 |
|||
downloadFile(row) { |
|||
const url = this.baseApi + '/downloadFile' + row.file_path |
|||
fetch(url).then(res => res.blob()).then(blob => { |
|||
downloadFile(blob, row.file_name.split('.')[0], row.file_type) |
|||
}).catch(() => { |
|||
this.$message({ message: '下载文件失败', type: 'error', offset: 8 }) |
|||
}) |
|||
}, |
|||
// 选择删除 |
|||
toDelete(data) { |
|||
this.deleteData = data |
|||
this.deleteVisible = true |
|||
}, |
|||
// 确认删除 |
|||
handleDeltConfirm() { |
|||
this.deleteVisible = false |
|||
const ids = [] |
|||
this.deleteData.forEach(val => { |
|||
ids.push(val.id) |
|||
}) |
|||
const params = { |
|||
'ids': ids, |
|||
'categoryId': this.categoryId |
|||
} |
|||
console.log(params) |
|||
// 删除fetch |
|||
// FetchDeleteFile(params).then(res => { |
|||
// this.crud.delAllLoading = false |
|||
// this.$message.success('删除成功!') |
|||
// this.crud.refresh() |
|||
// this.getFileList() |
|||
// }) |
|||
}, |
|||
// 排序 - 行拖拽 |
|||
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('file-sort', 'sortTableData') |
|||
}, |
|||
showSort() { |
|||
this.sortVisible = true |
|||
this.sortTableData = JSON.parse(JSON.stringify(this.tableData)) |
|||
}, |
|||
// 排序 - 保存 |
|||
handleSort() { |
|||
const ids = [] |
|||
const sequences = [] |
|||
this.sortTableData.map((value, index) => { |
|||
ids.push(value.id) |
|||
sequences.push(index + 1) |
|||
}) |
|||
const params = { |
|||
'categoryId': this.categoryId, |
|||
'ids': ids, |
|||
'sequences': sequences |
|||
} |
|||
console.log(params) |
|||
// FetchFileSort(params).then((res) => { |
|||
// this.sortVisible = false |
|||
// this.$message.success('附件排序成功!') |
|||
// this.crud.refresh() |
|||
// this.getFileList() |
|||
// }) |
|||
}, |
|||
// table |
|||
clickRowHandler(row) { |
|||
this.$refs.table.toggleRowSelection(row) |
|||
}, |
|||
// table |
|||
selectionChangeHandler(val) { |
|||
this.selections = val |
|||
}, |
|||
// dialog - close |
|||
handleClose(done) { |
|||
this.showCoverVisible = false |
|||
done() |
|||
}, |
|||
// 查看大图 |
|||
showCoverPreview(row) { |
|||
this.showCoverVisible = true |
|||
this.previewSrc = this.baseApi + '/downloadFile' + row.file_path |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.svg-style{ |
|||
width: 60px; |
|||
height: 32px; |
|||
} |
|||
|
|||
</style> |
|||
@ -0,0 +1,195 @@ |
|||
<template> |
|||
<div class="collect-no-tab"> |
|||
<CollectHeader ref="collectHeaderRef" :is-title-type="isTitleType" :storage-category="selectedCategory" :arc-id="arcId" :selections="selections" :storage-type="storageType" /> |
|||
<div class="collect-table"> |
|||
<el-table |
|||
ref="table" |
|||
v-loading="getTableDisplayFieldsLoading" |
|||
class="archives-table" |
|||
:data="projectData" |
|||
highlight-current-row |
|||
style="width: 100%;" |
|||
height="calc(100vh - 400px)" |
|||
:row-key="rowKey" |
|||
:row-class-name="tableRowClassName" |
|||
@select-all="selectAll" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@cell-dblclick="tableDoubleClick" |
|||
@select="handleCurrentChange" |
|||
> |
|||
<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"> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row.child === '' ? 0 : scope.row.child }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="maintitle" label="题名" align="center" /> |
|||
<el-table-column prop="project_no" label="项目号" align="center" /> |
|||
<el-table-column label="存放位置" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="!scope.row.folderLocationDetails">-</span> |
|||
<span v-else> |
|||
<el-tag effect="dark">{{ scope.row.folderLocationDetails }}</el-tag> |
|||
</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
v-if="projectData.length !== 0" |
|||
:current-page="page.page" |
|||
:total="page.total" |
|||
:page-size="page.size" |
|||
:pager-count="5" |
|||
layout="total, prev, pager, next, sizes" |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentPage" |
|||
/> |
|||
</div> |
|||
<!-- 档案详情 --> |
|||
<ArchivesInfo ref="archivesInfo" :storage-category="selectedCategory" :arc-id="arcId" :is-title-type="isTitleType" :is-collect="false" /> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { manageLibraryCrud } from '../mixins/index' |
|||
import { header, form } from '@crud/crud' |
|||
import CollectHeader from '../module/collectHeader.vue' |
|||
import ArchivesInfo from '../module/archivesInfo/index' |
|||
|
|||
export default { |
|||
name: 'Project', |
|||
components: { CollectHeader, ArchivesInfo }, |
|||
mixins: [ |
|||
header(), |
|||
form({}), |
|||
manageLibraryCrud |
|||
], |
|||
props: { |
|||
data: { |
|||
type: String, |
|||
default: '' |
|||
}, |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
smartQuery: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
storageType: { |
|||
type: String, |
|||
default: 'in' |
|||
} |
|||
}, |
|||
inject: ['parentsData'], |
|||
data() { |
|||
return { |
|||
isTitleType: 2, |
|||
categoryId: '', |
|||
arcId: '', |
|||
activeIndex: '1', |
|||
selections: [], |
|||
yearData: [], |
|||
parentId: null |
|||
} |
|||
}, |
|||
watch: { |
|||
selectedCategory: function(newValue, oldValue) { |
|||
}, |
|||
tableDisplayFields(val) { |
|||
this.doLayout() |
|||
} |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
getCommonData(categoryLevel, parentId, type) { |
|||
this.getViewTable(categoryLevel, parentId, type) |
|||
}, |
|||
sendYearDataToParent() { |
|||
this.$emit('myYearEvent', this.yearData) |
|||
}, |
|||
openAnjuan(data, parentId, parentRow) { |
|||
// this.$emit('openAnjuan', '传值') |
|||
this.$emit('openAnjuan', data, parentId, parentRow) |
|||
}, |
|||
rowKey(row) { |
|||
return row.id |
|||
}, |
|||
// table选中加上选中状态 |
|||
tableRowClassName({ row, rowIndex }) { |
|||
// console.log('添加类名', row, rowIndex) |
|||
let color = '' |
|||
this.selections.forEach(item => { |
|||
if (item.id === row.id) { |
|||
color = 'rowStyle' |
|||
} |
|||
}) |
|||
return color |
|||
}, |
|||
// table - 全选 |
|||
selectAll(val) { |
|||
this.selections = val |
|||
}, |
|||
// table - 双击查看详情 |
|||
tableDoubleClick(row) { |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
this.arcId = row.id |
|||
this.$nextTick(() => { |
|||
this.$refs.archivesInfo.detailTitle = '项目详情' |
|||
this.$refs.archivesInfo.archivesInfoVisible = true |
|||
this.$refs.archivesInfo.archivesTabIndex = 0 |
|||
this.$refs.archivesInfo.getDetial(1, row.id) |
|||
}) |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
this.parentsData.smartQuery = { |
|||
'retention': null, |
|||
'security_class': null, |
|||
'doc_type': null, |
|||
'medium_type': null, |
|||
'archive_year': null, |
|||
'fonds_no': null |
|||
} |
|||
if (this.timer) { |
|||
clearTimeout(this.timer) |
|||
} |
|||
this.timer = setTimeout(() => { |
|||
this.parentId = row.id |
|||
this.openAnjuan('所属项目:' + row.project_no, this.parentId, row) |
|||
this.getDictsList(1) |
|||
}, 300) |
|||
this.selections = this.crud.selections |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
this.selections = selection |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
this.getViewTable(1) |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
this.getViewTable(1) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
</style> |
|||
@ -1,22 +1,453 @@ |
|||
<template> |
|||
<div class="app-container tab-container"> |
|||
库存盘点 |
|||
<div class="app-container row-container"> |
|||
<div class="head-container" style="display: flex; justify-content: space-between;"> |
|||
<div class="head-search" style="margin-bottom: 0;"> |
|||
<el-input |
|||
v-model="typeValue" |
|||
size="small" |
|||
clearable |
|||
placeholder="请输入搜索关键字" |
|||
style="width: 300px;" |
|||
class="input-prepend filter-item" |
|||
@clear="crud.toQuery" |
|||
@keyup.enter.native="crud.toQuery" |
|||
@input="typeInput" |
|||
> |
|||
<el-select slot="prepend" v-model="inputSelect" style="width: 92px" @change="clearInputValue"> |
|||
<el-option |
|||
v-for="item in options" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-input> |
|||
<rrOperation /> |
|||
</div> |
|||
<div class="handle-container" style="display: flex;"> |
|||
<crudOperation :permission="permission"> |
|||
<template v-slot:right> |
|||
<el-button slot="reference" size="mini" :loading="crud.delAllLoading" :disabled="!(selections.length===1 && selections[0].checkState === 1)"> |
|||
<i class="iconfont icon-jiesuan" /> |
|||
结算 |
|||
</el-button> |
|||
<!-- @click="doExport(selections)" --> |
|||
<el-button size="mini" :disabled="selections.length === 0"> |
|||
<i class="iconfont icon-daochu" /> |
|||
导出 |
|||
</el-button> |
|||
</template> |
|||
</crudOperation> |
|||
<el-button size="mini" style="margin-left: 60px;"> |
|||
<i class="iconfont icon-shanchu" /> |
|||
清空缓存 |
|||
</el-button> |
|||
</div> |
|||
</div> |
|||
<div style="padding: 5px 0 10px 0; font-weight: bold; color: #545B65;font-size: 12px; text-align: right; cursor: pointer;" @click="handleTipContent"> |
|||
<i style="font-size:14px; color:#ED4A41; margin-right: 2px;" class="el-icon-warning" />提示:<span style="color: #0C0E1E;">应盘</span> = |
|||
<span style="color: #12C37A;">已盘</span>+ |
|||
<span style="color: #12C37A;">已借</span>+ |
|||
<span style="color: #FF8329;">错位</span>+ |
|||
<span style="color: #ED4A41;">未盘</span>+ |
|||
<span style="color: #ED4A41;">异常</span> |
|||
<span style="display: inline-block; padding-left: 20px;"><i style="font-style:normal; color: #8B43F0; padding: 0 2px;">多盘</i>为非本盘点单计数</span> |
|||
</div> |
|||
|
|||
<div class="container-wrap" style="min-height: calc(100vh - 340px)"> |
|||
<span class="right-top-line" /> |
|||
<span class="left-bottom-line" /> |
|||
<!--表格渲染--> |
|||
<el-table |
|||
ref="table" |
|||
:data="crud.data" |
|||
:cell-class-name="cell" |
|||
:loading="crud.downloadLoading" |
|||
style="min-width: 100%" |
|||
height="calc(100vh - 340px)" |
|||
:header-cell-class-name="headerRowStyle" |
|||
@selection-change="selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@row-dblclick="handleDbClick" |
|||
> |
|||
<el-table-column type="selection" align="center" width="55" /> |
|||
<el-table-column prop="id" show-overflow-tooltip align="center" label="盘点单号" min-width="140" /> |
|||
<el-table-column prop="region" show-overflow-tooltip align="center" label="包含位置" min-width="100" /> |
|||
<el-table-column prop="archiveYears" show-overflow-tooltip align="center" label="年度" min-width="80" /> |
|||
<el-table-column prop="checkState" align="center" label="盘点状态" min-width="80"> |
|||
<template slot-scope="scope"> |
|||
<!-- 已执行 / 待执行 / 执行中 --> |
|||
<span class="clear">{{ scope.row.checkState | checkState }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="should" align="center" label="应盘" min-width="60"> |
|||
<template slot-scope="scope"> |
|||
<span :style="{'color': scope.row.should !== 0 ? '#fff': ''}">{{ scope.row.should }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="checked" align="center" label="已盘" min-width="60"> |
|||
<template slot-scope="scope"> |
|||
<span :style="{'color': scope.row.checked !== 0 ? '#1aae93': ''}">{{ scope.row.checked }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="borrowed" align="center" label="已借" min-width="60"> |
|||
<template slot-scope="scope"> |
|||
<span v-if="scope.row.arrangeType===1">-</span> |
|||
<span v-if="scope.row.arrangeType===2" :style="{'color': scope.row.borrowed !== 0 ? '#1aae93': ''}">{{ scope.row.borrowed }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="dislocation" align="center" label="错位" min-width="60"> |
|||
<template slot-scope="scope"> |
|||
<span :style="{'color': scope.row.dislocation !== 0 ? '#fd8042': ''}">{{ scope.row.dislocation }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="noCheck" align="center" label="未盘" min-width="60"> |
|||
<template slot-scope="scope"> |
|||
<span :style="{'color': scope.row.noCheck !== 0 ? '#f65163': ''}">{{ scope.row.noCheck }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<!-- <el-table-column prop="checked" align="center" label="已盘档案" min-width="60" /> --> |
|||
<el-table-column prop="abnormal" align="center" label="异常" min-width="60"> |
|||
<template slot-scope="scope"> |
|||
<span :style="{'color': scope.row.abnormal !== 0 ? '#f65163': ''}">{{ scope.row.abnormal }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="surplus" align="center" label="多盘" min-width="60"> |
|||
<template slot-scope="scope"> |
|||
<span :style="{'color': scope.row.surplus !== 0 ? '#8378E8': ''}">{{ scope.row.surplus }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<!-- <el-table-column prop="others" align="center" label="多余档案" min-width="60" /> --> |
|||
<el-table-column prop="create_time" align="center" label="创建时间" min-width="120"> |
|||
<template slot-scope="scope"> |
|||
<div>{{ scope.row.create_time | parseTime }}</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="arrangeTime" align="center" label="同步时间" min-width="120"> |
|||
<template slot-scope="scope"> |
|||
<div>{{ scope.row.arrangeTime | parseTime }}</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="endTime" align="center" label="结算时间" min-width="120"> |
|||
<template slot-scope="scope"> |
|||
<div>{{ scope.row.endTime | parseTime }}</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<pagination /> |
|||
</div> |
|||
|
|||
<!-- 盘点状态说明 --> |
|||
<el-dialog class="check-tip-dialog" title="盘点结果说明" append-to-body :close-on-click-modal="false" :modal-append-to-body="false" :visible.sync="tipContentVisible" :before-close="handleClose"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<div class="dialog-delt"> |
|||
<div style="font-size: 14px; color: #0C0E1E; line-height: 20px;"> |
|||
应盘 = |
|||
<span style="color: #12C37A;">已盘</span> + |
|||
<span style="color: #12C37A;">已借</span> + |
|||
<span style="color: #FF8329;">错位</span> + |
|||
<span style="color: #ED4A41;">未盘</span> + |
|||
<span style="color: #ED4A41;">异常</span> |
|||
<span style="display: inline-block; padding-left: 20px;"><i style="font-style:normal; color: #8B43F0; padding: 0 2px;">多盘</i>为非本盘点单计数</span> |
|||
</div> |
|||
<ul class="checkTip"> |
|||
<li><span style="font-weight:bold;">应盘</span><p>当前盘点单中涉及到的全部档案文件或档案盒的数量</p></li> |
|||
<li><span style="font-weight:bold;color: #2ECAAC; border-color: #B1EBDF; background-color: #E8F8F5;">已盘</span><p>正确的档案文件或档案盒在正确的位置被盘点到</p></li> |
|||
<li><span style="font-weight:bold;color: #12C37A; border-color: #B1EBDF; background-color: #E8F8F5;">已借</span><p>在当前盘点单中,已经借出的档案文件(按盒盘点时,无已借数量)</p></li> |
|||
<li><span style="font-weight:bold;color: #FF8329; border-color: #FEBD98; background-color: #FFF3E5;">错位</span><p>在当前盘点单中,盘点到不属于当前位置的档案文件或档案盒</p></li> |
|||
<li><span style="font-weight:bold;color: #ED4A41; border-color: #FBB5B5; background-color: #FCE9E9;">未盘</span><p>在当前盘点单中,未被盘点到的档案文件或档案盒(默认状态)</p></li> |
|||
<li><span style="font-weight:bold;color: #ED4A41; border-color: #FBB5B5; background-color: #FCE9E9;">异常</span><p>在按件盘点时,已借档案被盘点到,盘点时自动变更状态;在按盒盘点时,盒内档案数量异常,盘点时手动变更状态</p></li> |
|||
<li><span style="font-weight:bold;color: #8B43F0; border-color: #CAA4FF; background-color: #F4EDFF;">多盘</span><p>不在当前盘点单中但被盘点到的档案文件或档案盒</p></li> |
|||
</ul> |
|||
</div> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click.native="tipContentVisible = false">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import CRUD, { presenter, header } from '@crud/crud' |
|||
import rrOperation from '@crud/RR.operation' |
|||
import crudOperation from '@crud/CRUD.operation' |
|||
import pagination from '@crud/Pagination' |
|||
import { getArrange, getArrangeDetailes, checkDel, settlement, arrangeClean } from '@/api/archivesManage/archivesCheck' |
|||
import { exportFile } from '@/utils/index' |
|||
import qs from 'qs' |
|||
import { mapGetters } from 'vuex' |
|||
export default { |
|||
name: 'InventoryCheck', |
|||
components: { |
|||
components: { rrOperation, crudOperation, pagination }, |
|||
cruds() { |
|||
return [ |
|||
CRUD({ |
|||
title: '库存盘点', url: 'api/category/menu', |
|||
crudMethod: { }, |
|||
optShow: { |
|||
add: true, |
|||
edit: false, |
|||
del: true, |
|||
download: false, |
|||
group: false |
|||
} |
|||
}) |
|||
] |
|||
}, |
|||
mixins: [presenter(), header()], |
|||
data() { |
|||
return { |
|||
permission: { |
|||
add: ['admin', 'check:add'], |
|||
edit: ['admin', 'check:edit'], |
|||
del: ['admin', 'check:del'] |
|||
}, |
|||
options: [ |
|||
{ value: 'region', label: '区域' }, |
|||
{ value: 'orderNo', label: '盘点单号' } |
|||
], |
|||
inputSelect: '', |
|||
typeValue: '', |
|||
typeInputkey: '', |
|||
selections: [], |
|||
tipContentVisible: false |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi' |
|||
]) |
|||
}, |
|||
created() { |
|||
this.inputSelect = this.options[0].value |
|||
}, |
|||
methods: { |
|||
headerRowStyle(obj) { |
|||
if (obj.column.label === '应盘') { |
|||
return 'yingp' |
|||
} |
|||
if (obj.column.label === '已盘') { |
|||
return 'yip' |
|||
} |
|||
if (obj.column.label === '未盘') { |
|||
return 'weip' |
|||
} |
|||
if (obj.column.label === '已借') { |
|||
return 'yij' |
|||
} |
|||
if (obj.column.label === '异常') { |
|||
return 'yic' |
|||
} |
|||
if (obj.column.label === '错位') { |
|||
return 'cuow' |
|||
} |
|||
if (obj.column.label === '多盘') { |
|||
return 'dp' |
|||
} |
|||
}, |
|||
// 获取数据前的处理 |
|||
[CRUD.HOOK.beforeRefresh]() { |
|||
this.crud.downloadLoading = true |
|||
this.crud.query.checkState = null |
|||
this.crud.query.id = null |
|||
this.crud.query.region = null |
|||
if (this.stateVal > -1) { |
|||
this.crud.query.checkState = this.stateVal |
|||
} |
|||
// todo |
|||
if (this.cateSearch === 'region') { |
|||
this.crud.query.region = this.keyWord |
|||
} else { |
|||
this.crud.query.orderNo = this.keyWord |
|||
} |
|||
this.crud.downloadLoading = false |
|||
}, |
|||
// 删除 |
|||
handleDel() { |
|||
const bool = this.selections.every(item => item.checkState === 0) |
|||
if (bool) { |
|||
this.deleteVisible = true |
|||
} else { |
|||
this.$message({ |
|||
message: '只能删除待执行的档案', |
|||
type: 'warning' |
|||
}) |
|||
} |
|||
}, |
|||
handleDelConfirm() { |
|||
const ids = this.selections.map(item => { return item.id }) |
|||
checkDel(ids).then(res => { |
|||
if (res) { |
|||
this.crud.refresh() |
|||
this.$message({ |
|||
message: '删除成功', |
|||
type: 'success' |
|||
}) |
|||
this.deleteVisible = false |
|||
} else { |
|||
this.$message.error('删除失败') |
|||
} |
|||
}) |
|||
}, |
|||
// 结算 |
|||
handleCalc() { |
|||
const calcDom = this.$refs.calcDom |
|||
calcDom.calcVisible = true |
|||
calcDom.stepActive = 2 |
|||
const params = { |
|||
'orderId': this.selections[0].id |
|||
} |
|||
settlement(params).then(res => { |
|||
if (res) { |
|||
calcDom.stepActive = 3 |
|||
calcDom.res = 1 |
|||
calcDom.source = this.source |
|||
// calcDom.calcVisible = false |
|||
this.crud.refresh() |
|||
} else { |
|||
calcDom.stepActive = 3 |
|||
calcDom.res = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 清空缓存 |
|||
handleClear() { |
|||
arrangeClean().then(res => { |
|||
// this.crud.refresh() |
|||
this.$message({ |
|||
message: '清空成功', |
|||
type: 'success' |
|||
}) |
|||
}) |
|||
}, |
|||
// 新增盘点 |
|||
handleAdd() { |
|||
this.$refs.addCheckDom.addFormVisible = true |
|||
}, |
|||
handleClose() { |
|||
this.deleteVisible = false |
|||
this.tipContentVisible = false |
|||
}, |
|||
cell({ row, columnIndex }) { |
|||
if (row.checkState === 2 && columnIndex === 4) { |
|||
return 'have-clear' |
|||
} else if (row.checkState === 0 && columnIndex === 4) { |
|||
return 'fail-clear' |
|||
} else if (row.checkState === 1 && columnIndex === 4) { |
|||
return 'no-clear' |
|||
} |
|||
}, |
|||
selectionChangeHandler(val) { |
|||
this.selections = val |
|||
}, |
|||
clickRowHandler(row) { |
|||
this.$refs.table.toggleRowSelection(row) |
|||
}, |
|||
// 双击详情 |
|||
handleDbClick(row) { |
|||
const checkDetailDom = this.$refs.checkDetailDom |
|||
const params = { |
|||
orderNo: row.id |
|||
} |
|||
getArrange(params).then(res => { |
|||
checkDetailDom.rowData = [] |
|||
checkDetailDom.rowData.push(res) |
|||
}) |
|||
getArrangeDetailes(params).then(res => { |
|||
checkDetailDom.tableData = res.content |
|||
}) |
|||
checkDetailDom.detailVisible = true |
|||
checkDetailDom.arrangeType = row.arrangeType |
|||
}, |
|||
// 导出 |
|||
handleExport() { |
|||
this.btnLoading = true |
|||
const id = this.selections[0].id |
|||
const params = { |
|||
'orderNo': id |
|||
} |
|||
exportFile(this.baseApi + '/api/arrange/exportArrange?' + qs.stringify(params, { indices: false })) |
|||
this.btnLoading = false |
|||
}, |
|||
handleTipContent() { |
|||
this.tipContentVisible = true |
|||
}, |
|||
typeInput(e) { |
|||
this.typeInputkey = this.getDescByValue( |
|||
this.inputSelect, |
|||
this.options, |
|||
'value', |
|||
'value' |
|||
) |
|||
this.crud.query[this.typeInputkey] = e |
|||
}, |
|||
clearInputValue(val) { |
|||
this.inputSelect = val |
|||
this.typeValue = '' |
|||
if (this.typeInputkey) { |
|||
delete this.crud.query[this.typeInputkey] |
|||
} |
|||
}, |
|||
getDescByValue(inputValue, data, inputKey = 'value', outputKey = 'value') { |
|||
let outputValue = '' |
|||
if (data && data.length > 0) { |
|||
for (let i = 0; i < data.length; i++) { |
|||
const item = data[i] |
|||
const itemValue = item[inputKey] |
|||
if (inputValue + '' === itemValue + '') { |
|||
outputValue = item[outputKey] |
|||
break |
|||
} |
|||
} |
|||
} |
|||
return outputValue |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
::v-deep .input-prepend .el-input__inner{ |
|||
padding-left: 100px; |
|||
} |
|||
.row-container .container-wrap{ |
|||
margin-top: 0 !important; |
|||
} |
|||
.check-tip-dialog{ |
|||
::v-deep .el-dialog{ |
|||
width: 650px !important; |
|||
} |
|||
} |
|||
.dialog-delt{ |
|||
padding: 0 20px; |
|||
} |
|||
.checkTip{ |
|||
margin-top: 20px; |
|||
li{ |
|||
display: flex; |
|||
justify-content: flex-start; |
|||
padding-bottom: 12px; |
|||
color: #545B65; |
|||
line-height: 24px; |
|||
p{ |
|||
flex: 1; |
|||
} |
|||
span{ |
|||
display: block; |
|||
width: 42px; |
|||
height: 22px; |
|||
margin-right: 10px; |
|||
font-size: 12px; |
|||
line-height: 20px; |
|||
text-align: center; |
|||
border-radius: 3px; |
|||
border: 1px solid #97A3B7; |
|||
background-color: #F2F4F6; |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue