|
@ -17,6 +17,7 @@ |
|
|
</template> |
|
|
</template> |
|
|
<template v-slot:rightButtonGroup> |
|
|
<template v-slot:rightButtonGroup> |
|
|
<div class="archives-handler-btn"> |
|
|
<div class="archives-handler-btn"> |
|
|
|
|
|
<el-button class="part-btn iconfont" type="primary" :disabled="crud.selections.length !== 1" @click="getPrintData"><svg-icon icon-class="print" class="svg-arc-style" />打印目录</el-button> |
|
|
<el-button class="packing-btn iconfont icon-chaihe-fanbai" type="primary" :disabled="crud.selections.length === 0" @click="openCase(crud.selections)">拆盒</el-button> |
|
|
<el-button class="packing-btn iconfont icon-chaihe-fanbai" type="primary" :disabled="crud.selections.length === 0" @click="openCase(crud.selections)">拆盒</el-button> |
|
|
<el-button class="binding-btn iconfont icon-bangding-fanbai" type="primary" :disabled="crud.selections.length !== 1" @click="bindingTag(crud.selections)">绑定标签</el-button> |
|
|
<el-button class="binding-btn iconfont icon-bangding-fanbai" type="primary" :disabled="crud.selections.length !== 1" @click="bindingTag(crud.selections)">绑定标签</el-button> |
|
|
</div> |
|
|
</div> |
|
@ -90,6 +91,26 @@ |
|
|
<p><span style="color:#fff;font-size:16px">当前档案盒已入库,请先出库</span></p> |
|
|
<p><span style="color:#fff;font-size:16px">当前档案盒已入库,请先出库</span></p> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
<div v-show="isHidden" id="print" ref="printId" class="intoExamine"> |
|
|
|
|
|
<h3 style="text-align: center; margin:20px 0; font-size: 24px;">归档文件目录</h3> |
|
|
|
|
|
<el-table :data="printData" border> |
|
|
|
|
|
<el-table-column type="index" label="序号" width="55" align="center" /> |
|
|
|
|
|
<!-- <el-table-column label="件号" prop="pieceNo" width="55" align="center" /> --> |
|
|
|
|
|
<el-table-column label="档号" prop="archiveNo" align="center" width="180px" /> |
|
|
|
|
|
<el-table-column label="文号" prop="docNo" align="center" width="160" /> |
|
|
|
|
|
<el-table-column label="责任者" prop="responsibleby" align="center" /> |
|
|
|
|
|
<el-table-column label="题名" prop="maintitle" align="center" width="200px" /> |
|
|
|
|
|
<el-table-column label="日期" prop="create_time" align="center" width="100"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ parseTime(scope.row.create_time, '{y}-{m}-{d}') }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="密级" prop="securityClass" align="center" /> |
|
|
|
|
|
<el-table-column label="页数" prop="pageQty" align="center" width="60" /> |
|
|
|
|
|
<el-table-column label="备注" prop="remarks" align="center" width="100px" /> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -104,6 +125,9 @@ import crudOperation from '@crud/CRUD.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import rrOperation from '@crud/RR.operation' |
|
|
import pagination from '@crud/Pagination' |
|
|
import pagination from '@crud/Pagination' |
|
|
import detailDialog from './module/detailDialog.vue' |
|
|
import detailDialog from './module/detailDialog.vue' |
|
|
|
|
|
|
|
|
|
|
|
import html2canvas from 'html2canvas' |
|
|
|
|
|
import printJS from 'print-js' |
|
|
export default { |
|
|
export default { |
|
|
name: 'CaseList', |
|
|
name: 'CaseList', |
|
|
filters: { |
|
|
filters: { |
|
@ -135,10 +159,13 @@ export default { |
|
|
group: false |
|
|
group: false |
|
|
}, |
|
|
}, |
|
|
sort: ['create_time,desc'] |
|
|
sort: ['create_time,desc'] |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
isHidden: false, |
|
|
|
|
|
printData: [], |
|
|
permission: { |
|
|
permission: { |
|
|
add: ['admin', 'caseManage:add'], |
|
|
add: ['admin', 'caseManage:add'], |
|
|
edit: ['admin', 'caseManage:edit'], |
|
|
edit: ['admin', 'caseManage:edit'], |
|
@ -187,8 +214,62 @@ export default { |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
mounted() { |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// 打印 |
|
|
|
|
|
getPrintData() { |
|
|
|
|
|
const params = { |
|
|
|
|
|
caseId: this.crud.selections[0].id |
|
|
|
|
|
} |
|
|
|
|
|
this.crud.crudMethod.findInCase(params).then(res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
this.printData = res.archives |
|
|
|
|
|
} |
|
|
|
|
|
this.isHidden = true |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.printFn() |
|
|
|
|
|
this.isHidden = false |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
printFn() { |
|
|
|
|
|
const printContent = this.$refs.printId |
|
|
|
|
|
// 获取dom 宽度 高度 |
|
|
|
|
|
const width = printContent.clientWidth |
|
|
|
|
|
const height = printContent.clientHeight |
|
|
|
|
|
// 创建一个canvas节点 |
|
|
|
|
|
const canvas = document.createElement('canvas') |
|
|
|
|
|
|
|
|
|
|
|
const scale = 4 // 定义任意放大倍数,支持小数;越大,图片清晰度越高,生成图片越慢。 |
|
|
|
|
|
canvas.width = width * scale // 定义canvas 宽度 * 缩放 |
|
|
|
|
|
canvas.height = height * scale // 定义canvas高度 *缩放 |
|
|
|
|
|
canvas.style.width = width * scale + 'px' |
|
|
|
|
|
canvas.style.height = height * scale + 'px' |
|
|
|
|
|
canvas.getContext('2d').scale(scale, scale) // 获取context,设置scale |
|
|
|
|
|
|
|
|
|
|
|
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop // 获取滚动轴滚动的长度 |
|
|
|
|
|
const scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft // 获取水平滚动轴的长度 |
|
|
|
|
|
|
|
|
|
|
|
html2canvas(printContent, { |
|
|
|
|
|
canvas, |
|
|
|
|
|
backgroundColor: null, |
|
|
|
|
|
useCORS: true, |
|
|
|
|
|
windowHeight: document.body.scrollHeight, |
|
|
|
|
|
scrollX: -scrollLeft, // 解决水平偏移问题,防止打印的内容不全 |
|
|
|
|
|
scrollY: -scrollTop |
|
|
|
|
|
}).then((canvas) => { |
|
|
|
|
|
const url = canvas.toDataURL('image/png') |
|
|
|
|
|
printJS({ |
|
|
|
|
|
printable: url, |
|
|
|
|
|
type: 'image', |
|
|
|
|
|
documentTitle: '', // 标题 |
|
|
|
|
|
style: '@page{size:auto;margin: 0cm 1cm 0cm 1cm;}' // 去除页眉页脚 |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(err => { |
|
|
|
|
|
console.error(err) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 获取数据前的处理 |
|
|
// 获取数据前的处理 |
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
this.crud.query.storageType = null |
|
|
this.crud.query.storageType = null |
|
@ -319,4 +400,50 @@ export default { |
|
|
.crud-opts{ |
|
|
.crud-opts{ |
|
|
display: flex; |
|
|
display: flex; |
|
|
} |
|
|
} |
|
|
|
|
|
.intoExamine{ |
|
|
|
|
|
position: fixed; |
|
|
|
|
|
left: 50%; |
|
|
|
|
|
top: 50%; |
|
|
|
|
|
transform: translate(-50%,-50%); |
|
|
|
|
|
// width: 980px; |
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
z-index: 99; |
|
|
|
|
|
::v-deep .el-table--group, .el-table--border{ |
|
|
|
|
|
border: 1px solid #000; |
|
|
|
|
|
border-bottom: none; |
|
|
|
|
|
border-top: none; |
|
|
|
|
|
} |
|
|
|
|
|
::v-deep .el-table__header{ |
|
|
|
|
|
border-bottom: 1px solid #000;; |
|
|
|
|
|
} |
|
|
|
|
|
::v-deep .el-table .el-table__header-wrapper th.el-table__cell, .el-table .el-table__header th.el-table__cell{ |
|
|
|
|
|
color: #000; |
|
|
|
|
|
background-color: #fff; |
|
|
|
|
|
border-bottom: none; |
|
|
|
|
|
&>.cell{ |
|
|
|
|
|
color: #000; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
::v-deep .el-table .el-table__body-wrapper td.el-table__cell, .el-table .el-table__fixed-right td.el-table__cell{ |
|
|
|
|
|
color: #000; |
|
|
|
|
|
border-bottom: 1px solid #000; |
|
|
|
|
|
padding: 0; |
|
|
|
|
|
} |
|
|
|
|
|
::v-deep .el-table__body tr.el-table__row:hover>td.el-table__cell, .el-table__body tr.el-table__row:focus>td.el-table__cell, .el-table__body tr.current-row:hover>td.el-table__cell, .el-table__body tr.current-row:focus>td.el-table__cell{ |
|
|
|
|
|
background-color: transparent; |
|
|
|
|
|
} |
|
|
|
|
|
::v-deep .el-table--border .el-table__cell{ |
|
|
|
|
|
border-right: 1px solid #000; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
@media print { |
|
|
|
|
|
/*最外层打印节点*/ |
|
|
|
|
|
html,body{ |
|
|
|
|
|
height: inherit; |
|
|
|
|
|
} |
|
|
|
|
|
.intoExamine{ |
|
|
|
|
|
// height: 95%; |
|
|
|
|
|
margin: 0 auto; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |