Compare commits

...

2 Commits

  1. 33
      api/apiRoute.js
  2. 2
      pages/coach/home/index.vue
  3. 30
      pages/coach/job/add.vue
  4. 95
      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 = {}) { physicalTestInfo(data = {}) {
let url = '/class/physicalTest/info' let url = '/class/physicalTest/info'

2
pages/coach/home/index.vue

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

30
pages/coach/job/add.vue

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

95
pages/coach/student/physical_examination.vue

@ -1,34 +1,86 @@
<!--体测数据-详情页--> <!--体测数据-详情页-->
<template> <template>
<view class="overall"> <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="content">
<view class="circle-container"> <view class="circle-container">
<view class="card-con-txt1-left"> <view class="card-con-txt1-left">
<image :src="$util.img('/uniapp_src/static/images/index/score.png')" class="overlay-image"></image> <image :src="$util.img('/uniapp_src/static/images/index/score.png')" class="overlay-image"></image>
</view> </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 class="card-con-txt1-left-txt top1">综合评分</view>
</view> </view>
<view style="height: 170rpx;"></view> <view style="height: 170rpx;"></view>
<view style="display: flex;justify-content: space-around;"> <view style="display: flex;justify-content: space-around;">
<view style="text-align: center;"> <view style="text-align: center;">
<view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">身高 (CM)</view> <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>
<view style="text-align: center;"> <view style="text-align: center;">
<view style="color: #AAAAAA;font-size: 30rpx;padding: 15rpx 0;">体重 (KG)</view> <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> </view>
<view class="coach-message"> <!-- <view class="coach-message">-->
<view> <!-- <view>-->
<image :src="$util.img('/uniapp_src/static/images/index/lv.png')" class="drop-image"></image> <!-- <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>
<view style="padding: 15rpx 0 0 5rpx;line-height: 1.6;font-size: 30rpx;color: #7F7F7F;">{{v.content}}</view>
</view> </view>
<view style="font-size: 45rpx;text-align: center;margin-top: 30%;">详细数据信息</view>
</view> </view>
</view> </view>
</template> </template>
@ -153,4 +205,29 @@ import apiRoute from '@/api/apiRoute.js';
align-items: center; 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> </style>
Loading…
Cancel
Save