Browse Source

Merge branch 'develop6.0-tmd' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop6.0-tmd

XW 3 năm trước cách đây
mục cha
commit
16ba73f012

+ 18 - 14
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -68,8 +68,8 @@
                     </div>
                     </div>
                     <div class="course-classroom-info common-save-btn" id="table-height" slot="right">
                     <div class="course-classroom-info common-save-btn" id="table-height" slot="right">
                         <div class="course-classroom-info-header tab-box" style="padding-right:30px;">
                         <div class="course-classroom-info-header tab-box" style="padding-right:30px;">
-                            <span @click="selectTab('activity')" :class="tabName == 'activity' ? 'course-classroom-label pane active':'course-classroom-label pane'">{{$t('cusMgt.acRecord')}}</span>
                             <span @click="selectTab('record')" :class="tabName == 'record' ? 'course-classroom-label pane active':'course-classroom-label pane'" v-show="$store.state.config.srvAdrType != 'product'">{{$t('cusMgt.cusRecord')}}</span>
                             <span @click="selectTab('record')" :class="tabName == 'record' ? 'course-classroom-label pane active':'course-classroom-label pane'" v-show="$store.state.config.srvAdrType != 'product'">{{$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('stus')" :class="tabName == 'stus' ? 'course-classroom-label pane active':'course-classroom-label pane'">{{$t('courseManage.classroom.studentList')}}</span>
 
 
                             <!-- 个人课程时段设置暂不实做 -->
                             <!-- 个人课程时段设置暂不实做 -->
@@ -148,7 +148,7 @@
                         <div v-show="tabName == 'record'" class="animated fadeIn class-record-wrap">
                         <div v-show="tabName == 'record'" class="animated fadeIn class-record-wrap">
                             <vuescroll>
                             <vuescroll>
                                 <List>
                                 <List>
-                                    <ListItem v-for="(item,index) in recordListShow" :key="index">
+                                    <ListItem v-for="(item,index) in curRecordList" :key="index">
                                         <ListItemMeta @click.native="toClassRecoerd(index)" style="cursor: pointer;">
                                         <ListItemMeta @click.native="toClassRecoerd(index)" style="cursor: pointer;">
                                             <div slot="avatar" class="record-poster-wrap" :style="{backgroundImage:`url(${item.poster})`}">
                                             <div slot="avatar" class="record-poster-wrap" :style="{backgroundImage:`url(${item.poster})`}">
                                             </div>
                                             </div>
@@ -189,7 +189,7 @@
                                         </ListItemMeta>
                                         </ListItemMeta>
                                     </ListItem>
                                     </ListItem>
                                 </List>
                                 </List>
-                                <EmptyData v-show="recordListShow.length == 0" :textContent="$t('cusMgt.noRecord')" :top="150"></EmptyData>
+                                <EmptyData v-show="curRecordList.length == 0" :textContent="$t('cusMgt.noRecord')" :top="150"></EmptyData>
                             </vuescroll>
                             </vuescroll>
                         </div>
                         </div>
                         <!-- 活动记录 -->
                         <!-- 活动记录 -->
@@ -568,7 +568,6 @@ export default {
                 }
                 }
             ],
             ],
             recordList: [],
             recordList: [],
-            recordListShow: [],
             editClassStatus: false,
             editClassStatus: false,
             showQrStatus: false,
             showQrStatus: false,
             listLoading: false,
             listLoading: false,
@@ -760,7 +759,7 @@ export default {
                             const index = this.recordList.findIndex(item => item.id == id)
                             const index = this.recordList.findIndex(item => item.id == id)
                             if (index > -1) {
                             if (index > -1) {
                                 this.recordList.splice(index, 1)
                                 this.recordList.splice(index, 1)
-                                this.filterRecordList(this.curClassIndex)
+                                // this.filterRecordList(this.curClassIndex)
                             }
                             }
                         },
                         },
                         err => {
                         err => {
@@ -938,7 +937,7 @@ export default {
             } else if (this.tabName == 'stus') {
             } else if (this.tabName == 'stus') {
                 this.getStuList()
                 this.getStuList()
             } else if (this.tabName == 'record') {
             } else if (this.tabName == 'record') {
-                this.getRecordList()
+                if (!this.recordList.length) this.getRecordList()
             }
             }
         },
         },
         //课程选项卡点击事件
         //课程选项卡点击事件
