فهرست منبع

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

jeff 1 سال پیش
والد
کامیت
752a7fca1e

+ 5 - 5
TEAMModelOS.SDK/Context/Attributes/Filter/ApiTokenAttribute.cs

@@ -115,7 +115,7 @@ namespace TEAMModelOS.Filter
                 _azureCosmos = azureCosmos;
                 _azureCosmos = azureCosmos;
                 _dingDing= dingDing;
                 _dingDing= dingDing;
             }
             }
-            public async void OnResourceExecuting(ResourceExecutingContext context)
+            public   void OnResourceExecuting(ResourceExecutingContext context)
             {
             {
                 var path = "";
                 var path = "";
                 var authtoken = context.HttpContext.GetXAuth("ApiToken");
                 var authtoken = context.HttpContext.GetXAuth("ApiToken");
@@ -251,16 +251,16 @@ namespace TEAMModelOS.Filter
                                                     //}
                                                     //}
                                                     //else
                                                     //else
                                                     bizVisit.apis.Add(new APIInfo() { name = $"{path}", upDate = udate });//记录加一下
                                                     bizVisit.apis.Add(new APIInfo() { name = $"{path}", upDate = udate });//记录加一下
-                                                    var resBiz = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Normal").ReplaceItemAsync<BizVisitCnt>(bizVisit, id, new Azure.Cosmos.PartitionKey("BizVisit"));
+                                                       _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Normal").ReplaceItemAsync<BizVisitCnt>(bizVisit, id, new Azure.Cosmos.PartitionKey("BizVisit"));
                                                 }
                                                 }
                                                 else
                                                 else
                                                 {
                                                 {
                                                     BizVisitCnt bizVisit = new() { id = id, visit = 1, apis = new List<APIInfo>() { new APIInfo() { name = $"{path}", upDate = udate } } };
                                                     BizVisitCnt bizVisit = new() { id = id, visit = 1, apis = new List<APIInfo>() { new APIInfo() { name = $"{path}", upDate = udate } } };
-                                                    var resBiz = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Normal").CreateItemAsync<BizVisitCnt>(bizVisit, new Azure.Cosmos.PartitionKey("BizVisit"));
+                                                  _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Normal").CreateItemAsync<BizVisitCnt>(bizVisit, new Azure.Cosmos.PartitionKey("BizVisit"));
                                                 }
                                                 }
                                                 //访问次数记录 结束
                                                 //访问次数记录 结束
 
 
-                                                var response = await _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Normal").ReadItemStreamAsync(id, new Azure.Cosmos.PartitionKey("BizConfig"));
+                                                var response =    _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Normal").ReadItemStreamAsync(id, new Azure.Cosmos.PartitionKey("BizConfig")).Result;
                                                 if (response.Status == 200)
                                                 if (response.Status == 200)
                                                 {
                                                 {
                                                     BizConfig bizConfig = JsonDocument.Parse(response.Content).Deserialize<BizConfig>();
                                                     BizConfig bizConfig = JsonDocument.Parse(response.Content).Deserialize<BizConfig>();
@@ -349,7 +349,7 @@ namespace TEAMModelOS.Filter
                     }
                     }
                 }
                 }
                 catch (Exception ex) {
                 catch (Exception ex) {
-                    await   _dingDing.SendBotMsg($"开放平台鉴权失败 ,系统错误 {_option.Location},{ex.Message}\n{ex.StackTrace}\n{path}\n{scope}\n{XAuthSchool}\n{authtoken}", GroupNames.成都开发測試群組);
+                    _=   _dingDing.SendBotMsg($"开放平台鉴权失败 ,系统错误 {_option.Location},{ex.Message}\n{ex.StackTrace}\n{path}\n{scope}\n{XAuthSchool}\n{authtoken}", GroupNames.成都开发測試群組);
                 }
                 }
             }
             }
 
 

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/ExamClassResult.cs

@@ -70,6 +70,7 @@ namespace TEAMModelOS.SDK.Models
         public string name { get; set; }
         public string name { get; set; }
         public string periodId { get; set; }
         public string periodId { get; set; }
         public int year { get; set; }
         public int year { get; set; }
+        public string no { get; set; }
         //public string from { get; set; }
         //public string from { get; set; }
         //public string code { get; set; }
         //public string code { get; set; }
     }
     }

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/School/SchoolSetting.cs

@@ -51,6 +51,7 @@ namespace TEAMModelOS.SDK.Models
         public string labour { get; set; } = "sum";
         public string labour { get; set; } = "sum";
         public string intelligence { get; set; } = "avg";
         public string intelligence { get; set; } = "avg";
         public string virtue { get; set; } = "sum";
         public string virtue { get; set; } = "sum";
