Explorar el Código

添加小工具导入床头卡信息

chenjun hace 1 mes
padre
commit
a5e696cc04
Se han modificado 2 ficheros con 56 adiciones y 40 borrados
  1. 21 11
      src/components/BedCardComponent/index.vue
  2. 35 29
      src/views/system/little-tools/index.vue

+ 21 - 11
src/components/BedCardComponent/index.vue

@@ -44,17 +44,25 @@
               <td class="table-label">护理等级</td>
               <td class="table-data">{{ patientData.careLevel || '--' }}</td>
               <td class="table-label">照护要点</td>
-              <td class="table-data" colspan="3">{{ patientData.carePoints || '--' }}</td>
+              <td class="table-data" style="font-size: 14px" colspan="3">{{
+                patientData.carePoints || '--'
+              }}</td>
               <td class="table-label">过敏史</td>
-              <td class="table-data">{{ patientData.allergiesText || '--' }}</td>
+              <td class="table-data" style="font-size: 14px">{{
+                patientData.allergiesText || '--'
+              }}</td>
             </tr>
 
             <!-- 既往病史 / 用药史 -->
             <tr>
               <td class="table-label">既往病史</td>
-              <td class="table-data" colspan="3">{{ patientData.medicalHistory || '--' }}</td>
+              <td class="table-data" style="font-size: 14px" colspan="3">{{
+                patientData.medicalHistory || '--'
+              }}</td>
               <td class="table-label">用药史</td>
-              <td class="table-data" colspan="3">{{ patientData.medicationHistory || '--' }}</td>
+              <td class="table-data" style="font-size: 14px" colspan="3">{{
+                patientData.medicationHistory || '--'
+              }}</td>
             </tr>
 
             <!-- 饮食要点 -->
@@ -68,8 +76,9 @@
                     class="diet-item"
                     :class="{ active: isDietActive(item.label) }"
                   >
-                    <span v-if="isDietActive(item.label)" class="diet-check">√</span>
-                    <span class="diet-name">{{ item.label }}</span>
+                    <el-icon v-if="isDietActive(item.label)" style="margin-right: 2px" size="22"><Check /></el-icon>
+                    <!--                    <span v-if="isDietActive(item.label)" class="diet-check">√</span>-->
+                    <span class="diet-name" style="font-size: 16px">{{ item.label }}</span>
                   </div>
                 </div>
                 <div v-else class="diet-empty">--</div>
@@ -110,7 +119,7 @@
 
             <!-- 责任人员 -->
             <tr>
-              <td class="table-label">责任护理员</td>
+              <td class="table-label"><div>责任</div><div>护理员</div></td>
               <td class="table-data" colspan="2">{{
                 patientData.responsibleStaff?.nurseAide || '--'
               }}</td>
@@ -144,6 +153,7 @@ import { ElMessage } from 'element-plus'
 import html2canvas from 'html2canvas'
 import { Qrcode } from '@/components/Qrcode'
 import JSZip from 'jszip'
