chenyc
2024-09-27 b2d04038df93bed77a49e3ad29004d9fc7eca888
src/views/home/components/editDietary2.vue
@@ -1195,6 +1195,7 @@
    viewInfo:{
        id: 0,
        code: '',
        surveryFormType:0,
        clientCode: userInfos.value.clientCode,
        patientCode: patientsInfo.value.code,
        surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'),
@@ -1221,6 +1222,7 @@
    surveryPerson: userInfos.value.code,
    surveryJsonBody: JSON.stringify(state.tableData),
    suveryFormName:'营养膳食调查表',
    surveryFormType:0,
    updateTime: ''
  }
  console.log(info)
@@ -1250,9 +1252,7 @@
const openShow = (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()
        state.dialogTableVisible = true
    }
    else if(type==='update'){
@@ -1265,6 +1265,157 @@
    }
   
}
const getPageInfo=()=>{
    state.tableData={
        表名: '营养膳食调查表',
        初次调查日期: formatDate(new Date(),'YYYY-mm-dd'),
        填表日期: '',
        更新日期: formatDate(new Date(),'YYYY-mm-dd'),
        记录者: userInfos.value.userName,
        常吃的主食: {
            type: '', //只能选择独居或者家庭
            input1: '',
        },
        常吃的蔬菜: {
            type: '',
            input1: '',
        },
        蔬菜日食用量: {
            type: '',
            input1: '',
        },
        水果食用量及频率:{
            input1: '',
            input2:''
        },
        常吃的肉类: {
            type: '',
            input1: '',
            input2:''
        },
        常吃的大豆及其制品是: {
            type: '',
            input1: '',
            input2:''
        },
        坚果摄入量:{
            type: '',
            input1: '',
            input2:''
        },
        每天食用奶类的量:{
            type: '',
            input1: '',
            input2: '',
        },
        每日饮水量种类:{
            type: '',
            input1: '',
        },
        日食盐量:{
            type: '',
            input1: '',
            input2: '',
        },
        烹饪油:{
            type: '',
            input1: '',
            input2: '',
        },
        经常使用的烹饪方法:{
            type: '',
            input1: '',
            input2: '',
        },
        是否食用零食:{
            type: '',
            input1: '',
            input2: '',
        },
        三餐怎么安排:{
            type: '',
            input1: '',
            input2: '',
        },
        中晚餐如何搭配:{
            type: '',
            input1: '',
            input2: '',
            input3: '',
            input4: '',
        },
        每日膳食搭配:{
            type: '',
            input1: '',
            input2: '',
        },
        一日三餐能按时:{
            type: '',
            input1: '',
            input2: '',
        },
        一日三餐中饮食结构最合理的是:{
            type: '',
            input1: '',
            input2: '',
        },
        是否加餐:{
            type: '',
            input1: '',
            input2: '',
        },
        三天饮食记录表:{
            透析日1:{日期:'',早餐:'',加餐1:'',午餐:"",加餐2:'',晚餐:''},
            非透析日:{日期:'',早餐:'',加餐1:'',午餐:"",加餐2:'',晚餐:''},
            透析日2:{日期:'',早餐:'',加餐1:'',午餐:"",加餐2:'',晚餐:''}
        },
        每餐就餐时间:{
            type: '',
            input1: '',
            input2: '',
        },
        你如何调节自己的饮食:{
            type: '',
            input1: '',
            input2: '',
        },
        你对合理膳食的基本要求知道多少:{
            type: '',
            input1: '',
            input2: '',
        },
        过敏食物:{
            type: '',
            input1: '',
            input2: '',
        },
        过敏症状表现为以下哪些: {type: '', input1: '',},
        人员构成: {
            type: '', //只能选择独居或者家庭
            input1: '',
        },
        烹饪主要操作者: {
            type: '',
            input1: '',
        },
        食材采购: {
            type: '',
            input1: '',
        },
        食物偏好: {
            type: '',
            input1: '',
        },
        是否吸烟:{ type: '',input1: ''},
        是否饮酒:{ type: '',input1: '',input2: '',input3: ''},
        周运动频率:{ type: '',input1: '',input2: '',input3: ''},
        作息时间: {type: '', input1: '',input2: ''},
        排便情况:{ type: '',input1: ''},
    }
}
// 第二步:暴露方法
defineExpose({ getData, openShow })