smartmeter-app/pages/Mystudent/addclass.vue

653 lines
14 KiB
Vue
Raw Normal View History

2023-12-05 16:45:28 +08:00
<template>
<view class="addpage">
<u-navbar :title="title"
:border-bottom="false"
:background="bgc"
title-color='#2E4975'
title-size='36'
height='36'></u-navbar>
<view class="topbox">
<view class="search_box">
<!-- <view class="check_search">
{{ checkindex == "0" ? "班级" : '学生' }}
<view class="iconfont icon-arow_down"></view>
</view> -->
<view class="serchbox">
<view class="serchimg">
<image src="https://file.langsi.online/yasiimg/web/static/uVMACkynkipOxuTYDqm0"
mode="scaleToFill">
</image>
</view>
<input type="text"
placeholder="搜索相关内容..."
class="input"
placeholder-style="color:#C7CDD3 ">
</view>
</view>
2023-12-07 23:10:26 +08:00
<view class="addclass" @click="create()">
+ {{ checkindex == "0" ? "创建班级" : '添加学生' }}
2023-12-05 16:45:28 +08:00
</view>
</view>
<view class="check_card" v-show="checkindex==0">
<!-- <view class="check_card_stu">
</view> -->
<view class="check_card_cls">
<view class="check_card_cls_info_left">
<view class="class_card_left">
<image src=" https://file.langsi.online/yasiimg/web/static/udWNTRG6GulmTtgPRQ49"></image>
</view>
<view class="class_card_right">
<view class="class_card_right_top">
雅思1班
</view>
<view class="class_card_right_bot">
共21人
</view>
</view>
</view>
<view class="check_card_cls_info_right">
<view class="class_info" >
<view class="class_info_top" >
平均成绩/
</view>
<view class="class_info_bot" >
6
</view>
</view>
<view class="class_info" >
<view class="class_info_top" >
作业完成度
</view>
<view class="class_info_bot" >
80%
</view>
</view>
</view>
</view>
<view class="check_card_cls act1">
<view class="check_card_cls_info_left">
<view class="class_card_left">
<image src=" https://file.langsi.online/yasiimg/web/static/udWNTRG6GulmTtgPRQ49"></image>
</view>
<view class="class_card_right">
<view class="class_card_right_top">
雅思1班
</view>
<view class="class_card_right_bot">
共21人
</view>
</view>
</view>
<view class="check_card_cls_info_right">
<view class="class_info" >
<view class="class_info_top" >
平均成绩/
</view>
<view class="class_info_bot" >
6
</view>
</view>
<view class="class_info" >
<view class="class_info_top" >
作业完成度
</view>
<view class="class_info_bot" >
80%
</view>
</view>
</view>
</view>
</view>
<view class="check_card" v-show="checkindex==1">
<view class="check_card_stu">
<view class="check_card_stu_info_left">
<view class="class_card_left">
<image src=" https://file.langsi.online/yasiimg/web/static/udWNTRG6GulmTtgPRQ49"></image>
</view>
<view class="class_card_right">
<view class="class_card_right_top">
李斯丹妮
</view>
<view class="class_card_right_bot">
ID3324
</view>
</view>
</view>
<view class="check_card_stu_info_right">
<view class="class_info" >
<view class="class_info_top" >
平均成绩/
</view>
<view class="class_info_bot" >
6
</view>
</view>
<view class="class_info" >
<view class="class_info_top" >
作业完成度
</view>
<view class="class_info_bot" >
80%
</view>
</view>
</view>
</view>
<view class="check_card_stu act1">
<view class="check_card_stu_info_left">
<view class="class_card_left">
<image src=" https://file.langsi.online/yasiimg/web/static/udWNTRG6GulmTtgPRQ49"></image>
</view>
<view class="class_card_right">
<view class="class_card_right_top">
李斯丹妮
</view>
<view class="class_card_right_bot">
ID3324
</view>
</view>
</view>
<view class="check_card_stu_info_right">
<view class="class_info" >
<view class="class_info_top" >
平均成绩/
</view>
<view class="class_info_bot" >
6
</view>
</view>
<view class="class_info" >
<view class="class_info_top" >
作业完成度
</view>
<view class="class_info_bot" >
80%
</view>
</view>
</view>
</view>
</view>
<view class="botbtn">
<view class="btn">
确定添加1
</view>
</view>
2023-12-07 23:10:26 +08:00
<!-- 弹出层 -->
<u-popup v-model="show" mode="bottom" length="75%" :safe-area-inset-bottom='true' :closeable="true" :duration="300">
<view class="pop-up">
<view class="caption">创建班级</view>
<!-- 班级图像 -->
<view style="margin-top: 16rpx;">
<view class="caption_top">班级头像</view>
<view style="width: 112rpx; height: 112rpx; position: relative;">
<image src="http://tmp/8D3SdarqBJPA14a79bffdaa7e81aa0b93c1ef2173bcd.png" mode=""></image>
<view class="dashboard">
<image src="http://tmp/GqjTUH3Ahh770a1353bd35d1ebfdd80316b5cf6136ff.png" mode=""></image>
</view>
</view>
</view>
<!-- 班级名称 -->
<view>
<view class="caption_top">班级名称</view>
<view class="caption_input">
<u-input v-model="designation" :type="type" :border="border" placeholder="请输入班级名称"/>
</view>
</view>
<!-- 班级标签 -->
<view>
<view class="caption_top">班级标签</view>
<view class="caption_input">
<u-input v-model="labels" :type="type" :border="border" placeholder="请输入班级名称"/>
</view>
</view>
<!-- 班级学生 -->
2023-12-08 23:02:31 +08:00
<view class="class_body">
<view class="caption_flex">
2023-12-07 23:10:26 +08:00
<view>班级学生</view>
2023-12-08 23:02:31 +08:00
<view class="caption_boder_text2">点击头像选择班级学员</view>
2023-12-07 23:10:26 +08:00
</view>
2023-12-08 23:02:31 +08:00
<view class="caption_boder">
<view class="class_tp_image"><image src="http://tmp/4cj9prAeuoV015239042fae83018055c4c5c86e5231e.png" mode=""></image></view>
2023-12-07 23:10:26 +08:00
</view>
</view>
2023-12-08 23:02:31 +08:00
<!-- 班级老师 -->
<view class="class_body">
<view class="caption_flex">
<view>班级学生</view>
<view class="caption_boder_text2">点击头像选择班级学员</view>
</view>
<view class="caption_boder">
<view class="class_tp_image"><image src="http://tmp/4cj9prAeuoV015239042fae83018055c4c5c86e5231e.png" mode=""></image></view>
</view>
</view>
2023-12-07 23:10:26 +08:00
<view class="caption_add">添加</view>
</view>
</u-popup>
2023-12-05 16:45:28 +08:00
</view>
</template>
<script>
export default {
data() {
return {
title: '添加班级',
2023-12-07 23:10:26 +08:00
// 班级名称数据绑定
designation:'',
// 班级标签数据绑定
labels:'',
// 弹出层的变量
show: false,
2023-12-05 16:45:28 +08:00
bgc: {
backgroundColor: "#F6F9FC",
},
checkindex: 0,
}
},
methods: {
2023-12-07 23:10:26 +08:00
// 创建班级点击事件
create(){
this.show = !this.show
console.log('111')
}
2023-12-05 16:45:28 +08:00
}
}
</script>
2023-12-07 23:10:26 +08:00
<style lang="scss" scoped>
2023-12-08 23:02:31 +08:00
2023-12-05 16:45:28 +08:00
page {
background: #F6F9FC;
}
.addpage {
width: 750rpx;
padding: 0 32rpx;
flex-wrap: wrap;
// display: flex;
// flex-wrap: wrap;
.topbox{
margin-top: 46rpx;
display: flex;
flex-wrap: nowrap;
justify-content:space-between;
align-items: center;
.search_box {
width: 480rpx;
height: 88rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
display: flex;
flex-wrap: nowrap;
.check_search {
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
width: 148rpx;
height: 88rpx;
background: #FFF2E4;
border-radius: 20rpx 0rpx 0rpx 20rpx;
font-size: 28rpx;
font-family:'PingFang','PingFang';
font-weight: 500;
color: #F39852;
.icon-arow_down {
margin-left: 8rpx;
font-size: 20rpx;
}
}
.serchbox {
// padding: 0 32rpx;
display: flex;
flex-wrap: nowrap;
// margin-top: 30rpx;
align-items: center;
// justify-content: space-between;
width: 538rpx;
height: 88rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
.serchimg {
margin-left: 32rpx;
width: 32rpx;
height: 32rpx;
}
.input {
margin-left: 24rpx;
width: 394rpx;
height: 88rpx;
// border-radius: 30rpx;
// background-color: #f5f8fc;
// display: flex;
// justify-content: center;
// align-items: center;
// text-align: center;
font-size: 28rpx;
font-family: Source Han Sans CN, Source Han Sans CN-Light;
font-weight: 300;
text-align: left;
color: #a7b9cd;
letter-spacing: 1.2rpx;
line-height: 36rpx;
// padding: 0 100rpx;
// padding-right: 135rpx;
box-sizing: border-box;
}
}
}
.addclass{
display: flex;
align-items: center;
justify-content: center;
width: 194rpx;
height: 88rpx;
background: #FFF2E4;
border-radius: 20rpx 20rpx 20rpx 20rpx;
font-size: 28rpx;
font-family:'PingFang','PingFang';
font-weight: 500;
color: #F39852;
}
}
.check_card {
margin-top: 20rpx;
.check_card_stu {
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
padding: 32rpx;
width: 686rpx;
height: 148rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
border: 2rpx solid #FFFFFF;
margin-bottom: 20rpx;
.check_card_stu_info_left {
display: flex;
flex-wrap: nowrap;
.class_card_left {
width: 76rpx;
height: 76rpx;
}
.class_card_right {
margin-left: 12rpx;
display: flex;
flex-wrap: wrap;
.class_card_right_top {
width: 100%;
font-size: 28rpx;
font-family:'PingFang','PingFang';
font-weight: bold;
color: #072F5A;
}
.class_card_right_bot {
margin-top: 4rpx;
font-size: 20rpx;
font-family:'PingFang','PingFang';
font-weight: 500;
color: rgba(7,47,90,0.6);
}
}
}
.check_card_stu_info_right {
width: 50%;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.class_info {
width: 110rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
.class_info_top {
font-size: 20rpx;
font-family:'PingFang','PingFang';
font-weight: 500;
color: rgba(7, 47, 90, 0.5);
}
.class_info_bot {
margin-top: 12rpx;
font-size: 28rpx;
font-family:'PingFang','PingFang';
font-weight: 800;
color: #2D7CE6;
}
}
}
}
.check_card_cls {
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
padding: 32rpx;
width: 686rpx;
height: 148rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
border: 2rpx solid #FFFFFF;
margin-bottom: 20rpx;
.check_card_cls_info_left {
display: flex;
flex-wrap: nowrap;
.class_card_left {
width: 84rpx;
height: 84rpx;
}
.class_card_right {
margin-left: 12rpx;
display: flex;
flex-wrap: wrap;
.class_card_right_top {
width: 100%;
font-size: 32rpx;
font-family:'PingFang','PingFang';
font-weight: bold;
color: #072F5A;
}
.class_card_right_bot {
margin-top: 8rpx;
background: #EBF3FF;
border-radius: 4rpx 4rpx 4rpx 4rpx;
padding: 10rpx 20rpx;
font-size: 20rpx;
font-family:'PingFang','PingFang';
font-weight: 500;
color: #2D7CE6;
}
}
}
.check_card_cls_info_right {
width: 50%;
display: flex;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
.class_info {
width: 110rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
.class_info_top {
font-size: 20rpx;
font-family:'PingFang','PingFang';
font-weight: 500;
color: rgba(7, 47, 90, 0.5);
}
.class_info_bot {
margin-top: 12rpx;
font-size: 28rpx;
font-family:'PingFang','PingFang';
font-weight: 800;
color: #2D7CE6;
}
}
}
}
.act1{
border: 2rpx solid #2D7CE6;
}
}
.botbtn{
padding: 32rpx 32rpx 0 32rpx;
margin-left: -32rpx;
position: fixed;
bottom: 0;
width: 750rpx;
height: 200rpx;
background: #FFFFFF;
box-shadow: 0rpx -10rpx 16rpx 0rpx rgba(202,202,202,0.25);
border-radius: 40rpx 40rpx 0rpx 0rpx;
.btn{
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-family:'PingFang','PingFang';
font-weight: 800;
color: #FFFFFF;
width: 686rpx;
height: 80rpx;
background: linear-gradient(180deg, #74AFFF 0%, #2D7CE6 100%);
border-radius: 104rpx 104rpx 104rpx 104rpx;
}
}
2023-12-07 23:10:26 +08:00
}
.pop-up{
padding: 30rpx 32rpx;
.caption{
font-size: 36rpx;
text-align: center;
font-weight: 800;
color: #2E4975;
padding-top: 20rpx;
}
.caption_top{
font-size: 28rpx;
font-family: 'PingFang';
color: #2E4975;
margin-top: 40rpx;
}
.dashboard{
position: absolute;
width: 40rpx;
height: 40rpx;
bottom: 0;
right: 0;
}
.caption_input{
border-radius: 20rpx 20rpx 20rpx 20rpx;
border: 2rpx solid #DDE2EE;
margin-top: 16rpx;
padding: 0 20rpx;
}
.caption_top_links{
font-size: 20rpx;
font-family: 'PingFang';
font-weight: 500;
color: #2D7CE6;
}
.element.style{
background-color: red;
}
.u-list-item u-add-wrap {
width: 62rpx !important;
}
.caption_add{
width: 93.1%;
background: #2D7CE6;
border-radius: 20rpx 20rpx 20rpx 20rpx;
text-align: center;
margin: 0 auto;
padding: 24rpx 0;
color: #fff;
margin-top: 40rpx;
}
.caption_class{
margin-top: 40rpx;
}
2023-12-08 23:02:31 +08:00
.class_body{
margin-top: 40rpx;
.caption_flex{
display: flex;
align-items: center;
.caption_boder_text2{
font-size: 23rpx;
font-weight: 500;
color: #2D7CE6;
}
}
.caption_boder{
position: relative;
width: 96rpx;
height: 96rpx;
background: #FFFFFF;
border-radius: 20rpx 20rpx 20rpx 20rpx;
border: 2rpx solid #DDE2EE;
margin-top: 17rpx;
.class_tp_image{
position: absolute;
top: 28rpx;
right: 32rpx;
bottom: 0;
width:
28rpx;
height:
28rpx;
}
}
}
2023-12-07 23:10:26 +08:00
}
</style>