Browse Source

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

Li 3 years ago
parent
commit
159f77658c

+ 38 - 3
TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseListView.vue

@@ -215,9 +215,22 @@
                             <Icon v-show="!isShowInput" type="md-create" class="change-name-icon" @click="isShowInput = true" />
                         </div>
                     </div>
-                    <div v-if="isChangeGroupView == false">
+                    <div v-if="isChangeGroupView == false && classList.length">
                         <!-- <vuescroll> -->
-                            <Table :columns="stuCol" :data="stuList[courseIndex]" :height="650"></Table>
+                            <Table :columns="stuCol" :data="stuList[courseIndex]" :height="650" v-show="classList[courseIndex].type === 'class'">
+                                <template slot-scope="{ row }" slot="groupName">
+                                    <span>
+                                        {{ row.groupName ? row.groupName : '--'}}
+                                    </span>
+                                </template>
+                            </Table>
+                            <Table :columns="stuColTeach" :data="stuList[courseIndex]" :height="650" v-show="classList[courseIndex].type === 'teach'">
+                                <template slot-scope="{ row }" slot="nickname">
+                                    <span>
+                                        {{ row.nickname ? row.nickname : '--'}}
+                                    </span>
+                                </template>
+                            </Table>
                         <!-- </vuescroll> -->
                     </div>
                     <!--小組模式-->
@@ -539,9 +552,31 @@ export default {
                 },
                 {
                     title: vm.$t("studentWeb.courseContent.group"),
-                    key: "groupName",
+                    slot: "groupName",
                 }
             ],
