瀏覽代碼

Merge branch 'develop3.0-tmd' of http://106.12.23.251:10080/TEAMMODEL/TEAMModelOS into develop3.0-tmd

liqk 4 年之前
父節點
當前提交
63f9e43fac

+ 5 - 1
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseImport.vue

@@ -16,7 +16,9 @@
                         <Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
                         <Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
                         <p style="font-size:18px;font-weight:bold;">导入注意事项</p>
                         <p style="font-size:18px;font-weight:bold;">导入注意事项</p>
                         <p>1.暂时只支持".docx"格式的文件导入,文件大小不超过10M,请按照<a href="https://teammodelstorage.blob.core.chinacloudapi.cn/hiteachcc/pptfiles/20190806/%E9%A2%98%E7%9B%AE%E6%A8%A1%E6%9D%BF.docx">模板</a>格式导入</p>
                         <p>1.暂时只支持".docx"格式的文件导入,文件大小不超过10M,请按照<a href="https://teammodelstorage.blob.core.chinacloudapi.cn/hiteachcc/pptfiles/20190806/%E9%A2%98%E7%9B%AE%E6%A8%A1%E6%9D%BF.docx">模板</a>格式导入</p>
-                        <p>2.导入题型暂时只支持单选、多选、判断、填空、问答题型</p>
+                        <p>2.导入题型暂时只支持单选、多选、判断、填空、问答以及综合题型</p>
+                        <p>3.{{ `请保持模板语言与当前浏览器语言(${ curLang })   一致` }}</p>
+                        <p>4.更多注意事项请查看<a href="https://teammodelstorage.blob.core.chinacloudapi.cn/hiteachcc/pptfiles/20190806/%E9%A2%98%E7%9B%AE%E6%A8%A1%E6%9D%BF.docx">模板制作详情说明</a></p>
                     </div>
                     </div>
 
 
                     <div v-show="isSelectFinish" class="import-loading-wrap">
                     <div v-show="isSelectFinish" class="import-loading-wrap">
