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
7d6f87f8e4

+ 1 - 1
TEAMModelBI/Controllers/OperateRecord/OperateLogController.cs

@@ -48,7 +48,7 @@ namespace TEAMModelBI.Controllers.OperateRecord
                 jsonElement.TryGetProperty("endDate", out JsonElement endDate);
                 jsonElement.TryGetProperty("platform", out JsonElement platform);
 
-                List<BIOptLog> operateLogs = null;
+                List<BIOptLog> operateLogs = new();
                 StringBuilder tableSql = new StringBuilder();
 
                 if (!string.IsNullOrEmpty($"{single}"))

+ 23 - 26
TEAMModelOS.SDK/DI/AzureStorage/AzureStorageBlobExtensions.cs

@@ -403,49 +403,46 @@ namespace TEAMModelOS.SDK.DI
         /// <param name="msg"></param>
         /// <param name="dingDing"></param>
         /// <param name="scope"></param>
-        /// <param name="bizId"></param>
         /// <param name="option"></param>
         /// <param name="httpContext"></param>
         /// <returns></returns>
-        public static async Task SaveBILog(this AzureStorageFactory azureStorage, string type, string msg, DingDing dingDing, string scope = null, string bizId = null, Option option = null, HttpContext httpContext = null)
+        public static async Task SaveBILog(this AzureStorageFactory azureStorage, string type, string msg, DingDing dingDing, string scope = null, Option option = null, HttpContext httpContext = null)
         {
-            var table = azureStorage.GetCloudTableClient().GetTableReference("OptLog");
-            OptLog log = new() { RowKey = Guid.NewGuid().ToString() };
+            var table = azureStorage.GetCloudTableClient().GetTableReference("BIOptLog");
+            BIOptLog biLog = new() { RowKey = Guid.NewGuid().ToString() };
             try
             {
-                object id = null, school = null, name = null, website = null;
+                object id = null, name = null, ddid = null, ddname = null, school = null, website = null;
                 httpContext?.Items.TryGetValue("ID", out id);
-                httpContext?.Items.TryGetValue("School", out school);
                 httpContext?.Items.TryGetValue("Name", out name);
+                httpContext?.Items.TryGetValue("DDId", out ddid);
+                httpContext?.Items.TryGetValue("DDName", out ddname);
+                httpContext?.Items.TryGetValue("School", out school);
                 httpContext?.Items.TryGetValue("Website", out website);
-                log.tmdId = id != null ? $"{id}" : log.tmdId;
-                log.name = name != null ? $"{name}" : log.name;
+                biLog.tmdId = id != null ? $"{id}" : biLog.tmdId;
+                biLog.name = name != null ? $"{name}" : biLog.name;
+                biLog.school = school != null ? $"{school}" : biLog.school;
+                biLog.PartitionKey = type != null ? $"{website}-Log-{type}" : $"{website}-Log-Default";
+                biLog.platform = website != null ? $"{website}" : "Default";
+                biLog.msg = msg;
+                biLog.type = type;
+                biLog.scope = scope;
                 string host = httpContext?.Request?.Host.Value;
-                log.school = school != null ? $"{school}" : log.school;
-                log.PartitionKey = type != null ? $"Log-{type}" : "Log-Default";
-                log.RowKey = bizId != null ? bizId : log.RowKey;
-                log.platform = website != null ? $"{website}" : "Default";
-                log.msg = msg;
-                log.type = type;
-                log.scope = scope;
                 host = !string.IsNullOrWhiteSpace($"{host}") ? $"{host}" : option?.Location != null ? $"{host}" : "Default";
-                log.url = $"{host}{httpContext?.Request.Path}";
+                biLog.url = $"{host}{httpContext?.Request.Path}";
                 if (!string.IsNullOrWhiteSpace(msg) && msg.Length > 255)
                 {
-                    log.saveMod = 1;
-                    log.jsonfile = $"/0-public/optlog/{log.RowKey}-{log.PartitionKey}.json";
-                    await azureStorage.UploadFileByContainer("0-public", log.ToJsonString(), "optlog", $"{log.RowKey}-{log.PartitionKey}.json");
-                    log.msg = null;
-                    await table.SaveOrUpdate<OptLog>(log);
-                }
-                else
-                {
-                    await table.SaveOrUpdate<OptLog>(log);
+                    biLog.saveMod = 1;
+                    biLog.jsonfile = $"/0-public/BIOptLog/{biLog.PartitionKey}-{biLog.RowKey}.json";
+                    await azureStorage.UploadFileByContainer("0-public", biLog.ToJsonString(), "BIOptLog", $"{biLog.PartitionKey}-{biLog.RowKey}.json");
+                    biLog.msg = null;
+                    await table.SaveOrUpdate<BIOptLog>(biLog);
                 }
+                else await table.SaveOrUpdate<BIOptLog>(biLog);
             }
             catch (Exception ex)
             {
-                _ = dingDing.SendBotMsg($"日志保存失败:{ex.Message},{ex.StackTrace},{log.ToJsonString()}", GroupNames.成都开发測試群組);
+                _ = dingDing.SendBotMsg($"BI日志保存失败:{ex.Message},{ex.StackTrace},{biLog.ToJsonString()}", GroupNames.成都开发測試群組);
             }
         }
     }