+        public string lesson { get; set; } = "sum";
         public List<ReviewLevel> reviewLevel { get; set; } = new List<ReviewLevel>() { 
         public List<ReviewLevel> reviewLevel { get; set; } = new List<ReviewLevel>() { 
             new ReviewLevel { code="A", value = new List<double> { 85,100 } },
             new ReviewLevel { code="A", value = new List<double> { 85,100 } },
             new ReviewLevel { code="B", value = new List<double> { 75,85 } },
             new ReviewLevel { code="B", value = new List<double> { 75,85 } },

+ 19 - 0
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -2211,6 +2211,7 @@ const LANG_EN_US = {
             deleteTopic1: 'Confirm to delete ',
             deleteTopic1: 'Confirm to delete ',
             deleteTopic2: 'Delete Response',
             deleteTopic2: 'Delete Response',
             deleteTopic3: 'Are you sure to delete this response?',
             deleteTopic3: 'Are you sure to delete this response?',
+            placeholder: 'Respond to this topic',
         },
         },
         // 线上研修
         // 线上研修
         online: {
         online: {
@@ -4468,6 +4469,7 @@ const LANG_EN_US = {
             survey: "Survey",
             survey: "Survey",
             wrongTopic: "Incorrectly Answered Question Book",
             wrongTopic: "Incorrectly Answered Question Book",
             wrongTopic1: "SMART Practice",
             wrongTopic1: "SMART Practice",
+            wrongTopic2: "Wrong Questions",
             classInteraction: "Web IRS",
             classInteraction: "Web IRS",
             achievement: "My Grade",
             achievement: "My Grade",
             discussionBoard: 'Discussion Board',
             discussionBoard: 'Discussion Board',
@@ -5182,6 +5184,23 @@ const LANG_EN_US = {
                 button8: "Practice another day, leave first",
                 button8: "Practice another day, leave first",
                 title1: "All current questions have been practiced",
                 title1: "All current questions have been practiced",
             },
             },
+            today: 'Today',
+            message1: 'There are currently no wrong questions to practice.',
+            message2: 'Unable to fetch question content. Practice is not available at the moment. Returning to the previous page shortly.',
+            message3: 'Practice completed. Returning to the previous page shortly.',
+            sortOrder1: 'Ascending',
+            sortOrder2: 'Descending',
+            noData: 'No more data available',
+            headerTitle1: 'Intelligent Wrong Question Practice',
+            headerTitle2: 'Current Question',
+            question1: 'Question Stem',
+            modalTitle1: 'Review Recently Wrong Questions',
+            modalTitle2: 'Exit Practice',
+            modal1: 'All current exercises have been completed and submitted. The practice results are as follows:',
+            modal2: 'Time Used',
+            modal3: 'There are a total of',
+            modal4: 'questions that were answered wrongly or not understood. Would you like to review these questions again? (Review only; no record will be kept)',
+            modal5: 'Congratulations! There were no wrongly answered or misunderstood questions in this practice session. You can exit the practice now.'
         },
         },
         informviewTitle: 'Notification Overview',
         informviewTitle: 'Notification Overview',
         view: 'Go to view',
         view: 'Go to view',

+ 19 - 0
TEAMModelOS/ClientApp/public/lang/zh-CN.js

@@ -2210,6 +2210,7 @@ const LANG_ZH_CN = {
             deleteTopic1: '确认删除',
             deleteTopic1: '确认删除',
             deleteTopic2: '删除回复',
             deleteTopic2: '删除回复',
             deleteTopic3: '确认删除这条回复吗?',
             deleteTopic3: '确认删除这条回复吗?',
+            placeholder: '回复该话题',
         },
         },
         // 线上研修
         // 线上研修
         online: {
         online: {
@@ -4467,6 +4468,7 @@ const LANG_ZH_CN = {
             survey: "问卷",
             survey: "问卷",
             wrongTopic: "错题本",
             wrongTopic: "错题本",
             wrongTopic1: "精准练习",
             wrongTopic1: "精准练习",
+            wrongTopic2: "错题库",
             classInteraction: "课堂互动",
             classInteraction: "课堂互动",
             achievement: "我的成绩",
             achievement: "我的成绩",
             discussionBoard: '在线讨论区',
             discussionBoard: '在线讨论区',
@@ -5181,6 +5183,23 @@ const LANG_ZH_CN = {
                 button8: "改天再练,先离开",
                 button8: "改天再练,先离开",
                 title1: "当前习题已全部完成练习",
                 title1: "当前习题已全部完成练习",
             },
             },
+            today: '今日',
+            message1: '暂没有错题可以练习',
+            message2: '没有获取到题目内容,暂不可以练习,即将返回上一页',
+            message3: '练习完成,即将返回上一页',
+            sortOrder1: '正序',
+            sortOrder2: '倒序',
+            noData: '没有更多数据',
+            headerTitle1: '智慧错题练习',
+            headerTitle2: '当前题目',
+            question1: '主题干',
+            modalTitle1: '重温刚才的错题',
+            modalTitle2: '退出练习',
+            modal1: '当前习题已全部完成并提交,练习结果如下',
+            modal2: '用时',
+            modal3: '本次复习答错和不会的题目共',
+            modal4: '题,请问想要重新复习一遍这些题目吗?(仅做练习,不会进行记录)',
+            modal5: '本次复习没有答错和不会的题目,非常棒,可以退出练习了',
         },
         },
         informviewTitle: '通知总览',
         informviewTitle: '通知总览',
         view: '前往检视',
         view: '前往检视',

+ 19 - 0
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -2212,6 +2212,7 @@ const LANG_ZH_TW = {
             deleteTopic1: '確認刪除?',
             deleteTopic1: '確認刪除?',
             deleteTopic2: '刪除回應',
             deleteTopic2: '刪除回應',
             deleteTopic3: '確認刪除這條回應嗎?',
             deleteTopic3: '確認刪除這條回應嗎?',
+            placeholder: '回應該主題',
         },
         },
         // 线上研習
         // 线上研習
         online: {
         online: {
@@ -4468,6 +4469,7 @@ const LANG_ZH_TW = {
             survey: "問卷",
             survey: "問卷",
             wrongTopic: "錯題本",
             wrongTopic: "錯題本",
             wrongTopic1: "精準練習",
             wrongTopic1: "精準練習",
+            wrongTopic2: "錯題庫",
             classInteraction: "課堂互動",
             classInteraction: "課堂互動",
             achievement: "我的成績",
             achievement: "我的成績",
             discussionBoard: '線上討論區',
             discussionBoard: '線上討論區',
@@ -5182,6 +5184,23 @@ const LANG_ZH_TW = {
                 button8: "改天再練,先離開",
                 button8: "改天再練,先離開",
                 title1: "當前題目已全部練習完成",
                 title1: "當前題目已全部練習完成",
             },
             },
+            today: '今日',
+            message1: '暫沒有錯題可以練習',
+            message2: '沒有讀取到題目內容,暫時無法練習,即將回到上一頁',
+            message3: '練習完成,即將回到上一頁',
+            sortOrder1: '正序',
+            sortOrder2: '倒序',
+            noData: '沒有更多資料',
+            headerTitle1: '智慧錯題練習',
+            headerTitle2: '當前題目',
+            question1: '主題幹',
+            modalTitle1: '重溫剛才的錯題',
+            modalTitle2: '退出練習',
+            modal1: '當前題目已全部完成並提交,練習結果如下',
+            modal2: '用時',
+            modal3: '本次練習中答錯和不會的題目共',
+            modal4: '題,請問想要重新復習一遍這些題目嗎? (僅做練習,不會進行記錄)',
+            modal5: '本次練習中沒有答錯和不會的題目,非常棒,可以結束練習了',
         },
         },
         informviewTitle: '通知總覽',
         informviewTitle: '通知總覽',
         view: '前往檢視',
         view: '前往檢視',

