|
@@ -8,11 +8,11 @@
|
|
|
<div class="right">
|
|
<div class="right">
|
|
|
<div class="name">
|
|
<div class="name">
|
|
|
<span>{{userInfo.name}}</span>
|
|
<span>{{userInfo.name}}</span>
|
|
|
- <div class="btn" @click="$router.push({path:'/estimate'})">健康评估</div>
|
|
|
|
|
|
|
+ <!-- <div class="btn" @click="$router.push({path:'/estimate'})">健康评估</div> -->
|
|
|
</div>
|
|
</div>
|
|
|
<div class="testing">
|
|
<div class="testing">
|
|
|
<img src="../../assets/img/zjjc.png" alt="" />
|
|
<img src="../../assets/img/zjjc.png" alt="" />
|
|
|
- 最近检测: 2021-09-09 20:92:30
|
|
|
|
|
|
|
+ 最近检测:{{latestHealthInfo(healthData)}}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -133,6 +133,130 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ latestHealthInfo(latestHealthInfo) {
|
|
|
|
|
+ var lastHealthTestTime = ''
|
|
|
|
|
+ var maxTimeInt = 0
|
|
|
|
|
+ var weightTimeStr = latestHealthInfo.weight.dateTime
|
|
|
|
|
+ var gluTimeStr = latestHealthInfo.glu.dateTime
|
|
|
|
|
+ var nibpTimeStr = latestHealthInfo.nibp.dateTime
|
|
|
|
|
+ var spoTimeStr = latestHealthInfo.spo.dateTime
|
|
|
|
|
+ var cholTimeStr = latestHealthInfo.chol.dateTime
|
|
|
|
|
+ var hbTimeStr = latestHealthInfo.hb.dateTime
|
|
|
|
|
+ var urineTimeStr = latestHealthInfo.urine.dateTime
|
|
|
|
|
+ var tempTimeStr = latestHealthInfo.temp.dateTime
|
|
|
|
|
+ var uaTimeStr = latestHealthInfo.ua.dateTime
|
|
|
|
|
+ var fatTimeStr = latestHealthInfo.fat.dateTime
|
|
|
|
|
+ var vcTimeStr = latestHealthInfo.vc.dateTime
|
|
|
|
|
+
|
|
|
|
|
+ var weightTimeInt = weightTimeStr
|
|
|
|
|
+ ? isNaN(new Date(weightTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(weightTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+ var gluTimeInt = gluTimeStr
|
|
|
|
|
+ ? isNaN(new Date(gluTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(gluTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+ var nibpTimeInt = nibpTimeStr
|
|
|
|
|
+ ? isNaN(new Date(nibpTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(nibpTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+ var spoTimeInt = spoTimeStr
|
|
|
|
|
+ ? isNaN(new Date(spoTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(spoTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+ var cholTimeInt = cholTimeStr
|
|
|
|
|
+ ? isNaN(new Date(cholTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(cholTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+ var hbTimeInt = hbTimeStr
|
|
|
|
|
+ ? isNaN(new Date(hbTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(hbTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+ var urineTimeInt = urineTimeStr
|
|
|
|
|
+ ? isNaN(new Date(urineTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(urineTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+ var tempTimeInt = tempTimeStr
|
|
|
|
|
+ ? isNaN(new Date(tempTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(tempTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+ var uaTimeInt = uaTimeStr
|
|
|
|
|
+ ? isNaN(new Date(uaTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(uaTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+ var fatTimeInt = fatTimeStr
|
|
|
|
|
+ ? isNaN(new Date(fatTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(fatTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+ var vcTimeInt = vcTimeStr
|
|
|
|
|
+ ? isNaN(new Date(vcTimeStr.replace(/-/g, '/')).valueOf())
|
|
|
|
|
+ ? 0
|
|
|
|
|
+ : new Date(vcTimeStr.replace(/-/g, '/')).valueOf()
|
|
|
|
|
+ : 0
|
|
|
|
|
+
|
|
|
|
|
+ lastHealthTestTime = weightTimeStr
|
|
|
|
|
+ maxTimeInt = weightTimeInt
|
|
|
|
|
+ if (maxTimeInt < gluTimeInt) {
|
|
|
|
|
+ lastHealthTestTime = gluTimeStr
|
|
|
|
|
+ maxTimeInt = gluTimeInt
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (maxTimeInt < nibpTimeInt) {
|
|
|
|
|
+ lastHealthTestTime = nibpTimeStr
|
|
|
|
|
+ maxTimeInt = nibpTimeInt
|
|
|
|
|
+ }
|
|
|
|
|
+ if (maxTimeInt < spoTimeInt) {
|
|
|
|
|
+ lastHealthTestTime = spoTimeStr
|
|
|
|
|
+ maxTimeInt = spoTimeInt
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (maxTimeInt < cholTimeInt) {
|
|
|
|
|
+ lastHealthTestTime = cholTimeStr
|
|
|
|
|
+ maxTimeInt = cholTimeInt
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (maxTimeInt < hbTimeInt) {
|
|
|
|
|
+ lastHealthTestTime = hbTimeStr
|
|
|
|
|
+ maxTimeInt = hbTimeInt
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (maxTimeInt < urineTimeInt) {
|
|
|
|
|
+ lastHealthTestTime = urineTimeStr
|
|
|
|
|
+ maxTimeInt = urineTimeInt
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (maxTimeInt < tempTimeInt) {
|
|
|
|
|
+ lastHealthTestTime = tempTimeStr
|
|
|
|
|
+ maxTimeInt = tempTimeInt
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (maxTimeInt < uaTimeInt) {
|
|
|
|
|
+ lastHealthTestTime = uaTimeStr
|
|
|
|
|
+ maxTimeInt = uaTimeInt
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (maxTimeInt < fatTimeInt) {
|
|
|
|
|
+ lastHealthTestTime = fatTimeStr
|
|
|
|
|
+ maxTimeInt = fatTimeInt
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (maxTimeInt < vcTimeInt) {
|
|
|
|
|
+ lastHealthTestTime = vcTimeStr
|
|
|
|
|
+ maxTimeInt = vcTimeInt
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return lastHealthTestTime
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|