Browse Source

refactor(coach): 重构学员详情页面布局和样式

- 更新了学员信息和课程信息的展示方式
- 重新设计了出勤记录和体测报告的界面
- 优化了页面的整体布局和颜色搭配
- 移除了冗余的代码和不必要的注释
master
liutong 1 year ago
parent
commit
a892c14cbb
  1. 757
      pages/coach/student/info.vue

757
pages/coach/student/info.vue

@ -2,381 +2,170 @@
<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="section_1"> <view class="user_section">
<view class="left"> <view class="box">
<vie class="left">
<image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image> <image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<view class="name">包皮子</view> <view class="btn_box">
<view class="btn">即将到期</view>
</view> </view>
<view class="right"> </vie>
<vie class="right">
<veiw class="item">
<view class="name">黄明明</view>
<view class="age">
13
</view>
</veiw>
<view class="item"> <view class="item">
班级少年班 <view class="title">家长姓名黄大呢</view>
</view> </view>
<view class="item"> <view class="item">
地点XXXX体育馆 302 <view class="title">家长电话18888888888</view>
</view>
</vie>
</view>
</view> </view>
<!--课程信息-->
<view class="course_section">
<view class="main">
<view class="course_box">
<view class="item"> <view class="item">
课程篮球少儿课 <view class="title">篮球少儿课程</view>
</view> </view>
<view class="item"> <view class="item">
人数30 <image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<view class="name">包子皮</view>
</view> </view>
<view class="item"> <view class="item">
时间2020.05:25 15:30 - 17:30 <view class="content">截止时间2020.05:25</view>
</view>
</view>
</view> </view>
<view class="section_2"> <view class="item">
<view class="title_box"> <view class="content">已上课时24</view>
<view>最近课程</view> <view class="content">剩余课时24</view>
</view>
<view class="tag_list">
<view class="item" @click="openViewCourseInfo({id:1})">
<view class="title">
篮球少儿课
</view>
<view>
2020.05.30 15:30 - 17:30
</view>
</view>
<view class="item" @click="openViewCourseInfo({id:2})">
<view class="title">
篮球少儿课
</view>
<view>
2020.05.30 15:30 - 17:30
</view>
</view>
</view>
</view> </view>
<view class="section_3"> <view class="tag">
<view class="btn_box"> 出勤高
<view :class="['btn', tabType=='1'?'select':'']" @click="tabChange(1)">
班级成员(30)
</view>
<view :class="['btn', tabType=='2'?'select':'']" @click="tabChange(2)">
作业任务
</view>
</view>
</view> </view>
<!-- 班级成员列表--> <view class="btn">
<view class="section_4" v-if="tabType=='1'"> 延课一周
<view class="ul">
<view class="li" @click="openViewStudentInfo({id:1})">
<view class="left">
<view class="box_1">
<image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>
<view class="tag_box">
即将到期
</view>
</view>
<view class="box_2">
<view class="name">黄明明</view>
<view class="date">课程截止时间2020.05:25</view>
</view>
</view> </view>
<view class="right">
<view class="item">
<view>24</view>
<view>已上课时</view>
</view>
<view class="item">
<view>24</view>
<view>剩余课时</view>
</view> </view>
</view> </view>
<view class="bg_box bg_top"></view>
<view class="bg_box bg_bottom"></view>
</view> </view>
<view class="li" @click="openViewStudentInfo({id:1})">
<view class="left">
<view class="box_1"> <view class="main_section">
<image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image> <view class="section_box">
<view class="tag_box"> <view class="tag_box">
即将到期 <view :class="['item', tabType=='1' ? 'select':'']" @click="tabChange(1)">出勤记录</view>
</view> <view :class="['item', tabType=='2' ? 'select':'']" @click="tabChange(2)">体侧报告</view>
</view>
<view class="box_2">
<view class="name">黄明明</view>
<view class="date">课程截止时间2020.05:25</view>
</view>
</view>
<view class="right">
<view class="item">
<view>24</view>
<view>已上课时</view>
</view>
<view class="item">
<view>24</view>
<view>剩余课时</view>
</view>
</view> </view>
</view>
<view class="li" @click="openViewStudentInfo({id:1})"> <view v-if="tabType=='1'" class="section_1">
<view class="ul">
<view class="li">
<view class="left"> <view class="left">
<view class="box_1"> <view class="title">篮球少儿课</view>
<image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image> <view class="date">上课时间2020.05.30 15:30 - 17:30</view>
<view class="tag_box">
即将到期
</view>
</view>
<view class="box_2">
<view class="name">黄明明</view>
<view class="date">课程截止时间2020.05:25</view>
</view>
</view> </view>
<view class="right"> <view class="right">
<view class="item"> <view v-if="Atype==1" class="btn" style="background-color: #29D3B4;">作业完成</view>
<view>24</view> <view v-else class="btn" style="background-color: #E2E2E2;">作业未提交</view>
<view>已上课时</view>
</view>
<view class="item">
<view>24</view>
<view>剩余课时</view>
</view> </view>
</view> </view>
</view> <view class="li">
<view class="li" @click="openViewStudentInfo({id:1})">
<view class="left"> <view class="left">
<view class="box_1"> <view class="title">篮球少儿课</view>
<image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image> <view class="date">上课时间2020.05.30 15:30 - 17:30</view>
<view class="tag_box">
即将到期
</view>
</view>
<view class="box_2">
<view class="name">黄明明</view>
<view class="date">课程截止时间2020.05:25</view>
</view>
</view> </view>
<view class="right"> <view class="right">
<view class="item"> <view v-if="Atype==1" class="btn" style="background-color: #29D3B4;">作业完成</view>
<view>24</view> <view v-else class="btn" style="background-color: #E2E2E2;">作业未提交</view>
<view>已上课时</view>
</view>
<view class="item">
<view>24</view>
<view>剩余课时</view>
</view> </view>
</view> </view>
</view> <view class="li">
<view class="li" @click="openViewStudentInfo({id:1})">
<view class="left"> <view class="left">
<view class="box_1"> <view class="title">篮球少儿课</view>
<image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image> <view class="date">上课时间2020.05.30 15:30 - 17:30</view>
<view class="tag_box">
即将到期
</view>
</view>
<view class="box_2">
<view class="name">黄明明</view>
<view class="date">课程截止时间2020.05:25</view>
</view>
</view> </view>
<view class="right"> <view class="right">
<view class="item"> <view v-if="Atype==2" class="btn" style="background-color: #29D3B4;">作业完成</view>
<view>24</view> <view v-else class="btn" style="background-color: #E2E2E2;">作业未提交</view>
<view>已上课时</view>
</view>
<view class="item">
<view>24</view>
<view>剩余课时</view>
</view>
</view> </view>
</view> </view>
<view class="li" @click="openViewStudentInfo({id:1})"> <view class="li">
<view class="left"> <view class="left">
<view class="box_1"> <view class="title">篮球少儿课</view>
<image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image> <view class="date">上课时间2020.05.30 15:30 - 17:30</view>
<!-- <view class="tag_box">-->
<!-- 即将到期-->
<!-- </view>-->
</view>
<view class="box_2">
<view class="name">黄明明</view>
<view class="date">课程截止时间2020.05:25</view>
</view>
</view> </view>
<view class="right"> <view class="right">
<view class="item"> <view v-if="Atype==1" class="btn" style="background-color: #29D3B4;">作业完成</view>
<view>24</view> <view v-else class="btn" style="background-color: #E2E2E2;">作业未提交</view>
<view>已上课时</view>
</view>
<view class="item">
<view>24</view>
<view>剩余课时</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!--作业列表-->
<view class="section_5" v-if="tabType=='2'">
<view v-if="tabType=='2'" class="section_2">
<view class="ul"> <view class="ul">
<view class="li"> <view class="li">
<view class="left"> <view class="top">
<view class="box_1"> <view class="title">综合评分:96</view>
<fui-circle <view class="hint">打败了99%学员</view>
:percent="75"
:width="140"
:show="false"
color="#FFB703"
background="#e9e9e9"
foreground="#58a3f7"
gradient="#58a3f7"
:strokeWidth="4"
:size="16"
>
<!-- 自定义显示内容 -->
<template #default>
<view class="custom_content">
<text>12</text>
<text>/</text>
<text>34</text>
</view>
</template>
</fui-circle>
</view>
<view class="box_2">
完成率80%
</view>
</view>
<view class="right">
<view class="box_1">
任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容
</view>
<view class="box_2">
<view class="date">发布时间2021.05.25</view>
<view class="btn">详情</view>
</view>
</view> </view>
<view class="bottom">测试时间2020.05.30</view>
</view> </view>
<view class="li"> <view class="li">
<view class="left"> <view class="top">
<view class="box_1"> <view class="title">综合评分:96</view>
<fui-circle <view class="hint">打败了99%学员</view>
:percent="75"
:width="140"
:show="false"
color="#FFB703"
background="#e9e9e9"
foreground="#58a3f7"
gradient="#58a3f7"
:strokeWidth="4"
:size="16"
>
<!-- 自定义显示内容 -->
<template #default>
<view class="custom_content">
<text>12</text>
<text>/</text>
<text>34</text>
</view>
</template>
</fui-circle>
</view>
<view class="box_2">
完成率80%
</view>
</view>
<view class="right">
<view class="box_1">
任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容
</view>
<view class="box_2">
<view class="date">发布时间2021.05.25</view>
<view class="btn">详情</view>
</view>
</view> </view>
<view class="bottom">测试时间2020.05.30</view>
</view> </view>
<view class="li"> <view class="li">
<view class="left"> <view class="top">
<view class="box_1"> <view class="title">综合评分:96</view>
<fui-circle <view class="hint">打败了99%学员</view>
:percent="75"
:width="140"
:show="false"
color="#FFB703"
background="#e9e9e9"
foreground="#58a3f7"
gradient="#58a3f7"
:strokeWidth="4"
:size="16"
>
<!-- 自定义显示内容 -->
<template #default>
<view class="custom_content">
<text>12</text>
<text>/</text>
<text>34</text>
</view>
</template>
</fui-circle>
</view>
<view class="box_2">
完成率80%
</view>
</view>
<view class="right">
<view class="box_1">
任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容
</view>
<view class="box_2">
<view class="date">发布时间2021.05.25</view>
<view class="btn">详情</view>
</view>
</view> </view>
<view class="bottom">测试时间2020.05.30</view>
</view> </view>
<view class="li"> <view class="li">
<view class="left"> <view class="top">
<view class="box_1"> <view class="title">综合评分:96</view>
<fui-circle <view class="hint">打败了99%学员</view>
:percent="75"
:width="140"
:show="false"
color="#FFB703"
background="#e9e9e9"
foreground="#58a3f7"
gradient="#58a3f7"
:strokeWidth="4"
:size="16"
>
<!-- 自定义显示内容 -->
<template #default>
<view class="custom_content">
<text>12</text>
<text>/</text>
<text>34</text>
</view>
</template>
</fui-circle>
</view>
<view class="box_2">
完成率80%
</view>
</view> </view>
<view class="right"> <view class="bottom">测试时间2020.05.30</view>
<view class="box_1">
任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容任务内容
</view> </view>
<view class="box_2"> <view class="li">
<view class="date">发布时间2021.05.25</view> <view class="top">
<view class="btn">详情</view> <view class="title">综合评分:96</view>
<view class="hint">打败了99%学员</view>
</view> </view>
<view class="bottom">测试时间2020.05.30</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 底部导航--> <!-- 底部导航-->
@ -397,6 +186,7 @@ export default {
return { return {
formData:{}, formData:{},
tabType:'1',//1=,2= tabType:'1',//1=,2=
Atype:1,//1=,2=
} }
}, },
onLoad() { onLoad() {
@ -427,6 +217,7 @@ export default {
.main_box{ .main_box{
background: #292929 ; background: #292929 ;
min-height: 100vh;
} }
// //
@ -442,243 +233,265 @@ export default {
} }
} }
.main_section{ //
min-height: 100vh; .user_section {
background: #292929 100%; background-color: #29D3B4;
padding: 0 24rpx; padding-top: 58rpx;
padding-top: 40rpx; padding-bottom: 42rpx;
padding-bottom: 150rpx; .box{
font-size: 24rpx;
color: #FFFFFF;
.section_1 {
background: #333333;
border-radius: 16rpx;
padding: 34rpx 64rpx;
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
gap: 38rpx; gap: 15rpx;
.left{ .left{
position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 12rpx; width: 120rpx;
.pic{ .pic{
width: 92rpx; width: 92rpx;
height: 92rpx; height: 92rpx;
border-radius: 50%; border-radius: 50%;
} }
} .btn_box{
.right{ position: absolute;
display: flex; bottom: -18rpx;
flex-direction: column; .btn{
gap: 12rpx; width: 120rpx;
.item {} height: 38rpx;
line-height: 40rpx;
border-radius: 4rpx;
background-color: rgba(245,154,35,1);
color: rgba(255,255,255,1);
font-size: 20rpx;
text-align: center;
border: 0rpx solid rgba(121,121,121,1);
} }
} }
.section_2{
margin-top: 42rpx;
.title_box{
font-size: 32rpx;
} }
.tag_list{ .right{
margin-top: 26rpx;
display: flex; display: flex;
align-items: center; flex-direction: column;
gap: 26rpx; gap: 18rpx;
.item{ .item{
padding-left: 20rpx; color: #fff;
width: 330rpx;
height: 162rpx;
border: 1px solid #00e5bb;
border-radius: 10rpx;
display: flex; display: flex;
flex-direction: column; align-items: center;
justify-content: center; .name{
gap: 10rpx; font-size: 28rpx;
}
.age{
margin-left: 20rpx;
width: 128rpx;
height: 42rpx;
line-height: 42rpx;
border-radius: 34rpx;
background-color: rgba(255,255,255,1);
color: rgba(51,51,51,1);
font-size: 28rpx;
text-align: center;
} }
} }
} }
}
}
// //
.section_3{ .course_section{
margin-top: 54rpx; position: relative;
.main{
position: relative;
z-index: 2;
padding: 0 24rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; .course_box{
.btn_box{ padding: 42rpx 28rpx;
border: 1px solid #d7d7d7; width: 692rpx;
border-radius: 25rpx; border-radius: 20rpx;
width: 500rpx; background-color: #fff;
display: flex;
flex-direction: column;
gap: 20rpx;
position: relative;
.item {
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
overflow: hidden; gap: 22rpx;
.title {
font-size: 28rpx;
color: #333333;
}
.pic {
width: 58rpx;
height: 58rpx;
border-radius: 50%;
}
.name {
color: #333333;
font-size: 24rpx;
}
.content {
color: #AAAAAA;
font-size: 24rpx;
}
}
.tag{
position: absolute;
right: 0;
top: 0;
width: 110rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 0rpx 24rpx 0rpx 24rpx;
background-color: rgba(236,128,141,1);
color: rgba(255,255,255,1);
font-size: 24rpx;
text-align: center;
}
.btn{ .btn{
width: 250rpx; position: absolute;
height: 76rpx; right: 30rpx;
line-height: 76rpx; bottom: 50rpx;
width: 130rpx;
height: 48rpx;
line-height: 48rpx;
border-radius: 10rpx;
background-color: rgba(41,211,180,0);
color: rgba(50,219,224,1);
font-size: 24rpx;
text-align: center; text-align: center;
color: #7F7F7F; font-family: -regular;
font-size: 26rpx; border: 2rpx solid rgba(50,219,224,1);
} }
.select{
color: #29D3B4;
background-color: #fff;
} }
}
.bg_box{
z-index: 1;
width: 100%;
height: 150rpx;
} }
.bg_top{
position: absolute;
top: 0;
background-color: #29D3B4;
}
.bg_bottom{
top: 50%;
position: absolute;
background-color: #292929;
} }
}
// .main_section{
.section_4{ background: #292929 100%;
margin-top: 40rpx; padding: 0 24rpx;
.ul{ padding-top: 40rpx;
padding-bottom: 150rpx;
font-size: 24rpx;
color: #333333;
.section_box {
background: #fff;
border-radius: 16rpx;
padding: 34rpx 24rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10rpx;
.li{
padding: 20rpx 0;
padding-bottom: 40rpx;
border-bottom: 2px solid #D7D7D7;
display: flex;
justify-content: space-between;
.left{
display: flex;
align-items: center; align-items: center;
gap: 30rpx; gap: 38rpx;
.box_1{ .tag_box{
padding-left: 20rpx; width: 100%;
display: flex; display: flex;
flex-direction: column;
align-items: center;
justify-content: center; justify-content: center;
position: relative; align-items: center;
.pic{ gap: 112rpx;
width: 84rpx; .item{
height: 84rpx; width: 112rpx;
border-radius: 50%; font-size: 28rpx;
} }
.tag_box{ .select{
position: absolute; color: #29D3B4;
bottom: -30rpx;
width: 120rpx;
height: 38rpx;
background-color: #F59A23;
border-radius: 4rpx;
line-height: 35rpx;
text-align: center;
font-size: 20rpx;
} }
} }
.box_2{
//
.section_1{
width: 100%;
.ul{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 20rpx; gap: 12rpx;
.name{ .li{
font-size: 28rpx; padding: 30rpx 20rpx;
} border: 1px solid #29D3B4;
.date{ border-radius: 18rpx;
font-size: 24rpx; background-color: rgba(41,211,180,0.16);
} font-size: 26rpx;
}
}
.right{
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
gap: 14rpx; .left{
.item{
border: 1px solid #00E5BB;
border-radius: 10rpx;
width: 102rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
view{ gap: 15rpx;
text-align: center;
height: 50rpx;
line-height: 50rpx;
}
view:nth-child(1){
font-size: 32rpx;
background-color: #fff;
color: #00e5bb;
} }
view:nth-child(2){ .right{
.btn{
width: 110rpx;
height: 44rpx;
line-height: 44rpx;
border-radius: 8rpx;
background-color: rgba(41,211,180,1);
color: rgba(255,255,255,1);
font-size: 20rpx; font-size: 20rpx;
background-color: #00e5bb; text-align: center;
}
} }
} }
} }
} }
} }
//
.section_5{ .section_2{
width: 100%;
.ul{ .ul{
.li{
padding-top: 32rpx;
padding-bottom: 36rpx;
border-bottom: 2px solid #D7D7D7;
display: flex;
justify-content: space-between;
.left{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
gap: 12rpx; gap: 12rpx;
.box_1{ .li{
.custom_content{ padding: 30rpx 20rpx;
font-size: 32rpx; border: 1px solid #29D3B4;
color: #AAAAAA; border-radius: 18rpx;
} background-color: rgba(41,211,180,0.16);
}
.box_2{
color: #AAAAAA;
font-size: 26rpx; font-size: 26rpx;
}
}
.right{
width: 510rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16rpx; gap: 20rpx;
.box_1{ .top{
color: #fff;
font-size: 28rpx;
}
.box_2{
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; gap: 40rpx;
.date{ .title{
color: #AAAAAAFF; font-size: 34rpx;
font-size: 24rpx;
text-align: right;
}
.btn{
width: 120rpx;
height: 48rpx;
line-height: 40rpx;
border-radius: 8rpx;
background-color: #FFFFFF00;
color: #FAD04DFF;
font-size: 26rpx;
text-align: center;
border: 2rpx solid #FAD04DFF;
} }
.hint{
color: #F59A23;
font-size: 24rpx;
} }
} }
.bottom{}
} }
} }
} }
}
} }

Loading…
Cancel
Save