This commit is contained in:
2023-11-09 15:41:55 +08:00
parent 34f3c094b8
commit 9e8d93e758
5 changed files with 229 additions and 25 deletions

View File

@ -0,0 +1,40 @@
var request = function(config) {
return new Promise((resolve, rejected) => {
if (config.url != '/nurseApplet/chatRecord/updateReadStatus' && config.url !=
"/nurseApplet/chatRecord/sendMessage" && config.url !=
`/applet/sign/apply/checkSignApply/` + uni.getStorageSync('userinfo').cardNo) {
uni.showLoading({
title: ''
});
}
uni.request({
url: config.url,
data: config.data,
method: config.method,
timeout: 60000,
header: config.header,
success(res) {
uni.hideLoading();
resolve(res.data)
},
fail(err) {
uni.hideLoading();
rejected(err)
}
})
})
}
//获取dy报告list
export function dyrecord(identity) {
return request({
url: `http://8.131.93.145:54098/fd/sh05/record/${identity}`,
method: 'get',
})
}
//获取dz报告list
export function dzrecord(identity) {
return request({
url: `http://112.6.122.71:8009/fd/sh05/record/${identity}`,
method: 'get',
})
}

View File

@ -621,6 +621,14 @@
"navigationBarTitleText": "设备列表",
"enablePullDownRefresh": false
}
},
{
"path" : "testreport/testreport",
"style" :
{
"navigationBarTitleText" : "检测报告",
"enablePullDownRefresh" : false
}
}
]
}, {

View File

@ -9,14 +9,9 @@
<view style="color: #2968F1;" @click="goToScreeningRecord" v-show="type != '1'">筛查记录</view>
</view>
<view class="tabbarCon">
<view style="text-align: center;
color: #26A888;
border-bottom: 1rpx solid #26A888;
padding-top: 17rpx;
position: relative;
left: 50%;
transform: translate(-50%);
display: inline-block;" v-if="screeningResultData.projectName">
<view
style="text-align: center;color: #26A888;border-bottom: 1rpx solid #26A888;padding-top: 17rpx;position: relative;left: 50%;transform: translate(-50%);display: inline-block;"
v-if="screeningResultData.projectName">
{{screeningResultData.projectName}}
</view>
<uni-segmented-control :current="Inv" :values="items" @clickItem="onClickItem" styleType="text"
@ -48,7 +43,6 @@
</view>
</view>
</view>
<view v-show="Inv == 1">
<view>
<view
@ -175,7 +169,8 @@
methods: {
lookpath() {
var that = this
var url = that.baseurl + `/nurseApplet/screening/record/fileview?filePath=${that.screeningResultData.attachment}`
var url = that.baseurl +
`/nurseApplet/screening/record/fileview?filePath=${that.screeningResultData.attachment}`
console.log(url, '1')
uni.downloadFile({
url: url,

View File

@ -13,14 +13,12 @@
筛查机构
<span>{{screeningResultData.hospitalName}}</span>
</view>
<view class="item">
筛查医生
<span>{{screeningResultData.doctorName}}</span>
</view>
<view class="itemend">
筛查结果:
</view>
<view class="image">
<view style="text-align: center;">
@ -57,14 +55,11 @@
<view class="imageitem">
<image src="../../static/pagesB/Behave.png" mode=""></image>
</view> -->
<view class="item">
诊断结果
<span>{{screeningResultData.diagnosticResult}}</span>
</view>
<view class="item">
诊断结果
<span>{{screeningResultData.diagnosticResult}}</span>
</view>
</view>
</view>
</view>
</template>
@ -90,21 +85,15 @@
this.projectId = e.projectId
this.getLastScreeningResult()
console.log(e)
},
onShow() {
this.baseurl = baseurl
},
methods: {
//
getLastScreeningResult() {
lastScreeningResult(this.patientld, this.projectId).then(res => {
this.screeningResultData = res.data
})
},
//

View File

@ -0,0 +1,172 @@
<template>
<view class="app">
<view class="item" v-for="item in list">
<view class="time">
{{item.date}}
</view>
<view class="name">
{{item.reportId}}
</view>
<view class="btn" v-if="item.existReport==1" @tap='lookReport(item)'>
<span>查看报告</span>
</view>
<view class="btn2" v-if="item.existReport==2">
<span>暂无报告</span>
</view>
</view>
</view>
</template>
<script>
import {
dyrecord,
dzrecord,
dyreport,
dzreport
} from '@/api/pagesC/testreport/index.js'
export default {
data() {
return {
list: [],
region: undefined,
};
},
onLoad() {
this.region = uni.getStorageSync('region')
if (this.region == 1) {
dzrecord('370785199502153071').then(res => {
res.data.forEach(e => {
e.existReport = Number(e.existReport)
})
this.list = res.data
})
} else if (this.region == 2) {
dyrecord('370785199502153071').then(res => {
res.data.forEach(e => {
e.existReport = Number(e.existReport)
})
this.list = res.data
})
}
},
methods: {
// 驿http://218.58.213.15:8009/fd/sh05/report/view/{reportId}
// 驿http://112.6.122.71:8009/fd/sh05/report/view/{reportId}
lookReport(item) {
if (this.region == 1) {
uni.downloadFile({
url: `http://112.6.122.71:8009/fd/sh05/report/download/${item.reportId}`,
success: function(res) {
console.log(res)
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
fileType: 'pdf',
success: function(resp) {
console.log(resp)
console.log('打开文档成功');
}
});
}
});
} else if (this.region == 2) {
uni.downloadFile({
url: `http://8.131.93.145:54098/fd/sh05/report/download/${item.reportId}`,
success: function(res) {
console.log(res)
var filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
fileType: 'pdf',
showMenu: true,
success: function(resp) {
console.log(resp)
console.log('打开文档成功');
}
});
}
});
}
},
}
}
</script>
<style lang="scss">
.app {
.item {
height: 200rpx;
width: 96%;
background-color: #fff;
border-radius: 5rpx;
margin: 20rpx auto 0;
position: relative;
overflow: hidden;
.btn2 {
/* 左上角飘带 */
background-color: #A4A0A0;
/* 左上角飘带的背景颜色 */
overflow: hidden;
white-space: nowrap;
/* 文字不换行*/
position: absolute;
/* 绝对定位 */
right: -60rpx;
top: 20rpx;
transform: rotate(45deg);
/* 旋转45°*/
box-shadow: 0 0 10rpx #888;
/* 飘带的阴影*/
}
.btn2 span {
border: 1rpx solid #A4A0A0;
color: #fff;
display: block;
font: bold 100% 'Helvetica Neue', Helvetica, Arial, sans-serif;
margin: 1rpx 0;
padding: 10rpx 50rpx;
text-align: center;
text-shadow: 0 0 5rpx #444;
}
.btn {
/* 左上角飘带 */
background-color: #FFA115;
/* 左上角飘带的背景颜色 */
overflow: hidden;
white-space: nowrap;
/* 文字不换行*/
position: absolute;
/* 绝对定位 */
right: -60rpx;
top: 20rpx;
transform: rotate(45deg);
/* 旋转45°*/
box-shadow: 0 0 10rpx #888;
/* 飘带的阴影*/
}
.btn span {
border: 1rpx solid #FFA115;
color: #fff;
display: block;
font: bold 100% 'Helvetica Neue', Helvetica, Arial, sans-serif;
margin: 1rpx 0;
padding: 10rpx 50rpx;
text-align: center;
text-shadow: 0 0 5rpx #444;
}
.name {
margin: 20rpx 0 0 20rpx;
}
.time {
margin: 20rpx 0 0 20rpx;
}
}
}
</style>