From c7a65630bf97706554c68c269403d672bde52ca9 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期六, 18 一月 2025 14:57:26 +0800
Subject: [PATCH] 完成随访记录
---
src/views/home/components/fangAn/editDietary.vue | 83 +++++++++++++++++++++++++++++++++++------
1 files changed, 70 insertions(+), 13 deletions(-)
diff --git a/src/views/home/components/fangAn/editDietary.vue b/src/views/home/components/fangAn/editDietary.vue
index 1bf8873..a1c6e85 100644
--- a/src/views/home/components/fangAn/editDietary.vue
+++ b/src/views/home/components/fangAn/editDietary.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="printFrom1">
+ <div class="container" style="width: 100%; height: 100%;overflow: auto;" >
+ <div id="printFrom1" class="print-section">
<div>
<el-form size="small">
<div style="width: 100%">
@@ -12,7 +12,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="实施日期">
- <el-date-picker v-model="state.tableData.初次调查日期" type="date"
+ <el-date-picker v-model="state.tableData.实施日期" type="date"
style="width: 100px;" placeholder="" format="YYYY/MM/DD"
value-format="YYYY-MM-DD" />
</el-form-item>
@@ -20,7 +20,7 @@
<el-col :span="12">
<div style="text-align:right;width: 100%">
- <span>营养师:</span> <el-input v-model="state.tableData.记录者"
+ <span>营养师:</span> <el-input v-model="state.tableData.记录者" readonly
style="width: 100px;" placeholder="" />
</div>
@@ -31,6 +31,7 @@
</th>
</tr>
+
<tr>
<td colspan="8" style=" background-color: rgb(250, 236, 216);font-weight:800 ;">
S:询问饮食营养状况、生活习惯</td>
@@ -63,6 +64,15 @@
</td>
</tr>
<tr>
+ <td class="htr">营养记录汇总</td>
+ <td colspan="7">
+ <el-form-item>
+ <el-input v-model="state.tableData.营养记录汇总" type="textarea"
+ :autosize="{ minRows: 1, maxRows: 3 }" placeholder="营养记录汇总" />
+ </el-form-item>
+ </td>
+ </tr>
+ <!-- <tr>
<td class="htr">饮食回顾时间</td>
<td class="htr">早餐</td>
<td class="htr">加餐</td>
@@ -72,8 +82,8 @@
<td class="htr">加餐</td>
<td class="htr">其他</td>
- </tr>
- <tr>
+ </tr> -->
+ <!-- <tr>
<td class="htr">透析日</td>
<td>
<el-input v-model="state.tableData.透析日.早餐" placeholder="" />
@@ -122,7 +132,7 @@
<el-input v-model="state.tableData.非透析日.其他" placeholder="" />
</td>
- </tr>
+ </tr> -->
<tr>
<td class="htr">饮食问题</td>
<td colspan="7">
@@ -202,6 +212,16 @@
<tr>
<td colspan="8" style=" background-color: rgb(250, 236, 216);font-weight:800 ;">
A:营养评估结果,计算所需摄入量</td>
+ </tr>
+ <tr>
+ <td class="htr">营养饮食现状</td>
+
+ <td colspan="7">
+ <el-form-item>
+ <el-input v-model="state.tableData.营养饮食现状" type="textarea"
+ :autosize="{ minRows: 1, maxRows: 3 }" placeholder="" />
+ </el-form-item>
+ </td>
</tr>
<tr>
<td class="htr">营养指导初期目标</td>
@@ -296,7 +316,7 @@
placeholder="" />
</td>
</tr>
-
+ <tr class="page-break"></tr>
<tr>
<td colspan="8" style=" background-color: rgb(250, 236, 216);font-weight:800 ;">
P:饮食营养方案及食谱,定期随访并及时调整</td>
@@ -490,6 +510,7 @@
</el-input>
</td>
</tr>
+
<tr>
<td colspan="8" style=" background-color: rgb(250, 236, 216);font-weight:800 ;">
食物替换法</td>
@@ -604,6 +625,8 @@
<script setup lang="ts" name="visualizingLinkDemo2">
import { Check } from '@element-plus/icons-vue'
import html2pdf from 'html2pdf.js';
+import html2canvas from 'html2canvas';
+import { jsPDF } from 'jspdf';
import { reactive, onMounted, onUnmounted, ref } from 'vue';
import { formatDate } from '/@/utils/formatTime';
import { NextLoading } from '/@/utils/loading';
@@ -631,13 +654,14 @@
innerVisible:false,
tableData: {
表名: '患者方案表',
- 初次调查日期: "",
+ 实施日期: "",
填表日期: '',
更新日期: '',
记录者: '陈银成',
食物过敏原: "",
胃肠功能状况: "",
蛋白粉补充情况: "",
+ 营养记录汇总:"",
透析日: {
早餐: '',
早加餐: '',
@@ -673,6 +697,7 @@
异常生化指标: '',
// A:营养评估结果,计算所需摄入量
营养指导初期目标: '',//优先改善( )的问题,遵循血透饮食低磷低钾优质蛋白充足能量的饮食原则
+ 营养饮食现状:'',
营养师指导建议: {
透析饮食指导: {
能量: "",
@@ -821,7 +846,7 @@
const generatePDF = () => {
const element = document.getElementById('printFrom1');
const opt = {
- margin: 10,
+ margin: 0,
filename: `${state.tableData.表名}.pdf`,
image: { type: 'jpeg', quality: 0.98 },
html2canvas: { scale: 2 },
@@ -865,13 +890,14 @@
const getPageInfo = async () => {
state.tableData = {
表名: '患者方案表',
- 初次调查日期: "",
+ 实施日期: formatDate(new Date(),'YYYY-mm-dd'),
填表日期: '',
更新日期: '',
记录者: userInfos.value.userName,
食物过敏原: "",
胃肠功能状况: "",
蛋白粉补充情况: "",
+ 营养记录汇总:"",
透析日: {
早餐: '',
早加餐: '',
@@ -907,6 +933,7 @@
异常生化指标: '',
// A:营养评估结果,计算所需摄入量
营养指导初期目标: '',//优先改善( )的问题,遵循血透饮食低磷低钾优质蛋白充足能量的饮食原则
+ 营养饮食现状:'',
营养师指导建议: {
透析饮食指导: {
能量: "",
@@ -969,6 +996,18 @@
其他: '1克盐=6.5克酱油=10克蚝油 水果 互相替换,如苹果/梨/西瓜/桃子/火龙果等'
}
}
+ state.viewInfo = {
+ id: 0,
+ code: '',
+ clientCode: userInfos.value.clientCode,
+ patientCode: patientsInfo.value.code,
+ surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'),
+ surveryPerson: userInfos.value.code,
+ surveryJsonBody: '',
+ suveryFormName: '营养指导报告',
+ surveryFormType: 2,
+ updateTime: ''
+ };
const from1 = await getFrom1()
const from2 = await getFrom2()
const from3 = await getFrom3()
@@ -1033,7 +1072,7 @@
wherecondition: `survery_form_type=1 and patient_code='${patientsInfo.value.code}'`,
ordercondition: 'survery_time desc'
}
- pasm.wherecondition += "and suvery_form_name='营养风险筛查表(NRS2002)'"
+ pasm.wherecondition += "and suvery_form_name='NRS2002'"
const yinyangbiaodan1 = await list(pasm)
return yinyangbiaodan1
}
@@ -1045,7 +1084,7 @@
wherecondition: `survery_form_type=1 and patient_code='${patientsInfo.value.code}'`,
ordercondition: 'survery_time desc'
}
- pasm.wherecondition += "and suvery_form_name='GNIR营养评估分'"
+ pasm.wherecondition += "and suvery_form_name='GNRI'"
const yinyangbiaodan1 = await list(pasm)
return yinyangbiaodan1
}
@@ -1066,6 +1105,8 @@
console.log(mode)
state.viewInfo = mode
state.tableData = JSON.parse(mode.surveryJsonBody)
+ state.tableData.实施日期=mode.surveryTime
+ state.tableData.更新日期=mode.updateTime
state.dialogTableVisible = true
@@ -1114,4 +1155,20 @@
.lvse {
background-color: rgb(239.8, 248.9, 235.3);
}
+@media print, screen {
+ .print-section {
+ width: auto !important;
+ max-width: none !important;
+ overflow: visible !important;
+ }
+
+ .print-section > * {
+ page-break-inside: avoid;
+ }
+
+ .page-break {
+ display: block;
+ page-break-after: always;
+ }
+}
</style>
--
Gitblit v1.8.0