Browse Source

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

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

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

Loading…
Cancel
Save