Browse Source

bug修复/样式修改/打印目录功能

master
xuhuajiao 3 years ago
parent
commit
b69bcd6099
  1. 2
      package.json
  2. 8
      public/webA/index.js
  3. 11
      public/webB/index.js
  4. 11
      public/webC/index.js
  5. 12
      public/webTotal/index.js
  6. 22
      src/assets/icons/svg/print.svg
  7. 2
      src/views/archivesManage/archivesList/index.vue
  8. 2
      src/views/archivesManage/archivesList/module/packing/index.vue
  9. 129
      src/views/archivesManage/caseManage/caseList/index.vue
  10. 2
      src/views/components/SecurityDoor.vue
  11. 3
      src/views/home.vue

2
package.json

@ -41,6 +41,7 @@
"file-saver": "1.3.8", "file-saver": "1.3.8",
"fuse.js": "3.4.4", "fuse.js": "3.4.4",
"highlight.js": "^11.5.1", "highlight.js": "^11.5.1",
"html2canvas": "^1.4.1",
"js-beautify": "^1.10.2", "js-beautify": "^1.10.2",
"js-cookie": "2.2.0", "js-cookie": "2.2.0",
"jsencrypt": "^3.0.0-rc.1", "jsencrypt": "^3.0.0-rc.1",
@ -49,6 +50,7 @@
"normalize.css": "7.0.0", "normalize.css": "7.0.0",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"path-to-regexp": "2.4.0", "path-to-regexp": "2.4.0",
"print-js": "^1.6.0",
"qs": "^6.10.1", "qs": "^6.10.1",
"screenfull": "4.2.0", "screenfull": "4.2.0",
"sortablejs": "1.8.4", "sortablejs": "1.8.4",

8
public/webA/index.js