@@ -90,6 +92,7 @@
         props: ['period', 'subject'],
         props: ['period', 'subject'],
         data() {
         data() {
             return {
             return {
+				curLang:'',
                 isBtnLoading: false,
                 isBtnLoading: false,
                 isSelectFinish: false,
                 isSelectFinish: false,
                 importLoading: false,
                 importLoading: false,
@@ -111,6 +114,7 @@
         },
         },
         created() {
         created() {
             this.uploadUrl = window.location.origin  + '/api/ImportExercise/uploadWord'
             this.uploadUrl = window.location.origin  + '/api/ImportExercise/uploadWord'
+			this.curLang = localStorage.getItem('local')
         },
         },
         methods: {
         methods: {
 
 

+ 50 - 50
TEAMModelOS/JsonFile/Core/LangConfig.json

@@ -5,19 +5,19 @@
     "Alias": "简体中文",
     "Alias": "简体中文",
     "Item": {
     "Item": {
       "Type": {
       "Type": {
-        "Compose": "综合题",
-        "Single": "单选题",
-        "Multiple": "多选题",
-        "Judge": "判断题",
-        "Complete": "填空题",
-        "Subjective": "问答题"
+        "compose": "综合题",
+        "single": "单选题",
+        "multiple": "多选题",
+        "judge": "判断题",
+        "complete": "填空题",
+        "subjective": "问答题"
       },
       },
       "AnswerTag": "答案",
       "AnswerTag": "答案",
       "AnalysisTag": "解析",
       "AnalysisTag": "解析",
       "EndedTag": "结束",
       "EndedTag": "结束",
       "Options": "ABCDEFGHIJKLMN",
       "Options": "ABCDEFGHIJKLMN",
-      "Start": "[",
-      "End": "]"
+      "Start": "{",
+      "End": "}"
     }
     }
   },
   },
   {
   {
@@ -26,19 +26,19 @@
     "Alias": "繁體中文",
     "Alias": "繁體中文",
     "Item": {
     "Item": {
       "Type": {
       "Type": {
-        "Compose": "綜合題",
-        "Single": "單選題",
-        "Multiple": "多選題",
-        "Judge": "判斷題",
-        "Complete": "填空題",
-        "Subjective": "問答題"
+        "compose": "綜合題",
+        "single": "單選題",
+        "multiple": "多選題",
+        "judge": "判斷題",
+        "complete": "填空題",
+        "subjective": "問答題"
       },
       },
       "AnswerTag": "答案",
       "AnswerTag": "答案",
       "AnalysisTag": "解析",
       "AnalysisTag": "解析",
       "EndedTag": "結束",
       "EndedTag": "結束",
       "Options": "ABCDEFGHIJKLMN",
       "Options": "ABCDEFGHIJKLMN",
-      "Start": "[",
-      "End": "]"
+      "Start": "{",
+      "End": "}"
     }
     }
   },
   },
   {
   {
@@ -47,19 +47,19 @@
     "Alias": "繁體中文",
     "Alias": "繁體中文",
     "Item": {
     "Item": {
       "Type": {
       "Type": {
-        "Compose": "綜合題",
-        "Single": "單選題",
-        "Multiple": "多選題",
-        "Judge": "判斷題",
-        "Complete": "填空題",
-        "Subjective": "問答題"
+        "compose": "綜合題",
+        "single": "單選題",
+        "multiple": "多選題",
+        "judge": "判斷題",
+        "complete": "填空題",
+        "subjective": "問答題"
       },
       },
       "AnswerTag": "答案",
       "AnswerTag": "答案",
       "AnalysisTag": "解析",
       "AnalysisTag": "解析",
       "EndedTag": "結束",
       "EndedTag": "結束",
       "Options": "ABCDEFGHIJKLMN",
       "Options": "ABCDEFGHIJKLMN",
-      "Start": "[",
-      "End": "]"
+      "Start": "{",
+      "End": "}"
     }
     }
   },
   },
   {
   {
@@ -68,19 +68,19 @@
     "Alias": "繁體中文",
     "Alias": "繁體中文",
     "Item": {
     "Item": {
       "Type": {
       "Type": {
-        "Compose": "綜合題",
-        "Single": "單選題",
-        "Multiple": "多選題",
-        "Judge": "判斷題",
-        "Complete": "填空題",
-        "Subjective": "問答題"
+        "compose": "綜合題",
+        "single": "選擇題",
+        "multiple": "複選題",
+        "judge": "是非題",
+        "complete": "填空題",
+        "subjective": "問答題"
       },
       },
       "AnswerTag": "答案",
       "AnswerTag": "答案",
       "AnalysisTag": "解析",
       "AnalysisTag": "解析",
       "EndedTag": "結束",
       "EndedTag": "結束",
       "Options": "ABCDEFGHIJKLMN",
       "Options": "ABCDEFGHIJKLMN",
-      "Start": "[",
-      "End": "]"
+      "Start": "{",
+      "End": "}"
     }
     }
   },
   },
   {
   {
@@ -89,19 +89,19 @@
     "Alias": "English",
     "Alias": "English",
     "Item": {
     "Item": {
       "Type": {
       "Type": {
-        "Compose": "Compose",
-        "Single": "Single",
-        "Multiple": "Multiple",
-        "Judge": "Judge",
-        "Complete": "Complete",
-        "Subjective": "Subjective"
+        "compose": "Compose",
+        "single": "Multiple-Choice",
+        "multiple": "Multiple-Answers",
+        "judge": "True/False",
+        "complete": "Fill-in-the-Blank",
+        "subjective": "Short-Answer"
       },
       },
       "AnswerTag": "Answer",
       "AnswerTag": "Answer",
-      "AnalysisTag": "Analysis",
+      "AnalysisTag": "Explain",
       "EndedTag": "Ended",
       "EndedTag": "Ended",
       "Options": "ABCDEFGHIJKLMN",
       "Options": "ABCDEFGHIJKLMN",
-      "Start": "[",
-      "End": "]"
+      "Start": "{",
+      "End": "}"
     }
     }
   },
   },
   {
   {
@@ -110,19 +110,19 @@
     "Alias": "English",
     "Alias": "English",
     "Item": {
     "Item": {
       "Type": {
       "Type": {
-        "Compose": "Compose",
-        "Single": "Single",
-        "Multiple": "Multiple",
-        "Judge": "Judge",
-        "Complete": "Complete",
-        "Subjective": "Subjective"
+        "compose": "Compose",
+        "single": "Multiple-Choice",
+        "multiple": "Multiple-Answers",
+        "judge": "True/False",
+        "complete": "Fill-in-the-Blank",
+        "subjective": "Short-Answer"
       },
       },
       "AnswerTag": "Answer",
       "AnswerTag": "Answer",
-      "AnalysisTag": "Analysis",
+      "AnalysisTag": "Explain",
       "EndedTag": "Ended",
       "EndedTag": "Ended",
       "Options": "ABCDEFGHIJKLMN",
       "Options": "ABCDEFGHIJKLMN",
-      "Start": "[",
-      "End": "]"
+      "Start": "{",
+      "End": "}"
     }
     }
   }
   }
 ]
 ]