+ 1 - 1
TEAMModelOS/ClientApp/src/components/student-web/DiscussionBoard.vue

@@ -72,7 +72,7 @@
                             </div>
                             </div>
                             <!-- 回复框 -->
                             <!-- 回复框 -->
                             <div class="replyDisc" v-if="activeIn === index">
                             <div class="replyDisc" v-if="activeIn === index">
-                                <Input v-special-char v-model="replyDis" type="textarea" :maxlength="item.wordCount" :autosize="{ minRows: 2, maxRows: 5 }" placeholder="回复该话题"></Input>
+                                <Input v-special-char v-model="replyDis" type="textarea" :maxlength="item.wordCount" :autosize="{ minRows: 2, maxRows: 5 }" :placeholder="$t('jyzx.common.placeholder')"></Input>
                                 <div>
                                 <div>
                                     <Button type="primary" @click="replyTopic(item, index)">{{ $t('jyzx.common.reply') }}</Button>
                                     <Button type="primary" @click="replyTopic(item, index)">{{ $t('jyzx.common.reply') }}</Button>
                                 </div>
                                 </div>

+ 18 - 14
TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/AnswerBox.vue

@@ -10,10 +10,10 @@
             </div>
             </div>
             <p>
             <p>
                 <span v-show="!isExce">
                 <span v-show="!isExce">
-                    智慧错题练习:{{ executionTime.locttime }}
+                    {{ $t('studentWeb.wrongQues.headerTitle1') }}:{{ executionTime.locttime }}
                 </span>
                 </span>
                 <span style="margin-left: 15px;">
                 <span style="margin-left: 15px;">
-                    当前题目:{{ nowIndex + 1 }}/{{ quesContent.length }}
+                    {{ $t('studentWeb.wrongQues.headerTitle2') }}:{{ nowIndex + 1 }}/{{ quesContent.length }}
                 </span>
                 </span>
             </p>
             </p>
             <div>
             <div>
@@ -25,13 +25,13 @@
                         <Icon custom="iconfont icon-zitijiada"></Icon>
                         <Icon custom="iconfont icon-zitijiada"></Icon>
                     </span>
                     </span>
                 </div>
                 </div>
-                <Button class="top-button" style="background: #84ba48" @click="openWarmMessage(1)">结束</Button>
+                <Button class="top-button" style="background: #84ba48" @click="openWarmMessage(1)">{{ $t('courseManage.base.end') }}</Button>
             </div>
             </div>
         </div>
         </div>
         <template v-if="quesInfo">
         <template v-if="quesInfo">
             <div class="answer-content" v-if="practiceType != 2 && practiceType != 5" :style="{'font-size': fs + 'px'}">
             <div class="answer-content" v-if="practiceType != 2 && practiceType != 5" :style="{'font-size': fs + 'px'}">
                 <div v-if="quesInfo.pid" class="parent-box quertion-area">
                 <div v-if="quesInfo.pid" class="parent-box quertion-area">
-                    <p>【主题干】</p>
+                    <p>【{{ $t('studentWeb.wrongQues.question1') }}】</p>
                     <p v-html="quesInfo.parentInfo.question"></p>
                     <p v-html="quesInfo.parentInfo.question"></p>
                 </div>
                 </div>
                 <vuescroll>
                 <vuescroll>
@@ -121,12 +121,12 @@
                     <Button class="common-button rest-button" style="background: #c0c0c0" @click="openWarmMessage(1)">{{ $t("studentWeb.wrongQues.answer.button8") }}</Button>
                     <Button class="common-button rest-button" style="background: #c0c0c0" @click="openWarmMessage(1)">{{ $t("studentWeb.wrongQues.answer.button8") }}</Button>
                 </template>
                 </template>
             </div>
             </div>
-            <Modal v-model="isOkk" @on-ok="textAgain" @on-cancel="$router.go(-1)" :ok-text="statisticsObj.ids.length ? '重温刚才的错题' : ''" cancel-text="退出练习">
-                <p class="execution-res">当前习题已全部完成并提交,练习结果如下:</p>
-                <p class="execution-res">用时:{{ executionTime.locttime }}</p>
+            <Modal v-model="isOkk" @on-ok="textAgain" @on-cancel="$router.go(-1)" :ok-text="statisticsObj.ids.length ? $t('studentWeb.wrongQues.modalTitle1') : ''" :cancel-text="$t('studentWeb.wrongQues.modalTitle2')">
+                <p class="execution-res">{{ $t('studentWeb.wrongQues.modal1') }}:</p>
+                <p class="execution-res">{{ $t('studentWeb.wrongQues.modal2') }}:{{ executionTime.locttime }}</p>
                 <p class="execution-res">
                 <p class="execution-res">
