gx
chenyc
2024-10-16 376fce588c5662012e0ebafbf91dbf22ec5e4bc5
gx
3个文件已修改
138 ■■■■ 已修改文件
.env.development 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/Patients/index.ts 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/home/components/patient_file.vue 127 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -2,5 +2,5 @@
ENV = development
# 本地环境接口地址
VITE_API_URL = 'http://testbs.ihemodialysis.com/'
# VITE_API_URL = 'https://hemobs.icoldchain.cn/'
# VITE_API_URL = 'http://testbs.ihemodialysis.com/'
VITE_API_URL = 'https://hemobs.icoldchain.cn/'
src/api/Patients/index.ts
@@ -42,5 +42,12 @@
        params
    });
}
export function update(params: Object) {
    return request({
        url: '/patient/info/update',
        method: 'post',
        data: params,
    });
}
src/views/home/components/patient_file.vue
@@ -3,7 +3,9 @@
        <div v-if="patientsInfo.id" v-loading="state.loading">
            <el-card class="box-card" >
                <div  class="clearfix" >
                    <el-icon size="16" color="#409efc"><Briefcase /></el-icon>  <span> &nbsp; 服务套餐</span>
                    <el-icon size="16" color="#409efc">
                        <Briefcase />
                    </el-icon> <span> &nbsp; 服务套餐</span>
                </div>
                <div>
                   基础服务100套餐
@@ -13,7 +15,9 @@
            </el-card>
            <el-card class="box-card" style="margin-top:10px;">
                <div  class="clearfix" >
                    <el-icon size="16" color="#409efc"><CreditCard /></el-icon>  <span> &nbsp; 患者基本信息</span>
                    <el-icon size="16" color="#409efc">
                        <CreditCard />
                    </el-icon> <span> &nbsp; 患者基本信息</span>
                </div>
                <div>
                    <table class="gridtable">
@@ -21,14 +25,25 @@
                            <td>姓名:{{patientsInfo.patientName}}</td>
                            <td>年龄:<span v-if="patientsInfo.age">{{patientsInfo.age}}  岁</span></td>
                            <td>性别:{{patientsInfo.patientGenderText}}</td>
                            <td>身高:{{patientsInfo.patientHeight}}</td>
                            <td>干体重:<span v-if="state.patientData.干体重">{{state.patientData.干体重}} (kg)</span></td>
                            <td>身高:{{ state.patientData.身高 }} <span v-if="state.patientData.身高">(cm)</span>
                                <span>
                                    <el-icon :size="14" color="#409EFF" @click="updateSg">
                                        <Edit />
                                    </el-icon>
                                </span>
                            </td>
                            <td>干体重:<span>{{ state.patientData.干体重 }} (kg)</span></td>
                            
                        </tr>
                        <tr>
                            <td>透析龄:<span v-if="patientsInfo.medHistoryStatByMonth">{{patientsInfo.medHistoryStatByMonth}} (月)</span></td>
                            <td colspan="4">证件号:{{patientsInfo.patientIdentityNo}}</td>
                            <td colspan="2">证件号:{{ patientsInfo.patientIdentityNo }}</td>
                            <td>透析龄:<span v-if="patientsInfo.medHistoryStatByMonth">{{
                                patientsInfo.medHistoryStatByMonth }}
                                    (月)</span></td>
                            <td>最近体重:<span>{{ state.patientData.上一次透前体重 }} (kg)</span></td>
                            <td>BMI:<span>{{ BMI }}</span></td>
                            
                        </tr>
                        <tr>
@@ -45,11 +60,14 @@
            </el-card>
            <el-card class="box-card" style="margin-top:10px;">
                <div  class="clearfix" >
                    <el-icon size="16" color="#409efc"><CreditCard /></el-icon>  <span> &nbsp; 最新生化数据</span>
                    <el-icon size="16" color="#409efc">
                        <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">
                        <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}}
@@ -60,7 +78,8 @@
                                        {{ item?.item_name }}
                                       </div>
                                       <div>
                                        {{ item?.item_result }}<span class="tdate">{{item?.item_result_unit}}</span>
                                            {{ item?.item_result }}<span class="tdate">{{ item?.item_result_unit
                                                }}</span>
                                       </div>
                                    </div>
                                </div>