@ -37,9 +37,11 @@ BABYLON.DefaultLoadingScreen.prototype.displayLoadingUI = function() {
this._loadingDiv.innerHTML = this._loadingDiv.innerHTML =
"<div class='oka'><div class='" + "<div class='oka'><div class='" +
thecss + thecss +
"'><image src='./logok.gif' class='jiazaiimg'/></div><div class='" +
thecss2 +
"'>由 <image class='feitimg' src='./img/yxlogo.png'/> 阅行客 提供技术支持!</div></div>";
"'><image src='./logok.gif' class='jiazaiimg'/></div>";
// <div class='" +
// thecss2 +
// "'>由 <image class='feitimg' src='./img/yxlogo.png'/> 阅行客 提供技术支持!</div></div>
this._resizeLoadingUI(); this._resizeLoadingUI();
window.addEventListener("resize", this._resizeLoadingUI); window.addEventListener("resize", this._resizeLoadingUI);

11
public/webB/index.js

@ -34,9 +34,14 @@ BABYLON.DefaultLoadingScreen.prototype.displayLoadingUI = function() {
this._loadingDiv.innerHTML = this._loadingDiv.innerHTML =
"<div class='oka'><div class='" + "<div class='oka'><div class='" +
thecss + thecss +
"'><image src='./logok.gif' class='jiazaiimg'/></div><div class='" +
thecss2 +
"'>由 <image class='feitimg' src='./img/yxlogo.png'/> 阅行客 提供技术支持!</div></div>";
"'><image src='./logok.gif' class='jiazaiimg'/></div>";
// this._loadingDiv.innerHTML =
// "<div class='oka'><div class='" +
// thecss +
// "'><image src='./logok.gif' class='jiazaiimg'/></div><div class='" +
// thecss2 +
// "'>由 <image class='feitimg' src='./img/yxlogo.png'/> 阅行客 提供技术支持!</div></div>";
this._resizeLoadingUI(); this._resizeLoadingUI();
window.addEventListener("resize", this._resizeLoadingUI); window.addEventListener("resize", this._resizeLoadingUI);

11
public/webC/index.js

@ -35,9 +35,14 @@ BABYLON.DefaultLoadingScreen.prototype.displayLoadingUI = function() {
this._loadingDiv.innerHTML = this._loadingDiv.innerHTML =
"<div class='oka'><div class='" + "<div class='oka'><div class='" +
thecss + thecss +
"'><image src='./logok.gif' class='jiazaiimg'/></div><div class='" +
thecss2 +
"'>由 <image class='feitimg' src='./img/yxlogo.png'/> 阅行客 提供技术支持!</div></div>";
"'><image src='./logok.gif' class='jiazaiimg'/></div>";
// this._loadingDiv.innerHTML =
// "<div class='oka'><div class='" +
// thecss +
// "'><image src='./logok.gif' class='jiazaiimg'/></div><div class='" +
// thecss2 +
// "'>由 <image class='feitimg' src='./img/yxlogo.png'/> 阅行客 提供技术支持!</div></div>";
this._resizeLoadingUI(); this._resizeLoadingUI();
window.addEventListener("resize", this._resizeLoadingUI); window.addEventListener("resize", this._resizeLoadingUI);

12
public/webTotal/index.js

@ -26,9 +26,15 @@ BABYLON.DefaultLoadingScreen.prototype.displayLoadingUI = function() {
this._loadingDiv.innerHTML = this._loadingDiv.innerHTML =
"<div class='oka'><div class='" + "<div class='oka'><div class='" +
thecss + thecss +
"'><image src='./logok.gif' class='jiazaiimg'/></div><div class='" +
thecss2 +
"'>由 <image class='feitimg' src='./img/yxlogo.png'/> 阅行客 提供技术支持!</div></div>";
"'><image src='./logok.gif' class='jiazaiimg'/></div>";
// this._loadingDiv.innerHTML =
// "<div class='oka'><div class='" +
// thecss +
// "'><image src='./logok.gif' class='jiazaiimg'/></div><div class='" +
// thecss2 +
// "'>由 <image class='feitimg' src='./img/yxlogo.png'/> 阅行客 提供技术支持!</div></div>";
this._resizeLoadingUI(); this._resizeLoadingUI();
window.addEventListener("resize", this._resizeLoadingUI); window.addEventListener("resize", this._resizeLoadingUI);
document.body.appendChild(this._loadingDiv); document.body.appendChild(this._loadingDiv);

22
src/assets/icons/svg/print.svg

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 1024 989.9" style="enable-background:new 0 0 1024 989.9;" xml:space="preserve">
<style type="text/css">
</style>
<g id="组_473" transform="translate(-59.62 -3.35)">
<path id="路径_1400" class="st0" d="M974.9,187.6h-89.5v-75.5c-0.1-60-48.7-108.6-108.7-108.7H366.6
c-60,0.1-108.6,48.7-108.7,108.7v75.5h-89.5c-60,0.1-108.6,48.7-108.7,108.6v223.8c0.1,60,48.7,108.6,108.7,108.7h89.5v255.7
c0.1,60,48.7,108.6,108.7,108.7h410.1c60-0.1,108.6-48.7,108.7-108.7V628.8h89.5c60-0.1,108.6-48.7,108.7-108.7V296.2
C1083.5,236.2,1034.9,187.6,974.9,187.6L974.9,187.6z M320,112.1c0-25.7,20.9-46.6,46.6-46.6h410.1c25.7,0,46.6,20.9,46.6,46.6
v75.5H320.1L320,112.1L320,112.1z M823.2,884.6c0,25.7-20.9,46.6-46.6,46.6h-410c-25.7,0-46.6-20.9-46.6-46.6V539
c0-25.7,20.9-46.6,46.6-46.6h410.1c25.7,0,46.6,20.9,46.6,46.6L823.2,884.6z M1021.2,520.1c0,25.7-20.9,46.6-46.6,46.6h-89.2V539
c-0.1-60-48.7-108.6-108.7-108.7H366.6c-60,0.1-108.6,48.7-108.7,108.7v27.6h-89.5c-25.7,0-46.6-20.9-46.6-46.6V296.2
c0-25.7,20.9-46.6,46.6-46.6h806.5c25.7,0,46.6,20.9,46.6,46.6v223.8L1021.2,520.1z"/>
<path id="路径_1401" class="st0" d="M716.6,623.6H426.3c-17.2,0-31.1,13.9-31.1,31.1s13.9,31.1,31.1,31.1h290
c17.2,0,31.1-13.9,31.1-31.1s-13.9-31.1-31.1-31.1H716.6z M716.6,781.2H426.3c-17.2,0-31.1,13.9-31.1,31.1
c0,17.2,13.9,31.1,31.1,31.1h290c17.2,0,31.1-13.9,31.1-31.1c0-17.2-13.9-31.1-31.1-31.1H716.6z"/>
<path id="路径_1402" class="st0" d="M854.9,344c0,26.6,21.5,48.1,48.1,48.1c26.6,0,48.1-21.5,48.1-48.1
c0-26.6-21.5-48.1-48.1-48.1C876.4,296,854.9,317.5,854.9,344L854.9,344z"/>
</g>
</svg>

2
src/views/archivesManage/archivesList/index.vue

@ -26,7 +26,7 @@
<!-- 档案管理列表 --> <!-- 档案管理列表 -->
<el-col class="archives-right-list" :xs="14" :sm="18" :md="19" :lg="18" :xl="19"> <el-col class="archives-right-list" :xs="14" :sm="18" :md="19" :lg="18" :xl="19">
<div v-if="selectedCategory.isType !== 1 && !isRecycle" :class="['archives-top', {'archives-fixed-top': selectedCategory.isType === 2 || selectedCategory.isType === 4 }]"> <div v-if="selectedCategory.isType !== 1 && !isRecycle" :class="['archives-top', {'archives-fixed-top': selectedCategory.isType === 2 || selectedCategory.isType === 4 }]">
<el-checkbox v-model="fixedStatusBar">隐藏固定状态栏</el-checkbox>
<el-checkbox v-model="fixedStatusBar">隐藏状态栏</el-checkbox>
</div> </div>
<!-- 项目 --> <!-- 项目 -->
<archivesProject <archivesProject

2
src/views/archivesManage/archivesList/module/packing/index.vue

@ -20,7 +20,7 @@
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="getCaseList">搜索</el-button> <el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="getCaseList">搜索</el-button>
</div> </div>
<div class="selct-data-head"> <div class="selct-data-head">
<p v-if="caseData.selectedCategory.isType === 5">数据来源文件 2条数据</p>
<p v-if="caseData.selectedCategory.isType === 5">数据来源文件 {{ caseData.selections.length }} 条数据</p>
<p v-else>数据来源案卷 {{ caseData.selections.length }} 条数据 卷内 {{ caseData.totalSumAll }} 条数据</p> <p v-else>数据来源案卷 {{ caseData.selections.length }} 条数据 卷内 {{ caseData.totalSumAll }} 条数据</p>
</div> </div>
</div> </div>

129
src/views/archivesManage/caseManage/caseList/index.vue

@ -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>

2
src/views/components/SecurityDoor.vue

@ -7,7 +7,7 @@
<svg-icon icon-class="menjin" class-name="warehouse-svg" />门禁记录 <svg-icon icon-class="menjin" class-name="warehouse-svg" />门禁记录
</p> </p>
</h3> </h3>
<el-table ref="table" style="min-width: 100%;" height="100%" :data="tableData" class="warehose-el-table" stripe>
<el-table ref="table" style="min-width: 100%;" :height="height" :data="tableData" class="warehose-el-table" stripe>
<el-table-column prop="update_time" label="时间" align="center" min-width="60"> <el-table-column prop="update_time" label="时间" align="center" min-width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<div>{{ scope.row.update_time | parseTime }}</div> <div>{{ scope.row.update_time | parseTime }}</div>

3
src/views/home.vue

@ -163,7 +163,6 @@ export default {
// }, // },
getWaitBorrower() { getWaitBorrower() {
FetchWaitBorrower().then(data => { FetchWaitBorrower().then(data => {
console.log(data)
if (data) { if (data) {
this.waitBorrowerData = data this.waitBorrowerData = data
} }
@ -261,7 +260,7 @@ export default {
.container-wrap { .container-wrap {
min-height: auto; min-height: auto;
height: 100%; height: 100%;
overflow: hidden;
// overflow: hidden;
} }
.todo-list { .todo-list {
padding: 0 20px; padding: 0 20px;

Loading…
Cancel
Save