体征检测优化

This commit is contained in:
2024-02-21 11:47:29 +08:00
parent 16e0902d27
commit d2627a74aa
13 changed files with 242 additions and 85 deletions

View File

@ -126,4 +126,15 @@ export function binding(data) {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
} }
}) })
}
//获取血糖、血压、心率最后一次体征记录
export function recordlastV2(identity) {
return request({
url: `/fd/ps/record/lastV2/${identity}`,
method: 'get',
header: {
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
}
})
} }

View File

@ -44,7 +44,7 @@
"navigationBarTitleText": "注册", "navigationBarTitleText": "注册",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},{ }, {
"path": "login/login", "path": "login/login",
"style": { "style": {
"navigationBarTitleText": "登录", "navigationBarTitleText": "登录",
@ -574,7 +574,8 @@
"path": "healthdata/healthdata", "path": "healthdata/healthdata",
"style": { "style": {
"navigationBarTitleText": "体征检测", "navigationBarTitleText": "体征检测",
"enablePullDownRefresh": false "onReachBottomDistance": 20, // px
"enablePullDownRefresh": true //true
} }
}, { }, {

View File

@ -83,6 +83,20 @@
<view class="charts-box"> <view class="charts-box">
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" /> <qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
</view> </view>
<!-- <uni-table border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center" width='150'>记录时间</uni-th>
<uni-th align="center" width='70'>身高</uni-th>
<uni-th align="center" width='70'>体重</uni-th>
<uni-th align="center" width='70'>BMI</uni-th>
</uni-tr>
<uni-tr v-for="item in echartData.list">
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
<uni-td width='70' align="center">{{item.height}}</uni-td>
<uni-td width='70' align="center">{{item.weight}}</uni-td>
<uni-td width='70' align="center">{{item.bmi}}</uni-td>
</uni-tr>
</uni-table> -->
</view> </view>
</template> </template>
@ -332,12 +346,13 @@
.app { .app {
width: 96%; width: 96%;
margin: 0 auto; margin: 0 auto;
padding-bottom: 60rpx; padding-bottom: 20rpx;
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */ /* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box { .charts-box {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
margin-bottom: 20rpx;
} }
.bottomtexts { .bottomtexts {

View File

@ -52,8 +52,26 @@
<view class="text"> <view class="text">
:全部视图主要展示全部血脂数值的趋势曲线 单位:mmol/L :全部视图主要展示全部血脂数值的趋势曲线 单位:mmol/L
</view> </view>
</view>
<view class="charts-box">
<qiun-data-charts type="line" loadingType="0" :opts="line_opts" :ontouch="true" :chartData="datalist" /> <qiun-data-charts type="line" loadingType="0" :opts="line_opts" :ontouch="true" :chartData="datalist" />
</view> </view>
<!-- <uni-table border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center" width='70'>记录时间</uni-th>
<uni-th align="center" width='70'>血清总胆固醇</uni-th>
<uni-th align="center" width='70'>甘油三酯</uni-th>
<uni-th align="center" width='70'>高密度脂蛋白胆固醇</uni-th>
<uni-th align="center" width='70'>低密度脂蛋白胆固醇</uni-th>
</uni-tr>
<uni-tr v-for="item in echartData.list">
<uni-td width='70' align="center">{{item.measureTime}}</uni-td>
<uni-td width='70' align="center">{{item.tc}}</uni-td>
<uni-td width='70' align="center">{{item.tg}}</uni-td>
<uni-td width='70' align="center">{{item.hdl}}</uni-td>
<uni-td width='70' align="center">{{item.ldl}}</uni-td>
</uni-tr>
</uni-table> -->
</view> </view>
</template> </template>
@ -304,13 +322,21 @@
.app { .app {
width: 96%; width: 96%;
margin: 0 auto; margin: 0 auto;
padding-bottom: 60rpx; padding-bottom: 20rpx;
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box {
width: 100%;
background-color: #fff;
margin-bottom: 20rpx;
}
.bottomlist { .bottomlist {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
margin-top: 17rpx; margin-top: 17rpx;
padding-bottom: 100rpx; padding-bottom: 100rpx;
.text { .text {
width: 90%; width: 90%;
margin: 20rpx auto 30rpx; margin: 20rpx auto 30rpx;
@ -405,4 +431,4 @@
} }
} }
} }
</style> </style>

View File

@ -59,7 +59,18 @@
<view class="charts-box"> <view class="charts-box">
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" /> <qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
</view> </view>
<!-- <qiun-data-charts type="pie" :opts="opts" :chartData="chartData" /> --> <!-- <uni-table border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center" width='150'>记录时间</uni-th>
<uni-th align="center" width='100'>脉搏</uni-th>
<uni-th align="center" width='100'>血氧</uni-th>
</uni-tr>
<uni-tr v-for="item in echartData.list">
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
<uni-td width='100' align="center">{{item.pulse}}</uni-td>
<uni-td width='100' align="center">{{item.spo2}}</uni-td>
</uni-tr>
</uni-table> -->
</view> </view>
</template> </template>
@ -304,12 +315,13 @@
.app { .app {
width: 96%; width: 96%;
margin: 0 auto; margin: 0 auto;
padding-bottom: 60rpx; padding-bottom: 20rpx;
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */ /* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box { .charts-box {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
margin-bottom: 20rpx;
} }
.bottomtexts { .bottomtexts {

View File

@ -73,7 +73,18 @@
<view class="charts-box"> <view class="charts-box">
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" /> <qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
</view> </view>
<!-- <qiun-data-charts type="pie" :opts="opts" :chartData="chartData" /> --> <!-- <uni-table border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center" width='150'>记录时间</uni-th>
<uni-th align="center" width='70'>收缩压</uni-th>
<uni-th align="center" width='70'>舒张压</uni-th>
</uni-tr>
<uni-tr v-for="item in echartData.list">
<uni-td align="center" width='150'>{{item.measureTime}}</uni-td>
<uni-td align="center" width='70'>{{item.sbp}}</uni-td>
<uni-td align="center" width='70'>{{item.dbp}}</uni-td>
</uni-tr>
</uni-table> -->
</view> </view>
</template> </template>
@ -324,12 +335,13 @@
.app { .app {
width: 96%; width: 96%;
margin: 0 auto; margin: 0 auto;
padding-bottom: 60rpx; padding-bottom: 20rpx;
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */ /* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box { .charts-box {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
margin-bottom: 20rpx;
} }
.bottomtexts { .bottomtexts {
@ -442,4 +454,4 @@
} }
} }
} }
</style> </style>

View File

@ -59,7 +59,18 @@
<view class="charts-box"> <view class="charts-box">
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" /> <qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
</view> </view>
<!-- <qiun-data-charts type="pie" :opts="opts" :chartData="chartData" /> --> <!-- <uni-table border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center" width='140'>记录时间</uni-th>
<uni-th align="center" width='90'>测量场景</uni-th>
<uni-th align="center" width='90'>血糖值</uni-th>
</uni-tr>
<uni-tr v-for="item in echartData.list">
<uni-td width='140' align="center">{{item.measureTime}}</uni-td>
<uni-td width='90' align="center">{{item.timename}}</uni-td>
<uni-td width='90' align="center">{{item.bg}}</uni-td>
</uni-tr>
</uni-table> -->
</view> </view>
</template> </template>
@ -175,16 +186,6 @@
getServerData() { getServerData() {
if (this.echartData) { if (this.echartData) {
setTimeout(() => { setTimeout(() => {
this.echartData.list.forEach(e => {
e.bucket == '1' ? e.timename = '凌晨' : ''
e.bucket == '2' ? e.timename = '早餐前' : ''
e.bucket == '3' ? e.timename = '早晨后' : ''
e.bucket == '4' ? e.timename = '午餐前' : ''
e.bucket == '5' ? e.timename = '午餐后' : ''
e.bucket == '6' ? e.timename = '晚餐前' : ''
e.bucket == '7' ? e.timename = '晚餐后' : ''
e.bucket == '8' ? e.timename = '睡前' : ''
})
let res = { let res = {
categories: [], categories: [],
series: [{ series: [{
@ -225,12 +226,13 @@
.app { .app {
width: 96%; width: 96%;
margin: 0 auto; margin: 0 auto;
padding-bottom: 60rpx; padding-bottom: 20rpx;
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */ /* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box { .charts-box {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
margin-bottom: 20rpx;
} }
.bottomtexts { .bottomtexts {
@ -343,4 +345,4 @@
} }
} }
} }
</style> </style>

View File

@ -59,7 +59,16 @@
<view class="charts-box"> <view class="charts-box">
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" /> <qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
</view> </view>
<!-- <qiun-data-charts type="pie" :opts="opts" :chartData="chartData" /> --> <!-- <uni-table border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center" width='150'>记录时间</uni-th>
<uni-th align="center" width='150'>心率</uni-th>
</uni-tr>
<uni-tr v-for="item in echartData.list">
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
<uni-td width='150' align="center">{{item.hr}}</uni-td>
</uni-tr>
</uni-table> -->
</view> </view>
</template> </template>
@ -304,12 +313,13 @@
.app { .app {
width: 96%; width: 96%;
margin: 0 auto; margin: 0 auto;
padding-bottom: 60rpx; padding-bottom: 20rpx;
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */ /* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box { .charts-box {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
margin-bottom: 20rpx;
} }
.bottomtexts { .bottomtexts {

View File

@ -59,7 +59,16 @@
<view class="charts-box"> <view class="charts-box">
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" /> <qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
</view> </view>
<!-- <qiun-data-charts type="pie" :opts="opts" :chartData="chartData" /> --> <!-- <uni-table border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center" width='150'>记录时间</uni-th>
<uni-th align="center" width='150'>体温</uni-th>
</uni-tr>
<uni-tr v-for="item in echartData.list">
<uni-td width='150' align="center">{{item.measureTime}}</uni-td>
<uni-td width='150' align="center">{{item.temp}}</uni-td>
</uni-tr>
</uni-table> -->
</view> </view>
</template> </template>
@ -304,12 +313,13 @@
.app { .app {
width: 96%; width: 96%;
margin: 0 auto; margin: 0 auto;
padding-bottom: 60rpx; padding-bottom: 20rpx;
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */ /* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box { .charts-box {
width: 100%; width: 100%;
background-color: #fff; background-color: #fff;
margin-bottom: 20rpx;
} }
.bottomtexts { .bottomtexts {

View File

@ -19,18 +19,17 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="submit" @tap="submit"> <view class="submit" @tap="submit">
保存 保存
</view> --> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
import { import {
savehr savehr,
} from '@/api/examinationapi/add.js' recordlastV2,
import {
bound, bound,
} from '@/api/examinationapi/add.js' } from '@/api/examinationapi/add.js'
import { import {
@ -50,22 +49,35 @@
}; };
}, },
onLoad(options) { onLoad(options) {
// bound(uni.getStorageSync('userinfo').cardNo).then(res => { // this.info();
// if (res.code == 200) { bound(uni.getStorageSync('userinfo').cardNo).then(res => {
// res.data.forEach(e => { if (res.code == 200) {
// if (e.deviceType == 1) { res.data.forEach(e => {
// if (uni.getStorageSync('region') == 1) { if (Number(e.deviceType) == 1) {
// this.SOCKETURL = dzsocketurl + `${e.sn}` if (uni.getStorageSync('region') == 1) {
// } else if (uni.getStorageSync('region') == 2) { this.SOCKETURL = dzsocketurl + `${e.sn}`
// this.SOCKETURL = dysocketurl + `${e.sn}` } else if (uni.getStorageSync('region') == 2) {
// } this.SOCKETURL = dysocketurl + `${e.sn}`
// this.scoket(); }
// } this.scoket();
// }) }
// } })
// }) }
})
}, },
methods: { methods: {
info() {
recordlastV2(uni.getStorageSync('userinfo').cardNo).then(res => {
if (res.data && res.data.length > 0) {
res.data.forEach(e => {
if (e.type == '6') {
this.measureTime = e.date
this.hr = e.val
}
})
}
})
},
formatDate(timestamp) { formatDate(timestamp) {
const now = new Date(parseInt(timestamp)) const now = new Date(parseInt(timestamp))
const year = now.getFullYear(); const year = now.getFullYear();

View File

@ -37,18 +37,17 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="submit" @tap="submit"> <view class="submit" @tap="submit">
保存 保存
</view> --> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
import { import {
savebp savebp,
} from '@/api/examinationapi/add.js' recordlastV2,
import {
bound, bound,
} from '@/api/examinationapi/add.js' } from '@/api/examinationapi/add.js'
import { import {
@ -70,22 +69,39 @@
}; };
}, },
onLoad(options) { onLoad(options) {
// bound(uni.getStorageSync('userinfo').cardNo).then(res => { // this.info();
// if (res.code == 200) { bound(uni.getStorageSync('userinfo').cardNo).then(res => {
// res.data.forEach(e => { if (res.code == 200) {
// if (e.deviceType == 1) { res.data.forEach(e => {
// if (uni.getStorageSync('region') == 1) { if (Number(e.deviceType) == 1) {
// this.SOCKETURL = dzsocketurl + `${e.sn}` if (uni.getStorageSync('region') == 1) {
// } else if (uni.getStorageSync('region') == 2) { this.SOCKETURL = dzsocketurl + `${e.sn}`
// this.SOCKETURL = dysocketurl + `${e.sn}` } else if (uni.getStorageSync('region') == 2) {
// } this.SOCKETURL = dysocketurl + `${e.sn}`
// this.scoket(); }
// } this.scoket();
// }) }
// } })
// }) }
})
}, },
methods: { methods: {
info() {
recordlastV2(uni.getStorageSync('userinfo').cardNo).then(res => {
if (res.data && res.data.length > 0) {
res.data.forEach(e => {
if (e.type == '2') {
this.measureTime = e.date
this.sbp = e.val.split('/')[1]
this.dbp = e.val.split('/')[0]
}
if (e.type == '6') {
this.hr = e.val
}
})
}
})
},
formatDate(timestamp) { formatDate(timestamp) {
const now = new Date(parseInt(timestamp)) const now = new Date(parseInt(timestamp))
const year = now.getFullYear(); const year = now.getFullYear();

View File

@ -32,21 +32,20 @@
<view @tap='bucketchoice=8' :class="bucketchoice==8?'choice':'choice2'">睡前2小时</view> <view @tap='bucketchoice=8' :class="bucketchoice==8?'choice':'choice2'">睡前2小时</view>
</view> </view>
</view> </view>
<!-- <view class="btn"> <view class="btn">
<view class="submit" @tap="submit"> <view class="submit" @tap="submit">
添加 添加
</view> </view>
</view> --> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
import {
savebg
} from '@/api/examinationapi/add.js'
import { import {
bound, bound,
savebg,
recordlastV2
} from '@/api/examinationapi/add.js' } from '@/api/examinationapi/add.js'
import { import {
dzsocketurl, dzsocketurl,
@ -66,22 +65,36 @@
}; };
}, },
onLoad(options) { onLoad(options) {
// bound(uni.getStorageSync('userinfo').cardNo).then(res => { // this.info();
// if (res.code == 200) { bound(uni.getStorageSync('userinfo').cardNo).then(res => {
// res.data.forEach(e => { if (res.code == 200) {
// if (e.deviceType == 2) { res.data.forEach(e => {
// if (uni.getStorageSync('region') == 1) { if (Number(e.deviceType) == 2) {
// this.SOCKETURL = dzsocketurl + `${e.sn}` if (uni.getStorageSync('region') == 1) {
// } else if (uni.getStorageSync('region') == 2) { this.SOCKETURL = dzsocketurl + `${e.sn}`
// this.SOCKETURL = dysocketurl + `${e.sn}` } else if (uni.getStorageSync('region') == 2) {
// } this.SOCKETURL = dysocketurl + `${e.sn}`
// this.scoket(); }
// } this.scoket();
// }) }
// } })
// }) }
})
}, },
methods: { methods: {
info() {
recordlastV2(uni.getStorageSync('userinfo').cardNo).then(res => {
if (res.data && res.data.length > 0) {
res.data.forEach(e => {
if (e.type == '1') {
this.bucketchoice = Number(e.bucket)
this.measureTime = e.date
this.number = e.val
}
})
}
})
},
timeconfirm(time) { timeconfirm(time) {
this.timetext = time this.timetext = time
}, },

View File

@ -98,6 +98,16 @@
} }
record(obj).then(res => { record(obj).then(res => {
this.list = res.data this.list = res.data
this.list.list.forEach(e => {
e.bucket == '1' ? e.timename = '凌晨' : ''
e.bucket == '2' ? e.timename = '早餐前' : ''
e.bucket == '3' ? e.timename = '早晨后' : ''
e.bucket == '4' ? e.timename = '午餐前' : ''
e.bucket == '5' ? e.timename = '午餐后' : ''
e.bucket == '6' ? e.timename = '晚餐前' : ''
e.bucket == '7' ? e.timename = '晚餐后' : ''
e.bucket == '8' ? e.timename = '睡前' : ''
})
}) })
}, },
tabchange(e) { tabchange(e) {
@ -107,7 +117,14 @@
this.info(); this.info();
}, 1000) }, 1000)
}, },
} },
onReachBottom() { //
},
onPullDownRefresh() { //
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
},
} }
</script> </script>