From 5dac25e97563d1a764383b615849a82efd342cb4 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 24 十二月 2024 11:26:17 +0800
Subject: [PATCH] gx
---
src/views/home/components/dietary_survey.vue | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/src/views/home/components/dietary_survey.vue b/src/views/home/components/dietary_survey.vue
index 25f7e23..3da6815 100644
--- a/src/views/home/components/dietary_survey.vue
+++ b/src/views/home/components/dietary_survey.vue
@@ -1,6 +1,6 @@
<template>
<div class="dietarySurvey-home" >
- <el-row style="padding-left: 10px;">
+ <el-row v-if="patientsInfo.id" style="padding-left: 10px;">
<el-form size="small" :inline="true" :model="state.formInline">
<el-form-item label="调差表">
<el-select style="width: 120px;"
@@ -160,13 +160,13 @@
const pasm={
page: state.page,
size: state.size,
- wherecondition: `patient_code = '${patientsInfo.value.code}'`,
+ wherecondition:`survery_form_type=0 and patient_code='${patientsInfo.value.code}'`,
ordercondition: 'survery_time desc'
}
- if(state.formInline.date.length===2){
+ if(state.formInline?.date?.length===2){
pasm.wherecondition+=` and survery_time BETWEEN '${state.formInline.date[0]} 00:00:00' AND '${state.formInline.date[1]} 23:59:59'`
}
- if(state.formInline.formTableName){
+ if(state.formInline?.formTableName){
pasm.wherecondition+=`and suvery_form_name='${state.formInline.formTableName}'`
}
const loading = ElLoading.service({
@@ -199,10 +199,10 @@
const pasm = {
page: 1,
size: 10,
- wherecondition:`patient_code='${patientsInfo.value.code}'`,
+ wherecondition:`survery_form_type=0 and patient_code='${patientsInfo.value.code}'`,
ordercondition:'survery_time DESC'
}
- if(state.formInline.date.length===2){
+ if(state.formInline?.date?.length===2){
pasm.wherecondition+=`and survery_time BETWEEN '${state.formInline.date[0]} 00:00:00' AND '${state.formInline.date[1]} 23:59:59'`
}
if(state.formInline.formTableName){
@@ -231,15 +231,12 @@
* 编辑
*/
const handleEdit = (index: number, row: any) => {
- console.log(index, row)
- if(state.formInline.formTableName){
- if(state.formInline.formTableName==='膳食调查表'){
- editDietaryRef.value.openShow('update',row)
- }else if(state.formInline.formTableName==='营养膳食调查表'){
- editDietaryRef2.value.openShow('update',row)
- }
+ console.log(index, row,state.formInline.formTableName)
+ if(row.suveryFormName==='膳食调查表'){
+ editDietaryRef.value.openShow('update',row)
+ }else if(row.suveryFormName==='营养膳食调查表'){
+ editDietaryRef2.value.openShow('update',row)
}
-// editDietaryRef.value.openShow('update',row)
}
const handleDelete = (index: number, row: any) => {
console.log(index, row)
--
Gitblit v1.8.0