+ 17 - 11
TEAMModelOS/ClientApp/src/api/learnActivity.js

@@ -33,7 +33,7 @@ export default {
     /*
      *修改评测结束时间
      */
-     updExamEndtime: function (data) {
+    updExamEndtime: function (data) {
         return post('/common/exam/update-end-time', data)
     },
     /*
@@ -99,8 +99,8 @@ export default {
     findRecord: function (data) {
         return post('/common/Learn/findRecord', data)
     },
-	
-	InteractHomework: function (data) {
+
+    InteractHomework: function (data) {
         return post('/common/homework/interact', data)
     },
 
@@ -122,12 +122,12 @@ export default {
     RevokeHomeWork: function (data) {
         return post('/common/homework/cancel', data)
     },
-	/*
-	* 撤销发布作业
-	*/
-	FindHomeWorkById: function (data) {
-	    return post('/common/homework/find-id', data)
-	},
+    /*
+    * 撤销发布作业
+    */
+    FindHomeWorkById: function (data) {
+        return post('/common/homework/find-id', data)
+    },
     /*
     * 删除作业
     */
@@ -316,6 +316,12 @@ export default {
     upsertAnswer: function (data) {
         return post('/teacher/comment/upsert-answer', data)
     },
+    /*
+     *删除批注
+     */
+    delAnswer: function (data) {
+        return post('/teacher/comment/delete-answer', data)
+    },
 
     /**
      * 必须是已结束的评测,进行中的评测可能会报错
@@ -330,7 +336,7 @@ export default {
     },
     //查看阅卷进度
     findMarkProgress: function (data) {
-	    return post('/common/exam/analysis-scoring', data)
-	},
+        return post('/common/exam/analysis-scoring', data)
+    },
 
 }

+ 17 - 17
TEAMModelOS/ClientApp/src/common/BaseLayout.vue

@@ -28,14 +28,14 @@
                                 <Submenu :name="item.subName" v-if="$access.ability(item.role,item.permission).validateAll && item.child.length && item.isShow" v-show="(index == 0 && $store.state.userInfo.hasSchool) || index > 0">
                                     <template slot="title">
                                         <!-- <Tooltip :content="item.name" placement="right" transfer v-show="isCollapsed"> -->
-                                            <Icon v-show="isCollapsed" :custom="item.icon" style="width:55px;text-align:left;" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
+                                        <Icon v-show="isCollapsed" :custom="item.icon" style="width:55px;text-align:left;" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
                                         <!-- </Tooltip> -->
                                         <Icon v-show="!isCollapsed" :custom="item.icon" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
                                         <span>{{item.name}}</span>
                                     </template>
                                     <MenuItem :name="menuItem.menuName" :to="menuItem.router" v-for="(menuItem,i) in item.child" :key="i" v-show="$access.ability(menuItem.role,menuItem.permission).validateAll && menuItem.isShow">
                                     <!-- <Tooltip :content="menuItem.name" placement="right" transfer v-show="isCollapsed"> -->
-                                        <Icon v-show="isCollapsed" class="sub-menu-icon" :custom="menuItem.icon" size="16" />
+                                    <Icon v-show="isCollapsed" class="sub-menu-icon" :custom="menuItem.icon" size="16" />
                                     <!-- </Tooltip> -->
                                     <Icon v-show="!isCollapsed" class="sub-menu-icon" :custom="menuItem.icon" size="16" />
                                     <span>
@@ -51,7 +51,7 @@
                                 </Submenu>
                                 <MenuItem :name="item.menuName" v-else-if="$access.ability(item.role,item.permission).validateAll && item.isShow" :to="item.router">
                                 <!-- <Tooltip :content="item.name" placement="right" transfer v-show="isCollapsed"> -->
-                                    <Icon v-show="isCollapsed" :custom="item.icon" style="width:55px;text-align:left;" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
+                                <Icon v-show="isCollapsed" :custom="item.icon" style="width:55px;text-align:left;" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
                                 <!-- </Tooltip> -->
                                 <Icon v-show="!isCollapsed" :custom="item.icon" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
                                 <span>
@@ -72,14 +72,14 @@
                             <Submenu :name="item.subName" v-if="$access.ability(item.role,item.permission).validateAll && item.child.length && item.isShow" v-show="(index == 0 && $store.state.userInfo.hasSchool) || index > 0">
                                 <template slot="title">
                                     <!-- <Tooltip :content="item.name" placement="right" transfer v-show="isCollapsed"> -->
-                                        <Icon v-show="isCollapsed" :custom="item.icon" style="width:55px;text-align:left;" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
+                                    <Icon v-show="isCollapsed" :custom="item.icon" style="width:55px;text-align:left;" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
                                     <!-- </Tooltip> -->
                                     <Icon v-show="!isCollapsed" :custom="item.icon" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
                                     <span>{{item.name}}</span>
                                 </template>
                                 <MenuItem :name="menuItem.menuName" :to="menuItem.router" v-for="(menuItem,i) in item.child" :key="i" v-show="$access.ability(menuItem.role,menuItem.permission).validateAll && menuItem.isShow">
                                 <!-- <Tooltip :content="menuItem.name" placement="right" transfer v-show="isCollapsed"> -->
-                                    <Icon v-show="isCollapsed" class="sub-menu-icon" :custom="menuItem.icon" size="18" />
+                                <Icon v-show="isCollapsed" class="sub-menu-icon" :custom="menuItem.icon" size="18" />
                                 <!-- </Tooltip> -->
                                 <Icon v-show="!isCollapsed" class="sub-menu-icon" :custom="menuItem.icon" size="16" />
                                 <span>
@@ -95,13 +95,13 @@
                             </Submenu>
                             <MenuItem :name="item.menuName" v-else-if="$access.ability(item.role,item.permission).validateAll && item.isShow" :to="item.router">
                             <!-- <Tooltip :content="item.name" placement="right" transfer v-show="isCollapsed"> -->
-                                <Icon v-show="isCollapsed" :custom="item.icon" style="width:55px;text-align:left;" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
+                            <Icon v-show="isCollapsed" :custom="item.icon" style="width:55px;text-align:left;" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
                             <!-- </Tooltip> -->
                             <Icon v-show="!isCollapsed" :custom="item.icon" :class="isCollapsed ? 'collapse-icon-size':''" size="16" />
                             <span>
                                 {{item.name}}
                                 <Tooltip v-if="item.info" :content="item.info" theme="light" transfer max-width="180">
-                                    <Icon  type="ios-information-circle-outline" color="#1cc0f3" />
+                                    <Icon type="ios-information-circle-outline" color="#1cc0f3" />
                                 </Tooltip>
                                 <span style="color: aqua;margin-left: 2px;font-size: 12px;margin-top:3px">
                                     {{item.tag}}
@@ -694,6 +694,16 @@ export default {
                         menuName: 'privateEvaluation',
                         isShow: true
                     },
+                    {
+                        icon: 'iconfont icon-hw',
+                        name: this.$t('system.menu.homework'),
+                        router: '/home/manageHomeWork',
+                        tag: '',
+                        role: 'teacher|admin',
+                        permission: '',
+                        menuName: 'manageHomeWork',
+                        isShow: true,
+                    },
                     {
                         icon: 'iconfont icon-vote',
                         name: this.$t('system.menu.prtVote'),
@@ -713,16 +723,6 @@ export default {
                         permission: '',
                         menuName: 'personalSurvey',
                         isShow: true
-                    },
-                    {
-                        icon: 'iconfont icon-hw',
-                        name: this.$t('system.menu.homework'),
-                        router: '/home/manageHomeWork',
-                        tag: '',
-                        role: 'teacher|admin',
-                        permission: '',
-                        menuName: 'manageHomeWork',
-                        isShow: true,
                     },
                         // 自主学习和作业活动暂时隐藏
                         // {

+ 12 - 2
TEAMModelOS/ClientApp/src/common/VideoPlayer2.vue

@@ -30,9 +30,19 @@ export default {
         }
     },
     mounted() {
+        let that = this
         this.player = videojs(
             this.$refs.videoPlayer,
-            this.options
+            this.options,
+            function () {
+                this.on('error', (e) => {
+                    that.player.errorDisplay.close();   //将错误信息不显示
+                    that.noVideo = true
+                    // 自定义显示方式
+                    // that.player.getChild("cloumn").addClass("noShow")
+                    that.$emit('on-vd-error')
+                })
+            }
         )
         //时间切片
         let _this = this
@@ -125,7 +135,7 @@ export default {
 <style lang="less" scoped>
 </style>
 <style lang="less">
-.video-wrap .video-js{
+.video-wrap .video-js {
     border: 1px solid #c0c0c0;
 }
 .video-wrap .video-js .vjs-progress-control {

+ 3 - 1
TEAMModelOS/ClientApp/src/locale/lang/en-US/learnActivity.js

@@ -268,7 +268,9 @@ export default {
         exportTips: 'The assessment is in progress and some students have not yet answered. Are you sure you want to export the data?',
         noQuMark: 'All questions have been graded, no unmarked questions',
         noUpd:'暫未修改分數',
-        totalScore:'總成績'
+        totalScore:'總成績',
+        delMark:'刪除批註',
+        delMarkContent:'確認刪除當前題目的批註嗎?'
     },
 
     //SimpleAnalysis.vue

+ 3 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/learnActivity.js

@@ -269,7 +269,9 @@ export default {
         exportTips:'评测进行中,有些学生尚未作答,确认导出数据吗?',
         noQuMark:'已完成所有题目评分,暂无未阅题目',
         noUpd:'暂未修改分数',
-        totalScore:'总成绩'
+        totalScore:'总成绩',
+        delMark:'删除批注',
+        delMarkContent:'确认删除当前题目的批注吗?'
     },
 
     //SimpleAnalysis.vue

+ 3 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/learnActivity.js

@@ -269,7 +269,9 @@ export default {
         exportTips: '評測進行中,有些學生尚未作答,確認導出數據嗎? ',
         noQuMark: '已完成所有題目評分,暫無未閱題目',
         noUpd:'暫未修改分數',
-        totalScore:'總成績'
+        totalScore:'總成績',
+        delMark:'刪除批註',
+        delMarkContent:'確認刪除當前題目的批註嗎?'
     },
 
     //SimpleAnalysis.vue

+ 54 - 5
TEAMModelOS/ClientApp/src/view/learnactivity/ByQuMark.vue

@@ -122,7 +122,7 @@
                         </span>
                     </div>
                     <!-- 批注!!! -->
-                    <div class="redundant-mark-btn"  v-if="quNoList.length && quNoList[quIndex] && !quNoList[quIndex].disabled" @click="markStuAnswer()">
+                    <div class="redundant-mark-btn" v-if="quNoList.length && quNoList[quIndex] && !quNoList[quIndex].disabled" @click="markStuAnswer()">
                         <span style="margin-left:5px;">{{$t('learnActivity.score.mark')}}</span>
                     </div>
                 </div>
@@ -139,7 +139,15 @@
                                     <span style="margin-left:5px;">{{$t('learnActivity.score.orgImg')}}</span>
                                 </span>
                                 <span class="mark-action-item" v-for="(markItem,markIndex) in item.mark[quIndex]" :key="markItem.tmdId" style="background:#19be6b" @click="showMark(item.id, markItem.mark)">
-                                    <span style="margin-left:5px;">{{$t('learnActivity.score.mark')+(markIndex+1)}}</span>
+                                    <!-- <span style="margin-left:5px;">{{$t('learnActivity.score.mark')+(markIndex+1)}}</span> -->
+                                    <span v-if="markItem.tmdId != $store.state.userInfo.TEAMModelId" style="margin-left:5px;">
+                                        {{$t('learnActivity.score.mark')+(markIndex+1)}}
+                                    </span>
+                                    <!-- 我的批注可以删除 -->
+                                    <span v-else style="margin-left:5px;">
+                                        {{$t('learnActivity.score.myMark')}}
+                                        <Icon type="md-close" @click.stop="delMark(item.id)" />
+                                    </span>
                                 </span>
                             </template>
                             <span class="mark-action-item" style="background:#ed4014" @click="markStuAnswer()">
@@ -299,6 +307,47 @@ export default {
             let answerIframe = document.getElementById('byQuIframe')
             answerIframe.onload = () => { }
         },
+        delMark(sId) {
+            console.log(sId)
+            console.log(this.studentsData[this.stuIndex])
+            console.log(sId)
+            this.$Modal.confirm({
+                title: this.$t('learnActivity.score.delMark'),
+                content: this.$t('learnActivity.score.delMarkContent'),
+                onOk: () => {
+                    let mark = this.studentsData[this.stuIndex]?.mark[this.quIndex]?.find(item => {
+                        return item.tmdId == this.$store.state.userInfo.TEAMModelId
+                    })
+                    let blob = mark ? mark.mark : ""
+                    //保存批注数据
+                    this.$api.learnActivity.delAnswer({
+                        "id": this.examInfo.id,
+                        "studentId": this.studentsData[this.stuIndex].id,
+                        "subjectId": this.subjectId,
+                        "classId": this.classId,
+                        "code": this.examInfo.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
+                        "tmdId": this.$store.state.userInfo.TEAMModelId,
+                        "index": this.quIndex,//题号
+                        "blob": blob
+                    }).then(
+                        res => {
+                            this.$Message.success(this.$t('learnActivity.mark.deleteOk'))
+                            let i = this.studentsData[this.stuIndex]?.mark[this.quIndex]?.findIndex(item => {
+                                return item.tmdId == this.$store.state.userInfo.TEAMModelId
+                            })
+                            console.log(i,this.studentsData)
+                            if (i > -1) {
+                                this.studentsData[this.stuIndex].mark[this.quIndex].splice(i, 1)
+                                this.$delete(this.viewMark, this.studentsData[this.stuIndex].id)
+                            }
+                        },
+                        err => {
+                            this.$Message.error(this.$t('learnActivity.mark.deleteErr'))
+                        }
+                    )
+                }
+            })
+        },
         saveMark() {
             if (!this.markData.base64) {
                 return
@@ -344,7 +393,7 @@ export default {
                         "id": this.examInfo.id,
                         "studentId": this.studentsData[this.stuIndex].id,
                         "subjectId": this.subjectId,
-                        "classId": this.studentsData[this.stuIndex].classId,
+                        "classId": this.classId,
                         "code": this.examInfo.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
                         "tmdId": this.$store.state.userInfo.TEAMModelId,
                         "index": this.quIndex,//题号
@@ -589,7 +638,7 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-.redundant-mark-btn{
+.redundant-mark-btn {
     background: #ed4014;
     margin: auto;
     margin-top: 5px;
@@ -669,7 +718,7 @@ export default {
     .mark-action-box {
         display: inline-block;
     }
-    .redundant-mark-btn{
+    .redundant-mark-btn {
         display: inline-block;
     }
 }

+ 49 - 2
TEAMModelOS/ClientApp/src/view/learnactivity/ByStuMark.vue

@@ -128,7 +128,11 @@
                                                 </span> -->
                                                 <span class="mark-action-item" v-for="(markItem,markIndex) in studentAnswer.mark[item.index]" :key="markItem.tmdId" style="background:#19be6b" @click="showMark(item.index, markItem.mark)">
                                                     <span v-if="markItem.tmdId != $store.state.userInfo.TEAMModelId" style="margin-left:5px;">{{$t('learnActivity.score.mark')+(markIndex+1)}}</span>
-                                                    <span v-else style="margin-left:5px;">{{$t('learnActivity.score.myMark')}}</span>
+                                                    <!-- 我的批注可以删除 -->
+                                                    <span v-else style="margin-left:5px;">
+                                                        {{$t('learnActivity.score.myMark')}}
+                                                        <Icon type="md-close" @click.stop="delMark(item.index)" />
+                                                    </span>
                                                 </span>
                                             </template>
                                         </template>
@@ -265,7 +269,10 @@
                                                 </span> -->
                                                 <span class="mark-action-item" v-for="(markItem,markIndex) in studentAnswer.mark[childItem.index]" :key="markItem.tmdId" style="background:#19be6b" @click="showMark(childItem.index, markItem.mark)">
                                                     <span v-if="markItem.tmdId != $store.state.userInfo.TEAMModelId" style="margin-left:5px;">{{$t('learnActivity.score.mark')+(markIndex+1)}}</span>
-                                                    <span v-else style="margin-left:5px;">{{$t('learnActivity.score.myMark')}}</span>
+                                                    <span v-else style="margin-left:5px;">
+                                                        {{$t('learnActivity.score.myMark')}}
+                                                        <Icon type="md-close" @click.stop="delMark(childItem.index)" />
+                                                    </span>
                                                 </span>
                                             </template>
                                             <span class="mark-action-item" style="background:#ed4014" @click="markStuAnswer(childItem.index)">
@@ -490,6 +497,46 @@ export default {
         getMarkData(data) {
             this.markData = data
         },
+        // 删除批注
+        delMark(index) {
+            console.log(index)
+            console.log(this.studentAnswer)
+            console.log(this.markStuAnswer)
+            this.$Modal.confirm({
+                title: this.$t('learnActivity.score.delMark'),
+                content: this.$t('learnActivity.score.delMarkContent'),
+                onOk: () => {
+                    let mark = this.studentAnswer.mark[index]?.find(item => {
+                        return item.tmdId == this.$store.state.userInfo.TEAMModelId
+                    })
+                    let blob = mark ? mark.mark : ""
+                    //保存批注数据
+                    this.$api.learnActivity.delAnswer({
+                        "id": this.examId,
+                        "studentId": this.studentAnswer.id,
+                        "subjectId": this.subjectId,
+                        "classId": this.studentAnswer.classId,
+                        "code": this.examScope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
+                        "tmdId": this.$store.state.userInfo.TEAMModelId,
+                        "index": index,//题号
+                        "blob": blob
+                    }).then(
+                        res => {
+                            this.$Message.success(this.$t('learnActivity.mark.deleteOk'))
+                            let i = this.studentAnswer.mark[index].findIndex(item=>item.tmdId === this.$store.state.userInfo.TEAMModelId)
+                            if(i > -1){
+                                this.studentAnswer.mark[index].splice(i,1)
+                                this.$set(this.markFlag, index, undefined)
+                            }
+                        },
+                        err => {
+                            this.$Message.error(this.$t('learnActivity.mark.deleteErr'))
+                        }
+                    )
+                }
+            })
+        },
+        // 保存批注
         saveMark(data) {
             // 判断当前教师是否已有批注
             if (!data.base64) {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/MgtPrivEva.vue

@@ -45,7 +45,7 @@
                                     {{$t('learnActivity.mgtScEv.stop')}}
                                 </span>
                                 <!-- 二维码分享 -->
-                                <span class="ev-tag-common ev-qr-tag" @click="openQrcode(index)" v-show="$store.state.config.srvAdrType != 'product'">
+                                <span class="ev-tag-common ev-qr-tag" @click="openQrcode(index)">
                                     <Icon size="20" custom="iconfont icon-qrcode" class="qr-code-icon" />
                                 </span>
                             </div>

+ 1 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/MgtSchoolEva.vue

@@ -77,7 +77,7 @@
                                     {{$t('learnActivity.mgtScEv.stop')}}
                                 </span>
                                 <!-- 二维码分享 -->
-                                <span class="ev-tag-common ev-qr-tag" @click="openQrcode(index)" v-show="$store.state.config.srvAdrType != 'product'">
+                                <span class="ev-tag-common ev-qr-tag" @click="openQrcode(index)">
                                     <Icon size="20" custom="iconfont icon-qrcode" class="qr-code-icon" />
                                 </span>
                             </div>

+ 4 - 4
TEAMModelOS/ClientApp/src/view/newcourse/MyCourse.vue

@@ -443,6 +443,10 @@ export default {
                     label: this.$t('cusMgt.ev'),
                     value: 'ev'
                 },
+                {
+                    label: this.$t('cusMgt.hw'),
+                    value: 'hw'
+                },
                 {
                     label: this.$t('cusMgt.vote'),
                     value: 'vote'
@@ -451,10 +455,6 @@ export default {
                     label: this.$t('cusMgt.qu'),
                     value: 'qu'
                 },
-                {
-                    label: this.$t('cusMgt.hw'),
-                    value: 'hw'
-                },
                 // {
                 //     label: this.$t('cusMgt.sl'),
                 //     value: 'sl'

+ 123 - 8
TEAMModelOS/ClientApp/src/view/train/TrainDetail.vue

@@ -614,8 +614,22 @@ export default {
                 {
                     title: this.$t('train.detail.signTime'),
                     slot: 'signTime',
+                    key: 'signTime',
                     align: 'center',
-                    sortable: true
+                    sortable: true,
+                    sortMethod: function (a, b, type) {
+                        console.log(arguments)
+                        if (!b) {
+                            return -1
+                        } else if (!a) {
+                            return 1
+                        }
+                        if (type == 'asc') {
+                            return a > b ? 1 : -1
+                        } else if (type == 'desc') {
+                            return a > b ? -1 : 1
+                        }
+                    }
                 },
                 {
                     title: this.$t('train.detail.status'),
@@ -633,8 +647,22 @@ export default {
                 {
                     title: this.$t('train.detail.updTime'),
                     slot: 'hwTime',
+                    key: 'hwTime',
                     align: 'center',
-                    sortable: true
+                    sortable: true,
+                    sortMethod: function (a, b, type) {
+                        console.log(arguments)
+                        if (!b) {
+                            return -1
+                        } else if (!a) {
+                            return 1
+                        }
+                        if (type == 'asc') {
+                            return a > b ? 1 : -1
+                        } else if (type == 'desc') {
+                            return a > b ? -1 : 1
+                        }
+                    }
                 },
                 {
                     title: this.$t('train.detail.action'),
@@ -651,8 +679,22 @@ export default {
                 {
                     title: this.$t('train.detail.answerTime'),
                     slot: 'surveytTime',
+                    key: 'surveytTime',
                     align: 'center',
-                    sortable: true
+                    sortable: true,
+                    sortMethod: function (a, b, type) {
+                        console.log(arguments)
+                        if (!b) {
+                            return -1
+                        } else if (!a) {
+                            return 1
+                        }
+                        if (type == 'asc') {
+                            return a > b ? 1 : -1
+                        } else if (type == 'desc') {
+                            return a > b ? -1 : 1
+                        }
+                    }
                 },
                 {
                     title: this.$t('train.detail.action'),
@@ -669,8 +711,22 @@ export default {
                 {
                     title: this.$t('train.detail.answerTime'),
                     slot: 'examTime',
+                    key: 'examTime',
                     align: 'center',
-                    sortable: true
+                    sortable: true,
+                    sortMethod: function (a, b, type) {
+                        console.log(arguments)
+                        if (!b) {
+                            return -1
+                        } else if (!a) {
+                            return 1
+                        }
+                        if (type == 'asc') {
+                            return a > b ? 1 : -1
+                        } else if (type == 'desc') {
+                            return a > b ? -1 : 1
+                        }
+                    }
                 },
                 {
                     title: this.$t('train.detail.action'),
@@ -1505,7 +1561,22 @@ export default {
                                     this.columns.push({
                                         title: this.$t('train.detail.signTime'),
                                         slot: 'signTime',
-                                        align: 'center'
+                                        key: 'signTime',
+                                        align: 'center',
+                                        sortable: true,
+                                        sortMethod: function (a, b, type) {
+                                            console.log(arguments)
+                                            if (!b) {
+                                                return -1
+                                            } else if (!a) {
+                                                return 1
+                                            }
+                                            if (type == 'asc') {
+                                                return a > b ? 1 : -1
+                                            } else if (type == 'desc') {
+                                                return a > b ? -1 : 1
+                                            }
+                                        }
                                     })
                                     this.createQRCode()
                                 }
@@ -1513,21 +1584,65 @@ export default {
                                     this.columns.push({
                                         title: this.$t('train.detail.hwUpdTime'),
                                         slot: 'hwTime',
-                                        align: 'center'
+                                        key: 'hwTime',
+                                        align: 'center',
+                                        sortable: true,
+                                        sortMethod: function (a, b, type) {
+                                            console.log(arguments)
+                                            if (!b) {
+                                                return -1
+                                            } else if (!a) {
+                                                return 1
+                                            }
+                                            if (type == 'asc') {
+                                                return a > b ? 1 : -1
+                                            } else if (type == 'desc') {
+                                                return a > b ? -1 : 1
+                                            }
+                                        }
                                     })
                                 }
                                 if (this.trainInfo.settings.includes('survey')) {
                                     this.columns.push({
                                         title: this.$t('train.detail.quAsTime'),
                                         slot: 'surveyTime',
-                                        align: 'center'
+                                        key: 'surveyTime',
+                                        align: 'center',
+                                        sortable: true,
+                                        sortMethod: function (a, b, type) {
+                                            console.log(arguments)
+                                            if (!b) {
+                                                return -1
+                                            } else if (!a) {
+                                                return 1
+                                            }
+                                            if (type == 'asc') {
+                                                return a > b ? 1 : -1
+                                            } else if (type == 'desc') {
+                                                return a > b ? -1 : 1
+                                            }
+                                        }
                                     })
                                 }
                                 if (this.trainInfo.settings.includes('exam')) {
                                     this.columns.push({
                                         title: this.$t('train.detail.examAsTime'),
                                         slot: 'examTime',
-                                        align: 'center'
+                                        key: 'examTime',
+                                        align: 'center',
+                                        sortable: true,
+                                        sortMethod: function (a, b, type) {
+                                            if (!b) {
+                                                return -1
+                                            } else if (!a) {
+                                                return 1
+                                            }
+                                            if (type == 'asc') {
+                                                return a > b ? 1 : -1
+                                            } else if (type == 'desc') {
+                                                return a > b ? -1 : 1
+                                            }
+                                        }
                                     })
                                 }