-                    <span>答对:{{ statisticsObj.right }}</span>
-                    <span style="margin-left: 20px;">答错:{{ statisticsObj.wrong }}</span>
+                    <span>{{ $t('jyzx.offline.right') }}:{{ statisticsObj.right }}</span>
+                    <span style="margin-left: 20px;">{{ $t('jyzx.offline.error') }}:{{ statisticsObj.wrong }}</span>
                 </p>
                 </p>
                 <p class="execution-res">
                 <p class="execution-res">
                     <span style="color: #c2543f;">{{ $t("studentWeb.wrongQues.answer.button5") }}:{{ statisticsObj.confidenceLevel1 }}</span>
                     <span style="color: #c2543f;">{{ $t("studentWeb.wrongQues.answer.button5") }}:{{ statisticsObj.confidenceLevel1 }}</span>
@@ -134,8 +134,12 @@
                     <span style="margin-left: 20px; color: #b9c746;">{{ $t("studentWeb.wrongQues.answer.button3") }}:{{ statisticsObj.confidenceLevel3 }}</span>
                     <span style="margin-left: 20px; color: #b9c746;">{{ $t("studentWeb.wrongQues.answer.button3") }}:{{ statisticsObj.confidenceLevel3 }}</span>
                     <span style="margin-left: 20px; color: #84ba48;">{{ $t("studentWeb.wrongQues.answer.button2") }}:{{ statisticsObj.confidenceLevel4 }}</span>
                     <span style="margin-left: 20px; color: #84ba48;">{{ $t("studentWeb.wrongQues.answer.button2") }}:{{ statisticsObj.confidenceLevel4 }}</span>
                 </p>
                 </p>
-                <p class="execution-res" v-show="statisticsObj.ids.length">本次复习答错和不会的题目共{{ statisticsObj.ids.length }}题,请问想要重新复习一遍这些题目吗?(仅做练习,不会进行记录)</p>
-                <p class="execution-res" v-show="!statisticsObj.ids.length">本次复习没有答错和不会的题目,非常棒,可以退出练习了</p>
+                <p class="execution-res" v-show="statisticsObj.ids.length">
+                    {{ $t('studentWeb.wrongQues.modal3') }}{{ statisticsObj.ids.length }}{{ $t('studentWeb.wrongQues.modal4') }}
+                </p>
+                <p class="execution-res" v-show="!statisticsObj.ids.length">
+                    {{ $t('studentWeb.wrongQues.modal5') }}
+                </p>
             </Modal>
             </Modal>
         </template>
         </template>
     </div>
     </div>
