Commit 6cca94d2 authored by 黄奎's avatar 黄奎

页面修改

parent 69b2bcf5
......@@ -5,7 +5,8 @@
<view class="course-name">
{{stuCourseList[0].CourseName}}
</view>
<van-progress percentage="75" :show-pivot="false" track-color="#EFEFEF" color="#282828" stroke-width="5" />
<van-progress :percentage="calcPercentage(stuCourseList[0])" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<view class="course-progress">
上课进度 {{stuCourseList[0].CompleteNum}}/{{stuCourseList[0].TotalClassNum}}
</view>
......@@ -44,7 +45,8 @@
<view class="one_line course-name">
{{item.CourseName}}
</view>
<van-progress percentage="46" :show-pivot="false" track-color="#EFEFEF" color="#282828" stroke-width="5" />
<van-progress :percentage="calcPercentage(item)" :show-pivot="false" track-color="#EFEFEF" color="#282828"
stroke-width="5" />
<view class="course-progress">
上课进度 {{item.CompleteNum}}/{{item.TotalClassNum}}
</view>
......@@ -81,15 +83,26 @@
let data = reactive({
statusBarHeight: 24,
showItems: false,
});
let methods = {
exchangeItemHandler() {
data.showItems = true
},
//点击切换课程
hideExchangeBoxHandler(item) {
//调用父页面方法
this.$parent.getStuHomeWorkAndExam(item.courseId);
data.showItems = false
},
//计算完成百分比
calcPercentage(item) {
let percent = 0;
if (item) {
if (item.TotalClassNum > 0) {
percent = Number(item.CompleteNum / item.TotalClassNum) * 100
}
}
return percent;
}
}
return {
......
......@@ -27,7 +27,7 @@
<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">></examComponents>
<examComponents v-if="item.ResultType==2" :jobData="item"></examComponents>
<commentsComponents v-if="item.ResultType==3" :jobData="item"></commentsComponents>
</template>
......
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