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/editDietary.vue | 41 +++++++++++++++++++++++++++++++++++------
1 files changed, 35 insertions(+), 6 deletions(-)
diff --git a/src/views/home/components/editDietary.vue b/src/views/home/components/editDietary.vue
index 1aee596..60c4e8c 100644
--- a/src/views/home/components/editDietary.vue
+++ b/src/views/home/components/editDietary.vue
@@ -1,6 +1,6 @@
<template>
<div class="dietarySurvey-item">
- <el-dialog v-model="state.dialogTableVisible" title="膳食生活调查22表" :fullscreen="true" width="100%">
+ <el-dialog v-model="state.dialogTableVisible" title="膳食生活调查表" :fullscreen="true" width="100%">
<div style="width: 100%; height: 100%;overflow: auto;">
<div ref="printRef">
<div>
@@ -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)
--
Gitblit v1.8.0