diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 9e7a09e..905f51f 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -4,9 +4,9 @@ const install = (Vue, vm) => { // baseUrl: 'http://2087p773d1.wicp.vip', // 请求的本域名 // baseUrl: 'https://lchighpass.zhieasy.cn', // baseUrl: 'http://speaking.viphk.91tunnel.com',//测试https://speaking.iava.top/ - baseUrl: 'http://yml.dev.bc3.top',// + // baseUrl: 'http://yml.dev.bc3.top',// // baseUrl: 'https://ielts.zhieasy.cn',//正式 - // baseURL: 'https://api.admin-v2.langsi.online', + baseURL: 'https://api.admin-v2.langsi.online', // baseUrl: 'http://i3qsdb.natappfree.cc',//正式 // baseUrl: 'http://hwihh5.natappfree.cc', @@ -42,7 +42,7 @@ const install = (Vue, vm) => { // 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值 // const token = uni.getStorageSync('token'); - const token = " Bearer f545811267c149bc85fb14e8e8638e94" + const token = " Bearer ca5a6cd7473c4b18b22044321b1fba91" // console.log("我是token", token) config.header.Authorization = token; diff --git a/components/tab-bar/tab-bar.vue b/components/tab-bar/tab-bar.vue new file mode 100644 index 0000000..6cdc447 --- /dev/null +++ b/components/tab-bar/tab-bar.vue @@ -0,0 +1,47 @@ +<template> + <view> + <view class="u-page"> + <!-- 所有内容的容器 --> + </view> + <!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 --> + <u-tabbar v-model="current" :list="list" icon-size='40rpx' active-color='#3996fd' inactive-color="#c8c7cb"></u-tabbar> + </view> +</template> + +<script> + export default { + data() { + return { + list: [ + { + iconPath: require('@/static/tabbar/home.png'), + selectedIconPath:require('@/static/tabbar/home-active.png'), + text: '首页', + customIcon: true, + pagePath:'/pages/index/index2' + }, + { + iconPath: require('@/static/tabbar/tiku.png'), + selectedIconPath:require('@/static/tabbar/tiku-act.png'), + text: '题库', + customIcon: true, + pagePath:'/pages/home/home' + } + ,{ + iconPath: require('@/static/tabbar/my.png'), + selectedIconPath:require('@/static/tabbar/my-active.png'), + text: '我的', + customIcon: true, + pagePath:'/pages/user/usertwo' + }, + ], + current: 0 + } + }, + } +</script> +<style lang="scss" scoped> + /deep/.u-tabbar__content__item__button{ + top: 20rpx !important; + } +</style> \ No newline at end of file diff --git a/pages.json b/pages.json index a4d67f3..173704d 100644 --- a/pages.json +++ b/pages.json @@ -34,16 +34,7 @@ } }, - { - "path" : "pages/pages_index/teacher_index", - "style" : - { - "navigationBarTitleText": "首页", - "navigationBarBackgroundColor": "#4473f6", - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - }, + { @@ -138,7 +129,28 @@ "enablePullDownRefresh": false, "navigationStyle": "custom" } + }, + { + "path" : "pages/user/user", + "style" : + { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#4473f6", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path" : "pages/Mystudent/addTeacher", + "style" : + { + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#4473f6", + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } } + ], "subPackages": [ { @@ -218,6 +230,32 @@ ], + "tabBar": { + "color": "#a9b7b7", + "selectedColor": "#5185fd", + "borderStyle": "white", + "backgroundColor": "#ffffff", + "list": [ + { + "selectedIconPath": "/static/tabbar/home.png", + "iconPath": "/static/tabbar/home-active.png", + "pagePath": "pages/index/index", + "text": "首页" + }, + { + "selectedIconPath": "/static/tabbar/tiku.png", + "iconPath": "/static/tabbar/tiku-act.png", + "pagePath": "pages/Mystudent/student", + "text": "题库" + } + ,{ + "selectedIconPath": "/static/tabbar/my.png", + "iconPath": "/static/tabbar/my-active.png", + "pagePath": "pages/user/user", + "text": "我的" + } + ] + }, "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", diff --git a/pages/Mystudent/addTeacher.vue b/pages/Mystudent/addTeacher.vue new file mode 100644 index 0000000..28d0e2a --- /dev/null +++ b/pages/Mystudent/addTeacher.vue @@ -0,0 +1,371 @@ +<template> + <view class="searchpage"> + <u-navbar title="添加老师" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' + height='36' :custom-back="addstu"></u-navbar> + <u-toast ref="uToast" /> + <view class="serchbox"> + <view class="serchimg"> + <image src="https://file.langsi.online/yasiimg/web/static/uVMACkynkipOxuTYDqm0"> + + </image> + </view> + <input type="text" + v-model="searchKeyword" + placeholder="搜索相关内容..." + class="input" + placeholder-style="color:#C7CDD3" + @input="search()"> + </view> + <view class="check_card"> + <!-- <view class="check_card_stu " v-for="(item,index ) in stulist" :key="index" @click="toggleSelection(item)" :class="{ 'act1': item.isSelected }"> + <view class="check_card_stu_info_left"> + <view class="class_card_left"> + <image :src="item.headImgUrl"></image> + </view> + <view class="class_card_right"> + <view class="class_card_right_top" v-html="highlightSearch(item.nickName)"> + + </view> + <view class="class_card_right_bot"> + ID:{{item.id}} + </view> + </view> + </view> + + </view> --> + <view class="teacher_card" v-for="(item,index) in stulist" :key="index" @click="toggleSelection(item)" :class="{ 'act1': item.isSelected }"> + <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" v-html="item.teacherInfo.nickname"> + + </view> + <view class="class_card_right_bot"> + {{item.roleText}} + </view> + </view> + </view> + + </view> + <view class="zhanwei" style="width: 100%; height: 230rpx;"> + + </view> + <view class="botbtn" @click="addstu()" v-show="selectedIds.length>0"> + <view class="btn"> + 确定添加({{selectedIds.length}}) + </view> + </view> + </view> +</template> + +<script> + export default { + data() { + return { + bgc: { + backgroundColor: "#F6F9FC", + }, + checkindex: 1, + stulist:[], + searchKeyword:'', + orgstulist:[], + selectedIds: [], + } + }, + onLoad(option) { + // this.classid=option.id + this.selectedIds=JSON.parse(decodeURIComponent(option.teacherinfo)) + + }, + onShow(){ + this.getallstu() + }, + methods: { + addstu() { + console.log('调用了'); + uni.setStorageSync('selectedteacherinfo', this.selectedIds); + + // Navigate back to the previous page + uni.navigateBack({ + delta: 1, // Number of pages to go back + success(res) { + console.log(res); + }, + fail(err) { + console.error(err); + } + }); + + + }, + toggleSelection(item) { + // const selectedIndex = this.selectedIds.indexOf(item.id); + const selectedIndex = this.selectedIds.findIndex(selectedItem => selectedItem.id === item.id); + if (selectedIndex === -1) { + // If not selected, add to the array and apply the 'act1' class + this.selectedIds.push({ name: item.teacherInfo.nickname, avatar: item.teacherInfo.avatar, id: item.teacherId }); + + item.isSelected = true; // Add a property to the item to track selection + } else { + // If already selected, remove from the array and remove the 'act1' class + this.selectedIds.splice(selectedIndex, 1); + item.isSelected = false; + console.log(this.selectedIds,'selectedIdsselectedIdsselectedIds'); + } + + }, + search() { + // 根据关键字过滤 this.classlist + if (this.searchKeyword !== '') { + const filteredList = JSON.parse(JSON.stringify(this.orgstulist)).filter(item => { + // 匹配 nickName 或者 id + return item.teacherInfo.nickname.includes(this.searchKeyword) + }); + // 更新 this.classlist 为过滤后的列表 + this.stulist = filteredList; + this.selectedIds.forEach(selectedItem => { + const index = this.stulist.findIndex(item => item.teacherId === selectedItem.teacherId); + if (index !== -1) { + this.$set(this.stulist, index, { ...this.stulist[index], isSelected: true }); + } + }); + } else { + this.fuwei(); + } + }, + fuwei() { + + this.stulist = JSON.parse(JSON.stringify(this.orgstulist)); + this.selectedIds.forEach(selectedItem => { + const index = this.stulist.findIndex(item => item.teacherId === selectedItem.teacherId); + if (index !== -1) { + this.$set(this.stulist, index, { ...this.stulist[index], isSelected: true }); + } + }); + }, + highlightSearch(name) { + // 使用正则表达式替换匹配到的 searchKeyword 为带有颜色的文字 + if (this.searchKeyword) { + const regex = new RegExp(this.searchKeyword, 'gi'); + return name.replace(regex, match => `<span style="color: #2D7CE6 ;">${match}</span>`); + } + return name; + }, + getallstu(){ + this.$u.get(`https://api.admin-v2.langsi.online/admin-api/classroom/teacher/list`).then(res => { + + + if (res.code == 0) { + this.stulist=res.data + this.orgstulist = JSON.parse(JSON.stringify(res.data)); + this.selectedIds.forEach(selectedItem => { + const index = this.stulist.findIndex(item => item.teacherId === selectedItem.id); + if (index !== -1) { + this.$set(this.stulist, index, { ...this.stulist[index], isSelected: true }); + } + }); + + } + }) + } + } + } +</script> + +<style lang="scss"> + page { + background: linear-gradient(183deg, #F0F6FF 0%, #FAFAFA 100%); + } + + .searchpage { + width: 750rpx; + padding: 0 32rpx; + + .serchbox { + padding: 0 32rpx; + display: flex; + flex-wrap: nowrap; + margin-top: 30rpx; + align-items: center; + width: 686rpx; + height: 88rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + + .serchimg { + width: 30.51rpx; + height: 32rpx; + margin-right: 24rpx; + } + + .input { + margin: 0 auto; + width: 568rpx; + 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; + + } + } + + .check_card { + margin-top: 20rpx; + .teacher_card{ + margin-bottom: 20rpx; + padding: 24rpx; + display: flex; + flex-wrap: nowrap; + width: 686rpx; + height: 130rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + .class_card_left { + width: 76rpx; + height: 76rpx; + } + + .class_card_right { + margin-left: 20rpx; + 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: 8rpx; + font-size: 24rpx; + font-family:'PingFang','PingFang'; + font-weight: 500; + color: #2D7CE6; + } + } + } + + .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; + } + } + } + } + + + .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; + } + } + } +</style> \ No newline at end of file diff --git a/pages/Mystudent/addclass.vue b/pages/Mystudent/addclass.vue index cb90847..ddeaa05 100644 --- a/pages/Mystudent/addclass.vue +++ b/pages/Mystudent/addclass.vue @@ -1,41 +1,34 @@ <template> <view class="addpage"> - <u-navbar :title="title" - :border-bottom="false" - :background="bgc" - title-color='#2E4975' - title-size='36' - height='36'></u-navbar> + <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"> + <!-- <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"> + <view class="serchbox"> + <view class="serchimg"> + <image src="https://file.langsi.online/yasiimg/web/static/uVMACkynkipOxuTYDqm0" + mode="scaleToFill"> - </image> + </image> + </view> + <input type="text" placeholder="搜索相关内容..." class="input" placeholder-style="color:#C7CDD3 "> </view> - <input type="text" - placeholder="搜索相关内容..." - class="input" - placeholder-style="color:#C7CDD3 "> + + </view> + <view class="addclass" @click="create()"> + + {{ checkindex == "0" ? "创建班级" : '添加学生' }} </view> - </view> - <view class="addclass" @click="create()"> - + {{ checkindex == "0" ? "创建班级" : '添加学生' }} - </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"> @@ -51,23 +44,23 @@ </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 class="class_info"> + <view class="class_info_top"> + 平均成绩/分 </view> - <view class="class_info" > - <view class="class_info_top" > - 作业完成度 - </view> - <view class="class_info_bot" > - 80% - </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"> @@ -85,23 +78,23 @@ </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 class="class_info"> + <view class="class_info_top"> + 平均成绩/分 </view> - <view class="class_info" > - <view class="class_info_top" > - 作业完成度 - </view> - <view class="class_info_bot" > - 80% - </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> @@ -121,23 +114,23 @@ </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 class="class_info"> + <view class="class_info_top"> + 平均成绩/分 </view> - <view class="class_info" > - <view class="class_info_top" > - 作业完成度 - </view> - <view class="class_info_bot" > - 80% - </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"> @@ -155,26 +148,26 @@ </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 class="class_info"> + <view class="class_info_top"> + 平均成绩/分 </view> - <view class="class_info" > - <view class="class_info_top" > - 作业完成度 - </view> - <view class="class_info_bot" > - 80% - </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"> @@ -182,521 +175,544 @@ </view> </view> <!-- 弹出层 --> - <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> + <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 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> - <!-- 弹出层 --> - <u-select v-model="show2" :list="list" @confirm="confirm"></u-select> - - <view class="caption_input"> - <u-form-item :border-bottom="false" :right-icon="icons" class="no-padding"> - <u-input v-model="form.name" @click="showPopup" placeholder="请输入班级标签"/> - </u-form-item> - </view> - - - - - </view> - <!-- 班级学生 --> - <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> - <!-- 班级老师 --> + </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> + <!-- 弹出层 --> + <u-select v-model="show2" :list="list" @confirm="confirm"></u-select> + + <view class="caption_input"> + <u-form-item :border-bottom="false" :right-icon="icons" class="no-padding"> + <u-input v-model="form.name" @click="showPopup" placeholder="请输入班级标签" /> + </u-form-item> + </view> + + + + + </view> + <!-- 班级学生 --> <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 class="class_tp_image"> + <image src="http://tmp/4cj9prAeuoV015239042fae83018055c4c5c86e5231e.png" mode=""></image> + </view> </view> </view> - <view class="caption_add">添加</view> + <!-- 班级老师 --> + <view class="class_body"> + <view class="caption_flex"> + <view>班级学生</view> + <view class="caption_boder_text2">点击头像选择班级学员</view> </view> - </u-popup> + <view class="caption_boder"> + <view class="class_tp_image"> + <image src="http://tmp/4cj9prAeuoV015239042fae83018055c4c5c86e5231e.png" mode=""></image> + </view> + </view> + </view> + <view class="caption_add">添加</view> + </view> + </u-popup> </view> </template> <script> -export default { - data() { - return { - title: '添加班级', - // 班级名称数据绑定 - designation:'', - // 班级标签数据绑定 - labels:'', - // 弹出层的变量 - show: false, - // 下拉框 - show2:false, - form:{ - name: '' + export default { + data() { + return { + title: '添加班级', + // 班级名称数据绑定 + designation: '', + // 班级标签数据绑定 + labels: '', + // 弹出层的变量 + show: false, + // 下拉框 + show2: false, + form: { + name: '' + }, + list: [{ + value: '1', + label: '听力' + }, + { + value: '2', + label: '阅读' + }, + { + value: '3', + label: '写作' + }, + { + value: '4', + label: '口语' + } + ], + icons: 'arrow-down-fill', + icons_rigth: 'arrow-down-fill', + icons_top: 'arrow-up-fill', + + bgc: { + backgroundColor: "#F6F9FC", + }, + checkindex: 0, + + + } + }, + methods: { + // 创建班级点击事件 + create() { + this.show = !this.show }, - list: [ - { - value: '1', - label: '听力' - }, - { - value: '2', - label: '阅读' - }, - { - value: '3', - label: '写作' - }, - { - value: '4', - label: '口语' - } - ], - icons:'arrow-down-fill', - icons_rigth:'arrow-down-fill', - icons_top:'arrow-up-fill', - - bgc: { - backgroundColor: "#F6F9FC", + showPopup() { + this.show2 = !this.show2 + this.icons = this.icons_top }, - checkindex: 0, - + confirm(e) { + this.icons = this.icons_rigth + e.forEach(item => { + this.form.name = item.label + }) + } + } - }, - methods: { - // 创建班级点击事件 - create(){ - this.show = !this.show - }, - showPopup(){ - this.show2 =!this.show2 - this.icons= this.icons_top - }, - confirm(e){ - this.icons= this.icons_rigth - e.forEach(item=>{ - this.form.name=item.label - }) - } - - } -} </script> <style lang="scss" scoped> -.no-padding /deep/ .u-form-item { - padding: 0; -} -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; - - } - } - + .no-padding /deep/ .u-form-item { + padding: 0; } - .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; - } + page { + background: #F6F9FC; } - - .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; + .addpage { 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; - } - } -} -.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; - } + padding: 0 32rpx; + flex-wrap: wrap; - .class_body{ - margin-top: 40rpx; - .caption_flex{ + // display: flex; + // flex-wrap: wrap; + .topbox { + margin-top: 46rpx; display: flex; + flex-wrap: nowrap; + justify-content: space-between; align-items: center; - .caption_boder_text2{ - font-size: 23rpx; + + .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: #2D7CE6; + color: #F39852; } } - .caption_boder{ - position: relative; - width: 96rpx; - height: 96rpx; + + .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; + } + } + } + + .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: 17rpx; - .class_tp_image{ - position: absolute; - top: 28rpx; - right: 32rpx; - bottom: 0; - width: -28rpx; - height: -28rpx; - } - + 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; + } + + .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; + } + + } + } + + } - - -} -</style> +</style> \ No newline at end of file diff --git a/pages/Mystudent/arrange_work.vue b/pages/Mystudent/arrange_work.vue index 3f1a6f4..31dacfc 100644 --- a/pages/Mystudent/arrange_work.vue +++ b/pages/Mystudent/arrange_work.vue @@ -1,21 +1,15 @@ <template> <view class="pagebox"> - <u-navbar title="作业安排" - :border-bottom="false" - :background="bgc" - title-color='#2E4975' - title-size='36' - height='36'></u-navbar> + <u-navbar title="作业安排" :border-bottom="false" :background="bgc" title-color='#2E4975' title-size='36' + height='36'></u-navbar> <view class="serchbox"> <view class="serchimg"> <image src="https://file.langsi.online/yasiimg/web/static/uVMACkynkipOxuTYDqm0"> </image> </view> - <input type="text" - placeholder="搜索相关内容..." - class="input" - placeholder-style="color:#C7CDD3 "> + <input type="text" v-model="searchKeyword" placeholder="搜索相关内容..." class="input" + placeholder-style="color:#C7CDD3" @input="search()"> </view> <view class="checkbox"> <view class="chekcont"> @@ -33,38 +27,44 @@ </view> <view class="card_bigbox"> <view class="work_card" v-for="(item,index ) in workinfo" :key="index" - :class="item.iswork === '1' ? 'act1' : (item.iswork === '2' ? 'act3' : 'default')"> + :class="item.iswork === '1' ? 'act1' : (item.iswork === '2' ? 'act3' : 'default')"> <view class="work_card_top"> <view class="work_card_top_left"> <view class="work_card_top_left_img"> <image src="https://file.langsi.online/yasiimg/web/static/u07sCQb6mW6OSamVr1Va"></image> </view> - {{item.name}} + <view class="txt" v-html="highlightSearch(item.name)"> + + </view> + </view> - <view class="work_card_top_right" - :class="isalready == true ? 'act2' : ''"> + <view class="work_card_top_right" :class="isalready == true ? 'act2' : ''"> 进行中 </view> </view> <view class="work_card_cont_box"> - <view class="work_card_cont" v-for="(items,indexs ) in item.infos" :key="indexs" v-if="indexs<3"> + <view class="work_card_cont" v-for="(items,indexs ) in item.infos" :key="indexs" v-if="indexs<3"> <view class="work_card_cont_point"></view> <view class="work_card_cont_text" v-if="items.classify==1||items.classify==2"> {{items.paperName}}-{{items.testName}} </view> - <view class="work_card_cont_tag" v-if="items.classify==1" style="background: rgba(27,225,178,0.1);color: #1BE1B2;"> + <view class="work_card_cont_tag" v-if="items.classify==1" + style="background: rgba(27,225,178,0.1);color: #1BE1B2;"> 听力 </view> - <view class="work_card_cont_tag" v-if="items.classify==2" style="background: rgba(242,182,42,0.2);color: #F2AA02 ;"> + <view class="work_card_cont_tag" v-if="items.classify==2" + style="background: rgba(242,182,42,0.2);color: #F2AA02 ;"> 阅读 </view> - <view class="work_card_cont_tag" v-if="items.classify==3" style="background:rgba(63,122,242,0.2);color: #3F7AF2 ;"> + <view class="work_card_cont_tag" v-if="items.classify==3" + style="background:rgba(63,122,242,0.2);color: #3F7AF2 ;"> 写作 </view> - <view class="work_card_cont_tag" v-if="items.classify==4" style="background: rgba(242,63,235,0.1);color: #F23FEB ;"> + <view class="work_card_cont_tag" v-if="items.classify==4" + style="background: rgba(242,63,235,0.1);color: #F23FEB ;"> 口语 </view> - + </view> <view class="work_card_cont" v-if="item.infos.length>3"> <view class="work_card_cont_point" style="margin-right: 10rpx;"></view> @@ -95,7 +95,7 @@ <view class="work_card_info_bot"> {{item.doneTime}} - <!-- {{ formatTimestamp(item.createTime) }} --> + <!-- {{ formatTimestamp(item.createTime) }} --> </view> </view> </view> @@ -109,288 +109,333 @@ </template> <script> -export default { - data() { - return { - bgc: { - backgroundColor: "#F0F6FF", - }, - isalready: true, - work: [ - { "iswork": "0" }, - { "iswork": "1" }, - { "iswork": "2" }, - { "iswork": "0" } - ], - classid:0, - workinfo:[] - } - }, - onLoad(option) { - console.log(option); - this.classid=option.classId - // this.classid=15 - this.getworklist() - }, - methods: { - formatTimestamp(timestamp) { - const date = new Date(timestamp); - const year = date.getFullYear(); - const month = (date.getMonth() + 1).toString().padStart(2, '0'); - const day = date.getDate().toString().padStart(2, '0'); - const hours = date.getHours().toString().padStart(2, '0'); - const minutes = date.getMinutes().toString().padStart(2, '0'); - - return `${year}-${month}-${day} ${hours}:${minutes}`; - }, - - getworklist(){ - this.$u.get(`/admin-api/classroom/work-record/list?classId=${this.classid}`).then(res => { - - - if (res.code == 0) { - this.workinfo=res.data - // this.classlist = res.data.list - // this.isloding = false - + export default { + data() { + return { + bgc: { + backgroundColor: "#F0F6FF", + }, + isalready: true, + work: [{ + "iswork": "0" + }, + { + "iswork": "1" + }, + { + "iswork": "2" + }, + { + "iswork": "0" + } + ], + classid: 0, + workinfo: [], + orgworkinfo: [], + searchKeyword: '', + } + }, + onLoad(option) { + console.log(option); + this.classid = option.classId + // this.classid=15 + this.getworklist() + }, + methods: { + highlightSearch(name) { + // 使用正则表达式替换匹配到的 searchKeyword 为带有颜色的文字 + if (this.searchKeyword) { + const regex = new RegExp(this.searchKeyword, 'gi'); + return name.replace(regex, match => `<span style="color: #2D7CE6 ;">${match}</span>`); } - }) + return name; + }, + formatTimestamp(timestamp) { + const date = new Date(timestamp); + const year = date.getFullYear(); + const month = (date.getMonth() + 1).toString().padStart(2, '0'); + const day = date.getDate().toString().padStart(2, '0'); + const hours = date.getHours().toString().padStart(2, '0'); + const minutes = date.getMinutes().toString().padStart(2, '0'); + + return `${year}-${month}-${day} ${hours}:${minutes}`; + }, + + getworklist() { + this.$u.get(`/admin-api/classroom/work-record/list?classId=${this.classid}`).then(res => { + + + if (res.code == 0) { + this.workinfo = res.data + this.orgworkinfo = JSON.parse(JSON.stringify(res.data)); + // this.classlist = res.data.list + // this.isloding = false + + } + }) + }, + search() { + // 根据关键字过滤 this.classlist + if (this.searchKeyword !== '') { + const filteredList = JSON.parse(JSON.stringify(this.orgworkinfo)).filter(item => { + // 匹配 nickName 或者 id + return item.name.includes(this.searchKeyword) || item.des.includes(this.searchKeyword); + }); + // 更新 this.classlist 为过滤后的列表 + this.workinfo = filteredList; + } else { + this.fuwei(); + } + }, + fuwei() { + + this.workinfo = JSON.parse(JSON.stringify(this.orgworkinfo)); + }, } } -} </script> -<style lang="scss" > -page { - background: linear-gradient(183deg, #F0F6FF 0%, #FAFAFA 100%); - padding-bottom: 170rpx; -} - -.pagebox { - padding: 0 32rpx; - - .serchbox { - padding: 0 32rpx; - display: flex; - flex-wrap: nowrap; - margin-top: 30rpx; - align-items: center; - width: 686rpx; - height: 88rpx; - background: #FFFFFF; - border-radius: 20rpx 20rpx 20rpx 20rpx; - - .serchimg { - width: 30.51rpx; - height: 32rpx; - margin-right: 24rpx; - } - - .input { - margin: 0 auto; - width: 568rpx; - 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; - - } +<style lang="scss"> + page { + background: linear-gradient(183deg, #F0F6FF 0%, #FAFAFA 100%); + padding-bottom: 170rpx; } - .checkbox { - - margin-top: 32rpx; - padding: 0 34rpx; - display: flex; - flex-wrap: nowrap; - align-items: center; - justify-content: space-between; + .pagebox { + padding: 0 32rpx; - .chekcont { + .serchbox { + padding: 0 32rpx; display: flex; flex-wrap: nowrap; + margin-top: 30rpx; align-items: center; - font-size: 24rpx; - font-family:'PingFang','PingFang'; - font-weight: 500; - color: rgba(7, 47, 90, 0.6); - - .icon-arow_down { - margin-left: 6rpx; - font-size: 16rpx; - } - } - - } - - .card_bigbox { - .work_card { - margin-top: 20rpx; - display: flex; - flex-wrap: wrap; width: 686rpx; - padding: 32rpx; + height: 88rpx; background: #FFFFFF; border-radius: 20rpx 20rpx 20rpx 20rpx; - border-left: 8rpx solid #F18F21; + .serchimg { + width: 30.51rpx; + height: 32rpx; + margin-right: 24rpx; + } - .work_card_top { - width: 100%; + .input { + margin: 0 auto; + width: 568rpx; + 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; + + } + } + + .checkbox { + + margin-top: 32rpx; + padding: 0 34rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; + justify-content: space-between; + + .chekcont { display: flex; flex-wrap: nowrap; align-items: center; - justify-content: space-between; + font-size: 24rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 500; + color: rgba(7, 47, 90, 0.6); - .work_card_top_left { - display: flex; - flex-wrap: nowrap; - align-items: center; - font-size: 28rpx; - font-family:'PingFang','PingFang'; - font-weight: 800; - color: #2E4975; - - .work_card_top_left_img { - margin-right: 8rpx; - width: 38rpx; - height: 32rpx; - } - } - - .work_card_top_right { - font-size: 24rpx; - font-family:'PingFang','PingFang'; - font-weight: 500; - color: #F18F21; - } - - .act2 { - color: #2D7CE6; + .icon-arow_down { + margin-left: 6rpx; + font-size: 16rpx; } } - .work_card_cont_box { - margin-top: 16rpx; - padding: 24rpx; - width: 100%; - background: #F9F9F9; + } + + .card_bigbox { + .work_card { + margin-top: 20rpx; + display: flex; + flex-wrap: wrap; + width: 686rpx; + padding: 32rpx; + background: #FFFFFF; border-radius: 20rpx 20rpx 20rpx 20rpx; - .work_card_cont:last-child { - margin-bottom: 0; - } + border-left: 8rpx solid #F18F21; - .work_card_cont { - margin-bottom: 24rpx; + .work_card_top { + width: 100%; display: flex; flex-wrap: nowrap; align-items: center; + justify-content: space-between; - .work_card_cont_point { - width: 8rpx; - height: 8rpx; - background: #2E4975; - border-radius: 50%; - } - - .work_card_cont_text { - margin-left: 20rpx; - font-size: 24rpx; - font-family:'PingFang','PingFang'; - font-weight: 500; + .work_card_top_left { + display: flex; + flex-wrap: nowrap; + align-items: center; + font-size: 28rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 800; color: #2E4975; + + .work_card_top_left_img { + margin-right: 8rpx; + width: 38rpx; + height: 32rpx; + } + .txt{ + font-size: 28rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 800; + color: #2E4975; + } } - .work_card_cont_tag { - margin-left: 30rpx; - padding: 8rpx 18rpx; - background: #FFF2E4; - border-radius: 20rpx 20rpx 20rpx 20rpx; - font-size: 20rpx; - font-family:'PingFang','PingFang'; + .work_card_top_right { + font-size: 24rpx; + font-family: 'PingFang', 'PingFang'; font-weight: 500; color: #F18F21; } - } - } - - .work_card_info_box { - display: flex; - flex-wrap: wrap; - margin-top: 22rpx; - width: 100%; - .work_card_info_top { - display: flex; - flex-wrap: nowrap; - align-items: center; - width: 100%; - font-size: 20rpx; - font-family:'PingFang','PingFang'; - font-weight: 500; - color: rgba(46, 73, 117, 0.6); - - .work_card_info_topimg { - margin-right: 8rpx; - width: 18.74rpx; - height: 20rpx; + .act2 { + color: #2D7CE6; } } - .work_card_info_bot { - margin-top: 4rpx; - font-size: 24rpx; - font-family:'PingFang','PingFang'; - font-weight: 500; - color: #2E4975; + .work_card_cont_box { + margin-top: 16rpx; + padding: 24rpx; + width: 100%; + background: #F9F9F9; + border-radius: 20rpx 20rpx 20rpx 20rpx; + + .work_card_cont:last-child { + margin-bottom: 0; + } + + .work_card_cont { + margin-bottom: 24rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; + + .work_card_cont_point { + width: 8rpx; + height: 8rpx; + background: #2E4975; + border-radius: 50%; + } + + .work_card_cont_text { + margin-left: 20rpx; + font-size: 24rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 500; + color: #2E4975; + } + + .work_card_cont_tag { + margin-left: 30rpx; + padding: 8rpx 18rpx; + background: #FFF2E4; + border-radius: 20rpx 20rpx 20rpx 20rpx; + font-size: 20rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 500; + color: #F18F21; + } + + } } + + .work_card_info_box { + display: flex; + flex-wrap: wrap; + margin-top: 22rpx; + width: 100%; + + .work_card_info_top { + display: flex; + flex-wrap: nowrap; + align-items: center; + width: 100%; + font-size: 20rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 500; + color: rgba(46, 73, 117, 0.6); + + .work_card_info_topimg { + margin-right: 8rpx; + width: 18.74rpx; + height: 20rpx; + } + } + + .work_card_info_bot { + margin-top: 4rpx; + font-size: 24rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 500; + color: #2E4975; + } + } + } + + .act1 { + border-left: 8rpx solid #2D7CE6; + } + + .act3 { + border-left: 8rpx solid #DFDFDF; } } - .act1 { - border-left: 8rpx 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; - .act3 { - border-left: 8rpx solid #DFDFDF; + .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; + } } } - .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; - } - } -}</style> +</style> \ No newline at end of file diff --git a/pages/Mystudent/student.vue b/pages/Mystudent/student.vue index f7ccdf5..64cb0ce 100644 --- a/pages/Mystudent/student.vue +++ b/pages/Mystudent/student.vue @@ -1,14 +1,9 @@ <template> <view class="view_body"> - <u-navbar :is-back="false" - title='班级' - title-color="#2E4975" - :border-bottom="false" - :background="bgc" - id="navbar"> + <u-navbar :is-back="false" title='班级' title-color="#2E4975" :border-bottom="false" :background="bgc" + id="navbar"> </u-navbar> - <view class="nocont" - v-show="shownocont"> + <view class="nocont" v-show="shownocont"> <view class="nocont_tip"> <view class="nocont_tip_img"> <image src="https://file.langsi.online/yasiimg/web/static/uVcz1RzZi6US2NKa0ssl"></image> @@ -22,8 +17,7 @@ </view> - <view class="student_page" - v-show="shownocont == false"> + <view class="student_page" v-show="shownocont == false"> <view class="student_page_top"> <view class="search_box"> <view class="check_search"> @@ -33,21 +27,16 @@ <view class="serchbox"> <view class="serchimg"> <image src="https://file.langsi.online/yasiimg/web/static/uVMACkynkipOxuTYDqm0" - mode="scaleToFill"> + mode="scaleToFill"> </image> </view> - <input type="text" - v-model="searchKeyword" - placeholder="搜索相关内容..." - class="input" - placeholder-style="color:#C7CDD3" - @input="search()"> + <input type="text" v-model="searchKeyword" placeholder="搜索相关内容..." class="input" + placeholder-style="color:#C7CDD3" @input="search()"> </view> </view> <view class="info_box"> - <view class="info_cont" - style="width:80rpx ;"> + <view class="info_cont" style="width:80rpx ;"> <view class="info_cont_top"> 学生人数 </view> @@ -73,71 +62,56 @@ </view> </view> <view class="chekbox"> - <view class="check" - :class="checkindex == 1 ? 'act1' : ''" - @click="checkindex = 1"> + <view class="check" :class="checkindex == 1 ? 'act1' : ''" @click="checkindex = 1"> 班级 </view> - <view class="check" - :class="checkindex == 0 ? 'act1' : ''" - @click="checkindex = 0"> + <view class="check" :class="checkindex == 0 ? 'act1' : ''" @click="checkindex = 0"> 学生 </view> - <view class="add"> + <view class="add" @click="addsmt()"> + 添加 </view> </view> </view> - <view class="class_box" - v-if="checkindex == 1"> + <view class="class_box" v-if="checkindex == 1"> <view class="class_box_top"> - <view @click="changeclass()" - class="class_box_top_cont"> + <view @click="changeclass()" class="class_box_top_cont"> 班级人数 <view class="iconfont icon-arow_down"></view> - <view class="dropdown_box" - v-show="classnum"> - <view class="dropdown_item" - :class="classnumindex == 0 ? 'act2' : ''" - @click="chengclassnumindex(0)"> + <view class="dropdown_box" v-show="classnum"> + <view class="dropdown_item" :class="classnumindex == 0 ? 'act2' : ''" + @click="chengclassnumindex(0)"> 降序 </view> - <view class="dropdown_item" - :class="classnumindex == 1 ? 'act2' : ''" - @click="chengclassnumindex(1)"> + <view class="dropdown_item" :class="classnumindex == 1 ? 'act2' : ''" + @click="chengclassnumindex(1)"> 升序 </view> </view> </view> - <view @click="changetext()" - class="class_box_top_cont"> + <view @click="changetext()" class="class_box_top_cont"> 标签文字 <view class="iconfont icon-arow_down"></view> - <view class="dropdown_box" - v-show="showtext"> - <view class="dropdown_item" - :class="textindex == 1 ? 'act2' : ''" - @click="chengetextindex(1)"> + <view class="dropdown_box" v-show="showtext"> + <view class="dropdown_item" :class="textindex == 1 ? 'act2' : ''" + @click="chengetextindex(1)"> 听力 </view> - <view class="dropdown_item" - :class="textindex == 2 ? 'act2' : ''" - @click="chengetextindex(2)"> + <view class="dropdown_item" :class="textindex == 2 ? 'act2' : ''" + @click="chengetextindex(2)"> 阅读 </view> - <view class="dropdown_item" - :class="textindex == 3 ? 'act2' : ''" - @click="chengetextindex(3)"> + <view class="dropdown_item" :class="textindex == 3 ? 'act2' : ''" + @click="chengetextindex(3)"> 写作 </view> - <view class="dropdown_item" - :class="textindex == 4 ? 'act2' : ''" - @click="chengetextindex(4)"> + <view class="dropdown_item" :class="textindex == 4 ? 'act2' : ''" + @click="chengetextindex(4)"> 口语 </view> </view> @@ -151,39 +125,32 @@ </view> - <view class="class_card" - v-for="(item, index) in classlist" - v-if="isloding == false" - :key="index" @click="toclassdetal(item)"> + <view class="class_card" v-for="(item, index) in classlist" v-if="isloding == false" :key="index" + @click="toclassdetal(item)"> <view class="class_card_top"> <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" v-html="highlightSearch(item.name)"> + <view class="class_card_right_top" v-html="highlightSearch(item.name)"> <!-- {{ item.name }} --> </view> - <view class="class_card_right_bot" - v-show="item.classify == 1"> + <view class="class_card_right_bot" v-show="item.classify == 1"> 听力 </view> - <view class="class_card_right_bot" - v-show="item.classify == 2"> + <view class="class_card_right_bot" v-show="item.classify == 2"> 阅读 </view> - <view class="class_card_right_bot" - v-show="item.classify == 3"> + <view class="class_card_right_bot" v-show="item.classify == 3"> 写作 </view> - <view class="class_card_right_bot" - v-show="item.classify == 4"> + <view class="class_card_right_bot" v-show="item.classify == 4"> 口语 </view> </view> </view> <view class="class_infobox"> - <view class="class_info" - style="width:80rpx ;"> + <view class="class_info" style="width:80rpx ;"> <view class="class_info_top"> 班级人数 </view> @@ -215,10 +182,8 @@ </view> </view> </view> - <view class="overlay" - v-if="false"> - <view class="addstudent" - v-show="false"> + <view class="overlay" v-if="false"> + <view class="addstudent" v-show="false"> <view class="close"> <image src="https://file.langsi.online/yasiimg/web/static/uSzPsPoFgoVwcsl7pJ89"></image> @@ -232,10 +197,8 @@ 学员名称 </view> <view class="addstudent_input"> - <input type="text" - placeholder="搜索相关内容..." - class="input" - placeholder-style="color:#C7CDD3;font-size: 24rpx; "> + <input type="text" placeholder="搜索相关内容..." class="input" + placeholder-style="color:#C7CDD3;font-size: 24rpx; "> </view> </view> <view class="addstudent_input_box"> @@ -243,18 +206,15 @@ 学员ID </view> <view class="addstudent_input"> - <input type="text" - placeholder="搜索相关内容..." - class="input" - placeholder-style="color:#C7CDD3;font-size: 24rpx; "> + <input type="text" placeholder="搜索相关内容..." class="input" + placeholder-style="color:#C7CDD3;font-size: 24rpx; "> </view> </view> <view class="addbtn"> 添加 </view> </view> - <view class="addtip" - v-show="false"> + <view class="addtip" v-show="false"> <view class="logo"> <image src="https://file.langsi.online/yasiimg/web/static/uxsaoHOpSUoxnX7lU3Fe"></image> </view> @@ -265,516 +225,661 @@ </view> </view> <indexlist v-show="checkindex == 0" /> + <u-popup v-model="show" mode="bottom" length="75%" :safe-area-inset-bottom='true' :closeable="true" + :duration="300" border-radius="25"> + <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;border: 2rpx solid #DDE2EE;border-radius: 50%;" + @click="btn()"> + <view class="imgbox" style="width: 112rpx; height: 112rpx;border-radius: 50%;"> + <image :src="imgurl" mode="" style="width: 112rpx; height: 112rpx;border-radius: 50%;"> + </image> + </view> + + <view class="dashboard"> + <image src="https://file.langsi.online/yasiimg/web/static/u03pE8b1O2DykSYUg2mp" 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> + <!-- 弹出层 --> + <u-select v-model="show2" :list="list" @confirm="confirm"></u-select> + + <view class="caption_input"> + <u-input v-model="form.name" @click="showPopup" placeholder="请输入班级标签" /> + </view> + + + + + </view> + <!-- 班级学生 --> + <view class="class_body"> + <view class="caption_flex"> + <view>班级学生</view> + <view class="caption_boder_text2">点击头像选择班级学员</view> + </view> + <view class="select_box" style="display: flex;flex-wrap: wrap;"> + <view class="class_ys" v-for="(item, index) in stuinfo" :key="index" + style="position: relative;"> + <view class="close" + style="position: absolute;top: 0rpx;right: 8rpx;width: 20rpx;height: 20rpx;" + @click="delstu(item.id)"> + <image src="https://file.langsi.online/yasiimg/web/static/ueH3qwYazyVXmiYoVPJE" mode=""> + </image> + </view> + <view class="class_tp"> + <image :src="item.avatar" mode="" + style="width: 56rpx;height: 56rpx;border-radius: 50%;"></image> + </view> + <view class="class_wz">{{ item.name }}</view> + </view> + <view class="caption_boder" @click="toaddstu()"> + + <view class="class_tp_image" > + <image src="https://file.langsi.online/yasiimg/web/static/utw2UbXetgo1FDQpvGKq" mode=""> + </image> + </view> + </view> + </view> + + </view> + <!-- 班级老师 --> + <view class="class_body"> + <view class="caption_flex"> + <view>班级老师</view> + <view class="caption_boder_text2">点击加号选择班级老师</view> + </view> + <view class="select_box" style="display: flex;flex-wrap: wrap;"> + <view class="class_ys" v-for="(item, index) in teacherinfo" :key="index" + style="position: relative;"> + <view class="close" + style="position: absolute;top: 0rpx;right: 8rpx;width: 20rpx;height: 20rpx;" + @click="delstu(item.id)"> + <image src="https://file.langsi.online/yasiimg/web/static/ueH3qwYazyVXmiYoVPJE" mode=""> + </image> + </view> + <view class="class_tp"> + <image :src="item.avatar" mode="" + style="width: 56rpx;height: 56rpx;border-radius: 50%;"></image> + </view> + <view class="class_wz">{{ item.name }}</view> + </view> + <view class="caption_boder" @click="addteacher()"> + + <view class="class_tp_image" > + <image src="https://file.langsi.online/yasiimg/web/static/utw2UbXetgo1FDQpvGKq" mode=""> + </image> + </view> + </view> + </view> + + </view> + <view class="caption_add" @click="addclass()">添加</view> + </view> + </u-popup> </view> </template> <script> -import indexlist from "../compoents/indexList.vue" -export default { - components: { - indexlist - }, - data() { - return { - shownocont: false, - bgc: { - backgroundColor: "#F6F9FC", - }, - checkindex: 1, - isDropdownOpen: true, - classlist: {}, - isloding: true, - changeclasslist: {}, - classnum: false, - classnumindex: -1, - showtext: false, - textindex: 0, - searchKeyword: '', - totalLastNum:'', - totalAvgScore:'', - totalWorkCompletionDegre:0, - } - }, - onLoad(option) { - this.getclassList() - }, - - methods: { - highlightSearch(name) { - // 使用正则表达式替换匹配到的 searchKeyword 为带有颜色的文字 - if (this.searchKeyword) { - const regex = new RegExp(this.searchKeyword, 'gi'); - return name.replace(regex, match => `<span style="color: #2D7CE6 ;">${match}</span>`); - } - return name; - }, - toclassdetal(item) { - - uni.navigateTo({ - url: "/pages_teacher/teacher_class/class_detail?id=" + item.id - }).then(res => { - - }).catch(err => { - - }); + import indexlist from "../compoents/indexList.vue" + export default { + components: { + indexlist }, - search() { - // 根据关键字过滤 this.classlist - if(this.searchKeyword!=''){ - const filteredList = JSON.parse(JSON.stringify(this.changeclasslist)).filter(item => item.name.includes(this.searchKeyword)); - // 更新 this.classlist 为过滤后的列表 - this.classlist = filteredList; - }else{ - this.fuwei() - } - - }, - calculatePercentage(value1, value2) { - if (value2 === 0) { + data() { + return { + shownocont: false, + bgc: { + backgroundColor: "#F6F9FC", + }, + checkindex: 1, + isDropdownOpen: true, + classlist: {}, + isloding: true, + changeclasslist: {}, + classnum: false, + classnumindex: -1, + showtext: false, + textindex: 0, + searchKeyword: '', + totalLastNum: '', + totalAvgScore: '', + totalWorkCompletionDegre: 0, + // 班级名称数据绑定 + designation: '', + // 班级标签数据绑定 + labels: '', + // 弹出层的变量 + show: false, + // 下拉框 + show2: false, + form:{ + name: '', + }, - return '0%'; // 或者返回其他默认值 + list: [{ + value: '1', + label: '听力' + }, + { + value: '2', + label: '阅读' + }, + { + value: '3', + label: '写作' + }, + { + value: '4', + label: '口语' + } + ], + icons: 'arrow-down-fill', + icons_rigth: 'arrow-down-fill', + icons_top: 'arrow-up-fill', + imgurl: "", + token: '', + userImgs: '', + teacherinfo: [], + stuinfo: [], } + }, + onLoad(option) { + this.getclassList() + uni.removeStorageSync('selectedteacherinfo'); + uni.removeStorageSync('selectedStuInfo'); + }, + onShow() { + const selectedteacherinfo = uni.getStorageSync('selectedteacherinfo'); - return ((value1 / value2) * 100).toFixed(0) + '%'; - }, - changeclass() { - this.classnum = !this.classnum - }, - chengclassnumindex(num) { - if (num == this.classnumindex) { - this.classnumindex = -1 - } else { - this.classnumindex = num - } - if (this.classnumindex == 0) { - this.classlist.sort((a, b) => b.totalMembers - a.totalMembers); - } - if (this.classnumindex == 1) { - // 升序排列 classlist 数组,根据 totalMembers 属性 - this.classlist.sort((a, b) => a.totalMembers - b.totalMembers); - } - if (this.classnumindex == -1) { - this.fuwei() - } + if (selectedteacherinfo && selectedteacherinfo.length > 0) { + this.teacherinfo = selectedteacherinfo + // Remove duplicates from this.classinfo + // this.classinfo = this.classinfo.filter(item => !selectedClassInfo.some(selectedItem => selectedItem.id === item.id)); + + // // Add non-duplicate items from selectedClassInfo to this.classinfo + // this.classinfo = this.classinfo.concat(selectedClassInfo); - }, - fuwei() { - - this.classlist = JSON.parse(JSON.stringify(this.changeclasslist)); - }, - changetext() { - this.showtext = !this.showtext - }, - chengetextindex(num) { - if (num == this.textindex) { - this.textindex = 0 - } else { - this.textindex = num } - if (this.textindex !== 0 || this.classnumindex === 1) { - this.classlist.sort((a, b) => { - if (this.textindex !== 0 && a.classify === this.textindex) { - return -1; // 将匹配的项放在前面 - } - if (this.textindex !== 0 && b.classify === this.textindex) { - return 1; // 将匹配的项放在前面 - } - if (this.classnumindex === 0) { - return b.totalMembers - a.totalMembers; // 对 totalMembers 进行降序排列 - } - if (this.classnumindex === 1) { - return a.totalMembers - b.totalMembers; // 对 totalMembers 进行升序排列 - } - return 0; // 保持原有顺序 + const selectedstuInfo = uni.getStorageSync('selectedStuInfo'); + + if (selectedstuInfo && selectedstuInfo.length > 0) { + this.stuinfo = selectedstuInfo + // Remove duplicates from this.classinfo + // this.stuinfo = this.stuinfo.filter(item => !selectedstuInfo.some(selectedItem => selectedItem.id === item.id)); + + // // Add non-duplicate items from selectedClassInfo to this.classinfo + // this.stuinfo = this.stuinfo.concat(selectedstuInfo); + + } + }, + methods: { + addclass(){ + + let memberIds =[] + let teacherIds =[] + this.stuinfo.forEach(item => { + memberIds.push(item.id); // 将 id 添加到数组中 }); - } else { - - this.fuwei(); - } - - - }, - getclassList() { - this.$u.get("https://api.admin-v2.langsi.online/admin-api/classroom/page").then(res => { - - if (res.code === 0) { - this.classlist = res.data.list; - this.changeclasslist = JSON.parse(JSON.stringify(this.classlist)); - this.isloding = false; - const list = res.data.list; + this.teacherinfo.forEach(item => { + teacherIds.push(item.id); // 将 id 添加到数组中 + }); + let classif ='' + if(this.form.name=='听力'){ + classif=1 + }else if(this.form.name=='阅读'){ + classif=2 + }else if(this.form.name=='写作'){ + classif=3 + }else if(this.form.name=='口语'){ + classif=4 + } + let data ={ + name:this.designation, + avatar:this.imgurl, + classify:classif, + memberIds:memberIds, + teacherIds:teacherIds - if (list.length > 0) { - // 计算 totalMembers 总和 - const totalMembersSum = list.reduce((sum, item) => sum + item.totalMembers, 0); - - // 计算 workCompletionDegree 平均值 - const workCompletionDegreeAvg = list.reduce((sum, item) => sum + item.workCompletionDegree, 0) / list.length; + } + this.$u.post(`https://api.admin-v2.langsi.online/admin-api/classroom/create`, data).then(res => { + if (res.code === 0) { + this.$refs.uToast.show({ + title: '添加成功', + type: 'success', + position:'top' + }) + uni.removeStorageSync('selectedteacherinfo'); + uni.removeStorageSync('selectedStuInfo'); + this.getclassList() + this.stuinfo=[] + this.teacherinfo=[] + this.designation='' + this.form.name='' + this.imgurl='' + this.show=false + }else{ + this.$refs.uToast.show({ + title: '添加失败', + type: 'error', + position:'top' + + }) - // 计算 avgScore 平均值 - const avgScoreAvg = list.reduce((sum, item) => sum + item.avgScore, 0) / list.length; - console.log(workCompletionDegreeAvg,'workCompletionDegreeworkCompletionDegree'); - // 将计算结果赋值给对应的变量 - this.totalLastNum = totalMembersSum; - this.totalWorkCompletionDegre = workCompletionDegreeAvg; - this.totalAvgScore = avgScoreAvg; - // console.log(this.totalworkCompletionDegree,'totalworkCompletionDegreetotalworkCompletionDegree'); - } else { - // 处理空数组的情况,例如设置默认值或者给出提示 - this.totalLastNum = 0; - this.totalWorkCompletionDegre = 0; - this.totalAvgScore = 0; } - } - }); - }, - getstuList() { - this.$u.get("https://api.admin-v2.langsi.online/admin-api/classroom/page").then(res => { - + }); + console.log(data,'data'); + }, + delcls(id) { + this.teacherinfo = this.teacherinfo.filter(item => item.id !== id); + }, + delstu(id) { + this.stuinfo = this.stuinfo.filter(item => item.id !== id); + }, + toaddstu() { + uni.navigateTo({ + url: "/pages_teacher/pages_add/add_studentsforwork?stuinfo=" + encodeURIComponent(JSON + .stringify(this.stuinfo)) - if (res.code == 0) { - this.classlist = res.data.list - this.isloding = false + }).then(res => { + }).catch(err => { + + }); + }, + addteacher() { + uni.navigateTo({ + url: "/pages/Mystudent/addTeacher?teacherinfo=" + encodeURIComponent(JSON.stringify(this.teacherinfo)) + }).then(res => { + + }).catch(err => { + + }); + }, + getQiniuToken() { + wx.request({ + url: 'https://v2.ielts.langsi.online/file/getToken', + method: 'get', // Adjust the request method as needed + // data: yourData, + header: { + 'Authorization': 'eyJhbGciOiJIUzUxMiJ9.eyJub3RfeWJzX3VzZXJfa2V5IjoiNWZiYzA4YmUtNDZlMi00NDUzLThmYjQtMjFlNzhjZDIxY2EyIn0.jw2fyMnlNEW-zx8cH6aPh_H-WqEAHDQdh4oCpYg3qBIJZEmw6L4oNWJPvKHM9edmRdLO0p2z7_vlCYoY00NqxA ' + }, + success: (res) => { + console.log(res); + this.token = res.data.data.token + }, + fail: (err) => { + console.log(err); + } + }); + // this.$u.get('https://v2.ielts.langsi.online/file/getToken').then(res => { + // console.log(res.data); + // this.token = res.data.token + // }).catch(err => { + // console.log(err) + // }) + + }, + btn() { + this.getQiniuToken() + let _this = this + let math = 'static/' + _this.$u.guid(20) + uni.chooseImage({ + success: (chooseImageRes) => { + let tempFilePaths = chooseImageRes.tempFilePaths; + console.log(tempFilePaths) + tempFilePaths.forEach(item => { + // 上传图片到七牛云 + wx.uploadFile({ + url: 'https://upload-cn-east-2.qiniup.com', + name: 'file', + filePath: item, + formData: { + token: _this.token, //后端返回的token + key: 'yasiimg/header/' + math + }, + success: function(res) { + + let str = JSON.parse(res.data) + // console.log(str.key) + _this.userImgs = 'https://file.langsi.online/' + str + .key + console.log(_this.userImgs) + _this.imgurl = _this.userImgs + } + }); + }) + + + } + }); + }, + addsmt() { + if (this.checkindex == 1) { + this.create() } - }) + }, + create() { + this.show = !this.show + }, + showPopup() { + this.show2 = !this.show2 + this.icons = this.icons_top + }, + confirm(e) { + this.icons = this.icons_rigth + e.forEach(item => { + this.form.name = item.label + }) + }, + highlightSearch(name) { + // 使用正则表达式替换匹配到的 searchKeyword 为带有颜色的文字 + if (this.searchKeyword) { + const regex = new RegExp(this.searchKeyword, 'gi'); + return name.replace(regex, match => `<span style="color: #2D7CE6 ;">${match}</span>`); + } + return name; + }, + toclassdetal(item) { + + uni.navigateTo({ + url: "/pages_teacher/teacher_class/class_detail?id=" + item.id + }).then(res => { + + }).catch(err => { + + }); + }, + search() { + // 根据关键字过滤 this.classlist + if (this.searchKeyword != '') { + const filteredList = JSON.parse(JSON.stringify(this.changeclasslist)).filter(item => item.name + .includes(this.searchKeyword)); + // 更新 this.classlist 为过滤后的列表 + this.classlist = filteredList; + } else { + this.fuwei() + } + + }, + calculatePercentage(value1, value2) { + if (value2 === 0) { + + return '0%'; // 或者返回其他默认值 + } + + return ((value1 / value2) * 100).toFixed(0) + '%'; + }, + changeclass() { + this.classnum = !this.classnum + }, + chengclassnumindex(num) { + if (num == this.classnumindex) { + this.classnumindex = -1 + } else { + this.classnumindex = num + } + if (this.classnumindex == 0) { + this.classlist.sort((a, b) => b.totalMembers - a.totalMembers); + } + if (this.classnumindex == 1) { + // 升序排列 classlist 数组,根据 totalMembers 属性 + this.classlist.sort((a, b) => a.totalMembers - b.totalMembers); + } + if (this.classnumindex == -1) { + this.fuwei() + } + + }, + fuwei() { + + this.classlist = JSON.parse(JSON.stringify(this.changeclasslist)); + }, + changetext() { + this.showtext = !this.showtext + }, + chengetextindex(num) { + if (num == this.textindex) { + this.textindex = 0 + } else { + this.textindex = num + } + if (this.textindex !== 0 || this.classnumindex === 1) { + this.classlist.sort((a, b) => { + if (this.textindex !== 0 && a.classify === this.textindex) { + return -1; // 将匹配的项放在前面 + } + if (this.textindex !== 0 && b.classify === this.textindex) { + return 1; // 将匹配的项放在前面 + } + if (this.classnumindex === 0) { + return b.totalMembers - a.totalMembers; // 对 totalMembers 进行降序排列 + } + if (this.classnumindex === 1) { + return a.totalMembers - b.totalMembers; // 对 totalMembers 进行升序排列 + } + return 0; // 保持原有顺序 + }); + } else { + + this.fuwei(); + } + + + }, + getclassList() { + this.$u.get("https://api.admin-v2.langsi.online/admin-api/classroom/page").then(res => { + + if (res.code === 0) { + this.classlist = res.data.list; + this.changeclasslist = JSON.parse(JSON.stringify(this.classlist)); + this.isloding = false; + const list = res.data.list; + + if (list.length > 0) { + // 计算 totalMembers 总和 + const totalMembersSum = list.reduce((sum, item) => sum + item.totalMembers, 0); + + // 计算 workCompletionDegree 平均值 + const workCompletionDegreeAvg = list.reduce((sum, item) => sum + item + .workCompletionDegree, 0) / list.length; + + // 计算 avgScore 平均值 + const avgScoreAvg = list.reduce((sum, item) => sum + item.avgScore, 0) / list.length; + console.log(workCompletionDegreeAvg, 'workCompletionDegreeworkCompletionDegree'); + // 将计算结果赋值给对应的变量 + this.totalLastNum = totalMembersSum; + this.totalWorkCompletionDegre = workCompletionDegreeAvg; + this.totalAvgScore = avgScoreAvg; + // console.log(this.totalworkCompletionDegree,'totalworkCompletionDegreetotalworkCompletionDegree'); + } else { + // 处理空数组的情况,例如设置默认值或者给出提示 + this.totalLastNum = 0; + this.totalWorkCompletionDegre = 0; + this.totalAvgScore = 0; + } + } + }); + }, + getstuList() { + this.$u.get("https://api.admin-v2.langsi.online/admin-api/classroom/page").then(res => { + + + if (res.code == 0) { + this.classlist = res.data.list + this.isloding = false + + } + }) + } } } -} </script> -<style lang="scss" > -.view_body { - width: 750rpx; - background: #F6F9FC; +<style lang="scss"> + .view_body { + width: 750rpx; + background: #F6F9FC; - .nocont { - margin-top: 340rpx; - margin-left: 216rpx; + .nocont { + margin-top: 340rpx; + margin-left: 216rpx; - .nocont_tip { - margin-left: 28rpx; - width: 264rpx; - display: flex; - flex-wrap: wrap; - justify-content: center; - - .nocont_tip_img { - width: 213.36rpx; - height: 220rpx; - } - - .nocont_tip_txt { - font-size: 24rpx; - font-family: Microsoft YaHei, Microsoft YaHei; - font-weight: 400; - color: #0E3B77 - } - } - - .nocont_button { - margin-top: 100rpx; - display: flex; - flex-wrap: wrap; - justify-content: center; - align-items: center; - width: 320rpx; - height: 80rpx; - background: #2E7CE6; - border-radius: 20rpx 20rpx 20rpx 20rpx; - font-size: 24rpx; - font-family: 'PingFang', 'PingFang'; - font-weight: 800; - color: #FFFFFF; - } - } - - .student_page { - .student_page_top { - padding: 32rpx; - - .search_box { - width: 686rpx; - height: 88rpx; - background: #FFFFFF; - border-radius: 20rpx 20rpx 20rpx 20rpx; + .nocont_tip { + margin-left: 28rpx; + width: 264rpx; display: flex; - flex-wrap: nowrap; + flex-wrap: wrap; + justify-content: center; - .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; - } + .nocont_tip_img { + width: 213.36rpx; + height: 220rpx; } - .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: 452rpx; - 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; - - } - } - } - - .info_box { - display: flex; - flex-wrap: nowrap; - align-items: center; - justify-content: space-around; - margin-top: 20rpx; - width: 686rpx; - height: 128rpx; - background: linear-gradient(179deg, rgba(255, 237, 223, 0.65) 0%, #FFFFFF 100%); - border-radius: 18rpx 18rpx 18rpx 18rpx; - - .info_cont { - width: 110rpx; - display: flex; - justify-content: center; - flex-wrap: wrap; - - .info_cont_top { - font-size: 20rpx; - font-family: 'PingFang', 'PingFang'; - font-weight: 500; - color: rgba(7, 47, 90, 0.5); - line-height: 24rpx; - } - - .info_cont_bot { - margin-top: 12rpx; - font-size: 28rpx; - font-family: 'PingFang', 'PingFang'; - font-weight: 800; - color: #2D7CE6; - } - } - } - - .chekbox { - margin-top: 32rpx; - display: flex; - flex-wrap: nowrap; - align-items: center; - - .check { - margin-right: 84rpx; - font-size: 28rpx; - font-family: 'PingFang', 'PingFang'; - font-weight: 500; - color: rgba(7, 47, 90, 0.6); - } - - .act1 { - font-size: 32rpx; - font-family: 'PingFang', 'PingFang'; - font-weight: 800; - color: #2D7CE6; - } - - .add { - margin-left: auto; - display: flex; - align-items: center; - justify-content: center; - width: 138rpx; - height: 52rpx; - background: #FFF2E4; - border-radius: 26rpx 26rpx 26rpx 26rpx; - + .nocont_tip_txt { font-size: 24rpx; - font-family: 'PingFang', 'PingFang'; - font-weight: 500; - color: #F18F21; + font-family: Microsoft YaHei, Microsoft YaHei; + font-weight: 400; + color: #0E3B77 } } + .nocont_button { + margin-top: 100rpx; + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; + width: 320rpx; + height: 80rpx; + background: #2E7CE6; + border-radius: 20rpx 20rpx 20rpx 20rpx; + font-size: 24rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 800; + color: #FFFFFF; + } } - .class_box { - padding: 0 32rpx; - display: flex; - flex-wrap: wrap; - - .class_box_top { - width: 100%; - display: flex; - flex-wrap: nowrap; - align-items: center; - - - // justify-content: space-around; - .class_box_top_cont { - position: relative; - margin-right: 12rpx; - display: flex; - flex-wrap: nowrap; - background: #FFFFFF; - border-radius: 20rpx 20rpx 20rpx 20rpx; - padding: 14rpx 30rpx; - font-size: 20rpx; - font-family: 'PingFang', 'PingFang'; - font-weight: 500; - color: rgba(7, 47, 90, 0.6); - - .icon-arow_down { - margin-left: 8rpx; - font-size: 18rpx; - } - - .dropdown_box { - left: 0; - top: 100%; - position: absolute; - width: 160rpx; - // height: 204rpx; - background: #FFFFFF; - box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.25); - border-radius: 20rpx 20rpx 20rpx 20rpx; - - .dropdown_item:last-child { - border-bottom: 0rpx solid #FFFFFF; - } - - .dropdown_item { - padding: 20rpx 40rpx; - font-size: 20rpx; - font-family: 'PingFang', 'PingFang'; - font-weight: 500; - color: rgba(46, 73, 117, 0.6); - border-bottom: 2rpx solid #F3F3F3; - } - - .act2 { - color: #2D7CE6; - } - } - } - - - - - - } - - .class_card { - margin-top: 20rpx; - width: 686rpx; - height: 296rpx; - background: #FFFFFF; - border-radius: 20rpx 20rpx 20rpx 20rpx; + .student_page { + .student_page_top { padding: 32rpx; - .class_card_top { + .search_box { + width: 686rpx; + height: 88rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; display: flex; flex-wrap: nowrap; - align-items: center; - .class_card_left { - width: 84rpx; - height: 84rpx; + .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; + } } - .class_card_right { - margin-left: 12rpx; + .serchbox { + // padding: 0 32rpx; display: flex; - flex-wrap: wrap; + 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; - .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; + .input { + // margin-left: 24rpx; + width: 452rpx; + 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; + } } } - .class_infobox { - margin-top: 20rpx; + .info_box { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-around; - width: 622rpx; + margin-top: 20rpx; + width: 686rpx; height: 128rpx; - background: #F9F9F9; - border-radius: 20rpx 20rpx 20rpx 20rpx; + background: linear-gradient(179deg, rgba(255, 237, 223, 0.65) 0%, #FFFFFF 100%); + border-radius: 18rpx 18rpx 18rpx 18rpx; - .class_info { + .info_cont { width: 110rpx; display: flex; - flex-wrap: wrap; justify-content: center; + flex-wrap: wrap; - .class_info_top { + .info_cont_top { font-size: 20rpx; font-family: 'PingFang', 'PingFang'; font-weight: 500; color: rgba(7, 47, 90, 0.5); + line-height: 24rpx; } - .class_info_bot { + .info_cont_bot { margin-top: 12rpx; font-size: 28rpx; font-family: 'PingFang', 'PingFang'; @@ -783,141 +888,478 @@ export default { } } } - } - } - } - .overlay { - display: flex; - justify-content: center; - align-items: center; + .chekbox { + margin-top: 32rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(0, 0, 0, 0.5); - z-index: 100; // 设置遮罩层在上方 + .check { + margin-right: 84rpx; + font-size: 28rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 500; + color: rgba(7, 47, 90, 0.6); + } - .addstudent { - position: relative; - padding: 40rpx; - width: 600rpx; - height: 632rpx; - background: #FFFFFF; - border-radius: 20rpx 20rpx 20rpx 20rpx; + .act1 { + font-size: 32rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 800; + color: #2D7CE6; + } - .close { - top: 20rpx; - right: 20rpx; - position: absolute; - width: 20rpx; - height: 20rpx; - } + .add { + margin-left: auto; + display: flex; + align-items: center; + justify-content: center; + width: 138rpx; + height: 52rpx; + background: #FFF2E4; + border-radius: 26rpx 26rpx 26rpx 26rpx; - .addstudent_tit { - width: 100%; - text-align: center; - font-size: 36rpx; - font-family: 'PingFang'; - font-weight: 800; - color: #2E4975; - line-height: 36rpx; - - } - - .addstudent_input_box { - margin-top: 40rpx; - - .addstudent_input_tit { - font-size: 28rpx; - font-family: 'PingFang'; - font-weight: 500; - color: #2E4975; + font-size: 24rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 500; + color: #F18F21; + } } - .addstudent_input { - margin-top: 16rpx; - width: 520rpx; - height: 80rpx; + } + + .class_box { + padding: 0 32rpx; + display: flex; + flex-wrap: wrap; + + .class_box_top { + width: 100%; + display: flex; + flex-wrap: nowrap; + align-items: center; + + + // justify-content: space-around; + .class_box_top_cont { + position: relative; + margin-right: 12rpx; + display: flex; + flex-wrap: nowrap; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + padding: 14rpx 30rpx; + font-size: 20rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 500; + color: rgba(7, 47, 90, 0.6); + + .icon-arow_down { + margin-left: 8rpx; + font-size: 18rpx; + } + + .dropdown_box { + left: 0; + top: 100%; + position: absolute; + width: 160rpx; + // height: 204rpx; + background: #FFFFFF; + box-shadow: 0rpx 4rpx 10rpx 0rpx rgba(0, 0, 0, 0.25); + border-radius: 20rpx 20rpx 20rpx 20rpx; + + .dropdown_item:last-child { + border-bottom: 0rpx solid #FFFFFF; + } + + .dropdown_item { + padding: 20rpx 40rpx; + font-size: 20rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 500; + color: rgba(46, 73, 117, 0.6); + border-bottom: 2rpx solid #F3F3F3; + } + + .act2 { + color: #2D7CE6; + } + } + } + + + + + + } + + .class_card { + margin-top: 20rpx; + width: 686rpx; + height: 296rpx; background: #FFFFFF; border-radius: 20rpx 20rpx 20rpx 20rpx; + padding: 32rpx; - border: 2rpx solid #DDE2EE; + .class_card_top { + display: flex; + flex-wrap: nowrap; + align-items: center; - .input { - // margin-left: 24rpx; - width: 520rpx; - height: 80rpx; - // 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-left: 32rpx; - box-sizing: border-box; + .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; + } + } + } + + .class_infobox { + margin-top: 20rpx; + display: flex; + flex-wrap: nowrap; + align-items: center; + justify-content: space-around; + width: 622rpx; + height: 128rpx; + background: #F9F9F9; + border-radius: 20rpx 20rpx 20rpx 20rpx; + + .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; + } + } } } } + } - .addbtn { + .overlay { + display: flex; + justify-content: center; + align-items: center; + + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.5); + z-index: 100; // 设置遮罩层在上方 + + .addstudent { + position: relative; + padding: 40rpx; + width: 600rpx; + height: 632rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + + .close { + top: 20rpx; + right: 20rpx; + position: absolute; + width: 20rpx; + height: 20rpx; + } + + .addstudent_tit { + width: 100%; + text-align: center; + font-size: 36rpx; + font-family: 'PingFang'; + font-weight: 800; + color: #2E4975; + line-height: 36rpx; + + } + + .addstudent_input_box { + margin-top: 40rpx; + + .addstudent_input_tit { + font-size: 28rpx; + font-family: 'PingFang'; + font-weight: 500; + color: #2E4975; + } + + .addstudent_input { + margin-top: 16rpx; + width: 520rpx; + height: 80rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + + border: 2rpx solid #DDE2EE; + + .input { + // margin-left: 24rpx; + width: 520rpx; + height: 80rpx; + // 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-left: 32rpx; + box-sizing: border-box; + + } + } + } + + .addbtn { + display: flex; + align-items: center; + justify-content: center; + margin-top: 76rpx; + width: 520rpx; + height: 88rpx; + background: #2D7CE6; + border-radius: 20rpx 20rpx 20rpx 20rpx; + + font-size: 28rpx; + font-family: 'PingFang'; + font-weight: 500; + color: #FFFFFF; + } + + } + + .addtip { + position: relative; display: flex; align-items: center; justify-content: center; - margin-top: 76rpx; - width: 520rpx; - height: 88rpx; - background: #2D7CE6; + width: 440rpx; + height: 138rpx; + font-size: 32rpx; + font-family: 'PingFang', 'PingFang'; + font-weight: 800; + color: #2D7CE6; + background: linear-gradient(180deg, #C2DCFF 0%, #FFFFFF 100%); border-radius: 20rpx 20rpx 20rpx 20rpx; + .logo { + position: absolute; + width: 182rpx; + height: 244rpx; + top: -244rpx; + left: 130rpx; + } + + .close { + position: absolute; + top: 10rpx; + right: 20rpx; + + width: 20rpx; + height: 20rpx; + } + } + } + + .pop-up { + padding: 30rpx 32rpx; + border-radius: 20rpx 20rpx 0rpx 0rpx; + + .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; + + .imgbox { + width: 112rpx; + height: 112rpx; + border: 2rpx solid #DDE2EE; + border-radius: 50%; + } + } + + .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: #FFFFFF; + color: #2D7CE6; } - } - - .addtip { - position: relative; - display: flex; - align-items: center; - justify-content: center; - width: 440rpx; - height: 138rpx; - font-size: 32rpx; - font-family: 'PingFang', 'PingFang'; - font-weight: 800; - color: #2D7CE6; - background: linear-gradient(180deg, #C2DCFF 0%, #FFFFFF 100%); - border-radius: 20rpx 20rpx 20rpx 20rpx; - - .logo { - position: absolute; - width: 182rpx; - height: 244rpx; - top: -244rpx; - left: 130rpx; + .element.style { + background-color: red; } - .close { - position: absolute; - top: 10rpx; - right: 20rpx; - - width: 20rpx; - height: 20rpx; + .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; + } + + .class_body { + margin-top: 40rpx; + + .caption_flex { + display: flex; + align-items: center; + + .caption_boder_text2 { + font-size: 23rpx; + font-weight: 500; + color: #2D7CE6; + } + } + + .select_box { + .class_ys:nth-child(3n) { + margin-right: 0; + } + + .class_ys { + margin-top: 20rpx; + margin-right: 20rpx; + width: 215rpx; + height: 96rpx; + display: flex; + justify-content: center; + align-items: center; + padding: 20rpx; + // width: 215rpx; + height: 96rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + border: 2rpx solid #F0F0F0; + + .class_tp { + width: 56rpx; + height: 56rpx; + margin-right: 12rpx; + } + + .class_wz { + width: 125rpx; + font-size: 28rpx; + font-family: 'PingFang'; + font-weight: 500; + color: #072F5A; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + } + + .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; + } + + } + } + + } + + } } -}</style> +</style> \ No newline at end of file diff --git a/pages/compoents/pages_my.vue b/pages/compoents/pages_my.vue deleted file mode 100644 index 9ccacc0..0000000 --- a/pages/compoents/pages_my.vue +++ /dev/null @@ -1,38 +0,0 @@ -<template> - <view class="view_body"> - <u-navbar :is-back="false" title='学生' title-color="#000" :border-bottom="false" :background="true" - id="navbar"> - </u-navbar> - <view class="nostudy"> - <view> - <image src="http://tmp/HR4A5dtvNboB4502c7be9965e9ff4c184685e3fb36d9.png" mode=""></image> - <text>暂无学生,快去添加吧!</text> - </view> - <view> - <u-button type="primary">主要按钮</u-button> - </view> - </view> - - </view> -</template> - -<script> - export default { - data() { - return { - - } - }, - methods: { - - } - } -</script> - -<style lang="scss" scoped> - .view_body{ - height: 1624rpx; - background: linear-gradient(180deg, #E1EEFF 0%, #FFFFFF 100%); - } - -</style> diff --git a/pages/index/index.vue b/pages/index/index.vue index bafc371..7882b02 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1,55 +1,468 @@ <template> - <view class="content"> - <u-navbar title="雅思口语" :is-back="false" title-color="#ffffff" :border-bottom="false" - id="navbar"> - </u-navbar> - <image class="logo" src="/static/logo.png"></image> - <view class="text-area"> - <text class="title">{{title}}</text> + <!-- 头部代码 --> + <view class="view_by"> + <view> + <u-navbar :is-back="false" title='首页' title-color="#000" :border-bottom="false" :background="true" id="navbar"> + </u-navbar> + <view class="header_button"> + <u-button type="primary" shape="circle" :hair-line="false" class="custom-style">学生</u-button> + <u-button class="custom-style" shape="circle" :hair-line="false">班级</u-button> + </view> + </view> + <!-- 登录之后显示的页面 --> + <view v-if="flag"> + <view class="view_body"> + <view class="content_box"> + <view class="view_text">32</view> + <view>已完成人数(人)</view> + </view> + <view class="content_box"> + <view class="view_text">90%</view> + <view>已完成作业正确率</view> + </view> + </view> + <!-- 作业完成情况 --> + <view class="echarts_bar"> + <view> + <text>作业完成情况</text> + <view class="echarts_text"> + <view>本周</view> + + </view> + </view> + + <view class="echarts"> + <l-echart ref="chart" @finished="initChart"></l-echart> + </view> + + </view> + </view> + <!-- 没有数据显示的页面 --> + <view> + <view class="deer"> + <view class="deer_images"> + <image src="https://file.langsi.online/yasiimg/web/static/udGRdnpSfgV3LMD8Ksuv" mode=""></image> + </view> + <view class="deer_right"> + <view class="deer_text">当前暂无学习数据,快去布置作业吧!</view> + <view class="deer_button"> + <view>去安排</view> + <view class="r_image"><image src="https://file.langsi.online/yasiimg/web/static/uITFZ6vUIiA0P2KBz1i8" mode=""></image></view> + </view> + </view> + + </view> + <view class="echarts_bar"> + <view> + <text>作业完成情况</text> + <view class="echarts_text"> + <view>本周</view> + + </view> + </view> + + <view class="echarts"> + <l-echart ref="chart" @finished="initChart"></l-echart> + </view> + + </view> + </view> + <!-- 底部区域 --> + <view v-if="flag"> + <view class="date"> + 8月31日 + </view> + + <view class="box_rate"> + <view class="rate_item"> + <view class="number"> + 21 + </view> + <view class="text"> + 完成人数 + </view> + </view> + <view class="rate_item"> + <view class="number"> + 6 + </view> + <view class="text"> + 平均成绩/分 + </view> + </view> + <view class="rate_item"> + <view class="number"> + 80% + </view> + <view class="text"> + 作业正确率 + </view> + </view> + </view> + <view> + <view class="view_botton"> + <view class="view_spoken"> + <view> + <image src="https://file.langsi.online/yasiimg/web/static/u80EhqyvMfcOaaSyK09X" mode=""></image> + </view> + <view class="view_span"> + <text>口语单科模考</text> + <text>李斯丹妮</text> + </view> + </view> + <view class="view_text2"> + <view>正确率<text class="text2">80%</text></view> + <text>2023/02/23 12:00</text> + </view> + </view> + <view class="view_botton"> + <view class="view_spoken"> + <view> + <image src="https://file.langsi.online/yasiimg/web/static/u80EhqyvMfcOaaSyK09X" mode=""></image> + </view> + <view class="view_span"> + <text>口语单科模考</text> + <text>李斯丹妮</text> + </view> + </view> + <view class="view_text2"> + <view>正确率<text class="text2">80%</text></view> + <text>2023/02/23 12:00</text> + </view> + </view> + + </view> + <!--底部导航栏 --> + </view> + <!-- 没有数据显示的区域 --> + <view class="zu_footer"> + + <view class="date">8月31日</view> + <view class="zu_zp"> + <view class="zu_image"><image src="https://file.langsi.online/yasiimg/web/static/uFgs4acAUC68weaKB9Yi" mode=""></image></view> + <view class="zu_text">暂无学习记录,快去安排作业吧!</view> + </view> + + </view> </view> + </template> <script> + import * as echarts from '@/uni_modules/lime-echart/static/echarts.min' + import LEchart from '@/uni_modules/lime-echart/components/l-echart/l-echart.vue'; export default { + components: { + LEchart + }, data() { return { - title: 'Hello' + flag:false } - }, - onLoad() { - }, methods: { + async initChart() { + let _this = this + + const option = { + xAxis: { + type: 'category', + data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + }, + yAxis: { + type: 'value', + boundaryGap: ['10%', '20%',] + }, + series: [{ + data: [120, 200, 150, 80, 70, 110, 130], + type: 'bar' + }] + } + + const chart = await this.$refs.chart.init(echarts); + chart.setOption(option) + //return chart + }, } } </script> -<style> - .content { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - } +<style lang="scss" scoped> + .view_by { + background: linear-gradient(180deg, #E1EEFF 0%, #FFFFFF 100%); + padding: 32rpx; + - .logo { - height: 200rpx; - width: 200rpx; - margin-top: 200rpx; - margin-left: auto; - margin-right: auto; - margin-bottom: 50rpx; - } + .header_button { + display: flex; + justify-content: space-evenly; + align-items: center; - .text-area { - display: flex; - justify-content: center; - } - .title { - font-size: 36rpx; - color: #8f8f94; + .custom-style { + width: 180rpx; + height: 72rpx; + + + } + + .active { + background: #2D7CE6; + color: #fff; + box-shadow: inset 0rpx 8rpx 16rpx 0rpx rgba(255, 255, 255, 0.35); + } + + } + + .view_body { + display: flex; + justify-content: center; + align-items: center; + margin-top: 52rpx; + + .content_box { + flex: 1; + } + + + + .content_box:first-child { + + border-right: 2rpx solid rgba(0, 0, 0, 0.11); + } + + .view_text { + font-size: 76rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 500; + color: #2E4975; + + + } + + view { + display: flex; + flex-direction: column; + align-items: center; + + } + + } + + .echarts_bar { + width: 686rpx; + height: 459rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + opacity: 1; + margin-top: 32rpx; + padding: 32rpx; + + view { + display: flex; + justify-content: space-between; + + text { + font-size: 28rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 800; + color: #2E4975; + } + + } + + + + } + + + + .box_rate { + display: flex; + justify-content: center; + align-items: center; + padding: 30rpx; + background: linear-gradient(179deg, rgba(255, 237, 223, 0.65) 0%, #FFFFFF 100%); + border-radius: 18rpx 18rpx 18rpx 18rpx; + + .rate_item { + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + } + + .number { + font-size: 28rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 800; + color: #2D7CE6; + } + + .text { + font-size: 20rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 500; + color: rgba(7, 47, 90, 0.5); + } + } + + .date { + font-size: 24rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 800; + color: #2E4975; + padding: 30rpx; + } + + .view_botton { + display: flex; + align-items: center; + justify-content: space-between; + height: 124rpx; + background: #fff; + border-radius: 20rpx 20rpx 20rpx 20rpx; + margin: 20rpx 0rpx; + padding: 24rpx; + + .view_spoken { + display: flex; + align-items: center; + + .view_span { + display: flex; + flex-direction: column; + margin-left: 16rpx; + } + + .view_span text:nth-child(1) { + font-size: 28rpx; + font-family: PingFang SC, PingFang SC; + font-weight: bold; + color: #072F5A; + margin-bottom: 7rpx; + + } + + .view_span text:nth-child(2) { + font-size: 20rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 500; + color: rgba(46, 73, 117, 0.5); + margin-bottom: 7rpx; + } + } + + .view_text2 { + display: flex; + flex-direction: column; + text-align: right; + + view .text2 { + color: #F18F21; + font-size: 27rpx; + font-weight: 800; + margin-left: 7rpx; + } + + } + + + + .view_text2 view { + font-size: 20rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 500; + color: #F18F21; + } + + + .view_text2 text { + font-size: 20rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 500; + color: rgba(7, 47, 90, 0.4); + } + + image { + width: 76rpx; + height: 76rpx; + } + + } + .echarts{ + width: 300rpx; + height: 600rpx; + margin-top: -100rpx; + } + .deer{ + display: flex; + align-items: center; + } + .deer_images{ + width: 145rpx; + height: 245rpx; + margin-left: 15rpx; + } + .r_image{ + width: 16rpx; + height: 16rpx; + line-height: 16rpx; + margin-left: 8rpx; + } + .deer_button{ + display: flex; + justify-content: center; + align-items: center; + margin-top: 19rpx; + width: 160rpx; + height: 56rpx; + font-size: 20rpx; + font-weight: 500; + color: #FFFFFF; + + background: #2D7CE6; + border-radius: 86rpx 86rpx 86rpx 86rpx; + + } + .deer_right{ + margin-left: 20rpx; + } + .deer_text{ + font-size: 28rpx; + + font-weight: 500; + color: #627698; + } + .operation{ + height: 459rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + } + .zu_image{ + width: 172rpx; + height: 162rpx; + + } + .zu_text{ + font-size: 24rpx; + font-weight: 400; + color: #0E3B77; + margin: 20rpx 0rpx 50rpx 0rpx; + } + .zu_footer{ + // padding: 32rpx 0rpx; + } + .zu_zp{ + display: flex; + flex-direction: column; + align-items: center; + padding: 72rpx; + } + } </style> diff --git a/pages/pages_index/teacher_index.vue b/pages/pages_index/teacher_index.vue deleted file mode 100644 index a0dc876..0000000 --- a/pages/pages_index/teacher_index.vue +++ /dev/null @@ -1,105 +0,0 @@ -<template> - <view class="view_dingbu"> - <view class="top_box"> - - <view :class="thisTop==1?'top_box_active':'top_box_item'" @click="checkTop(1)">首页<view class="line" - v-if="thisTop==1"></view> - </view> - <view :class="thisTop==2?'top_box_active':'top_box_item'" @click="checkTop(2)">学生<view class="line" - v-if="thisTop==2"></view> - </view> - <view :class="thisTop==3?'top_box_active':'top_box_item'" @click="checkTop(3)">我的<view class="line" - v-if="thisTop==3"></view> - </view> - </view> - <view class="content"> - <home v-if="thisTop==1"></home> - <my v-if="thisTop==2"></my> - <min v-if="thisTop==3"></min> - </view> - </view> -</template> - -<script> - import home from '../compoents/pages_home.vue' - import min from '../compoents/pages_mine.vue' - import my from '../compoents/pages_my.vue' - export default { - components: { - home, - min, - my, - }, - data() { - return { - thisTop: 1, - partId: 350, - infolist: '', - } - }, - - methods: { - - checkTop(i) { - this.thisTop = i - }, - } - } -</script> - -<style scoped lang="scss"> - * { - box-sizing: border-box; - } - - - .top_box { - position: fixed; - bottom: 0; - width: 100%; - line-height: 84rpx; - background-color: #fff; - display: flex; - justify-content: space-around; - - .top_box_item { - position: relative; - color: #3B5878; - font-weight: 800; - font-size: 28rpx; - - .line { - position: absolute; - bottom: 0; - left: 50%; - transform: translateX(-50%); - width: 40rpx; - height: 4rpx; - background: #3996FD; - border-radius: 2rpx 2rpx 2rpx 2rpx; - } - } - - .top_box_active { - position: relative; - color: #3996FD; - font-weight: 800; - font-size: 28rpx; - - .line { - position: absolute; - bottom: 0; - left: 50%; - transform: translateX(-50%); - width: 40rpx; - height: 4rpx; - background: #3996FD; - border-radius: 2rpx 2rpx 2rpx 2rpx; - } - } - } - - .content { - width: 100%; - } -</style> \ No newline at end of file diff --git a/pages/user/user.vue b/pages/user/user.vue new file mode 100644 index 0000000..6247059 --- /dev/null +++ b/pages/user/user.vue @@ -0,0 +1,279 @@ +<template> + <view class="view_body"> + <view class="view_body_images"> + <u-navbar :is-back="false" title='我的' title-color="#000" :border-bottom="false" :background="true" id="navbar"> + </u-navbar> + <view class="view_header"> + <view> + <view> + <image src="https://file.langsi.online/yasiimg/web/static/uxaCSTBJAo7SkGHtheRR" mode=""></image> + </view> + <view class="view_images"> + <text>LUlY老师</text> + <u-button type="warning" size="mini">认证教师</u-button> + </view> + </view> + <view class="view_sniht"> + + </view> + </view> + <view class="view_reative"> + <view> + <text>学生人数</text> + <text>320</text> + </view> + <view> + <text>安排题数(道)</text> + <text>4300</text> + </view> + <view> + <text>总完成度</text> + <text>43</text> + </view> + <view> + <text>今日完成度</text> + <text>43</text> + </view> + </view> + <view class="view_centre"> + <view> + <view class="view_centre_images"> + <image src="https://file.langsi.online/yasiimg/web/static/uif1JIGCJXguCEO3Mdqx" mode=""></image> + </view> + <text>作业安排</text> + </view> + <view> + <view class="view_centre_images"> + <image src="https://file.langsi.online/yasiimg/web/static/u4BHxtTvVDGUDFaKPHz2" mode=""></image> + </view> + <text>学生管理</text> + </view> + <view> + <view class="view_centre_images"> + <image src="https://file.langsi.online/yasiimg/web/static/uPqAU9hXDLOa1zrX4xJX" mode=""></image> + </view> + <text>班级管理</text> + </view> + <view> + <view class="view_centre_images"> + <image src="https://file.langsi.online/yasiimg/web/static/uWHKotvBvHfXxwFzHiMP" mode=""></image> + </view> + <text>切换题库</text> + </view> + </view> + <view class="view_footer"> + <view> + <view class="view_icon"> + <u-icon name="question-circle" color="#2D7CE6"></u-icon> + </view> + <view class="wz"> + <view class=""> + 帮助中心 + </view> + <u-icon name="arrow-right"></u-icon> + </view> + </view> + <view class="icon"> + <view class="view_icon"> + <u-icon name="question-circle" color="#2D7CE6"></u-icon> + </view> + <view class="wz"> + <view class=""> + 关于我们 + </view> + <u-icon name="arrow-right"></u-icon> + </view> + </view> + <view class="icon"> + <view class="view_icon"> + <u-icon name="question-circle" color="#2D7CE6"></u-icon> + </view> + <view class="wz"> + <view class=""> + 退出登录 + </view> + <u-icon name="arrow-right"></u-icon> + </view> + </view> + </view> + </view> + + </view> +</template> + +<script> + export default { + data() { + return { + + } + }, + methods: { + + } + } +</script> + +<style lang="scss" scoped> + .view_body { + + height: 100vh; + background: linear-gradient(180deg, #E1EEFF 0%, #FFFFFF 100%); + border-radius: 0rpx 0rpx 0rpx 0rpx; + padding: 96rpx 34rpx; + + .view_body_images { + height: 347rpx; + background-image: url('https://file.langsi.online/yasiimg/web/static/u4sEWPTO8OQ8hzPMUdVX'); + background-size: cover; + background-position: center; + + } + + .view_reative { + z-index: 100; + height: 154rpx; + display: flex; + justify-content: space-evenly; + align-items: center; + background: linear-gradient(180deg, #E1EEFF 0%, #FFFFFF 100%); + // background-color: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + border: 2rpx solid #FFFFFF; + margin-top: 32rpx; + + view { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + } + } + + .view_reative view text:nth-child(1) { + height: 32rpx; + font-size: 20rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 500; + color: #2E4975; + line-height: 32rpx; + } + + .view_reative view text:nth-child(2) { + height: 46rpx; + font-size: 36rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 800; + color: #2E4975; + line-height: 47rpx; + } + + .view_header { + display: flex; + justify-content: space-between; + align-items: center; + + view { + display: flex; + } + + image { + display: flex; + justify-content: space-between; + width: 124rpx; + height: 124rpx; + border-radius: 803rpx 803rpx 803rpx 803rpx; + + } + } + + .view_images { + display: flex; + flex-direction: column; + margin-left: 20rpx; + + text { + height: 58rpx; + font-size: 32rpx; + font-family: PingFang SC, PingFang SC; + font-weight: 800; + color: #2E4975; + line-height: 58rpx; + } + } + + .view_centre { + display: flex; + justify-content: space-evenly; + align-items: center; + height: 150rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + overflow: hidden; + margin-top: 50rpx; + + view { + display: flex; + flex-direction: column; + // text-align: center; + justify-content: center; + align-items: center; + } + + text { + font-size: 24rpx; + font-weight: 700; + color: #20314C; + } + + .view_centre_images { + width: 40rpx; + height: 40rpx; + margin-bottom: 12rpx; + + } + } + + .view_footer { + width: 686rpx; + margin: 20rpx auto; + background: #fff; + border-radius: 20rpx 20rpx 20rpx 20rpx; + padding: 32rpx 40rpx; + + view { + display: flex; + + } + + .wz { + width: 550rpx; + display: flex; + justify-content: space-between; + border-bottom: 2rpx solid #EEEEEE; + padding-bottom: 34rpx; + + } + + .view_icon { + width: 35rpx; + height: 40rpx; + } + + .icon { + margin-top: 20rpx; + } + + + } + .view_sniht{ + width: 35rpx; + height: 75rpx; + // background-color: red; + background: url('https://file.langsi.online/yasiimg/web/static/uv2PZzLhKjm907ZBqqXn') no-repeat center; + background-size: 100% auto; + } + + + } +</style> diff --git a/pages_teacher/teacher_teachers/teacher_addOperation.vue b/pages_teacher/teacher_teachers/teacher_addOperation.vue index 140f900..e258d07 100644 --- a/pages_teacher/teacher_teachers/teacher_addOperation.vue +++ b/pages_teacher/teacher_teachers/teacher_addOperation.vue @@ -312,7 +312,7 @@ onLoad(option) { uni.removeStorageSync('selectedClassInfo'); uni.removeStorageSync('selectedStuInfo'); - // uni.removeStorageSync('selectforwork'); + uni.removeStorageSync('selectforwork'); this.classinfo = JSON.parse(decodeURIComponent(option.classinfo)) // let classinofs = [{ // name: '阅读5班', diff --git a/static/logo.png b/static/logo.png deleted file mode 100644 index b5771e2..0000000 Binary files a/static/logo.png and /dev/null differ diff --git a/static/tabbar/chuanti-act.png b/static/tabbar/chuanti-act.png new file mode 100644 index 0000000..7f69dcc Binary files /dev/null and b/static/tabbar/chuanti-act.png differ diff --git a/static/tabbar/chuanti.png b/static/tabbar/chuanti.png new file mode 100644 index 0000000..54c6015 Binary files /dev/null and b/static/tabbar/chuanti.png differ diff --git a/static/tabbar/class-active.png b/static/tabbar/class-active.png new file mode 100644 index 0000000..71bf564 Binary files /dev/null and b/static/tabbar/class-active.png differ diff --git a/static/tabbar/class.png b/static/tabbar/class.png new file mode 100644 index 0000000..24cf9cd Binary files /dev/null and b/static/tabbar/class.png differ diff --git a/static/tabbar/course-active.png b/static/tabbar/course-active.png new file mode 100644 index 0000000..71bf564 Binary files /dev/null and b/static/tabbar/course-active.png differ diff --git a/static/tabbar/course.png b/static/tabbar/course.png new file mode 100644 index 0000000..24cf9cd Binary files /dev/null and b/static/tabbar/course.png differ diff --git a/static/tabbar/home-active.png b/static/tabbar/home-active.png new file mode 100644 index 0000000..06bc184 Binary files /dev/null and b/static/tabbar/home-active.png differ diff --git a/static/tabbar/home.png b/static/tabbar/home.png new file mode 100644 index 0000000..2d6a553 Binary files /dev/null and b/static/tabbar/home.png differ diff --git a/static/tabbar/memory-active.png b/static/tabbar/memory-active.png new file mode 100644 index 0000000..192af6f Binary files /dev/null and b/static/tabbar/memory-active.png differ diff --git a/static/tabbar/my-active.png b/static/tabbar/my-active.png new file mode 100644 index 0000000..a972b7d Binary files /dev/null and b/static/tabbar/my-active.png differ diff --git a/static/tabbar/my.png b/static/tabbar/my.png new file mode 100644 index 0000000..244d8cc Binary files /dev/null and b/static/tabbar/my.png differ diff --git a/static/tabbar/signup-active.png b/static/tabbar/signup-active.png new file mode 100644 index 0000000..b4ecb61 Binary files /dev/null and b/static/tabbar/signup-active.png differ diff --git a/static/tabbar/signup.png b/static/tabbar/signup.png new file mode 100644 index 0000000..b10c410 Binary files /dev/null and b/static/tabbar/signup.png differ diff --git a/static/tabbar/tiku-act.png b/static/tabbar/tiku-act.png new file mode 100644 index 0000000..b9d9e92 Binary files /dev/null and b/static/tabbar/tiku-act.png differ diff --git a/static/tabbar/tiku.png b/static/tabbar/tiku.png new file mode 100644 index 0000000..2dbb1a2 Binary files /dev/null and b/static/tabbar/tiku.png differ diff --git a/static/tabbar/writing-active.png b/static/tabbar/writing-active.png new file mode 100644 index 0000000..763a2f8 Binary files /dev/null and b/static/tabbar/writing-active.png differ diff --git a/static/tabbar/writing.png b/static/tabbar/writing.png new file mode 100644 index 0000000..2a57332 Binary files /dev/null and b/static/tabbar/writing.png differ