Compare commits

...

2 Commits

  1. 33
      api/apiRoute.js
  2. 2
      pages/coach/home/index.vue
  3. 30
      pages/coach/job/add.vue
  4. 121
      pages/coach/student/physical_examination.vue

33
api/apiRoute.js

@ -143,6 +143,39 @@ export default {
//↓↓↓↓↓↓↓↓↓↓↓↓-----教练接口相关-----↓↓↓↓↓↓↓↓↓↓↓↓
//添加作业
jlPublishJob(data = {}) {
let url = '/class/jlPublishJob/add'
return http.get(url, data).then(res => {
return res;
})
},
//添加作业-学员列表
jlGetStudentList(data = {}) {
let url = '/class/jlGetStudentList/list'
return http.get(url, data).then(res => {
return res;
})
},
//添加作业-获取课程列表
jlGetCoursesList(data = {}) {
let url = '/class/jlGetCoursesList/list'
return http.get(url, data).then(res => {
return res;
})
},
//添加作业-获取班级列表
jlGetClassesList(data = {}) {
let url = '/class/jlGetClasses/list'
return http.get(url, data).then(res => {
return res;
})
},
//体测报告-详情
physicalTestInfo(data = {}) {
let url = '/class/physicalTest/info'

2
pages/coach/home/index.vue

@ -4,7 +4,7 @@
<view class="navbar_section">
<view class="left"></view>
<view class="title">待办</view>
<view class="right" @click="openObjAddView()">发布作业</view>
<view class="right" @click="openObjAddView()" style="padding: 178rpx 0 20rpx;">发布作业</view>
</view>
<view class="main_section">

30
pages/coach/job/add.vue

@ -101,7 +101,7 @@
<script>
import memberApi from '@/api/member.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
import apiRoute from '@/api/apiRoute.js';
//
const rules = [
// {
@ -158,10 +158,10 @@ export default {
content_type: '1',//()|1,2
content_text: '',//
classes_id: '',//id()
class_id: '',//id()
classes_id_name: '',//id()
students_ids: '',//id
student_id: '',//id
students_ids_name:'',//id()
}
}
@ -185,7 +185,7 @@ export default {
//
async getClassesList(){
let res = await memberApi.jlGetClassesList({})
let res = await apiRoute.jlGetClassesList({})
if(res.code != 1){
uni.showToast({
title: res.msg,
@ -196,14 +196,14 @@ export default {
this.options_class_arr = []
res.data.forEach((v,k)=>{
this.options_class_arr.push({
text: v.name,
text: v.class_name,
value: v.id,
})
})
},
//
async getCoursesList(){
let res = await memberApi.jlGetCoursesList({})
let res = await apiRoute.jlGetCoursesList({})
if(res.code != 1){
uni.showToast({
title: res.msg,
@ -215,7 +215,7 @@ export default {
this.options_course_arr = []
res.data.forEach((v,k)=>{
this.options_course_arr.push({
text: v.name,
text: v.course_name,
value: v.id,
})
})
@ -223,7 +223,7 @@ export default {
//
async getStudentList() {
let res = await memberApi.jlGetStudentList({})
let res = await apiRoute.jlGetStudentList({})
if (res.code != 1) {
uni.showToast({
title: res.msg,
@ -246,7 +246,7 @@ export default {
//-
changeClass(e) {
console.log('选择器-班级', e);
this.formData.classes_id = e.value; // class_id
this.formData.class_id = e.value; // class_id
this.formData.classes_id_name = e.text; // class_name
this.show_class = false; //
},
@ -267,7 +267,7 @@ export default {
name_arr.push(v.text)
})
//
this.formData.students_ids = id_arr.join(',')
this.formData.student_id = id_arr.join(',')
this.formData.students_ids_name = name_arr.join(',')
this.show_student = false; //
},
@ -280,11 +280,11 @@ export default {
//1=
if(e.detail.value == 1){
//
this.formData.students_ids = ''
this.formData.student_id = ''
this.formData.students_ids_name = ''
}else{
// 2=
this.formData.classes_id = ''
this.formData.class_id = ''
this.formData.classes_id_name = ''
}
},
@ -318,13 +318,13 @@ export default {
if(data.type == 1){
//
if(!data.classes_id){
if(!data.class_id){
this.showMsg('请选择班级')
return
}
}else{
//
if(!data.students_ids){
if(!data.student_id){
this.showMsg('请选择学员')
return
}
@ -337,7 +337,7 @@ export default {
}
//
let res = await memberApi.jlPublishJob(data)
let res = await apiRoute.jlPublishJob(data)
if (res.code != 1){
uni.showToast({
title: res.msg,

121
pages/coach/student/physical_examination.vue

@ -1,68 +1,120 @@
<!--体测数据-详情页-->
<template>
<view class="overall">
<view class="date">{{$util.formatToDateTime(surveyInfo.create_time,'Y-m-d')}}</view>
<view class="date">{{$util.formatToDateTime(surveyInfo.created_at,'Y-m-d')}}</view>
<view class="content">
<view class="circle-container">
<view class="card-con-txt1-left">
<image :src="$util.img('/uniapp_src/static/images/index/score.png')" class="overlay-image"></image>
</view>
<view class="card-con-txt1-left-txt">{{v.score}}</view>
<view class="card-con-txt1-left-txt">{{surveyInfo.calculateChildHealthScore}}</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;">{{(v.height * 100)}}</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;">{{v.weight}}</view>
<view style="font-size: 55rpx;color: #29d3b4;">{{surveyInfo.weight}}</view>
</view>
</view>
<view class="coach-message">
<view>
<image :src="$util.img('/uniapp_src/static/images/index/lv.png')" class="drop-image"></image>
<!-- <view class="coach-message">-->
<!-- <view>-->
<!-- <image :src="$util.img('/uniapp_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;">{{v.content}}</view>-->
<!-- </view>-->
<view class="list_box">
<view class="ul">
<view class="li">
<view class="li_title">坐位体前屈</view>
<view class="li_content">测试结果{{surveyInfo.seated_forward_bend}}</view>
</view>
<view class="li">
<view class="li_title">仰卧卷腹</view>
<view class="li_content">测试结果{{surveyInfo.sit_ups}}</view>
</view>
<view class="li">
<view class="li_title">九十度仰卧撑</view>
<view class="li_content">测试结果{{surveyInfo.push_ups}}</view>
</view>
<view class="li">
<view class="li_title">火烈鸟平衡测试</view>
<view class="li_content">测试结果{{surveyInfo.flamingo_balance}}</view>
</view>
<view class="li">
<view class="li_title">三十秒双脚连续跳</view>
<view class="li_content">测试结果{{surveyInfo.thirty_sec_jump}}</view>
</view>
<view class="li">
<view class="li_title">立定跳远</view>
<view class="li_content">测试结果{{surveyInfo.standing_long_jump}}</view>
</view>
<view class="li">
<view class="li_title">4乘10m灵敏折返跑</view>
<view class="li_content">测试结果{{surveyInfo.agility_run}}</view>
</view>
<view class="li">
<view class="li_title">走平衡木</view>
<view class="li_content">测试结果{{surveyInfo.balance_beam}}</view>
</view>
<view class="li">
<view class="li_title">网球掷远</view>
<view class="li_content">测试结果{{surveyInfo.tennis_throw}}</view>
</view>
<view class="li">
<view class="li_title">十米往返跑</view>
<view class="li_content">测试结果{{surveyInfo.ten_meter_shuttle_run}}</view>
</view>
</view>
<view style="padding: 15rpx 0 0 5rpx;line-height: 1.6;font-size: 30rpx;color: #7F7F7F;">{{v.content}}</view>
</view>
<view style="font-size: 45rpx;text-align: center;margin-top: 30%;">详细数据信息</view>
</view>
</view>
</template>
<script>
import memberApi from '@/api/member.js';
import apiRoute from '@/api/apiRoute.js';
import memberApi from '@/api/member.js';
import apiRoute from '@/api/apiRoute.js';
export default {
data() {
return {
survey_id:'',//id
survey_id: '', //id
surveyInfo:{},//
surveyInfo: {}, //
}
},
onLoad(options) {
this.survey_id = options.survey_id//id
this.survey_id = options.survey_id //id
},
onShow(){
onShow() {
this.init()
},
methods: {
//
async init(){
async init() {
this.getInfo()
},
//
async getInfo(){
async getInfo() {
let data = {
survey_id:this.survey_id
survey_id: this.survey_id
}
let res = await apiRoute.physicalTestInfo(data)
if(res.code != 1){
if (res.code != 1) {
uni.showToast({
title: res.msg,
icon: 'none'
@ -137,20 +189,45 @@ import apiRoute from '@/api/apiRoute.js';
transform: translate(-50%, -0%);
}
.top1{
.top1 {
top: 5%;
}
.coach-message{
.coach-message {
width: 92%;
margin: 10rpx auto;
display: flex;
}
.drop-image{
.drop-image {
width: 60rpx;
height: 60rpx;
align-items: center;
}
.list_box{
font-size: 30rpx;
text-align: center;
margin-top: 120rpx;
.ul{
padding: 0 20rpx;
display: flex;
flex-wrap: wrap; /* 允许换行 */
justify-content: space-between;
align-items: center;
gap: 20rpx;
.li{
width: 48%; /* 每个列表项占宽度的48%,留出一些间距 */
display: flex;
flex-direction: column;
gap: 5rpx;
.li_title{
text-align: left;
}
.li_content{
text-align: left;
}
}
}
}
</style>
Loading…
Cancel
Save