Parcourir la source

Merge branch 'master' of http://47.107.245.0:3000/xiongxing/kyj-yanglao-web-new

xiongxing il y a 17 heures
Parent
commit
b9895f7612
27 fichiers modifiés avec 2594 ajouts et 287 suppressions
  1. 42 0
      src/utils/constants.ts
  2. 49 0
      src/utils/risk-assessment.ts
  3. 9 0
      src/views/changes/ChangeFood/AddForm.vue
  4. 1 10
      src/views/elderly/apply/nine-precautions/MMSE/AddForm.vue
  5. 8 1
      src/views/elderly/apply/nine-precautions/MMSE/index.vue
  6. 11 12
      src/views/elderly/apply/nine-precautions/asphyxiation-by-choking/AddForm.vue
  7. 111 24
      src/views/elderly/apply/nine-precautions/attack/AddForm.vue
  8. 9 2
      src/views/elderly/apply/nine-precautions/attack/index.vue
  9. 4 12
      src/views/elderly/apply/nine-precautions/commit-suicide/AddForm.vue
  10. 6 16
      src/views/elderly/apply/nine-precautions/communication/AddForm.vue
  11. 8 1
      src/views/elderly/apply/nine-precautions/communication/index.vue
  12. 278 2
      src/views/elderly/apply/nine-precautions/daily-life/AddForm.vue
  13. 270 2
      src/views/elderly/apply/nine-precautions/empyrosis/AddForm.vue
  14. 1 1
      src/views/elderly/apply/nine-precautions/empyrosis/index.vue
  15. 282 2
      src/views/elderly/apply/nine-precautions/equilibrium/AddForm.vue
  16. 283 2
      src/views/elderly/apply/nine-precautions/fall-down/AddForm.vue
  17. 271 2
      src/views/elderly/apply/nine-precautions/fall-prevention-measures/AddForm.vue
  18. 395 2
      src/views/elderly/apply/nine-precautions/nutritional-risk/AddForm.vue
  19. 176 107
      src/views/elderly/apply/nine-precautions/pressure-sores/AddForm.vue
  20. 306 2
      src/views/elderly/apply/nine-precautions/wander-away/AddForm.vue
  21. 11 0
      src/views/elderly/elder/contract/index.vue
  22. 51 1
      src/views/elderly/fee/out-refund/Form.vue
  23. 3 12
      src/views/social-worker/assessment/AttackRiskFactors/AddForm.vue
  24. 3 12
      src/views/social-worker/assessment/NGASR/AddForm.vue
  25. 2 22
      src/views/social-worker/assessment/PerceptionAndCommunication/AddForm.vue
  26. 2 20
      src/views/social-worker/assessment/SAS/AddForm.vue
  27. 2 20
      src/views/social-worker/assessment/SDS/AddForm.vue

+ 42 - 0
src/utils/constants.ts

@@ -64,6 +64,48 @@ export const SystemUserSocialTypeEnum = {
   }
 }
 
+// ========== 风险评估相关枚举 ==========
+/**
+ * 攻击风险等级枚举
+ */
+export const AttackRiskLevelEnum = {
+  NONE: 0,    // 无
+  LEVEL_1: 1, // I级
+  LEVEL_2: 2, // II级
+  LEVEL_3: 3, // III级
+  LEVEL_4: 4  // IV级
+}
+
+/**
+ * 风险程度枚举
+ */
+export const RiskDegreeEnum = {
+  NONE: 'none',   // 无风险
+  LOW: 'low',     // 低风险
+  MEDIUM: 'medium', // 中风险
+  HIGH: 'high'    // 高风险
+}
+
+/**
+ * 风险等级对应的中文标签
+ */
+export const RiskLevelTextMap = {
+  [RiskDegreeEnum.NONE]: '无风险',
+  [RiskDegreeEnum.LOW]: '低风险',
+  [RiskDegreeEnum.MEDIUM]: '中风险',
+  [RiskDegreeEnum.HIGH]: '高风险'
+}
+
+/**
+ * 风险等级对应的标签类型(用于el-tag的type属性)
+ */
+export const RiskLevelTypeMap = {
+  [RiskDegreeEnum.NONE]: 'info',    // 灰色
+  [RiskDegreeEnum.LOW]: 'success', // 绿色
+  [RiskDegreeEnum.MEDIUM]: 'warning', // 橙色
+  [RiskDegreeEnum.HIGH]: 'danger'  // 红色
+}
+
 // ========== INFRA 模块 ==========
 /**
  * 代码生成模板类型

+ 49 - 0
src/utils/risk-assessment.ts

@@ -0,0 +1,49 @@
+import { RiskDegreeEnum, RiskLevelTextMap, RiskLevelTypeMap } from './constants'
+
+/**
+ * 从assessData JSON字符串中解析riskLevel
+ * @param assessData assessData JSON字符串
+ * @returns riskLevel值或null
+ */
+export const parseRiskLevelFromAssessData = (assessData: string | undefined): string | null => {
+  if (!assessData) return null
+  try {
+    const data = JSON.parse(assessData)
+    return data.riskLevel || null
+  } catch {
+    return null
+  }
+}
+
+/**
+ * 获取风险等级的中文文本
+ * @param riskLevel riskLevel值
+ * @returns 中文文本
+ */
+export const getRiskLevelText = (riskLevel: string | null | undefined): string => {
+  if (!riskLevel) return ''
+  return RiskLevelTextMap[riskLevel] || riskLevel
+}
+
+/**
+ * 获取风险等级对应的标签类型
+ * @param riskLevel riskLevel值
+ * @returns el-tag的type属性值
+ */
+export const getRiskLevelTagType = (riskLevel: string | null | undefined): string => {
+  if (!riskLevel) return 'info'
+  return RiskLevelTypeMap[riskLevel] || 'info'
+}
+
+/**
+ * 从assessData获取风险等级的完整信息(文本和标签类型)
+ * @param assessData assessData JSON字符串
+ * @returns 包含text和type的对象
+ */
+export const getRiskLevelInfo = (assessData: string | undefined): { text: string; type: string } => {
+  const riskLevel = parseRiskLevelFromAssessData(assessData)
+  return {
+    text: getRiskLevelText(riskLevel),
+    type: getRiskLevelTagType(riskLevel)
+  }
+}

