chenyc
2025-03-24 9bbb2946699515807256dfb30ab57359f4fdf563
src/views/home/components/patient_file.vue
@@ -71,14 +71,18 @@
                                    </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 }}
                                patientsInfo.medHistoryStatByMonth }}
                                    (月)</span></td>
                            <td>最近体重:<span>{{ state.patientData.上一次透前体重 }} (kg)</span></td>
                            <td>BMI:<span>{{ BMI }}</span></td>
@@ -93,6 +97,15 @@
                        <tr>
                            <td colspan="5">患者诊断:{{ state.patientData.诊断 }}</td>
                        </tr>
                        <tr>
                            <td colspan="5">外院出院诊断:{{ state.patientData.出院诊断 }}
                                <span>
                                    <el-icon :size="14" color="#409EFF" @click="updateZD">
                                        <Edit />
                                    </el-icon>
                                </span>
                                </td>
                        </tr>
                    </table>
                </div>
            </el-card>
@@ -102,38 +115,53 @@
                        <CreditCard />
                    </el-icon> <span> &nbsp; 最新生化数据</span>
                </div>
                <div>
                    <el-row :gutter="10" v-if="state.listData.length">
                        <el-col :xs="8" :sm="8" :md="6" :lg="6" :xl="4" v-for="(item, key) in state.listData"
                            :key="key">
                            <div class="itemLis" v-if="item?.item_result">
                                <div class="title">
                                    {{ key }}
                                </div>
                                <div class="itemRes">
                                    <div class="itemResDtile">
                                        <div style="text-align: center;width: 100%;">
                                            {{ item?.item_name }}
                                        </div>
                                        <div>
                                            {{ item?.item_result }}<span class="tdate">{{ item?.item_result_unit
                                                }}</span>
                <el-scrollbar :height="(tableHeight-520)+'px'">
                    <div>
                        <el-row :gutter="10" v-if="state.listData.length">
                            <el-col :xs="8" :sm="8" :md="6" :lg="6" :xl="4" v-for="(item, key) in state.listData"
                                :key="key">
                                <div class="itemLis" v-if="item?.item_result">
                                    <div class="title">
                                        {{ key }}
                                    </div>
                                    <div class="itemRes">
                                        <div class="itemResDtile">
                                            <div style="text-align: center;width: 100%;">
                                                {{ item?.item_name }}
                                            </div>
                                            <div>
                                                {{ item?.item_result }}<span class="tdate">{{ item?.item_result_unit
                                                    }}</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="tdate">
                                    {{ item?.sample_date_str }}
                                    <div class="tdate">
                                        {{ item?.sample_date_str }}
                                    </div>
                                </div>
                            </div>
                        </el-col>
                    </el-row>
                </div>
                            </el-col>
                        </el-row>
                    </div>
                </el-scrollbar>
            </el-card>
        </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>
@@ -143,7 +171,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';
@@ -158,6 +186,8 @@
const { userInfos } = storeToRefs(stores);
const props = defineProps(['tableHeight'])
const state = reactive({
    gtztableData:[],
    gtzshow:false,
    formdispl:true,// 表单是否编辑
    // 患者套餐表
    taochanId:0,
@@ -176,7 +206,8 @@
        证件号: "",
        诊断: '',
        身高: '',
        上一次透前体重: ''
        上一次透前体重: '',
        出院诊断:'',
    },
    listData: <any>{}
})
@@ -206,6 +237,30 @@
            state.loading = false
        })
    }
}
const updateZD=()=>{
    ElMessageBox.prompt('请输入你要编辑的外院出院诊断', '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        inputValue: state.patientData.出院诊断,
    })
        .then(({ value }) => {
            const params = {
                id: patientsInfo.value.id,
                outDiagnoseFromPrevHospital: value
            }
            update(params).then(re => {
                getPatData({ patCode: patientsInfo.value.code, }).then(res => {
                    state.patientData = res.data
                })
            })
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: '取消修改',
            })
        })
}
/**打开修改身高 */
const updateSg = () => {
@@ -258,6 +313,7 @@
    }
    try {
        state.loading = true
        getGtzList()
        const [res1, res2,res3] = await Promise.all([
            getPatData(pam),
            getLisResults(pam2),
@@ -289,6 +345,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={