Browse Source

Merge branch 'master' of ssh://gitlab.frkj.cc:222/php/ZhiHuiJiaoWu_UniApp

master
王泽彦 1 year ago
parent
commit
c2f0719a4a
  1. 105
      api/apiRoute.js
  2. 12
      components/AQ/AQUplodeImgMulti.vue
  3. 364
      pages/coach/class/info.vue
  4. 20
      pages/coach/course/info_list.vue
  5. 45
      pages/coach/student/info.vue
  6. 16
      pages/coach/student/physical_examination.vue
  7. 67
      pages/common/feedback.vue
  8. 41
      pages/common/im_chat_info.vue
  9. 29
      pages/common/my_message.vue
  10. 112
      pages/student/index/index.vue
  11. 135
      pages/student/index/physical_examination.vue
  12. 35
      pages/student/my/personal_data.vue

105
api/apiRoute.js

@ -143,13 +143,27 @@ export default {
//↓↓↓↓↓↓↓↓↓↓↓↓-----教练接口相关-----↓↓↓↓↓↓↓↓↓↓↓↓ //↓↓↓↓↓↓↓↓↓↓↓↓-----教练接口相关-----↓↓↓↓↓↓↓↓↓↓↓↓
//体测报告-详情
physicalTestInfo(data = {}) {
let url = '/class/physicalTest/info'
return http.get(url, data).then(res => {
return res;
})
},
//体测报告-列表
physicalTest(data = {}) {
let url = '/class/physicalTest'
return http.get(url, data).then(res => {
return res;
})
},
//获取学员详情
jlStudentsInfo(data = {}) {
let url = '/class/jlStudentsInfo'
return http.get(url, data).then(res => {
return res;
})
},
//获取添加学员列表 //获取添加学员列表
addStudentList(data = {}) { addStudentList(data = {}) {
let url = '/course/addStudentList' let url = '/course/addStudentList'
@ -189,6 +203,13 @@ export default {
return http.get(url, data).then(res => { return http.get(url, data).then(res => {
return res; return res;
}) })
},
//获取班级课程列表
classCourseList(data = {}) {
let url = '/course/classCourseList'
return http.get(url, data).then(res => {
return res;
})
}, },
//获取课程详情 //获取课程详情
courseInfo(data = {}) { courseInfo(data = {}) {
@ -417,6 +438,76 @@ export default {
return res; return res;
}) })
}, },
//学生详情-修改
xy_memberEdit(data = {}) {
let url = '/customerResourcesAuth/edit'
return http.post(url, data).then(res => {
return res;
})
},
//学生-意见反馈-添加
xy_userFeedbackAdd(data = {}) {
let url = '/userFeedback/add'
return http.post(url, data).then(res => {
return res;
})
},
//学生端-获取好友关系绑定详情
xy_chatGetChatFriendsInfo(data = {}) {
let url = '/xy/chat/getChatFriendsInfo'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-获取聊天消息列表
xy_chatGetChatMessagesList(data = {}) {
let url = '/xy/chat/getChatMessagesList'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-发送聊天消息
xy_chatSendChatMessages(data = {}) {
let url = '/xy/chat/sendChatMessages'
return http.post(url, data).then(res => {
return res;
})
},
//学生端-好友关系列表
xy_chatGetChatFriendsList(data = {}) {
let url = '/xy/chat/getChatFriendsList'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-体测报告-列表
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;
})
},
//学生端-学生课程安排-列表
xy_personCourseSchedule(data = {}) {
let url = '/xy/personCourseSchedule'
return http.get(url, data).then(res => {
return res;
})
},

12
components/AQ/AQUplodeImgMulti.vue

