ソースを参照

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

CrazyIter_Bin 3 年 前
コミット
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.',
     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.',
     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',
     renameListTitle:'Edit List Name',
+    selectListTips:'請選擇名單',
+    alreadyExist:'已在課程名單',
+    listAPIErr:'名單列表獲取失敗',
     //ManageClass.vue
     //ManageClass.vue
     classLabel:'Class:',
     classLabel:'Class:',
     stuCount:'Student Number: ',
     stuCount:'Student Number: ',

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

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

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

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

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

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

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

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