@@ -324,7 +328,7 @@ export default {
                     }
                     }
                 }
                 }
                 if(index + 1 === this.qsAll.length && !this.quesContent.length) {
                 if(index + 1 === this.qsAll.length && !this.quesContent.length) {
-                    this.$Message.error("没有获取到题目内容,暂不可以练习,即将返回上一页")
+                    this.$Message.error(this.$t('studentWeb.wrongQues.message2'))
                     setTimeout(() => {
                     setTimeout(() => {
                         this.$router.go(-1)
                         this.$router.go(-1)
                     }, 2500)
                     }, 2500)
@@ -532,7 +536,7 @@ export default {
             // type: 0:下一步判断学习还是休息 1:学习 2:询问 3:作答 4:继续
             // type: 0:下一步判断学习还是休息 1:学习 2:询问 3:作答 4:继续
             if(this.isExce) {
             if(this.isExce) {
                 if(type != 4 && this.nowIndex + 1 === this.quesContent.length) {
                 if(type != 4 && this.nowIndex + 1 === this.quesContent.length) {
-                    this.$Message.success("练习完成,即将返回上一页")
+                    this.$Message.success(this.$t('studentWeb.wrongQues.message3'))
                     setTimeout(() => {
                     setTimeout(() => {
                         this.$router.go(-1)
                         this.$router.go(-1)
                     }, 2500)
                     }, 2500)
@@ -662,7 +666,7 @@ export default {
                         this.isExce = true
                         this.isExce = true
                         this.isOkk = true
                         this.isOkk = true
                     } else {
                     } else {
-                        this.$Message.error("保存失败");
+                        this.$Message.error(this.$t('auth.ctFmText19'));
                     }
                     }
                     this.isLoading = false
                     this.isLoading = false
                 })
                 })

+ 1 - 1
TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/Index.vue

@@ -34,7 +34,7 @@ export default {
                     this.MyName = this.$t('studentWeb.type.wrongTopic1');
                     this.MyName = this.$t('studentWeb.type.wrongTopic1');
                 } else if(n.name === 'AllQues') {
                 } else if(n.name === 'AllQues') {
                     this.MyNo = '13'
                     this.MyNo = '13'
-                    this.MyName = "错题库";
+                    this.MyName = this.$t('studentWeb.type.wrongTopic2');
                 }
                 }
                 this.$emit("onNavNo", this.MyNo);
                 this.$emit("onNavNo", this.MyNo);
                 this.$emit("onNavName", this.MyName);
                 this.$emit("onNavName", this.MyName);

+ 3 - 27
TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/QuesList.vue

@@ -23,8 +23,8 @@
                     <Option :value="1">{{ $t('studentWeb.wrongQues.practiceTime') }}</Option>
                     <Option :value="1">{{ $t('studentWeb.wrongQues.practiceTime') }}</Option>
                 </Select>
                 </Select>
                 <Select v-model="sortOrder" style="width: 20%" @on-change="filterChange">
                 <Select v-model="sortOrder" style="width: 20%" @on-change="filterChange">
-                    <Option :value="0">正序</Option>
-                    <Option :value="1">倒序</Option>
+                    <Option :value="0">{{ $t('studentWeb.wrongQues.sortOrder1') }}</Option>
+                    <Option :value="1">{{ $t('studentWeb.wrongQues.sortOrder2') }}</Option>
                 </Select>
                 </Select>
             </div>
             </div>
             <!-- <div>
             <!-- <div>
@@ -157,15 +157,12 @@ export default {
             MyNo: "8",
             MyNo: "8",
             MyName: "",
             MyName: "",
             isLoading: false,
             isLoading: false,
-            animal: "",
             filtSubject: 0,
             filtSubject: 0,
             filtType: 'all',
             filtType: 'all',
             filtCollect: -1, //是否收藏
             filtCollect: -1, //是否收藏
             subTitle: "", //搜索字
             subTitle: "", //搜索字
             filtTime: 0, //时间排序
             filtTime: 0, //时间排序
             sortOrder: 0, //倒序还是正序
             sortOrder: 0, //倒序还是正序
-            filtDiff: 0,
-            filtLevel: 0,
             subjectList: [], //学科
             subjectList: [], //学科
             typeList: [ //题型
             typeList: [ //题型
                 {
                 {
@@ -205,27 +202,6 @@ export default {
                     type: 'connector'
                     type: 'connector'
                 }, 
                 }, 
             ],
             ],
-            typeObj: {
-                all: this.$t("studentWeb.type.all"),
-                complete: this.$t("studentWeb.exam.queType.complete"),
-                compose: this.$t("studentWeb.exam.queType.compose"),
-                connector: this.$t("studentWeb.exam.queType.connector"),
-                correct: this.$t("studentWeb.exam.queType.correct"),
-                judge: this.$t("studentWeb.exam.queType.judge"),
-                multiple: this.$t("studentWeb.exam.queType.multiple"),
-                single: this.$t("studentWeb.exam.queType.single"),
-                subjective: this.$t("studentWeb.exam.queType.subjective"),
-            },
-            diffList: this.$GLOBAL.EXERCISE_DIFFS(), //难度
-            levelList: [ //层次
-                this.$t("studentWeb.type.all"),
-                this.$t("evaluation.level1"),
-                this.$t("evaluation.level2"),
-                this.$t("evaluation.level3"),
-                this.$t("evaluation.level4"),
-                this.$t("evaluation.level5"),
-                this.$t("evaluation.level6")
-            ],
             options: {
             options: {
                 disabledDate (date) {
                 disabledDate (date) {
                     return date && date.valueOf() > Date.now() - 86400000;
                     return date && date.valueOf() > Date.now() - 86400000;
@@ -454,7 +430,7 @@ export default {
                         this.getTopicList()
                         this.getTopicList()
                         // this.getRecordList()
                         // this.getRecordList()
                     } else {
                     } else {
-                        this.$Message.warning("没有更多数据")
+                        this.$Message.warning(this.$t('studentWeb.wrongTopic.noData'))
                     }
                     }
                     resolve()
                     resolve()
                 }, 2000);
                 }, 2000);

+ 3 - 3
TEAMModelOS/ClientApp/src/components/student-web/WrongQusetion/WrongQues.vue

@@ -23,7 +23,7 @@
             <div>
             <div>
                 <p class="count-text">{{ $t("studentWeb.wrongQues.summary5") }}</p>
                 <p class="count-text">{{ $t("studentWeb.wrongQues.summary5") }}</p>
                 <p class="count-text-foot count-num count-num-4" v-if="lastTime.day === '-'">-</p>
                 <p class="count-text-foot count-num count-num-4" v-if="lastTime.day === '-'">-</p>
-                <p class="count-text-foot count-num count-num-4" v-else-if="lastTime.day < 0">{{ '今日' }}</p>
+                <p class="count-text-foot count-num count-num-4" v-else-if="lastTime.day < 0">{{ $t("studentWeb.wrongQues.today") }}</p>
                 <p class="count-text-foot" v-else>
                 <p class="count-text-foot" v-else>
                     <span class="count-num count-num-4">{{ lastTime.day }}</span>
                     <span class="count-num count-num-4">{{ lastTime.day }}</span>
                     {{ $t("studentWeb.wrongQues.day1") }}
                     {{ $t("studentWeb.wrongQues.day1") }}
@@ -33,7 +33,7 @@
             <div>
             <div>
                 <p class="count-text">{{ $t("studentWeb.wrongQues.summary6") }}</p>
                 <p class="count-text">{{ $t("studentWeb.wrongQues.summary6") }}</p>
                 <p class="count-text-foot count-num count-num-4" v-if="nextTime.day === '-'">-</p>
                 <p class="count-text-foot count-num count-num-4" v-if="nextTime.day === '-'">-</p>
-                <p class="count-text-foot count-num count-num-4" v-else-if="nextTime.day < 0">{{ '今日' }}</p>
+                <p class="count-text-foot count-num count-num-4" v-else-if="nextTime.day < 0">{{ $t("studentWeb.wrongQues.today") }}</p>
                 <p class="count-text-foot" v-else>
                 <p class="count-text-foot" v-else>
                     <span class="count-num count-num-4">{{ nextTime.day }}</span>
                     <span class="count-num count-num-4">{{ nextTime.day }}</span>
                     {{ $t("studentWeb.wrongQues.day2") }}
                     {{ $t("studentWeb.wrongQues.day2") }}
@@ -190,7 +190,7 @@ export default {
                         }
                         }
                     } else {
                     } else {
                         if(!res.data.length) {
                         if(!res.data.length) {
-                            this.$Message.warning("暂没有错题可以练习")
+                            this.$Message.warning($t("studentWeb.wrongQues.message1"))
                         } else {
                         } else {
                             let record = res.data
                             let record = res.data
                             // "Q_s":题目状态,可以此数值排序,数值越小应越早练习
                             // "Q_s":题目状态,可以此数值排序,数值越小应越早练习

+ 1 - 1
TEAMModelOS/ClientApp/src/view/mycourse/discussion/Discussion.vue

@@ -66,7 +66,7 @@
                             </div>
                             </div>
                             <!-- 回复框 -->
                             <!-- 回复框 -->
                             <div class="replyDisc" v-if="activeIn === index">
                             <div class="replyDisc" v-if="activeIn === index">
-                                <Input v-special-char v-model="replyDis" type="textarea" :maxlength="item.wordCount" :autosize="{ minRows: 2, maxRows: 5 }" placeholder="回复该话题"></Input>
+                                <Input v-special-char v-model="replyDis" type="textarea" :maxlength="item.wordCount" :autosize="{ minRows: 2, maxRows: 5 }" :placeholder="$t('jyzx.common.placeholder')"></Input>
                                 <div>
                                 <div>
                                     <Button type="primary" @click="replyTopic(item, index)">{{ $t('jyzx.common.reply') }}</Button>
                                     <Button type="primary" @click="replyTopic(item, index)">{{ $t('jyzx.common.reply') }}</Button>
                                 </div>
                                 </div>

+ 30 - 18
TEAMModelOS/Controllers/Both/CourseBaseController.cs

@@ -924,7 +924,8 @@ namespace TEAMModelOS.Controllers.Both
                                 courseBases.Add(item);
                                 courseBases.Add(item);
                             }
                             }
                             HashSet<CourseCheckImport> courseInvalidImports = new HashSet<CourseCheckImport>();
                             HashSet<CourseCheckImport> courseInvalidImports = new HashSet<CourseCheckImport>();
-                            var nameInvalidImports = courseCheckImports.ExceptBy(courseBases.Select(x => x.name),z=>z.name);
+                            HashSet<CourseCheckImport> courseVerifiedImports = new HashSet<CourseCheckImport>();
+                            var nameInvalidImports = courseCheckImports.Where(z=>! courseBases.Select(x => x.name).Contains(z.name));
                             //保留课程名称存在的排课信息
                             //保留课程名称存在的排课信息
                             if (nameInvalidImports != null && nameInvalidImports.Any())
                             if (nameInvalidImports != null && nameInvalidImports.Any())
                             {
                             {
@@ -937,10 +938,10 @@ namespace TEAMModelOS.Controllers.Both
                             }
                             }
                             //2.检查导入的醍摩豆教师ID是否有效
                             //2.检查导入的醍摩豆教师ID是否有效
                             StringBuilder sqlTmdid = new StringBuilder(" select  c.id,c.name ,c.code ,c.picture from c ");
                             StringBuilder sqlTmdid = new StringBuilder(" select  c.id,c.name ,c.code ,c.picture from c ");
-                            sqlTmdid.Append($" where c.id in({string.Join(",", courseCheckImports.Select(z => $"'{z.tmdid}'"))})    ");
+                            //sqlTmdid.Append($" where c.id in({string.Join(",", courseCheckImports.Select(z => $"'{z.tmdid}'"))})    ");
                             List<IdNameCode> teachers = new List<IdNameCode>();
                             List<IdNameCode> teachers = new List<IdNameCode>();
-                            await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Teacher)
-                            .GetItemQueryIterator<IdNameCode>(queryText: sqlTmdid.ToString(), requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey("Base") }))
+                            await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School)
+                            .GetItemQueryIterator<IdNameCode>(queryText: sqlTmdid.ToString(), requestOptions: new QueryRequestOptions { PartitionKey = new PartitionKey($"Teacher-{school}") }))
                             {
                             {
                                 teachers.Add(item);
                                 teachers.Add(item);
                             }
                             }
