Browse Source

feat(coach): 添加学生体测数据和作业任务页面

- 新增物理测试报告和作业任务详情页面组件
- 在 pages.json 中添加新页面的配置项
- 优化学生信息页面,添加体测和作业相关功能
master
liutong 1 year ago
parent
commit
bea45d22e7
  1. 18
      pages.json
  2. 32
      pages/coach/student/info.vue
  3. 127
      pages/coach/student/physical_examination.vue
  4. 68
      pages/coach/student/work_details.vue

18
pages.json

@ -141,6 +141,24 @@
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/coach/student/work_details",
"style": {
"navigationBarTitleText": "作业任务",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "white"
}
},
{
"path": "pages/coach/student/physical_examination",
"style": {
"navigationBarTitleText": "体测数据",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "white"
}
}

32
pages/coach/student/info.vue

@ -77,7 +77,7 @@
<view v-if="tabType=='1'" class="section_1">
<view class="ul">
<view class="li">
<view class="li" @click="opebViewWorkDetails({id :1})">
<view class="left">
<view class="title">篮球少儿课</view>
<view class="date">上课时间2020.05.30 15:30 - 17:30</view>
@ -87,7 +87,7 @@
<view v-else class="btn" style="background-color: #E2E2E2;">作业未提交</view>
</view>
</view>
<view class="li">
<view class="li" @click="opebViewWorkDetails({id :1})">
<view class="left">
<view class="title">篮球少儿课</view>
<view class="date">上课时间2020.05.30 15:30 - 17:30</view>
@ -97,7 +97,7 @@
<view v-else class="btn" style="background-color: #E2E2E2;">作业未提交</view>
</view>
</view>
<view class="li">
<view class="li" @click="opebViewWorkDetails({id :1})">
<view class="left">
<view class="title">篮球少儿课</view>
<view class="date">上课时间2020.05.30 15:30 - 17:30</view>
@ -107,7 +107,7 @@
<view v-else class="btn" style="background-color: #E2E2E2;">作业未提交</view>
</view>
</view>
<view class="li">
<view class="li" @click="opebViewWorkDetails({id :1})">
<view class="left">
<view class="title">篮球少儿课</view>
<view class="date">上课时间2020.05.30 15:30 - 17:30</view>
@ -124,35 +124,35 @@
<view v-if="tabType=='2'" class="section_2">
<view class="ul">
<view class="li">
<view class="li" @click="openViewPhysicalExamination({id:1})">
<view class="top">
<view class="title">综合评分:96</view>
<view class="hint">打败了99%学员</view>
</view>
<view class="bottom">测试时间2020.05.30</view>
</view>
<view class="li">
<view class="li" @click="openViewPhysicalExamination({id:1})">
<view class="top">
<view class="title">综合评分:96</view>
<view class="hint">打败了99%学员</view>
</view>
<view class="bottom">测试时间2020.05.30</view>
</view>
<view class="li">
<view class="li" @click="openViewPhysicalExamination({id:1})">
<view class="top">
<view class="title">综合评分:96</view>
<view class="hint">打败了99%学员</view>
</view>
<view class="bottom">测试时间2020.05.30</view>
</view>
<view class="li">
<view class="li" @click="openViewPhysicalExamination({id:1})">
<view class="top">
<view class="title">综合评分:96</view>
<view class="hint">打败了99%学员</view>
</view>
<view class="bottom">测试时间2020.05.30</view>
</view>
<view class="li">
<view class="li" @click="openViewPhysicalExamination({id:1})">
<view class="top">
<view class="title">综合评分:96</view>
<view class="hint">打败了99%学员</view>
@ -209,6 +209,20 @@ export default {
url: '/pages/coach/student/info'
})
},
//
openViewPhysicalExamination(item){
uni.navigateTo({
url: '/pages/coach/student/physical_examination'
})
},
//
opebViewWorkDetails(item){
uni.navigateTo({
url: '/pages/coach/student/work_details'
})
},
}
}
</script>

127
pages/coach/student/physical_examination.vue

@ -0,0 +1,127 @@
<!--体测数据-->
<template>
<view class="overall">
<view class="date">2021年03月12日</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 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>
<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>
</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>
<view style="font-size: 45rpx;text-align: center;margin-top: 30%;">详细数据信息</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="less" scoped>
.overall {
width: 100%;
height: 100vh;
background-color: #29d3b4;
}
.date {
color: #fff;
width: 92%;
margin: auto;
text-align: left;
font-size: 30rpx;
padding: 20rpx 0;
}
.content {
width: 92%;
height: 70vh;
background-color: #fff;
border-radius: 15rpx;
margin: 150rpx auto 0;
position: relative;
}
.circle-container::before {
content: '';
width: 200px;
height: 100px;
background-color: #fff;
border-radius: 100px 100px 0 0;
display: inline-block;
transform: translate(-50%, 0) rotate(0deg);
transform-origin: center top;
position: absolute;
top: -12%;
left: 50%;
transform: translate(-50%, -0%);
}
.card-con-txt1-left {
width: 100%;
height: 100%;
position: relative;
}
.overlay-image {
width: 300rpx;
height: 200rpx;
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
}
.card-con-txt1-left-txt {
font-size: 32rpx;
color: #29d3b4;
position: absolute;
left: 50%;
transform: translate(-50%, -0%);
}
.top1{
top: 5%;
}
.coach-message{
width: 92%;
margin: 10rpx auto;
display: flex;
}
.drop-image{
width: 60rpx;
height: 60rpx;
align-items: center;
}
</style>

68
pages/coach/student/work_details.vue

@ -0,0 +1,68 @@
<!--作业任务-->
<template>
<view>
<view class="top-style">
<image src="@/static/images/index/work_details.png" class="top-style-img">
</view>
<view class="below-style">
<view class="head-img">
<fui-avatar width="80" src="https://img1.baidu.com/it/u=3598104138,3632108415&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=800"></fui-avatar>
<view class="head-text">智卓燕</view>
</view>
<view class="multi-line-ellipsis">
作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述作业描述</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="less" scoped>
.top-style{
width: 92%;
height: 700rpx;
margin: auto;
display: flex;
align-items: center;
justify-content: center;
}
.top-style-img{
width: 120rpx;
height: 120rpx;
}
.below-style{
width: 92%;
margin: auto;
}
.head-img {
display: flex;
align-items: center;
padding: 10rpx 20rpx;
}
.head-text {
color: #333333;
font-size: 35rpx;
padding-left: 20rpx;
}
.multi-line-ellipsis {
color: #333333;
font-size: 29rpx;
padding: 5rpx 10rpx;
// display: -webkit-box;
// -webkit-box-orient: vertical;
// -webkit-line-clamp: 2;
// overflow: hidden;
// text-overflow: ellipsis;
}
</style>
Loading…
Cancel
Save