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

@ -20,57 +20,50 @@
</template> </template>
<script> <script>
// import { screeningResultList } from "@/service/api/jsApi.js" import {
import { screeningResultList } from '@/api/pagesB/screeningRecord/screeningRecord.js' screeningResultList
} from '@/api/pagesB/screeningRecord/screeningRecord.js'
export default { export default {
data() { data() {
return { return {
screeningResultData:[], screeningResultData: [],
registerId:"", registerId: "",
patientId:"", patientId: "",
pageNum:1, pageNum: 1,
pageSize:10, pageSize: 10,
total: 0, total: 0,
// qure:{
// }
}; };
}, },
onLoad(e) { onLoad(e) {
// con this.registerId = uni.getStorageSync('userinfo').id
if(e) {
this.registerId = e.registerId
}
this.getScreeningResultList() this.getScreeningResultList()
}, },
methods:{ methods: {
// //
getScreeningResultList() { getScreeningResultList() {
screeningResultList(this.registerId,this.pageNum,this.pageSize).then(res => { screeningResultList(this.registerId, this.pageNum, this.pageSize).then(res => {
console.log(res);
this.screeningResultData = res.rows this.screeningResultData = res.rows
this.total=res.total 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) { goToScreeningResult(item) {
uni.navigateTo({ uni.navigateTo({
url:`/pagesB/screeningResult/screeningResult?screeningId=${item.screeningId}&registerId=${this.registerId}&type=1` url: `/pagesB/screeningResult/screeningResult?screeningId=${item.screeningId}&registerId=${this.registerId}&type=1`
}) })
} }
},
onReachBottom() { //
if (this.screeningResultData.length >= this.total) {} else {
this.pageNum++;
screeningResultList(this.registerId, this.pageNum, this.pageSize).then(res => {
res.rows.forEach(e => {
this.screeningResultData.push(e)
})
this.total = res.total
})
} }
},
} }
</script> </script>

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)