|
|
|
@ -1,88 +1,99 @@ |
|
|
|
<template> |
|
|
|
<!-- 移动 --> |
|
|
|
<el-dialog class="move-form" append-to-body :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible="moveVisible" title="移动" @opened="opened"> |
|
|
|
<span class="dialog-right-top" /> |
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
<div class="setting-dialog"> |
|
|
|
<div class="move-main"> |
|
|
|
<div class="move-left"> |
|
|
|
<el-tree |
|
|
|
ref="treeMove" |
|
|
|
:data="categoryTree" |
|
|
|
node-key="id" |
|
|
|
default-expand-all |
|
|
|
:props="defaultProps" |
|
|
|
:expand-on-click-node="false" |
|
|
|
@node-click="handleMoveNodeClick" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div class="move-right"> |
|
|
|
<div style="padding: 10px;"> |
|
|
|
<el-input v-model="query.search" placeholder="输入题名或档号搜索" style="width: 200px;" /> |
|
|
|
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getViewTableList('search')">搜索</el-button> |
|
|
|
<div> |
|
|
|
<!-- 移动 --> |
|
|
|
<el-dialog class="move-form" append-to-body :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible="moveVisible" title="移动" @opened="opened"> |
|
|
|
<span class="dialog-right-top" /> |
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
<div class="setting-dialog"> |
|
|
|
<div class="move-main"> |
|
|
|
<div class="move-left"> |
|
|
|
<el-tree |
|
|
|
ref="treeMove" |
|
|
|
:data="categoryTree" |
|
|
|
node-key="id" |
|
|
|
default-expand-all |
|
|
|
:props="defaultProps" |
|
|
|
:expand-on-click-node="false" |
|
|
|
@node-click="handleMoveNodeClick" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div class="raido-main"> |
|
|
|
<!-- @select="handleSelect" |
|
|
|
<div class="move-right"> |
|
|
|
<div style="padding: 10px;"> |
|
|
|
<el-input v-model="query.search" placeholder="输入题名或档号搜索" style="width: 200px;" /> |
|
|
|
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getViewTableList('search')">搜索</el-button> |
|
|
|
</div> |
|
|
|
<div class="raido-main"> |
|
|
|
<!-- @select="handleSelect" |
|
|
|
@selection-change="selectionChangeHandler" |
|
|
|
@row-click="clickRowHandler" --> |
|
|
|
<el-table |
|
|
|
ref="table" |
|
|
|
v-loading="loading" |
|
|
|
lazy |
|
|
|
:data="tableData" |
|
|
|
style="width: 100%;" |
|
|
|
:row-key="getRowKey" |
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
|
|
|
highlight-current-row |
|
|
|
@selection-change="selectionChangeHandler" |
|
|
|
@row-click="clickRowHandler" |
|
|
|
> |
|
|
|
<el-table-column type="selection" align="center" width="55" /> |
|
|
|
<el-table-column label="序号" width="55" align="center" show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ (page.page === 1 ? 0 : (page.page === 0 ? 0 : page.page - 1)) * page.size + scope.$index + 1 }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column :label="selectedCategoryMove.arrangeType === 1 ? '原文':'卷内'" prop="child" width="55" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.child === '' ? 0 : scope.row.child }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> |
|
|
|
<template slot="header"> |
|
|
|
<el-tooltip |
|
|
|
class="item" |
|
|
|
effect="dark" |
|
|
|
:content="field.fieldCnName" |
|
|
|
placement="top-start" |
|
|
|
> |
|
|
|
<span>{{ field.fieldCnName }}</span> |
|
|
|
</el-tooltip> |
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row[field.fieldName] }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-table |
|
|
|
ref="table" |
|
|
|
v-loading="loading" |
|
|
|
lazy |
|
|
|
:data="tableData" |
|
|
|
style="width: 100%;" |
|
|
|
:row-key="getRowKey" |
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
|
|
|
highlight-current-row |
|
|
|
@selection-change="selectionChangeHandler" |
|
|
|
@row-click="clickRowHandler" |
|
|
|
> |
|
|
|
<el-table-column type="selection" align="center" width="55" /> |
|
|
|
<el-table-column label="序号" width="55" align="center" show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ (page.page === 1 ? 0 : (page.page === 0 ? 0 : page.page - 1)) * page.size + scope.$index + 1 }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column :label="selectedCategoryMove.arrangeType === 1 ? '原文':'卷内'" prop="child" width="55" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.child === '' ? 0 : scope.row.child }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip> |
|
|
|
<template slot="header"> |
|
|
|
<el-tooltip |
|
|
|
class="item" |
|
|
|
effect="dark" |
|
|
|
:content="field.fieldCnName" |
|
|
|
placement="top-start" |
|
|
|
> |
|
|
|
<span>{{ field.fieldCnName }}</span> |
|
|
|
</el-tooltip> |
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row[field.fieldName] }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<el-pagination |
|
|
|
v-if="tableData.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-pagination |
|
|
|
v-if="tableData.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> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="text" @click="closedDialog">取消</el-button> |
|
|
|
<el-button :loading="archivesBtnLoading" type="primary" @click="handleComfirmed">确定</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="text" @click="closedDialog">取消</el-button> |
|
|
|
<el-button :loading="archivesBtnLoading" type="primary" @click="handleComfirmed">确定</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
<MergeIntoDocument |
|
|
|
ref="mergeIntoDocument" |
|
|
|
:selected-category="selectedDocument" |
|
|
|
:selections="moveArc" |
|
|
|
:display-fields="displayFields" |
|
|
|
:business-type="10" |
|
|
|
:extra-params="moveFlowParams" |
|
|
|
@close-dialog="handleMoveFlowSuccess" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
@ -90,11 +101,13 @@ import { preLibraryCrud } from '../mixins/index' |
|
|
|
import { FetchMove } from '@/api/prearchiveLibrary/prearchiveLibrary' |
|
|
|
import { FetchMenuByFondsId } from '@/api/system/category/category' |
|
|
|
import { FetchInitCategoryViewTable, FetchInitCategoryView } from '@/api/collect/collect' |
|
|
|
import { FetchReDocumentInitFlowByCategoryId } from '@/api/system/category/process' |
|
|
|
import MergeIntoDocument from './mergeIntoDocument.vue' |
|
|
|
// import { FetchInitSearchFonds } from '@/api/archiveUtilize/archiveUtilize' |
|
|
|
import Vue from 'vue' |
|
|
|
export default { |
|
|
|
name: 'MoveFile', |
|
|
|
components: { }, |
|
|
|
components: { MergeIntoDocument }, |
|
|
|
mixins: [preLibraryCrud], |
|
|
|
props: { |
|
|
|
selectedDocument: { |
|
|
|
@ -102,6 +115,10 @@ export default { |
|
|
|
default: function() { |
|
|
|
return {} |
|
|
|
} |
|
|
|
}, |
|
|
|
displayFields: { |
|
|
|
type: Array, |
|
|
|
default: () => [] |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
@ -119,6 +136,7 @@ export default { |
|
|
|
tableDisplayFields: [], |
|
|
|
selections: [], |
|
|
|
moveArc: [], |
|
|
|
moveFlowParams: {}, |
|
|
|
defaultProps: { children: 'children', label: 'cnName' }, |
|
|
|
page: { |
|
|
|
page: 1, |
|
|
|
@ -284,26 +302,56 @@ export default { |
|
|
|
const archivesIds = this.moveArc.map(item => { |
|
|
|
return item.id |
|
|
|
}) |
|
|
|
const params = { |
|
|
|
'archivesId': this.selections[0].id, // 移动到的收集库档案id |
|
|
|
'archivesIds': archivesIds, // 移动的预归档档案信息 |
|
|
|
'categoryId': this.selectedCategoryMove.id, // 门类id |
|
|
|
'documentId': this.selectedDocument.id // 预归档门类id |
|
|
|
} |
|
|
|
console.log(params) |
|
|
|
FetchMove(params).then((res) => { |
|
|
|
if (res.code !== 500) { |
|
|
|
this.$message({ message: res, type: 'success', offset: 8 }) |
|
|
|
// 判断预归档移动审批流程是否开启 |
|
|
|
FetchReDocumentInitFlowByCategoryId({ 'documentId': null }).then((flowRes) => { |
|
|
|
const flowItem = flowRes && flowRes.length > 0 ? flowRes[0] : null |
|
|
|
if (flowItem && flowItem.status === 1) { |
|
|
|
// 审批流程开启,走流程提交 |
|
|
|
this.moveFlowParams = { |
|
|
|
'archivesIds': archivesIds, // 移动的预归档档案信息 |
|
|
|
'purposeCategoryId': this.selectedCategoryMove.id, // 目的门类(预归档用) |
|
|
|
'sourceDocumentId': this.selectedDocument.id, // 预归档门类id |
|
|
|
'archivalCategoryCode': this.selectedCategoryMove.code, |
|
|
|
'moveArchiveId': this.selections[0].id // 移动到的收集库档案id |
|
|
|
} |
|
|
|
this.archivesBtnLoading = false |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs.mergeIntoDocument.archivesFillingVisible = true |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ message: '移动操作失败', type: 'error', offset: 8 }) |
|
|
|
// 审批流程未开启,直接移动 |
|
|
|
const params = { |
|
|
|
'archivesId': this.selections[0].id, // 移动到的收集库档案id |
|
|
|
'archivesIds': archivesIds, // 移动的预归档档案信息 |
|
|
|
'categoryId': this.selectedCategoryMove.id, // 门类id |
|
|
|
'documentId': this.selectedDocument.id // 预归档门类id |
|
|
|
} |
|
|
|
console.log(params) |
|
|
|
FetchMove(params).then((res) => { |
|
|
|
if (res.code !== 500) { |
|
|
|
this.$message({ message: res, type: 'success', offset: 8 }) |
|
|
|
} else { |
|
|
|
this.$message({ message: '移动操作失败', type: 'error', offset: 8 }) |
|
|
|
} |
|
|
|
this.moveVisible = false |
|
|
|
this.query.search = null |
|
|
|
this.selections = [] |
|
|
|
this.$emit('refresh') |
|
|
|
this.archivesBtnLoading = false |
|
|
|
}) |
|
|
|
} |
|
|
|
this.moveVisible = false |
|
|
|
this.query.search = null |
|
|
|
this.selections = [] |
|
|
|
this.$emit('refresh') |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
this.archivesBtnLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 预归档移动审批流程提交成功回调 |
|
|
|
handleMoveFlowSuccess() { |
|
|
|
this.moveVisible = false |
|
|
|
this.query.search = null |
|
|
|
this.selections = [] |
|
|
|
this.$emit('refresh') |
|
|
|
}, |
|
|
|
handleSizeChange(size) { |
|
|
|
this.page.size = size |
|
|
|
this.page.page = 1 |
|
|
|
|