From 5d4befca627d728b40bec39d10c09bc0e0144aed Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期一, 24 二月 2025 16:01:09 +0800
Subject: [PATCH] gx

---
 src/views/home/index.vue |  206 +++++++++++++++++++++++++++++++++------------------
 1 files changed, 132 insertions(+), 74 deletions(-)

diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index ae5ea81..15c14ab 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -14,12 +14,20 @@
                             </div>
                             <el-input size="default" @change="getPatients" v-model="state.search" placeholder="支持模糊查询"
                                 :prefix-icon="Search" />
+
+                            <el-row style="margin-top: 5px;">
+                                <el-col :span="10">姓名</el-col>
+                                <el-col :span="5">性别</el-col>
+                                <el-col :span="4">年龄</el-col>
+                                <el-col :span="5">床号</el-col>
+                            </el-row>
                         </template>
                         <template #default="scope">
                             <el-row>
-                                <el-col :span="12">{{ scope.row.patientName }}</el-col>
-                                <el-col :span="6">{{ scope.row.patientGenderText }}</el-col>
-                                <el-col :span="6">{{ scope.row.age }}</el-col>
+                                <el-col :span="10">{{ scope.row.patientName }}</el-col>
+                                <el-col :span="5">{{ scope.row?.patientGender===0?'男':'女' }}</el-col>
+                                <el-col :span="4">{{ scope.row.age }}</el-col>
+                                <el-col :span="5">{{ scope.row.deviceNo }}</el-col>
                             </el-row>
                         </template>
                     </el-table-column>
@@ -37,38 +45,15 @@
                             </span>
                         </template>
                     </el-tab-pane>
-                    <el-tab-pane label="生化数据" name="生化数据">
+                    <el-tab-pane label="营养筛查评估" name="营养筛查评估">
                         <template #label>
                             <span class="custom-tabs-label home-title">
                                 <el-icon>
-                                    <Aim />
+                                    <Histogram />
                                 </el-icon>
-                                <span style="margin-left: 5px">生化数据</span>
+                                <span style="margin-left: 5px">营养筛查评估</span>
                             </span>
                         </template>
-                        <lisUi ref="lisUiRef"></lisUi>
-                    </el-tab-pane>
-                    <el-tab-pane label="用药记录" name="用药记录">
-                        <template #label>
-                            <span class="custom-tabs-label home-title">
-                                <el-icon>
-                                    <Edit />
-                                </el-icon>
-                                <span style="margin-left: 5px">用药记录</span>
-                            </span>
-                        </template>
-
-                    </el-tab-pane>
-                    <el-tab-pane label="历史服务" name="历史服务">
-                        <template #label>
-                            <span class="custom-tabs-label home-title">
-                                <el-icon>
-                                    <ZoomIn />
-                                </el-icon>
-                                <span style="margin-left: 5px">历史服务</span>
-                            </span>
-                        </template>
-                        <el-empty  description="该功能未开发"></el-empty> 
                     </el-tab-pane>
                     <el-tab-pane label="膳食调查" name="膳食调查">
                         <template #label>
@@ -81,27 +66,16 @@
                         </template>
                         
                     </el-tab-pane>
-                    <el-tab-pane label="营养筛查评估" name="营养筛查评估">
+
+                    <el-tab-pane label="食物过敏原及胃肠功能调查" name="食物过敏原及胃肠功能调查">
                         <template #label>
                             <span class="custom-tabs-label home-title">
                                 <el-icon>
-                                    <Histogram />
+                                    <Notification />
                                 </el-icon>
-                                <span style="margin-left: 5px">营养筛查评估</span>
+                                <span style="margin-left: 5px">食物过敏原及胃肠功能调查</span>
                             </span>
                         </template>
-                        
-                    </el-tab-pane>
-                    <el-tab-pane label="方案" name="方案">
-                        <template #label>
-                            <span class="custom-tabs-label home-title">
-                                <el-icon>
-                                    <Grid />
-                                </el-icon>
-                                <span style="margin-left: 5px">方案</span>
-                            </span>
-                        </template>
-                        <!-- <el-empty  description="该功能未开发"></el-empty>  -->
                     </el-tab-pane>
                     <el-tab-pane label="随访记录" name="随访记录">
                         <template #label>
@@ -112,7 +86,48 @@
                                 <span style="margin-left: 5px">随访记录</span>
                             </span>
                         </template>
