|
@@ -69,9 +69,19 @@
|
|
|
</div>
|
|
|
<div class="course-classroom-info common-save-btn" id="table-height" slot="right">
|
|
|
<div class="course-classroom-info-header tab-box">
|
|
|
- <span @click="selectTab('record')" :class="tabName == 'record' ? 'course-classroom-label pane active':'course-classroom-label pane'">{{$t('cusMgt.cusRecord')}}</span>
|
|
|
- <span @click="selectTab('activity')" :class="tabName == 'activity' ? 'course-classroom-label pane active':'course-classroom-label pane'">{{$t('cusMgt.acRecord')}}</span>
|
|
|
- <span @click="selectTab('stus')" :class="tabName == 'stus' ? 'course-classroom-label pane active':'course-classroom-label pane'">{{$t('courseManage.classroom.studentList')}}</span>
|
|
|
+ <span @click="selectTab('record')" :class="tabName == 'record' ? 'course-classroom-label pane active':'course-classroom-label pane'">
|
|
|
+ {{$t('cusMgt.cusRecord')}}
|
|
|
+ </span>
|
|
|
+ <span @click="selectTab('activity')" :class="tabName == 'activity' ? 'course-classroom-label pane active':'course-classroom-label pane'">
|
|
|
+ {{$t('cusMgt.acRecord')}}
|
|
|
+ </span>
|
|
|
+ <span @click="selectTab('stus')" :class="tabName == 'stus' ? 'course-classroom-label pane active':'course-classroom-label pane'">
|
|
|
+ {{$t('courseManage.classroom.studentList')}}
|
|
|
+ </span>
|
|
|
+ <!-- 线上暂不开放 -->
|
|
|
+ <span @click="selectTab('data')" v-show="isDev" :class="tabName == 'data' ? 'course-classroom-label pane active':'course-classroom-label pane'">
|
|
|
+ {{$t('cusMgt.gradeData')}}
|
|
|
+ </span>
|
|
|
|
|
|
<!-- 个人课程时段设置暂不实做 -->
|
|
|
<!-- <span @click="selectTab('time')" :class="tabName == 'time' ? 'course-classroom-label line-bottom line-bottom-active':'course-classroom-label line-bottom'">{{$t('cusMgt.cusTime')}}</span> -->
|
|
@@ -112,7 +122,8 @@
|
|
|
</span>
|
|
|
<i-switch :loading="sLoading" v-model="isAuto" size="small" @on-change="setAutoPublish" />
|
|
|
</div>
|
|
|
- <span v-show="tabName == 'stus' && listType == 'school' && teaClassList[curClassIndex] && teaClassList[curClassIndex].classId" class="group-tips">{{$t('cusMgt.groupTips')}}</span>
|
|
|
+ <!-- <span v-show="tabName == 'stus' && listType == 'school' && teaClassList[curClassIndex] && teaClassList[curClassIndex].classId" class="group-tips">{{$t('cusMgt.groupTips')}}</span> -->
|
|
|
+ <!-- 活动记录相关操作 -->
|
|
|
<div style="float:right;" v-if="tabName == 'activity'">
|
|
|
<span class="action-btn-wrap light-iview-select">
|
|
|
{{$t('cusMgt.acType')}}
|
|
@@ -127,9 +138,16 @@
|
|
|
</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <!-- 成绩统计 -->
|
|
|
+ <div v-show="tabName == 'data'" class="animated fadeIn class-record-wrap">
|
|
|
+ 成绩统计
|
|
|
+ </div>
|
|
|
<!-- 学生名单 -->
|
|
|
<div class="course-classroom-info-content animated fadeIn" v-if="tabName == 'stus'">
|
|
|
<vuescroll style="height:100%;">
|
|
|
+ <Alert @on-close="isClose = true" v-show="!isClose && listType == 'school' && teaClassList[curClassIndex] && teaClassList[curClassIndex].classId" show-icon type="warning" closable>
|
|
|
+ {{$t('cusMgt.groupTips')}}
|
|
|
+ </Alert>
|
|
|
<Table :columns="isDefList ? classColumn : listColumn" :data="students" @on-selection-change="(selections)=>{delSelection = selections}" :height="tableHeight" class="system-classroom-table" :loading="stuLoading" :no-data-text="$t('cusMgt.noStu')">
|
|
|
<Loading slot="loading" bgColor="rgba(103, 103, 103, 0.27)"></Loading>
|
|
|
<template slot-scope="{ row }" slot="picture">
|
|
@@ -512,6 +530,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
return {
|
|
|
+ routerRecord: undefined,//首页跳转到课堂记录页面然后返回我的课程携带的数据
|
|
|
+ isClose: false,
|
|
|
sLoading: false,
|
|
|
isAuto: false,//是否自动发布课堂记录
|
|
|
fIds: [],//收藏列表ids
|
|
@@ -2127,11 +2147,15 @@ export default {
|
|
|
(res) => {
|
|
|
if (res.error == null) {
|
|
|
this.courseList = res.courses
|
|
|
+ // 如果从首页跳转返回
|
|
|
+ if (this.routerRecord) {
|
|
|
+ this.listType = this.routerRecord.scope || this.listType
|
|
|
+ }
|
|
|
//设置当前课程列表
|
|
|
- // this.courseListShow = this.courseList.filter(item => {
|
|
|
- // return item.scope == this.listType
|
|
|
- // })
|
|
|
- this.tabClick(this.listType)
|
|
|
+ this.courseListShow = this.courseList.filter(item => {
|
|
|
+ return item.scope == this.listType
|
|
|
+ })
|
|
|
+ // this.tabClick(this.listType)
|
|
|
if (this.courseListShow.length == 0) { //如果没有标准课程,则设置默认为个人课程
|
|
|
this.listType = 'private'
|
|
|
this.courseListShow = this.courseList.filter(item => {
|
|
@@ -2139,18 +2163,21 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (this.courseListShow.length) {
|
|
|
- this.getCusInfo()
|
|
|
+ //定位对应的课程index
|
|
|
+ if (this.routerRecord) {
|
|
|
+ let index = this.courseListShow.findIndex(item => item.id == this.routerRecord.courseId)
|
|
|
+ if (index > -1) this.curCusIndex = index
|
|
|
+ }
|
|
|
+ this.selectCourse(this.curCusIndex)
|
|
|
} else {
|
|
|
this.listLoading = false
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
- // this.$Message.error('API ERROR!')
|
|
|
this.listLoading = false
|
|
|
}
|
|
|
},
|
|
|
(err) => {
|
|
|
- // this.$Message.error('API ERROR!')
|
|
|
this.listLoading = false
|
|
|
}
|
|
|
)
|
|
@@ -2318,6 +2345,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
+ next(vm => {
|
|
|
+ if (from.params.record) {
|
|
|
+ vm.routerRecord = from.params.record
|
|
|
+ }
|
|
|
+ console.log(arguments)
|
|
|
+ })
|
|
|
+ },
|
|
|
created() {
|
|
|
// this.tabName = this.$store.state.config.srvAdrType != 'product' ? 'record' : 'activity'
|
|
|
this.tabName = 'record'
|