Browse Source

打印设置

360view
bianyaqi 2 years ago
parent
commit
106dc865d1
  1. 2
      public/index.html
  2. 22
      src/components/360View/commonForm/optometryForm.vue
  3. 13
      src/components/360View/medicalRecord/outPatientRecord/index.vue

2
public/index.html

@ -39,7 +39,7 @@
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
<script>
//http://121.36.16.195:9002/huimu-admin/swagger-ui/index.html
window.SITE_CONFIG['apiURL'] = 'http://192.168.4.83:8036/xiangan-crf';
window.SITE_CONFIG['apiURL'] = 'http://192.168.4.24:8036/xiangan-crf';
// window.SITE_CONFIG['apiURL'] = 'http://47.110.224.240:8036/xiangan-crf';
</script>
<% } %>

22
src/components/360View/commonForm/optometryForm.vue

@ -1,7 +1,7 @@
<template>
<div id="operation-record" style=" background: #fff; padding: 10px 20px 50px 20px;page-break-after:always">
<div class="btnBox" v-if="!onlyRead">
<el-button v-print="'#optomeFunc'" size="small">打印</el-button>
<div v-if="!onlyRead" class="btnBox">
<el-button v-print="print" size="small">打印</el-button>
<el-button type="primary" size="small" @click="handleSaveTable">保存</el-button>
<el-button type="danger" size="small" @click="handleDelete">删除</el-button>
</div>
@ -399,7 +399,11 @@ export default {
a: '',
b: '',
c: ''
}]
}],
print: {
id: 'optomeFunc'
// preview: true
}
}
},
computed: {
@ -586,6 +590,7 @@ export default {
<style lang="scss">
.printBox{
page-break-inside: avoid !important;
.el-input__inner {
border-bottom: 1px solid #ccc;
border-radius: 0;
@ -718,4 +723,15 @@ export default {
// border-bottom: 0;
// }
}
@media print{
@page {
size:A5 landscape;
//margin: 0;
margin-top: 0;
margin-bottom: 0;
}
//html{
// zoom: 68%;
//}
}
</style>

13
src/components/360View/medicalRecord/outPatientRecord/index.vue

@ -1,7 +1,7 @@
<template>
<div class="recordContainer">
<div v-if="onlyRead" class="btnBox">
<el-button v-print="'#allForeForm'" size="small">打印</el-button>
<el-button v-print="printAll" size="small">打印</el-button>
<el-button type="primary" size="small" @click="handleSaveTable">保存</el-button>
<el-button v-if="comonFormActive === '2' || comonFormActive === '3'" type="primary" size="small" @click="handleTemplate">保存为模板</el-button>
<div v-if="comonFormActive === '2' || comonFormActive === '3'" size="small" style="display:inline-block;margin-left:10px;text-align:center;width: 32px;height: 32px;background-color: #1e79ff;border-radius: 4px;vertical-align: bottom" @click="addData">
@ -87,7 +87,11 @@ export default {
id: ''
}, //
flag: '', // 1 2 3 4 5
comonFormActive: '1'
comonFormActive: '1',
printAll: {
id: 'allForeForm',
beforeOpenCallback() { console.log('开始打印前') }
}
}
},
computed: {
@ -233,4 +237,9 @@ export default {
padding: 8px;
}
}
@media print{
@page {
size:A5 landscape;
}
}
</style>

Loading…
Cancel
Save