@@ -1554,15 +1553,9 @@ export default {
             } else if (this.tabName == 'activity') {
             } else if (this.tabName == 'activity') {
                 this.getActivityList()
                 this.getActivityList()
             } else if (this.tabName == 'record') {
             } else if (this.tabName == 'record') {
-                this.filterRecordList(index)
+                // this.filterRecordList(index)
             }
             }
         },
         },
-        filterRecordList(index) {
-            this.recordListShow = this.recordList.filter(item => {
-                let id = this.teaClassList[index]?.classId || this.teaClassList[index]?.stulist
-                return item.groupIds.includes(id)
-            })
-        },
         //查看课堂记录详情
         //查看课堂记录详情
         toClassRecoerd(index) {
         toClassRecoerd(index) {
             this.$router.push({
             this.$router.push({
@@ -1676,6 +1669,8 @@ export default {
             }
             }
             if (this.tabName == 'record') {
             if (this.tabName == 'record') {
                 this.getRecordList()
                 this.getRecordList()
+            }else{
+                this.recordList = []
             }
             }
         },
         },
         // 新增个人课程
         // 新增个人课程
@@ -1931,7 +1926,7 @@ export default {
                         item.video = `${privateSas.url}/${privateSas.name}/records/${item.id}/Record/CourseRecord.mp4${privateSas.sas}`
                         item.video = `${privateSas.url}/${privateSas.name}/records/${item.id}/Record/CourseRecord.mp4${privateSas.sas}`
                         item.poster = `${privateSas.url}/${privateSas.name}/records/${item.id}/Record/CoverImage.jpg${privateSas.sas}`
                         item.poster = `${privateSas.url}/${privateSas.name}/records/${item.id}/Record/CoverImage.jpg${privateSas.sas}`
                     })
                     })
-                    this.filterRecordList(this.curClassIndex)
+                    // this.filterRecordList(this.curClassIndex)
                 },
                 },
                 err => {
                 err => {
                     this.$Message.error(this.$t('cusMgt.rcdErr'))
                     this.$Message.error(this.$t('cusMgt.rcdErr'))
@@ -1940,6 +1935,7 @@ export default {
         }
         }
     },
     },
     created() {
     created() {
+        this.tabName = this.$store.state.config.srvAdrType != 'product' ? 'record' : 'activity'
         this.getAllStuList()
         this.getAllStuList()
         //直接读取登录成功拿到得学校基础信息
         //直接读取登录成功拿到得学校基础信息
         this.$store.dispatch('user/getSchoolProfile').then(res => {
         this.$store.dispatch('user/getSchoolProfile').then(res => {
@@ -2132,6 +2128,14 @@ export default {
                 return (item.classes && item.classes.includes(id)) || ((item.stuLists && item.stuLists.includes(id)))
                 return (item.classes && item.classes.includes(id)) || ((item.stuLists && item.stuLists.includes(id)))
             })
             })
         },
         },
+        //当前班级课堂记录
+        curRecordList() {
+            let list = this.recordList.filter(item => {
+                let id = this.teaClassList[this.curClassIndex]?.classId || this.teaClassList[this.curClassIndex]?.stulist
+                return item.groupIds.includes(id)
+            })
+            return list
+        },
         cusTypeLabel() {
         cusTypeLabel() {
             let curObj = this.cusType.find(item => {
             let curObj = this.cusType.find(item => {
                 return item.value == this.listType
                 return item.value == this.listType