|
@@ -1,6 +1,5 @@
|
|
|
<template>
|
|
|
<view class="">
|
|
|
-
|
|
|
<view class=" tab position-relative">
|
|
|
<view class="mx-3 mt-3 tab-box centerY text-center fs-14 font-bold">
|
|
|
<view @click="tabactive(index)" v-for="(item,index) in ['健康报告','全年检查计划','检测结果']"
|
|
@@ -12,19 +11,16 @@
|
|
|
</view>
|
|
|
<view class="position-relative px-3" style="height: 50vh;" ref="ccc">
|
|
|
<view
|
|
|
-
|
|
|
:class="{'w-100 tab-content position-absolute':true,'tab-content-active': tab_index==0,'tab-content-hidden':tab_index!==0}">
|
|
|
- <report :propData="dataAll"/>
|
|
|
+ <report :propData="dataAll" />
|
|
|
</view>
|
|
|
<view
|
|
|
-
|
|
|
:class="{'w-100 tab-content position-absolute':true,'tab-content-active': tab_index==1,'tab-content-hidden':tab_index!==1}">
|
|
|
- <annual-inspection-plan :propData="dataAll"/>
|
|
|
+ <annual-inspection-plan :propData="dataAll" />
|
|
|
</view>
|
|
|
<view
|
|
|
-
|
|
|
:class="{'w-100 tab-content position-absolute':true,'tab-content-active': tab_index==2,'tab-content-hidden':tab_index!==2}">
|
|
|
- <detection-result :propData="dataAll"/>
|
|
|
+ <detection-result :propData="dataAll" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="" @click="resttop" v-if="isshowbtntop"
|
|
@@ -50,35 +46,41 @@
|
|
|
data() {
|
|
|
return {
|
|
|
tab_index: 0,
|
|
|
- isshowbtntop:false,
|
|
|
- dataAll:{}
|
|
|
+ isshowbtntop: false,
|
|
|
+ dataAll: {}
|
|
|
}
|
|
|
},
|
|
|
onPageScroll: function(e) { //nvue暂不支持滚动监听,可用bindingx代替
|
|
|
// console.log("滚动距离为:" + e.scrollTop);
|
|
|
- if(e.scrollTop>=500){
|
|
|
- this.isshowbtntop=true
|
|
|
- }else{
|
|
|
- this.isshowbtntop=false
|
|
|
+ if (e.scrollTop >= 500) {
|
|
|
+ this.isshowbtntop = true
|
|
|
+ } else {
|
|
|
+ this.isshowbtntop = false
|
|
|
}
|
|
|
},
|
|
|
onLoad() {
|
|
|
this.find_health_report()
|
|
|
},
|
|
|
methods: {
|
|
|
- async find_health_report(){
|
|
|
- uni.showLoading({
|
|
|
- title: '加载中'
|
|
|
- });
|
|
|
- let {data,code} =await this.$api.find_health_report({"idCard":"330222194512283184"})
|
|
|
- if(code==0){
|
|
|
- console.log(data)
|
|
|
- this.dataAll = data||{}
|
|
|
- uni.hideLoading();
|
|
|
- }else{
|
|
|
- uni.hideLoading();
|
|
|
- uni.stopPullDownRefresh()
|
|
|
- }
|
|
|
+ async find_health_report() {
|
|
|
+ let idCard = uni.getStorageSync('idCard')
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ });
|
|
|
+ let {
|
|
|
+ data,
|
|
|
+ code
|
|
|
+ } = await this.$api.find_health_report({
|
|
|
+ idCard
|
|
|
+ })
|
|
|
+ if (code == 0) {
|
|
|
+ console.log(data)
|
|
|
+ this.dataAll = data || {}
|
|
|
+ uni.hideLoading();
|
|
|
+ } else {
|
|
|
+ uni.hideLoading();
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ }
|
|
|
},
|
|
|
tabactive(i) {
|
|
|
this.tab_index = i
|