Browse Source

feat(student): 添加学生端体测报告功能

- 新增体测报告列表和详情接口
- 实现学生首页体测数据展示- 添加体测数据列表和详情页面
master
liutong 10 months ago
parent
commit
8f4f042da4
  1. 16
      api/apiRoute.js
  2. 2
      pages/coach/student/physical_examination.vue
  3. 40
      pages/student/index/index.vue
  4. 6
      pages/student/index/physical_examination.vue

16
api/apiRoute.js

@ -462,6 +462,22 @@ export default {
})
},
//学生端-体测报告-列表
xy_physicalTest(data = {}) {
let url = '/xy/physicalTest'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-体测报告-详情
xy_physicalTestInfo(data = {}) {
let url = '/xy/physicalTest/info'
return http.get(url, data).then(res => {
return res;
})
},

2
pages/coach/student/physical_examination.vue

@ -1,4 +1,4 @@
<!--体测数据-->
<!--体测数据-详情页-->
<template>
<view class="overall">
<view class="date">{{$util.formatToDateTime(surveyInfo.create_time,'Y-m-d')}}</view>

40
pages/student/index/index.vue

@ -29,18 +29,18 @@
<view class="card-con-txt1">
<view class="card-con-txt1-left">
<image :src="$util.img('/uniapp_src/static/images/index/score.png')" class="overlay-image"></image>
<view class="card-con-txt1-left-txt top">{{memberIndexData.tx.score}}</view>
<view class="card-con-txt1-left-txt top">{{physicalTestInfo.calculateChildHealthScore}}</view>
<view class="card-con-txt1-left-txt top1">综合评分</view>
</view>
<view class="card-con-txt1-right">
<view style="color: #AAAAAA;padding: 5rpx;">数据测评时间{{$util.formatToDateTime(memberIndexData.tx.create_time,'Y-m-d')}}</view>
<view style="color: #AAAAAA;padding: 5rpx;">数据测评时间{{$util.formatToDateTime(physicalTestInfo.created_at,'Y-m-d')}}</view>
<view style="display: flex;justify-content: space-around;margin-top: 20rpx;">
<view>
<view style="font-size: 48rpx;color: #29d3b4;">{{memberIndexData.tx.height * 100}}</view>
<view style="font-size: 48rpx;color: #29d3b4;">{{physicalTestInfo.height}}</view>
<view style="color: #AAAAAA;font-size: 30rpx;">身高CM</view>
</view>
<view>
<view style="font-size: 48rpx;color: #29d3b4;">{{memberIndexData.tx.weight}}</view>
<view style="font-size: 48rpx;color: #29d3b4;">{{physicalTestInfo.weight}}</view>
<view style="color: #AAAAAA;font-size: 30rpx;">体重KG</view>
</view>
</view>
@ -170,6 +170,13 @@
},
thisPath:'',//('')
openPath:'',//('')
physicalTestInfo:{
created_at:'',//
calculateChildHealthScore:'0',//
height:'0',//
weight:'0',//
},//
}
},
onLoad() {
@ -186,11 +193,36 @@
//
async init(){
await this.member_init()
await this.getPhysicalTestList()
this.getMemberIndex()
this.getList()
this.getJobAssignmentsInfo()
},
//
async getPhysicalTestList(){
let params = {
page: 1,//
limit: 1,//
total: 1,//
resource_id:this.member_info.id,//id
}
let res = await apiRoute.xy_physicalTest(params)
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
}
console.log('tc',res.data)
let arr = res.data.data
if(arr.length){
this.physicalTestInfo = arr[0]
}
},
async openViewHome_COPY(){

6
pages/student/index/physical_examination.vue

@ -1,4 +1,4 @@
<!--体测数据-详情-->
<!--体测数据-列表详情-->
<template>
<view class="overall">
@ -46,7 +46,7 @@
</template>
<script>
import memberApi from '@/api/member.js';
import apiRoute from '@/api/apiRoute.js';
export default {
data() {
@ -116,7 +116,7 @@ import memberApi from '@/api/member.js';
}
//-
let res = await memberApi.surveyList(data)
let res = await apiRoute.surveyList(data)
this.loading = false
this.isReachedBottom = false;
if (res.code != 1) {

Loading…
Cancel
Save