examTeamApp/pages/vitalcapacity/vitalcapacity.vue

246 lines
4.8 KiB
Vue
Raw Normal View History

2024-05-29 16:35:45 +08:00
<template>
<view class="content">
<!-- -->
<view class="skiptop">
2024-06-13 18:03:50 +08:00
<view class="status" @click="$tools.handleBluetoothClick()"><text>设备连接</text></view>
2024-05-29 16:35:45 +08:00
<view class="item">
<view class="item-ite">平均吸气肺活量<text>{{info?info.average:'--'}}</text></view>
<view class="item-ite">吸气速度<text>--</text></view>
<view class="item-ite">是否达标<text>{{info?info.level:'--'}}</text></view>
</view>
</view>
<!--自由训练 -->
2024-06-13 18:03:50 +08:00
<view class="box1">
<view class="time">{{info?info.time:''}}</view>
2024-05-29 16:35:45 +08:00
<view class="item">
<view class="image">
<image src="../../static/bae.png" mode="widthFix"></image>
</view>
2024-06-13 18:03:50 +08:00
<view class="center mt-15">
2024-05-29 16:35:45 +08:00
<view class="level"></view>
2024-06-13 18:03:50 +08:00
<view class="level level-bg" :style="{'top':info?Number(100 - info.offset)+'%':'100%'}"></view>
<view class="level-item" v-if="info">
2024-05-29 16:35:45 +08:00
<view class="ite" v-for="(ite,ind) in info.list">{{ite}}</view>
</view>
</view>
</view>
2024-06-13 18:03:50 +08:00
<view class="val" v-if="info">
2024-05-29 16:35:45 +08:00
<text>{{info.average}}</text>
吸气肺活量平均值
</view>
</view>
<!-- -->
<view class="gridList">
<view class="data">
<view class="item" @click="navTo('/pages/vitalcapacity/charts')">
<view class="image">
<image src="../../static/charts.png"></image>
</view>
<view class="name">运动曲线</view>
</view>
<view class="item" @click="navTo('/pages/history/history?acd_id='+acd_id)">
<view class="image">
<image src="../../static/add.png"></image>
</view>
<view class="name">历史记录</view>
</view>
<view class="item" @click="navTo('/pages/compk/contrast?acd_id='+acd_id)">
<view class="image">
<image src="../../static/pk.png"></image>
</view>
<view class="name">数据对比</view>
</view>
<view class="item" @click="$store.commit('changeRecord',true)">
<view class="image">
<image src="../../static/history.png"></image>
</view>
<view class="name">添加记录</view>
</view>
</view>
</view>
<!-- 手动记录 -->
<record :rtype='acd_id'></record>
</view>
</template>
<script>
import {
mapState
} from "vuex";
import record from '@/components/manuallyAdd/record.vue';
export default {
data() {
return {}
},
components: {
record
},
computed: {
...mapState(["MeasureLung"]),
info() {
return this.MeasureLung
}
},
onLoad(options) {
let that = this
that.acd_id = options.acd_id
},
onShow() {
let that = this
that.$store.dispatch("getLungResult", {
aud_id: uni.getStorageSync('userid')
})
},
methods: {
navTo(url) {
uni.navigateTo({
url: url
})
},
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
padding-top: 10px;
min-height: 100vh;
background-color: #000;
}
.box1 {
color: #fff;
margin: 15px;
width: calc(100%- 30px);
.time {
width: 100%;
font-size: 14px;
margin-bottom: 20px;
}
.item {
width: 100%;
font-size: 14px;
padding: 10px 0;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 15px;
position: relative;
.image {
width: 80%;
image {
width: 100%;
}
}
.center {
top: -10px;
bottom: 20px;
position: absolute;
width: 55px;
margin: auto;
text-align: center;
background-color: #333;
border-radius: 10px;
z-index: 9;
}
.level-bg {
position: absolute;
width: 55px;
margin: auto;
text-align: center;
background-color: #4d6c7b;
border-radius: 0 0 10px 10px;
bottom: 0px;
z-index: 19;
}
.level-item {
width: 55px;
height: 100%;
position: absolute;
z-index: 99;
:last-child {
border-bottom: none;
}
}
.ite {
margin: 0 5px;
width: calc(100% - 10px);
height: 40px;
line-height: 40px;
font-size: 12px;
color: #fff;
z-index: 99;
border-bottom: 1px solid #999;
}
}
.val {
width: 100%;
text-align: center;
margin: 20px 0;
color: #fff;
font-size: 14px;
text {
display: block;
color: #39D9C9 !important;
font-size: 32px;
margin-bottom: 10px;
}
}
}
.box {
padding: 0;
display: flex;
flex-wrap: wrap;
border-radius: 10px;
margin: 15px;
width: calc(100%- 30px);
justify-content: space-between;
.data {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
width: 100%;
}
.item {
width: 47.5%;
font-size: 14px;
background: #fff;
padding: 10px 0;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 15px;
}
.val {
width: 40px;
height: 40px;
border-radius: 50%;
image {
width: 70%;
height: 70%;
}
}
}
</style>