+ 20 - 20
TEAMModelOS/Services/Evaluation/HtmlAnalyzeService.cs

@@ -75,27 +75,27 @@ namespace TEAMModelOS.Services
             {
             {
                 switch (key)
                 switch (key)
                 {
                 {
-                    case "Single":
+                    case "single":
                         List<ItemInfo> exercisesSingle = SingleConvert(key, TestInType[key]);
                         List<ItemInfo> exercisesSingle = SingleConvert(key, TestInType[key]);
                         exercisesSingle.ForEach(x => { x.pShaCode = x.shaCode; });
                         exercisesSingle.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesSingle); break;
                         tests.AddRange(exercisesSingle); break;
-                    case "Multiple":
+                    case "multiple":
                         List<ItemInfo> exercisesMultiple = MultipleConvert(key, TestInType[key]);
                         List<ItemInfo> exercisesMultiple = MultipleConvert(key, TestInType[key]);
                         exercisesMultiple.ForEach(x => { x.pShaCode = x.shaCode; });
                         exercisesMultiple.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesMultiple); break;
                         tests.AddRange(exercisesMultiple); break;
-                    case "Judge":
+                    case "judge":
                         List<ItemInfo> exercisesJudge = JudgeConvert(key, TestInType[key]);
                         List<ItemInfo> exercisesJudge = JudgeConvert(key, TestInType[key]);
                         exercisesJudge.ForEach(x => { x.pShaCode = x.shaCode; });
                         exercisesJudge.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesJudge); break;
                         tests.AddRange(exercisesJudge); break;
-                    case "Complete":
+                    case "complete":
                         List<ItemInfo> exercisesComplete = CompleteConvert(key, TestInType[key]);
                         List<ItemInfo> exercisesComplete = CompleteConvert(key, TestInType[key]);
                         exercisesComplete.ForEach(x => { x.pShaCode = x.shaCode; });
                         exercisesComplete.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesComplete); break;
                         tests.AddRange(exercisesComplete); break;
-                    case "Subjective":
+                    case "subjective":
                         List<ItemInfo> exercisesSubjective = SubjectiveConvert(key, TestInType[key]);
                         List<ItemInfo> exercisesSubjective = SubjectiveConvert(key, TestInType[key]);
                         exercisesSubjective.ForEach(x => { x.pShaCode = x.shaCode; });
                         exercisesSubjective.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesSubjective); break;
                         tests.AddRange(exercisesSubjective); break;
-                    case "Compose":
+                    case "compose":
                         List<ItemInfo> exercisesCompose = ComposeConvert(key, TestInType[key]);
                         List<ItemInfo> exercisesCompose = ComposeConvert(key, TestInType[key]);
                         exercisesCompose.ForEach(x => { x.pShaCode = x.shaCode; });
                         exercisesCompose.ForEach(x => { x.pShaCode = x.shaCode; });
                         tests.AddRange(exercisesCompose);
                         tests.AddRange(exercisesCompose);
@@ -372,7 +372,7 @@ namespace TEAMModelOS.Services
                 ItemInfo test = new ItemInfo();
                 ItemInfo test = new ItemInfo();
                 test.type = TypeKey;
                 test.type = TypeKey;
                 List<string> keys = new List<string>();
                 List<string> keys = new List<string>();
