xinelu-applet-ui/pagesC/Screeningdetails/Screeningdetails.vue

206 lines
5.1 KiB
Vue
Raw Normal View History

2023-09-28 10:11:53 +08:00
<template>
<view class="app">
<view class="content">
<view class="item">
筛查项目
2023-10-19 13:26:38 +08:00
<span>{{screeningResultData.projectName}}</span>
2023-09-28 10:11:53 +08:00
</view>
<view class="item">
筛查时间
2023-10-19 13:26:38 +08:00
<span>{{ screeningResultData.screeningDate ? screeningResultData.screeningDate : '无' }}</span>
2023-09-28 10:11:53 +08:00
</view>
<view class="item">
筛查机构
2024-02-05 17:03:33 +08:00
<span v-if="screeningResultData.hospitalName">{{screeningResultData.hospitalName}}</span>
2023-09-28 10:11:53 +08:00
</view>
<view class="item">
筛查医生
2024-02-05 17:03:33 +08:00
<span v-if="screeningResultData.doctorName">{{screeningResultData.doctorName}}</span>
2023-09-28 10:11:53 +08:00
</view>
<view class="itemend">
筛查结果:
</view>
<view class="image">
2023-10-19 13:26:38 +08:00
<view style="text-align: center;">
<view class="" v-if="screeningResultData.fileType=='docx'||screeningResultData.fileType=='doc'">
2023-11-15 12:02:06 +08:00
<view class="btn" style="color: #346CF2;" @click="lookpath" v-if="screeningResultData.attachment">
2023-10-19 13:26:38 +08:00
查看报告
</view>
</view>
<view class="" v-else>
<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>
<view v-else style="margin: 10px auto; ">
<u-empty text="暂无照片" mode="data"></u-empty>
</view>
</view>
</view>
<!-- <view class="imageitem">
2023-12-11 16:16:39 +08:00
<image src="@/static/pagesB/Behave.png" mode=""></image>
2023-09-28 10:11:53 +08:00
</view>
<view class="imageitem">
2023-12-11 16:16:39 +08:00
<image src="@/static/pagesB/Behave.png" mode=""></image>
2023-09-28 10:11:53 +08:00
</view>
<view class="imageitem">
2023-12-11 16:16:39 +08:00
<image src="@/static/pagesB/Behave.png" mode=""></image>
2023-10-19 13:26:38 +08:00
</view> -->
2023-11-09 15:41:55 +08:00
<view class="item">
诊断结果
2023-11-13 16:26:35 +08:00
<span v-if="screeningResultData.diagnosticResult">{{screeningResultData.diagnosticResult}}</span>
2023-11-09 15:41:55 +08:00
</view>
2023-09-28 10:11:53 +08:00
</view>
</view>
</template>
<script>
2023-10-19 13:26:38 +08:00
import {
lastScreeningResult,
screeningResultDetail
} from '@/api/pagesB/screeningResult/screeningResult.js'
import baseurl from '@/api/baseurl.js'
2023-09-28 10:11:53 +08:00
export default {
data() {
2023-10-19 13:26:38 +08:00
return {
screeningResultData: {},
projectId: '',
2024-02-05 17:03:33 +08:00
identity: '',
2023-10-19 13:26:38 +08:00
userinfo: {},
baseurl: '',
};
},
onLoad(e) {
this.userinfo = uni.getStorageSync('userinfo');
2024-02-05 17:03:33 +08:00
this.identity = this.userinfo.cardNo;
2023-10-19 13:26:38 +08:00
this.projectId = e.projectId
this.getLastScreeningResult()
console.log(e)
},
onShow() {
this.baseurl = baseurl
2023-09-28 10:11:53 +08:00
},
methods: {
2023-10-19 13:26:38 +08:00
// 获取最新的筛查结果
getLastScreeningResult() {
2024-02-05 17:03:33 +08:00
lastScreeningResult(this.identity, this.projectId).then(res => {
2023-10-19 13:26:38 +08:00
this.screeningResultData = res.data
})
},
// 查看报告
lookpath() {
var that = this
var url = that.baseurl +
`/nurseApplet/screening/record/fileview?filePath=${that.screeningResultData.attachment}`
// console.log(url, '1')
uni.downloadFile({
url: url,
responseType: 'blob',
success: function(resp) {
var filePath = resp.tempFilePath;
uni.openDocument({
filePath: filePath,
fileType: that.screeningResultData.fileType.toLowerCase(),
showMenu: true,
success: function(respp) {
console.log(respp)
},
fail(err) {
console.log(err)
}
});
}
})
},
2023-09-28 10:11:53 +08:00
goapponint() {
uni.navigateTo({
url: '/pagesC/Screeningdetails/Screeningdetails'
});
},
},
}
</script>
<style lang="scss">
.app {
height: 100vh;
background-color: #F7F5F5;
padding: 30rpx 0 0 0;
2023-10-07 10:51:01 +08:00
overflow: scroll;
2023-09-28 10:11:53 +08:00
.content {
background-color: #fff;
position: relative;
width: 95%;
height: 100%;
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border-radius: 5rpx;
margin: 15rpx auto;
.word {
width: 90%;
margin: 10rpx auto;
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #868585;
line-height: 38rpx;
text-indent: 35rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 5;
line-clamp: 5;
-webkit-box-orient: vertical;
text-align: justify;
}
.itemend {
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
line-height: 38rpx;
padding: 50rpx 30rpx 0 30rpx;
}
.image {
2023-10-19 13:26:38 +08:00
// display: flex;
// justify-content: space-around;
2023-09-28 10:11:53 +08:00
padding-top: 20rpx;
}
.imageitem {
image {
width: 195rpx;
height: 276rpx;
}
}
.item {
padding: 30rpx 30rpx 0 30rpx;
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #333333;
line-height: 38rpx;
span {
color: #868585;
}
}
}
}
2023-11-15 12:02:06 +08:00
</style>