筛查结果

This commit is contained in:
shidongli 2023-10-11 15:13:02 +08:00
parent 8989cabfb0
commit 5c9c7901c5
5 changed files with 135 additions and 29 deletions

View File

@ -0,0 +1,8 @@
import request from "../../request.js"
// 获取项目
export function projectTypedata(projectType) {
return request({
url: `/nurseApplet/screening/project/list?projectType=${projectType}`,
method: 'GET'
})
}

View File

@ -1,8 +1,8 @@
import request from "../../request.js"
// 获取筛查结果列表
export function screeningResultList(patientId) {
export function screeningResultList(patientId,pageNum,pageSize) {
return request({
url: `/nurseApplet/screening/record/record?patientId=${patientId}`,
url: `/nurseApplet/screening/record/record?patientId=${patientId}&pageNum=${pageNum}&pageSize=${pageSize}`,
method: 'GET'
})
}

View File

@ -55,7 +55,7 @@
//
result(item){
uni.navigateTo({
url: `/pagesB/screeningResult/screeningResult?projectId=${item}`
url: `/pagesB/screeningResult/screeningResult?registerId=${item}`
});
console.log(item)

View File

@ -4,7 +4,7 @@
<!-- <view>筛查日期{{ 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>筛查医院{{ item.deptName }}</view>
<view>筛查医院{{ item.hospitalName }}</view>
<view>责任医生{{ item.doctorName}}</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)">
@ -24,26 +24,46 @@
screeningResultData:[],
registerId:"",
patientId:"",
pageNum:1,
pageSize:10,
total: 0,
// qure:{
// }
};
},
onLoad(e) {
// con
if(e) {
this.patientId = e.registerId
this.registerId = e.registerId
}
this.getScreeningResultList()
},
methods:{
//
getScreeningResultList() {
screeningResultList(this.patientId).then(res => {
screeningResultList(this.registerId,this.pageNum,this.pageSize).then(res => {
console.log(res);
this.screeningResultData = res.data.rows
this.screeningResultData = res.rows
this.total=res.total
})
},
onReachBottom() { //
if (this.screeningResultData.length >= this.total) {} else {
this.pageNum++;
screeningResultList(this.registerId,this.pageNum,this.pageSize).then(res => {
console.log(res);
res.rows.forEach(e => {
this.screeningResultData.push(e)
})
this.total=res.total
})
}
},
//
goToScreeningResult(item) {
uni.navigateTo({
url:`../screeningResult/screeningResult?screeningId=${item.screeningId}&registerId=${this.registerId}&type=1`
url:`/pagesB/screeningResult/screeningResult?screeningId=${item.screeningId}&registerId=${this.registerId}&type=1`
})
}
}

View File

@ -9,11 +9,37 @@
<view style="color: #2968F1;" @click="goToScreeningRecord" v-show="type != '1'">筛查记录</view>
</view>
<view class="tabbarCon">
<view style="text-align: center;color: #26A888;">
{{screeningResultData.projectName}}
</view>
<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 class="" v-if="screeningResultData.fileType=='docx'||screeningResultData.fileType=='doc'">
<view class="btn" @click="lookpath" v-if="screeningResultData.attachment">
查看报告
</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 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)">
@ -28,7 +54,7 @@
</view>
<view v-else style="margin: 10px auto; ">
<u-empty text="暂无照片" mode="data"></u-empty>
</view>
</view> -->
</view>
</view>
@ -116,7 +142,7 @@
lastScreeningResult,
screeningResultDetail
} from '@/api/pagesB/screeningResult/screeningResult.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
@ -145,32 +171,82 @@
fileImgSrc: '',
fileImgSrc1: '',
fileImgSrc2: '',
registerId:""
registerId: "",
baseurl:'',
};
},
onLoad(e) {
console.log(e);
// this.type = e.type
if(e) {
this.registerId=e.projectId
// this.patientld=uni.getStorageSync('patientId);
// onLoad(e) {
// console.log(e);
// // this.type = e.type
// if(e) {
// this.registerId=e.projectId
// // this.patientld=uni.getStorageSync('patientId);
this.patientld=52;
this.getLastScreeningResult()
// this.registerId= e.registerId
// this.patientld=52;
// this.getLastScreeningResult()
// // 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.patientld= uni.getStorageSync('patientld');
// this.patientld=52;
// this.getLastScreeningResult()
// }
// },
onShow() {
this.baseurl=baseurl
console.log(baseurl)
},
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
this.items.push(res.data.projectName)
console.log(this.items, '111')
this.screeningResultData = res.data
console.log(this.screeningResultData, '000000')
})
} else {
this.patientld = 52;
// this.patientld= uni.getStorageSync('patientld');
// this.patientld=52;
// this.getLastScreeningResult()
this.getLastScreeningResult()
}
},
methods: {
lookpath() {
var that = this
var url = that.baseurl + `/nurseApplet/screening/record/fileview/${that.screeningResultData.screeningId}`
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)
}
});
}
})
},
onClickItem(e) {
if (this.Inv != e.currentIndex) {
this.Inv = e.currentIndex;
@ -179,6 +255,7 @@
}
},
isResult(inv) {
console.log(this.screeningResultData.projectRecordList, '555')
for (let item in this.screeningResultData.projectRecordList) {
if (this.screeningResultData.projectRecordList[item].projectName == (inv == 0 ? '糖尿病-眼底病变筛查' : (inv ==
1 ?
@ -217,9 +294,10 @@
//
getLastScreeningResult() {
lastScreeningResult(this.patientld, this.registerId).then(res => {
// console.log(res);
this.items.push(res.data.data.projectName)
this.screeningResultData = res.data.data
this.items.push(res.data.projectName)
this.screeningResultData = res.data
this.isResult(this.Inv)
})
},