-                        <!-- <el-empty  description="该功能未开发"></el-empty>  -->
+                    </el-tab-pane>
+                    <el-tab-pane label="营养饮食指导方案" name="营养饮食指导方案">
+                        <template #label>
+                            <span class="custom-tabs-label home-title">
+                                <el-icon>
+                                    <Grid />
+                                </el-icon>
+                                <span style="margin-left: 5px">营养饮食指导方案</span>
+                            </span>
+                        </template>
+                    </el-tab-pane>
+                    <el-tab-pane label="生化数据" name="生化数据">
+                        <template #label>
+                            <span class="custom-tabs-label home-title">
+                                <el-icon>
+                                    <Aim />
+                                </el-icon>
+                                <span style="margin-left: 5px">生化数据</span>
+                            </span>
+                        </template>
+                    </el-tab-pane>
+                    <el-tab-pane label="用药记录" name="用药记录">
+                        <template #label>
+                            <span class="custom-tabs-label home-title">
+                                <el-icon>
+                                    <Edit />
+                                </el-icon>
+                                <span style="margin-left: 5px">用药记录</span>
+                            </span>
+                        </template>
+
+                    </el-tab-pane>
+                    <el-tab-pane label="营养服务管理记录" name="营养服务管理记录">
+                        <template #label>
+                            <span class="custom-tabs-label home-title">
+                                <el-icon>
+                                    <Edit />
+                                </el-icon>
+                                <span style="margin-left: 5px">营养服务管理记录</span>
+                            </span>
+                        </template>
+
                     </el-tab-pane>
                 </el-tabs>
                 <div class="itemDoby">
@@ -123,9 +138,13 @@
                     <MedicationRecords v-show="state.activeName === '用药记录'"  :tableHeight="state.tableHeight.detailRight" ref="MedicationRecordsRef">
                     </MedicationRecords>
                     <dietarySurvey ref="dietarySurveyRef" v-show="state.activeName === '膳食调查'"  :tableHeight="state.tableHeight.detailRight"></dietarySurvey>
+                    <shiwuguoming ref="shiwuguomingRef" v-show="state.activeName === '食物过敏原及胃肠功能调查'"  :tableHeight="state.tableHeight.detailRight"></shiwuguoming>
                     <pinggubiao ref="pinggubiaoRef" v-show="state.activeName === '营养筛查评估'"  :tableHeight="state.tableHeight.detailRight"></pinggubiao>
-                    <fangAn ref="fangAnRef" v-show="state.activeName === '方案'"  :tableHeight="state.tableHeight.detailRight"></fangAn>
+                    <fangAn ref="fangAnRef" v-show="state.activeName === '营养饮食指导方案'"  :tableHeight="state.tableHeight.detailRight"></fangAn>
                     <suifangjilu ref="suifangjiluRef" v-show="state.activeName === '随访记录'" :tableHeight="state.tableHeight.detailRight"></suifangjilu>
+
+                    <jilubiao ref="jilubiaoRef" v-show="state.activeName === '营养服务管理记录'" :tableHeight="state.tableHeight.detailRight"></jilubiao>
+
 
                 </div>
 
@@ -141,7 +160,7 @@
 <script setup lang="ts" name="home">
 import huanzheliebiao from '/@/assets/imgs/huanzheliebiao.png'
 import { reactive, onMounted, ref, watch, nextTick, onActivated, markRaw } from 'vue';
-import { QueryList } from '/@/api/Patients'
+import { QueryList,getRecordsInToday2 } from '/@/api/Patients'
 import { storeToRefs } from 'pinia';
 import { useUserInfo } from '/@/stores/userInfo';
 import { usePatientsInfo } from '/@/stores/patientsInfo';
@@ -155,6 +174,7 @@
 import MedicationRecords from './components/Medication_records.vue'
 // 膳食调查
 import dietarySurvey from './components/dietary_survey.vue'
+import shiwuguoming from './components/shiwuguoming/index.vue'
 // 患者档案
 import patientFile from './components/patient_file.vue'
 // 化验结果
@@ -165,6 +185,8 @@
 import fangAn from './components/fangAn/index.vue'
 // 随访记录
 import suifangjilu from './components/suifangjilu/index.vue'