+import { Check } from '@element-plus/icons-vue'
 // Props定义
 const props = defineProps<{
   roomNumber?: string
@@ -210,9 +220,9 @@ const getRiskText = (value: string) => {
 // 根据风险等级获取九防图片地址
 const getPreventionImage = (field: string, level: string) => {
   const levelMap: Record<string, string> = {
-    low: '01',
-    medium: '02',
-    high: '03'
+    '低': '01',
+    '中': '02',
+    '高': '03'
   }
   const suffix = levelMap[level] || '01'
   return new URL(`../../assets/jiufang/${field}-${suffix}.png`, import.meta.url).href
@@ -474,7 +484,7 @@ defineExpose({
 .info-table {
   width: 100%;
   border-collapse: collapse;
-  font-size: 14px;
+  font-size: 18px;
   height: 100%;
 }
 

+ 35 - 29
src/views/system/little-tools/index.vue

@@ -1,44 +1,53 @@
 <template>
   <div>
     <div class="card-grid">
-      <div
-        @click="itemClick(card.id)"
-        v-for="card in cards"
-        :key="card.id"
-        class="card-item"
-      >
+      <div @click="itemClick(card.id)" v-for="card in cards" :key="card.id" class="card-item">
         <h3>{{ card.title }}</h3>
         <p>{{ card.content }}</p>
       </div>
     </div>
 
-    <MarkCheckinBillsPaidForm  ref="refMarkCheckinBillsPaid"/>
-    <AddItemForm  ref="addItemForm"/>
-    <DeleteItemForm  ref="deleteItemForm"/>
-
+    <Import
+      ref="importRef"
+      :config="{
+        title: '导入',
+        desc: '',
+        downloadUrl: '/elderlyHealthRecord/import-template',
+        excelTempName: '机构养老-【入住申请】模板',
+        importUrl: '/elderlyHealthRecord/importExcel',
+        failExportUrl: '/elderlyInfo/downErrorExcel'
+      }"
+    />
+
+    <MarkCheckinBillsPaidForm ref="refMarkCheckinBillsPaid" />
+    <AddItemForm ref="addItemForm" />
+    <DeleteItemForm ref="deleteItemForm" />
   </div>
 </template>
 <script setup lang="ts">
-import MarkCheckinBillsPaidForm from "./MarkCheckinBillsPaidForm.vue"
-import AddItemForm from "./AddItemForm.vue"
-import DeleteItemForm from "./DeleteItemForm.vue"
-import {useUserStore} from "@/store/modules/user";
+import MarkCheckinBillsPaidForm from './MarkCheckinBillsPaidForm.vue'
+import AddItemForm from './AddItemForm.vue'
+import DeleteItemForm from './DeleteItemForm.vue'
+import { useUserStore } from '@/store/modules/user'
 import { getOtherFilesStatistics } from '@/api/elderly/elder/elderly-Info'
 import { exportWithCustomHeaders } from '@/utils/excel-export'
 import { ElLoading } from 'element-plus'
 import { getUserGroupTenant } from '@/api/system/user'
+import Import from '@/components/ImportFile/index.vue'
 
 const message = useMessage() // 消息弹窗
 const userStore = useUserStore()
 const refMarkCheckinBillsPaid = ref()
 const addItemForm = ref()
 const deleteItemForm = ref()
+const importRef = ref()
 
 const cards = ref([
   { id: 0, title: '把入院账单设置成已缴费状态', content: '只操作本机构的,集团账号时不要操作' },
   { id: 1, title: '为长者增加月度费用', content: '只操作本机构的,集团账号时不要操作' },
   { id: 2, title: '为长者删除月度费用', content: '只操作本机构的,集团账号时不要操作' },
   { id: 3, title: '统计院区档案上传情况', content: '所有院区的档案上传情况统计' },
+  { id: 4, title: '导入床头卡信息', content: '导入健康档案信息' }
 ])
 
 const handleExportStatistics = async () => {
@@ -53,9 +62,9 @@ const handleExportStatistics = async () => {
     console.log('getUserGroupTenant 返回:', treeRes)
     const tenantIds = treeRes.map((item: any) => item.orgTenantId)
     console.log('tenantIds:', tenantIds)
-    
+
     fullscreenLoading.setText('正在导出,请稍候...')
-    
+
     const data = await getOtherFilesStatistics({ tenantIds: tenantIds.join(',') })
     console.log('getOtherFilesStatistics 返回:', data)
     if (data && data.length > 0) {
@@ -67,9 +76,8 @@ const handleExportStatistics = async () => {
         return {
           ...item,
           uploadedOtherFilesCount,
-          emptyOtherFilesPercentage: totalCount > 0
-            ? Number(((uploadedOtherFilesCount / totalCount) * 100).toFixed(2))
-            : 0
+          emptyOtherFilesPercentage:
+            totalCount > 0 ? Number(((uploadedOtherFilesCount / totalCount) * 100).toFixed(2)) : 0
         }
       })
 
@@ -96,25 +104,28 @@ const handleExportStatistics = async () => {
   }
 }
 
-const itemClick=(id:any)=>{
-  switch (id){
+const itemClick = (id: any) => {
+  switch (id) {
     case 0: //把入院账单设置成已缴费状态
       refMarkCheckinBillsPaid.value.open(userStore.orgTenantId)
 
       break
     case 1: //增加月度费用
-      addItemForm.value.open(undefined,false,"月度费用",undefined,userStore.orgTenantId)
+      addItemForm.value.open(undefined, false, '月度费用', undefined, userStore.orgTenantId)
 
       break
     case 2: //删除月度费用
-      deleteItemForm.value.open(undefined,false,"月度费用",undefined,userStore.orgTenantId)
+      deleteItemForm.value.open(undefined, false, '月度费用', undefined, userStore.orgTenantId)
 
       break
     case 3: //各院档案及数据完整率
       handleExportStatistics()
       break
-  }
+    case 4: //导入
+      importRef.value.open(userStore.orgTenantId[0])
 
+      break
+  }
 }
 
 // const toMarkCheckinBillsPaid = async () => {
@@ -133,13 +144,8 @@ const itemClick=(id:any)=>{
 //     },500)
 //   }
 // }
-
-
-
-
 </script>
 <style scoped lang="scss">
-
 .card-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); // 自动填充,最小250px