Commit 5772e3e6 authored by 黄奎's avatar 黄奎

上课记录调整

parent f6397c0a
......@@ -10,6 +10,7 @@
color: #3470ff;
font-weight: 700;
}
.record_cala_Num {
height: 20px;
padding-left: 14px;
......@@ -46,20 +47,22 @@
text-align: center;
font-style: normal;
}
</style>
<template>
<div>
<div>
<q-tabs v-model="ckedTab" @input="getTabcheck()" dense align="left" class="text-teal" style="margin-bottom:20px;">
<q-tab v-for="(item,index) in dataList" :key="index" :name="index" :label="item.CourseName+'('+item.OrderId+')'" />
<q-tab v-for="(item,index) in dataList" :key="index" :name="index"
:label="item.CourseName+'('+item.OrderId+')'" />
</q-tabs>
</div>
<div class="record_Main">
<div style="display:flex;justify-content:space-between;align-items:center;">
<div>课程进度:{{CourseChapterNo}}/{{TotalChapterNo}}</div>
<div>
<q-select dense filled v-model="Status" @input="getStatus" style="width:160px;margin-right:10px;" :options="StatusList" option-label="Name" option-value="Id"
emit-value map-options label="状态" />
<q-select dense filled v-model="Status" @input="getStatus" style="width:160px;margin-right:10px;"
:options="StatusList" option-label="Name" option-value="Id" emit-value map-options label="状态" />
</div>
</div>
<div>
......@@ -103,7 +106,6 @@
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
......@@ -129,7 +131,7 @@
StatusList: [{
Name: '全部',
Id: 0
},{
}, {
Name: '正常上课',
Id: 1
}, {
......@@ -141,14 +143,14 @@
}],
dataList: [],
loading: false,
Status:0,//状态
Status: 0, //状态
msg: {
StuId: ''
},
chapterList:[], //章节
ckedTab:0,
CourseChapterNo:0, //当前进度
TotalChapterNo:0, //总进度
chapterList: [], //章节
ckedTab: 0,
CourseChapterNo: 0, //当前进度
TotalChapterNo: 0, //总进度
tableHeight: 200,
};
},
......@@ -170,7 +172,7 @@
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data;
if(this.dataList.length>0){
if (this.dataList.length > 0) {
this.chapterList = this.dataList[0].ChapterList;
this.CourseChapterNo = this.dataList[0].CourseChapterNo;
this.TotalChapterNo = this.dataList[0].TotalChapterNo;
......@@ -178,19 +180,19 @@
}
});
},
getTabcheck(){
getTabcheck() {
this.chapterList = this.dataList[this.ckedTab].ChapterList;
this.CourseChapterNo = this.dataList[this.ckedTab].CourseChapterNo;
this.TotalChapterNo = this.dataList[this.ckedTab].TotalChapterNo;
},
//根据状态过滤
getStatus(){
getStatus() {
let dataArray = [];
if(this.Status==0){
if (this.Status == 0) {
dataArray = this.dataList[this.ckedTab].ChapterList;
}else{
this.dataList[this.ckedTab].ChapterList.forEach(x=>{
if(x.State==this.Status){
} else {
this.dataList[this.ckedTab].ChapterList.forEach(x => {
if (x.State == this.Status) {
dataArray.push(x);
}
})
......
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