Browse Source

Merge branch 'develop5.0-tmd' of http://106.12.23.251:10000/TEAMMODEL/TEAMModelOS into develop5.0-tmd

CrazyIter_Bin 3 years ago
parent
commit
d4a326c873

+ 3 - 0
TEAMModelOS/ClientApp/src/locale/lang/en-US/cusMgt.js

@@ -112,6 +112,9 @@ export default {
     createTips1:'Note: You (have joined a school) can select students from your school to join the course, or allow students to join the course by entering the course invitation code, scanning the course QR code, or using the invitation link.',
     createTips2:'Note: You (not yet a member of a school) can allow students to join the course by entering the course invitation code, scanning the course QR code, or using the invitation link.',
     renameListTitle:'Edit List Name',
+    selectListTips:'請選擇名單',
+    alreadyExist:'已在課程名單',
+    listAPIErr:'名單列表獲取失敗',
     //ManageClass.vue
     classLabel:'Class:',
     stuCount:'Student Number: ',

+ 3 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/cusMgt.js

@@ -112,6 +112,9 @@ export default {
     createTips1:'温馨提示:您(已加入学校)可以挑选学校学生加入课程或让学生通过输入课程邀请码、扫描课程二维码、课程链接方式主动加入课程。',
     createTips2:'温馨提示:您(暂未加入学校)可让学生通过输入课程邀请码、扫描课程二维码、课程链接方式主动加入课程。',
     renameListTitle:'修改名称',
+    selectListTips:'请选择名单',
+    alreadyExist:'已在课程名单',
+    listAPIErr:'名单列表获取失败',
     //ManageClass.vue
     classLabel:'班级:',
     stuCount:'学生人数:',

+ 3 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/cusMgt.js

@@ -112,6 +112,9 @@ export default {
     createTips1:'溫馨提示:您(已加入學校)可以挑選學校學生加入課程或讓學生通過輸入課程邀請碼、掃描課程二維碼、課程鏈接方式主動加入課程。 ',
     createTips2:'溫馨提示:您(暫未加入學校)可讓學生通過輸入課程邀請碼、掃描課程二維碼、課程鏈接方式主動加入課程。 ',
     renameListTitle:'修改名稱',
+    selectListTips:'請選擇名單',
+    alreadyExist:'已在課程名單',
+    listAPIErr:'名單列表獲取失敗',
     //ManageClass.vue
     classLabel: '班級:',
     stuCount: '學生人數:',

+ 20 - 29
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -688,7 +688,6 @@ export default {
                         res.tmdinfos.sort((a, b) => {
                             return slist.tmids.indexOf(a.id) - slist.tmids.indexOf(b.id)
                         })
-                        console.log('更新学生数据')
                         let originIndex = this.courseListShow[this.curCusIndex].schedule.findIndex(item => {
                             return item.stulist == schedule.stulist
                         })
@@ -706,14 +705,6 @@ export default {
         },
         //初始化课程课程信息时,根据班级ids查询名单信息
         getStuByClassIds(classIds) {
-            // API调整
-            // let params = {
-            //     'school_code': this.listType == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
-            //     'ids': classIds,
-            //     'scope': this.listType
-            // }
-            // return this.$api.schoolSetting.getClassroomStudent(params)
-
             let params = {
                 'school_code': this.listType == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
                 'ids': classIds
@@ -1001,24 +992,6 @@ export default {
             // //这里需要根据站点动态拼接域名
             console.log(window.location)
             let host = window.location.origin
-            // //国际站
-            // if (addr == 'Global') {
-            //     if (type == 'product') {
-            //         // 正式站
-            //         host = this.$store.state.config[addr].domainUrl[0].url
-            //     } else {
-            //         // 测试站
-            //         host = this.$store.state.config[addr].domainUrl[1].url
-            //     }
-            // }
-            // // 大陆站
-            // else {
-            //     if (type == 'product') {
-            //         host = this.$store.state.config.China.domainUrl[0].url
-            //     } else {
-            //         host = this.$store.state.config.China.domainUrl[1].url
-            //     }
-            // }
             let callbackUrl = `${host}/joinclass?listName=${listName}&tName=${tName}&listNo=${this.stuListNo}&cusName=${cusName}`
             this.inviteUrl = callbackUrl
             console.log(callbackUrl)
@@ -1034,7 +1007,7 @@ export default {
                 }, 0)
             }
             else if (!this.listId && this.type == 'select') {
-                this.$Message.warning('请选择名单')
+                this.$Message.warning(this.$t('cusMgt.selectListTips'))
                 this.modalLoading = false
                 setTimeout(() => {
                     this.modalLoading = true
@@ -1063,7 +1036,7 @@ export default {
                         return item.stulist == this.listId && item.teacherId == this.$store.state.userInfo.TEAMModelId
                     })
                     if (res) {
-                        this.$Message.warning(`${res.listName}已在课程名单`)
+                        this.$Message.warning(`${res.listName}${this.$t('cusMgt.alreadyExist')}`)
                         this.modalLoading = false
                         setTimeout(() => {
                             this.modalLoading = true
@@ -1485,9 +1458,24 @@ export default {
                 'ids': ids
             }
             return this.$api.courseMgmt.findListSummary(requestData)
+        },
+        getAllStuList() {
+            let params = {
+                code: this.$store.state.userInfo.TEAMModelId,
+                scope: 'private'
+            }
+            this.$api.courseMgmt.findStulist(params).then(
+                res=>{
+                    this.stuList = res.stuList
+                },
+                err=>{
+                    this.$Message.error(this.$t('cusMgt.listAPIErr'))
+                }
+            )
         }
     },
     created() {
+        this.getAllStuList()
         //直接读取登录成功拿到得学校基础信息
         this.$store.dispatch('user/getSchoolProfile').then(res => {
             this.isFirst = true
@@ -1619,6 +1607,9 @@ export default {
                 default:
                     break
             }
+            data.sort((a,b)=>{
+                return b.startTime - a.startTime
+            })
             return data.filter(item => {
                 return (item.classes && item.classes.includes(id)) || ((item.stuLists && item.stuLists.includes(id)))
             })

+ 2 - 2
TEAMModelOS/ClientApp/src/view/teachcontent/index.less

@@ -82,7 +82,7 @@
             width: 95%;
             margin: auto;
             margin-top: 20px;
-
+            padding-left: 10px;
             p {
                 color: @primary-textColor;
                 margin-top: 5px;
@@ -161,7 +161,7 @@
             width: 100%;
             height: 80px;
             line-height: 80px;
-            text-align: center;
+            padding-left: 15px;
             border-bottom: 1px solid @borderColor;
             cursor: pointer;
             z-index: 1;