xinelu-applet-ui/pagesC/healthtest/healthtest.vue

110 lines
3.3 KiB
Vue
Raw Normal View History

2023-10-07 15:14:34 +08:00
<template>
<view class="app">
<view class="tophealth">
<image src="../../static/pageC/self.png" mode=""></image>
<span class="health">智慧健康驿站自评表</span>
2023-10-27 14:06:42 +08:00
<span class="history" @tap='gohistory'>历史记录</span>
2023-10-07 15:14:34 +08:00
</view>
2023-10-27 09:36:30 +08:00
<view class="bodyhealth" v-for="item in list" @tap='gosurveySubject(item)'>
<image src="../../static/pageC/books.png" mode=""></image>
<view class="risk">
{{item.surveySubject==1001?'高血压评估问卷':item.surveySubject==1002?'糖尿病评估问卷':item.surveySubject==1003?
'脑卒中评估问卷':item.surveySubject==1004?'慢阻肺评估问卷':item.surveySubject==1005?'慢病评估问卷':item.surveySubject==1006?'糖尿病肾病评估问卷':item.surveySubject==1007?
'糖尿病眼病评估问卷':item.surveySubject==1008?'糖尿病足病评估问卷':''}}
</view>
2023-10-07 15:14:34 +08:00
<view class="estimate">风险评估</view>
</view>
</view>
</template>
<script>
2023-10-27 09:36:30 +08:00
import {
surveylist
} from '@/api/pagesC/healthtest/index.js'
2023-10-07 15:14:34 +08:00
export default {
data() {
return {
2023-10-27 09:36:30 +08:00
list: [],
total: 0,
query: {
pageNum: 1,
pageSize: 10,
}
2023-10-07 15:14:34 +08:00
}
},
2023-10-27 09:36:30 +08:00
onLoad() {
this.info();
},
2023-10-07 15:14:34 +08:00
methods: {
2023-10-27 14:06:42 +08:00
gohistory() {
uni.navigateTo({
url: '/questionnaire/History/History'
})
},
2023-10-27 09:36:30 +08:00
gosurveySubject(item) {
if (item.surveySubject == 1001) {
uni.navigateTo({
url: `/questionnaire/hypertension/hypertension?item=${encodeURIComponent(JSON.stringify(item))}`
})
} else if (item.surveySubject == 1002) {
uni.navigateTo({
url: `/questionnaire/diabetes/diabetes?item=${encodeURIComponent(JSON.stringify(item))}`
})
} else if (item.surveySubject == 1003) {
uni.navigateTo({
url: `/questionnaire/cerebralapoplexy/cerebralapoplexy?item=${encodeURIComponent(JSON.stringify(item))}`
})
} else if (item.surveySubject == 1004) {
uni.navigateTo({
url: `/questionnaire/copd/copd?item=${encodeURIComponent(JSON.stringify(item))}`
})
2023-10-27 10:12:21 +08:00
} else if (item.surveySubject == 1005) {
uni.navigateTo({
url: `/questionnaire/chronicdisease/chronicdisease?item=${encodeURIComponent(JSON.stringify(item))}`
})
} else if (item.surveySubject == 1006) {
uni.navigateTo({
url: `/questionnaire/nephropathy/nephropathy?item=${encodeURIComponent(JSON.stringify(item))}`
})
} else if (item.surveySubject == 1007) {
uni.navigateTo({
url: `/questionnaire/Ophthalmopathy/Ophthalmopathy?item=${encodeURIComponent(JSON.stringify(item))}`
})
} else if (item.surveySubject == 1008) {
uni.navigateTo({
url: `/questionnaire/Footdisease/Footdisease?item=${encodeURIComponent(JSON.stringify(item))}`
})
2023-10-27 09:36:30 +08:00
}
},
info() {
surveylist(this.query).then(res => {
this.list = res.rows
this.total = res.total
})
},
},
onReachBottom() { //下滑加载
if (this.list.length >= this.total) {} else {
this.query.pageNum++
surveylist(this.query).then(res => {
if (res.rows) {
res.rows.forEach(e => {
this.list.push(e)
})
}
})
}
},
onPullDownRefresh() { //下拉刷新
this.query.pageNum = 1;
this.info();
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
2023-10-07 15:14:34 +08:00
}
</script>
<style lang="scss">
@import './healthtest.scss'
</style>