Pārlūkot izejas kodu

九防页面添加打印功能

unknown 1 dienu atpakaļ
vecāks
revīzija
491d9f181b

+ 1 - 10
src/views/elderly/apply/nine-precautions/MMSE/AddForm.vue

@@ -1240,16 +1240,7 @@ const handleExport = () => {
         </div>
       </div>
 
-      <div class="signature-section">
-        <div class="signature-item">
-          <div class="signature-label">家属/评估员签名:</div>
-          <div class="signature-line"></div>
-        </div>
-        <div class="signature-item">
-          <div class="signature-label">日期:</div>
-          <div class="date-line"></div>
-        </div>
-      </div>
+
 
       <div class="footer-note">
         注:MMSE总分30分,≥27分为认知功能正常,26-21分为轻度认知障碍,10-20分为中度认知障碍,≤9分为重度认知障碍

+ 8 - 1
src/views/elderly/apply/nine-precautions/MMSE/index.vue

@@ -73,7 +73,13 @@
       <el-table-column prop="elderName" header-align="center" align="center" label="长者姓名" min-width="150" show-overflow-tooltip/>
       <el-table-column prop="assessor" header-align="center" align="center" label="评估人" min-width="200" show-overflow-tooltip/>
       <el-table-column prop="assessDate" header-align="center" align="center" label="记录日期" min-width="200" show-overflow-tooltip/>
-
+     <el-table-column header-align="center" align="center" label="风险等级" min-width="200" show-overflow-tooltip>
+        <template #default="scope">
+          <el-tag v-if="getRiskLevelInfo(scope.row.assessData).text" :type="getRiskLevelInfo(scope.row.assessData).type">
+            {{ getRiskLevelInfo(scope.row.assessData).text }}
+          </el-tag>
+        </template>
+      </el-table-column>
       <el-table-column prop="creator" header-align="center" align="center" label="记录人" min-width="200" show-overflow-tooltip/>
 
 
@@ -150,6 +156,7 @@
 import AddForm from "./AddForm.vue";
 import ButtonAdd from "@/components/ButtonAdd/src/ButtonAdd.vue";
 import ButtonImport from "@/components/ButtonImport/src/ButtonImport.vue";
+import { getRiskLevelInfo } from "@/utils/risk-assessment";
 import { useUserStore } from '@/store/modules/user'
 import {formatTimestamp, getCurrentMonthRange} from "@/utils/dateUtil";
 import Import from "@/components/ImportFile/index.vue";

+ 3 - 11
src/views/elderly/apply/nine-precautions/commit-suicide/AddForm.vue

@@ -130,7 +130,7 @@
         </div>
 
         <!-- 签名区域 -->
-        <div class="signature-section">
+        <!-- <div class="signature-section">
           <div class="signature-row">
             <div class="signature-item">
               <span class="signature-label">家属/监护人签名:</span>
@@ -138,7 +138,7 @@
             </div>
 
           </div>
-        </div>
+        </div> -->
 
         <!-- 说明 -->
         <div class="note-section">
@@ -791,16 +791,8 @@ const handleExport = () => {
         </div>
       </div>
 
-      <!-- 签名区域 -->
-      <div class="signature-section">
-        <div class="signature-row">
-          <div class="signature-item">
-            <span class="signature-label">家属/监护人签名:</span>
-            <span class="signature-value">${form.familySignature || ''}</span>
-          </div>
+     
 
-        </div>
-      </div>
 
       <!-- 说明 -->
       <div class="note-section">

+ 5 - 15
src/views/elderly/apply/nine-precautions/communication/AddForm.vue

@@ -165,18 +165,15 @@
         </div>
 
         <!-- 签名区域 -->
-        <div class="signature-section">
+        <!-- <div class="signature-section">
           <div class="signature-row">
             <div class="signature-item">
               <span class="signature-label">家属/监护人签名:</span>
               <el-input v-model="form.familySignature" :disabled="isDetail" class="signature-input"/>
             </div>
-<!--            <div class="signature-item date-item">-->
-<!--              <span class="signature-label">日期:</span>-->
-<!--              <el-date-picker v-model="form.familySignDate" type="date" :disabled="isDetail" class="date-picker"/>-->
-<!--            </div>-->
+ 
           </div>
-        </div>
+        </div> -->
 
         <!-- 说明 -->
         <div class="note-section">
@@ -828,15 +825,8 @@ const handleExport = () => {
         </div>
       </div>
 
-      <!-- 签名区域 -->
-      <div class="signature-section">
-        <div class="signature-row">
-          <div class="signature-item">
-            <span class="signature-label">家属/监护人签名:</span>
-            <span class="signature-value">${form.familySignature || ''}</span>
-          </div>
-        </div>
-      </div>
+   
+    
 
       <!-- 说明 -->
       <div class="note-section">

+ 8 - 1
src/views/elderly/apply/nine-precautions/communication/index.vue

@@ -72,7 +72,13 @@
       <el-table-column prop="elderName" header-align="center" align="center" label="长者姓名" min-width="150" show-overflow-tooltip/>
       <el-table-column prop="assessor" header-align="center" align="center" label="评估人" min-width="200" show-overflow-tooltip/>
       <el-table-column prop="assessDate" header-align="center" align="center" label="记录日期" min-width="200" show-overflow-tooltip/>
-
+      <el-table-column header-align="center" align="center" label="风险等级" min-width="200" show-overflow-tooltip>
+        <template #default="scope">
+          <el-tag v-if="getRiskLevelInfo(scope.row.assessData).text" :type="getRiskLevelInfo(scope.row.assessData).type">
+            {{ getRiskLevelInfo(scope.row.assessData).text }}
+          </el-tag>
+        </template>
+      </el-table-column>
       <el-table-column prop="creator" header-align="center" align="center" label="记录人" min-width="200" show-overflow-tooltip/>
 
 
@@ -149,6 +155,7 @@
 import AddForm from "./AddForm.vue";
 import ButtonAdd from "@/components/ButtonAdd/src/ButtonAdd.vue";
 import ButtonImport from "@/components/ButtonImport/src/ButtonImport.vue";
+import { getRiskLevelInfo } from "@/utils/risk-assessment";
 import { useUserStore } from '@/store/modules/user'
 import {formatTimestamp, getCurrentMonthRange} from "@/utils/dateUtil";
 import Import from "@/components/ImportFile/index.vue";

+ 278 - 2
src/views/elderly/apply/nine-precautions/daily-life/AddForm.vue

@@ -339,7 +339,7 @@
 
     <template #footer>
       <el-button @click="handleClosed">关闭</el-button>
-<!--      <el-button v-if="isDetail" type="success" @click="handleExport">打印</el-button>-->
+     <el-button v-if="isDetail" type="success" @click="handleExport">打印</el-button>
       <el-button style="margin-left: 22px;margin-right: 30px" v-loading="formLoading" type="primary"
         v-show="!isDetail" @click="submitForm">确定</el-button>
     </template>
@@ -561,7 +561,283 @@ const handleClosed = () => {
 
 /** 导出/打印 */
 const handleExport = () => {
-  message.info('打印功能开发中')
+  // 创建打印窗口
+  const printWindow = window.open('', '_blank')
+  if (!printWindow) {
+    message.error('请允许弹出窗口')
+    return
+  }
+
+  // 评估项目数据
+  const assessmentItems = [
+    { name: '1. 大便控制', options: [{ score: 10, text: '无大便失禁,并可自行使用塞剂' }, { score: 5, text: '偶有失禁(每周不超过一次)或使用塞剂时需人帮助' }, { score: 0, text: '需别人处理' }] },
+    { name: '2. 小便控制', options: [{ score: 10, text: '日夜皆不会尿失禁,或可自行使用并清理尿套' }, { score: 5, text: '偶尔会尿失禁(每周不超过一次)或尿急或需别人帮助处理尿套' }, { score: 0, text: '需别人处理' }] },
+    { name: '3. 个人卫生', options: [{ score: 5, text: '可独立完成洗脸、洗手、刷牙及梳头发' }, { score: 0, text: '需别人处理' }] },
+    { name: '4. 入厕', options: [{ score: 10, text: '可自行进出厕所,不会弄脏衣物,并能穿好衣服,使用便盆者可自行清理便盆' }, { score: 5, text: '需帮助保持姿势平衡、整理衣物或使用卫生纸,使用便盆者可自行取放,但须依赖他人清理' }, { score: 0, text: '需他人帮助' }] },
+    { name: '5. 进食', options: [{ score: 10, text: '自己在合理的时间内(约10s吃一口)可用筷子取眼前的食物' }, { score: 5, text: '需别人帮助穿脱进食辅具或只会用汤匙进食' }, { score: 0, text: '无法自行取食或耗费时间过长' }] },
+    { name: '6. 床和椅转移', options: [{ score: 15, text: '可独立完成,包括轮椅的煞车及移开脚踏板' }, { score: 10, text: '需要稍微的协助(例如:予以轻扶以保持平衡)或需要口头指导' }, { score: 5, text: '可自行从床上坐起,但移位时仍需要别人帮助' }, { score: 0, text: '需别人帮助方可坐起来或需别人帮助方可移位' }] },
+    { name: '7. 行走于平地上', options: [{ score: 15, text: '使用或不使用辅具皆可独立行走50m以上' }, { score: 10, text: '需要稍微的扶持或口头指导方可行走50m以上' }, { score: 5, text: '虽无法行走,但可独立操纵轮椅(包括转弯、进门、接近桌子)' }, { score: 0, text: '需别人帮助方可坐起来或需别人帮助方可移位' }] },
+    { name: '8. 穿脱衣服', options: [{ score: 10, text: '可自行穿脱衣服、鞋子及辅具' }, { score: 5, text: '在别人帮助下,可完成一半以上的上述动作' }, { score: 0, text: '不能自行穿脱衣服' }] },
+    { name: '9. 上下楼梯', options: [{ score: 10, text: '可自行上下楼梯(包括抓扶手、使用拐杖)' }, { score: 5, text: '需要稍微帮助或口头指导' }, { score: 0, text: '无法上下楼梯' }] },
+    { name: '10. 洗澡', options: [{ score: 5, text: '可独立完成(不论是盆浴或沐浴)' }, { score: 0, text: '需要别人帮助' }] }
+  ]
+
+  // 构建打印内容
+  const printContent = `
+    <!DOCTYPE html>
+    <html>
+    <head>
+      <meta charset="UTF-8">
+      <title>日常生活活动能力评估表 - ${dataForm.value.elderName || ''}</title>
+      <style>
+        @media print {
+          @page { size: A4 portrait; margin: 15mm; }
+        }
+        body {
+          font-family: 'SimSun', 'Microsoft YaHei', serif;
+          font-size: 9pt;
+          line-height: 1.3;
+          color: #333;
+        }
+        .header {
+          text-align: center;
+          margin-bottom: 15px;
+          border-bottom: 2px solid #333;
+          padding-bottom: 10px;
+        }
+        .header h1 {
+          font-size: 14pt;
+          margin: 0;
+          letter-spacing: 2px;
+        }
+        .info-section {
+          margin-bottom: 15px;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .info-row {
+          display: flex;
+          flex-wrap: wrap;
+          gap: 20px;
+        }
+        .info-item {
+          display: flex;
+          align-items: center;
+        }
+        .info-item .label {
+          font-weight: bold;
+          margin-right: 8px;
+          color: #555;
+        }
+        .info-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 80px;
+          padding: 0 5px;
+          text-align: center;
+        }
+
+        .assessment-table {
+          width: 100%;
+          border-collapse: collapse;
+          margin-bottom: 15px;
+          font-size: 8pt;
+        }
+        .assessment-table th, .assessment-table td {
+          border: 1px solid #333;
+          padding: 6px;
+          text-align: center;
+          vertical-align: middle;
+        }
+        .assessment-table th {
+          background: #e8e8e8;
+          font-weight: bold;
+        }
+        .assessment-table .col-item {
+          width: 12%;
+          font-weight: bold;
+          background: #f5f5f5;
+        }
+        .assessment-table .col-score {
+          width: 6%;
+          font-weight: bold;
+        }
+        .assessment-table .col-content {
+          width: 70%;
+          text-align: left;
+        }
+        .assessment-table .col-result {
+          width: 12%;
+          font-weight: bold;
+        }
+        .total-row {
+          background: #fff3cd;
+          font-weight: bold;
+        }
+
+        .result-section {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .result-title {
+          font-weight: bold;
+          margin-bottom: 10px;
+        }
+        .result-rules {
+          display: flex;
+          flex-wrap: wrap;
+          gap: 10px;
+          margin-bottom: 10px;
+        }
+        .result-rule {
+          padding: 5px 10px;
+          border-radius: 4px;
+        }
+        .current-result {
+          display: flex;
+          align-items: center;
+          gap: 10px;
+          padding-top: 10px;
+          border-top: 1px solid #ccc;
+        }
+        .result-label {
+          font-weight: bold;
+        }
+        .score-value {
+          color: #d9534f;
+          font-weight: bold;
+          font-size: 14pt;
+        }
+
+        .assessor-section {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .assessor-row {
+          display: flex;
+          gap: 30px;
+        }
+        .assessor-item {
+          display: flex;
+          align-items: center;
+        }
+        .assessor-item .label {
+          font-weight: bold;
+          margin-right: 8px;
+        }
+        .assessor-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 120px;
+          padding: 0 5px;
+          text-align: center;
+        }
+      </style>
+    </head>
+    <body>
+      <div class="header">
+        <h1>日常生活活动能力评估表(Barthel指数评分标准)</h1>
+      </div>
+
+      <div class="info-section">
+        <div class="info-row">
+          <div class="info-item">
+            <span class="label">长者姓名:</span>
+            <span class="value">${dataForm.value.elderName || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">性别:</span>
+            <span class="value">${dataForm.value.elderSex || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">年龄:</span>
+            <span class="value">${dataForm.value.elderAge || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">床号:</span>
+            <span class="value">${dataForm.value.bedName || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">评估日期:</span>
+            <span class="value">${form.assessDate || ''}</span>
+          </div>
+        </div>
+      </div>
+
+      <!-- Barthel指数评分表 -->
+      <table class="assessment-table">
+        <thead>
+          <tr>
+            <th class="col-item">项目</th>
+            <th class="col-score">分数</th>
+            <th class="col-content">内容</th>
+            <th class="col-result">得分</th>
+          </tr>
+        </thead>
+        <tbody>
+          ${assessmentItems.map((item, index) => {
+            const currentScore = form.scores[index] || 0
+            return `
+              ${item.options.map((opt, optIndex) => `
+                <tr>
+                  ${optIndex === 0 ? `<td class="col-item" rowspan="${item.options.length}">${item.name}</td>` : ''}
+                  <td class="col-score">${opt.score}</td>
+                  <td class="col-content">${currentScore === opt.score ? '☑' : '☐'} ${opt.text}</td>
+                  ${optIndex === 0 ? `<td class="col-result" rowspan="${item.options.length}">${currentScore}</td>` : ''}
+                </tr>
+              `).join('')}
+            `
+          }).join('')}
+          <tr class="total-row">
+            <td class="col-item">总分:</td>
+            <td class="col-score"></td>
+            <td class="col-content"></td>
+            <td class="col-result">${form.totalScore} 分</td>
+          </tr>
+        </tbody>
+      </table>
+
+      <!-- 评分结果 -->
+      <div class="result-section">
+        <div class="result-title">评分结果:</div>
+        <div class="result-rules">
+          <span class="result-rule" style="background: ${form.totalScore < 20 ? '#f8d7da' : '#e8e8e8'}">${form.totalScore < 20 ? '☑' : '☐'} &lt;20分:生活完全依赖</span>
+          <span class="result-rule" style="background: ${form.totalScore >= 20 && form.totalScore <= 40 ? '#fff3cd' : '#e8e8e8'}">${form.totalScore >= 20 && form.totalScore <= 40 ? '☑' : '☐'} 20~40分:生活需要很大帮助</span>
+          <span class="result-rule" style="background: ${form.totalScore > 40 && form.totalScore <= 60 ? '#d1ecf1' : '#e8e8e8'}">${form.totalScore > 40 && form.totalScore <= 60 ? '☑' : '☐'} 40~60分:生活需要帮忙</span>
+          <span class="result-rule" style="background: ${form.totalScore > 60 ? '#d4edda' : '#e8e8e8'}">${form.totalScore > 60 ? '☑' : '☐'} &gt;60分:生活基本自理</span>
+        </div>
+        ${form.resultLevel ? `
+          <div class="current-result">
+            <span class="result-label">当前评估结果:</span>
+            <span class="score-value">${getResultText(form.resultLevel)}</span>
+          </div>
+        ` : ''}
+      </div>
+
+      <!-- 评估人签名 -->
+      <div class="assessor-section">
+        <div class="assessor-row">
+          <div class="assessor-item">
+            <span class="label">评估人签名:</span>
+            <span class="value">${form.assessor || ''}</span>
+          </div>
+        </div>
+      </div>
+    </body>
+    </html>
+  `
+
+  // 写入内容并打印
+  printWindow.document.write(printContent)
+  printWindow.document.close()
+
+  // 延迟打印,确保样式加载完成
+  setTimeout(() => {
+    printWindow.print()
+  }, 500)
 }
 
 const rules = {

+ 270 - 2
src/views/elderly/apply/nine-precautions/empyrosis/AddForm.vue

@@ -142,7 +142,7 @@
 
     <template #footer>
       <el-button @click="handleClosed">关闭</el-button>
-<!--      <el-button v-if="isDetail" type="success" @click="handleExport">打印</el-button>-->
+     <el-button v-if="isDetail" type="success" @click="handleExport">打印</el-button>
       <el-button style="margin-left: 22px;margin-right: 30px" v-loading="formLoading" type="primary"
         v-show="!isDetail" @click="submitForm">确定</el-button>
     </template>
@@ -389,7 +389,275 @@ const handleClosed = () => {
 
 /** 导出/打印 */
 const handleExport = () => {
-  message.info('打印功能开发中')
+  // 创建打印窗口
+  const printWindow = window.open('', '_blank')
+  if (!printWindow) {
+    message.error('请允许弹出窗口')
+    return
+  }
+
+  // 构建打印内容
+  const printContent = `
+    <!DOCTYPE html>
+    <html>
+    <head>
+      <meta charset="UTF-8">
+      <title>防烫伤评估表 - ${dataForm.value.elderName || ''}</title>
+      <style>
+        @media print {
+          @page { size: A4 portrait; margin: 15mm; }
+        }
+        body {
+          font-family: 'SimSun', 'Microsoft YaHei', serif;
+          font-size: 10pt;
+          line-height: 1.4;
+          color: #333;
+        }
+        .header {
+          text-align: center;
+          margin-bottom: 15px;
+          border-bottom: 2px solid #333;
+          padding-bottom: 10px;
+        }
+        .header h1 {
+          font-size: 16pt;
+          margin: 0;
+          letter-spacing: 2px;
+        }
+        .info-section {
+          margin-bottom: 15px;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .info-row {
+          display: flex;
+          flex-wrap: wrap;
+          gap: 20px;
+        }
+        .info-item {
+          display: flex;
+          align-items: center;
+        }
+        .info-item .label {
+          font-weight: bold;
+          margin-right: 8px;
+          color: #555;
+        }
+        .info-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 80px;
+          padding: 0 5px;
+          text-align: center;
+        }
+
+        .assessment-table {
+          width: 100%;
+          border-collapse: collapse;
+          margin-bottom: 15px;
+        }
+        .assessment-table th, .assessment-table td {
+          border: 1px solid #333;
+          padding: 8px;
+          text-align: center;
+          vertical-align: middle;
+        }
+        .assessment-table th {
+          background: #e8e8e8;
+          font-weight: bold;
+        }
+        .assessment-table .col-factor {
+          width: 60%;
+          text-align: left;
+          font-weight: bold;
+          background: #f5f5f5;
+        }
+        .assessment-table .col-score-header {
+          width: 15%;
+        }
+        .assessment-table .col-result {
+          width: 10%;
+          font-weight: bold;
+        }
+
+        .risk-judgment-section {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+        }
+        .risk-judgment-title {
+          font-weight: bold;
+          margin-bottom: 10px;
+        }
+        .risk-options {
+          display: flex;
+          flex-wrap: wrap;
+          gap: 15px;
+        }
+        .risk-option {
+          display: inline-block;
+        }
+
+        .record-section {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+        }
+        .record-title {
+          font-weight: bold;
+          margin-bottom: 10px;
+          border-bottom: 1px solid #ccc;
+          padding-bottom: 5px;
+        }
+        .record-row {
+          display: flex;
+          gap: 30px;
+          margin-bottom: 8px;
+        }
+        .record-item {
+          display: flex;
+          align-items: center;
+        }
+        .record-item .label {
+          font-weight: bold;
+          margin-right: 8px;
+        }
+        .record-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 100px;
+          padding: 0 5px;
+          text-align: center;
+        }
+        .score-value {
+          color: #d9534f;
+          font-weight: bold;
+          font-size: 14pt;
+        }
+
+        .prevention-section {
+          margin: 15px 0;
+          border: 1px solid #999;
+        }
+        .prevention-title {
+          font-weight: bold;
+          background: #e8e8e8;
+          padding: 8px 12px;
+          border-bottom: 1px solid #999;
+        }
+        .prevention-content {
+          padding: 10px 12px;
+        }
+        .prevention-item {
+          margin-bottom: 8px;
+          font-size: 10pt;
+        }
+      </style>
+    </head>
+    <body>
+      <div class="header">
+        <h1>防烫伤评估表</h1>
+      </div>
+
+      <div class="info-section">
+        <div class="info-row">
+          <div class="info-item">
+            <span class="label">长者姓名:</span>
+            <span class="value">${dataForm.value.elderName || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">性别:</span>
+            <span class="value">${dataForm.value.elderSex || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">年龄:</span>
+            <span class="value">${dataForm.value.elderAge || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">房号/床号:</span>
+            <span class="value">${dataForm.value.bedName || ''}</span>
+          </div>
+        </div>
+      </div>
+
+      <!-- 危险因素评估表 -->
+      <table class="assessment-table">
+        <thead>
+          <tr>
+            <th class="col-factor">危险因素</th>
+            <th class="col-score-header">是</th>
+            <th class="col-score-header">否</th>
+            <th class="col-result">得分</th>
+          </tr>
+        </thead>
+        <tbody>
+          ${riskFactors.map((item, index) => `
+            <tr>
+              <td class="col-factor">${item.name}</td>
+              <td class="col-score-header">${form.assessment.scores[index] === item.yesScore ? '☑' : '☐'} ${item.yesScore}分</td>
+              <td class="col-score-header">${form.assessment.scores[index] === item.noScore ? '☑' : '☐'} ${item.noScore}分</td>
+              <td class="col-result">${form.assessment.scores[index]}</td>
+            </tr>
+          `).join('')}
+        </tbody>
+      </table>
+
+      <!-- 风险程度判断 -->
+      <div class="risk-judgment-section">
+        <div class="risk-judgment-title">风险程度判断:</div>
+        <div class="risk-options">
+          <span class="risk-option">${form.riskLevel === 'none' ? '☑' : '☐'} 无风险:≤1分</span>
+          <span class="risk-option">${form.riskLevel === 'low' ? '☑' : '☐'} 低风险:2分</span>
+          <span class="risk-option">${form.riskLevel === 'medium' ? '☑' : '☐'} 中风险:3分</span>
+          <span class="risk-option">${form.riskLevel === 'high' ? '☑' : '☐'} 高风险:≥4分</span>
+        </div>
+      </div>
+
+      <!-- 评估记录 -->
+      <div class="record-section">
+        <div class="record-title">评估记录</div>
+        <div class="record-row">
+          <div class="record-item">
+            <span class="label">评估日期:</span>
+            <span class="value">${form.assessment.assessDate || ''}</span>
+          </div>
+          <div class="record-item">
+            <span class="label">评估人签名:</span>
+            <span class="value">${form.assessment.assessor || ''}</span>
+          </div>
+          <div class="record-item">
+            <span class="label">评估总得分:</span>
+            <span class="value score-value">${form.assessment.totalScore} 分</span>
+          </div>
+          <div class="record-item">
+            <span class="label">风险等级结果:</span>
+            <span class="value">${getRiskText(form.riskLevel)}</span>
+          </div>
+        </div>
+      </div>
+
+      <!-- 预防措施 -->
+      <div class="prevention-section">
+        <div class="prevention-title">预防措施</div>
+        <div class="prevention-content">
+          <div class="prevention-item">${form.preventionMeasures?.includes('严禁老人自行冲泡热水袋') ? '☑' : '☐'} 严禁老人自行冲泡热水袋</div>
+          <div class="prevention-item">${form.preventionMeasures?.includes('严密观察长者,避免接触高温设备') ? '☑' : '☐'} 严密观察长者,避免接触高温设备</div>
+          <div class="prevention-item">${form.preventionMeasures?.includes('进食,饮水和洗浴时,应测试温度,避免水温过高') ? '☑' : '☐'} 进食,饮水和洗浴时,应测试温度,避免水温过高</div>
+          <div class="prevention-item">${form.preventionMeasures?.includes('独自洗澡长者做好水温控制先开冷水再开热水,然后将水温调节在45℃再冲洗') ? '☑' : '☐'} 独自洗澡长者做好水温控制先开冷水再开热水,然后将水温调节在45℃再冲洗</div>
+          <div class="prevention-item">${form.preventionMeasures?.includes('进食热食和热汤时,告知老人待温热后再食用') ? '☑' : '☐'} 进食热食和热汤时,告知老人待温热后再食用</div>
+        </div>
+      </div>
+    </body>
+    </html>
+  `
+
+  // 写入内容并打印
+  printWindow.document.write(printContent)
+  printWindow.document.close()
+
+  // 延迟打印,确保样式加载完成
+  setTimeout(() => {
+    printWindow.print()
+  }, 500)
 }
 
 const rules = {

+ 1 - 1
src/views/elderly/apply/nine-precautions/empyrosis/index.vue

@@ -66,7 +66,6 @@
       <el-table-column prop="elderName" header-align="center" align="center" label="长者姓名" min-width="150" show-overflow-tooltip/>
       <el-table-column prop="assessor" header-align="center" align="center" label="评估人" min-width="150" show-overflow-tooltip/>
       <el-table-column prop="assessDate" header-align="center" align="center" label="记录日期" min-width="150" show-overflow-tooltip/>
-      <el-table-column prop="totalScore" header-align="center" align="center" label="评估总得分" min-width="120" show-overflow-tooltip/>
       <el-table-column prop="riskLevel" header-align="center" align="center" label="风险等级" min-width="120" show-overflow-tooltip>
         <template #default="scope">
           <el-tag :type="getRiskLevelType(scope.row.riskLevel)">
@@ -74,6 +73,7 @@
           </el-tag>
         </template>
       </el-table-column>
+      <el-table-column prop="assessScore" header-align="center" align="center" label="评估总得分" min-width="120" show-overflow-tooltip/>
       <el-table-column prop="creator" header-align="center" align="center" label="记录人" min-width="150" show-overflow-tooltip/>
 
       <el-table-column label="操作" align="center" width="200">

+ 282 - 2
src/views/elderly/apply/nine-precautions/equilibrium/AddForm.vue

@@ -416,7 +416,7 @@
 
     <template #footer>
       <el-button @click="handleClosed">关闭</el-button>
-<!--      <el-button v-if="isDetail" type="success" @click="handleExport">打印</el-button>-->
+      <el-button v-if="isDetail" type="success" @click="handleExport">打印</el-button>
       <el-button style="margin-left: 22px;margin-right: 30px" v-loading="formLoading" type="primary"
         v-show="!isDetail" @click="submitForm">确定</el-button>
     </template>
@@ -662,7 +662,287 @@ const handleClosed = () => {
 
 /** 导出/打印 */
 const handleExport = () => {
-  message.info('打印功能开发中')
+  // 创建打印窗口
+  const printWindow = window.open('', '_blank')
+  if (!printWindow) {
+    message.error('请允许弹出窗口')
+    return
+  }
+
+  // 测试项目数据
+  const testItems = [
+    // 静态平衡能力
+    { category: '静态平衡能力', name: '双脚并拢站立', desc: '双脚同一水平并列靠拢站立,双手自然下垂,保持姿势尽可能超过10秒钟。', standard: ['≥10秒=0', '5-9秒=1', '0-4秒=2'], score: form.staticBalance[0] },
+    { category: '静态平衡能力', name: '双脚前后位站立', desc: '双脚成直线一前一后站立,前脚的后跟紧贴后脚的脚尖,双手自然下垂,保持姿势尽可能超过10秒钟。', standard: ['≥10秒=0', '5-9秒=1', '0-4秒=2'], score: form.staticBalance[1] },
+    { category: '静态平衡能力', name: '闭眼双脚并拢站立', desc: '闭上双眼,双脚同一水平并列靠拢站立,双手自然下垂,保持姿势尽可能超过10秒钟。', standard: ['≥10秒=0', '5-9秒=1', '0-4秒=2'], score: form.staticBalance[2] },
+    { category: '静态平衡能力', name: '不闭眼单腿站立', desc: '双手叉腰,单腿站立,抬起脚离地6厘米以上,保持姿势尽可能超过10秒钟。', standard: ['≥10秒=0', '5-9秒=1', '0-4秒=2'], score: form.staticBalance[3] },
+    { category: '静态平衡能力', name: '闭眼单腿站立', desc: '闭上双眼,双手叉腰,单腿站立,抬起脚离地6厘米以上,保持姿势尽可能超过10秒钟。', standard: ['≥10秒=0', '5-9秒=1', '0-4秒=2'], score: form.staticBalance[4] },
+    // 姿势控制能力
+    { category: '姿势控制能力', name: '由站立位坐下', desc: '站在椅子前面,弯曲膝盖和大腿,轻轻坐下。', standard: ['轻松坐下起立而不需扶手=0', '略感吃力,需尝试数次或扶住扶手=1', '不能独立完成=2'], score: form.postureControl[0] },
+    { category: '姿势控制能力', name: '由坐姿到站立', desc: '坐在椅子上,靠腿部力量站起。', standard: ['轻松坐下起立而不需扶手=0', '略感吃力,需尝试数次或扶住扶手=1', '不能独立完成=2'], score: form.postureControl[1] },
+    { category: '姿势控制能力', name: '由站立位蹲下', desc: '双脚分开站立与肩同宽,弯曲膝盖下蹲。', standard: ['轻松蹲下起立而不需要扶手=0', '略感吃力,需尝试数次或扶住固定物体=1', '不能独立完成=2'], score: form.postureControl[2] },
+    { category: '姿势控制能力', name: '由下蹲姿势到站立', desc: '由下蹲姿势靠腿部力量站起。', standard: ['轻松蹲下起立而不需要扶手=0', '略感吃力,需尝试数次或扶住固定物体=1', '不能独立完成=2'], score: form.postureControl[3] },
+    // 动态平衡能力
+    { category: '动态平衡能力', name: '起步', desc: '①能立即迈步出发不犹豫。②需要想一想或尝试几次才能迈步。', standard: ['①=0', '②=1'], score: form.dynamicBalance[0] },
+    { category: '动态平衡能力', name: '步高', desc: '①脚抬离地面,干净利落。②脚拖着地面走路。', standard: ['①=0', '②=1'], score: form.dynamicBalance[1] },
+    { category: '动态平衡能力', name: '步长', desc: '①每步跨度长于脚长。②不敢大步走,走小碎步。', standard: ['①=0', '②=1'], score: form.dynamicBalance[2] },
+    { category: '动态平衡能力', name: '脚步的匀称性', desc: '①步子均匀,每步的长度和高度一致。②步子不匀称,时长时短,一脚深一脚浅。', standard: ['①=0', '②=1'], score: form.dynamicBalance[3] },
+    { category: '动态平衡能力', name: '步行的连续性', desc: '①连续迈步,中间没有停顿。②步子不连贯,有时需要停顿。', standard: ['①=0', '②=1'], score: form.dynamicBalance[4] },
+    { category: '动态平衡能力', name: '步行的直线性', desc: '①能沿直线行走。②不能走直线,偏向一边。', standard: ['①=0', '②=1'], score: form.dynamicBalance[5] },
+    { category: '动态平衡能力', name: '走动时躯干平稳性', desc: '①躯干平稳不左右摇晃。②摇晃或手需向两边伸开来保持平衡。', standard: ['①=0', '②=1'], score: form.dynamicBalance[6] },
+    { category: '动态平衡能力', name: '走动时转身', desc: '①躯干平稳,转身连续,转身时步行连续。②摇晃,转身前需停步或转身时脚步有停顿。', standard: ['①=0', '②=1'], score: form.dynamicBalance[7] }
+  ]
+
+  // 构建打印内容
+  const printContent = `
+    <!DOCTYPE html>
+    <html>
+    <head>
+      <meta charset="UTF-8">
+      <title>老年人平衡能力测试表 - ${dataForm.value.elderName || ''}</title>
+      <style>
+        @media print {
+          @page { size: A4 portrait; margin: 15mm; }
+        }
+        body {
+          font-family: 'SimSun', 'Microsoft YaHei', serif;
+          font-size: 9pt;
+          line-height: 1.3;
+          color: #333;
+        }
+        .header {
+          text-align: center;
+          margin-bottom: 15px;
+          border-bottom: 2px solid #333;
+          padding-bottom: 10px;
+        }
+        .header h1 {
+          font-size: 16pt;
+          margin: 0;
+          letter-spacing: 2px;
+        }
+        .info-section {
+          margin-bottom: 15px;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .info-row {
+          display: flex;
+          flex-wrap: wrap;
+          gap: 20px;
+        }
+        .info-item {
+          display: flex;
+          align-items: center;
+        }
+        .info-item .label {
+          font-weight: bold;
+          margin-right: 8px;
+          color: #555;
+        }
+        .info-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 80px;
+          padding: 0 5px;
+          text-align: center;
+        }
+
+        .assessment-table {
+          width: 100%;
+          border-collapse: collapse;
+          margin-bottom: 15px;
+          font-size: 8pt;
+        }
+        .assessment-table th, .assessment-table td {
+          border: 1px solid #333;
+          padding: 5px;
+          text-align: left;
+          vertical-align: top;
+        }
+        .assessment-table th {
+          background: #e8e8e8;
+          font-weight: bold;
+          text-align: center;
+        }
+        .assessment-table .col-category {
+          width: 10%;
+          text-align: center;
+          font-weight: bold;
+          background: #f5f5f5;
+        }
+        .assessment-table .col-name {
+          width: 12%;
+          font-weight: bold;
+        }
+        .assessment-table .col-desc {
+          width: 35%;
+        }
+        .assessment-table .col-standard {
+          width: 30%;
+          font-size: 7.5pt;
+        }
+        .assessment-table .col-score {
+          width: 8%;
+          text-align: center;
+          font-weight: bold;
+        }
+
+        .risk-judgment-section {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+        }
+        .risk-judgment-title {
+          font-weight: bold;
+          margin-bottom: 10px;
+        }
+        .risk-options {
+          display: flex;
+          flex-wrap: wrap;
+          gap: 15px;
+        }
+        .risk-option {
+          display: inline-block;
+        }
+
+        .record-section {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+        }
+        .record-title {
+          font-weight: bold;
+          margin-bottom: 10px;
+          border-bottom: 1px solid #ccc;
+          padding-bottom: 5px;
+        }
+        .record-row {
+          display: flex;
+          gap: 30px;
+          margin-bottom: 8px;
+        }
+        .record-item {
+          display: flex;
+          align-items: center;
+        }
+        .record-item .label {
+          font-weight: bold;
+          margin-right: 8px;
+        }
+        .record-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 100px;
+          padding: 0 5px;
+          text-align: center;
+        }
+        .score-value {
+          color: #d9534f;
+          font-weight: bold;
+          font-size: 14pt;
+        }
+      </style>
+    </head>
+    <body>
+      <div class="header">
+        <h1>老年人平衡能力测试表</h1>
+      </div>
+
+      <div class="info-section">
+        <div class="info-row">
+          <div class="info-item">
+            <span class="label">长者姓名:</span>
+            <span class="value">${dataForm.value.elderName || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">性别:</span>
+            <span class="value">${dataForm.value.elderSex || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">年龄:</span>
+            <span class="value">${dataForm.value.elderAge || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">房号/床号:</span>
+            <span class="value">${dataForm.value.bedName || ''}</span>
+          </div>
+        </div>
+      </div>
+
+      <!-- 平衡能力测试表 -->
+      <table class="assessment-table">
+        <thead>
+          <tr>
+            <th class="col-category">测试类别</th>
+            <th class="col-name">测试项目</th>
+            <th class="col-desc">描述</th>
+            <th class="col-standard">评分标准</th>
+            <th class="col-score">得分</th>
+          </tr>
+        </thead>
+        <tbody>
+          ${testItems.map((item, index) => {
+            const prevItem = index > 0 ? testItems[index - 1] : null
+            const showCategory = !prevItem || prevItem.category !== item.category
+            const categoryRowspan = testItems.filter(i => i.category === item.category).length
+            return `
+              <tr>
+                ${showCategory ? `<td class="col-category" rowspan="${categoryRowspan}">${item.category}</td>` : ''}
+                <td class="col-name">${item.name}</td>
+                <td class="col-desc">${item.desc}</td>
+                <td class="col-standard">${item.standard.join('<br>')}</td>
+                <td class="col-score">${item.score}</td>
+              </tr>
+            `
+          }).join('')}
+        </tbody>
+      </table>
+
+      <!-- 风险程度判断 -->
+      <div class="risk-judgment-section">
+        <div class="risk-judgment-title">风险程度判断:</div>
+        <div class="risk-options">
+          <span class="risk-option">${form.riskLevel === 'none' ? '☑' : '☐'} 无风险:0分</span>
+          <span class="risk-option">${form.riskLevel === 'low' ? '☑' : '☐'} 低风险:1-4分</span>
+          <span class="risk-option">${form.riskLevel === 'medium' ? '☑' : '☐'} 中风险:5-16分</span>
+          <span class="risk-option">${form.riskLevel === 'high' ? '☑' : '☐'} 高风险:≥17分</span>
+        </div>
+      </div>
+
+      <!-- 评估记录 -->
+      <div class="record-section">
+        <div class="record-title">评估记录</div>
+        <div class="record-row">
+          <div class="record-item">
+            <span class="label">评估日期:</span>
+            <span class="value">${form.assessDate || ''}</span>
+          </div>
+          <div class="record-item">
+            <span class="label">评估人签名:</span>
+            <span class="value">${form.assessor || ''}</span>
+          </div>
+          <div class="record-item">
+            <span class="label">评估总得分:</span>
+            <span class="value score-value">${form.totalScore} 分</span>
+          </div>
+          <div class="record-item">
+            <span class="label">风险等级结果:</span>
+            <span class="value">${getRiskText(form.riskLevel)}</span>
+          </div>
+        </div>
+      </div>
+    </body>
+    </html>
+  `
+
+  // 写入内容并打印
+  printWindow.document.write(printContent)
+  printWindow.document.close()
+
+  // 延迟打印,确保样式加载完成
+  setTimeout(() => {
+    printWindow.print()
+  }, 500)
 }
 
 const rules = {

+ 270 - 1
src/views/elderly/apply/nine-precautions/fall-prevention-measures/AddForm.vue

@@ -393,7 +393,276 @@ const handleClosed = () => {
 
 /** 导出/打印 */
 const handleExport = () => {
-  message.info('打印功能开发中')
+  // 创建打印窗口
+  const printWindow = window.open('', '_blank')
+  if (!printWindow) {
+    message.error('请允许弹出窗口')
+    return
+  }
+
+  // 构建打印内容
+  const printContent = `
+    <!DOCTYPE html>
+    <html>
+    <head>
+      <meta charset="UTF-8">
+      <title>防坠床评估表 - ${dataForm.value.elderName || ''}</title>
+      <style>
+        @media print {
+          @page { size: A4 portrait; margin: 15mm; }
+        }
+        body {
+          font-family: 'SimSun', 'Microsoft YaHei', serif;
+          font-size: 10pt;
+          line-height: 1.4;
+          color: #333;
+        }
+        .header {
+          text-align: center;
+          margin-bottom: 15px;
+          border-bottom: 2px solid #333;
+          padding-bottom: 10px;
+        }
+        .header h1 {
+          font-size: 16pt;
+          margin: 0;
+          letter-spacing: 2px;
+        }
+        .info-section {
+          margin-bottom: 15px;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .info-row {
+          display: flex;
+          flex-wrap: wrap;
+          gap: 20px;
+        }
+        .info-item {
+          display: flex;
+          align-items: center;
+        }
+        .info-item .label {
+          font-weight: bold;
+          margin-right: 8px;
+          color: #555;
+        }
+        .info-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 80px;
+          padding: 0 5px;
+          text-align: center;
+        }
+
+        .assessment-table {
+          width: 100%;
+          border-collapse: collapse;
+          margin-bottom: 15px;
+        }
+        .assessment-table th, .assessment-table td {
+          border: 1px solid #333;
+          padding: 8px;
+          text-align: center;
+          vertical-align: middle;
+        }
+        .assessment-table th {
+          background: #e8e8e8;
+          font-weight: bold;
+        }
+        .assessment-table .col-factor {
+          width: 60%;
+          text-align: left;
+          font-weight: bold;
+          background: #f5f5f5;
+        }
+        .assessment-table .col-score-header {
+          width: 15%;
+        }
+        .assessment-table .col-result {
+          width: 10%;
+          font-weight: bold;
+        }
+
+        .risk-judgment-section {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+        }
+        .risk-judgment-title {
+          font-weight: bold;
+          margin-bottom: 10px;
+        }
+        .risk-options {
+          display: flex;
+          flex-wrap: wrap;
+          gap: 15px;
+        }
+        .risk-option {
+          display: inline-block;
+        }
+
+        .record-section {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+        }
+        .record-title {
+          font-weight: bold;
+          margin-bottom: 10px;
+          border-bottom: 1px solid #ccc;
+          padding-bottom: 5px;
+        }
+        .record-row {
+          display: flex;
+          gap: 30px;
+          margin-bottom: 8px;
+        }
+        .record-item {
+          display: flex;
+          align-items: center;
+        }
+        .record-item .label {
+          font-weight: bold;
+          margin-right: 8px;
+        }
+        .record-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 100px;
+          padding: 0 5px;
+          text-align: center;
+        }
+        .score-value {
+          color: #d9534f;
+          font-weight: bold;
+          font-size: 14pt;
+        }
+
+        .prevention-section {
+          margin: 15px 0;
+          border: 1px solid #999;
+        }
+        .prevention-title {
+          font-weight: bold;
+          background: #e8e8e8;
+          padding: 8px 12px;
+          border-bottom: 1px solid #999;
+        }
+        .prevention-content {
+          padding: 10px 12px;
+        }
+        .prevention-item {
+          margin-bottom: 8px;
+          font-size: 10pt;
+        }
+      </style>
+    </head>
+    <body>
+      <div class="header">
+        <h1>防坠床评估表</h1>
+      </div>
+
+      <div class="info-section">
+        <div class="info-row">
+          <div class="info-item">
+            <span class="label">长者姓名:</span>
+            <span class="value">${dataForm.value.elderName || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">性别:</span>
+            <span class="value">${dataForm.value.elderSex || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">年龄:</span>
+            <span class="value">${dataForm.value.elderAge || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">房号/床号:</span>
+            <span class="value">${dataForm.value.bedName || ''}</span>
+          </div>
+        </div>
+      </div>
+
+      <!-- 危险因素评估表 -->
+      <table class="assessment-table">
+        <thead>
+          <tr>
+            <th class="col-factor">危险因素</th>
+            <th class="col-score-header">是</th>
+            <th class="col-score-header">否</th>
+            <th class="col-result">得分</th>
+          </tr>
+        </thead>
+        <tbody>
+          ${riskFactors.map((item, index) => `
+            <tr>
+              <td class="col-factor">${item.name}</td>
+              <td class="col-score-header">${form.assessment.scores[index] === item.yesScore ? '☑' : '☐'} ${item.yesScore}分</td>
+              <td class="col-score-header">${form.assessment.scores[index] === item.noScore ? '☑' : '☐'} ${item.noScore}分</td>
+              <td class="col-result">${form.assessment.scores[index]}</td>
+            </tr>
+          `).join('')}
+        </tbody>
+      </table>
+
+      <!-- 风险程度判断 -->
+      <div class="risk-judgment-section">
+        <div class="risk-judgment-title">风险程度判断:</div>
+        <div class="risk-options">
+          <span class="risk-option">${form.riskLevel === 'none' ? '☑' : '☐'} 无风险:≤1分</span>
+          <span class="risk-option">${form.riskLevel === 'low' ? '☑' : '☐'} 低风险:2分</span>
+          <span class="risk-option">${form.riskLevel === 'medium' ? '☑' : '☐'} 中风险:3分</span>
+          <span class="risk-option">${form.riskLevel === 'high' ? '☑' : '☐'} 高风险:≥4分</span>
+        </div>
+      </div>
+
+      <!-- 评估记录 -->
+      <div class="record-section">
+        <div class="record-title">评估记录</div>
+        <div class="record-row">
+          <div class="record-item">
+            <span class="label">评估日期:</span>
+            <span class="value">${form.assessment.assessDate || ''}</span>
+          </div>
+          <div class="record-item">
+            <span class="label">评估人签名:</span>
+            <span class="value">${form.assessment.assessor || ''}</span>
+          </div>
+          <div class="record-item">
+            <span class="label">评估总得分:</span>
+            <span class="value score-value">${form.assessment.totalScore} 分</span>
+          </div>
+          <div class="record-item">
+            <span class="label">风险等级结果:</span>
+            <span class="value">${getRiskText(form.riskLevel)}</span>
+          </div>
+        </div>
+      </div>
+
+      <!-- 预防措施 -->
+      <div class="prevention-section">
+        <div class="prevention-title">预防措施</div>
+        <div class="prevention-content">
+          <div class="prevention-item">${form.preventionMeasures?.includes('加勤巡视,随时发现安全隐患') ? '☑' : '☐'} 加勤巡视,随时发现安全隐患</div>
+          <div class="prevention-item">${form.preventionMeasures?.includes('睡觉时拉起两侧床栏如需下床请将床栏放下,切勿翻越床栏') ? '☑' : '☐'} 睡觉时拉起两侧床栏如需下床请将床栏放下,切勿翻越床栏</div>
+          <div class="prevention-item">${form.preventionMeasures?.includes('常检查床的牢固性,发现不稳定时立即对床进行加固') ? '☑' : '☐'} 常检查床的牢固性,发现不稳定时立即对床进行加固</div>
+          <div class="prevention-item">${form.preventionMeasures?.includes('发现老人睡在床边缘时,应将老人调整到床中央') ? '☑' : '☐'} 发现老人睡在床边缘时,应将老人调整到床中央</div>
+          <div class="prevention-item">${form.preventionMeasures?.includes('翻身时叮嘱老人动作要慢,幅度要小确保安全') ? '☑' : '☐'} 翻身时叮嘱老人动作要慢,幅度要小确保安全</div>
+          <div class="prevention-item">${form.preventionMeasures?.includes('将生活用品、尿壶便器等放于易拿之处') ? '☑' : '☐'} 将生活用品、尿壶便器等放于易拿之处</div>
+        </div>
+      </div>
+    </body>
+    </html>
+  `
+
+  // 写入内容并打印
+  printWindow.document.write(printContent)
+  printWindow.document.close()
+
+  // 延迟打印,确保样式加载完成
+  setTimeout(() => {
+    printWindow.print()
+  }, 500)
 }
 
 const rules = {

+ 395 - 2
src/views/elderly/apply/nine-precautions/nutritional-risk/AddForm.vue

@@ -470,7 +470,7 @@
         <el-button v-if="!isDetail" type="primary" @click="submitForm">保存</el-button>
         <el-button v-if="!isDetail" @click="handleClosed">取消</el-button>
         <el-button v-if="isDetail" @click="handleClosed">关闭</el-button>
-<!--        <el-button v-if="isDetail" type="primary" @click="handleExport">打印</el-button>-->
+       <el-button v-if="isDetail" type="primary" @click="handleExport">打印</el-button>
       </div>
     </template>
   </el-drawer>
@@ -775,7 +775,400 @@ const handleClosed = () => {
 }
 
 const handleExport = () => {
-  message.info('打印功能开发中')
+  // 创建打印窗口
+  const printWindow = window.open('', '_blank')
+  if (!printWindow) {
+    message.error('请允许弹出窗口')
+    return
+  }
+
+  // 初筛项目数据
+  const initialItems = [
+    { name: '1. BMI', options: [{ score: 0, text: 'BMI<19 或 BMI≥28' }, { score: 1, text: '19≤BMI<21 或 26≤BMI<28' }, { score: 2, text: '21≤BMI<23 或 24≤BMI<26' }, { score: 3, text: '23≤BMI≤24' }] },
+    { name: '2. 近3个月体重变化', options: [{ score: 0, text: '减少或增加≥3Kg' }, { score: 1, text: '不知道' }, { score: 2, text: '1Kg≤减少<3Kg 或 1Kg≤增加<3Kg' }, { score: 3, text: '0Kg<减少<1Kg 或 0Kg<增加<1Kg' }] },
+    { name: '3. 活动能力', options: [{ score: 0, text: '卧床' }, { score: 1, text: '需要依赖工具活动' }, { score: 2, text: '独立户外活动' }, { score: null, text: '—' }] },
+    { name: '4. 牙齿状况', options: [{ score: 0, text: '全口或半口缺' }, { score: 1, text: '用义齿' }, { score: 2, text: '正常' }, { score: null, text: '—' }] },
+    { name: '5. 神经精神疾病', options: [{ score: 0, text: '严重认知障碍或抑郁' }, { score: 1, text: '轻度认知障碍或抑郁' }, { score: 2, text: '无认知障碍或抑郁' }, { score: null, text: '—' }] },
+    { name: '6. 近三个月有无饮食量变化', options: [{ score: 0, text: '严重增加或减少' }, { score: 1, text: '增加或减少' }, { score: 2, text: '无变化' }, { score: null, text: '—' }] }
+  ]
+
+  // 评估项目数据
+  const assessItems = [
+    { name: '7. 患慢性病数>3种', options: [{ score: 0, text: '是' }, { score: null, text: '—' }, { score: 1, text: '否' }, { score: null, text: '—' }] },
+    { name: '8. 服药时间在一个月以上的药物种类>3种', options: [{ score: 0, text: '是' }, { score: null, text: '—' }, { score: 1, text: '否' }, { score: null, text: '—' }] },
+    { name: '9. 是否独居', options: [{ score: 0, text: '是' }, { score: null, text: '—' }, { score: 1, text: '否' }, { score: null, text: '—' }] },
+    { name: '10. 睡眠时间', options: [{ score: 0, text: '<5h/d' }, { score: null, text: '—' }, { score: 1, text: '≥5h/d' }, { score: null, text: '—' }] },
+    { name: '11. 户外独立活动时间', options: [{ score: 0, text: '<1h/d' }, { score: null, text: '—' }, { score: 1, text: '≥1h/d' }, { score: null, text: '—' }] },
+    { name: '12. 文化程度', options: [{ score: 0, text: '小学及以下' }, { score: null, text: '—' }, { score: 1, text: '中学及以上' }, { score: null, text: '—' }] },
+    { name: '13. 自我感觉经济状况', options: [{ score: 0, text: '差' }, { score: 0.5, text: '一般' }, { score: 1, text: '良好' }, { score: null, text: '—' }] },
+    { name: '14. 进食能力', options: [{ score: 0, text: '依靠别人' }, { score: null, text: '—' }, { score: 1, text: '自行进食稍有困难' }, { score: 2, text: '自行进食' }] },
+    { name: '15. 一天餐次', options: [{ score: 0, text: '1次' }, { score: null, text: '—' }, { score: 1, text: '2次' }, { score: 2, text: '3次及以上' }] },
+    { name: '16. 每天摄入奶类/豆制品/鱼肉类', options: [{ score: 0, text: '0-1项' }, { score: 0.5, text: '2项' }, { score: 1, text: '3项' }, { score: null, text: '—' }] },
+    { name: '17. 每天烹调油摄入量', options: [{ score: 0, text: '≥25g' }, { score: null, text: '—' }, { score: 1, text: '<25g' }, { score: null, text: '—' }] },
+    { name: '18. 是否每天吃蔬菜水果500g及以上', options: [{ score: 0, text: '否' }, { score: null, text: '—' }, { score: 1, text: '是' }, { score: null, text: '—' }] },
+    { name: '19. 小腿围', options: [{ score: 0, text: '<31cm' }, { score: null, text: '—' }, { score: 1, text: '≥31cm' }, { score: null, text: '—' }] },
+    { name: '20. 腰围', options: [{ score: '男>90cm/女>80cm', text: '0分' }, { score: null, text: '—' }, { score: '男≤90cm/女≤80cm', text: '1分' }, { score: null, text: '—' }] }
+  ]
+
+  // 构建打印内容
+  const printContent = `
+    <!DOCTYPE html>
+    <html>
+    <head>
+      <meta charset="UTF-8">
+      <title>营养风险评估表 - ${dataForm.elderName || ''}</title>
+      <style>
+        @media print {
+          @page { size: A4 portrait; margin: 15mm; }
+        }
+        body {
+          font-family: 'SimSun', 'Microsoft YaHei', serif;
+          font-size: 8pt;
+          line-height: 1.2;
+          color: #333;
+        }
+        .header {
+          text-align: center;
+          margin-bottom: 15px;
+          border-bottom: 2px solid #333;
+          padding-bottom: 10px;
+        }
+        .header h1 {
+          font-size: 14pt;
+          margin: 0;
+          letter-spacing: 2px;
+        }
+        .info-section {
+          margin-bottom: 15px;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .info-row {
+          display: flex;
+          flex-wrap: wrap;
+          gap: 20px;
+        }
+        .info-item {
+          display: flex;
+          align-items: center;
+        }
+        .info-item .label {
+          font-weight: bold;
+          margin-right: 8px;
+          color: #555;
+        }
+        .info-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 60px;
+          padding: 0 5px;
+          text-align: center;
+        }
+
+        .subsection-title {
+          font-size: 11pt;
+          font-weight: bold;
+          margin: 15px 0 10px 0;
+          padding: 5px 10px;
+          background: #e8e8e8;
+          border-left: 4px solid #409eff;
+        }
+
+        .assessment-table {
+          width: 100%;
+          border-collapse: collapse;
+          margin-bottom: 15px;
+          font-size: 7.5pt;
+        }
+        .assessment-table th, .assessment-table td {
+          border: 1px solid #333;
+          padding: 4px;
+          text-align: center;
+          vertical-align: middle;
+        }
+        .assessment-table th {
+          background: #e8e8e8;
+          font-weight: bold;
+        }
+        .assessment-table .col-item {
+          width: 20%;
+          font-weight: bold;
+          background: #f5f5f5;
+          text-align: left;
+        }
+        .assessment-table .col-score {
+          width: 20%;
+        }
+
+        .initial-tip {
+          margin: 10px 0;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fff3cd;
+          font-size: 9pt;
+        }
+        .score-value {
+          color: #d9534f;
+          font-weight: bold;
+          font-size: 12pt;
+        }
+
+        .score-summary {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .summary-item {
+          display: flex;
+          justify-content: space-between;
+          margin-bottom: 5px;
+        }
+        .summary-item .label {
+          font-weight: bold;
+        }
+        .summary-item .value {
+          font-weight: bold;
+        }
+        .summary-item .value.total {
+          color: #d9534f;
+          font-size: 14pt;
+        }
+
+        .scoring-standard {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .standard-title {
+          font-weight: bold;
+          margin-bottom: 8px;
+        }
+        .standard-content {
+          font-size: 8pt;
+          line-height: 1.5;
+        }
+        .standard-content p {
+          margin: 3px 0;
+        }
+        .current-result {
+          margin-top: 10px;
+          padding-top: 10px;
+          border-top: 1px solid #ccc;
+        }
+        .result-label {
+          font-weight: bold;
+          margin-right: 10px;
+        }
+
+        .assessor-section {
+          margin: 15px 0;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .assessor-row {
+          display: flex;
+          gap: 30px;
+        }
+        .assessor-item {
+          display: flex;
+          align-items: center;
+        }
+        .assessor-item .label {
+          font-weight: bold;
+          margin-right: 8px;
+        }
+        .assessor-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 120px;
+          padding: 0 5px;
+          text-align: center;
+        }
+      </style>
+    </head>
+    <body>
+      <div class="header">
+        <h1>营养风险评估表</h1>
+      </div>
+
+      <div class="info-section">
+        <div class="info-row">
+          <div class="info-item">
+            <span class="label">长者姓名:</span>
+            <span class="value">${dataForm.elderName || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">性别:</span>
+            <span class="value">${dataForm.elderSex || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">年龄:</span>
+            <span class="value">${dataForm.elderAge || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">床位号:</span>
+            <span class="value">${dataForm.bedName || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">评估日期:</span>
+            <span class="value">${form.assessDate || ''}</span>
+          </div>
+          <div class="info-item">
+            <span class="label">身高:</span>
+            <span class="value">${form.height || ''} m</span>
+          </div>
+          <div class="info-item">
+            <span class="label">体重:</span>
+            <span class="value">${form.weight || ''} Kg</span>
+          </div>
+          <div class="info-item">
+            <span class="label">BMI:</span>
+            <span class="value">${form.bmi ? form.bmi.toFixed(1) : ''}</span>
+          </div>
+        </div>
+      </div>
+
+      <!-- 初筛部分 -->
+      <div class="subsection-title">初筛(满分14分)</div>
+      <table class="assessment-table">
+        <thead>
+          <tr>
+            <th class="col-item">项目</th>
+            <th class="col-score">0分</th>
+            <th class="col-score">1分</th>
+            <th class="col-score">2分</th>
+            <th class="col-score">3分</th>
+          </tr>
+        </thead>
+        <tbody>
+          ${initialItems.map((item, index) => `
+            <tr>
+              <td class="col-item">${item.name}</td>
+              ${item.options.map(opt => `
+                <td class="col-score">${form.initialScores[index] === opt.score ? '☑' : '☐'} ${opt.text}</td>
+              `).join('')}
+            </tr>
+          `).join('')}
+        </tbody>
+      </table>
+
+      <div class="initial-tip">
+        <p>总分14分,<12分提示有营养不良风险,继续以下评估;≥12分提示无营养不良风险,无需以下评估。</p>
+        <p>初筛分数(小计满分14分):<span class="score-value">${form.initialScore}</span> 分</p>
+      </div>
+
+      <!-- 评估部分 -->
+      <div class="subsection-title">评估(满分16分)</div>
+      <table class="assessment-table">
+        <thead>
+          <tr>
+            <th class="col-item">项目</th>
+            <th class="col-score">0分</th>
+            <th class="col-score">0.5分</th>
+            <th class="col-score">1分</th>
+            <th class="col-score">2分</th>
+          </tr>
+        </thead>
+        <tbody>
+          ${assessItems.map((item, index) => `
+            <tr>
+              <td class="col-item">${item.name}</td>
+              ${item.options.map((opt, optIndex) => {
+                let isSelected = false
+                if (index < 11) {
+                  isSelected = form.assessScores[index] === opt.score
+                } else if (index === 11) {
+                  isSelected = form.measureScores[0] === opt.score
+                } else if (index === 12) {
+                  isSelected = form.measureScores[1] === opt.score
+                } else if (index === 13) {
+                  // 腰围特殊处理
+                  if (optIndex === 0) isSelected = form.waistScore === 0 || form.waistScore === 2
+                  if (optIndex === 2) isSelected = form.waistScore === 1 || form.waistScore === 3
+                }
+                return `<td class="col-score">${isSelected ? '☑' : '☐'} ${opt.text}</td>`
+              }).join('')}
+            </tr>
+          `).join('')}
+        </tbody>
+      </table>
+
+      <!-- 测量值 -->
+      <div class="info-section">
+        <div class="info-row">
+          <div class="info-item">
+            <span class="label">小腿围:</span>
+            <span class="value">${form.calfCircumference || ''} cm</span>
+          </div>
+          <div class="info-item">
+            <span class="label">腰围:</span>
+            <span class="value">${form.waistCircumference || ''} cm</span>
+          </div>
+        </div>
+      </div>
+
+      <!-- 分数汇总 -->
+      <div class="score-summary">
+        <div class="summary-item">
+          <span class="label">初筛分数(小计满分14分):</span>
+          <span class="value">${form.initialScore} 分</span>
+        </div>
+        <div class="summary-item">
+          <span class="label">评估分数(小计满分16分):</span>
+          <span class="value">${form.assessScore + form.measureScore} 分</span>
+        </div>
+        <div class="summary-item">
+          <span class="label">年龄调整(≥70岁加1分):</span>
+          <span class="value">${form.ageAdjust} 分</span>
+        </div>
+        <div class="summary-item">
+          <span class="label">量表总分(满分30分):</span>
+          <span class="value total">${form.totalScore} 分</span>
+        </div>
+      </div>
+
+      <!-- 评分标准 -->
+      <div class="scoring-standard">
+        <div class="standard-title">评分标准:</div>
+        <div class="standard-content">
+          <p>若初筛总分≥12分提示无营养不良风险,无需评估;</p>
+          <p>若初筛总分<12分提示有营养不良风险,继续评估;</p>
+          <p>若营养不良风险评估总分(初筛+评估)≥24分,表示营养状况良好;</p>
+          <p>若营养不良风险评估总分(初筛+评估)>24分,当BMI≥24(或男性腰围>90cm,女性腰围>80cm)时,提示可能是肥胖/超重型营养不良或有营养不良风险;</p>
+          <p>若营养不良风险评估总分(初筛+评估)17分~24分,表示有营养不良风险;</p>
+          <p>若营养不良风险评估总分(初筛+评估)≤17分,表示有营养不良。</p>
+        </div>
+        ${form.resultLevel ? `
+          <div class="current-result">
+            <span class="result-label">当前评估结果:</span>
+            <span class="score-value">${getResultText(form.resultLevel)}</span>
+          </div>
+        ` : ''}
+      </div>
+
+      <!-- 评估人签名 -->
+      <div class="assessor-section">
+        <div class="assessor-row">
+          <div class="assessor-item">
+            <span class="label">评估人签名:</span>
+            <span class="value">${form.assessor || ''}</span>
+          </div>
+        </div>
+      </div>
+    </body>
+    </html>
+  `
+
+  // 写入内容并打印
+  printWindow.document.write(printContent)
+  printWindow.document.close()
+
+  // 延迟打印,确保样式加载完成
+  setTimeout(() => {
+    printWindow.print()
+  }, 500)
 }
 
 const rules = {

+ 3 - 12
src/views/social-worker/assessment/AttackRiskFactors/AddForm.vue

@@ -198,7 +198,7 @@
         </div>
 
         <!-- 签名区域 -->
-        <div class="signature-section">
+        <!-- <div class="signature-section">
           <div class="signature-row">
             <div class="signature-item">
               <span class="signature-label">家属/监护人签名:</span>
@@ -206,7 +206,7 @@
             </div>
 
           </div>
-        </div>
+        </div> -->
 
         <!-- 说明 -->
         <div class="note-section">
@@ -870,16 +870,7 @@ const handleExport = () => {
         </div>
       </div>
 
-      <!-- 签名区域 -->
-      <div class="signature-section">
-        <div class="signature-row">
-          <div class="signature-item">
-            <span class="signature-label">家属/监护人签名:</span>
-            <span class="signature-value">${form.familySignature || ''}</span>
-          </div>
-
-        </div>
-      </div>
+ 
 
       <!-- 说明 -->
       <div class="note-section">

+ 3 - 12
src/views/social-worker/assessment/NGASR/AddForm.vue

@@ -130,7 +130,7 @@
         </div>
 
         <!-- 签名区域 -->
-        <div class="signature-section">
+        <!-- <div class="signature-section">
           <div class="signature-row">
             <div class="signature-item">
               <span class="signature-label">家属/监护人签名:</span>
@@ -138,7 +138,7 @@
             </div>
 
           </div>
-        </div>
+        </div> -->
 
         <!-- 说明 -->
         <div class="note-section">
@@ -791,16 +791,7 @@ const handleExport = () => {
         </div>
       </div>
 
-      <!-- 签名区域 -->
-      <div class="signature-section">
-        <div class="signature-row">
-          <div class="signature-item">
-            <span class="signature-label">家属/监护人签名:</span>
-            <span class="signature-value">${form.familySignature || ''}</span>
-          </div>
-
-        </div>
-      </div>
+ 
 
       <!-- 说明 -->
       <div class="note-section">

+ 2 - 22
src/views/social-worker/assessment/PerceptionAndCommunication/AddForm.vue

@@ -169,19 +169,7 @@
           </div>
         </div>
 
-        <!-- 签名区域 -->
-        <div class="signature-section">
-          <div class="signature-row">
-            <div class="signature-item">
-              <span class="signature-label">家属/监护人签名:</span>
-              <el-input v-model="form.familySignature" :disabled="isDetail" class="signature-input"/>
-            </div>
-<!--            <div class="signature-item date-item">-->
-<!--              <span class="signature-label">日期:</span>-->
-<!--              <el-date-picker v-model="form.familySignDate" type="date" :disabled="isDetail" class="date-picker"/>-->
-<!--            </div>-->
-          </div>
-        </div>
+ 
 
         <!-- 说明 -->
         <div class="note-section">
@@ -838,15 +826,7 @@ const handleExport = () => {
         </div>
       </div>
 
-      <!-- 签名区域 -->
-      <div class="signature-section">
-        <div class="signature-row">
-          <div class="signature-item">
-            <span class="signature-label">家属/监护人签名:</span>
-            <span class="signature-value">${form.familySignature || ''}</span>
-          </div>
-        </div>
-      </div>
+  
 
       <!-- 说明 -->
       <div class="note-section">

+ 2 - 20
src/views/social-worker/assessment/SAS/AddForm.vue

@@ -128,16 +128,7 @@
           </div>
         </div>
 
-        <!-- 签名区域 -->
-        <div class="signature-section">
-          <div class="signature-row">
-            <div class="signature-item">
-              <span class="signature-label">家属/监护人签名:</span>
-              <el-input v-model="form.familySignature" :disabled="isDetail" class="signature-input"/>
-            </div>
-
-          </div>
-        </div>
+     
       </div>
 
     </div>
@@ -705,16 +696,7 @@ const handleExport = () => {
         <p>③ 结果解释:按照中国常模结果,标准分的分界值为50分,分值越高,焦虑倾向越明显。50~59分为轻度焦虑;60~69分为中度焦虑;≥70分为重度焦虑。</p>
       </div>
 
-      <!-- 签名区域 -->
-      <div class="signature-section">
-        <div class="signature-row">
-          <div class="signature-item">
-            <span class="signature-label">家属/监护人签名:</span>
-            <span class="signature-value">${form.familySignature || ''}</span>
-          </div>
-
-        </div>
-      </div>
+      
     </body>
     </html>
   `

+ 2 - 20
src/views/social-worker/assessment/SDS/AddForm.vue

@@ -128,16 +128,7 @@
           </div>
         </div>
 
-        <!-- 签名区域 -->
-        <div class="signature-section">
-          <div class="signature-row">
-            <div class="signature-item">
-              <span class="signature-label">家属/监护人签名:</span>
-              <el-input v-model="form.familySignature" :disabled="isDetail" class="signature-input"/>
-            </div>
-
-          </div>
-        </div>
+      
       </div>
 
     </div>
@@ -704,16 +695,7 @@ const handleExport = () => {
         <p>③ 结果解释:标准分值越低状态越好,50~59分为轻度抑郁;60~69分为中度抑郁;≥70分为重度抑郁。</p>
       </div>
 
-      <!-- 签名区域 -->
-      <div class="signature-section">
-        <div class="signature-row">
-          <div class="signature-item">
-            <span class="signature-label">家属/监护人签名:</span>
-            <span class="signature-value">${form.familySignature || ''}</span>
-          </div>
-
-        </div>
-      </div>
+    
     </body>
     </html>
   `