xinelu-applet-ui/pagesB/screeningResult/screeningResult.vue
2023-10-08 14:48:39 +08:00

283 lines
8.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="screeningResult">
<view class="conTop">
<view style="display: flex;align-items: center;">
<view style="background-color: #4DC2A8;height: 20px;width: 3px;margin-right: 5px;"></view>
<view style="color: #7C7C7C;">
筛查日期{{ screeningResultData.screeningDate ? screeningResultData.screeningDate : '无' }}</view>
</view>
<view style="color: #2968F1;" @click="goToScreeningRecord" v-show="type != '1'">筛查记录</view>
</view>
<view class="tabbarCon">
<uni-segmented-control :current="Inv" :values="items" @clickItem="onClickItem" styleType="text"
activeColor="#4AC4AB"></uni-segmented-control>
<view class="content">
<view v-show="Inv == 0">
<view style="text-align: center;">
<view v-if="screeningResultData.attachment && screeningResultData.attachment != '找不到指定文件!'">
<view style="display: flex;justify-content: space-around;">
<view style="width: 49%;" @click="xxbClick(screeningResultData.attachment)">
<image style="width: 100%;height: 100px;"
:src="'data:image/jpeg;base64' + screeningResultData.attachment"></image>
</view>
<view style="width: 49%;" @click="picClick1(screeningResultData.attachmentTwo)">
<image style="width: 100%;height: 100px;"
:src="'data:image/jpeg;base64' + screeningResultData.attachmentTwo"></image>
</view>
</view>
</view>
<view v-else style="margin: 10px auto; ">
<u-empty text="暂无照片" mode="data"></u-empty>
</view>
</view>
</view>
<!-- <view v-show="Inv == 0">
<view style="text-align: center;">
<view
v-if="screeningResultData.projectRecordList[0].attachment && screeningResultData.projectRecordList[0].attachment != '找不到指定文件!'">
<view style="display: flex;justify-content: space-around;">
<view style="width: 49%;" @click="xxbClick(screeningResultData.projectRecordList[0].attachment)">
<image style="width: 100%;height: 100px;"
:src="'data:image/jpeg;base64' + screeningResultData.projectRecordList[0].attachment"></image>
</view>
<view style="width: 49%;" @click="picClick1(screeningResultData.projectRecordList[0].attachmentTwo)">
<image style="width: 100%;height: 100px;"
:src="'data:image/jpeg;base64' + screeningResultData.projectRecordList[0].attachmentTwo"></image>
</view>
</view>
</view>
<view v-else style="margin: 10px auto; ">
<u-empty text="暂无照片" mode="data"></u-empty>
</view>
</view>
</view> -->
<view v-show="Inv == 1">
<view>
<view
v-if="screeningResultData.projectRecordList[1].attachment && screeningResultData.projectRecordList[1].attachment != '找不到指定文件!'">
<view style="width: 50%;"
@click="xxbClick(screeningResultData.projectRecordList[1].attachment)">
<image style="width: 100%;height: 100px;"
:src="'data:image/jpeg;base64' + screeningResultData.projectRecordList[1].attachment">
</image>
</view>
</view>
<view v-else style="margin: 10px;">
<u-empty text="暂无照片" mode="data"></u-empty>
</view>
</view>
</view>
<view v-show="Inv == 2">
<view style="text-align: center;">
<!-- <u-grid :border="false" col="3">
<u-grid-item v-for="(baseListItem,baseListIndex) in baseList" :key="baseListIndex">
<view style="width: 100%;">
<image style="width: 90%;" :src="baseListItem.src" mode="widthFix"></image>
</view>
</u-grid-item>
</u-grid> -->
</view>
<!-- <view>
<view style="font-size: 32rpx;font-weight: bold;color: #323232;">诊断结果</view>
基底动脉血流速度减低,左右大脑中动脉血流速度加快
</view> -->
</view>
</view>
</view>
<u-popup :show="show" @close="close" @open="open" mode="center">
<view style="text-align: center;">
<image :src="'data:image/jpeg;base64' + fileImgSrc" mode="widthFix"></image>
</view>
</u-popup>
<u-popup :show="show1" @close="close1" mode="center">
<view style="text-align: center;">
<image :src="'data:image/jpeg;base64' + fileImgSrc1" mode="widthFix"></image>
</view>
</u-popup>
<u-popup :show="show2" @close="close2" mode="center">
<view style="text-align: center;">
<image :src="'data:image/jpeg;base64' + fileImgSrc2" mode="widthFix"></image>
</view>
</u-popup>
<view style="margin: 10px;">
<view style="font-size: 32rpx;font-weight: bold;color: #323232;">诊断结果</view>
<view style="background-color: #fff;margin-top:10px;padding: 10px;">
<!-- {{ myResultInfo ? myResultInfo : '无' }} -->
{{ screeningResultData.diagnosticResult ? screeningResultData.diagnosticResult : '无' }}
</view>
</view>
</view>
</view>
</template>
<script>
import {
lastScreeningResult,
screeningResultDetail
} from '@/api/pagesB/screeningResult/screeningResult.js'
export default {
data() {
return {
myResultInfo: '',
show: false,
show1: false,
show2: false,
Inv: 0,
// items: ['眼底病变筛查', '血小板功能筛查', '动脉粥样筛查'],
//'糖尿病眼底病变筛查', '糖尿病血小板功能筛查',
items: [],
baseList: [{
src: '../../static/ydPic.png'
}, {
src: '../../static/xxbPic.png'
}, {
src: '../../static/ydPic.png'
}, {
src: '../../static/ydPic.png'
}],
baseList1: [{
src: '../../static/xxbPic.png'
}],
screeningResultData: '',
type: '',
fileImgSrc: '',
fileImgSrc1: '',
fileImgSrc2: '',
registerId:""
};
},
onLoad(e) {
// console.log(e);
this.type = e.type
if(e) {
this.registerId= e.registerId
}
if (e.screeningId) {
screeningResultDetail(e.screeningId).then(res => {
this.items.push(res.data.data.projectName)
this.screeningResultData = res.data.data
})
} else {
this.getLastScreeningResult()
}
},
methods: {
onClickItem(e) {
if (this.Inv != e.currentIndex) {
this.Inv = e.currentIndex;
this.getLastScreeningResult()
// this.isResult(this.Inv)
}
},
isResult(inv) {
for (let item in this.screeningResultData.projectRecordList) {
if (this.screeningResultData.projectRecordList[item].projectName == (inv == 0 ? '糖尿病-眼底病变筛查' : (inv ==
1 ?
'糖尿病-血小板筛查' : ''))) {
this.myResultInfo = this.screeningResultData.projectRecordList[item].diagnosticResult
return
}
}
},
picClick(e) {
this.show = true
this.fileImgSrc = e
},
picClick1(e) {
this.show1 = true
this.fileImgSrc1 = e
},
xxbClick(e) {
this.show2 = true
this.fileImgSrc2 = e
},
close1() {
this.show1 = false
// console.log('close');
},
close2() {
this.show2 = false
},
open() {
// console.log('open');
},
close() {
this.show = false
// console.log('close');
},
// 获取最新的筛查结果
getLastScreeningResult() {
lastScreeningResult(this.registerId).then(res => {
// console.log(res);
this.items.push(res.data.data.projectName)
this.screeningResultData = res.data.data
this.isResult(this.Inv)
})
},
changeTab(Inv) {
that.navIdx = Inv;
},
goToScreeningRecord() {
uni.navigateTo({
url: `../screeningRecord/screeningRecord?registerId=${this.registerId}`
})
}
}
}
</script>
<style lang="scss">
.screeningResult {
width: 96%;
margin: 0 auto;
.conTop {
margin-top: 10px;
display: flex;
background-color: #F6F6F6;
justify-content: space-between;
align-items: center;
}
}
/deep/ .segmented-control__text {
font-size: 16px !important;
}
.tabbarCon {
margin-top: 10px;
background-color: #fff;
}
.content {
padding: 30rpx 25rpx;
}
.inv-h-w {
background-color: #FFFFFF;
height: 100upx;
display: flex;
margin-bottom: 40rpx
}
.inv-h {
font-size: 26rpx;
flex: 1;
text-align: center;
color: #747474;
height: 100upx;
line-height: 100upx;
position: relative;
}
.inv-h-se {
font-family: PingFang SC;
font-weight: bold;
font-size: 28rpx;
color: #393939;
border-bottom: 3px solid #4DC2A8;
}
</style>