Browse Source

feat(coach): 添加学生体测报告详情功能

- 在 member.js 中新增 jlSurveyInfo 方法获取评测详情
- 修改 student/info.vue 中的 openViewPhysicalExamination 方法,传递 survey_id 参数
- 重构 physical_examination.vue 页面,展示具体的评测信息
master
liutong 12 months ago
parent
commit
8ee9e3384f
  1. 10
      api/member.js
  2. 3
      pages/coach/student/info.vue
  3. 41
      pages/coach/student/physical_examination.vue

10
api/member.js

@ -218,6 +218,16 @@ export default {
})
},
//教练端-评测详情
jlSurveyInfo(data = {}) {
let url = '/member/survey_info'
return http.get(url, data).then(res => {
return res;
})
},

3
pages/coach/student/info.vue

@ -292,8 +292,9 @@ export default {
//
openViewPhysicalExamination(item){
let survey_id = item.id
uni.navigateTo({
url: '/pages/coach/student/physical_examination'
url: `/pages/coach/student/physical_examination?survey_id=${survey_id}`
})
},

41
pages/coach/student/physical_examination.vue

@ -1,47 +1,76 @@
<!--体测数据-->
<template>
<view class="overall">
<view class="date">2021年03月12日</view>
<view class="date">{{$util.formatToDateTime(surveyInfo.create_time,'Y-m-d')}}</view>
<view class="content">
<view class="circle-container">
<view class="card-con-txt1-left">
<image src="@/static/images/index/score.png" class="overlay-image"></image>
</view>
<view class="card-con-txt1-left-txt">90</view>
<view class="card-con-txt1-left-txt">{{surveyInfo.score}}</view>
<view class="card-con-txt1-left-txt top1">综合评分</view>
</view>
<view style="height: 170rpx;"></view>
<view style="display: flex;justify-content: space-around;">
<view style="text-align: center;">
<view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">身高 (CM)</view>
<view style="font-size: 55rpx;color: #29d3b4;">123</view>
<view style="font-size: 55rpx;color: #29d3b4;">{{surveyInfo.height}}</view>
</view>
<view style="text-align: center;">
<view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">体重 (KG)</view>
<view style="font-size: 55rpx;color: #29d3b4;">45</view>
<view style="font-size: 55rpx;color: #29d3b4;">{{surveyInfo.weight}}</view>
</view>
</view>
<view class="coach-message">
<view>
<image src="@/static/images/index/lv.png" class="drop-image"></image>
</view>
<view style="padding: 15rpx 0 0 5rpx;line-height: 1.6;font-size: 30rpx;color: #7F7F7F;">教练寄语教练寄语教练寄语教练寄语教练寄语教练寄语教练寄教练寄语教练寄语教练寄语教练寄语教练寄语教练教练寄语教练寄语教练寄语教练寄语练教练语教练寄教练寄语教练寄语教练寄语教练寄语教练寄语教练</view>
<view style="padding: 15rpx 0 0 5rpx;line-height: 1.6;font-size: 30rpx;color: #7F7F7F;">{{surveyInfo.content}}</view>
</view>
<view style="font-size: 45rpx;text-align: center;margin-top: 30%;">详细数据信息</view>
<!-- <view style="font-size: 45rpx;text-align: center;margin-top: 30%;">详细数据信息</view>-->
</view>
</view>
</template>
<script>
import memberApi from '@/api/member.js';
export default {
data() {
return {
survey_id:'',//id
surveyInfo:{},//
}
},
onLoad(options) {
this.survey_id = options.survey_id//id
},
onShow(){
this.init()
},
methods: {
//
async init(){
this.getInfo()
},
//
async getInfo(){
let data = {
survey_id:this.survey_id
}
let res = await memberApi.jlSurveyInfo(data)
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.surveyInfo = res.data
},
}
}
</script>

Loading…
Cancel
Save