+ 9 - 0
src/views/changes/ChangeFood/AddForm.vue

@@ -403,12 +403,17 @@ const open = async (tId, id?: any, detail: boolean = false, status) => {
   if (id) {
     try {
       const res = await getCateringDetail(id, status, isDetail.value)
+      // 先保存tenantId和categoryName,因为dataForm.value = res会覆盖它们
+      const savedTenantId = dataForm.value.tenantId || res.tenantId
       dataForm.value = res
+      dataForm.value.tenantId = savedTenantId
       dataForm.value.itemName = res.originalName
       dataForm.value.type = 6
       await searchElRef.value.upData(res.elderName)
       dataForm.value.type = parseInt(res.type) //注意要用int类型才会正常展示
       dataForm.value.bedName = res.bedName
+      dataForm.value.overheadChargeId = res.originalId
+      dataForm.value.expectOverheadChargeId = res.expectId || ''
       dataForm.value.changeFiles = JSON.parse(res.changeFiles)
       if (!res.startTenantId) {
         dataForm.value.startTenantId = getTenantId()
@@ -418,6 +423,10 @@ const open = async (tId, id?: any, detail: boolean = false, status) => {
     } catch (err) {}
   }
   await getOverheadList()
+  // 重新提交/编辑时,如果有expectId,需要手动触发handleChange来设置categoryName
+  if (dataForm.value.expectId) {
+    handleChange()
+  }
 }
 defineExpose({ open }) // 提供 open 方法,用于打开弹窗
 

+ 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";

+ 11 - 12
src/views/elderly/apply/nine-precautions/asphyxiation-by-choking/AddForm.vue

@@ -252,18 +252,17 @@ const updateRiskLevel = () => {
 
   // 根据选中的等级判断风险程度
   // I级(5秒内)为无风险;I级(5秒以上)为低风险,II级为中风险;III级、IV级、V级为高风险
-  const selectedLevel = swallowLevels.find(item => item.level === level)
-  if (selectedLevel) {
-    const score = selectedLevel.score
-    if (score === 1) {
-      form.riskLevel = 'none'
-    } else if (score === 2) {
-      form.riskLevel = 'low'
-    } else if (score === 3) {
-      form.riskLevel = 'medium'
-    } else {
-      form.riskLevel = 'high'
-    }
+  const score = Number(form.assessment.level)
+  if (!score) return
+
+  if (score === 1) {
+    form.riskLevel = 'none'
+  } else if (score === 2) {
+    form.riskLevel = 'low'
+  } else if (score === 3) {
+    form.riskLevel = 'medium'
+  } else {
+    form.riskLevel = 'high'
   }
 }
 

+ 111 - 24
src/views/elderly/apply/nine-precautions/attack/AddForm.vue

@@ -60,7 +60,7 @@
               <tr>
                 <th class="content-col">评估内容</th>
                 <th class="level-col">级别</th>
-                <th class="select-col">选择</th>
+                <th class="select-col">评估</th>
               </tr>
             </thead>
             <tbody>
@@ -78,9 +78,14 @@
                 </td>
                 <td class="level" rowspan="7">I级</td>
                 <td class="select" rowspan="7">
-                  <el-radio-group v-model="form.attackLevel" :disabled="isDetail">
+                  <el-radio-group v-model="form.attackLevel" :disabled="isDetail" @change="handleLevelChange">
                     <el-radio :value="1">  符合</el-radio>
                   </el-radio-group>
+                  <div class="multi-select">
+                    <el-checkbox-group v-model="form.attackLevel1Items" :disabled="isDetail || form.attackLevel !== 1">
+                      <el-checkbox v-for="n in 7" :key="n" :value="n">{{ n }}</el-checkbox>
+                    </el-checkbox-group>
+                  </div>
                 </td>
               </tr>
               <tr></tr><tr></tr><tr></tr><tr></tr><tr></tr><tr></tr>
@@ -95,9 +100,14 @@
                 </td>
                 <td class="level" rowspan="3">II级</td>
                 <td class="select" rowspan="3">
-                  <el-radio-group v-model="form.attackLevel" :disabled="isDetail">
+                  <el-radio-group v-model="form.attackLevel" :disabled="isDetail" @change="handleLevelChange">
                     <el-radio :value="2">  符合</el-radio>
                   </el-radio-group>
+                  <div class="multi-select">
+                    <el-checkbox-group v-model="form.attackLevel2Items" :disabled="isDetail || form.attackLevel !== 2">
+                      <el-checkbox v-for="n in 3" :key="n" :value="n">{{ n }}</el-checkbox>
+                    </el-checkbox-group>
+                  </div>
                 </td>
               </tr>
               <tr></tr><tr></tr>
@@ -113,9 +123,14 @@
                 </td>
                 <td class="level" rowspan="4">III级</td>
                 <td class="select" rowspan="4">
-                  <el-radio-group v-model="form.attackLevel" :disabled="isDetail">
+                  <el-radio-group v-model="form.attackLevel" :disabled="isDetail" @change="handleLevelChange">
                     <el-radio :value="3">  符合</el-radio>
                   </el-radio-group>
+                  <div class="multi-select">
+                    <el-checkbox-group v-model="form.attackLevel3Items" :disabled="isDetail || form.attackLevel !== 3">
+                      <el-checkbox v-for="n in 4" :key="n" :value="n">{{ n }}</el-checkbox>
+                    </el-checkbox-group>
+                  </div>
                 </td>
               </tr>
               <tr></tr><tr></tr><tr></tr>
@@ -128,10 +143,15 @@
                   <div class="content-item">(2) 攻击行为在一天内至少出现两次以上或攻击行为造成了他人肉体上的伤害</div>
                 </td>
                 <td class="level" rowspan="2">IV级</td>
-                <td class="select" rowspan="2">
-                  <el-radio-group v-model="form.attackLevel" :disabled="isDetail">
-                    <el-radio :value="4">  符合</el-radio>
+                <td class="select" rowspan="7">
+                  <el-radio-group v-model="form.attackLevel" :disabled="isDetail" @change="handleLevelChange">
+                    <el-radio :value="1">  符合</el-radio>
                   </el-radio-group>
+                  <div class="multi-select">
+                    <el-checkbox-group v-model="form.attackLevel1Items" :disabled="isDetail || form.attackLevel !== 1">
+                      <el-checkbox v-for="n in 7" :key="n" :value="n">{{ n }}</el-checkbox>
+                    </el-checkbox-group>
+                  </div>
                 </td>
               </tr>
               <tr></tr>
@@ -182,7 +202,7 @@
         </div>
 
         <!-- 签名区域 -->
-        <div class="signature-section">
+        <!-- <div class="signature-section">
           <div class="signature-row">
             <div class="signature-item">
               <span class="signature-label">家属/监护人签名:</span>
@@ -190,7 +210,7 @@
             </div>
 
           </div>
-        </div>
+        </div> -->
 
         <!-- 说明 -->
         <div class="note-section">
@@ -255,7 +275,7 @@ const elderUp = (e) => {
   dataForm.value.elderSex = e.elderSex === 1 ? '男' : '女'
   dataForm.value.bedName = e.bedName || ''
   dataForm.value.checkInTime = e.checkInTime
-  dataForm.value.contractNumber = e.contractNumber
+  dataForm.value.contractNumber = e.contractNumber||e.fileNumber
   dataForm.value.elderAge = e.elderAge
 }
 
@@ -289,6 +309,28 @@ const autoJudgeRiskLevel = () => {
   else form.riskLevel = 'high'
 }
 
+/** 处理级别选择变化 - 清空其他级别的选中项 */
+const handleLevelChange = (val: number) => {
+  // 根据选中的级别,清空其他级别的多选框
+  if (val === 1) {
+    form.attackLevel2Items = []
+    form.attackLevel3Items = []
+    form.attackLevel4Items = []
+  } else if (val === 2) {
+    form.attackLevel1Items = []
+    form.attackLevel3Items = []
+    form.attackLevel4Items = []
+  } else if (val === 3) {
+    form.attackLevel1Items = []
+    form.attackLevel2Items = []
+    form.attackLevel4Items = []
+  } else if (val === 4) {
+    form.attackLevel1Items = []
+    form.attackLevel2Items = []
+    form.attackLevel3Items = []
+  }
+}
+
 
 
 /** 将表单数据序列化为 JSON 对象 */
@@ -301,6 +343,12 @@ const serializeFormData = () => {
     // 攻击风险等级(1=I级,2=II级,3=III级,4=IV级)
     attackLevel: form.attackLevel || 0,
 
+    // 各级别选择的具体项
+    attackLevel1Items: form.attackLevel1Items || [],
+    attackLevel2Items: form.attackLevel2Items || [],
+    attackLevel3Items: form.attackLevel3Items || [],
+    attackLevel4Items: form.attackLevel4Items || [],
+
     // 风险程度
     riskLevel: form.riskLevel || '',
 
@@ -325,6 +373,12 @@ const deserializeFormData = (formData: Record<string, any>) => {
   // 攻击风险等级
   form.attackLevel = formData.attackLevel || 0
 
+  // 各级别选择的具体项
+  form.attackLevel1Items = formData.attackLevel1Items || []
+  form.attackLevel2Items = formData.attackLevel2Items || []
+  form.attackLevel3Items = formData.attackLevel3Items || []
+  form.attackLevel4Items = formData.attackLevel4Items || []
+
   // 风险程度
   form.riskLevel = formData.riskLevel || ''
 
@@ -345,6 +399,12 @@ const resetAttackRiskForm = () => {
   // 攻击风险等级
   form.attackLevel = 0
 
+  // 各级别选择的具体项
+  form.attackLevel1Items = []
+  form.attackLevel2Items = []
+  form.attackLevel3Items = []
+  form.attackLevel4Items = []
+
   // 风险程度
   form.riskLevel = ''
 
@@ -420,6 +480,12 @@ const form = reactive({
   // 攻击风险等级(0=无,1=I级,2=II级,3=III级,4=IV级)
   attackLevel: 0,
 
+  // 各级别选择的具体项
+  attackLevel1Items: [], // I级选择的项(1-7)
+  attackLevel2Items: [], // II级选择的项(1-3)
+  attackLevel3Items: [], // III级选择的项(1-4)
+  attackLevel4Items: [], // IV级选择的项(1-2)
+
   // 风险程度
   riskLevel: '',
 
@@ -627,6 +693,16 @@ const handleExport = () => {
           margin-left: 15px;
           margin-bottom: 3px;
         }
+        .assessment-table .select {
+          text-align: center;
+          vertical-align: middle;
+        }
+        .assessment-table .print-multi-select {
+          margin-top: 8px;
+          padding-top: 8px;
+          border-top: 1px dashed #ccc;
+          font-size: 9pt;
+        }
 
         .risk-judgment-section {
           margin: 15px 0;
@@ -753,7 +829,7 @@ const handleExport = () => {
           <tr>
             <th class="content-col">评估内容</th>
             <th class="level-col">级别</th>
-            <th class="select-col">选择</th>
+            <th class="select-col">评估</th>
           </tr>
         </thead>
         <tbody>
@@ -769,7 +845,12 @@ const handleExport = () => {
               <div class="content-item">(7) 既往人格不良者(有冲动、边缘型人格障碍)</div>
             </td>
             <td class="level">I级</td>
-            <td class="select">${form.attackLevel === 1 ? '☑' : '☐'} 符合</td>
+            <td class="select">
+              <div>${form.attackLevel === 1 ? '☑' : '☐'} 符合</div>
+              <div class="print-multi-select">
+                ${[1,2,3,4,5,6,7].map(n => `${form.attackLevel1Items?.includes(n) ? '☑' : '☐'} ${n}`).join('&nbsp;&nbsp;')}
+              </div>
+            </td>
           </tr>
           <tr>
             <td class="content">
@@ -779,7 +860,12 @@ const handleExport = () => {
               <div class="content-item">(3) 或精神分裂症有命令性幻听者</div>
             </td>
             <td class="level">II级</td>
-            <td class="select">${form.attackLevel === 2 ? '☑' : '☐'} 符合</td>
+            <td class="select">
+              <div>${form.attackLevel === 2 ? '☑' : '☐'} 符合</div>
+              <div class="print-multi-select">
+                ${[1,2,3].map(n => `${form.attackLevel2Items?.includes(n) ? '☑' : '☐'} ${n}`).join('&nbsp;&nbsp;')}
+              </div>
+            </td>
           </tr>
           <tr>
             <td class="content">
@@ -790,7 +876,12 @@ const handleExport = () => {
               <div class="content-item">(4) 既往曾有过主动的躯体攻击行为</div>
             </td>
             <td class="level">III级</td>
-            <td class="select">${form.attackLevel === 3 ? '☑' : '☐'} 符合</td>
+            <td class="select">
+              <div>${form.attackLevel === 3 ? '☑' : '☐'} 符合</div>
+              <div class="print-multi-select">
+                ${[1,2,3,4].map(n => `${form.attackLevel3Items?.includes(n) ? '☑' : '☐'} ${n}`).join('&nbsp;&nbsp;')}
+              </div>
+            </td>
           </tr>
           <tr>
             <td class="content">
@@ -799,7 +890,12 @@ const handleExport = () => {
               <div class="content-item">(2) 攻击行为在一天内至少出现两次以上或攻击行为造成了他人肉体上的伤害</div>
             </td>
             <td class="level">IV级</td>
-            <td class="select">${form.attackLevel === 4 ? '☑' : '☐'} 符合</td>
+            <td class="select">
+              <div>${form.attackLevel === 4 ? '☑' : '☐'} 符合</div>
+              <div class="print-multi-select">
+                ${[1,2].map(n => `${form.attackLevel4Items?.includes(n) ? '☑' : '☐'} ${n}`).join('&nbsp;&nbsp;')}
+              </div>
+            </td>
           </tr>
         </tbody>
       </table>
@@ -830,16 +926,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">

+ 9 - 2
src/views/elderly/apply/nine-precautions/attack/index.vue

@@ -71,8 +71,14 @@
 
       <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="assessDate" header-align="center" align="center" label="记录日期" min-width="200" show-overflow-tooltip/>
       <el-table-column prop="creator" header-align="center" align="center" label="记录人" min-width="200" show-overflow-tooltip/>
 
 
@@ -160,6 +166,7 @@ import {
   perceptionDelete,
   perceptionPage
 } from "@/api/social-work";
+import { getRiskLevelInfo } from "@/utils/risk-assessment";
 const message = useMessage() // 消息弹窗
 const { t } = useI18n() // 国际化
 const userStore = useUserStore()

+ 4 - 12
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">
@@ -201,7 +201,7 @@ const elderUp = (e) => {
   dataForm.value.elderSex = e.elderSex === 1 ? '男' : '女'
   dataForm.value.bedName = e.bedName || ''
   dataForm.value.checkInTime = e.checkInTime
-  dataForm.value.contractNumber = e.contractNumber
+  dataForm.value.contractNumber = e.contractNumber||e.fileNumber
   dataForm.value.elderAge = e.elderAge
 }
 
@@ -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">

+ 6 - 16
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">
@@ -239,7 +236,7 @@ const elderUp = (e) => {
   dataForm.value.elderSex = e.elderSex === 1 ? '男' : '女'
   dataForm.value.bedName = e.bedName || ''
   dataForm.value.checkInTime = e.checkInTime
-  dataForm.value.contractNumber = e.contractNumber
+  dataForm.value.contractNumber = e.contractNumber||e.fileNumber
   dataForm.value.elderAge = e.elderAge
 }
 
@@ -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 = {

+ 283 - 2
src/views/elderly/apply/nine-precautions/fall-down/AddForm.vue

@@ -202,7 +202,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>
@@ -438,7 +438,288 @@ const handleClosed = () => {
 
 /** 导出/打印 */
 const handleExport = () => {
-  message.info('打印功能开发中')
+  // 创建打印窗口
+  const printWindow = window.open('', '_blank')
+  if (!printWindow) {
+    message.error('请允许弹出窗口')
+    return
+  }
+
+  // 评估项目数据
+  const assessmentItems = [
+    { factor: '跌倒史', options: [{ label: '有', value: 25 }, { label: '无', value: 0 }], score: form.assessment.scores[0] },
+    { factor: '超过一个医学诊断', options: [{ label: '有', value: 15 }, { label: '无', value: 0 }], score: form.assessment.scores[1] },
+    { factor: '使用助行器具', options: [{ label: '无/卧床/坐轮椅/护士协助', value: 0 }, { label: '拐杖/手杖/助行器', value: 15 }, { label: '依扶家具/墙壁', value: 30 }], score: form.assessment.scores[2] },
+    { factor: '静脉输液/肝素锁', options: [{ label: '有', value: 20 }, { label: '无', value: 0 }], score: form.assessment.scores[3] },
+    { factor: '步态', options: [{ label: '正常/卧床/不能移动', value: 0 }, { label: '虚弱(指乏力)', value: 10 }, { label: '受损(指患者从椅子上站立困难,起立时需要借助椅背或多次尝试,残疾或功能障碍)', value: 20 }], score: form.assessment.scores[4] },
+    { factor: '精神状态', options: [{ label: '高估或忘记限制', value: 15 }, { label: '正确评估自己能力', value: 0 }], score: form.assessment.scores[5] }
+  ]
+
+  // 构建打印内容
+  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: left;
+          vertical-align: top;
+        }
+        .assessment-table th {
+          background: #e8e8e8;
+          font-weight: bold;
+          text-align: center;
+        }
+        .assessment-table .col-factor {
+          width: 15%;
+          text-align: center;
+          font-weight: bold;
+          background: #f5f5f5;
+        }
+        .assessment-table .col-standard {
+          width: 70%;
+        }
+        .assessment-table .col-score {
+          width: 15%;
+          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;
+        }
+
+        .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-standard">评估标准(分)</th>
+            <th class="col-score">得分</th>
+          </tr>
+        </thead>
+        <tbody>
+          ${assessmentItems.map(item => `
+            <tr>
+              <td class="col-factor">${item.factor}</td>
+              <td class="col-standard">
+                ${item.options.map(opt => `${item.score === opt.value ? '☑' : '☐'} ${opt.label}=${opt.value}`).join('&nbsp;&nbsp;&nbsp;&nbsp;')}
+              </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' ? '☑' : '☐'} 低风险:10-24分</span>
+          <span class="risk-option">${form.riskLevel === 'medium' ? '☑' : '☐'} 中风险:25-45分</span>
+          <span class="risk-option">${form.riskLevel === 'high' ? '☑' : '☐'} 高风险:≥46分</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('下床活动的动作宜缓慢,先在床边坐5-10分钟,无头晕等不适时再下床活动') ? '☑' : '☐'} 下床活动的动作宜缓慢,先在床边坐5-10分钟,无头晕等不适时再下床活动</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 = {

+ 271 - 2
src/views/elderly/apply/nine-precautions/fall-prevention-measures/AddForm.vue

@@ -143,7 +143,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>
@@ -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 = {

+ 176 - 107
src/views/elderly/apply/nine-precautions/pressure-sores/AddForm.vue

@@ -147,7 +147,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>
@@ -417,62 +417,17 @@ const handleClosed = () => {
 
 /** 导出打印 */
 const handleExport = () => {
+  // 创建打印窗口
   const printWindow = window.open('', '_blank')
   if (!printWindow) {
     message.error('请允许弹出窗口')
     return
   }
 
-  const assessmentRows = assessmentItems.map((item, index) => {
-    const score1 = form.assessments[0].scores[index] || '-'
-    const score2 = form.assessments[1].scores[index] || '-'
-    const score3 = form.assessments[2].scores[index] || '-'
-    return `
-      <tr>
-        <td class="item-name">${item.name}</td>
-        <td class="option">${item.options[0]}</td>
-        <td class="option">${item.options[1]}</td>
-        <td class="option">${item.options[2]}</td>
-        <td class="option">${item.options[3] || ''}</td>
-        <td class="result">${score1}</td>
-        <td class="result">${score2}</td>
-        <td class="result">${score3}</td>
-      </tr>
-    `
-  }).join('')
-
-  const recordSections = form.assessments.map((record, index) => {
-    return `
-      <div class="record-section">
-        <div class="record-title">第${index + 1}次评估</div>
-        <div class="record-row">
-          <span class="record-label">评估日期:</span>
-          <span class="record-value">${record.assessDate ? dayjs(record.assessDate).format('YYYY-MM-DD') : ''}</span>
-          <span class="record-label">评估人签名:</span>
-          <span class="record-value">${record.assessor || ''}</span>
-          <span class="record-label">评估总得分:</span>
-          <span class="record-value">${record.totalScore || 0} 分</span>
-          <span class="record-label">风险等级结果:</span>
-          <span class="record-value">${getRiskText(record.riskLevel)}</span>
-        </div>
-      </div>
-    `
-  }).join('')
-
-  const preventionOptions = [
-    '避免局部组织长期受压,常更换卧位',
-    '使用保护性用具,如气垫床、翻身枕、泡沫敷料、水垫等',
-    '翻身时动作规范,避免拖、拉、拽等动作',
-    '选择吸汗不刺激宽松衣物,保持衣物及床单平整清洁',
-    '保持皮肤清洁干燥,皮肤受到二便污染时及时清洗',
-    '定期为长者进行温水擦浴及按摩,促进局部血液循环',
-    '改善机体营养状况,增加蛋白质、维生素合微量元素的摄入'
-  ]
-  const preventionChecks = preventionOptions.map(option => {
-    const checked = form.preventionMeasures.includes(option) ? '☑' : '☐'
-    return `<div class="prevention-item">${checked}${option}</div>`
-  }).join('')
+  // 获取第一次评估数据
+  const record = form.assessments[0]
 
+  // 构建打印内容
   const printContent = `
     <!DOCTYPE html>
     <html>
@@ -481,7 +436,7 @@ const handleExport = () => {
       <title>防压疮评估表 - ${dataForm.value.elderName || ''}</title>
       <style>
         @media print {
-          @page { size: A4 portrait; margin: 10mm; }
+          @page { size: A4 portrait; margin: 15mm; }
         }
         body {
           font-family: 'SimSun', 'Microsoft YaHei', serif;
@@ -495,97 +450,168 @@ const handleExport = () => {
           border-bottom: 2px solid #333;
           padding-bottom: 10px;
         }
-        .title {
-          font-size: 18pt;
-          font-weight: bold;
-          margin-bottom: 10px;
+        .header h1 {
+          font-size: 16pt;
+          margin: 0;
+          letter-spacing: 2px;
         }
-        .basic-info {
-          display: flex;
-          justify-content: space-between;
+        .info-section {
           margin-bottom: 15px;
+          padding: 10px;
+          border: 1px solid #999;
+          background: #fafafa;
+        }
+        .info-row {
+          display: flex;
           flex-wrap: wrap;
+          gap: 20px;
         }
         .info-item {
-          margin-right: 20px;
-          margin-bottom: 5px;
+          display: flex;
+          align-items: center;
         }
-        .info-label {
+        .info-item .label {
           font-weight: bold;
+          margin-right: 8px;
+          color: #555;
         }
-        .section-title {
-          font-size: 12pt;
-          font-weight: bold;
-          margin: 15px 0 10px 0;
-          border-left: 4px solid #333;
-          padding-left: 8px;
+        .info-item .value {
+          border-bottom: 1px solid #333;
+          min-width: 80px;
+          padding: 0 5px;
+          text-align: center;
         }
-        table {
+
+        .assessment-table {
           width: 100%;
           border-collapse: collapse;
           margin-bottom: 15px;
         }
-        th, td {
+        .assessment-table th, .assessment-table td {
           border: 1px solid #333;
           padding: 8px;
           text-align: center;
+          vertical-align: middle;
         }
-        th {
-          background-color: #f5f5f5;
+        .assessment-table th {
+          background: #e8e8e8;
           font-weight: bold;
         }
-        .item-col { width: 12%; }
-        .score-col { width: 12%; }
-        .result-col { width: 10%; }
-        .item-name { font-weight: bold; }
+        .assessment-table .item-col {
+          width: 20%;
+        }
+        .assessment-table .score-col {
+          width: 15%;
+        }
+        .assessment-table .result-col {
+          width: 20%;
+        }
+        .assessment-table .item-name {
+          font-weight: bold;
+          background: #f5f5f5;
+        }
+
         .record-section {
-          margin-bottom: 15px;
+          margin: 15px 0;
           padding: 10px;
-          border: 1px solid #ddd;
+          border: 1px solid #999;
         }
         .record-title {
           font-weight: bold;
-          margin-bottom: 8px;
-          border-bottom: 1px solid #eee;
+          margin-bottom: 10px;
+          border-bottom: 1px solid #ccc;
           padding-bottom: 5px;
         }
         .record-row {
-          margin-bottom: 5px;
+          display: flex;
+          gap: 30px;
+          margin-bottom: 8px;
+        }
+        .record-item {
+          display: flex;
+          align-items: center;
+        }
+        .record-item .label {
+          font-weight: bold;
+          margin-right: 8px;
         }
-        .record-label {
+        .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;
         }
-        .scoring-note {
+
+        .note-section {
           margin: 15px 0;
           padding: 10px;
-          background-color: #f9f9f9;
-          border: 1px solid #ddd;
+          border: 1px solid #999;
+          background: #fafafa;
         }
         .note-title {
           font-weight: bold;
-          margin-bottom: 5px;
+          margin-bottom: 8px;
         }
+        .note-content {
+          font-size: 9pt;
+          line-height: 1.6;
+        }
+        .note-content p {
+          margin: 3px 0;
+        }
+
         .prevention-section {
-          margin-top: 15px;
+          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: 5px;
+          margin-bottom: 8px;
+          font-size: 10pt;
         }
       </style>
     </head>
     <body>
       <div class="header">
-        <div class="title">防压疮评估表</div>
+        <h1>防压疮评估表</h1>
       </div>
-      <div class="basic-info">
-        <div class="info-item"><span class="info-label">姓名:</span>${dataForm.value.elderName || ''}</div>
-        <div class="info-item"><span class="info-label">性别:</span>${dataForm.value.elderSex || ''}</div>
-        <div class="info-item"><span class="info-label">年龄:</span>${dataForm.value.elderAge || ''}</div>
-        <div class="info-item"><span class="info-label">房号/床号:</span>${dataForm.value.bedName || ''}</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>
 
-      <div class="section-title">等级量表</div>
-      <table>
+      <!-- 评估项目表格 -->
+      <table class="assessment-table">
         <thead>
           <tr>
             <th class="item-col">评估项目</th>
@@ -593,20 +619,25 @@ const handleExport = () => {
             <th class="score-col">2 分</th>
             <th class="score-col">3 分</th>
             <th class="score-col">4 分</th>
-            <th class="result-col">第1次</th>
-            <th class="result-col">第2次</th>
-            <th class="result-col">第3次</th>
+            <th class="result-col">得分</th>
           </tr>
         </thead>
         <tbody>
-          ${assessmentRows}
+          ${assessmentItems.map((item, index) => `
+            <tr>
+              <td class="item-name">${item.name}</td>
+              <td>${item.options[0] || ''}</td>
+              <td>${item.options[1] || ''}</td>
+              <td>${item.options[2] || ''}</td>
+              <td>${item.options[3] || ''}</td>
+              <td>${record.scores[index] || ''}</td>
+            </tr>
+          `).join('')}
         </tbody>
       </table>
 
-      <div class="section-title">评估记录</div>
-      ${recordSections}
-
-      <div class="scoring-note">
+      <!-- 评分说明 -->
+      <div class="note-section">
         <div class="note-title">评分说明:</div>
         <div class="note-content">
           <p>注:分值 6-23 分,最高分 23 分,最低分 6 分</p>
@@ -615,18 +646,56 @@ const handleExport = () => {
         </div>
       </div>
 
-      <div class="section-title prevention-section">预防措施</div>
-      ${preventionChecks}
+      <!-- 评估记录 -->
+      <div class="record-section">
+        <div class="record-title">评估记录</div>
+        <div class="record-row">
+          <div class="record-item">
+            <span class="label">评估日期:</span>
+            <span class="value">${record.assessDate ? dayjs(record.assessDate).format('YYYY-MM-DD') : ''}</span>
+          </div>
+          <div class="record-item">
+            <span class="label">评估人签名:</span>
+            <span class="value">${record.assessor || ''}</span>
+          </div>
+          <div class="record-item">
+            <span class="label">评估总得分:</span>
+            <span class="value score-value">${record.totalScore || 0} 分</span>
+          </div>
+        </div>
+        <div class="record-row">
+          <div class="record-item">
+            <span class="label">风险等级结果:</span>
+            <span class="value">${getRiskText(record.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 class="prevention-item">${form.preventionMeasures?.includes('改善机体营养状况,增加蛋白质、维生素合微量元素的摄入') ? '☑' : '☐'} 改善机体营养状况,增加蛋白质、维生素合微量元素的摄入</div>
+        </div>
+      </div>
     </body>
     </html>
   `
 
+  // 写入内容并打印
   printWindow.document.write(printContent)
   printWindow.document.close()
-  printWindow.focus()
+
+  // 延迟打印,确保样式加载完成
   setTimeout(() => {
     printWindow.print()
-  }, 250)
+  }, 500)
 }
 </script>
 

+ 306 - 2
src/views/elderly/apply/nine-precautions/wander-away/AddForm.vue

@@ -319,7 +319,7 @@
           </el-row>
           <el-row :gutter="20">
             <el-col :span="8">
-              <el-form-item label="风险等级结果:" label-width="100px">
+              <el-form-item label="风险等级结果:" label-width="120px">
                 <el-tag :type="getRiskTagType(form.riskLevel)">
                   {{ getRiskText(form.riskLevel) }}
                 </el-tag>
@@ -592,7 +592,311 @@ const handleClosed = () => {
 
 /** 导出/打印 */
 const handleExport = () => {
-  message.info('打印功能开发中')
+  // 创建打印窗口
+  const printWindow = window.open('', '_blank')
+  if (!printWindow) {
+    message.error('请允许弹出窗口')
+    return
+  }
+
+  // 评估项目数据
+  const assessmentItems = [
+    { category: '基本资料', item: '年龄', options: ['≥60岁', '≤60岁'], score: form.assessment.scores[0] },
+    { category: '基本资料', item: '性别', options: ['男性', '女性'], score: form.assessment.scores[1] },
+    { category: '基本资料', item: '文化程度', options: ['受过高等教育', '未受高等教育'], score: form.assessment.scores[2] },
+    { category: '走失既往史', item: '有无走失过现象', options: ['有', '无'], score: form.assessment.scores[3] },
+    { category: '意识状态', item: '意识障碍', options: ['有', '无'], score: form.assessment.scores[4] },
+    { category: '心理状态', item: '情绪低落、焦虑抑郁等', options: ['有', '无'], score: form.assessment.scores[5] },
+    { category: '疾病史', item: '心脑血管(脑出血、脑梗塞、脑萎缩等)', options: ['有', '无'], score: form.assessment.scores[6] },
+    { category: '疾病史', item: '术后认知障碍', options: ['有', '无'], score: form.assessment.scores[7] },
+    { category: '疾病史', item: '定向力障碍脑炎、肝性脑病、酒精性脑病', options: ['有', '无'], score: form.assessment.scores[8] },
+    { category: '疾病史', item: '记忆力或认知功能障碍(智障、老年痴呆等)', options: ['有', '无'], score: form.assessment.scores[9] },
+    { category: '疾病史', item: '有精神行为异常(精神分裂、抑郁等)', options: ['有', '无'], score: form.assessment.scores[10] },
+    { category: '药物影响认知', item: '抗抑郁药', options: ['有', '无'], score: form.assessment.scores[11] },
+    { category: '药物影响认知', item: '抗癫痫药', options: ['有', '无'], score: form.assessment.scores[12] },
+    { category: '药物影响认知', item: '心脏病药', options: ['有', '无'], score: form.assessment.scores[13] }
+  ]
+
+  // 构建打印内容
+  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: left;
+          vertical-align: top;
+        }
+        .assessment-table th {
+          background: #e8e8e8;
+          font-weight: bold;
+          text-align: center;
+        }
+        .assessment-table .col-category {
+          width: 12%;
+          text-align: center;
+          font-weight: bold;
+          background: #f5f5f5;
+        }
+        .assessment-table .col-item {
+          width: 35%;
+        }
+        .assessment-table .col-option {
+          width: 35%;
+        }
+        .assessment-table .col-score {
+          width: 9%;
+          text-align: center;
+        }
+        .assessment-table .col-result {
+          width: 9%;
+          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;
+        }
+
+        .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-category">评估项目</th>
+            <th class="col-item">具体项目</th>
+            <th class="col-option">选项</th>
+            <th class="col-score">分值</th>
+            <th class="col-result">得分</th>
+          </tr>
+        </thead>
+        <tbody>
+          ${assessmentItems.map((item, index) => {
+            const prevItem = index > 0 ? assessmentItems[index - 1] : null
+            const showCategory = !prevItem || prevItem.category !== item.category
+            const categoryRowspan = assessmentItems.filter(i => i.category === item.category).length
+            return `
+              <tr>
+                ${showCategory ? `<td class="col-category" rowspan="${categoryRowspan}">${item.category}</td>` : ''}
+                <td class="col-item">${item.item}</td>
+                <td class="col-option">${item.options.map((opt, idx) => `${item.score === (1 - idx) ? '☑' : '☐'} ${opt}`).join('&nbsp;&nbsp;')}</td>
+                <td class="col-score">${item.score === 1 ? '1' : '0'}</td>
+                <td class="col-result">${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-3分</span>
+          <span class="risk-option">${form.riskLevel === 'low' ? '☑' : '☐'} 低风险:4分</span>
+          <span class="risk-option">${form.riskLevel === 'medium' ? '☑' : '☐'} 中风险:5-6分</span>
+          <span class="risk-option">${form.riskLevel === 'high' ? '☑' : '☐'} 高风险:≥7分</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>
+        <div class="record-row">
+          <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>
+      </div>
+    </body>
+    </html>
+  `
+
+  // 写入内容并打印
+  printWindow.document.write(printContent)
+  printWindow.document.close()
+
+  // 延迟打印,确保样式加载完成
+  setTimeout(() => {
+    printWindow.print()
+  }, 500)
 }
 
 const rules = {

+ 11 - 0
src/views/elderly/elder/contract/index.vue

@@ -27,6 +27,16 @@
             :value="dict.value"
           />
         </el-select>
+      </el-form-item>
+          <el-form-item label="是否已上传合同" prop="hasExtra" label-width="120px">
+        <el-select v-model="queryParams.hasExtra" placeholder="请选择" class="!w-240px">
+          <el-option
+            v-for="(dict, index) in getIntDictOptions(DICT_TYPE.COMMON_STATUS6)"
+            :key="index"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
       </el-form-item>
       <el-form-item label="入住类型" prop="inStatusType">
         <el-select v-model="queryParams.inStatusType" placeholder="请选择" class="!w-240px">
@@ -105,6 +115,7 @@ const queryParams = reactive({
   pageSize: 10,
   elderName: undefined,
   type: undefined,
+  hasExtra: undefined,
   inStatusType: undefined,
   tenantIds: userStore.orgTenantId
 })

+ 51 - 1
src/views/elderly/fee/out-refund/Form.vue

@@ -187,6 +187,32 @@
                       :disabled="isDetail"
                       placeholder="请选择"
                       style="width: 85px"
+                      @change="(val) => handleCustomChange(val, scope.row)"
+                    >
+                      <el-option label="启用" :value="1" />
+                      <el-option label="禁用" :value="0" />
+                    </el-select>
+                  </template>
+                </el-input>
+              </template>
+            </el-table-column>
+            <el-table-column label="是否减底价" width="200">
+              <template #default="scope">
+                <el-input
+                  v-model="scope.row.subtractAmount"
+                  style="max-width: 300px"
+                  placeholder="输入金额"
+                  type="number"
+                  :disabled="scope.row.isSubtract == 0 || isDetail"
+                  class="input-with-select"
+                >
+                  <template #prepend>
+                    <el-select
+                      v-model="scope.row.isSubtract"
+                      :disabled="isDetail"
+                      placeholder="请选择"
+                      style="width: 85px"
+                      @change="(val) => handleSubtractChange(val, scope.row)"
                     >
                       <el-option label="启用" :value="1" />
                       <el-option label="禁用" :value="0" />
@@ -195,7 +221,6 @@
                 </el-input>
               </template>
             </el-table-column>
-
             <el-table-column prop="address" width="220">
               <template #default="scope">
                 <el-radio-group
@@ -383,6 +408,9 @@ const submitForm = async () => {
       if (item.isCustom == 1 && item.customAmount == '') {
         result = true
       }
+      if (item.isSubtract == 1 && item.subtractAmount == '') {
+        result = true
+      }
     })
   })
   if (result) {
@@ -425,6 +453,8 @@ const handleAdd = () => {
     type: 3,
     isCustom: 0, //是否自定义
     customAmount: '', //自定义金额
+    isSubtract: 0, //是否减底价
+    subtractAmount: '', //减底价金额
     maximumDays: '',
     minimumDays: '',
     isSameDayRefund: '',
@@ -543,6 +573,8 @@ const getItemList = async (row, flag = true, flag2 = false) => {
           type: 3,
           isCustom: 0, // 是否自定义
           customAmount: '', // 自定义金额
+          isSubtract: 0, // 是否减底价
+          subtractAmount: '', // 减底价金额
           maximumDays: '',
           minimumDays: '',
           isSameDayRefund: '',
@@ -567,6 +599,24 @@ const handleChangeScopeType = (row) => {
   row.proportion = ''
   row.amount = ''
 }
+
+const handleCustomChange = (val, row) => {
+  if (val === 1) {
+    row.isSubtract = 0
+    row.subtractAmount = ''
+  } else {
+    row.customAmount = ''
+  }
+}
+
+const handleSubtractChange = (val, row) => {
+  if (val === 1) {
+    row.isCustom = 0
+    row.customAmount = ''
+  } else {
+    row.subtractAmount = ''
+  }
+}
 </script>
 <style lang="scss" scoped>
 .out-refund-form {

+ 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>
   `