@@ -1203,20 +1204,19 @@ namespace TEAMModelOS.Controllers.Both
                                     groupId=groupList?.id;
                                     groupId=groupList?.id;
                                 }
                                 }
                                 //检查助教是否存在
                                 //检查助教是否存在
-                                string[] assistants = null;
+                                string[] assistants = new string[] { };
                                 if (!string.IsNullOrWhiteSpace(item.assistants)) {
                                 if (!string.IsNullOrWhiteSpace(item.assistants)) {
-                                    Regex.Split(item.assistants, "\\.|\\.|\\、|\\:|\\:|\\,|\\,|\\;|\\;");
-                                }
-                                var invalidAssistants = assistants.Except(teachers.Select(x => x.id));
-                                if (invalidAssistants != null && invalidAssistants.Any())
-                                {
-                                    item.invalidCode = 21;
-                                    item.invalidMsg = $"{string.Join(",", invalidAssistants)}";
-                                    courseInvalidImports.Add(item);
-                                    continue;
+                                    assistants = Regex.Split(item.assistants, "\\.|\\.|\\、|\\:|\\:|\\,|\\,|\\;|\\;");
+                                    var invalidAssistants = assistants.Except(teachers.Select(x => x.id));
+                                    if (invalidAssistants != null && invalidAssistants.Any())
+                                    {
+                                        item.invalidCode = 21;
+                                        item.invalidMsg = $"{string.Join(",", invalidAssistants)}";
+                                        courseInvalidImports.Add(item);
+                                        continue;
+                                    }
                                 }
                                 }
 
 
