gx
chenyc
2025-05-06 e86caaa9da27f6b0d5aefd5f0246674ab43975d8
src/views/home/components/patient_file.vue
@@ -71,23 +71,25 @@
                                    </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>
                        <tr>
                            <td colspan="2">证件号:{{ patientsInfo.patientIdentityNo }}</td>
                            <td>透析龄:<span v-if="patientsInfo.medHistoryStatByMonth">{{
                                patientsInfo.medHistoryStatByMonth }}
                                    (月)</span></td>
                            <td colspan="2">证件号:{{ state.patientData.证件号 }}</td>
                            <td>透析龄:<span>{{透析年龄}}</span></td>
                            <td>最近体重:<span>{{ state.patientData.上一次透前体重 }} (kg)</span></td>
                            <td>BMI:<span>{{ BMI }}</span></td>
                        </tr>
                        <tr>
                            <td>电话号码:{{ patientsInfo.patientTelNo }}</td>
                            <td>家属电话:{{ patientsInfo.patientTelNoRelative }}</td>
                            <td colspan="3">家庭地址:{{ patientsInfo.patientAddress }}</td>
                            <td>电话号码:{{ state.patientData.电话号码 }}</td>
                            <td>家属电话:{{ state.patientData.亲属手机号 }}</td>
                            <td colspan="3">家庭地址:{{ state.patientData.家庭住址 }}</td>
                        </tr>
                        <tr>
@@ -145,6 +147,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 +169,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 +184,8 @@
const { userInfos } = storeToRefs(stores);
const props = defineProps(['tableHeight'])
const state = reactive({
    gtztableData:[],
    gtzshow:false,
    formdispl:true,// 表单是否编辑
    // 患者套餐表
    taochanId:0,
@@ -189,6 +206,7 @@
        身高: '',
        上一次透前体重: '',
        出院诊断:'',
        '透析龄(月)':''
    },
    listData: <any>{}
})
@@ -276,6 +294,15 @@
        return ''
    }
})
const 透析年龄=computed(() => {
    if (state.patientData['透析龄(月)']) {
        const nian=Math.floor(Number(state.patientData['透析龄(月)']) / 12)===0?'':Math.floor(Number(state.patientData['透析龄(月)']) / 12)+'年'
        const yue=(Number(state.patientData['透析龄(月)']) % 12)===0?'':Number(state.patientData['透析龄(月)']) % 12+'月'
        return  nian +yue
    } else {
        return ''
    }
})
// 第一步:定义子组件里面的方法
const getData = async (str: string) => {
    var pam = {
@@ -294,12 +321,14 @@
    }
    try {
        state.loading = true
        getGtzList()
        const [res1, res2,res3] = await Promise.all([
            getPatData(pam),
            getLisResults(pam2),
            listNurtion(pas3)
        ])
        state.patientData = res1.data
        console.log('赋值患者信息',state.patientData)
        state.listData = res2.data
        if(res3.data?.list.length>=1){
            const row=res3.data.list[0]
@@ -325,6 +354,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={