-                if (TypeKey.Equals("Complete"))
+                if (TypeKey.Equals("complete"))
                 {
                 {
                     keys = compquestion.Keys.ToList();
                     keys = compquestion.Keys.ToList();
                     regex = compquestion;
                     regex = compquestion;
@@ -439,7 +439,7 @@ namespace TEAMModelOS.Services
                         case "Answer":
                         case "Answer":
                             string Answer = mt.Value;
                             string Answer = mt.Value;
                             //单选或多选,判断答案 脱html标签
                             //单选或多选,判断答案 脱html标签
-                            if (TypeKey.Equals("Single") || TypeKey.Equals("Multiple") || TypeKey.Equals("Judge"))
+                            if (TypeKey.Equals("single") || TypeKey.Equals("multiple") || TypeKey.Equals("judge"))
                             {
                             {
                                 HtmlDocument doc = new HtmlDocument();
                                 HtmlDocument doc = new HtmlDocument();
                                 doc.LoadHtml(mt.Value);
                                 doc.LoadHtml(mt.Value);
@@ -457,19 +457,19 @@ namespace TEAMModelOS.Services
         }
         }
 
 
         //private  Dictionary<string, string> Test1Type = new Dictionary<string, string> {
         //private  Dictionary<string, string> Test1Type = new Dictionary<string, string> {
-        //    { "Single", "【单选题】|【结束】" }, { "Multiple", "【多选题】|【结束】" },
-        //    { "Judge", "【判断题】|【结束】" }, { "Complete", "【填空题】|【结束】" },
-        //    { "Subjective", "【问答题】|【结束】" } , { "Compose", "【综合题】|【完结】" }};
+        //    { "single", "【单选题】|【结束】" }, { "multiple", "【多选题】|【结束】" },
+        //    { "judge", "【判断题】|【结束】" }, { "complete", "【填空题】|【结束】" },
+        //    { "subjective", "【问答题】|【结束】" } , { "compose", "【综合题】|【完结】" }};
         //private  Dictionary<string, string> langConfig.Item.Type = new Dictionary<string, string> {
         //private  Dictionary<string, string> langConfig.Item.Type = new Dictionary<string, string> {
-        //    { "Compose", "综合题" },
-        //    { "Single", "单选题" }, { "Multiple", "多选题" },
-        //    { "Judge", "判断题" }, { "Complete", "填空题" },
-        //    { "Subjective", "问答题" } ,};
+        //    { "compose", "综合题" },
+        //    { "single", "单选题" }, { "multiple", "多选题" },
+        //    { "judge", "判断题" }, { "complete", "填空题" },
+        //    { "subjective", "问答题" } ,};
         //private  Dictionary<string, string> TestENType = new Dictionary<string, string> {
         //private  Dictionary<string, string> TestENType = new Dictionary<string, string> {
-        //    { "Compose", "Compose" },
-        //    { "Single", "Single" }, { "Multiple", "Multiple" },
-        //    { "Judge", "Judge" }, { "Complete", "Complete" },
-        //    { "Subjective", "Subjective" } };
+        //    { "compose", "compose" },
+        //    { "single", "single" }, { "multiple", "multiple" },
+        //    { "judge", "judge" }, { "complete", "complete" },
+        //    { "subjective", "subjective" } };
         //private  string Start = "【";
         //private  string Start = "【";
         //private  string End = "】";
         //private  string End = "】";
         //private  string AnswerTag = "答案";
         //private  string AnswerTag = "答案";
@@ -490,7 +490,7 @@ namespace TEAMModelOS.Services
             {
             {
                 List<string> tests = new List<string>();
                 List<string> tests = new List<string>();
                 string regRex = "";
                 string regRex = "";
-                if (key == "Compose")
+                if (key == "compose")
                 {
                 {
                     regRex = langConfig.Item.Start + "\\d+" + langConfig.Item.Type[key] + langConfig.Item.End + "([\\s\\S]*?)" + langConfig.Item.Start + langConfig.Item.EndedTag + langConfig.Item.End;
                     regRex = langConfig.Item.Start + "\\d+" + langConfig.Item.Type[key] + langConfig.Item.End + "([\\s\\S]*?)" + langConfig.Item.Start + langConfig.Item.EndedTag + langConfig.Item.End;
                     var m = Regex.Match(testHtml, regRex);
                     var m = Regex.Match(testHtml, regRex);