Commit a11c2461 authored by 罗超's avatar 罗超

修改

parent 1c57d044
...@@ -195,9 +195,9 @@ export function getClassFeedBackList(data) { ...@@ -195,9 +195,9 @@ export function getClassFeedBackList(data) {
* 扫码签到 * 扫码签到
* @param {JSON参数} data * @param {JSON参数} data
*/ */
export function getSweepCode(data) { export function getTeacherCourse(data) {
return request({ return request({
url: "/class/AddClassCheck", url: "/Teacher/GetTeacherCourse",
method: 'post', method: 'post',
data data
}) })
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
<view class="course-item"> <view class="course-item">
<view style="width:287rpx;"> <view style="width:287rpx;">
<view class="course-name"> <view class="course-name">
成都2022科学益智L4-05乐思会 {{currentCourse?currentCourse.CourseName:'暂无课程'}}
</view> </view>
<van-progress percentage="75" :show-pivot="false" track-color="#EFEFEF" color="#282828" <view v-if="currentCourse">
<van-progress :percentage="(parseFloat(currentCourse.CompleteNum)/parseFloat(currentCourse.TotalClassNum))*100" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" /> stroke-width="5" />
<view class="course-progress"> <view class="course-progress">
上课进度 5/12 上课进度 {{currentCourse.CompleteNum}}/{{currentCourse.TotalClassNum}}
</view> </view>
<view class="course-opera"> <view class="course-opera">
<van-button @click="exchangeItemHandler" class-prefix="iconfont" icon=" icon-qiehuan1" round type="default" size="mini" <van-button @click="exchangeItemHandler" class-prefix="iconfont" icon=" icon-qiehuan1" round type="default" size="mini"
...@@ -17,8 +18,9 @@ ...@@ -17,8 +18,9 @@
</van-button> </van-button>
</view> </view>
</view> </view>
</view>
<image class="illustration" <image class="illustration"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_494.png" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902313000_814.png"
mode="widthFix"></image> mode="widthFix"></image>
</view> </view>
...@@ -30,125 +32,65 @@ ...@@ -30,125 +32,65 @@
:show="showItems" :show="showItems"
round round
position="bottom" position="bottom"
@click-overlay="hideExchangeBoxHandler" @click-overlay="hideExchangeBoxHandler(null)"
custom-style="height: 75%" custom-style="height: 75%"
> >
<view class="exchange-items"> <view class="exchange-items">
<view class="title-box"> <view class="title-box">
<text class="main-title">课程选择</text> <text class="main-title">课程选择{{Keywords}}</text>
<text class="sub-title">(共有3门课程)</text> <text class="sub-title">(共有{{courses.AllCourseList.length}}门课程)</text>
</view> </view>
<view class="courseCard-search"> <view class="courseCard-search" v-if="courses.AllCourseList.length>0">
<van-search <van-search
v-model="Keywords" :value="Keywords"
shape="round" shape="round"
style="border-radius: 20rpx;" style="border-radius: 20rpx;"
input-align="center" input-align="center"
background="#F6F6F6" background="#F6F6F6"
@search="searchHandler"
placeholder="请输入搜索关键词" placeholder="请输入搜索关键词"
/> />
<!-- <input v-model="Keywords" placeholder="请输入搜索关键词"/> --> <!-- <input v-model="Keywords" placeholder="请输入搜索关键词"/> -->
</view> </view>
<view class="courseCard-title"> <view class="courseCard-title" v-if="courses.AllCourseList.length>0">
<view class="workSituation-title-box flex"> <view class="workSituation-title-box flex">
<view class="workSituation-title flex" <view class="workSituation-title flex"
:class="tabNme==t.name?'active':''" :class="{'active':currentIndex==index}"
v-for="(t,index) in titleList" :key="index" v-for="(t,index) in titleList" :key="index"
@click="toggleTitle(t.name)"> @click="toggleTitle(index)">
<text class="name">{{t.name}}</text> <text class="name">{{t.name}}</text>
<view class="num">({{t.num}})</view> <view class="num">({{t.data.length}})</view>
<view class="current-title-box flex" v-show="tabNme==t.name"> <view class="current-title-box flex" v-show="tabNme==t.name">
<text class="name">{{t.name}}</text> <text class="name">{{t.name}}</text>
<view class="num">({{t.num}})</view> <view class="num">({{t.data.length}})</view>
</view>
</view>
</view>
</view> </view>
<view class="items">
<view class="item-course">
<view class="course-pic">
<image src="https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg" mode="aspectFill"></image>
</view>
<view class="content">
<view class="one_line course-name">
高中物理鸿志班(二期周五下午上课)
</view>
<van-progress percentage="46" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<view class="course-progress">
上课进度 5/12
</view>
<view style="text-align: right;">
<van-button @click="hideExchangeBoxHandler" color="#C91727" round size="mini"
custom-style="color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;">
选择课程
</van-button>
</view> </view>
</view> </view>
</view> </view>
<view class="item-course"> <view class="items" v-if="titleList[currentIndex].data.length>0">
<template v-for="(x,i) in titleList[currentIndex].data" >
<view class="item-course" v-if="x.CourseName.indexOf(Keywords)!=-1" :key="i">
<view class="course-pic"> <view class="course-pic">
<image src="https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg" mode="aspectFill"></image> <image :src="x.CoverImg!=''?x.CoverImg:'https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653901833000_638.png'" mode="aspectFill"></image>
</view> </view>
<view class="content"> <view class="content">
<view class="one_line course-name"> <view class="one_line course-name">
高中物理鸿志班(二期周五下午上课) {{x.CourseName}}
</view> </view>
<van-progress percentage="46" :show-pivot="false" track-color="#EFEFEF" color="#282828" <van-progress :percentage="(parseFloat(x.CompleteNum)/parseFloat(x.TotalClassNum))*100" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" /> stroke-width="5" />
<view class="course-progress"> <view class="course-progress">
上课进度 5/12 上课进度 {{x.CompleteNum}}/{{x.TotalClassNum}}
</view> </view>
<view style="text-align: right;"> <view style="text-align: right;">
<van-button @click="hideExchangeBoxHandler" color="#C91727" round size="mini" <van-button @click="hideExchangeBoxHandler(x)" color="#C91727" round size="mini"
custom-style="color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;">
选择课程
</van-button>
</view>
</view>
</view>
<view class="item-course">
<view class="course-pic">
<image src="https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg" mode="aspectFill"></image>
</view>
<view class="content">
<view class="one_line course-name">
高中物理鸿志班(二期周五下午上课)
</view>
<van-progress percentage="46" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<view class="course-progress">
上课进度 5/12
</view>
<view style="text-align: right;">
<van-button @click="hideExchangeBoxHandler" color="#C91727" round size="mini"
custom-style="color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;">
选择课程
</van-button>
</view>
</view>
</view>
<view class="item-course">
<view class="course-pic">
<image src="https://www.kfzimg.com/G06/M00/B5/48/p4YBAFsJY12AK0n7AAEM2KDUHRw535_n.jpg" mode="aspectFill"></image>
</view>
<view class="content">
<view class="one_line course-name">
高中物理鸿志班(二期周五下午上课)
</view>
<van-progress percentage="46" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<view class="course-progress">
上课进度 5/12
</view>
<view style="text-align: right;">
<van-button @click="hideExchangeBoxHandler" color="#C91727" round size="mini"
custom-style="color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;"> custom-style="color:#FFF;font-size: 24rpx;padding-left:16rpx;padding-right:10px;">
选择课程 选择课程
</van-button> </van-button>
</view> </view>
</view> </view>
</view> </view>
</template>
</view> </view>
</view> </view>
</van-popup> </van-popup>
...@@ -167,34 +109,61 @@ ...@@ -167,34 +109,61 @@
watch, watch,
computed, computed,
onMounted, onMounted,
defineEmits
} from "vue"; } from "vue";
import {getTeacherCourse} from '../../../api/index'
export default { export default {
props: {}, props: {},
setup() { emits:['change'],
setup(props,ctx) {
const Keywords=ref('')
let data = reactive({ let data = reactive({
statusBarHeight: 24, statusBarHeight: 24,
showItems:false, showItems:false,
Keywords:'',
titleList:[ titleList:[
{name:'全部课程',num:18}, {name:'全部课程',data:[]},
{name:'进行中',num:5}, {name:'进行中',data:[]},
{name:'已完成',num:18}, {name:'已完成',data:[]},
], ],
tabNme:'进行中' currentIndex:0,
courses:{},
currentCourse:null,
}); });
let methods={ let methods={
toggleTitle(t) { toggleTitle(t) {
data.tabNme = t data.currentIndex = t
}, },
exchangeItemHandler(){ exchangeItemHandler(){
data.showItems=true data.showItems=true
}, },
hideExchangeBoxHandler(){ hideExchangeBoxHandler(item){
if(item){
data.currentCourse=item
ctx.emit('change',item.courseId)
}
data.showItems=false data.showItems=false
},
queryTecherCourse(){
getTeacherCourse().then(r=>{
data.courses=r.Data
data.titleList[0].data=r.Data.AllCourseList
data.titleList[1].data=r.Data.NotFinishList
data.titleList[2].data=r.Data.FinishList
data.currentCourse=r.Data.AllCourseList.length>0?r.Data.AllCourseList[0]:null
console.log(data.currentCourse)
ctx.emit('change',data.currentCourse?data.currentCourse.courseId:0)
})
},
searchHandler(e){
Keywords.value=e.detail
} }
} }
methods.queryTecherCourse()
return { return {
...toRefs(data), ...toRefs(data),
Keywords,
...methods ...methods
}; };
}, },
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<van-icon name="plus" /> <van-icon name="plus" />
<text>导入考试信息</text> <text>导入考试信息</text>
</view> </view>
<block v-if="dataList && dataList.length>0">
<view class="examList activeOne" v-for="(item,index) in dataList" :key="index"> <view class="examList activeOne" v-for="(item,index) in dataList" :key="index">
<view class="examList-center-box" @click="examDetails(item.ExamId)"> <view class="examList-center-box" @click="examDetails(item.ExamId)">
<view class="examList-center-line"></view> <view class="examList-center-line"></view>
...@@ -43,6 +44,11 @@ ...@@ -43,6 +44,11 @@
</view> </view>
</view> </view>
</view>
</block>
<view class="noData" v-else>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png" mode="widthFix"></image>
<view>暂无考试信息</view>
</view> </view>
<van-popup :show="show" :round="true"> <van-popup :show="show" :round="true">
<view class="examList-popup-box"> <view class="examList-popup-box">
...@@ -190,6 +196,20 @@ ...@@ -190,6 +196,20 @@
}; };
</script> </script>
<style scoped> <style scoped>
.examList-box .noData{
text-align: center;
flex:1;
width: 100%;
}
.examList-box .noData image{
width:200rpx;
margin-bottom: 40rpx;
}
.examList-box .noData view{
font-size: 24rpx;
color: #cecece;
text-align: center;
}
.examList-hint-right view{ .examList-hint-right view{
padding: 16rpx 30rpx; padding: 16rpx 30rpx;
background: #C91727; background: #C91727;
......
<template> <template>
<view class="operation-box"> <view class="operation-box">
<block v-if="dataList && dataList.length>0">
<view class="operation activeOne" <view class="operation activeOne"
v-for="(item,index) in dataList" :key="index"> v-for="(item,index) in dataList" :key="index">
<view class="operation-center-box" @click="JobDetails"> <view class="operation-center-box" @click="JobDetails">
...@@ -41,6 +42,11 @@ ...@@ -41,6 +42,11 @@
</view> </view>
</view> </view>
</view> </view>
</block>
<view class="noData" v-else>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png" mode="widthFix"></image>
<view>暂无课程信息</view>
</view>
</view> </view>
</template> </template>
<script> <script>
...@@ -64,7 +70,7 @@ ...@@ -64,7 +70,7 @@
}); });
let methods = { let methods = {
JobDetails(){ JobDetails(){
uni.reLaunch({ uni.navigateTo({
url: '/pages/index/jobDetails' url: '/pages/index/jobDetails'
}); });
} }
...@@ -77,6 +83,20 @@ ...@@ -77,6 +83,20 @@
}; };
</script> </script>
<style scoped> <style scoped>
.operation-box .noData{
text-align: center;
flex:1;
width: 100%;
}
.operation-box .noData image{
width:200rpx;
margin-bottom: 40rpx;
}
.operation-box .noData view{
font-size: 24rpx;
color: #cecece;
text-align: center;
}
.homework-score-num view:last-child{ .homework-score-num view:last-child{
font-size: 23rpx; font-size: 23rpx;
margin-top: 25rpx; margin-top: 25rpx;
...@@ -117,7 +137,7 @@ ...@@ -117,7 +137,7 @@
color: #CE8086; color: #CE8086;
} }
.operation.activeOne .operation-state-text{ .operation.activeOne .operation-state-text{
color: #0BFF5B; color: #08be42;
} }
.operation-state-text{ .operation-state-text{
font-size: 20rpx; font-size: 20rpx;
......
<template> <template>
<view class="studentList-box flex"> <view class="studentList-box flex">
<view class="studentList-content" v-for="(item,index) in dataList" :key="index"> <block v-if="dataList && dataList.length>0" >
<view class="studentList-content" @click="selectStuHandler(item)" v-for="(item,index) in dataList" :key="index">
<view class="studentList flex"> <view class="studentList flex">
<view class="studentList-img"> <view class="studentList-img">
<van-image width="100%" height="100%" fit="cover" class="img" <van-image width="100%" height="100%" fit="cover" class="img"
...@@ -11,6 +12,11 @@ ...@@ -11,6 +12,11 @@
</text> </text>
</view> </view>
</view> </view>
</block>
<view class="noData" v-else>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653902791000_806.png" mode="widthFix"></image>
<view>暂无学员信息</view>
</view>
</view> </view>
</template> </template>
<script> <script>
...@@ -24,10 +30,11 @@ ...@@ -24,10 +30,11 @@
export default { export default {
props: { props: {
dataList: [] dataList: [],
}, },
components: {}, components: {},
setup(props) { emits:['selected'],
setup(props,ctx) {
let data = reactive({ let data = reactive({
obj: { obj: {
...@@ -39,10 +46,8 @@ ...@@ -39,10 +46,8 @@
dataList: props.dataList dataList: props.dataList
}); });
let methods = { let methods = {
JobDetails(){ selectStuHandler(item){
uni.reLaunch({ ctx.emit("selected",item.StuId,item.StuName)
url: '/pages/index/workSituation'
});
} }
} }
return { return {
...@@ -53,6 +58,20 @@ ...@@ -53,6 +58,20 @@
}; };
</script> </script>
<style scoped> <style scoped>
.studentList-box .noData{
text-align: center;
flex:1;
width: 100%;
}
.studentList-box .noData image{
width:200rpx;
margin-bottom: 40rpx;
}
.studentList-box .noData view{
font-size: 24rpx;
color: #cecece;
text-align: center;
}
.studentList text{ .studentList text{
text-align: center; text-align: center;
color: #2E2E2E; color: #2E2E2E;
......
...@@ -41,6 +41,11 @@ ...@@ -41,6 +41,11 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{
"path": "pages/student/student",
"style": {
"navigationStyle": "custom"
}
} }
], ],
......
...@@ -147,7 +147,8 @@ ...@@ -147,7 +147,8 @@
let res = await parsePhone({ let res = await parsePhone({
code, code,
encryptedData, encryptedData,
iv iv,
AccountType:2
}) })
console.log(res) console.log(res)
if (res && res.Data.UserMobile) { if (res && res.Data.UserMobile) {
......
<template> <template>
<view class="jobDetails-box"> <view class="jobDetails-box">
<navbar class="navbarSticky" bg="#F6F6F6"> <navbar class="navbarSticky" bg="#FCEEEF">
<view class="jobDetails-header-box"> <view class="jobDetails-header-box flex">
<van-icon class="jobDetails-header-left" name="arrow-left" @click="back"/> <van-icon class="jobDetails-header-left" name="arrow-left" @click="back"/>
<text class="jobDetails-header-title">作业情况</text> <text class="jobDetails-header-title">作业情况</text>
</view> </view>
...@@ -46,13 +46,14 @@ ...@@ -46,13 +46,14 @@
getCurrentInstance, getCurrentInstance,
inject inject
} from "vue"; } from "vue";
import navbar from '../../components/navbar.vue'
export default { export default {
props: { props: {
}, },
components: { components: {
jobDetailsComponents jobDetailsComponents,
navbar
}, },
setup() { setup() {
...@@ -66,9 +67,12 @@ ...@@ -66,9 +67,12 @@
}); });
let methods = { let methods = {
back(){ back(){
uni.reLaunch({ // uni.reLaunch({
url: '/pages/index/workSituation?tabNme=' + '作业情况' // url: '/pages/index/workSituation?tabNme=' + '作业情况'
}); // });
uni.navigateBack({
delta: 1
})
} }
} }
return { return {
...@@ -135,16 +139,19 @@ ...@@ -135,16 +139,19 @@
z-index: 0; z-index: 0;
} }
.jobDetails-header-title{ .jobDetails-header-title{
position: absolute; /* position: absolute;
left: 0; left: 0;
right: 0; right: 0;
top: 0; top: 0;
padding: 37rpx 31rpx; padding: 37rpx 31rpx;
text-align: center; text-align: center;
letter-spacing: 1rpx; letter-spacing: 1rpx; */
font-size: 32rpx; font-size: 32rpx;
font-weight: 500; font-weight: 500;
color: #282828; color: #282828;
flex:1;
text-align: center;
padding-right: 40rpx;
} }
.jobDetails-header{ .jobDetails-header{
margin: 50rpx 50rpx 0 50rpx; margin: 50rpx 50rpx 0 50rpx;
...@@ -156,8 +163,9 @@ ...@@ -156,8 +163,9 @@
z-index: 3; z-index: 3;
} }
.jobDetails-header-box{ .jobDetails-header-box{
padding: 37rpx 31rpx; padding: 20rpx 42rpx;
position: relative; flex-direction: row;
align-items: center;
} }
.navbarSticky { .navbarSticky {
display: sticky; display: sticky;
......
...@@ -10,43 +10,40 @@ ...@@ -10,43 +10,40 @@
<view class="index-header-title"> <view class="index-header-title">
welcome welcome
</view> </view>
<view class="index-header-name">周一围</view> <view class="index-header-name">{{userData.AccountName}}</view>
</view> </view>
</view> </view>
</navbar> </navbar>
<view style="margin: 40rpx 0 10rpx 0;"> <view style="margin: 40rpx 0 10rpx 0;">
<view style="padding:0 50rpx;font-weight: 800;color: #282828;"> <view style="padding:0 50rpx;font-weight: 800;color: #282828;">
<view style="font-size: 36rpx;">Good afternoon</view> <view style="font-size: 36rpx;">Hi</view>
<view style="font-size: 50rpx;">老师</view> <view style="font-size: 50rpx;">{{userData.AccountName}}老师</view>
</view> </view>
</view> </view>
<courseCard></courseCard> <courseCard @change="changeCourseHandler"></courseCard>
<view class="index-student-information"> <view class="index-student-information">
<view class="workSituation-title-box flex"> <view class="workSituation-title-box flex">
<view class="workSituation-title flex" <view class="workSituation-title"
:class="tabNme==t.name?'active':''" :class="tabNme==t.name?'active':''"
v-for="(t,index) in titleList" :key="index" v-for="(t,index) in titleList" :key="index"
@click="toggleTitle(t.name)"> @click="toggleTitle(t.name)">
<text class="name">{{t.name}}</text> <text class="name">{{t.name}}</text>
<view class="num">({{t.num}})</view> <view class="num">({{t.num}})</view>
<view class="current-title-box flex" v-show="tabNme==t.name">
<text class="name">{{t.name}}</text>
<view class="num">({{t.num}})</view>
</view>
</view> </view>
</view> </view>
<van-empty description="暂无数据" v-if="dataList.length === 0" /> <van-empty description="暂无数据" v-if="currentCourseId === 0" />
<scroll-view <scroll-view
:scroll-top="0" :scroll-top="0"
scroll-y="true" scroll-y="true"
class="scroll-box" class="scroll-box"
@scrolltolower="lower" @scrolltolower="lower"
v-if="dataList.length > 0" v-if="currentCourseId > 0"
> >
<operation v-if="tabNme=='作业情况'" :dataList="dataList"></operation> <operation v-if="tabNme=='作业情况'" :dataList="homeWorks"></operation>
<studentList v-if="tabNme=='学生列表'" :dataList="dataList"></studentList> <studentList @selected="selectStuHandler" v-if="tabNme=='学生列表'" :dataList="students"></studentList>
<examList v-if="tabNme=='考试信息'" :dataList="dataList"></examList> <examList v-if="tabNme=='考试信息'" :dataList="exams"></examList>
<Loadmore :state="pageState" /> <!-- <Loadmore :state="pageState" /> -->
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
...@@ -107,23 +104,41 @@ ...@@ -107,23 +104,41 @@
courseId:'' courseId:''
}, },
OperationMsg:{ OperationMsg:{
courseId:'' courseId:'',
}, },
pageCount: 0, pageCount: 0,
timer: null, //防抖 timer: null, //防抖
dataList:[], students:[],
homeWorks:[],
exams:[],
pageState: "more", pageState: "more",
currentCourseId:0,
userData:{},
loading:false
}); });
data.userData=uni.getStorageSync("userInfo")
let methods = { let methods = {
back() { back() {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/index' url: '/pages/index/index'
}); });
}, },
selectStuHandler(id,name){
uni.navigateTo({
url:'/pages/student/student?stuId='+id+'&courseId='+data.currentCourseId+'&stuName='+encodeURIComponent(name)
})
},
changeCourseHandler(id){
console.log(id,'........................')
data.Msg.courseId=id
data.OperationMsg.courseId=id
data.currentCourseId=id
methods.getCourseStuList()
methods.getExamPageList()
methods.getGetCourseHomeWorkList()
},
toggleTitle(t) { toggleTitle(t) {
data.tabNme = t data.tabNme = t
data.dataList = []
if(data.tabNme=='学生列表'){ if(data.tabNme=='学生列表'){
that.getCourseStuList() that.getCourseStuList()
}else if(data.tabNme=='作业情况'){ }else if(data.tabNme=='作业情况'){
...@@ -141,7 +156,7 @@ ...@@ -141,7 +156,7 @@
item.num = res.Data.length item.num = res.Data.length
} }
}); });
data.dataList = res.Data; data.students = res.Data;
data.pageState = "none"; data.pageState = "none";
} }
}) })
...@@ -155,7 +170,7 @@ ...@@ -155,7 +170,7 @@
item.num = res.Data.length item.num = res.Data.length
} }
}); });
data.dataList = res.Data; data.homeWorks = res.Data;
data.pageState = "none"; data.pageState = "none";
} }
}) })
...@@ -171,9 +186,9 @@ ...@@ -171,9 +186,9 @@
}); });
if (data.timer) data.timer = null; if (data.timer) data.timer = null;
if (data.Msg.PageIndex === 1) { if (data.Msg.PageIndex === 1) {
data.dataList = res.Data.PageData; data.exams = res.Data.PageData;
} else { } else {
data.dataList = [...res.Data.PageData, ...data.dataList]; data.exams = [...res.Data.PageData, ...data.exams];
} }
data.pageCount = res.Data.PageCount; data.pageCount = res.Data.PageCount;
if (data.Msg.PageIndex >= res.Data.PageCount) { if (data.Msg.PageIndex >= res.Data.PageCount) {
...@@ -214,19 +229,18 @@ ...@@ -214,19 +229,18 @@
}; };
}, },
onLoad(option) { onLoad(option) {
this.tabNme = option.tabNme // this.tabNme = option.tabNme
this.OperationMsg.courseId = option.courseId // this.OperationMsg.courseId = option.courseId
this.Msg.courseId = option.courseId // this.Msg.courseId = option.courseId
}, },
onShow() { onShow() {
this.dataList = [] // if(this.tabNme=='学生列表'){
if(this.tabNme=='学生列表'){ // this.getCourseStuList()
this.getCourseStuList() // }else if(this.tabNme=='作业情况'){
}else if(this.tabNme=='作业情况'){ // this.getGetCourseHomeWorkList()
this.getGetCourseHomeWorkList() // }else{
}else{ // this.getExamPageList()
this.getExamPageList() // }
}
}, },
onShareAppMessage() { onShareAppMessage() {
...@@ -252,7 +266,7 @@ ...@@ -252,7 +266,7 @@
display: inline-block; display: inline-block;
margin-top: 5rpx; margin-top: 5rpx;
} }
.current-title-box{ /* .current-title-box{
color: #FFFFFF; color: #FFFFFF;
background: #282828; background: #282828;
padding: 26rpx 36rpx; padding: 26rpx 36rpx;
...@@ -263,24 +277,36 @@ ...@@ -263,24 +277,36 @@
top: -28rpx; top: -28rpx;
border-radius: 39rpx; border-radius: 39rpx;
justify-content: center; justify-content: center;
} } */
.workSituation-title.active{ .workSituation-title.active{
position: relative; position: relative;
background-color: #282828;
color: #FFF;
}
.workSituation-title.active .name{
font-size: 30rpx;
font-weight: bold;
}
.workSituation-title.active .num{
font-size: 20rpx;
} }
.workSituation-title{ .workSituation-title{
flex: 1; flex: 1;
color: #282828; color: #282828;
font-size: 26rpx; font-size: 26rpx;
font-weight: bold; text-align: center;
align-items: center; border-radius: 39rpx;
letter-spacing: 1px; font-size: 30rpx;
font-weight: 400;
color: #282828;
line-height: 77rpx;
} }
.workSituation-title-box{ .workSituation-title-box{
margin-bottom: 50rpx; margin-bottom: 30rpx;
margin: 0 50rpx 50rpx; margin: 0 50rpx 50rpx;
padding: 17rpx 0 17rpx 28rpx; height: 77rpx;
background: #F0F0F0; background: #F0F0F0;
border-radius: 30rpx; border-radius: 39rpx;
} }
.index-student-information{ .index-student-information{
min-height: 800rpx; min-height: 800rpx;
......
...@@ -79,8 +79,8 @@ ...@@ -79,8 +79,8 @@
} = getCurrentInstance(); } = getCurrentInstance();
let Toast = inject("$toast"); let Toast = inject("$toast");
let msg = reactive({ let msg = reactive({
Account: "13802557508", Account: "13982128958",
Password: "557508", Password: "128958",
}); });
let data = reactive({ let data = reactive({
phoneNum: "", phoneNum: "",
...@@ -129,6 +129,7 @@ ...@@ -129,6 +129,7 @@
return; return;
} }
let url=data.userLoginType==2?'/Login/Login':'/Login/LoginByAccount' let url=data.userLoginType==2?'/Login/Login':'/Login/LoginByAccount'
msg.AccountType=data.userLoginType==2?1:2;
let res = await this.$request(url, msg).then(res=>{ let res = await this.$request(url, msg).then(res=>{
if(res.Code==1){ if(res.Code==1){
if((res.Data.AccountType==1 && data.userLoginType==2) ||res.Data.AccountType==2 && data.userLoginType==1){ if((res.Data.AccountType==1 && data.userLoginType==2) ||res.Data.AccountType==2 && data.userLoginType==1){
......
<template>
<view class="indexpage">
<navbar class="navbarSticky" bg="#fff">
<view class="student-header-box flex">
<van-icon class="student-header-left" name="arrow-left" @click="back"/>
<text class="student-header-title">学员详情</text>
</view>
</navbar>
<view style="margin: 40rpx 0 10rpx 0;">
<view style="padding:0 50rpx;font-weight: 800;color: #282828;">
<view style="font-size: 36rpx;">{{stuName}}的学情反馈</view>
</view>
</view>
<view class="index-student-title flex">
<text>学情反馈</text>
<view>(共{{workList!=null&&workList.length>0?workList.length:0}}条)</view>
</view>
<view class="index-student-information">
<template v-for="(item,index) in workList">
<JobComponents v-if="item.ResultType==1" :jobData="item"></JobComponents>
<examComponents v-if="item.ResultType==2" :jobData="item"></examComponents>
<commentsComponents v-if="item.ResultType==3" :jobData="item"></commentsComponents>
</template>
</view>
</view>
</template>
<script>
import JobComponents from '@/components/index/JobComponents'
import examComponents from '@/components/index/examComponents'
import commentsComponents from '@/components/index/commentsComponents'
import navbar from '../../components/navbar.vue'
import vue, {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
provide,
nextTick,
} from "vue";
export default {
components: {
JobComponents,
examComponents,
commentsComponents,
navbar
},
setup(props) {
let {
proxy
} = getCurrentInstance();
let data = reactive({
stuCourseList: [], //学员课程列表
userData: {}, //用户信息
//学员作业和考试查询参数
workMsg: {
courseId: 0,
stuId:0
},
stuName:'',
workList: [],//学员作业、考试、评语数据
});
let methods = {
back() {
uni.navigateTo({
url: '/pages/index/index'
});
},
//获取学员作业、考试、评语
getStuHomeWorkAndExam() {
data.workList = [];
proxy.$request("/Stu/GetStuWork", data.workMsg).then(res => {
data.workList = res.Data;
})
}
};
onMounted(() => {
});
return {
...toRefs(data),
...methods,
};
},
onLoad(option) {
this.workMsg.stuId = option.stuId
this.workMsg.courseId = option.courseId
this.stuName=decodeURIComponent(option.stuName)
this.getStuHomeWorkAndExam()
}
};
</script>
<style scoped>
.student-header-box{
padding: 20rpx 42rpx;
flex-direction: row;
align-items: center;
}
.student-header-title{
font-size: 32rpx;
font-weight: 500;
color: #282828;
flex:1;
text-align: center;
padding-right: 40rpx;
}
.student-header-left{
font-size: 40rpx;
position: relative;
z-index: 3;
}
.navbarSticky {
display: sticky;
top: 0;
z-index: 9;
}
.index-student-title view {
font-size: 25rpx;
color: #ABABAB;
margin-left: 20rpx;
padding: 13rpx 0 0 0;
}
.index-student-title text {
font-size: 36rpx;
font-weight: 800;
color: #282828;
}
.index-student-title {
padding: 0 50rpx 45rpx;
}
.index-student-information {
min-height: 500rpx;
background: rgba(255, 255, 255, .7);
border-radius: 50rpx 50rpx 0 0;
padding: 71rpx 0 0 0;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment