This commit is contained in:
2023-11-13 16:46:40 +08:00
parent 254664bdbb
commit d8623ea732
2 changed files with 79 additions and 107 deletions

View File

@ -1,90 +1,83 @@
<template> <template>
<view class="screeningRecord" v-if="screeningResultData.length>0"> <view class="screeningRecord" v-if="screeningResultData.length>0">
<view class="screeningRecordItem" v-for="(item,index) in screeningResultData" :key="index"> <view class="screeningRecordItem" v-for="(item,index) in screeningResultData" :key="index">
<!-- <view>筛查日期{{ item.screeningDate }}</view> --> <!-- <view>筛查日期{{ item.screeningDate }}</view> -->
<view style="font-size: 16px;font-weight: 900;">{{ item.screeningDate }}</view> <view style="font-size: 16px;font-weight: 900;">{{ item.screeningDate }}</view>
<view style="border-bottom: 1px solid #EDEDED;margin: 8px 0;"></view> <view style="border-bottom: 1px solid #EDEDED;margin: 8px 0;"></view>
<view>筛查项目{{ item.projectName }}</view> <view>筛查项目{{ item.projectName }}</view>
<view>筛查医院{{ item.hospitalName }}</view> <view>筛查医院{{ item.hospitalName }}</view>
<view>责任医生{{ item.doctorName}}</view> <view>责任医生{{ item.doctorName}}</view>
<view style="border-bottom: 1px solid #EDEDED;margin: 10px 0;"></view> <view style="border-bottom: 1px solid #EDEDED;margin: 10px 0;"></view>
<view style="color: #346CF2;text-align: center;font-size: 30rpx;" @click="goToScreeningResult(item)"> <view style="color: #346CF2;text-align: center;font-size: 30rpx;" @click="goToScreeningResult(item)">
<span>查看筛查结果</span> <span>查看筛查结果</span>
</view> </view>
</view> </view>
</view> </view>
<view v-else style="margin-top: 50%;"> <view v-else style="margin-top: 50%;">
<u-empty mode="order" icon-size='220' text="暂无筛查记录"></u-empty> <u-empty mode="order" icon-size='220' text="暂无筛查记录"></u-empty>
</view> </view>
</template> </template>
<script> <script>
// import { screeningResultList } from "@/service/api/jsApi.js" import {
import { screeningResultList } from '@/api/pagesB/screeningRecord/screeningRecord.js' screeningResultList
export default { } from '@/api/pagesB/screeningRecord/screeningRecord.js'
data() { export default {
return { data() {
screeningResultData:[], return {
registerId:"", screeningResultData: [],
patientId:"", registerId: "",
pageNum:1, patientId: "",
pageSize:10, pageNum: 1,
total: 0, pageSize: 10,
// qure:{ total: 0,
};
// } },
}; onLoad(e) {
}, this.registerId = uni.getStorageSync('userinfo').id
onLoad(e) { this.getScreeningResultList()
// con },
if(e) { methods: {
this.registerId = e.registerId //
} getScreeningResultList() {
this.getScreeningResultList() screeningResultList(this.registerId, this.pageNum, this.pageSize).then(res => {
}, this.screeningResultData = res.rows
methods:{ this.total = res.total
// })
getScreeningResultList() { },
screeningResultList(this.registerId,this.pageNum,this.pageSize).then(res => { //
console.log(res); goToScreeningResult(item) {
this.screeningResultData = res.rows uni.navigateTo({
this.total=res.total url: `/pagesB/screeningResult/screeningResult?screeningId=${item.screeningId}&registerId=${this.registerId}&type=1`
}) })
}, }
onReachBottom() { // },
if (this.screeningResultData.length >= this.total) {} else { onReachBottom() { //
this.pageNum++; if (this.screeningResultData.length >= this.total) {} else {
screeningResultList(this.registerId,this.pageNum,this.pageSize).then(res => { this.pageNum++;
console.log(res); screeningResultList(this.registerId, this.pageNum, this.pageSize).then(res => {
res.rows.forEach(e => { res.rows.forEach(e => {
this.screeningResultData.push(e) this.screeningResultData.push(e)
}) })
this.total=res.total this.total = res.total
}) })
} }
}, },
// }
goToScreeningResult(item) {
uni.navigateTo({
url:`/pagesB/screeningResult/screeningResult?screeningId=${item.screeningId}&registerId=${this.registerId}&type=1`
})
}
}
}
</script> </script>
<style lang="scss"> <style lang="scss">
.screeningRecord { .screeningRecord {
width: 94%; width: 94%;
margin: 10px auto; margin: 10px auto;
.screeningRecordItem { .screeningRecordItem {
margin-top: 10px; margin-top: 10px;
padding: 10px 20px; padding: 10px 20px;
background-color: #fff; background-color: #fff;
line-height: 30px; line-height: 30px;
border-radius: 10px; border-radius: 10px;
} }
} }
</style> </style>

View File

@ -142,11 +142,8 @@
}, },
onShow() { onShow() {
this.baseurl = baseurl this.baseurl = baseurl
console.log(baseurl)
}, },
onLoad(e) { onLoad(e) {
console.log(e);
this.type = e.type this.type = e.type
if (e) { if (e) {
this.registerId = e.registerId this.registerId = e.registerId
@ -155,12 +152,9 @@
if (e.screeningId) { if (e.screeningId) {
screeningResultDetail(e.screeningId).then(res => { screeningResultDetail(e.screeningId).then(res => {
this.items.push(res.data.projectName) this.items.push(res.data.projectName)
console.log(this.items, '111')
this.screeningResultData = res.data this.screeningResultData = res.data
console.log(this.screeningResultData, '000000')
}) })
} else { } else {
// this.patientld = 52;
this.userinfo = uni.getStorageSync('userinfo'); this.userinfo = uni.getStorageSync('userinfo');
this.patientld = this.userinfo.id; this.patientld = this.userinfo.id;
this.getLastScreeningResult() this.getLastScreeningResult()
@ -171,7 +165,6 @@
var that = this var that = this
var url = that.baseurl + var url = that.baseurl +
`/nurseApplet/screening/record/fileview?filePath=${that.screeningResultData.attachment}` `/nurseApplet/screening/record/fileview?filePath=${that.screeningResultData.attachment}`
console.log(url, '1')
uni.downloadFile({ uni.downloadFile({
url: url, url: url,
responseType: 'blob', responseType: 'blob',
@ -181,12 +174,8 @@
filePath: filePath, filePath: filePath,
fileType: that.screeningResultData.fileType.toLowerCase(), fileType: that.screeningResultData.fileType.toLowerCase(),
showMenu: true, showMenu: true,
success: function(respp) { success: function(respp) {},
console.log(respp) fail(err) {}
},
fail(err) {
console.log(err)
}
}); });
} }
}) })
@ -195,11 +184,9 @@
if (this.Inv != e.currentIndex) { if (this.Inv != e.currentIndex) {
this.Inv = e.currentIndex; this.Inv = e.currentIndex;
this.getLastScreeningResult() this.getLastScreeningResult()
// this.isResult(this.Inv)
} }
}, },
isResult(inv) { isResult(inv) {
console.log(this.screeningResultData.projectRecordList, '555')
for (let item in this.screeningResultData.projectRecordList) { for (let item in this.screeningResultData.projectRecordList) {
if (this.screeningResultData.projectRecordList[item].projectName == (inv == 0 ? '糖尿病-眼底病变筛查' : (inv == if (this.screeningResultData.projectRecordList[item].projectName == (inv == 0 ? '糖尿病-眼底病变筛查' : (inv ==
1 ? 1 ?
@ -223,27 +210,19 @@
}, },
close1() { close1() {
this.show1 = false this.show1 = false
// console.log('close');
}, },
close2() { close2() {
this.show2 = false this.show2 = false
}, },
open() { open() {},
// console.log('open');
},
close() { close() {
this.show = false this.show = false
// console.log('close');
}, },
// //
getLastScreeningResult() { getLastScreeningResult() {
console.log(this.registerId, '999')
lastScreeningResult(this.patientld, this.projectId).then(res => { lastScreeningResult(this.patientld, this.projectId).then(res => {
if (res.code == 200 && res.data.projectName) {
// console.log(res);
if (res.data.projectName) {
this.items.push(res.data.projectName) this.items.push(res.data.projectName)
} }
this.screeningResultData = res.data this.screeningResultData = res.data
this.isResult(this.Inv) this.isResult(this.Inv)