-
                                 Room room = rooms.Find(z =>!string.IsNullOrWhiteSpace(item.roomNo) &&  z.no.Equals(item.roomNo));
                                 Room room = rooms.Find(z =>!string.IsNullOrWhiteSpace(item.roomNo) &&  z.no.Equals(item.roomNo));
                                 string roomId= room?.id;
                                 string roomId= room?.id;
                                 string teacherId = teachers.Find(z => z.id.Equals(item.tmdid))?.id;
                                 string teacherId = teachers.Find(z => z.id.Equals(item.tmdid))?.id;
@@ -1252,6 +1252,7 @@ namespace TEAMModelOS.Controllers.Both
                                                 teacherId=teacherId,
                                                 teacherId=teacherId,
                                                 times = scheduleTime!=null ? new List<ScheduleTime> { scheduleTime }: new List<ScheduleTime> {  },
                                                 times = scheduleTime!=null ? new List<ScheduleTime> { scheduleTime }: new List<ScheduleTime> {  },
                                                 school=school,
                                                 school=school,
+                                               assistants=assistants.ToHashSet(),
                                            }
                                            }
                                         }
                                         }
                                     };
                                     };
@@ -1301,16 +1302,27 @@ namespace TEAMModelOS.Controllers.Both
                                             teacherId = teacherId,
                                             teacherId = teacherId,
                                             times = scheduleTime != null ? new List<ScheduleTime> { scheduleTime } : new List<ScheduleTime> { },
                                             times = scheduleTime != null ? new List<ScheduleTime> { scheduleTime } : new List<ScheduleTime> { },
                                             school = school,
                                             school = school,
+                                            assistants= assistants != null ? assistants.ToHashSet() : scheduleTask.assistants
                                         };
                                         };
                                         courseTask.schedules.Add(scheduleTask);
                                         courseTask.schedules.Add(scheduleTask);
                                     }
                                     }
+                                    courseTasks.Add(courseTask);
                                 }
                                 }
+                                item.invalidCode = 0;
+                                courseVerifiedImports.Add(item);
                                 checkedCount++;
                                 checkedCount++;
                             }
                             }
                             //生成检查结果token,有效期5分钟
                             //生成检查结果token,有效期5分钟
