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>
<script>
// import { screeningResultList } from "@/service/api/jsApi.js"
import { screeningResultList } from '@/api/pagesB/screeningRecord/screeningRecord.js'
import {
screeningResultList
} from '@/api/pagesB/screeningRecord/screeningRecord.js'
export default {
data() {
return {
screeningResultData:[],
registerId:"",
patientId:"",
pageNum:1,
pageSize:10,
screeningResultData: [],
registerId: "",
patientId: "",
pageNum: 1,
pageSize: 10,
total: 0,
// qure:{
// }
};
},
onLoad(e) {
// con
if(e) {
this.registerId = e.registerId
}
this.registerId = uni.getStorageSync('userinfo').id
this.getScreeningResultList()
},
methods:{
methods: {
//
getScreeningResultList() {
screeningResultList(this.registerId,this.pageNum,this.pageSize).then(res => {
console.log(res);
screeningResultList(this.registerId, this.pageNum, this.pageSize).then(res => {
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) {
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>

View File

@ -142,11 +142,8 @@
},
onShow() {
this.baseurl = baseurl
console.log(baseurl)
},
onLoad(e) {
console.log(e);
this.type = e.type
if (e) {
this.registerId = e.registerId
@ -155,12 +152,9 @@
if (e.screeningId) {
screeningResultDetail(e.screeningId).then(res => {
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.userinfo = uni.getStorageSync('userinfo');
this.patientld = this.userinfo.id;
this.getLastScreeningResult()
@ -171,7 +165,6 @@
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',
@ -181,12 +174,8 @@
filePath: filePath,
fileType: that.screeningResultData.fileType.toLowerCase(),
showMenu: true,
success: function(respp) {
console.log(respp)
},
fail(err) {
console.log(err)
}
success: function(respp) {},
fail(err) {}
});
}
})
@ -195,11 +184,9 @@
if (this.Inv != e.currentIndex) {
this.Inv = e.currentIndex;
this.getLastScreeningResult()
// this.isResult(this.Inv)
}
},
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 ?
@ -223,27 +210,19 @@
},
close1() {
this.show1 = false
// console.log('close');
},
close2() {
this.show2 = false
},
open() {
// console.log('open');
},
open() {},
close() {
this.show = false
// console.log('close');
},
//
getLastScreeningResult() {
console.log(this.registerId, '999')
lastScreeningResult(this.patientld, this.projectId).then(res => {
// console.log(res);
if (res.data.projectName) {
if (res.code == 200 && res.data.projectName) {
this.items.push(res.data.projectName)
}
this.screeningResultData = res.data
this.isResult(this.Inv)