|
@ -1,6 +1,6 @@ |
|
|
<template> |
|
|
<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="移动"> |
|
|
|
|
|
|
|
|
<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-right-top" /> |
|
|
<span class="dialog-left-bottom" /> |
|
|
<span class="dialog-left-bottom" /> |
|
|
<div class="setting-dialog"> |
|
|
<div class="setting-dialog"> |
|
@ -19,8 +19,8 @@ |
|
|
</div> |
|
|
</div> |
|
|
<div class="move-right"> |
|
|
<div class="move-right"> |
|
|
<div style="padding: 10px;"> |
|
|
<div style="padding: 10px;"> |
|
|
<el-input v-model="query.keyWord" placeholder="输入题名或档号搜索" style="width: 200px;" /> |
|
|
|
|
|
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search">搜索</el-button> |
|
|
|
|
|
|
|
|
<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">搜索</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="raido-main"> |
|
|
<div class="raido-main"> |
|
|
<!-- @select="handleSelect" |
|
|
<!-- @select="handleSelect" |
|
@ -28,33 +28,48 @@ |
|
|
@row-click="clickRowHandler" --> |
|
|
@row-click="clickRowHandler" --> |
|
|
<el-table |
|
|
<el-table |
|
|
ref="table" |
|
|
ref="table" |
|
|
v-loading="crud.loading" |
|
|
|
|
|
|
|
|
v-loading="loading" |
|
|
lazy |
|
|
lazy |
|
|
:show-header="false" |
|
|
|
|
|
:data="tableData" |
|
|
:data="tableData" |
|
|
:row-key="getRowKey" |
|
|
:row-key="getRowKey" |
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
|
|
highlight-current-row |
|
|
highlight-current-row |
|
|
|
|
|
@selection-change="selectionChangeHandler" |
|
|
|
|
|
@row-click="clickRowHandler" |
|
|
> |
|
|
> |
|
|
<el-table-column type="selection" align="center" width="55" /> |
|
|
<el-table-column type="selection" align="center" width="55" /> |
|
|
<el-table-column prop="status" label="状态" /> |
|
|
|
|
|
<el-table-column :show-overflow-tooltip="true" prop="scopeName" label="名称" /> |
|
|
|
|
|
|
|
|
<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> |
|
|
</div> |
|
|
</div> |
|
|
<el-pagination |
|
|
<el-pagination |
|
|
:current-page="currentPage" |
|
|
|
|
|
:page-sizes="[10, 20, 30, 50]" |
|
|
|
|
|
:page-size="10" |
|
|
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
|
|
:total="30" |
|
|
|
|
|
|
|
|
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" |
|
|
@size-change="handleSizeChange" |
|
|
@current-change="handleCurrentChange" |
|
|
|
|
|
|
|
|
@current-change="handleCurrentPage" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button type="text" @click="formVisible = false">取消</el-button> |
|
|
|
|
|
<el-button type="primary" @click="formVisible = false">确定</el-button> |
|
|
|
|
|
|
|
|
<el-button type="text" @click="closedDialog">取消</el-button> |
|
|
|
|
|
<el-button type="primary" @click="handleComfirmed">确定</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
@ -63,7 +78,8 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { preLibraryCrud } from '../mixins/index' |
|
|
import { preLibraryCrud } from '../mixins/index' |
|
|
import CRUD, { presenter, header, crud } from '@crud/crud' |
|
|
import CRUD, { presenter, header, crud } from '@crud/crud' |
|
|
// import { FetchMove } from '@/api/prearchiveLibrary/prearchiveLibrary' |
|
|
|
|
|
|
|
|
import { FetchMove } from '@/api/prearchiveLibrary/prearchiveLibrary' |
|
|
|
|
|
import { FetchInitCategoryViewTable, FetchInitSingleCategoryView } from '@/api/collect/collect' |
|
|
import Vue from 'vue' |
|
|
import Vue from 'vue' |
|
|
export default { |
|
|
export default { |
|
|
name: 'MoveFile', |
|
|
name: 'MoveFile', |
|
@ -77,27 +93,37 @@ export default { |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
mixins: [presenter(), header(), crud(), preLibraryCrud], |
|
|
mixins: [presenter(), header(), crud(), preLibraryCrud], |
|
|
|
|
|
props: { |
|
|
|
|
|
selectedDocument: { |
|
|
|
|
|
type: Object, |
|
|
|
|
|
default: function() { |
|
|
|
|
|
return {} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
selectedCategoryMove: {}, |
|
|
selectedCategoryMove: {}, |
|
|
options: [ |
|
|
|
|
|
{ |
|
|
|
|
|
value: 1, |
|
|
|
|
|
label: '已整理' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
value: 2, |
|
|
|
|
|
label: '未整理' |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
query: { |
|
|
query: { |
|
|
status: '', |
|
|
|
|
|
keyWord: '' |
|
|
|
|
|
|
|
|
search: '' |
|
|
}, |
|
|
}, |
|
|
moveVisible: false, |
|
|
moveVisible: false, |
|
|
|
|
|
loading: false, |
|
|
|
|
|
arrySort: [], |
|
|
tableData: [], |
|
|
tableData: [], |
|
|
|
|
|
tableDisplayFields: [], |
|
|
|
|
|
selections: [], |
|
|
|
|
|
moveArc: [], |
|
|
defaultProps: { children: 'children', label: 'cnName' }, |
|
|
defaultProps: { children: 'children', label: 'cnName' }, |
|
|
currentPage: 1 |
|
|
|
|
|
|
|
|
page: { |
|
|
|
|
|
page: 1, |
|
|
|
|
|
size: 10, |
|
|
|
|
|
total: 0 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
selectedDocument: function(newValue, oldValue) { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@ -108,10 +134,15 @@ export default { |
|
|
}, |
|
|
}, |
|
|
[CRUD.HOOK.afterRefresh]() { |
|
|
[CRUD.HOOK.afterRefresh]() { |
|
|
this.crud.data = this.filterData(this.crud.data) |
|
|
this.crud.data = this.filterData(this.crud.data) |
|
|
this.$nextTick(() => { |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
opened() { |
|
|
|
|
|
this.refresh() |
|
|
|
|
|
}, |
|
|
|
|
|
refresh() { |
|
|
if (this.$refs.treeMove) { |
|
|
if (this.$refs.treeMove) { |
|
|
let currentKey |
|
|
let currentKey |
|
|
if (this.crud.data[0].isType === 1) { |
|
|
if (this.crud.data[0].isType === 1) { |
|
|
|
|
|
console.log(currentKey) |
|
|
currentKey = this.findNode(this.crud.data[0].children, (node) => { |
|
|
currentKey = this.findNode(this.crud.data[0].children, (node) => { |
|
|
return node.isType !== 1 |
|
|
return node.isType !== 1 |
|
|
}) |
|
|
}) |
|
@ -130,7 +161,6 @@ export default { |
|
|
this.handleMoveNodeClick(selectedKey) |
|
|
this.handleMoveNodeClick(selectedKey) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
// 选中门类后,设置门类详情数据 |
|
|
// 选中门类后,设置门类详情数据 |
|
|
handleMoveNodeClick(val) { |
|
|
handleMoveNodeClick(val) { |
|
@ -139,17 +169,96 @@ export default { |
|
|
if (val.pid !== '0') { |
|
|
if (val.pid !== '0') { |
|
|
Vue.set(this.selectedCategoryMove, 'parentName', this.$refs.treeMove.getNode(val.pid).data.cnName) |
|
|
Vue.set(this.selectedCategoryMove, 'parentName', this.$refs.treeMove.getNode(val.pid).data.cnName) |
|
|
} |
|
|
} |
|
|
|
|
|
this.getViewTable() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
getViewTable() { |
|
|
|
|
|
this.loading = true |
|
|
|
|
|
this.tableDisplayFields = [] |
|
|
|
|
|
FetchInitCategoryViewTable({ categoryId: this.selectedCategoryMove.id, categoryLevel: 3 }).then((res) => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.arrySort = [] |
|
|
|
|
|
this.tableDisplayFields = res |
|
|
|
|
|
const orderSortArry = this.tableDisplayFields.filter(item => item.displayOrder).sort((a, b) => a.displayOrder - b.displayOrder) |
|
|
|
|
|
orderSortArry.forEach(item => { |
|
|
|
|
|
if (item.displayOrderBy) { |
|
|
|
|
|
this.arrySort.push(item.fieldName + ',' + item.displayOrderBy) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.getViewTableList() |
|
|
|
|
|
}) |
|
|
|
|
|
this.loading = false |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
getViewTableList() { |
|
|
|
|
|
this.tableData = [] |
|
|
|
|
|
this.loading = true |
|
|
|
|
|
const params = { |
|
|
|
|
|
'categoryId': this.selectedCategoryMove.id, |
|
|
|
|
|
'search': this.query.search, |
|
|
|
|
|
'page': this.page.page - 1, |
|
|
|
|
|
'size': this.page.size |
|
|
|
|
|
} |
|
|
|
|
|
FetchInitSingleCategoryView(params).then((res) => { |
|
|
|
|
|
console.log(res) |
|
|
|
|
|
if (res.code !== 500) { |
|
|
|
|
|
this.tableData = res.list.content |
|
|
|
|
|
this.page.total = res.list.totalElements |
|
|
} |
|
|
} |
|
|
|
|
|
this.loading = false |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
handleClose(done) { |
|
|
handleClose(done) { |
|
|
this.moveVisible = false |
|
|
this.moveVisible = false |
|
|
|
|
|
this.query.search = null |
|
|
done() |
|
|
done() |
|
|
}, |
|
|
}, |
|
|
handleSizeChange(val) { |
|
|
|
|
|
console.log(`每页 ${val} 条`) |
|
|
|
|
|
|
|
|
closedDialog() { |
|
|
|
|
|
this.moveVisible = false |
|
|
|
|
|
this.query.search = null |
|
|
|
|
|
}, |
|
|
|
|
|
clickRowHandler(row) { |
|
|
|
|
|
this.selections = [] |
|
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
|
|
this.$refs.table.toggleRowSelection(row) |
|
|
|
|
|
this.selections.push(row) |
|
|
|
|
|
}, |
|
|
|
|
|
selectionChangeHandler(selection, row) { |
|
|
|
|
|
this.selections = selection |
|
|
|
|
|
}, |
|
|
|
|
|
handleComfirmed() { |
|
|
|
|
|
if (this.selections.length === 0) { |
|
|
|
|
|
this.crud.notify('请选择要移动到收集库的档案', CRUD.NOTIFICATION_TYPE.WARNING) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
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) => { |
|
|
|
|
|
this.$message.success(res) |
|
|
|
|
|
this.moveVisible = false |
|
|
|
|
|
this.query.search = null |
|
|
|
|
|
this.selections = [] |
|
|
|
|
|
this.$emit('refresh') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
handleSizeChange(size) { |
|
|
|
|
|
this.page.size = size |
|
|
|
|
|
this.page.page = 1 |
|
|
|
|
|
this.getViewTableList() |
|
|
}, |
|
|
}, |
|
|
handleCurrentChange(val) { |
|
|
|
|
|
console.log(`当前页: ${val}`) |
|
|
|
|
|
|
|
|
handleCurrentPage(val) { |
|
|
|
|
|
this.page.page = val |
|
|
|
|
|
this.getViewTableList() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|