+            stuColTeach: [
+                /* {
+                    title: vm.$t("studentWeb.courseContent.seatNo"),
+                    key: "no",
+                }, */
+                {
+                    title: vm.$t("studentWeb.courseContent.stuNum"),
+                    key: "id",
+                },
+                {
+                    title: vm.$t("studentWeb.courseContent.name"),
+                    key: "name",
+                },
+                {
+                    title: vm.$t("studentWeb.courseContent.nickName"),
+                    slot: "nickname",
+                },
+                {
+                    title: vm.$t("studentWeb.courseContent.accountType"),
+                    key: "typeName",
+                },
+            ],
             tmdCol: [
                 {
                     title: vm.$t("studentWeb.courseContent.tmdNum"),

+ 8 - 0
TEAMModelOS/ClientApp/src/locale/lang/en-US/studentWeb.js

@@ -761,6 +761,7 @@ export default {
         courseCode: "Course QR Code",
         me: "me",
         notes: "E-Note",
+        mynotes: "我的筆記",
         type: {
             all: "All",
             msg: "Text",
@@ -772,6 +773,13 @@ export default {
             wrong: "Incorrect",
         },
         noClassRecord: "No lesson records yet.",
+        setting: {
+            ok: "設定成功",
+            error: "設定失敗",
+            no: "未設定",
+        },
+        myNickName: "我的昵稱",
+        nickName: "昵稱",
     },
     'calendar-title': 'Calendar-Second semester of 2020 school year',
     today: 'Today',

+ 8 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/studentWeb.js

@@ -761,6 +761,7 @@ export default {
         courseCode: "课程二维码",
         me: "我",
         notes: "电子笔记",
+        mynotes: "我的笔记",
         type: {
             all: "全部",
             msg: "飞讯",
@@ -772,6 +773,13 @@ export default {
             wrong: "答错",
         },
         noClassRecord: "暂无课堂记录",
+        setting: {
+            ok: "设置成功",
+            error: "设置失败",
+            no: "未设置",
+        },
+        myNickName: "我的昵称",
+        nickName: "昵称",
     },
     'calendar-title': '行事历 - 109学年度第二学期',
     today: '今天',

+ 8 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/studentWeb.js

@@ -761,6 +761,7 @@ export default {
         courseCode: "課程二維碼",
         me: "我",
         notes: "電子筆記",
+        mynotes: "我的筆記",
         type: {
             all: "全部",
             msg: "飛訊",
@@ -772,6 +773,13 @@ export default {
             wrong: "答錯",
         },
         noClassRecord: "暫無課堂記錄",
+        setting: {
+            ok: "設定成功",
+            error: "設定失敗",
+            no: "未設定",
+        },
+        myNickName: "我的昵稱",
+        nickName: "昵稱",
     },
     'calendar-title': '行事歷 - 109學年度第二學期',
     today: '今天',

+ 10 - 9
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -78,8 +78,7 @@
                             <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'">
+                            <span @click="selectTab('data')" :class="tabName == 'data' ? 'course-classroom-label pane active':'course-classroom-label pane'">
                                 {{$t('cusMgt.gradeData')}}
                             </span>
 
@@ -279,7 +278,7 @@
                                                     <!-- 删除记录 -->
                                                     <Icon v-show="item.owner === 'teacher'" type="md-trash" style="right:50px" class="common-item-icon" @click.stop="delEv(item)" :title="$t('cusMgt.delRcd')" />
                                                     <!-- 收藏 -->
-                                                    <Icon :type="isFavorite(item.id) ? 'md-heart':'md-heart-outline'" style="right:20px"  :class="['common-item-icon',isFavorite(item.id) ? 'heart-active':'']" @click.stop="toggleFavorite(item)" :title="isFavorite(item.id) ? $t('cusMgt.unfvt') : $t('cusMgt.fvt')" />
+                                                    <Icon :type="isFavorite(item.id) ? 'md-heart':'md-heart-outline'" style="right:20px" :class="['common-item-icon',isFavorite(item.id) ? 'heart-active':'']" @click.stop="toggleFavorite(item)" :title="isFavorite(item.id) ? $t('cusMgt.unfvt') : $t('cusMgt.fvt')" />
                                                 </span>
                                             </p>
                                             <span slot="avatar" style="margin-top:12px;display: inline-block;margin-left:10px;">
@@ -1358,11 +1357,12 @@ export default {
             this.curCusIndex = 0
             this.listType = tab
             this.courseListShow = this.courseList.filter(item => {
-                if (this.listType == 'school' && this.filterPeriod) {
-                    return item.scope == this.listType && item.period.id === this.filterPeriod
-                } else {
-                    return item.scope == this.listType
-                }
+                return item.scope == this.listType
+                // if (this.listType == 'school' && this.filterPeriod) {
+                //     return item.scope == this.listType && item.period.id === this.filterPeriod
+                // } else {
+                //     return item.scope == this.listType
+                // }
             })
             this.selectCourse(0)
 
@@ -2178,6 +2178,7 @@ export default {
                 'schoolId': this.$store.state.userInfo.schoolCode,
                 'scope': 'private'
             }
+            if (this.filterPeriod) requestData.period = this.filterPeriod
             this.$api.courseMgmt.findCourse(requestData).then(
                 (res) => {
                     if (res.error == null) {
@@ -2419,7 +2420,7 @@ export default {
             handler(n, o) {
                 if (n) {
                     this.filterPeriod = n.id
-                    this.tabClick(this.listType)
+                    this.getCourseList()
                 }
             }
         },

+ 1 - 1
TEAMModelOS/ClientApp/src/view/video/VideoReview.vue

@@ -5,7 +5,7 @@
 				<div class="left-panel">
 					<div class="detail-title">
 						<Icon type="md-arrow-back" @click="goBack" />
-						<span>{{ curData.video.name }} 【 {{ curData.name }} - {{ $t('ability.video.title') }}】</span>
+						<span>{{ curData.video.name }} 【 {{ curData.teacher.name }} - {{ $t('ability.video.title') }}】</span>
 					</div>
 					<video-player class="video-player-box" style="width:100%;margin-bottom: 20px;" ref="videoPlayer" v-if="videoReady"
 						:options="playerOptions" :playsinline="true" @playing="onPlayerPlaying($event)"

+ 1 - 1
TEAMModelOS/Controllers/Both/LessonRecordController.cs

@@ -366,7 +366,7 @@ namespace TEAMModelOS.Controllers
             //    }
             //}
             count = records.Count;
-            return Ok(new { count=count, records });
+            return Ok(new { count=count });
         }
       
         /// <summary>

+ 26 - 1
TEAMModelOS/Controllers/Normal/AbilityStatisticsController.cs

@@ -19,6 +19,7 @@ using TEAMModelOS.Filter;
 using static TEAMModelOS.Controllers.AbilitySubController;
 using Microsoft.AspNetCore.Authorization;
 using TEAMModelOS.SDK.Models.Service;
+using ScTeacher = TEAMModelOS.SDK.Models.ScTeacher;
 
 namespace TEAMModelOS.Controllers
 {
@@ -34,13 +35,15 @@ namespace TEAMModelOS.Controllers
         private readonly Option _option;
         private readonly CoreAPIHttpService _coreAPIHttpService;
         private readonly HttpTrigger _httpTrigger;
-        public AbilityStatisticsController(HttpTrigger httpTrigger,CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option)
+        private readonly AzureStorageFactory _azureStorage;
+        public AbilityStatisticsController(AzureStorageFactory azureStorage,HttpTrigger httpTrigger,CoreAPIHttpService coreAPIHttpService, AzureCosmosFactory azureCosmos, SnowflakeId snowflakeId, DingDing dingDing, IOptionsSnapshot<Option> option)
         {
             _azureCosmos = azureCosmos;
             _dingDing = dingDing;
             _option = option?.Value;
             _coreAPIHttpService=coreAPIHttpService;
             _httpTrigger = httpTrigger;
+            _azureStorage = azureStorage;
         }
         /// <summary>
         /// 更新教师最终学习分数。
@@ -252,7 +255,13 @@ namespace TEAMModelOS.Controllers
                 int hgcount = teacherTrains.Where(x => x.finalScore == 1 || x.finalScore == 2).Count();
                 var teacherAilities = teacherTrains.SelectMany(x => x.currency.teacherAilities);
                 setting.accessConfig = null;
+                var table = _azureStorage.GetCloudTableClient().GetTableReference("ScYxpt");
+                List<ScTeacher> teachers = await table.FindListByDict<ScTeacher>(new Dictionary<string, object>() { { "PartitionKey", "ScTeacher" }, { "areaId", setting.id } });
                 teacherTrains.ForEach(x => {
+                    var tch=  teachers.Find(z => z.tmdid.Equals(x.id));
+                    if (tch != null) {
+                        x.name = tch.TeacherName;
+                    }
                     x.currency.videoTime = (int)x.currency.videoTime;
                     x.currency.teacherAilities.ForEach(y => {
                         y.videoTime = (int)y.videoTime;
@@ -392,7 +401,14 @@ namespace TEAMModelOS.Controllers
                 }
                 //增加评审人员总人数,学习总人数。
                 (List<TeacherTrain> teacherTrains, List<RGroupList> yxtrain) = await StatisticsService.StatisticsSchool(_coreAPIHttpService, school, setting, area, client, _dingDing, update);
+
+                var table = _azureStorage.GetCloudTableClient().GetTableReference("ScYxpt");
+                List<ScTeacher> teachers = await table.FindListByDict<ScTeacher>(new Dictionary<string, object>() { { "PartitionKey", "ScTeacher" }, { "areaId", setting.id }, { "schoolCode", school } });
                 teacherTrains.ForEach(x => {
+                    var tch= teachers.Find(z => z.tmdid.Equals(x.id));
+                    if (tch != null) {
+                        x.name = tch.TeacherName;
+                    }
                     x.currency.videoTime = (int)x.currency.videoTime;
                     x.currency.teacherAilities.ForEach(y => {
                         y.videoTime = (int)y.videoTime;
@@ -496,6 +512,15 @@ namespace TEAMModelOS.Controllers
                 try
                 {
                     teacherTrain = await client.GetContainer(Constant.TEAMModelOS, "Teacher").ReadItemAsync<TeacherTrain>(tmdid, new PartitionKey($"TeacherTrain-{school}"));
+                    var table = _azureStorage.GetCloudTableClient().GetTableReference("ScYxpt");
+                    List<ScTeacher> teachers = await table.FindListByDict<ScTeacher>(new Dictionary<string, object>() { { "PartitionKey", "ScTeacher" }, { "areaId", setting.id } , { "schoolCode", school }, { "tmdid", $"{_tmdid}" }});
+                    if (teachers.Any())
+                    {
+                        teacherTrain.name = teachers[0].TeacherName;
+                    }
+                    else {
+                        teacherTrain.name = name;
+                    }
                     teacherTrain.name = name;
                     teacherTrain.nickname = name;
                     teacherTrain.picture = picture;