1.6提交
This commit is contained in:
@@ -28,43 +28,61 @@
|
||||
<view v-if="activeTab === 'basic'" class="basic-info">
|
||||
<view class="info-item">
|
||||
<text class="info-label">姓名</text>
|
||||
<text class="info-value">{{ patientInfo.name || '提**' }}</text>
|
||||
<text class="info-value">{{ maskName(patientInfo.name) }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">性别</text>
|
||||
<text class="info-value">{{ patientInfo.gender || '男' }}</text>
|
||||
<text class="info-value">{{ patientInfo.gender }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">年龄</text>
|
||||
<text class="info-value">{{ patientInfo.age || '15' }}</text>
|
||||
<text class="info-value">{{ patientInfo.age }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">地址</text>
|
||||
<text class="info-value">{{ patientInfo.address || '北京市东城区' }}</text>
|
||||
<text class="info-value twoline" style="max-width:380rpx;flex:none">{{ patientInfo.address }}</text>
|
||||
</view>
|
||||
<view class="info-item" v-if="patientInfo.gender=='女'">
|
||||
<text class="info-label">是否怀孕</text>
|
||||
<text class="info-value">{{ formatwhetherpregnant(patientInfo.whether_pregnant) }}</text>
|
||||
</view>
|
||||
<view class="info-item" v-if="patientInfo.gender=='女' && patientInfo.expected_date_of_childbirth" >
|
||||
<text class="info-label">预产期</text>
|
||||
<text class="info-value">{{ patientInfo.expected_date_of_childbirth }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">肝硬化或肝癌家族史</text>
|
||||
<text class="info-value">{{ patientInfo.familyHistory || '无' }}</text>
|
||||
<text class="info-value">{{ whetherHbv(patientInfo.whether_hbv) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 病史信息内容 -->
|
||||
<view v-if="activeTab === 'history'" class="history-info">
|
||||
<view class="info-item">
|
||||
<text class="info-label">既往病史</text>
|
||||
<text class="info-value">暂无</text>
|
||||
<text class="info-label">前往医院就诊该疾病情况</text>
|
||||
<text class="info-value">{{ goHospital(patientInfo.go_hospital) }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">过敏史</text>
|
||||
<text class="info-value">暂无</text>
|
||||
<text class="info-label">患病时间</text>
|
||||
<text class="info-value">{{ patientInfo.disease_date }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">手术史</text>
|
||||
<text class="info-value">暂无</text>
|
||||
<text class="info-label">目前肝脏状态</text>
|
||||
<text class="info-value">{{ patientInfo.liver_status }}</text>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<text class="info-label">用药史</text>
|
||||
<text class="info-value">暂无</text>
|
||||
<text class="info-label">当前服用肝病用药情况</text>
|
||||
<text class="info-value">{{ patientInfo.boolean_medication }}</text>
|
||||
</view>
|
||||
<view class="info-item column" v-if="patientInfo.medication_info">
|
||||
<text class="info-label" style="padding-top: 20rpx;">当前服用的肝病药物以及服用时长</text>
|
||||
<text class="info-content">{{ patientInfo.medication_info }}</text>
|
||||
</view>
|
||||
<view class="info-item column" >
|
||||
<text class="info-label" style="padding-top: 20rpx;">是否合并其他慢性疾病</text>
|
||||
<view class="otherbox" v-if="patientInfo.other_disease">
|
||||
<view class="cell" v-for="item in patientInfo.other_disease.split(',')" :key="item">{{ item}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -96,17 +114,22 @@ const interrogationPatientInfo=()=>{
|
||||
step1_uuid: step1_uuid.value
|
||||
}).then(res=>{
|
||||
if(res.code == 200 && res.data){
|
||||
const d = res.data
|
||||
patientInfo.name = d.name || '提**'
|
||||
patientInfo.gender = d.sex === 1 ? '男' : '女'
|
||||
patientInfo.age = d.birthday ? calculateAge(d.birthday) : '未知'
|
||||
patientInfo.address = d.address || ''
|
||||
// 家族史字段接口未提供,设为未知
|
||||
patientInfo.familyHistory = '未知'
|
||||
const d = res.data;
|
||||
Object.assign(patientInfo, d);
|
||||
// patientInfo.name = d.name || '提**'
|
||||
patientInfo.gender = d.sex === 1 ? '女' : '男'
|
||||
patientInfo.age = d.birthday ? calculateAge(d.birthday) : '未知'
|
||||
// patientInfo.address = d.address || ''
|
||||
// // 家族史字段接口未提供,设为未知
|
||||
// patientInfo.familyHistory = '未知'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const maskName = (name)=>{
|
||||
if(!name) return '**'
|
||||
const first = name.slice(0,1)
|
||||
return `${first}**`
|
||||
}
|
||||
function calculateAge(birthday){
|
||||
const birth = new Date(birthday)
|
||||
const today = new Date()
|
||||
@@ -126,7 +149,33 @@ const statusBarStyle = computed(() => ({
|
||||
const goBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
const formatwhetherpregnant = (value)=>{
|
||||
if(value==1){
|
||||
return '无计划'
|
||||
}else if(value==2){
|
||||
return '计划中'
|
||||
}else if(value==3){
|
||||
return '已怀孕'
|
||||
}else if(value==4){
|
||||
return '家有宝宝'
|
||||
}
|
||||
}
|
||||
const goHospital = (val)=>{
|
||||
if(val==1){
|
||||
return '是'
|
||||
}else if(val==0){
|
||||
return '否'
|
||||
}
|
||||
}
|
||||
const whetherHbv = (value)=>{
|
||||
if(value==0){
|
||||
return '无'
|
||||
}else if(value==1){
|
||||
return '有'
|
||||
}else{
|
||||
return '未知'
|
||||
}
|
||||
}
|
||||
const switchTab = (tab) => {
|
||||
activeTab.value = tab
|
||||
}
|
||||
@@ -141,7 +190,7 @@ onMounted(() => {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 变量定义
|
||||
$primary-color: #ff0000;
|
||||
$primary-color: #8B2316;
|
||||
$text-color: #333333;
|
||||
$text-color-light: #666666;
|
||||
$border-color: #f0f0f0;
|
||||
@@ -152,7 +201,22 @@ $tab-height: 88rpx;
|
||||
$info-item-height: 100rpx;
|
||||
$padding-horizontal: 30rpx;
|
||||
$padding-small: 10rpx;
|
||||
|
||||
.info-content{
|
||||
font-size: 28rpx;
|
||||
color:#999;
|
||||
width: 100%;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 16rpx;
|
||||
padding:20rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.column{
|
||||
flex-direction: column;
|
||||
justify-content: flex-start!important;
|
||||
align-items: flex-start!important;
|
||||
}
|
||||
.patient-info-container {
|
||||
background-color: $background-color;
|
||||
min-height: 100vh;
|
||||
@@ -161,7 +225,21 @@ $padding-small: 10rpx;
|
||||
.status-bar {
|
||||
background-color: $background-color;
|
||||
}
|
||||
|
||||
.otherbox{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 20rpx;
|
||||
.cell{
|
||||
font-size: 24rpx;
|
||||
padding: 10rpx 12rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background-color: #fff;
|
||||
color:#8B2316;
|
||||
border: 1rpx solid #8B2316;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
.nav-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -184,7 +262,7 @@ $padding-small: 10rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.nav-title {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
@@ -199,6 +277,10 @@ $padding-small: 10rpx;
|
||||
}
|
||||
|
||||
.tab-bar {
|
||||
top:calc(var(--status-bar-height) + 44px);
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
background-color: $background-color;
|
||||
border-bottom: 2rpx solid $border-color-light;
|
||||
@@ -232,6 +314,10 @@ $padding-small: 10rpx;
|
||||
}
|
||||
|
||||
.content-area {
|
||||
top:calc(var(--status-bar-height) + 44px + 90rpx);
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
flex: 1;
|
||||
background-color: $background-color;
|
||||
}
|
||||
@@ -244,7 +330,7 @@ $padding-small: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: $info-item-height;
|
||||
min-height: $info-item-height;
|
||||
border-bottom: 2rpx solid $border-color;
|
||||
padding: 0 $padding-small;
|
||||
|
||||
@@ -255,14 +341,17 @@ $padding-small: 10rpx;
|
||||
.info-label {
|
||||
font-size: 32rpx;
|
||||
color: $text-color;
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
flex:1.5;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 32rpx;
|
||||
color: $text-color-light;
|
||||
color:#999;
|
||||
text-align: right;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user