chenyc
2025-03-24 9bbb2946699515807256dfb30ab57359f4fdf563
src/views/home/components/pingubiao/editDietary2.vue
@@ -1,7 +1,7 @@
<template>
    <div class="dietarySurvey-item">
        <el-dialog v-model="state.dialogTableVisible" title="SGA" :fullscreen="true" width="100%">
            <div class="container" style="width: 100%; height: 100%;overflow: auto;">
            <div  style="width: 100%; height: 100%;overflow: auto;">
                <div id="pinggu2">
                    <div>
                        <el-form size="small">
@@ -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: '',