Commit 25f68fa4 authored by zhengke's avatar zhengke

Merge branch 'master' of http://gitlab.oytour.com/youjie/thinkapp

parents 8f6e670f 999d71ab
<template> <template>
<view class="course-card"> <view class="course-card">
<view class="course-item"> <view class="course-item" v-if="currentCourse">
<view style="width:287rpx;"> <view style="width:287rpx;">
<view class="course-name"> <view class="course-name">
{{ stuCourseList[0].CourseName}} {{ currentCourse.CourseName}}
</view> </view>
<van-progress :percentage="calcPercentage(stuCourseList[0])" :show-pivot="false" track-color="#EFEFEF" color="#282828" <van-progress :percentage="calcPercentage(currentCourse)" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" /> stroke-width="5" />
<view class="course-progress"> <view class="course-progress">
上课进度 {{stuCourseList[0].CompleteNum}}/{{stuCourseList[0].TotalClassNum}} 上课进度 {{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"
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
</van-button> </van-button>
</view> </view>
</view> </view>
<template v-if="stuCourseList[0].CoverImg"> <template v-if="currentCourse.CoverImg">
<image class="illustration" :src="stuCourseList[0].CoverImg" mode="widthFix"></image> <image class="illustration" :src="currentCourse.CoverImg" mode="widthFix"></image>
</template> </template>
<template v-else> <template v-else>
<image class="illustration" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_494.png" <image class="illustration" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_494.png"
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
</view> </view>
<image class="end" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_413.png" <image class="end" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1653464014000_413.png"
mode="widthFix"></image> mode="widthFix"></image>
<van-popup :show="showItems" round position="bottom" @click-overlay="hideExchangeBoxHandler" custom-style="height: 60%"> <van-popup :show="showItems" round position="bottom" @click-overlay="hideExchangeBoxHandler" custom-style="height: 60%">
<view class="exchange-items"> <view class="exchange-items">
<view class="title-box"> <view class="title-box">
...@@ -61,9 +60,7 @@ ...@@ -61,9 +60,7 @@
</view> </view>
</view> </view>
</van-popup> </van-popup>
</view> </view>
</template> </template>
<script> <script>
...@@ -83,8 +80,9 @@ ...@@ -83,8 +80,9 @@
let data = reactive({ let data = reactive({
statusBarHeight: 24, statusBarHeight: 24,
showItems: false, showItems: false,
currentCourse:{} currentCourse: {}
}); });
let methods = { let methods = {
exchangeItemHandler() { exchangeItemHandler() {
data.showItems = true data.showItems = true
...@@ -93,6 +91,7 @@ ...@@ -93,6 +91,7 @@
hideExchangeBoxHandler(item) { hideExchangeBoxHandler(item) {
//调用父页面方法 //调用父页面方法
this.$parent.getStuHomeWorkAndExam(item.courseId); this.$parent.getStuHomeWorkAndExam(item.courseId);
this.currentCourse = item;
data.showItems = false data.showItems = false
}, },
//计算完成百分比 //计算完成百分比
...@@ -104,8 +103,17 @@ ...@@ -104,8 +103,17 @@
} }
} }
return percent; return percent;
},
};
//监听属性数组
watch(() => props["stuCourseList"], (newValue, oldValue) => {
if (newValue != oldValue && newValue && newValue.length > 0) {
data.currentCourse = newValue[0];
} }
} }, {
deep: true,
});
return { return {
...toRefs(data), ...toRefs(data),
...methods ...methods
......
<template> <template>
<view class="examDetailsComponents-box"> <view class="examDetailsComponents-box">
<view class="examDetailsComponents activeTwo mismatchActive flex"> <view class="examDetailsComponents activeOne flex" v-for="(item,index) in ExamStu" :key="index" :class="item.StuId ==0?'mismatchActive':''">
<view class="examDetailsComponents-time-box flex"> <view class="examDetailsComponents-time-box flex">
<view class="examDetailsComponents-time flex"> <view class="examDetailsComponents-time flex">
<view></view> <view>{{item.StuName.substring(0,1)}}</view>
<text>潇潇</text> <text>{{item.StuName.substring(1,item.StuName.length)}}</text>
</view> </view>
<view class="examDetailsComponents-line"> <view class="examDetailsComponents-line">
<view class="examDetailsComponents-point"></view> <view class="examDetailsComponents-point"></view>
</view> </view>
</view> </view>
<view class="examDetailsComponents-center-box"> <view class="examDetailsComponents-center-box">
<view class="Mismatch-box"> <view class="Mismatch-box" v-if="item.StuId ===0">
<view class="Mismatch-title flex"> <view class="Mismatch-title flex">
<van-icon name="warning" /> <van-icon name="warning" />
<text>学员不匹配</text> <text>学员未匹配</text>
</view> </view>
</view> </view>
<view class="examDetailsComponents-center flex"> <view class="examDetailsComponents-center flex">
<view class="examDetailsComponents-left flex">
<view class="operation-state flex">
<view class="operation-state-img"></view>
<view class="operation-state-text">未批阅</view>
</view>
<view class="operation-name">2022-05-22</view>
</view>
<view class="examDetailsComponents-right flex"> <view class="examDetailsComponents-right flex">
<view class="homework-score flex"> <view class="homework-score flex">
<view class="homework-score-title"> <view class="homework-score-title">
得分 <text>86</text> 得分 <text>{{item.TScore}}</text>
</view> </view>
</view> </view>
<view class="homework-score flex"> <view class="homework-score flex">
<view class="homework-score-title"> <view class="homework-score-title">
得分率 <text>86</text> 排名 <text>{{item.Rank}}</text>
</view>
</view>
</view>
</view>
</view> </view>
</view> </view>
<view class="examDetailsComponents activeOne flex">
<view class="examDetailsComponents-time-box flex">
<view class="examDetailsComponents-time flex">
<view></view>
<text>潇潇</text>
</view>
<view class="examDetailsComponents-line">
<view class="examDetailsComponents-point"></view>
</view>
</view>
<view class="examDetailsComponents-center-box">
<view class="examDetailsComponents-center flex">
<view class="examDetailsComponents-left flex">
<view class="operation-state flex">
<view class="operation-state-img"></view>
<view class="operation-state-text">批阅</view>
</view>
<view class="operation-name">2022-05-22</view>
</view>
<view class="examDetailsComponents-right flex">
<view class="homework-score flex"> <view class="homework-score flex">
<view class="homework-score-title"> <view class="homework-score-title">
得分 <text>86</text> 排名率 <text>{{item.RankRate * 100}}</text>%
</view>
</view>
<view class="homework-score flex">
<view class="homework-score-title">
得分率 <text>86</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -87,7 +51,7 @@ ...@@ -87,7 +51,7 @@
export default { export default {
props: { props: {
ExamStu:[]
}, },
components: {}, components: {},
setup() { setup() {
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</view> </view>
</view> </view>
<view class="index-student-information"> <view class="index-student-information">
<examDetailsComponents></examDetailsComponents> <examDetailsComponents :ExamStu="ExamStu"></examDetailsComponents>
</view> </view>
</view> </view>
</view> </view>
...@@ -47,16 +47,24 @@ ...@@ -47,16 +47,24 @@
examDetailsComponents examDetailsComponents
}, },
setup() { setup() {
let {
proxy
} = getCurrentInstance();
let data = reactive({ let data = reactive({
obj: { Msg:{
Name: '', ExamId:0,
Photo: '', StuName:""
}, },
showPhone: false, ExamStu:[]
showLogin: true, //多次点击
}); });
let methods = { let methods = {
//获取考试学生列表
getExamStuList(){
proxy.$request("/Exam/GetExamStuList", data.Msg).then(res => {
console.log(res.data);
data.ExamStu = res.Data;
})
},
back(){ back(){
uni.reLaunch({ uni.reLaunch({
url: '/pages/index/workSituation?tabNme=' + '考试信息' url: '/pages/index/workSituation?tabNme=' + '考试信息'
...@@ -67,6 +75,13 @@ ...@@ -67,6 +75,13 @@
...toRefs(data), ...toRefs(data),
...methods ...methods
}; };
},
onLoad(options){
this.Msg.ExamId = options.examId;
},
onShow() {
this.userData = uni.getStorageSync('userInfo');
this.getExamStuList();
} }
}; };
</script> </script>
......
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