@@ -86,9 +105,12 @@
import { usePatientsInfo } from '/@/stores/patientsInfo';
import { useUserInfo } from '/@/stores/userInfo';
import { computed, onMounted, reactive } from 'vue';
import { getPatData,getLisResults } from '/@/api/Patients';
import { getPatData, getLisResults,update } from '/@/api/Patients';
import { userInfo } from 'os';
import { Search } from '@element-plus/icons-vue'
import dayjs from 'dayjs';
import { ElMessage, ElMessageBox } from 'element-plus';
import { number } from 'echarts';
const storesPat = usePatientsInfo();
const stores = useUserInfo();
@@ -96,6 +118,7 @@
const { userInfos } = storeToRefs(stores);
const props = defineProps(['tableHeight'])
const state = reactive({
    tableData: [],
    loading: false,
    patientData:{
@@ -103,12 +126,46 @@
        干体重:'',
        证件号:"",
        诊断:'',
        身高:''
        身高: '',
        上一次透前体重: ''
    },
    listData:<any>{}
})
const tableHe = computed(() => {
    return props.tableHeight - 130
})
/**打开修改身高 */
const updateSg = () => {
    ElMessageBox.prompt('请输入你要修改的身高单位cm', '提示', {
        confirmButtonText: '确认',
        cancelButtonText: '取消',
        inputValue:state.patientData.身高,
    })
        .then(({ value }) => {
            const params={
                id:patientsInfo.value.id,
                patientHeight:value
            }
            update(params).then(re=>{
                getPatData({ patCode: patientsInfo.value.code,}).then(res=>{
                    state.patientData = res.data
                })
            })
        })
        .catch(() => {
            ElMessage({
                type: 'info',
                message: '取消修改',
            })
        })
}
const BMI = computed(() => {
    if (state.patientData.干体重 && state.patientData.身高) {
        return (Number(state.patientData.干体重) / (Number(state.patientData.身高)/100 * Number(state.patientData.身高)/100)).toFixed(2)
    } else {
        return ''
    }
})
// 第一步:定义子组件里面的方法
const getData = async (str: string) => {
@@ -134,6 +191,7 @@
    }
    catch(error){
        state.loading = false
        ElMessage.error('结果请求错误,请联系管理员!')
    }
    
}
@@ -152,18 +210,40 @@
</script>
<style  lang="scss">
 .gridtable {font-family: verdana,arial,sans-serif;font-size:14px;color:#333333;border-width: 1px;border-color: #666666;border-collapse: collapse;width: 100%;}
.gridtable {
    font-family: verdana, arial, sans-serif;
    font-size: 14px;
    color: #333333;
    border-width: 1px;
    border-color: #666666;
    border-collapse: collapse;
    width: 100%;
}
.gridtable th {border-width: 1px;padding: 8px;border-style: solid;border-color: #666666;background-color: #dedede;}
.gridtable th {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666666;
    background-color: #dedede;
}
.gridtable td {border-width: 1px;padding: 8px;border-style: solid;border-color: #666666;background-color: #ffffff;}
.gridtable td {
    border-width: 1px;
    padding: 8px;
    border-style: solid;
    border-color: #666666;
    background-color: #ffffff;
}
.clearfix{
    font-weight: 800;
    flex: 1;
    height: inherit;
    display: flex;
    align-items: center;
    margin-top: -10px;margin-bottom: 10px;
    margin-top: -10px;
    margin-bottom: 10px;
}
.itemLis{
@@ -179,6 +259,7 @@
    border-radius: 5px;
    text-align: center;
    margin-left: 10px;
    .title{
        text-align: left;
        color: #909399;
@@ -186,6 +267,7 @@
        height: 20px;
        line-height: 20px;
    }
    .itemRes{
        height: 60px;
        flex: 1;
@@ -193,16 +275,23 @@
        align-items: center;
        color: #303133;
        font-size: 16px;
        div{
            width: 100%;
            line-height: 30px;text-align: center; padding-left: 10px; padding-right: 10px;
            line-height: 30px;
            text-align: center;
            padding-left: 10px;
            padding-right: 10px;
        }
        .itemResDtile:not(:first-child) {
            width: 100%;
            /* 在这里添加你想要的样式 */
            border-left: 1px solid #909399; /* 示例样式:为除第一个div外的所有div添加红色边框 */
            border-left: 1px solid #909399;
            /* 示例样式:为除第一个div外的所有div添加红色边框 */
        }
    }
    .tdate{
        color: #909399;
        font-size: 13px;
@@ -210,6 +299,4 @@
        line-height: 20px;
    }
}
</style>