From 9bbb2946699515807256dfb30ab57359f4fdf563 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期一, 24 三月 2025 16:09:43 +0800
Subject: [PATCH] gx优化
---
src/views/home/components/pingubiao/editDietary2.vue | 10 +++--
src/views/home/components/patient_file.vue | 35 ++++++++++++++++-
src/views/home/components/pingubiao/index.vue | 27 +++++++++++--
src/api/Patients/index.ts | 8 ++++
src/views/home/components/editDietary.vue | 39 +++++++++++++++++--
5 files changed, 104 insertions(+), 15 deletions(-)
diff --git a/src/api/Patients/index.ts b/src/api/Patients/index.ts
index 8dd2534..f447885 100644
--- a/src/api/Patients/index.ts
+++ b/src/api/Patients/index.ts
@@ -111,4 +111,12 @@
},
params
});
+}
+// 获取干体重列表
+export function getDryWeightList(params: object) {
+ return request({
+ url: '/patient/vs/pure/weight/list',
+ method: 'post',
+ params
+ })
}
\ No newline at end of file
diff --git a/src/views/home/components/editDietary.vue b/src/views/home/components/editDietary.vue
index 3f9002a..60c4e8c 100644
--- a/src/views/home/components/editDietary.vue
+++ b/src/views/home/components/editDietary.vue
@@ -933,10 +933,10 @@
import { useUserInfo } from '/@/stores/userInfo';
import { usePatientsInfo } from '/@/stores/patientsInfo';
const storesPat = usePatientsInfo();
-import {Add,update,deleteId,tiaochabiaoInfo} from '/@/api/tiaochabiao/index'
+import {Add,update,list,tiaochabiaoInfo} from '/@/api/tiaochabiao/index'
import { storeToRefs } from 'pinia';
import { useRoute,useRouter } from 'vue-router';
-import { ElMessage } from 'element-plus';
+import { ElLoading, ElMessage } from 'element-plus';
const stores = useUserInfo();
const { patientsInfo } = storeToRefs(storesPat);
const { userInfos } = storeToRefs(stores);
@@ -1393,11 +1393,40 @@
}
// 打开查看或者编辑明细
-const openShow = (type: string,mode:tiaochabiaoInfo) => {
+const openShow = async (type: string,mode:tiaochabiaoInfo) => {
console.log(type)
if(type==='add'){
- getPageInfo()
- state.dialogTableVisible = true
+ const pasm={
+ page: 0,
+ size: 1,
+ wherecondition:`survery_form_type=0 and patient_code='${patientsInfo.value.code}' and suvery_form_name='膳食生活调查表'`,
+ ordercondition: 'survery_time desc'
+ }
+ const re= await list(pasm);
+ console.log('店家--------',re.data)
+ if(re.data.list.length){
+ const model=re.data.list[0]
+ state.tableData=JSON.parse(model.surveryJsonBody)
+
+ state.dialogTableVisible = true
+ state.viewInfo={
+ id: 0,
+ code: '',
+ clientCode: userInfos.value.clientCode,
+ patientCode: patientsInfo.value.code,
+ surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'),
+ surveryPerson: userInfos.value.code,
+ surveryJsonBody: '',
+ suveryFormName:'膳食生活调查表',
+ surveryFormType:0,
+ updateTime: ''
+ }
+
+ }else{
+ getPageInfo()
+ state.dialogTableVisible = true
+ }
+
}
else if(type==='update'){
console.log(mode)
diff --git a/src/views/home/components/patient_file.vue b/src/views/home/components/patient_file.vue
index f230d60..e5a4a55 100644
--- a/src/views/home/components/patient_file.vue
+++ b/src/views/home/components/patient_file.vue
@@ -71,7 +71,11 @@
</el-icon>
</span>
</td>
- <td>干体重:<span>{{ state.patientData.干体重 }} (kg)</span></td>
+ <td>干体重:<span>{{ state.patientData.干体重 }} (kg)</span>
+ <el-icon :size="14" color="#409EFF" @click="state.gtzshow=true">
+ <Calendar />
+ </el-icon>
+ </td>
</tr>
@@ -145,6 +149,19 @@
</div>
<el-empty v-else description="无数据,请先选择患者"></el-empty>
+ <el-dialog v-model="state.gtzshow" title="干体重历史调整记录" width="800px">
+ <el-table :data="state.gtztableData" height="300" >
+ <el-table-column align="center" prop="createTime" label="时间" width="180" />
+ <el-table-column align="center" prop="pureWeight" label="干体重" />
+ <el-table-column align="center" label="启用时间">
+ <template #default="scope">
+ <span v-if="scope.row.enableRecordTime">{{scope.row.enableRecordTime.substring(0,11)}}</span>
+ </template>
+ </el-table-column>
+ <el-table-column align="center" prop="remark" label="备注" />
+
+ </el-table>
+ </el-dialog>
</div>
</template>
@@ -154,7 +171,7 @@
import { usePatientsInfo } from '/@/stores/patientsInfo';
import { useUserInfo } from '/@/stores/userInfo';
import { computed, onMounted, reactive } from 'vue';
-import { getPatData, getLisResults, update ,updateNurtion,listNurtion,AddNurtion} from '/@/api/Patients';
+import { getPatData, getLisResults, update ,updateNurtion,listNurtion,AddNurtion,getDryWeightList} from '/@/api/Patients';
import { userInfo } from 'os';
import { Search ,Edit,Check} from '@element-plus/icons-vue'
import dayjs from 'dayjs';
@@ -169,6 +186,8 @@
const { userInfos } = storeToRefs(stores);
const props = defineProps(['tableHeight'])
const state = reactive({
+ gtztableData:[],
+ gtzshow:false,
formdispl:true,// 表单是否编辑
// 患者套餐表
taochanId:0,
@@ -294,6 +313,7 @@
}
try {
state.loading = true
+ getGtzList()
const [res1, res2,res3] = await Promise.all([
getPatData(pam),
getLisResults(pam2),
@@ -325,6 +345,17 @@
}
}
+const getGtzList=()=>{
+ var data = {
+ wherecondition: `patient_code = '${patientsInfo.value.code}'`,
+ ordercondition: 'create_time desc'
+ }
+ getDryWeightList(data).then((res:any) => {
+ state.gtztableData = res.data.list
+ }).finally(()=>{
+
+ })
+}
// 刷新套餐
const getlistNurtion=()=>{
const pas3={
diff --git a/src/views/home/components/pingubiao/editDietary2.vue b/src/views/home/components/pingubiao/editDietary2.vue
index 45a7faf..5a8cbd5 100644
--- a/src/views/home/components/pingubiao/editDietary2.vue
+++ b/src/views/home/components/pingubiao/editDietary2.vue
@@ -456,6 +456,7 @@
import { storeToRefs } from 'pinia';
import { useRoute, useRouter } from 'vue-router';
import { ElMessage } from 'element-plus';
+import { getPatData } from '/@/api/Patients';
const stores = useUserInfo();
const { patientsInfo } = storeToRefs(storesPat);
const { userInfos } = storeToRefs(stores);
@@ -637,14 +638,14 @@
}
// 打开查看或者编辑明细
-const openShow = (type: string, mode: tiaochabiaoInfo) => {
+const openShow = async (type: string, mode: tiaochabiaoInfo) => {
console.log(type)
if (type === 'add') {
state.tableData.初次调查日期 = formatDate(new Date(), 'YYYY-mm-dd')
state.tableData.更新日期 = formatDate(new Date(), 'YYYY-mm-dd')
state.tableData.记录者 = userInfos.value.userName
- getPageInfo()
+ await getPageInfo()
state.dialogTableVisible = true
}
else if (type === 'update') {
@@ -660,14 +661,15 @@
}
}
-const getPageInfo = () => {
+const getPageInfo = async () => {
+ const res = await getPatData({ patCode: patientsInfo.value.code, })
state.tableData = {
表名: 'SGA',
初次调查日期: formatDate(new Date(), 'YYYY-mm-dd'),
填表日期: '',
更新日期: formatDate(new Date(), 'YYYY-mm-dd'),
记录者: userInfos.value.userName,
- 您目前体重: '',
+ 您目前体重: res.data.上一次透前体重,
体重改变1: {
type: '',
input1: '',
diff --git a/src/views/home/components/pingubiao/index.vue b/src/views/home/components/pingubiao/index.vue
index 1355ad4..b9f0276 100644
--- a/src/views/home/components/pingubiao/index.vue
+++ b/src/views/home/components/pingubiao/index.vue
@@ -55,8 +55,15 @@
{{scope.row.suveryFormName}}
</template>
</el-table-column>
+ <el-table-column label="评估结果" show-overflow-tooltip >
+ <template #default="scope">
+ <span :style="{color:scope.row.结果.结果.color}" v-if="scope.row.结果?.结果?.value">
+ 评分:{{scope.row.结果?.结果?.value}}, 结果:{{scope.row.结果?.结果?.label}}
+ </span>
+ </template>
+ </el-table-column>
<el-table-column prop="surveryPersonName" label="填表人" show-overflow-tooltip />
- <!-- <el-table-column prop="updateTime" label="更新时间" show-overflow-tooltip /> -->
+
<el-table-column label="操作" >
<template #default="scope">
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">
@@ -189,7 +196,12 @@
background: 'rgba(0, 0, 0, 0.7)',
})
list(pasm).then(re=>{
- state.tableData=re.data.list
+ const list=re.data.list.map(e=>{
+ e.结果=JSON.parse(e.surveryJsonBody)
+ return e
+ })
+ state.tableData=list
+ // state.tableData=re.data.list
state.total=re.data.total
}).finally(()=>{
loading.close()
@@ -234,8 +246,15 @@
background: 'rgba(0, 0, 0, 0.7)',
})
list(pasm).then(re=>{
- console.log(re)
- state.tableData=re.data.list
+
+ const list=re.data.list.map(e=>{
+ e.结果=JSON.parse(e.surveryJsonBody)
+ return e
+ })
+ state.tableData=list
+ console.log('----------')
+ console.log(state.tableData)
+
state.total=re.data.total
}).finally(()=>{
loading.close()
--
Gitblit v1.8.0