-                            string checkToken=$"CourseTask:CheckToken:{scope}:{school}:{Guid.NewGuid()}" ;
-                            await _azureRedis.GetRedisClient(8).StringSetAsync(checkToken, courseTasks.ToJsonString(),expiry:new TimeSpan(0,5,0));
-                            return Ok(new { courseCheckedImports = courseTasks , checkedCount, invalidCount= courseInvalidImports.Count, courseInvalidImports, checkToken });
+
+                            if (courseTasks != null && courseTasks.Count > 0)
+                            {
+                                string checkToken = $"CourseTask:CheckToken:{scope}:{school}:{Guid.NewGuid()}";
+                                await _azureRedis.GetRedisClient(8).StringSetAsync(checkToken, courseTasks.ToJsonString(), expiry: new TimeSpan(0, 5, 0));
+                                return Ok(new { courseCheckedImports = courseTasks, checkedCount, invalidCount = courseInvalidImports.Count, courseVerifiedImports, courseInvalidImports, checkToken });
+                            }
+                            else {
+                                return Ok(new { courseCheckedImports = courseTasks, checkedCount, invalidCount = courseInvalidImports.Count, courseVerifiedImports, courseInvalidImports, checkToken=string.Empty });
+                            }
                         }
                         }
                     case bool when $"{grant_type}".Equals("import-task", StringComparison.OrdinalIgnoreCase) && $"{scope}".Equals("school", StringComparison.OrdinalIgnoreCase):
                     case bool when $"{grant_type}".Equals("import-task", StringComparison.OrdinalIgnoreCase) && $"{scope}".Equals("school", StringComparison.OrdinalIgnoreCase):
                         {
                         {

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

@@ -322,7 +322,7 @@ namespace TEAMModelOS.Controllers
                     }
                     }
                     if (types.IsEmpty() || types.Contains("class"))
                     if (types.IsEmpty() || types.Contains("class"))
                     {
                     {
-                        StringBuilder classsql = new StringBuilder($"SELECT c.id,c.name,c.periodId ,c.year  FROM c where  ( c.graduate = 0 or  IS_DEFINED(c.graduate) = false )");
+                        StringBuilder classsql = new StringBuilder($"SELECT c.id,c.name,c.periodId ,c.year,c.no  FROM c where  ( c.graduate = 0 or  IS_DEFINED(c.graduate) = false )");
                         if (!string.IsNullOrEmpty($"{periodId}"))
                         if (!string.IsNullOrEmpty($"{periodId}"))
                         {
                         {
                             classsql.Append($" and  c.periodId='{periodId}' ");
                             classsql.Append($" and  c.periodId='{periodId}' ");

+ 142 - 0
TEAMModelOS/Controllers/Student/OverallEducationController.cs

@@ -182,9 +182,151 @@ namespace TEAMModelOS.Controllers
                 dataCount = overallEducations.Count();
                 dataCount = overallEducations.Count();
                 //pr计算  100 - (100 * (index + 1) - 50) / stuCount;  index  整体排名  stuCount 总人数
                 //pr计算  100 - (100 * (index + 1) - 50) / stuCount;  index  整体排名  stuCount 总人数
             }
             }
+            double basic_Score = 60;
+            if (schoolSetting?.overallEducationSetting?.overallEducationInit!=null && schoolSetting?.overallEducationSetting?.overallEducationInit >= 0) {
+                basic_Score = schoolSetting.overallEducationSetting.overallEducationInit;
+            }
+            var hasData_labour = grade_overallEducations.Where(x => x.labour.Count > 0);
+            double max_labour = 0;
+            double min_labour = 0;
+            if (schoolSetting.overallEducationSetting.labour.Equals("sum"))
+            {
+                var data = hasData_labour.Select(x => new { score = x.labour.Sum(x => x.sumScore) , studentId = x.studentId });
+                max_labour = data.Max(z => z.score);
+                min_labour = data.Min(z => z.score);
+            }
+            var hasData_virtue = grade_overallEducations.Where(x => x.virtue.Count > 0);
+            double max_virtue = 0;
+            double min_virtue = 0;
+
+             if (schoolSetting.overallEducationSetting.virtue.Equals("sum"))
+            {
+                var data = hasData_virtue.Select(x =>new { score = x.virtue.Sum(x => x.sumScore) , studentId = x.studentId });
+                max_virtue = data.Max(z => z.score);
+                min_virtue = data.Min(z => z.score);
+            }
+            var hasData_lesson = grade_overallEducations.Where(x => x.lessonScore.Count > 0);
+            double max_lesson_gscore = 0;
+            double max_lesson_pscore = 0;
+            double max_lesson_tscore = 0;
+
+            double min_lesson_gscore = 0;
+            double min_lesson_pscore = 0;
+            double min_lesson_tscore = 0;
+            if (schoolSetting.overallEducationSetting.art.Equals("sum"))
+            {
+                var gdata = hasData_lesson.Select(x => new { score = x.lessonScore.Sum(x => x.gscore), studentId = x.studentId });
+                max_lesson_gscore = gdata.Max(z => z.score);
+                min_lesson_gscore = gdata.Min(z => z.score);
+                var pdata = hasData_lesson.Select(x => new { score = x.lessonScore.Sum(x => x.pscore), studentId = x.studentId });
+                max_lesson_pscore = pdata.Max(z => z.score);
+                min_lesson_pscore = pdata.Min(z => z.score);
+                var tdata = hasData_lesson.Select(x => new { score = x.lessonScore.Sum(x => x.tscore), studentId = x.studentId });
+                max_lesson_tscore = tdata.Max(z => z.score);
+                min_lesson_tscore = tdata.Min(z => z.score);
+            }
+            foreach (var item in overallEducations) {
+                DimensionScore dimensionScore = new DimensionScore() { studentId=item.semesterId,classId=item.classId};
+                if (item.sports.IsNotEmpty())
+                {  //体育
+                    if (schoolSetting.overallEducationSetting.sports.Equals("avg"))
+                    {
+                        double sumScore = item.sports.Average(x => x.sumScore);
+                        double totalScore = item.sports.Average(x => x.totalScore);
+                        if (totalScore > 0)
+                        {
+                            dimensionScore.sports = sumScore * 1.0 / totalScore;
+                        }
+                        else {
+                            dimensionScore.sports = sumScore * 1.0 / item.sports.Count;
+                        }
+                    }
+                    else if (schoolSetting.overallEducationSetting.sports.Equals("newest"))
+                    {
+                        double sumScore = item.sports.OrderByDescending(x => x.examDate).First().sumScore;
+                        double totalScore = item.sports.OrderByDescending(x => x.examDate).First().totalScore;
+                        if (totalScore > 0)
+                        {
+                            dimensionScore.sports = sumScore * 1.0 / totalScore;
+                        }
+                        else
+                        {
+                            dimensionScore.sports = sumScore * 1.0 / item.sports.Count;
+                        }
+                    }
+                    else if (schoolSetting.overallEducationSetting.sports.Equals("sum"))
+                    {
+                        double sumScore = item.sports.Sum(x => x.sumScore);
+                        double totalScore = item.sports.Sum(x => x.totalScore);
+                        if (totalScore > 0)
+                        {
+                            dimensionScore.sports = sumScore * 1.0 / totalScore;
+                        }
+                        else
+                        {
+                            dimensionScore.sports = sumScore * 1.0 / item.sports.Count;
+                        }
+                    }
+                }
+                else {
+                    dimensionScore.sports = basic_Score;
+                }
+
+                if (item.intelligence.IsNotEmpty())
+                {
+                    //智育
+                    if (schoolSetting.overallEducationSetting.intelligence.Equals("avg"))
+                    {
+                        double sumScore = item.sports.Average(x => x.sumScore);
+                        double totalScore = item.sports.Average(x => x.totalScore);
+                    }
+                    else if (schoolSetting.overallEducationSetting.intelligence.Equals("newest"))
+                    {
 
 
+                    }
+                    else if (schoolSetting.overallEducationSetting.intelligence.Equals("sum"))
+                    {
+                    }
+                }
+                else {
+                    dimensionScore.intelligence = basic_Score;
+                }
+                if (item.art.IsNotEmpty()) {
+                    //艺术
+                    if (schoolSetting.overallEducationSetting.art.Equals("avg"))
+                    {
+
+                    }
+                    else if (schoolSetting.overallEducationSetting.art.Equals("newest"))
+                    {
+                    }
+                    else if (schoolSetting.overallEducationSetting.art.Equals("sum"))
+                    {
+
+                    }
+                }
+                else
+                {
+                    dimensionScore.art = basic_Score;
+                }
+            }
             return Ok();
             return Ok();
         }
         }
+        //排名指数计算=( 当前值分数- 298) / (9992 - 298) * (99 - 60) + 60
+        //将每个人的积分转化为60-100
+        //排名 = (积分 - 最低积分) / (最高积分 - 最低积分) * (最大排名 - 最小排名) + 最小排名
+        public class DimensionScore
+        {
+            public string classId { get; set; }
+            public string studentId { get; set; }
+            public double score { get; set; }
+            public double sports { get; set; }
+            public double art { get; set; }
+            public double labour { get; set; }
+            public double intelligence { get; set; }
+            public double virtue { get; set; }
+            public double lesson { get; set; }
+        }
 
 
         /*
         /*