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;
...@@ -22,7 +23,7 @@ ...@@ -22,7 +23,7 @@
margin-top: -10px; margin-top: -10px;
} }
.record_cala_Num>span { .record_cala_Num>span {
min-width: 24px; min-width: 24px;
height: 24px; height: 24px;
padding: 4px; padding: 4px;
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
border-radius: 20px; border-radius: 20px;
} }
.record_cala_Num>span>i { .record_cala_Num>span>i {
min-width: 16px; min-width: 16px;
height: 16px; height: 16px;
padding: 0 2px; padding: 0 2px;
...@@ -46,64 +47,65 @@ ...@@ -46,64 +47,65 @@
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"
</q-tabs> :label="item.CourseName+'('+item.OrderId+')'" />
</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>
<el-table :data="chapterList" v-loading="loading" ref="table" :height="tableHeight" style="width: 100%;"> <el-table :data="chapterList" v-loading="loading" ref="table" :height="tableHeight" style="width: 100%;">
<el-table-column prop="ChapterNo" label="章节" width="300"> <el-table-column prop="ChapterNo" label="章节" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<div style="display: inline-block;"> <div style="display: inline-block;">
<div class="flex q-ml-md"> <div class="flex q-ml-md">
<div class="record_cala_Num"> <div class="record_cala_Num">
<span> <span>
<i>{{ scope.row.ChapterNo }}</i> <i>{{ scope.row.ChapterNo }}</i>
</span> </span>
</div> </div>
<div style="margin-left: 36px;width:240px;" class="ellipsis"> <div style="margin-left: 36px;width:240px;" class="ellipsis">
{{ scope.row.ChapterName }} {{ scope.row.ChapterName }}
</div>
</div> </div>
</div> </div>
</template> </div>
</el-table-column> </template>
<el-table-column prop="AgainNum" label="进度" width="100"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="AgainNum" label="进度" width="100">
{{scope.row.CourseRateName}}({{scope.row.ChapterGradeNo}}) <template slot-scope="scope">
<div v-if="scope.row.ClassDate" style="font-size:13px; line-height: 13px">{{scope.row.ClassDate}}</div> {{scope.row.CourseRateName}}({{scope.row.ChapterGradeNo}})
</template> <div v-if="scope.row.ClassDate" style="font-size:13px; line-height: 13px">{{scope.row.ClassDate}}</div>
</el-table-column> </template>
<el-table-column prop="State" label="状态" width="70"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="State" label="状态" width="70">
<div v-if="scope.row.State == 1"> <template slot-scope="scope">
<span class="text-warning" v-if="scope.row.AppointState==1">待确认</span> <div v-if="scope.row.State == 1">
<span class="text-info" v-if="scope.row.AppointState==2">待上课</span> <span class="text-warning" v-if="scope.row.AppointState==1">待确认</span>
<span class="text-positive" v-if="scope.row.AppointState==3">上课</span> <span class="text-info" v-if="scope.row.AppointState==2">上课</span>
</div> <span class="text-positive" v-if="scope.row.AppointState==3">已上课</span>
<div class="text-warning" v-if="scope.row.State == 2">补课</div> </div>
<div class="text-negative" v-if="scope.row.State == 3"></div> <div class="text-warning" v-if="scope.row.State == 2"></div>
</template> <div class="text-negative" v-if="scope.row.State == 3">缺课</div>
</el-table-column> </template>
<el-table-column prop="AgainNum" label="重学" width="60"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="AgainNum" label="重学" width="60">
{{scope.row.AgainNum}} <template slot-scope="scope">
</template> {{scope.row.AgainNum}}
</el-table-column> </template>
</el-table> </el-table-column>
</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,30 +172,30 @@ ...@@ -170,30 +172,30 @@
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;
} }
} }
}); });
}, },
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);
} }
}) })
} }
this.chapterList = dataArray; this.chapterList = dataArray;
} }
......
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