浏览代码

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

CrazyIter_Bin 1 年之前
父节点
当前提交
32bbeb3a07

+ 15 - 10
TEAMModelOS.FunctionV4/CosmosDB/TriggerExam.cs

@@ -106,7 +106,11 @@ namespace TEAMModelOS.FunctionV4
                     List<ChangeRecord> records = await table.FindListByDict<ChangeRecord>(new Dictionary<string, object>() { { "RowKey", data.id }, { "PartitionKey", PartitionKey } });
                     //处理科目信息
                     List<string> sub = new List<string>();
-                    School sc = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>(info.school, new Azure.Cosmos.PartitionKey("Base"));
+                    School sc = new();
+                    if (!string.IsNullOrEmpty(info.school)) {
+                        sc = await client.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>(info.school, new Azure.Cosmos.PartitionKey("Base"));
+                    }
+                    
                     foreach (ExamSubject subject in info.subjects)
                     {
                         sub.Add(subject.id);
@@ -358,7 +362,7 @@ namespace TEAMModelOS.FunctionV4
                                     {
                                         newStatus = 1;
                                     }
-                                    Settlement settlement = await getMore(client, info, examClassResults);
+                                    Settlement settlement = await getMore(client, info);
                                     long nowTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
                                     //判断评分状态是否发生变化,便于实时的更新评测基本信息
                                     if (info.average != settlement.score || info.sStatus != newStatus)
@@ -417,19 +421,20 @@ namespace TEAMModelOS.FunctionV4
                                 //用来判定是否完成评分
                                 //bool isScore = true;
                                 await resultStatus(client, examClassResults);
-                                Settlement settlement = await getMore(client, info, examClassResults);
-                                var isScore = examClassResults.SelectMany(e => e.studentScores).ToList().Exists(c => c.Contains(-1));
-                                int newStatus = 0;
-                                if (!isScore)
-                                {
-                                    newStatus = 1;
-                                }
+                                
                                 await Activity(_coreAPIHttpService, info, classes, client, _dingDing, sub, examClassResults);
                                 foreach (ExamSubject subject in info.subjects)
                                 {
                                     await createClassResultAsync(info, examClassResults, subject, fno, _azureCosmos, _dingDing, _azureStorage, _httpClient, _configuration);
                                     fno++;
                                 }
+                                Settlement settlement = await getMore(client, info);
+                                var isScore = examClassResults.SelectMany(e => e.studentScores).ToList().Exists(c => c.Contains(-1));
+                                int newStatus = 0;
+                                if (!isScore)
+                                {
+                                    newStatus = 1;
+                                }
                                 //判断均分是否发生变化,便于实时的更新评测基本信息
                                 if (info.sRate != settlement.rate || info.average != settlement.score || info.sStatus != newStatus || info.qRate != settlement.qrate)
                                 {
@@ -637,7 +642,7 @@ namespace TEAMModelOS.FunctionV4
             }
             await Task.WhenAll(tasks);
         }
