体征检测优化
This commit is contained in:
parent
16e0902d27
commit
d2627a74aa
@ -126,4 +126,15 @@ export function binding(data) {
|
||||
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')
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -44,7 +44,7 @@
|
||||
"navigationBarTitleText": "注册",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},{
|
||||
}, {
|
||||
"path": "login/login",
|
||||
"style": {
|
||||
"navigationBarTitleText": "登录",
|
||||
@ -574,7 +574,8 @@
|
||||
"path": "healthdata/healthdata",
|
||||
"style": {
|
||||
"navigationBarTitleText": "体征检测",
|
||||
"enablePullDownRefresh": false
|
||||
"onReachBottomDistance": 20, //距离底部多远时触发 单位为px
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
|
||||
}, {
|
||||
|
||||
@ -83,6 +83,20 @@
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -332,12 +346,13 @@
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 60rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
|
||||
.charts-box {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.bottomtexts {
|
||||
|
||||
@ -52,8 +52,26 @@
|
||||
<view class="text">
|
||||
注:全部视图主要展示全部血脂数值的趋势曲线 单位:mmol/L
|
||||
</view>
|
||||
</view>
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="line" loadingType="0" :opts="line_opts" :ontouch="true" :chartData="datalist" />
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -304,13 +322,21 @@
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 60rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
|
||||
.charts-box {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.bottomlist {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-top: 17rpx;
|
||||
padding-bottom: 100rpx;
|
||||
|
||||
.text {
|
||||
width: 90%;
|
||||
margin: 20rpx auto 30rpx;
|
||||
@ -405,4 +431,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@ -59,7 +59,18 @@
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -304,12 +315,13 @@
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 60rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
|
||||
.charts-box {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.bottomtexts {
|
||||
|
||||
@ -73,7 +73,18 @@
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -324,12 +335,13 @@
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 60rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
|
||||
.charts-box {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.bottomtexts {
|
||||
@ -442,4 +454,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@ -59,7 +59,18 @@
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -175,16 +186,6 @@
|
||||
getServerData() {
|
||||
if (this.echartData) {
|
||||
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 = {
|
||||
categories: [],
|
||||
series: [{
|
||||
@ -225,12 +226,13 @@
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 60rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
|
||||
.charts-box {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.bottomtexts {
|
||||
@ -343,4 +345,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@ -59,7 +59,16 @@
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -304,12 +313,13 @@
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 60rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
|
||||
.charts-box {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.bottomtexts {
|
||||
|
||||
@ -59,7 +59,16 @@
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts type="pie" :opts="pie_opts" :chartData="datalisttwo" />
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -304,12 +313,13 @@
|
||||
.app {
|
||||
width: 96%;
|
||||
margin: 0 auto;
|
||||
padding-bottom: 60rpx;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
|
||||
.charts-box {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.bottomtexts {
|
||||
|
||||
@ -19,18 +19,17 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="submit" @tap="submit">
|
||||
<view class="submit" @tap="submit">
|
||||
保存
|
||||
</view> -->
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
savehr
|
||||
} from '@/api/examinationapi/add.js'
|
||||
import {
|
||||
savehr,
|
||||
recordlastV2,
|
||||
bound,
|
||||
} from '@/api/examinationapi/add.js'
|
||||
import {
|
||||
@ -50,22 +49,35 @@
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
// bound(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// res.data.forEach(e => {
|
||||
// if (e.deviceType == 1) {
|
||||
// if (uni.getStorageSync('region') == 1) {
|
||||
// this.SOCKETURL = dzsocketurl + `${e.sn}`
|
||||
// } else if (uni.getStorageSync('region') == 2) {
|
||||
// this.SOCKETURL = dysocketurl + `${e.sn}`
|
||||
// }
|
||||
// this.scoket();
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// this.info();
|
||||
bound(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||
if (res.code == 200) {
|
||||
res.data.forEach(e => {
|
||||
if (Number(e.deviceType) == 1) {
|
||||
if (uni.getStorageSync('region') == 1) {
|
||||
this.SOCKETURL = dzsocketurl + `${e.sn}`
|
||||
} else if (uni.getStorageSync('region') == 2) {
|
||||
this.SOCKETURL = dysocketurl + `${e.sn}`
|
||||
}
|
||||
this.scoket();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
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) {
|
||||
const now = new Date(parseInt(timestamp))
|
||||
const year = now.getFullYear();
|
||||
|
||||
@ -37,18 +37,17 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="submit" @tap="submit">
|
||||
<view class="submit" @tap="submit">
|
||||
保存
|
||||
</view> -->
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
savebp
|
||||
} from '@/api/examinationapi/add.js'
|
||||
import {
|
||||
savebp,
|
||||
recordlastV2,
|
||||
bound,
|
||||
} from '@/api/examinationapi/add.js'
|
||||
import {
|
||||
@ -70,22 +69,39 @@
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
// bound(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// res.data.forEach(e => {
|
||||
// if (e.deviceType == 1) {
|
||||
// if (uni.getStorageSync('region') == 1) {
|
||||
// this.SOCKETURL = dzsocketurl + `${e.sn}`
|
||||
// } else if (uni.getStorageSync('region') == 2) {
|
||||
// this.SOCKETURL = dysocketurl + `${e.sn}`
|
||||
// }
|
||||
// this.scoket();
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// this.info();
|
||||
bound(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||
if (res.code == 200) {
|
||||
res.data.forEach(e => {
|
||||
if (Number(e.deviceType) == 1) {
|
||||
if (uni.getStorageSync('region') == 1) {
|
||||
this.SOCKETURL = dzsocketurl + `${e.sn}`
|
||||
} else if (uni.getStorageSync('region') == 2) {
|
||||
this.SOCKETURL = dysocketurl + `${e.sn}`
|
||||
}
|
||||
this.scoket();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
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) {
|
||||
const now = new Date(parseInt(timestamp))
|
||||
const year = now.getFullYear();
|
||||
|
||||
@ -32,21 +32,20 @@
|
||||
<view @tap='bucketchoice=8' :class="bucketchoice==8?'choice':'choice2'">睡前2小时</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="btn">
|
||||
<view class="btn">
|
||||
<view class="submit" @tap="submit">
|
||||
添加
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
savebg
|
||||
} from '@/api/examinationapi/add.js'
|
||||
import {
|
||||
bound,
|
||||
savebg,
|
||||
recordlastV2
|
||||
} from '@/api/examinationapi/add.js'
|
||||
import {
|
||||
dzsocketurl,
|
||||
@ -66,22 +65,36 @@
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
// bound(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// res.data.forEach(e => {
|
||||
// if (e.deviceType == 2) {
|
||||
// if (uni.getStorageSync('region') == 1) {
|
||||
// this.SOCKETURL = dzsocketurl + `${e.sn}`
|
||||
// } else if (uni.getStorageSync('region') == 2) {
|
||||
// this.SOCKETURL = dysocketurl + `${e.sn}`
|
||||
// }
|
||||
// this.scoket();
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// this.info();
|
||||
bound(uni.getStorageSync('userinfo').cardNo).then(res => {
|
||||
if (res.code == 200) {
|
||||
res.data.forEach(e => {
|
||||
if (Number(e.deviceType) == 2) {
|
||||
if (uni.getStorageSync('region') == 1) {
|
||||
this.SOCKETURL = dzsocketurl + `${e.sn}`
|
||||
} else if (uni.getStorageSync('region') == 2) {
|
||||
this.SOCKETURL = dysocketurl + `${e.sn}`
|
||||
}
|
||||
this.scoket();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
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) {
|
||||
this.timetext = time
|
||||
},
|
||||
|
||||
@ -98,6 +98,16 @@
|
||||
}
|
||||
record(obj).then(res => {
|
||||
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) {
|
||||
@ -107,7 +117,14 @@
|
||||
this.info();
|
||||
}, 1000)
|
||||
},
|
||||
}
|
||||
},
|
||||
onReachBottom() { //下滑加载
|
||||
},
|
||||
onPullDownRefresh() { //下拉刷新
|
||||
setTimeout(function() {
|
||||
uni.stopPullDownRefresh();
|
||||
}, 1000);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user