<template>
|
<view class="box">
|
<!-- 顶部固定栏 -->
|
<view class="Fixed">
|
<view class="Fixed_left">
|
<view class="Fixed_left_txt">体检报告</view>
|
</view>
|
</view>
|
|
<!-- 基本健康数据 -->
|
<div class="data">
|
<div class="data_left">
|
<img v-if="customer.cusSex==0" class="data_img" src="https://ltpeis.xaltjdkj.cn:5502/static/4.png" alt="">
|
<img v-else class="data_img" src="https://ltpeis.xaltjdkj.cn:5502/static/5.png" alt="">
|
<div class="data_left_sty1">
|
<span class="data_left_txt1">{{customer.cusName}}</span>
|
<div class="data_left_sty">
|
<span class="data_left_txt2">{{customer.cusBrithday}}</span>
|
</div>
|
<span class="data_left_txt2">{{customer.cusSex == "1" ? "女" :"男" }}</span>
|
</div>
|
</div>
|
<div class="data_right" v-if="jicuList.length >= 1">
|
<span class="data_right_txt1">基本健康数据</span>
|
<div class="data_right_sty">
|
<span class="data_right_txt2">身高(cm)</span>
|
<span class="data_right_txt3">{{jicuList[0].shenggao || ""}}</span>
|
</div>
|
<div class="data_right_sty">
|
<span class="data_right_txt2">体重(kg)</span>
|
<span class="data_right_txt3">{{jicuList[0].tizhong || ""}}</span>
|
</div>
|
<div class="data_right_sty">
|
<span class="data_right_txt4">体重指数</span>
|
<span class="data_right_txt5">{{jicuList[0].tizhongzhishu || ""}}</span>
|
</div>
|
<div class="data_right_sty">
|
<span class="data_right_txt2">收缩压(mmHg)</span>
|
<span class="data_right_txt3">{{jicuList[0].shousuoya || ""}}</span>
|
</div>
|
<div class="data_right_sty">
|
<span class="data_right_txt2">舒张压(mmHg)</span>
|
<span class="data_right_txt3">{{jicuList[0].shuzhangya || ""}}</span>
|
</div>
|
</div>
|
</div>
|
|
<!-- 总检建议 -->
|
<div class="bottom">
|
<uni-collapse class="bottom_sty">
|
<uni-collapse-item title="总检建议" thumb="https://ltpeis.xaltjdkj.cn:5502/static/baogao.png">
|
<view class="content" style="margin-left:15px;">
|
<text class="text">{{checkAdvice}}</text>
|
</view>
|
</uni-collapse-item>
|
</uni-collapse>
|
|
<div class="bottom_sty">
|
<view class="content">
|
<text class="text">检验结果</text>
|
</view>
|
</div>
|
<uni-collapse class="bottom_sty">
|
<uni-collapse-item :title="item.parent" thumb="https://ltpeis.xaltjdkj.cn:5502/static/baogao.png"
|
v-for="(item, index) in alist1" :key="index">
|
<view class="content" v-for="(son, aindex) in item.sons" :key="aindex"
|
style="margin-left:15px; display: flex;">
|
<text style="margin-left: 5px; width: 40%;">{{son.proName}}</text>
|
<view style="margin-left: 5px; width: 40%;">
|
<text>{{son.proResult}}</text>
|
</view>
|
<view style="margin-left: 5px; width: 40%;">
|
<text>{{son.proAdvice}}</text>
|
</view>
|
</view>
|
</uni-collapse-item>
|
</uni-collapse>
|
|
<div class="bottom_sty" v-if="alistss.length">
|
<view class="content">
|
<text class="text">检查</text>
|
</view>
|
</div>
|
<uni-collapse class="bottom_sty">
|
<uni-collapse-item :title="item.parent" thumb="https://ltpeis.xaltjdkj.cn:5502/static/baogao.png"
|
v-for="(item, index) in alistss" :key="index">
|
<view class="content" v-for="(son, aindex) in item.sons" :key="aindex"
|
style="margin-left:15px; display: flex; flex-direction: column;">
|
<text style="margin-left: 5px;">检查所见:{{son.yxbx}}</text>
|
<text style="margin-left: 5px;">检查提示:{{son.yxzd}}</text>
|
<text style="margin-left: 5px;">主检医师:{{son.shysxm}}</text>
|
</view>
|
</uni-collapse-item>
|
</uni-collapse>
|
|
<div class="bottom_sty">
|
<view class="content">
|
<span class="text1">报告阅读说明</span>
|
<div>
|
<span class="text2">1.以上报告结果,仅针对本次检查、检验样本负责。本报告不能用于二次会诊、用药、或其他任何医学判断目的的使用。如您有不适症状,或需要医疗服务,请及时到医院就医并遵医嘱。</span>
|
<span class="text3">查看更多</span>
|
<img class="img" src="https://ltpeis.xaltjdkj.cn:5502/static/youjiantou1.png" alt="">
|
</div>
|
<div>
|
<span class="text2">如需了解更多关于检测方法和检测结果参考值得信息,</span>
|
<span class="text3">请点这里</span>
|
<img class="img" src="https://ltpeis.xaltjdkj.cn:5502/static/youjiantou1.png" alt="">
|
</div>
|
</view>
|
</div>
|
</div>
|
</view>
|
</template>
|
|
<script>
|
import { getShenGaoTiZhong1, getreportData } from "@/api/system/report";
|
|
export default {
|
data() {
|
return {
|
jicuList: [],
|
customer: '',
|
alist1: [],
|
alistss: [],
|
checkAdvice: "",
|
tjNumber: ""
|
};
|
},
|
onLoad(options) {
|
console.log('ReportDetails onLoad options:', options);
|
this.tjNumber = options.tjNum || '';
|
if (this.tjNumber) {
|
this.getOrderDetailList();
|
this.getjichu();
|
} else {
|
uni.showToast({
|
title: '缺少体检码参数',
|
icon: 'none'
|
});
|
}
|
},
|
methods: {
|
getOrderDetailList() {
|
uni.showLoading({ title: '请稍等!' });
|
getreportData({ tjNum: this.tjNumber }).then(res => {
|
uni.hideLoading();
|
this.alist1 = res.data;
|
const uniqueAdvices = [...new Set(res.data.map(item => item.checkAdvice).filter(Boolean))];
|
this.checkAdvice = uniqueAdvices.join("");
|
}).catch(err => {
|
uni.hideLoading();
|
console.error('获取报告数据失败:', err);
|
uni.showToast({
|
title: '获取报告数据失败',
|
icon: 'none'
|
});
|
});
|
},
|
getjichu() {
|
getShenGaoTiZhong1(this.tjNumber).then(res => {
|
if (res.data) {
|
this.jicuList = res.data;
|
// 假设 customer 数据从 res.data 中获取,或者需要单独 API 调用
|
this.customer = res.data[0]?.customer || { cusName: '', cusBrithday: '', cusSex: '' };
|
}
|
}).catch(err => {
|
console.error('获取基础数据失败:', err);
|
uni.showToast({
|
title: '获取基础数据失败',
|
icon: 'none'
|
});
|
});
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
.box {
|
width: 100%;
|
background: linear-gradient(180deg, #fd8b4d 50%, #fdb753);
|
}
|
|
.Fixed {
|
width: 100%;
|
height: 80rpx;
|
background-color: #fd8b4d;
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
position: fixed;
|
top: 0;
|
left: 0;
|
z-index: 1000;
|
}
|
|
.Fixed_left_txt {
|
color: #fff;
|
font-size: 18px;
|
font-weight: 500;
|
}
|
|
.data {
|
display: flex;
|
justify-content: space-around;
|
padding-top: 102rpx;
|
margin-bottom: 40rpx;
|
}
|
|
.data_left {
|
width: 316rpx;
|
height: 700rpx;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
}
|
|
.data_img {
|
width: 316rpx;
|
height: 600rpx;
|
}
|
|
.data_left_sty1 {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
}
|
|
.data_left_txt1 {
|
font-size: 20px;
|
color: #fff;
|
}
|
|
.data_left_sty {
|
width: 180rpx;
|
height: 50rpx;
|
background-color: #f99235;
|
border-radius: 20px;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
}
|
|
.data_left_txt2 {
|
font-size: 14px;
|
color: #fff;
|
}
|
|
.data_right {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
justify-content: space-around;
|
width: 316rpx;
|
height: 700rpx;
|
background-color: #fff;
|
border-radius: 20px;
|
}
|
|
.data_right_txt1 {
|
font-size: 18px;
|
}
|
|
.data_right_sty {
|
width: 316rpx;
|
display: flex;
|
justify-content: space-around;
|
}
|
|
.data_right_txt2 {
|
font-size: 14px;
|
}
|
|
.data_right_txt3 {
|
font-weight: 600;
|
}
|
|
.data_right_txt4 {
|
color: #f23f45;
|
font-size: 14px;
|
}
|
|
.data_right_txt5 {
|
color: #f23f45;
|
font-weight: 600;
|
}
|
|
.bottom {
|
background-color: #ffffff;
|
}
|
|
.content {
|
padding: 8px;
|
}
|
|
.text1 {
|
font-size: 14px;
|
font-weight: 600;
|
}
|
|
.text2 {
|
font-size: 12px;
|
color: #8a8a8a;
|
}
|
|
.text3 {
|
font-size: 12px;
|
color: #1d6ebf;
|
}
|
|
.img {
|
width: 10px;
|
height: 10px;
|
}
|
</style>
|