+// 营养记录表
+import jilubiao from './components/jilubiao/index.vue'
 interface User {
     code: string,
     patientName: string
@@ -177,8 +199,10 @@
 const lisUiRef = ref()
 const pinggubiaoRef=ref()
 const dietarySurveyRef=ref()// 膳食调查
+const shiwuguomingRef=ref()
 const fangAnRef=ref()
 const suifangjiluRef=ref()
+const jilubiaoRef=ref()
 const state = reactive({
     global: {
         homeChartOne: null,
@@ -201,41 +225,71 @@
 })
 const handleCurrentChange = (val: any | undefined) => {
     if (val) {
-        currentRow.value = val
-        //缓存到vuex 中
-        storesPat.setPatientsInfo(val)
         console.log(val)
+        currentRow.value = val
+        const ps={
+            id: val.patientId,
+			code: val.patientCode,
+			age: val.age,
+			patientName:val.patientName,
+			patientGenderText: val?.patientGender?'女':'男',
+			patientAvatarIcon: val?.patientAvatar,
+			clientCode:val.clientCode
+        }
+        //缓存到vuex 中
+        storesPat.setPatientsInfo(ps)
         getTabsData()
     }
 }
 /**获取患者列表 */
 const getPatients = () => {
-    const loading = ElLoading.service({
-        lock: true,
-        text: 'Loading',
-        background: 'rgba(0, 0, 0, 0.7)',
-    })
-    var ps = {
-        page: 0,
-        size: 0,
-        wherecondition: `client_code="${userInfos.value.clientCode}" and (patient_name like "%${state.search.toLowerCase()}%"
-        OR patient_name_py like "%${state.search.toLowerCase()}%")`
-    }
+    // 初始化患者信息
     storesPat.setPatientsInfo({
         id: '',
         code: '',
         age: 0,
         patientName: '',
         patientGenderText: '',
-        patientAvatarIcon: ''
+        patientAvatarIcon: '',
+        clientCode:''
+
     })
-    QueryList(ps).then(res => {
-        console.log('----------------患者--------')
-        console.log(res.data)
-        state.filterTableData = res.data.list
+    // 患者信息查询条件
+    const pp={
+        timeSlot:3,
+        patientFrom:-1,
+        patientName:state.search.toLowerCase(),
+        orderCondition:2,
+        clientCode:userInfos.value.clientCode,
+        dateBegin:"2025-02-18 00:00:00",
+        dateEnd:"2025-02-18 23:59:59"
+    }
+    const loading = ElLoading.service({
+        lock: true,
+        text: 'Loading',
+        background: 'rgba(0, 0, 0, 0.7)',
+    })
+    getRecordsInToday2(pp).then(re=>{
+        console.log(re.data)
+        state.filterTableData = re.data
     }).finally(() => {
-        loading.close()
-    })
+         loading.close()
+     })
+    
+    // var ps = {
+    //     page: 0,
+    //     size: 0,
+    //     wherecondition: `client_code="${userInfos.value.clientCode}" and (patient_name like "%${state.search.toLowerCase()}%"
+    //     OR patient_name_py like "%${state.search.toLowerCase()}%")`
+    // }
+    
+    // QueryList(ps).then(res => {
+    //     console.log('----------------患者--------')
+    //     console.log(res.data)
+    //     state.filterTableData = res.data.list
+    // }).finally(() => {
+    //     loading.close()
+    // })
 }
 /**设置高度 */
 const setTableHeight = () => {
@@ -264,14 +318,18 @@
             patientFileRef.value.getData()
         } else if(state.activeName === '膳食调查'){
             dietarySurveyRef.value.getData()
-           
-        }else if(state.activeName === '营养筛查评估'){
+        }else if(state.activeName === '食物过敏原及胃肠功能调查'){
+            shiwuguomingRef.value.getData()
+        }
+        else if(state.activeName === '营养筛查评估'){
             pinggubiaoRef.value.getData()
            
-        }else if(state.activeName==='方案'){
+        }else if(state.activeName==='营养饮食指导方案'){
             fangAnRef.value.getData()
         }else if(state.activeName==='随访记录'){
             suifangjiluRef.value.getData()
+        }else if(state.activeName==='营养服务管理记录'){
+            jilubiaoRef.value.getData()
         }
     }
 }
@@ -286,12 +344,12 @@
     .patTabel {
         .el-table th.el-table__cell {
             background-color: #6babfa;
-            color: #606266;
+            color: #ffffff;
         }
 
         .el-table__body tr.current-row>td.el-table__cell {
-            background: #E4F6DE;
-            color: #5FCD00;
+            background: rgb(197.7, 225.9, 255);
+            color: #409EFF;
             /* height: 25px; */
             /* border: tomato solid 1px; */
         }

--
Gitblit v1.8.0