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

上课记录调整

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