-        public static async Task<Settlement> getMore(CosmosClient client, ExamInfo info, List<ExamClassResult> examClassResults)
+        public static async Task<Settlement> getMore(CosmosClient client, ExamInfo info)
         {
             //计算单次考试简易统计信息
             Settlement settlement = new();

+ 2 - 0
TEAMModelOS.SDK/Models/Cosmos/School/ExamInfo.cs

@@ -143,6 +143,8 @@ namespace TEAMModelOS.SDK.Models
     public class PaperSimple { 
         public string id { get; set; }
         public string code { get; set; }
+        //标记试卷来源学段
+        public string periodId { get; set; }
         public string name { get; set; }
         public string blob { get; set; }
         public string scope { get; set; }

+ 1 - 1
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -4096,7 +4096,7 @@ const LANG_EN_US = {
         joinTip1: 'Thank you for choosing your school',
         joinTip2: 'After applying, your school name will be displayed the next time you log in!',
         joinTip3: 'Note: The application must be reviewed by the administrator of the school you are applying to before you can officially access the resources provided by the school.',
-        quitTip: '请先移交管理员再退出学校!',
+        quitTip: 'Please hand off the administration role before quitting the school! ',
         submitSucTips: 'Submitted successfully',
         submitFailTips: 'Failed to operate',
         joinSucTips: 'Join successfully!',

+ 1 - 1
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -4097,7 +4097,7 @@ const LANG_ZH_TW = {
         joinTip1: '感謝您選擇所屬學校',
         joinTip2: '按下申請後,下次登入就會顯示您的學校名稱!',
         joinTip3: '注意:加入申請需經過您申請學校的管理員覆核之後,才能正式取得學校所提供的資源。',
-        quitTip: '请先移交管理员再退出学校!',
+        quitTip: '請先移交管理權再退出學校!',
         submitSucTips: '提交成功',
         submitFailTips: '操作失敗',
         joinSucTips: '加入成功!',

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

@@ -622,6 +622,7 @@ export default {
     schoolMenu() {
       let data = !this.$store.state.userInfo.schoolPay
         ? [
+            // 教学看板(国际站单独)
             {
               icon: "iconfont icon-data-count",
               name: this.$t("system.menu.techDash"),
@@ -633,7 +634,6 @@ export default {
               child: [],
               isShow: this.isGlobalSite,
             },
-            //iot
             {
               icon: "iconfont icon-wulianwang",
               name: 'iot数据看板',
@@ -645,7 +645,7 @@ export default {
               child: [],
               isShow: this.isGlobalSite,
             },
-            //学校管理
+            // 学校管理
             {
               icon: "iconfont icon-school",
               name: this.$t("system.menu.schoolMgt"),
@@ -869,7 +869,7 @@ export default {
                 },
               ],
             },
-            // 课例中心
+            // 课例中心(国际站单独)
             {
               icon: "iconfont icon-research-center",
               name: this.$t("system.menu.research"),
@@ -994,7 +994,7 @@ export default {
                 },
               ],
             },
-            //艺术评测
+            // 艺术评测
             {
               icon: "iconfont icon-yishu",
               name: this.$t("area.base.artData"),
@@ -1050,7 +1050,7 @@ export default {
               role: "admin",
               permission: "",
               subName: "StuDashboard",
-              isShow: this.IES5Menu && this.edition !== "basic",
+              isShow: this.IES5Menu && !this.isGlobalSite && this.edition !== "basic",
               child: [
                 {
                   icon: "iconfont icon-data-count",
@@ -1102,7 +1102,7 @@ export default {
               role: "admin",
               permission: "",
               subName: "TeacherDashboard",
-              isShow: this.IES5Menu,
+              isShow: this.IES5Menu && !this.isGlobalSite,
               child: [
                 {
                   icon: "iconfont icon-data-count",
@@ -1141,7 +1141,7 @@ export default {
                 },
               ],
             },
-            // 学情分析
+            // 学情分析(国际站单独)
             {
               icon: "iconfont icon-xueqing",
               name: this.$t("system.menu.evAna"),

文件差异内容过多而无法显示
+ 494 - 501
TEAMModelOS/ClientApp/src/view/coursemgt/NewCusMgt.vue


+ 10 - 1
TEAMModelOS/ClientApp/src/view/coursemgt/components/MemberTable.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="member-table-container">
-    <Table :columns="columns" :data="data" height="750">
+    <Table :columns="columns" :data="data" height="750" :loading="tableLoading">
       <template slot-scope="{ row, index }" slot="header">
         <PersonalPhoto :name="row.name" :picture="row.picture"></PersonalPhoto>
       </template>
@@ -16,6 +16,7 @@ export default {
   },
   data() {
     return {
+      tableLoading:false,
       columns: [
         {
           slot: "header",
@@ -70,5 +71,13 @@ export default {
     console.log(this.members);
     this.data = this.members;
   },
+  watch: {
+    members: {
+      immediate:true,
+      handler(n, o) {
+        this.data = this.members
+      },
+    },
+  },
 };
 </script>

+ 14 - 4
TEAMModelOS/Controllers/Analysis/ArtAnalysisController.cs

@@ -154,14 +154,24 @@ namespace TEAMModelOS.Controllers.Analysis
                 //var examId = arts[0].settings.SelectMany(s => s.task).Where(a => a.type == 1 && a.subject.Equals(subjectId.GetString())).FirstOrDefault().acId;
                 //根据科目标识获取科目ID以及知识块和知识点关系TODO 引用不同试卷时 获取知识点得差异
                 int index = 0;
-                foreach (var pr in info.subjects) {
+                foreach (var pr in info.subjects)
+                {
                     if (pr.id.Equals(subjectId.GetString()))
                     {
                         break;
                     }
                     index++;
                 }
-                (string subId, List<(string name, List<string> kno)> values) = await getKnowledge(info.papers[index].code, client, subjectId.GetString(), info.period.id);
+                List<(string name, List<string> kno)> knos = new();
+                if (string.IsNullOrEmpty(info.papers[index].periodId))
+                {
+                    (string subId, List<(string name, List<string> kno)> values) = await getKnowledge("hbcn", client, subjectId.GetString(), "be32942d-97a9-52ba-45d6-2e5b722583f5");
+                    knos = values;
+                }
+                else {
+                    (string subId, List<(string name, List<string> kno)> values) = await getKnowledge(info.papers[index].code, client, subjectId.GetString(), info.papers[index].periodId);
+                    knos = values;
+                }                             
                 var query = $"select c.id,c.name,c.subjectId,c.studentScores,c.studentIds,c.paper,c.classes,c.sRate,c.average,c.standard,c.lostStus,c.record,c.phc,c.plc from c where c.examId = '{examId}' and c.subjectId = '{subjectId}' ";
                 await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Common").GetItemQueryIterator<ExamResult>(queryText: query, requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"ExamResult-{examId}") }))
                 {
@@ -172,7 +182,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 KeyValuePair<string, List<(string id, double sta, double pass, string stu)>> key = DoSubjectScatter(examResults[0]);
                 pointPersent.Add(key3);
                 List<(string name, double score)> blockScore = new();
-                foreach (var block in values)
+                foreach (var block in knos)
                 {
                     double sc = 0;
                     foreach (var no in pointPersent)
@@ -198,7 +208,7 @@ namespace TEAMModelOS.Controllers.Analysis
                 {
                     x.name,
                     x.score,
-                    block = values.Where(v => null != v.kno && v.kno.Contains(x.name)).Select(x => x.name)
+                    block = knos.Where(v => null != v.kno && v.kno.Contains(x.name)).Select(x => x.name)
                 });
                 //学生信息
                 var students = stus.Select(s => new