From 05c827fea632f004821cc746ba73880769fab7cd Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期一, 14 七月 2025 10:06:43 +0800
Subject: [PATCH] gx1868 日期选择和排班患者查询条件,默认显示当天的已排班患者
---
src/views/home/components/editDietary2.vue | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/src/views/home/components/editDietary2.vue b/src/views/home/components/editDietary2.vue
index 763e288..4fac9b0 100644
--- a/src/views/home/components/editDietary2.vue
+++ b/src/views/home/components/editDietary2.vue
@@ -1,8 +1,8 @@
<template>
<div class="dietarySurvey-item">
<el-dialog v-model="state.dialogTableVisible" title="营养膳食调查表" :fullscreen="true" width="100%">
- <div class="container" style="width: 100%; height: 100%;overflow: auto;">
- <div id='printFrom2'>
+ <div style="width: 100%; height: 100%;overflow: auto;">
+ <div id='printMe'>
<div>
<el-form size="small">
<div style="width: 100%">
@@ -680,9 +680,9 @@
<el-button type="primary" @click="onSubmit">
保存
</el-button>
- <el-button v-if="state.viewInfo.id" type="primary" v-print="'#printFrom2'">
+ <el-button v-if="state.viewInfo.id" type="primary" v-print="'#printMe'">
<el-icon><Printer /></el-icon>
- 打印
+ 打印ddd
</el-button>
<el-button type="primary" v-if="state.viewInfo.id" @click="generatePDF">
<el-icon><Position /></el-icon>
@@ -890,7 +890,7 @@
state.dialogTableVisible = false
}
const generatePDF=()=> {
- const element = document.getElementById('printFrom2');
+ const element = document.getElementById('printMe');
const opt = {
margin: 10,
filename: `${state.tableData.表名}.pdf`,
@@ -1131,6 +1131,26 @@
<style scoped lang="scss">
+@media print {
+ body * {
+ visibility: hidden;
+ }
+ #printMe, #printMe * {
+ visibility: visible;
+ }
+ #printMe {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: auto;
+ }
+
+ /* 控制分页 */
+ .page-break {
+ page-break-before: always;
+ }
+}
.gridtable {
font-family: verdana, arial, sans-serif;
font-size: 11px;
--
Gitblit v1.8.0