@ -27,6 +27,11 @@ import {Api_url} from "../../common/config";
}, },
props: { props: {
//父组件参数 //父组件参数
//上传文件接口的url
uploadApiUrl:{
type: String,
default: `${Api_url}/file/image`
},
//表单名称 //表单名称
inputName: { inputName: {
type: String, type: String,
@ -48,7 +53,8 @@ import {Api_url} from "../../common/config";
return { return {
inputName: this.inputName, inputName: this.inputName,
inputValue: this.inputValue, inputValue: this.inputValue,
maxFileNum: this.maxFileNum maxFileNum: this.maxFileNum,
uploadApiUrl: this.uploadApiUrl
}; };
} }
}, },
@ -99,7 +105,7 @@ import {Api_url} from "../../common/config";
}, },
//上传接口地址 //上传接口地址
uploadApiUrl: `${Api_url}/file/image`, // uploadApiUrl: `${Api_url}/file/image`,
// 上传图片的样式 // 上传图片的样式
imageStyles: { imageStyles: {
@ -168,7 +174,7 @@ import {Api_url} from "../../common/config";
console.log('xxx',_arr) console.log('xxx',_arr)
this.fileList.push(_arr) this.fileList.push(_arr)
console.log('上传成功2',_arr); console.log('上传成功2',_arr);
this.filePathArr.push(res.data.path) this.filePathArr.push(res.data.url)
//上传成功 //上传成功
this.emitUploadSuccess(this.filePathArr) this.emitUploadSuccess(this.filePathArr)
}else{ }else{

364
pages/coach/class/info.vue

@ -2,9 +2,9 @@
<template> <template>
<view class="main_box"> <view class="main_box">
<!--自定义导航栏--> <!--自定义导航栏-->
<!-- <view class="navbar_section">--> <!-- <view class="navbar_section">-->
<!-- <view class="title">班级详情</view>--> <!-- <view class="title">班级详情</view>-->
<!-- </view>--> <!-- </view>-->
<view class="main_section"> <view class="main_section">
<view class="section_1"> <view class="section_1">
@ -21,14 +21,14 @@
校区:{{classInfo.campus_name}} 校区:{{classInfo.campus_name}}
</view> </view>
<!-- <view class="item"> <!-- <view class="item">
<!-- 课程:篮球少儿课 <!-- 课程:篮球少儿课
<!-- </view>--> <!-- </view>-->
<view class="item"> <view class="item">
人数:{{classInfo.classPersonnelRel.length}}人 人数:{{classInfo.classPersonnelRel.length}}人
</view> </view>
<!-- <!--
<view class="item"> <view class="item">
时间:{{classInfo.start_date}} - {{classInfo.end_date}} 时间:{{classInfo.start_date}} - {{classInfo.end_date}}
@ -36,29 +36,29 @@
</view> </view>
</view> </view>
<!-- <view class="section_2">--> <!-- <view class="section_2">-->
<!-- <view class="title_box">--> <!-- <view class="title_box">-->
<!-- <view>最近课程</view>--> <!-- <view>最近课程</view>-->
<!-- </view>--> <!-- </view>-->
<!-- <view class="tag_list">--> <!-- <view class="tag_list">-->
<!-- <view class="item" @click="openViewCourseInfo({id:1})">--> <!-- <view class="item" @click="openViewCourseInfo({id:1})">-->
<!-- <view class="title">--> <!-- <view class="title">-->
<!-- 篮球少儿课--> <!-- 篮球少儿课-->
<!-- </view>--> <!-- </view>-->
<!-- <view>--> <!-- <view>-->
<!-- 2020.05.30 15:30 - 17:30--> <!-- 2020.05.30 15:30 - 17:30-->
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
<!-- <view class="item" @click="openViewCourseInfo({id:2})">--> <!-- <view class="item" @click="openViewCourseInfo({id:2})">-->
<!-- <view class="title">--> <!-- <view class="title">-->
<!-- 篮球少儿课--> <!-- 篮球少儿课-->
<!-- </view>--> <!-- </view>-->
<!-- <view>--> <!-- <view>-->
<!-- 2020.05.30 15:30 - 17:30--> <!-- 2020.05.30 15:30 - 17:30-->
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
<view class="section_3"> <view class="section_3">
<view class="btn_box"> <view class="btn_box">
@ -74,12 +74,8 @@
<!-- 班级成员列表--> <!-- 班级成员列表-->
<view class="section_4" v-if="tabType=='1'"> <view class="section_4" v-if="tabType=='1'">
<view class="ul"> <view class="ul">
<view <view class="li" v-for="(v,k) in classInfo.classPersonnelRel" :key="k"
class="li" @click="openViewStudentInfo(v)">
v-for="(v,k) in classInfo.classPersonnelRel"
:key="k"
@click="openViewStudentInfo(v)"
>
<view class="left"> <view class="left">
<view class="box_1"> <view class="box_1">
<image class="pic" :src="$util.img(v.student.customerResources.member.headimg)"></image> <image class="pic" :src="$util.img(v.student.customerResources.member.headimg)"></image>
@ -94,11 +90,14 @@
</view> </view>
<view class="right"> <view class="right">
<view class="item"> <view class="item">
<view>{{ v.studentCoursesInfo.use_gift_hours + v.studentCoursesInfo.use_gift_hours }}</view> <view>{{ v.studentCoursesInfo.use_gift_hours + v.studentCoursesInfo.use_gift_hours }}
</view>
<view>已上课时</view> <view>已上课时</view>
</view> </view>
<view class="item"> <view class="item">
<view>{{ (v.studentCoursesInfo.total_hours + v.studentCoursesInfo.gift_hours) - (v.studentCoursesInfo.use_gift_hours + v.studentCoursesInfo.use_gift_hours) }}</view> <view>
{{ (v.studentCoursesInfo.total_hours + v.studentCoursesInfo.gift_hours) - (v.studentCoursesInfo.use_gift_hours + v.studentCoursesInfo.use_gift_hours) }}
</view>
<view>剩余课时</view> <view>剩余课时</view>
</view> </view>
</view> </view>
@ -107,64 +106,54 @@
</view> </view>
<!--课程计划--> <!--课程计划-->
<scroll-view <scroll-view v-if="tabType=='2'" class="section_5" scroll-y="true" :lower-threshold="lowerThreshold"
v-if="tabType=='2'" @scrolltolower="loadMoreData" style="height: 65vh;">
class="section_5"
scroll-y="true"
:lower-threshold="lowerThreshold"
@scrolltolower="loadMoreData"
style="height: 65vh;"
>
<view class="ul"> <view class="ul">
<view <view class="li" v-for="(v,k) in courseList" :key="k" @click="openViewCourseInfo(v)">
class="li"
v-for="(v,k) in courseList"
:key="k"
@click="openViewCourseInfo(v)"
>
<view class="top_box"> <view class="top_box">
<view class="title"> <view class="title">
课程:{{v.courses_name}} 课程:{{v.course.course_name}}
</view> </view>
<view class="title"> <view class="title">
时间:{{v.date}} 时间:{{v.course_date}}
</view> </view>
<view class="title"> <view class="title">
地点:{{v.address}} 地点:{{v.campus_name}}
</view> </view>
</view> </view>
<view class="bottom_box"> <view class="bottom_box">
<view class="item"> <view class="item">
<view class="left">应到学员({{v.max_students}})</view> <view class="left">应到学员({{v.student.length}})</view>
<view class="right"> <view class="right">
查看 查看
<fui-icon size="35" color="#fff" name="arrowright"></fui-icon> <fui-icon size="35" color="#fff" name="arrowright"></fui-icon>
</view> </view>
</view> </view>
<view class="item"> <view class="item">
<view class="left">已签到学生({{v.has_sign_count}}/{{v.max_students}})</view> <view class="left">已签到学生({{v.student_courses.length}}/{{v.student.length}})</view>
<view class="right"> <view class="right">
查看 查看
<fui-icon size="35" color="#fff" name="arrowright"></fui-icon> <fui-icon size="35" color="#fff" name="arrowright"></fui-icon>
</view> </view>
</view> </view>
<!-- <view class="item">--> <!-- <view class="item">-->
<!-- <view class="left">作业完成率(80%)</view>--> <!-- <view class="left">作业完成率(80%)</view>-->
<!-- <view class="right">--> <!-- <view class="right">-->
<!-- 查看--> <!-- 查看-->
<!-- <fui-icon size="35" color="#fff" name="arrowright"></fui-icon>--> <!-- <fui-icon size="35" color="#fff" name="arrowright"></fui-icon>-->
<!-- </view>--> <!-- </view>-->
<!-- </view>--> <!-- </view>-->
</view> </view>
<view class="tag" v-if="!(['1','2'].includes(String(v.status)))" style="background-color:#20CAAF;"> <view class="tag" v-if="isCourseFuture(v.student_courses[0].start_date)"
style="background-color:#20CAAF;">
未开始 未开始
</view> </view>
<view class="tag" v-if="v.status == 1" style="background-color:#fad24e;"> <view class="tag" v-if="isNowBetween(v.student_courses[0].start_date, v.student_courses[0].end_date)"
style="background-color:#fad24e;">
上课中 上课中
</view> </view>
<view class="tag" v-if="!isCourseFuture(v.student_courses[0].end_date)" style="background-color:#e2e2e2;">
<view class="tag" v-if="v.status == 2" style="background-color:#e2e2e2;">
已结束 已结束
</view> </view>
</view> </view>
@ -172,45 +161,45 @@
</scroll-view> </scroll-view>
</view> </view>
<!-- 底部导航--> <!-- 底部导航-->
<!-- <AQTabber/>--> <!-- <AQTabber/>-->
</view> </view>
</template> </template>
<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'; import apiRoute from '@/api/apiRoute.js';
export default { export default {
components: { components: {
AQTabber, AQTabber,
}, },
data() { data() {
return { return {
class_id:'',//班级id class_id: '', //班级id
classInfo:{},//班级数据 classInfo: {}, //班级数据
classMemberList:{},//班级成员 classMemberList: {}, //班级成员
tabType:'1',//1=班级成员,2=课程计划 tabType: '1', //1=班级成员,2=课程计划
loading: false,//加载状态 loading: false, //加载状态
lowerThreshold: 100,//距离底部多远触发 lowerThreshold: 100, //距离底部多远触发
isReachedBottom: false,//防止重复加载|true=不可加载|false=可加载 isReachedBottom: false, //防止重复加载|true=不可加载|false=可加载
//筛选条件 //筛选条件
filteredData: { filteredData: {
page: 1,//当前页码 page: 1, //当前页码
limit: 10,//每页返回数据条数 limit: 10, //每页返回数据条数
total: 10,//数据总条数 total: 10, //数据总条数
class_id: '',//班级id class_id: '', //班级id
}, },
courseList:[],//课程计划数据 courseList: [], //课程计划数据
} }
}, },
onLoad(options) { onLoad(options) {
this.class_id = options.class_id//课程id this.class_id = options.class_id //课程id
}, },
onShow() { onShow() {
this.init() this.init()
@ -223,25 +212,41 @@ export default {
}, },
methods: { methods: {
async init(){ async init() {
// member/course_list//课程列表 // member/course_list//课程列表
// member/class_info//班级详情+成员详情 // member/class_info//班级详情+成员详情
this.getClassInfo()//获取班级详情 this.getClassInfo() //获取班级详情
//await this.getCourseList()//获取课程列表 await this.getCourseList() //获取课程列表
}, },
isNowBetween(start_date, end_date) {
const now = new Date();
const start = new Date(start_date);
const end = new Date(end_date);
return now >= start && now <= end;
},
isCourseFuture(courseDate) {
const courseTime = new Date(courseDate).getTime();
const nowTime = new Date().getTime();
return courseTime > nowTime;
},
//教练端-获取班级详情 //教练端-获取班级详情
async getClassInfo(){ async getClassInfo() {
let res = await apiRoute.jlClassInfo({class_id:this.class_id})//班级详情 let res = await apiRoute.jlClassInfo({
if(res.code != 1){ class_id: this.class_id
}) //班级详情
if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'
}) })
return return
} }
console.log('获取班级列表',res.data) console.log('获取班级列表', res.data)
this.classInfo = res.data this.classInfo = res.data
this.classMemberList = res.data.students_list this.classMemberList = res.data.students_list
}, },
@ -251,7 +256,7 @@ export default {
loadMoreData() { loadMoreData() {
//判断是否加载 //判断是否加载
if (!this.isReachedBottom) { if (!this.isReachedBottom) {
this.isReachedBottom = true;//设置为不可请求状态 this.isReachedBottom = true; //设置为不可请求状态
this.getCourseList(); this.getCourseList();
} }
}, },
@ -259,19 +264,21 @@ export default {
async loadData() { async loadData() {
this.isReachedBottom = false; // 重置状态,以便下次触发加载更多 this.isReachedBottom = false; // 重置状态,以便下次触发加载更多
this.filteredData.page = 1//当前页码 this.filteredData.page = 1 //当前页码
this.filteredData.limit = 10//每页返回数据条数 this.filteredData.limit = 10 //每页返回数据条数
this.filteredData.total = 10//数据总条数 this.filteredData.total = 10 //数据总条数
}, },
//教练端-获取课程列表 //教练端-获取课程列表
async getCourseList(){ async getCourseList() {
let data = {...this.filteredData} let data = {
...this.filteredData
}
data.class_id = this.class_id data.class_id = this.class_id
console.log(12123,this.courseList) console.log(12123, this.courseList)
if(data.page == 1){ if (data.page == 1) {
this.courseList = [] this.courseList = []
} }
@ -285,7 +292,7 @@ export default {
return return
} }
let res = await memberApi.courseList(data) let res = await apiRoute.classCourseList(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1) { if (res.code != 1) {
@ -297,10 +304,10 @@ export default {
} }
this.courseList = this.courseList.concat(res.data.list.data)// 使用 concat 方法 将新数据追加到数组中 this.courseList = this.courseList.concat(res.data.data) // 使用 concat 方法 将新数据追加到数组中
this.filteredData.total = res.data.list.total this.filteredData.total = res.data.total
console.log('获取课程列表',this.courseList) console.log('获取课程列表', this.courseList)
this.filteredData.page++ this.filteredData.page++
}, },
@ -313,36 +320,36 @@ export default {
}, },
//打开课程详情 //打开课程详情
openViewCourseInfo(item){ openViewCourseInfo(item) {
let id= item.id let id = item.id
uni.navigateTo({ uni.navigateTo({
url: `/pages/coach/course/info_list?id=${id}` url: `/pages/coach/course/info_list?id=${id}`
}) })
}, },
//打开学员详情页 //打开学员详情页
openViewStudentInfo(item){ openViewStudentInfo(item) {
let students_id = item.id let students_id = item.student.id
uni.navigateTo({ uni.navigateTo({
url: `/pages/coach/student/info?students_id=${students_id}` url: `/pages/coach/student/info?students_id=${students_id}`
}) })
}, },
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.main_box {
background: #292929;
}
.main_box{ //自定义导航栏
background: #292929 ; .navbar_section {
}
//自定义导航栏
.navbar_section{
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: #292929; background: #292929;
.title{
.title {
padding: 40rpx 0rpx; padding: 40rpx 0rpx;
/* 小程序端样式 */ /* 小程序端样式 */
@ -354,9 +361,9 @@ export default {
font-size: 30rpx; font-size: 30rpx;
color: #fff; color: #fff;
} }
} }
.main_section{ .main_section {
min-height: 100vh; min-height: 100vh;
background: #292929 100%; background: #292929 100%;
padding: 0 24rpx; padding: 0 24rpx;
@ -372,36 +379,43 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 38rpx; gap: 38rpx;
.left{
.left {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 12rpx; gap: 12rpx;
.pic{
.pic {
width: 92rpx; width: 92rpx;
height: 92rpx; height: 92rpx;
border-radius: 50%; border-radius: 50%;
} }
} }
.right{
.right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12rpx; gap: 12rpx;
.item {} .item {}
} }
} }
.section_2{ .section_2 {
margin-top: 42rpx; margin-top: 42rpx;
.title_box{
.title_box {
font-size: 32rpx; font-size: 32rpx;
} }
.tag_list{
.tag_list {
margin-top: 26rpx; margin-top: 26rpx;
display: flex; display: flex;
align-items: center; align-items: center;
gap: 26rpx; gap: 26rpx;
.item{
.item {
padding-left: 20rpx; padding-left: 20rpx;
width: 330rpx; width: 330rpx;
height: 162rpx; height: 162rpx;
@ -416,22 +430,24 @@ export default {
} }
//按钮切换 //按钮切换
.section_3{ .section_3 {
margin-top: 54rpx; margin-top: 54rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.btn_box{
.btn_box {
width: 698rpx; width: 698rpx;
border-radius: 8rpx; border-radius: 8rpx;
background-color: rgba(22,132,252,1); background-color: rgba(22, 132, 252, 1);
border: 1rpx solid rgba(22,132,252,1); border: 1rpx solid rgba(22, 132, 252, 1);
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
overflow: hidden; overflow: hidden;
.btn{
.btn {
width: 100%; width: 100%;
height: 76rpx; height: 76rpx;
line-height: 76rpx; line-height: 76rpx;
@ -439,7 +455,8 @@ export default {
color: #fff; color: #fff;
font-size: 26rpx; font-size: 26rpx;
} }
.select{
.select {
color: #1684fc; color: #1684fc;
background-color: #fff; background-color: #fff;
} }
@ -448,35 +465,41 @@ export default {
} }
//班级成员列表 //班级成员列表
.section_4{ .section_4 {
margin-top: 40rpx; margin-top: 40rpx;
.ul{
.ul {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10rpx; gap: 10rpx;
.li{
.li {
padding: 20rpx 0; padding: 20rpx 0;
padding-bottom: 40rpx; padding-bottom: 40rpx;
border-bottom: 2px solid #D7D7D7; border-bottom: 2px solid #D7D7D7;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.left{
.left {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 30rpx; gap: 30rpx;
.box_1{
.box_1 {
padding-left: 20rpx; padding-left: 20rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: relative; position: relative;
.pic{
.pic {
width: 84rpx; width: 84rpx;
height: 84rpx; height: 84rpx;
border-radius: 50%; border-radius: 50%;
} }
.tag_box{
.tag_box {
position: absolute; position: absolute;
bottom: -30rpx; bottom: -30rpx;
width: 120rpx; width: 120rpx;
@ -488,39 +511,47 @@ export default {
font-size: 20rpx; font-size: 20rpx;
} }
} }
.box_2{
.box_2 {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 20rpx; gap: 20rpx;
.name{
.name {
font-size: 28rpx; font-size: 28rpx;
} }
.date{
.date {
font-size: 24rpx; font-size: 24rpx;
} }
} }
} }
.right{
.right {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 14rpx; gap: 14rpx;
.item{
.item {
border: 1px solid #00E5BB; border: 1px solid #00E5BB;
border-radius: 10rpx; border-radius: 10rpx;
width: 102rpx; width: 102rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
view{
view {
text-align: center; text-align: center;
height: 50rpx; height: 50rpx;
line-height: 50rpx; line-height: 50rpx;
} }
view:nth-child(1){
view:nth-child(1) {
font-size: 32rpx; font-size: 32rpx;
background-color: #fff; background-color: #fff;
color: #00e5bb; color: #00e5bb;
} }
view:nth-child(2){
view:nth-child(2) {
font-size: 20rpx; font-size: 20rpx;
background-color: #00e5bb; background-color: #00e5bb;
} }
@ -532,47 +563,54 @@ export default {
} }
//课程计划 //课程计划
.section_5{ .section_5 {
margin-top: 36rpx; margin-top: 36rpx;
.ul{
.ul {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 30rpx; gap: 30rpx;
.li{
.li {
position: relative; position: relative;
border-radius: 10rpx; border-radius: 10rpx;
background-color: rgba(63,63,67,1); background-color: rgba(63, 63, 67, 1);
border: 2rpx solid rgba(0,229,187,1); border: 2rpx solid rgba(0, 229, 187, 1);
padding: 20rpx 14rpx; padding: 20rpx 14rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.top_box{
.top_box {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10rpx; gap: 10rpx;
.title{
color: rgba(255,255,255,1); .title {
color: rgba(255, 255, 255, 1);
font-size: 24rpx; font-size: 24rpx;
} }
} }
.bottom_box{
.bottom_box {
padding-top: 10rpx; padding-top: 10rpx;
margin-top: 20rpx; margin-top: 20rpx;
border-top: 1px dashed #F2F2F2; border-top: 1px dashed #F2F2F2;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10rpx; gap: 10rpx;
.item{
.item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
color: rgba(215,215,215,1); color: rgba(215, 215, 215, 1);
font-size: 24rpx; font-size: 24rpx;
} }
} }
.tag{
.tag {
position: absolute; position: absolute;
right: 0rpx; right: 0rpx;
top: 0rpx; top: 0rpx;
@ -580,11 +618,11 @@ export default {
height: 60rpx; height: 60rpx;
line-height: 58rpx; line-height: 58rpx;
border-radius: 0rpx 8rpx 0rpx 24rpx; border-radius: 0rpx 8rpx 0rpx 24rpx;
background-color: rgba(32,202,175,1); background-color: rgba(32, 202, 175, 1);
color: rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
font-size: 24rpx; font-size: 24rpx;
text-align: center; text-align: center;
border: 0rpx solid rgba(121,121,121,1); border: 0rpx solid rgba(121, 121, 121, 1);
} }
} }
} }
@ -596,7 +634,5 @@ export default {
} }
</style> </style>

20
pages/coach/course/info_list.vue

@ -11,11 +11,11 @@
<view class="isbtn" @click="addStudent"> <view class="isbtn" @click="addStudent">
添加学员 添加学员
</view> </view>
<view v-if="courseInfo.status == 'ongoing'" class="tag" style="background-color: #FAD24E;">上课中 <view v-if="isNowBetween(courseInfo.student_courses[0].start_date, courseInfo.student_courses[0].end_date)" class="tag" style="background-color: #FAD24E;">上课中
</view> </view>
<view v-if="courseInfo.status == 'completed'" class="tag" style="background-color: #e2e2e2;">已结束 <view v-if="!isCourseFuture(courseInfo.student_courses[0].end_date)" class="tag" style="background-color: #e2e2e2;">已结束
</view> </view>
<view v-if="courseInfo.status == 'pending'" class="tag" style="background-color: #1cd188;">未开始 <view v-if="isCourseFuture(courseInfo.student_courses[0].start_date)" class="tag" style="background-color: #1cd188;">未开始
</view> </view>
</view> </view>
@ -190,6 +190,20 @@
this.getCourseInfo() this.getCourseInfo()
}, },
isNowBetween(start_date, end_date) {
const now = new Date();
const start = new Date(start_date);
const end = new Date(end_date);
return now >= start && now <= end;
},
isCourseFuture(courseDate) {
const courseTime = new Date(courseDate).getTime();
const nowTime = new Date().getTime();
return courseTime > nowTime;
},
//教练端-课程详情 //教练端-课程详情
async getCourseInfo() { async getCourseInfo() {
let res = await apiRoute.courseInfo({ let res = await apiRoute.courseInfo({

45
pages/coach/student/info.vue

@ -10,23 +10,24 @@
<view class="user_section"> <view class="user_section">
<view class="box"> <view class="box">
<view class="left"> <view class="left">
<image class="pic" :src="$util.img(studentsInfo.header)"></image> <image class="pic" :src="$util.img(studentsInfo.customerResources.member.headimg)"></image>
<view class="btn_box" v-if="checkExpireTime(studentsInfo.expire_time)"> <!-- <view class="btn_box" v-if="checkExpireTime(studentsInfo.expire_time)">
<view class="btn">即将到期</view> <view class="btn">即将到期</view>
</view> </view> -->
</view> </view>
<view class="right"> <view class="right">
<view class="item"> <view class="item">
<view class="name">{{studentsInfo.name}}</view> <view class="name">{{studentsInfo.name}}</view>
<view class="age"> <view class="age">
{{studentsInfo.age}}岁 <!-- {{formatAgeMonth(studentsInfo.age)}} -->
{{studentsInfo.customerResources.age}}岁
</view> </view>
</view> </view>
<!-- <view class="item">--> <!-- <view class="item">-->
<!-- <view class="title">家长姓名:黄大呢</view>--> <!-- <view class="title">家长姓名:黄大呢</view>-->
<!-- </view>--> <!-- </view>-->
<view class="item"> <view class="item">
<view class="title">电话:{{studentsInfo.phone}}</view> <view class="title">电话:{{studentsInfo.customerResources.phone_number}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -111,10 +112,10 @@
:key="k" @click="openViewPhysicalExamination(v)" :key="k" @click="openViewPhysicalExamination(v)"
> >
<view class="top"> <view class="top">
<view class="title">综合评分:{{v.score}}</view> <view class="title">综合评分:{{v.calculateChildHealthScore}}</view>
<!-- <view class="hint">打败了99%学员</view>--> <!-- <view class="hint">打败了99%学员</view>-->
</view> </view>
<view class="bottom">测试时间:{{v.create_time}}</view> <view class="bottom">测试时间:{{$util.formatToDateTime(v.created_at, 'Y-m-d')}}</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -133,7 +134,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';
export default { export default {
components: { components: {
@ -157,14 +158,13 @@ export default {
page:1,//当前页码 page:1,//当前页码
limit:10,//每页返回数据条数 limit:10,//每页返回数据条数
total:10,//数据总条数 total:10,//数据总条数
students_id: '',//学员id user_id: '',//学员id
}, },
surveyList:[],//体测报告列表 surveyList:[],//体测报告列表
} }
}, },
onLoad(options) { onLoad(options) {
this.students_id = options.students_id//学生id this.students_id = options.students_id//学生id
this.filteredData.students_id = options.students_id//学生id
}, },
onShow(){ onShow(){
this.init()//初始化 this.init()//初始化
@ -174,14 +174,26 @@ export default {
async init(){ async init(){
//获取学生详情 //获取学生详情
await this.getStudentsInfo() await this.getStudentsInfo()
this.getSurveyList() await this.getSurveyList()
},
formatAgeMonth(input) {
let str = String(input);
// 分割小数点前后部分
let [yearPart, monthPart] = str.split('.');
// 如果没有小数部分,默认为 0
if (!monthPart) {
monthPart = '00';
}
// 如果是 00,则显示为 0
monthPart = monthPart === '00' ? '0' : monthPart;
return `${yearPart}岁${monthPart}月`;
}, },
//获取学生详情 //获取学生详情
async getStudentsInfo(){ async getStudentsInfo(){
let data = { let data = {
students_id:this.students_id students_id:this.students_id
} }
let res = await memberApi.jlStudentsInfo(data) let res = await apiRoute.jlStudentsInfo(data)
if (res.code != 1){ if (res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -192,7 +204,8 @@ export default {
this.studentsInfo = res.data//学生信息 this.studentsInfo = res.data//学生信息
this.assignmentsList = res.data.assignments_list//作业列表 this.assignmentsList = res.data.physical_test//作业列表
this.filteredData.user_id = res.data.user_id
}, },
// 检查 expire_time 是否大于等于当前时间 5 天 // 检查 expire_time 是否大于等于当前时间 5 天
@ -253,7 +266,7 @@ export default {
} }
//学员-体测列表 //学员-体测列表
let res = await memberApi.surveyList(data) let res = await apiRoute.physicalTest(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1){
@ -264,10 +277,10 @@ export default {
return return
} }
this.surveyList = this.surveyList.concat(res.data.list.data); // 使用 concat 方法 将新数据追加到数组中 this.surveyList = this.surveyList.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中
console.log('列表',this.surveyList) console.log('列表',this.surveyList)
this.filteredData.total = res.data.list.total this.filteredData.total = res.data.total
this.filteredData.page++ this.filteredData.page++
}, },

16
pages/coach/student/physical_examination.vue

@ -1,4 +1,4 @@
<!--体测数据--> <!--体测数据-详情页-->
<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.create_time,'Y-m-d')}}</view>
@ -8,34 +8,34 @@
<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">{{surveyInfo.score}}</view> <view class="card-con-txt1-left-txt">{{v.score}}</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;">{{surveyInfo.height}}</view> <view style="font-size: 55rpx;color: #29d3b4;">{{(v.height * 100)}}</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;">{{surveyInfo.weight}}</view> <view style="font-size: 55rpx;color: #29d3b4;">{{v.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>
<view style="padding: 15rpx 0 0 5rpx;line-height: 1.6;font-size: 30rpx;color: #7F7F7F;">{{surveyInfo.content}}</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 style="font-size: 45rpx;text-align: center;margin-top: 30%;">详细数据信息</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js';
import apiRoute from '@/api/apiRoute.js';
export default { export default {
data() { data() {
return { return {
@ -61,7 +61,7 @@ import memberApi from '@/api/member.js';
let data = { let data = {
survey_id:this.survey_id survey_id:this.survey_id
} }
let res = await memberApi.jlSurveyInfo(data) let res = await apiRoute.physicalTestInfo(data)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,

67
pages/common/feedback.vue

@ -5,28 +5,28 @@
<view class="main_section"> <view class="main_section">
<view class="section"> <view class="section">
<view class="text_input"> <view class="text_input">
<fui-textarea placeholder="请输入反馈内容" v-model="formData.content"></fui-textarea> <fui-textarea placeholder="请输入反馈内容" v-model="formData.feedback_text"></fui-textarea>
</view> </view>
</view> </view>
<view class="section"> <view class="section">
<view class="upload_box"> <view class="upload_box">
<view>上传图片</view> <view>上传图片</view>
<AQUplodeImgMulti :inputName="`images_arr`" :inputValue="formData.images_arr || []" <AQUplodeImgMulti :inputName="`attachment_url_arr`" :inputValue="formData.attachment_url_arr || []" :uploadApiUrl="uploadApiUrl" :maxFileNum="1"
@AQUploadSuccess="AQUploadSuccess" /> @AQUploadSuccess="AQUploadSuccess" />
</view> </view>
</view> </view>
<view class="section"> <!-- <view class="section">-->
<view class="input_box"> <!-- <view class="input_box">-->
<fui-input label="邮箱方式" borderTop placeholder="请输入邮箱" v-model="formData.mailbox"></fui-input> <!-- <fui-input label="邮箱方式" borderTop placeholder="请输入邮箱" v-model="formData.mailbox"></fui-input>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="describe"> <!-- <view class="describe">-->
反馈的相关问题会第一时间通过邮箱解答。 <!-- 反馈的相关问题会第一时间通过邮箱解答。-->
</view> <!-- </view>-->
<view class="btn" @click="submitForm()">提交</view> <view class="btn" @click="submitForm()">提交</view>
</view> </view>
@ -34,9 +34,13 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js';
import AQUplodeImgMulti from '@/components/AQ/AQUplodeImgMulti'; import AQUplodeImgMulti from '@/components/AQ/AQUplodeImgMulti';
import AQTabber from "@/components/AQ/AQTabber" import AQTabber from "@/components/AQ/AQTabber"
import {
Api_url
} from "@/common/config.js";
export default { export default {
@ -46,16 +50,40 @@
}, },
data() { data() {
return { return {
uploadApiUrl:`${Api_url}/memberUploadImage`,//上传文件接口的url
formData: { formData: {
images_arr: [], attachment_url_arr: [],
images:'', attachment_url:undefined,//图片地址,多个使用,号拼接
content:'', feedback_text:'',//反馈内容
mailbox:'', user_id:'',//用户ID|school_customer_resources表id
}, },
} }
}, },
onLoad() {}, onLoad() {},
onShow(){
this.init()
},
methods: { methods: {
async init(){
//获取学生详情
await this.getMemberInfo()
},
//获取学员信息
async getMemberInfo() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.formData.user_id = res.data.id
console.log('xxxx',res.data)
},
//######AQ上传文件组件相关###### //######AQ上传文件组件相关######
// 上传文件回调 // 上传文件回调
AQUploadSuccess(res) { AQUploadSuccess(res) {
@ -67,13 +95,16 @@
} }
this.formData[res.inputName] = _inputValue this.formData[res.inputName] = _inputValue
// console.log('接收AQ上传回调xxx1',res) // console.log('接收AQ上传回调xxx1',res)
// console.log('接收AQ上传回调xxx2',this.formData.member_store_certification_arr) // console.log('接收AQ上传回调xxx2',this.formData[res.inputName])
}, },
async submitForm() { async submitForm() {
let data = {...this.formData} let data = {...this.formData}
data.images = data.images_arr.join(',') if(data.attachment_url_arr.length){
if(!data.content){ data.attachment_url = data.attachment_url_arr.join(',')
}
if(!data.feedback_text){
//反馈内容为必填项 //反馈内容为必填项
uni.showToast({ uni.showToast({
title:'反馈内容为必填项', title:'反馈内容为必填项',
@ -81,7 +112,7 @@
}) })
return return
} }
let res = await memberApi.setFeedback(data) let res = await apiRoute.xy_userFeedbackAdd(data)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title:res.msg, title:res.msg,

41
pages/common/im_chat_info.vue

@ -102,7 +102,7 @@ export default {
}, },
data() { data() {
return { return {
uploadUrl: `${Api_url}/uploadImage`, uploadUrl: `${Api_url}/uploadImage`,//图片文件上传路径|默认为员工端上传文件
scrollTop:'',//滚动条位置,用于加载第一页后滚动到底部 scrollTop:'',//滚动条位置,用于加载第一页后滚动到底部
@ -182,6 +182,8 @@ export default {
this.formData.from_type = 'customer'//学生 this.formData.from_type = 'customer'//学生
this.formData.from_id = this.to_id//发送者的id(学生) this.formData.from_id = this.to_id//发送者的id(学生)
this.formData.to_id = this.from_id//接收者的id(员工) this.formData.to_id = this.from_id//接收者的id(员工)
this.uploadUrl = `${Api_url}/memberUploadImage`//图片文件上传路径|学生端端上传文件
} }
//获取好友关系详情 //获取好友关系详情
await this.getChatFriendsInfo() await this.getChatFriendsInfo()
@ -200,7 +202,17 @@ export default {
personnel_id: this.chatFriendsInfoParams.personnel_id,//员工资源ID personnel_id: this.chatFriendsInfoParams.personnel_id,//员工资源ID
customer_resources_id: this.chatFriendsInfoParams.customer_resources_id,//学生资源ID customer_resources_id: this.chatFriendsInfoParams.customer_resources_id,//学生资源ID
} }
let res = await apiRoute.xs_chatGetChatFriendsInfo(params)
let res
if( this.from_type == 'personnel'){
//员工
res = await apiRoute.xs_chatGetChatFriendsInfo(params)
}else{
//学生
res = await apiRoute.xy_chatGetChatFriendsInfo(params)
}
if (res.code != 1){ if (res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -253,7 +265,17 @@ export default {
this.tableList = [] this.tableList = []
} }
let res = await apiRoute.xs_chatGetChatMessagesList(data)//获取消息列表
let res
if( this.from_type == 'personnel'){
//员工
res = await apiRoute.xs_chatGetChatMessagesList(data)//获取消息列表
}else{
//学生
res = await apiRoute.xy_chatGetChatMessagesList(data)//获取消息列表
}
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1){
@ -327,7 +349,16 @@ export default {
}) })
return return
} }
let res = await apiRoute.xs_chatSendChatMessages(data)
let res
if( this.from_type == 'personnel'){
//员工
res = await apiRoute.xs_chatSendChatMessages(data)
}else{
//学生
res = await apiRoute.xy_chatSendChatMessages(data)
}
if (res.code != 1) { if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -370,7 +401,7 @@ export default {
this.moreShow = false this.moreShow = false
}, },
//但文件上传回调 //文件上传回调
uplodeImageRes(resData,extraData){ uplodeImageRes(resData,extraData){
console.log('上传成功回调',resData,extraData) console.log('上传成功回调',resData,extraData)
//判断是不是上传相册图片 //判断是不是上传相册图片

29
pages/common/my_message.vue

@ -103,11 +103,12 @@ export default {
}else{ }else{
//获取学生用户详情 //获取学生用户详情
this.from_type = 'customer'//学生 this.from_type = 'customer'//学生
await this.getMemberInit()
} }
this.getContactList() this.getContactList()
}, },
//获取用户详情 //获取员工用户详情
async getPersonnelUserInfo(){ async getPersonnelUserInfo(){
let data = {} let data = {}
let res = await apiRoute.getPersonnelInfo(data); let res = await apiRoute.getPersonnelInfo(data);
@ -130,6 +131,20 @@ export default {
this.filteredData.personnel_id = res.data.id this.filteredData.personnel_id = res.data.id
}, },
//获取学员用户信息
async getMemberInit() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.member_info = res.data
this.filteredData.customer_resources_id = res.data.id//学生资源的id
},
//获取联系人列表 //获取联系人列表
async getContactList(){ async getContactList(){
let params = {...this.filteredData} let params = {...this.filteredData}
@ -147,7 +162,17 @@ export default {
this.contactList = [] this.contactList = []
} }
let res = await apiRoute.xs_chatGetChatFriendsList(params) let res
//1=教练,2=销售,3=学员
if (['1', '2'].includes(String(this.userType))) {
//员工
res = await apiRoute.xs_chatGetChatFriendsList(params)
}else{
//学生
res = await apiRoute.xy_chatGetChatFriendsList(params)
}
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;

112
pages/student/index/index.vue

@ -29,37 +29,39 @@
<view class="card-con-txt1"> <view class="card-con-txt1">
<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 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 class="card-con-txt1-left-txt top1">综合评分</view>
</view> </view>
<view class="card-con-txt1-right"> <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 style="display: flex;justify-content: space-around;margin-top: 20rpx;">
<view> <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 style="color: #AAAAAA;font-size: 30rpx;">身高(CM)</view>
</view> </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 style="color: #AAAAAA;font-size: 30rpx;">体重(KG)</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="more" @click="physical_examination(memberIndexData)">更多</view> <view class="more" @click="physical_examination()">更多</view>
</view> </view>
<view class="upcomin-classes"> <view class="upcomin-classes" v-if="personCourseScheduleInfo.id">
<view class="upcomin-classes-div"> <view class="upcomin-classes-div">
<view class="upcomin-classes-div-con"> <view class="upcomin-classes-div-con">
<view class="upcomin-classes-div-con-left">课程预告</view> <view class="upcomin-classes-div-con-left">课程预告</view>
<view class="upcomin-classes-div-con-centre"
style="width: 2rpx;height: 60rpx;background-color: #fff;margin-left: 25rpx;"></view> <view class="centre_box">
<view style="margin-left: 25rpx;"> <view class="upcomin-classes-div-con-centre"></view>
<view>{{$util.formatToDateTime(memberIndexData.kcyg.date_time,'m-d')}} {{memberIndexData.kcyg.weekday}} {{memberIndexData.kcyg.time_slot[0]}}-{{memberIndexData.kcyg.time_slot[1]}}</view> <view class="centre">
<view>{{memberIndexData.kcyg.address}} {{memberIndexData.kcyg.courses_name}}</view> <view>{{$util.formatToDateTime(personCourseScheduleInfo.course_date,'m-d')}} {{personCourseScheduleInfo.time_slot}}</view>
<view style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{personCourseScheduleInfo.venue.venue_name}} {{personCourseScheduleInfo.course.course_name}}xxxx123123</view>
</view>
</view> </view>
<view class="upcomin-classes-div-con-right" @click="openViewTimetableInfo(memberIndexData.kcyg)"> <view class="upcomin-classes-div-con-right" @click="openViewTimetableInfo(personCourseScheduleInfo)">
详情 详情
</view> </view>
</view> </view>
@ -170,6 +172,17 @@
}, },
thisPath:'',//当前页面的路径(默认'') thisPath:'',//当前页面的路径(默认'')
openPath:'',//正确的跳转路径(默认'') openPath:'',//正确的跳转路径(默认'')
physicalTestInfo:{
created_at:'',//测评时间
calculateChildHealthScore:'0',//综合评分
height:'0',//身高
weight:'0',//体重
},//体测报告详情
personCourseScheduleInfo:{
id:'',
},//课程安排详情
} }
}, },
onLoad() { onLoad() {
@ -186,11 +199,61 @@
//学生页面初始化 //学生页面初始化
async init(){ async init(){
await this.member_init() await this.member_init()
await this.getPhysicalTestList()
await this.getPersonCourseScheduleList()
this.getMemberIndex() this.getMemberIndex()
this.getList() this.getList()
this.getJobAssignmentsInfo() 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 getPersonCourseScheduleList(){
let params = {
page: 1,//当前页码
limit: 1,//每页返回数据条数
total: 1,//数据总条数
resources_id:this.member_info.id,//学生资源表id
}
let res = await apiRoute.xy_personCourseSchedule(params)
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
}
console.log('kc',res.data)
let arr = res.data.data
if(arr.length){
this.personCourseScheduleInfo = arr[0]
}
},
async openViewHome_COPY(){ async openViewHome_COPY(){
@ -301,10 +364,10 @@
}) })
}, },
//跳转体测列表 //跳转体测列表
physical_examination(e){ physical_examination(){
let students_id = e.students_id let resource_id = this.member_info.id
uni.navigateTo({ uni.navigateTo({
url: `/pages/student/index/physical_examination?students_id=${students_id}` url: `/pages/student/index/physical_examination?resource_id=${resource_id}`
}) })
}, },
//跳转作业列表页 //跳转作业列表页
@ -664,23 +727,27 @@
.upcomin-classes-div-con { .upcomin-classes-div-con {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
color: #fff; color: #fff;
} padding: 0 40rpx;
.upcomin-classes-div-con-left { .upcomin-classes-div-con-left {
width: 60rpx; width: 60rpx;
margin-left: 80rpx;
text-align: right; text-align: right;
} }
.centre_box{
display: flex;
align-items: center;
.upcomin-classes-div-con-centre { .upcomin-classes-div-con-centre {
margin: 0 20rpx;
width: 2rpx; width: 2rpx;
height: 60rpx; height: 60rpx;
background-color: #fff; background-color: #fff;
margin-left: 25rpx;
} }
.centre{
width:80%;
}
}
.upcomin-classes-div-con-right { .upcomin-classes-div-con-right {
width: 100rpx; width: 100rpx;
height: 50rpx; height: 50rpx;
@ -688,8 +755,9 @@
text-align: center; text-align: center;
line-height: 50rpx; line-height: 50rpx;
border-radius: 50rpx; border-radius: 50rpx;
margin-left: 80rpx;
} }
}
.after-class { .after-class {
background-color: #292929; background-color: #292929;

135
pages/student/index/physical_examination.vue

@ -1,4 +1,4 @@
<!--体测数据-详情--> <!--体测数据-列表详情-->
<template> <template>
<view class="overall"> <view class="overall">
@ -11,33 +11,85 @@
> >
<view class="item" v-for="(v,k) in tableList" :key="k"> <view class="item" v-for="(v,k) in tableList" :key="k">
<view class="date">{{$util.formatToDateTime(v.create_time, 'Y-m-d')}}</view> <view class="date">{{$util.formatToDateTime(v.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">{{v.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;">{{(v.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;">{{v.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">测试结果:{{v.seated_forward_bend}}</view>
</view>
<view class="li">
<view class="li_title">仰卧卷腹</view>
<view class="li_content">测试结果:{{v.sit_ups}}</view>
</view>
<view class="li">
<view class="li_title">九十度仰卧撑</view>
<view class="li_content">测试结果:{{v.push_ups}}</view>
</view>
<view class="li">
<view class="li_title">火烈鸟平衡测试</view>
<view class="li_content">测试结果:{{v.flamingo_balance}}</view>
</view>
<view class="li">
<view class="li_title">三十秒双脚连续跳</view>
<view class="li_content">测试结果:{{v.thirty_sec_jump}}</view>
</view>
<view class="li">
<view class="li_title">立定跳远</view>
<view class="li_content">测试结果:{{v.standing_long_jump}}</view>
</view>
<view class="li">
<view class="li_title">4乘10m灵敏折返跑</view>
<view class="li_content">测试结果:{{v.agility_run}}</view>
</view>
<view class="li">
<view class="li_title">走平衡木</view>
<view class="li_content">测试结果:{{v.balance_beam}}</view>
</view>
<view class="li">
<view class="li_title">网球掷远</view>
<view class="li_content">测试结果:{{v.tennis_throw}}</view>
</view>
<view class="li">
<view class="li_title">十米往返跑</view>
<view class="li_content">测试结果:{{v.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>
@ -46,35 +98,35 @@
</template> </template>
<script> <script>
import memberApi from '@/api/member.js'; import apiRoute from '@/api/apiRoute.js';
export default { export default {
data() { data() {
return { return {
loading:false,//加载状态 loading: false,//加载状态
lowerThreshold: 100,//距离底部多远触发 lowerThreshold: 100,//距离底部多远触发
isReachedBottom: false,//防止重复加载|true=不可加载|false=可加载 isReachedBottom: false,//防止重复加载|true=不可加载|false=可加载
//筛选条件 //筛选条件
filteredData:{ filteredData: {
page:1,//当前页码 page: 1,//当前页码
limit:10,//每页返回数据条数 limit: 10,//每页返回数据条数
total:10,//数据总条数 total: 10,//数据总条数
students_id: '',//学员id resource_id: '',//学员资源id
}, },
tableList:[],//表格数据 tableList: [],//表格数据
} }
}, },
onLoad(options) { onLoad(options) {
this.filteredData.students_id = options.students_id//学员id this.filteredData.resource_id = options.resource_id//学员资源id
}, },
onShow(){ onShow() {
this.init() this.init()
}, },
methods: { methods: {
//初始化 //初始化
async init(){ async init() {
this.getList() this.getList()
}, },
@ -96,7 +148,7 @@ import memberApi from '@/api/member.js';
}, },
//获取-学员-体测列表 //获取-学员-体测列表
async getList(){ async getList() {
this.loading = true this.loading = true
let data = {...this.filteredData} let data = {...this.filteredData}
@ -111,15 +163,15 @@ import memberApi from '@/api/member.js';
return return
} }
if(data.page == 1){ if (data.page == 1) {
this.tableList = [] this.tableList = []
} }
//学员-体测列表 //学员-体测列表
let res = await memberApi.surveyList(data) let res = await apiRoute.xy_physicalTest(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'
@ -127,14 +179,14 @@ import memberApi from '@/api/member.js';
return return
} }
this.tableList = this.tableList.concat(res.data.list.data); // 使用 concat 方法 将新数据追加到数组中 this.tableList = this.tableList.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中
// console.log('列表',this.tableList) // console.log('列表',this.tableList)
this.filteredData.total = res.data.list.total this.filteredData.total = res.data.total
this.filteredData.page++ this.filteredData.page++
}, },
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@ -150,6 +202,33 @@ import memberApi from '@/api/member.js';
flex-direction: column; flex-direction: column;
.item{ .item{
margin-bottom: 40rpx; margin-bottom: 40rpx;
.content{
.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;
}
}
}
}
}
} }
} }

35
pages/student/my/personal_data.vue

@ -92,7 +92,7 @@
手机 <text class="required">*</text> 手机 <text class="required">*</text>
</view> </view>
<view class="input"> <view class="input">
<input v-model="formData.phone" placeholder="请输入手机" /> <input v-model="formData.phone_number" placeholder="请输入手机" />
</view> </view>
</view> </view>
</view> </view>
@ -294,7 +294,6 @@
if (extraData.input_name == 'headimg') { if (extraData.input_name == 'headimg') {
console.log('收到的图片地址:', resData.url); console.log('收到的图片地址:', resData.url);
this.editHeadimg = resData.url; this.editHeadimg = resData.url;
alert(this.formData.headimg)
} }
}, },
@ -307,31 +306,25 @@
}, },
//提交信息 //提交信息
submit() { async submit() {
console.log(this.editHeadimg, '111') if (this.editHeadimg) {
// if(this.editHeadimg == ''){ this.formData.headimg = this.editHeadimg
// this.editHeadimg = this.formData.headimg }
// } let params = {
member.member_edit({ ...this.formData
header: this.editHeadimg, }
name: this.formData.name,
address: this.formData.address, let res = await apiRoute.xy_memberEdit(params)
gender: this.sex_name, if(res.code != 1){
birthday: this.formData.birthday,
email: this.formData.email,
phone: this.formData.phone,
}).then(res => {
if (res.code == 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'
}) })
} else { return
}
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'success'
})
}
}) })
}, },

Loading…
Cancel
Save