Sfoglia il codice sorgente

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

CrazyIter 5 anni fa
parent
commit
8877bb5b16
100 ha cambiato i file con 12336 aggiunte e 10637 eliminazioni
  1. 1 0
      TEAMModelOS.Service/Models/Exam/ExamItem.cs
  2. 21 5
      TEAMModelOS.Service/Models/Learn/LeanProcess.cs
  3. 6 5
      TEAMModelOS.Service/Models/Learn/LeanRecord.cs
  4. 14 13
      TEAMModelOS.Service/Services/Analysis/Implements/AchievementService.cs
  5. 3 2
      TEAMModelOS.Service/Services/Analysis/Interfaces/IAchievementService.cs
  6. 1 0
      TEAMModelOS/ClientApp/package.json
  7. 4 4
      TEAMModelOS/ClientApp/src/api/courseMgmt.js
  8. 23 25
      TEAMModelOS/ClientApp/src/api/index.js
  9. 17 17
      TEAMModelOS/ClientApp/src/api/knowledge.js
  10. 78 30
      TEAMModelOS/ClientApp/src/api/learnActivity.js
  11. 11 13
      TEAMModelOS/ClientApp/src/api/newEvaluation.js
  12. 11 11
      TEAMModelOS/ClientApp/src/api/schoolSetting.js
  13. 12 12
      TEAMModelOS/ClientApp/src/api/stuAccount.js
  14. 19 19
      TEAMModelOS/ClientApp/src/api/syllabus.js
  15. 6 6
      TEAMModelOS/ClientApp/src/api/teachContent.js
  16. 7 7
      TEAMModelOS/ClientApp/src/api/totalAnalysis.js
  17. 5 5
      TEAMModelOS/ClientApp/src/api/uploadFile.js
  18. 4 2
      TEAMModelOS/ClientApp/src/boot-app.js
  19. 1 1
      TEAMModelOS/ClientApp/src/common/BaseExamList.vue
  20. 3 0
      TEAMModelOS/ClientApp/src/common/Loading.vue
  21. 7 7
      TEAMModelOS/ClientApp/src/common/NoData.vue
  22. 39 39
      TEAMModelOS/ClientApp/src/common/UploadFile.vue
  23. 28 1
      TEAMModelOS/ClientApp/src/components/learnactivity/ChooseContent.less
  24. 599 471
      TEAMModelOS/ClientApp/src/components/learnactivity/ChooseContent.vue
  25. 7 9
      TEAMModelOS/ClientApp/src/components/learnactivity/QuestionList.vue
  26. 17 18
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseBar.vue
  27. 24 28
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseClassBar.vue
  28. 22 22
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseClassRadar.vue
  29. 11 13
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseEntryBar.vue
  30. 17 19
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseGeniusLine.vue
  31. 32 35
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseGradeRadar.vue
  32. 5 5
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseKnowledgeDetail.vue
  33. 4 5
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseKnowledgeRadar.vue
  34. 4 5
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLevelPie.vue
  35. 9 10
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLevelRadar.vue
  36. 3 4
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLine.vue
  37. 6 7
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLineBar.vue
  38. 21 23
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseMyTable.vue
  39. 4 5
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BasePie.vue
  40. 4 5
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseRadar.vue
  41. 12 15
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseScatter.vue
  42. 26 30
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseSubjectBar.vue
  43. 7 9
      TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseTestScatter.vue
  44. 23 0
      TEAMModelOS/ClientApp/src/css/dark-iview-split.less
  45. 2 2
      TEAMModelOS/ClientApp/src/locale/lang/en-US/courseManage.js
  46. 1 1
      TEAMModelOS/ClientApp/src/locale/lang/en-US/teachContent.js
  47. 18 18
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/courseManage.js
  48. 1 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/schoolBaseInfo.js
  49. 7 7
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/teachContent.js
  50. 32 33
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/totalAnalysis.js
  51. 3 3
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/courseManage.js
  52. 3 3
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/teachContent.js
  53. 208 194
      TEAMModelOS/ClientApp/src/router/routes.js
  54. 4 4
      TEAMModelOS/ClientApp/src/store/module/courseMgmt.js
  55. 12 13
      TEAMModelOS/ClientApp/src/store/module/schoolBaseInfo.js
  56. 32 37
      TEAMModelOS/ClientApp/src/store/module/totalAnalysis.js
  57. 6651 6792
      TEAMModelOS/ClientApp/src/utils/azure-storage-blob.js
  58. 2 2
      TEAMModelOS/ClientApp/src/utils/azure-storage-blob.min.js
  59. 25 23
      TEAMModelOS/ClientApp/src/utils/js-fn.js
  60. 55 57
      TEAMModelOS/ClientApp/src/utils/upload-file.js
  61. 347 355
      TEAMModelOS/ClientApp/src/view/Home.vue
  62. 37 38
      TEAMModelOS/ClientApp/src/view/coursemgmt/CourseBaseSetting.vue
  63. 3 0
      TEAMModelOS/ClientApp/src/view/coursemgmt/CourseClassroom.less
  64. 30 32
      TEAMModelOS/ClientApp/src/view/coursemgmt/CourseClassroom.vue
  65. 23 25
      TEAMModelOS/ClientApp/src/view/coursemgmt/CourseManage.vue
  66. 12 12
      TEAMModelOS/ClientApp/src/view/coursemgmt/CourseSyllabus.vue
  67. 4 0
      TEAMModelOS/ClientApp/src/view/evaluation/bank/ExerciseList.less
  68. 52 55
      TEAMModelOS/ClientApp/src/view/evaluation/bank/ExerciseList.vue
  69. 24 1
      TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.less
  70. 169 29
      TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.vue
  71. 2 4
      TEAMModelOS/ClientApp/src/view/evaluation/bank/index.vue
  72. 468 0
      TEAMModelOS/ClientApp/src/view/evaluation/components/BaseEditExercise.vue
  73. 414 108
      TEAMModelOS/ClientApp/src/view/evaluation/components/BaseExerciseList.vue
  74. 10 13
      TEAMModelOS/ClientApp/src/view/evaluation/components/BaseFilter.vue
  75. 354 0
      TEAMModelOS/ClientApp/src/view/evaluation/components/BaseImport.vue
  76. 48 14
      TEAMModelOS/ClientApp/src/view/evaluation/components/BasePaperInfo.vue
  77. 6 8
      TEAMModelOS/ClientApp/src/view/evaluation/components/BasePoints.vue
  78. 84 0
      TEAMModelOS/ClientApp/src/view/evaluation/components/BaseTypePie.vue
  79. 17 28
      TEAMModelOS/ClientApp/src/view/evaluation/index/CreateExercises.vue
  80. 4 2
      TEAMModelOS/ClientApp/src/view/evaluation/index/ExercisesList.css
  81. 58 74
      TEAMModelOS/ClientApp/src/view/evaluation/index/ExercisesList.vue
  82. 0 205
      TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaper.css
  83. 251 0
      TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaper.less
  84. 136 129
      TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaper.vue
  85. 6 8
      TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaperList.vue
  86. 29 110
      TEAMModelOS/ClientApp/src/view/evaluation/index/index.vue
  87. 5 8
      TEAMModelOS/ClientApp/src/view/knowledge-point/index/Index.vue
  88. 1 1
      TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/AddBlock.vue
  89. 4 6
      TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/AddPoint.vue
  90. 11 14
      TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/ComposeBlock.vue
  91. 10 1
      TEAMModelOS/ClientApp/src/view/learnactivity/AutoCreate.less
  92. 25 39
      TEAMModelOS/ClientApp/src/view/learnactivity/AutoCreate.vue
  93. 472 456
      TEAMModelOS/ClientApp/src/view/learnactivity/CreateEvaluation.vue
  94. 16 18
      TEAMModelOS/ClientApp/src/view/learnactivity/ExamPaperAnalysis.vue
  95. 7 8
      TEAMModelOS/ClientApp/src/view/learnactivity/ImportCreate.vue
  96. 137 129
      TEAMModelOS/ClientApp/src/view/learnactivity/ManageEvaluation.less
  97. 527 355
      TEAMModelOS/ClientApp/src/view/learnactivity/ManageEvaluation.vue
  98. 2 14
      TEAMModelOS/ClientApp/src/view/learnactivity/ManualCreate.less
  99. 297 186
      TEAMModelOS/ClientApp/src/view/learnactivity/ManualCreate.vue
  100. 0 0
      TEAMModelOS/ClientApp/src/view/learnactivity/StudentPreview.vue

+ 1 - 0
TEAMModelOS.Service/Models/Exam/ExamItem.cs

@@ -91,5 +91,6 @@ namespace TEAMModelOS.Service.Models.Exam.Models
         public string creator { get; set; }
         //使用次数
         public int usageCount { get; set; }
+        public string examCode { get; set; }
     }
 }

+ 21 - 5
TEAMModelOS.Service/Models/Learn/LeanProcess.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
 using System.Text;
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
@@ -19,13 +20,22 @@ namespace TEAMModelOS.Service.Models.Learn
             target = new List<string>();
             steps = new List<ProcessStep>();
         }
+        
         public string id { get; set; }
         public string name { get; set; }
+        [Required(ErrorMessage = "{0} 必须填写")]
         public string subjectCode { get; set; }
         /// <summary>
+        /// 活动介绍
+        /// </summary>
+        [Required(ErrorMessage = "{0} 必须填写")]
+        public string Introduce { get; set; }
+        /// <summary>
         /// 学习对象
         /// </summary>
+        [Required(ErrorMessage = "{0} 必须填写")]
         public List<string> target { get; set; }
+        [Required(ErrorMessage = "{0} 必须填写")]
         [PartitionKey]
         public string scopeCode { get; set; }
         /// <summary>
@@ -33,18 +43,21 @@ namespace TEAMModelOS.Service.Models.Learn
         /// </summary>
         public List<ProcessStep> steps { get; set; }
         /// <summary>
-        /// 是否闯关模式
+        /// 是否闯关模式 0 或 1 vue组件不支持true false
         /// </summary>
-        public bool isOrder { get; set; }
+        [Required(ErrorMessage = "{0} 必须填写")]
+        public string isOrder { get; set; }
 
         //创建时间 
         public long createTime { get; set; }
         //创建者
+        [Required(ErrorMessage = "{0} 必须填写")]
         public string creator { get; set; }
 
         /// <summary>
         /// 编序式模板,课前预习,随堂练习,课后作业
         /// </summary>
+        [Required(ErrorMessage = "{0} 必须填写")]
         public string type { get; set; }
         /// <summary>
         /// 截至时间 时间戳
@@ -68,15 +81,18 @@ namespace TEAMModelOS.Service.Models.Learn
         /// 题目
         /// </summary>
         public List<ExamItem> item { get; set; }
+        [Required(ErrorMessage = "{0} 必须填写")]
         public string name { get; set; }
         public int order { get; set; }
     }
   
     public class ProcessRes{
 
-        public string name { get; set; }
-        public string url { get; set; }
-        public string order { get; set; }
+        [Required(ErrorMessage = "{0} 必须填写")]
+        public string fileName { get; set; }
+        [Required(ErrorMessage = "{0} 必须填写")]
+        public string blobUrl { get; set; }
+        public int order { get; set; }
     }
 
 }

+ 6 - 5
TEAMModelOS.Service/Models/Learn/LeanRecord.cs

@@ -37,11 +37,11 @@ namespace TEAMModelOS.Service.Models.Learn
     /// </summary>
     public class RecordRes
     {
-        int order { get; set; }
+        public int order { get; set; }
         /// <summary>
-        /// 阅读时长
+        /// 阅读时长 秒数
         /// </summary>
-        int costTime { get; set; } = 0;
+        public int costTime { get; set; } = 0;
     }
     /// <summary>
     /// 题目作答记录
@@ -51,11 +51,12 @@ namespace TEAMModelOS.Service.Models.Learn
         public RecordAns(){
             ans = new List<string>();
         }
-        int order { get; set; }
+        public int order { get; set; }
+
         List<string> ans { get; set; }
         /// <summary>
         /// 作答时长
         /// </summary>
-        int costTime { get; set; } = 0;
+        public int costTime { get; set; } = 0;
     }
 }

+ 14 - 13
TEAMModelOS.Service/Services/Analysis/Implements/AchievementService.cs

@@ -7,6 +7,7 @@ using TEAMModelOS.SDK.Module.AzureCosmosDB.Interfaces;
 using TEAMModelOS.Service.Analysis.Interfaces;
 using TEAMModelOS.Service.Models.Core;
 using TEAMModelOS.SDK.Module.AzureCosmosDBV3;
+using TEAMModelOS.Service.Models.Exam.Models;
 
 namespace TEAMModelOS.Service.Analysis.Implements
 {
@@ -19,7 +20,7 @@ namespace TEAMModelOS.Service.Analysis.Implements
             _cosmosrepository = cosmosDBRepository;
         }
         //处理各个班级均分分析
-        public Dictionary<string, object> GetAverage(List<SimpleExam> exams, List<string> gav, List<string> cav, List<List<int>> subSum, List<Student> students)
+        public Dictionary<string, object> GetAverage(List<ExamResult> exams, List<string> gav, List<string> cav, List<List<int>> subSum, List<Student> students)
         {
             Dictionary<string, object> Average = new Dictionary<string, object>();
             List<List<string>> classAverage = new List<List<string>>();
@@ -33,7 +34,7 @@ namespace TEAMModelOS.Service.Analysis.Implements
                 keys.Add("classAverage");               
                 keys.Add("gradeAverage");
                 int j = 0;
-                exams[0].Classes.ForEach(c =>
+                exams[0].classes.ForEach(c =>
                     {
                         //c.Keys遍历key值
                         foreach (string key in c.Keys)
@@ -54,7 +55,7 @@ namespace TEAMModelOS.Service.Analysis.Implements
                                 stuPoint[0] = (i + 1).ToString();
                                 foreach (Student ss in students)
                                 {
-                                    if (exams[0].Ids[i].Equals(ss.studentId))
+                                    if (exams[0].ids[i].Equals(ss.studentId))
                                     {
                                         stuPoint[1] = ss.name;
                                         break;
@@ -77,7 +78,7 @@ namespace TEAMModelOS.Service.Analysis.Implements
                 
         }
 
-        public List<Dictionary<string, object>> GetPR(List<SimpleExam> exams, List<List<int>> subSum,List<Student> students)
+        public List<Dictionary<string, object>> GetPR(List<ExamResult> exams, List<List<int>> subSum,List<Student> students)
         {
             // 计算公式 PR=100- (100*R-50)/N
             List<Dictionary<string, object>> subPR = new List<Dictionary<string, object>>();
@@ -102,7 +103,7 @@ namespace TEAMModelOS.Service.Analysis.Implements
                 {
                     Dictionary<string, object> PR = new Dictionary<string, object>
                     {
-                        { "name", e.Subject }
+                        { "name", e.subjectCode }
                     };
                     List<string> stuPRG = new List<string>();
                     List<string> ClassAverage = new List<string>();
@@ -112,7 +113,7 @@ namespace TEAMModelOS.Service.Analysis.Implements
 
                     //科目平均分
                     double subAverage = 0;
-                    e.Classes.ForEach(c =>
+                    e.classes.ForEach(c =>
                     {
                         List<List<string>> classPRL = new List<List<string>>();
                         //c.Keys遍历key值
@@ -140,22 +141,22 @@ namespace TEAMModelOS.Service.Analysis.Implements
                                 {
                                     SPR.Add("-");
                                 });
-                                if (e.Result[i].Sum() == 0)
+                                if (e.result[i].Sum() == 0)
                                 {
                                     classCount++;
                                     seatNo++;
                                     continue;
 
                                 }
-                                stuPR.Add(e.Result[i].Sum().ToString());
-                                stuPRG.Add(e.Result[i].Sum().ToString());
+                                stuPR.Add(e.result[i].Sum().ToString());
+                                stuPRG.Add(e.result[i].Sum().ToString());
                                 SPR[1] = seatNo.ToString() ;
-                                SPR[2] = e.Result[i].Sum().ToString();
-                                SPR[0] = e.Ids[i];
+                                SPR[2] = e.result[i].Sum().ToString();
+                                SPR[0] = e.ids[i];
                                 classPRL.Add(SPR);
                                 //计算班级PR值
                                 //int classPR = 100 - (100*)
-                                classPoint += e.Result[i].Sum();                               
+                                classPoint += e.result[i].Sum();                               
                                 seatNo++;
                             }
                             counts = value[1] - value[0] - classCount + 1;
@@ -227,7 +228,7 @@ namespace TEAMModelOS.Service.Analysis.Implements
                     subPR.Add(PR);
                 });
                 //处理全科PR值计算
-                List<string> stuIds = exams[0].Ids;
+                List<string> stuIds = exams[0].ids;
                 /*for (int k=0;k< stuIds.Count;k++) {
                     if (stuIds[k].Equals("0")) {
                         stuIds.Remove(stuIds[k]);

+ 3 - 2
TEAMModelOS.Service/Services/Analysis/Interfaces/IAchievementService.cs

@@ -2,13 +2,14 @@
 using TEAMModelOS.Service.Model.Exam.Models;
 using TEAMModelOS.SDK.Context.Configuration;
 using TEAMModelOS.Service.Models.Core;
+using TEAMModelOS.Service.Models.Exam.Models;
 
 namespace TEAMModelOS.Service.Analysis.Interfaces
 {
     public interface IAchievementService : IBusinessService
     {
-        List<Dictionary<string, object>> GetPR(List<SimpleExam> exams, List<List<int>> subSum,List<Student> students);
-        Dictionary<string, object> GetAverage(List<SimpleExam> exams,List<string> gav, List<string> cav, List<List<int>> subSum, List<Student> students);
+        List<Dictionary<string, object>> GetPR(List<ExamResult> exams, List<List<int>> subSum,List<Student> students);
+        Dictionary<string, object> GetAverage(List<ExamResult> exams,List<string> gav, List<string> cav, List<List<int>> subSum, List<Student> students);
         List<List<string>> ReName(List<List<string>> datas, List<string> ids,
             List<Dictionary<string, int[]>> classToName, List<Student> students);
 

+ 1 - 0
TEAMModelOS/ClientApp/package.json

@@ -22,6 +22,7 @@
     "jsonpath": "^1.0.2",
     "jwt-decode": "^2.2.0",
     "less": "^3.9.0",
+    "lodash": "^4.17.15",
     "mockjs": "^1.0.1-beta3",
     "oidc-client": "^1.9.1",
     "qrcodejs2": "0.0.2",

+ 4 - 4
TEAMModelOS/ClientApp/src/api/courseMgmt.js

@@ -1,12 +1,12 @@
 import { fetch, post } from '@/filters/http'
 export default {
-  findCourse: function (data) {
+  findCourse: function(data) {
     return post('/api/Course/FindCourse', data)
   },
-  saveOrUpdateCourse: function (data) {
+  saveOrUpdateCourse: function(data) {
     return post('/api/Course/SaveOrUpdateCourse', data)
   },
-  deleteCourse: function (data) {
+  deleteCourse: function(data) {
     return post('/api/Course/DeleteCourse', data)
   }
-}
+}

+ 23 - 25
TEAMModelOS/ClientApp/src/api/index.js

@@ -1,7 +1,7 @@
 import { fetch, post } from '@/filters/http'
 import ClassMgmt from './classMgmt'
 import talMgmt from './talMgmt'
-//import cloudApi from '../store/api/index'
+// import cloudApi from '../store/api/index'
 import schoolSetting from './schoolSetting'
 import totalAnalysis from './totalAnalysis'
 import stuAccount from './stuAccount'
@@ -22,108 +22,106 @@ export default {
     totalAnalysis,
     talMgmt,
     teachContent,
-    //cloudApi,
+    // cloudApi,
     uploadFile,
     courseMgmt,
     newEvaluation,
     // 获取登录跳转链接
-    getLoginLink: function (data) {
+    getLoginLink: function(data) {
         return post('api/login/login', data)
     },
     // 验证登录
-    checkLogin: function (data) {
+    checkLogin: function(data) {
         return post('api/login/CheckLogin', data)
     },
     // 获取登录人员角色列表
-    getLoginRoles: function (data) {
+    getLoginRoles: function(data) {
         return post('api/role/GetLoginRoles', data)
     },
     // 查找地区对应学校列表
-    getSchoolList: function (data) {
+    getSchoolList: function(data) {
         return post('api/School/getSchool', data)
     },
     // 根据当前登录用户获取已授权的AI智慧学校
-    getAuthSchool: function (data) {
+    getAuthSchool: function(data) {
         return post('api/School/AuthorizedAISchool', data)
     },
     // 获取全部科目
-    FindSubjectsByDict: function (data) {
+    FindSubjectsByDict: function(data) {
         return post('api/subject/FindSubjectsByDict', data)
     },
     // 获取当前学校全部科目
-    FindSchoolSubjectsByDict: function (data) {
+    FindSchoolSubjectsByDict: function(data) {
         return post('api/subject/FindSchoolSubjectsByDict', data)
     },
     // 获取当前学校全部册别
-    FindSchoolVolumesByDict: function (data) {
+    FindSchoolVolumesByDict: function(data) {
         return post('api/volume/FindSchoolVolumesByDict', data)
     },
     // 获取当前学校全部学段
-    FindSchoolPeriodsByDict: function (data) {
+    FindSchoolPeriodsByDict: function(data) {
         return post('api/period/FindSchoolPeriodsByDict', data)
     },
     // 获取当前学校全部年级
-    FindSchoolGradesByDict: function (data) {
+    FindSchoolGradesByDict: function(data) {
         return post('api/grade/FindSchoolGradesByDict', data)
     },
     // 获取当前学校全部学期
-    FindSchoolTermsByDict: function (data) {
+    FindSchoolTermsByDict: function(data) {
         return post('api/term/FindSchoolTermsByDict', data)
     },
 
-
     // 获取登录人员身份信息
-    getLoginClaim: function (data) {
+    getLoginClaim: function(data) {
         return post('api/role/GetLoginClaim', data)
     },
 
     // 新建习题保存到题库
-    SaveItemBank: function (data) {
+    SaveItemBank: function(data) {
         return post('api/evaluation/ItemBank', data)
     },
 
     // 新建试卷到试卷库
-    SaveTestPaper: function (data) {
+    SaveTestPaper: function(data) {
         return post('api/Evaluation/testPaper', data)
     },
 
     // 新建试卷到试卷库
-    SaveAnalyzeHtml: function (data) {
+    SaveAnalyzeHtml: function(data) {
         return post('/api/ImportExercise/AnalyzeHtml', data)
     },
 
     // 获取所有学校信息
-    GetAllSchool: function (data) {
+    GetAllSchool: function(data) {
         return post('api/school/GetAllSchool', data)
     },
 
     // 根据条件获取学段
-    FindPeriodsByDict: function (data) {
+    FindPeriodsByDict: function(data) {
         return post('api/period/FindPeriodsByDict', data)
     },
 
     // 根据条件获取年级
-    FindGradesByDict: function (data) {
+    FindGradesByDict: function(data) {
         return post('api/grade/FindGradesByDict', data)
     },
     // 根据条件获取学科
-    FindSubjectsByDict: function (data) {
+    FindSubjectsByDict: function(data) {
         return post('api/subject/FindSubjectsByDict', data)
     },
 
-
     /*
      *评测
      */
     // 上传图片
-    UploadFile: function (data) {
+    UploadFile: function(data) {
         return post('/api/file/uploadFile', data)
     },
 
     /**
      * 通用查询接口
      */
-    FindCollection: function (data) {
+    FindCollection: function(data) {
         return post('/api/Common/FindCollection', data)
     }
 

+ 17 - 17
TEAMModelOS/ClientApp/src/api/knowledge.js

@@ -1,35 +1,35 @@
 import { post } from '@/filters/http'
 export default {
-    // 获取标准知识点
-    GetStantardPoints: function (data) {
+    // 锟斤拷取锟斤拷准知识锟斤拷
+    GetStantardPoints: function(data) {
         return post('/api/Knowledge/FindKnowledgePointByDict', data)
     },
-    // 获取标准知识块
-    GetStantardBlocks: function (data) {
+    // 锟斤拷取锟斤拷准知识锟斤拷
+    GetStantardBlocks: function(data) {
         return post('/api/Knowledge/FindKnowledgeBlockAndPointByDict', data)
     },
-    // 获取学校知识点
-    GetSchoolPoints: function (data) {
+    // 锟斤拷取学校知识锟斤拷
+    GetSchoolPoints: function(data) {
         return post('/api/Knowledge/FindKnowledge', data)
     },
-    // 获取学校知识块
-    GetSchoolBlocks: function (data) {
+    // 锟斤拷取学校知识锟斤拷
+    GetSchoolBlocks: function(data) {
         return post('/api/Knowledge/FindKnowledge', data)
     },
-    // 保存或更新学校知识块及知识点
-    SaveOrUpdateKnowledge: function (data) {
+    // 锟斤拷锟斤拷锟斤拷锟斤拷学校知识锟介及知识锟斤拷
+    SaveOrUpdateKnowledge: function(data) {
         return post('/api/Knowledge/SaveOrUpdateKnowledge', data)
     },
-    // 手动添加学校的私有知识点
-    SaveOrUpdateSchoolPoint: function (data) {
+    // 锟街讹拷锟斤拷锟斤拷学校锟斤拷私锟斤拷知识锟斤拷
+    SaveOrUpdateSchoolPoint: function(data) {
         return post('/api/Knowledge/SaveOrUpdateAllSchoolPoint', data)
     },
-    // 删除知识点或者知识块
-    DeleteSchoolPoint: function (data) {
+    // ɾ��֪ʶ�����֪ʶ��
+    DeleteSchoolPoint: function(data) {
         return post('/api/Knowledge/DeleteKnowledge', data)
     },
-    // 删除知识块
-    DeleteSchoolBlock: function (data) {
+    // 删锟斤拷知识锟斤拷
+    DeleteSchoolBlock: function(data) {
         return post('/api/Knowledge/DeleteKnowledge', data)
-    },
+    }
 }

+ 78 - 30
TEAMModelOS/ClientApp/src/api/learnActivity.js

@@ -1,35 +1,83 @@
 import { fetch, post } from '@/filters/http'
 export default {
-  /*
-   *±£´æÊÔ¾í 
-   */
-  SaveExamPaper: function (data) {
-    return post('/api/Exam/SaveExamPaper', data)
-  },
-  /*
-   *²éѯÊÔ¾í 
-   */
-  FindExamPaper: function (data) {
-    return post('/api/Exam/FindExamPaper', data)
-  },
-  /*
-   *±£´æÆÀ²â 
-   */
-  SaveExamInfo: function (data) {
-    return post('/api/Exam/SaveExamInfo', data)
-  },
-  /*
-   *²éѯÆÀ²â 
-   */
-  FindExamInfo: function (data) {
-    return post('/api/Exam/FindExamInfo', data)
-  },
-  /*
-   *×Ô¶¯×éÌâ
-   */
-  Automatic: function (data) {
-    return post('/api/ItemInfo/Automatic', data)
-  }
+    /*
+     *�存试�
+     */
+    SaveExamPaper: function (data) {
+        return post('/api/Exam/SaveExamPaper', data)
+    },
+    /*
+     *查询试�
+     */
+    FindExamPaper: function (data) {
+        return post('/api/Exam/FindExamPaper', data)
+    },
+    /*
+     *删除试�
+     */
+    DeleteExamPaper: function (data) {
+        return post('/api/Exam/DeleteExamPaper', data)
+    },
+    /*
+     *�存评测
+     */
+    SaveExamInfo: function (data) {
+        return post('/api/Exam/SaveExamInfo', data)
+    },
+    /*
+     *查询评测
+     */
+    FindExamInfo: function (data) {
+        return post('/api/Exam/FindExamInfo', data)
+    },
+    /*
+     *自动组题
+     */
+    Automatic: function (data) {
+        return post('/api/ItemInfo/Automatic', data)
+    },
+    /*
+     *�存最��元
+     */
+    SaveUnit: function (data) {
+        return post('/api/Learn/SaveUnit', data)
+    },
+    /*
+     *查询最��元
+     */
+    FindUnit: function (data) {
+        return post('/api/Learn/FindUnit', data)
+    },
+    /*
+     *删除最��元
+     */
+    DeleteUnit: function (data) {
+        return post('/api/Learn/DeleteUnit', data)
+    },
+    /*
+    *根�id数组查询资�文件
+    */
+    FindSyllabusResourceById: function (data) {
+        return post('/api/Resource/FindSyllabusResourceById', data)
+    },
+    /*
+    *根�id数组查询资�文件
+    */
+    FindQuestionById: function (data) {
+        return post('/api/ItemInfo/FindById', data)
+    },
+    /*
+    *�存编��学习活动
+    */
+    SaveOrderLearn: function (data) {
+        return post('/api/Learn/SaveorUpdataLeanProcess', data)
+    },
+    /*
+    *查询编��学习活动
+    */
+    FindOrderLearn: function (data) {
+        return post('/api/Learn/FindLeanProcess', data)
+    }
 
 
 }

+ 11 - 13
TEAMModelOS/ClientApp/src/api/newEvaluation.js

@@ -1,48 +1,46 @@
 import { fetch, post } from '@/filters/http'
 export default {
-    SaveAnalyzeHtml: function (data) {
+    SaveAnalyzeHtml: function(data) {
         return post('/api/ImportExercise/AnalyzeHtml', data)
     },
     /**
-     * 创建保存单个试题
+     * 锟斤拷锟斤拷锟斤拷锟芥单锟斤拷锟斤拷锟斤拷
      * @param {any} data
      */
-    SaveSingleExercise: function (data) {
+    SaveSingleExercise: function(data) {
         return post('/api/ItemInfo/Save', data)
     },
 
     /**
-     * 查询题库列表
+     * ��ѯ����б�
      * @param {any} data
      */
-    FindExerciseList: function (data) {
+    FindExerciseList: function(data) {
         return post('/api/ItemInfo/FindSummary', data)
     },
 
     /**
-     * 条件查询结果数量
+     * ������ѯ�������
      * @param {any} data
      */
-    FindCount: function (data) {
+    FindCount: function(data) {
         return post('/api/Common/FindCount', data)
     },
 
     /**
-     * 查询单个题目的详细数据
+     * 锟斤拷询锟斤拷锟斤拷锟斤拷目锟斤拷锟斤拷细锟斤拷锟斤拷
      * @param {any} data
      */
-    FindExerciseById: function (data) {
+    FindExerciseById: function(data) {
         return post('/api/ItemInfo/FindById', data)
     },
 
     /**
-     * 删除单个题
+     * 删锟斤拷锟斤拷锟斤拷锟斤拷
      * @param {any} data
      */
-    DeleteExamItem: function (data) {
+    DeleteExamItem: function(data) {
         return post('/api/ItemInfo/DeleteExamItem', data)
     }
 
-    
-    
 }

+ 11 - 11
TEAMModelOS/ClientApp/src/api/schoolSetting.js

@@ -1,18 +1,18 @@
 import { fetch, post } from '@/filters/http'
 export default {
-    schoolSettingSaveOrUpdate: function (data) {
-        return post('/api/School/SaveOrUpdateAll', data);
+    schoolSettingSaveOrUpdate: function(data) {
+        return post('/api/School/SaveOrUpdateAll', data)
     },
-    findSchoolSystem: function (data) {
-        return post('/api/School/FindSchool', data);
+    findSchoolSystem: function(data) {
+        return post('/api/School/FindSchool', data)
     },
-    findClassInfo: function (data) {
-        return post('/api/Classroom/FindClassInfo', data);
+    findClassInfo: function(data) {
+        return post('/api/Classroom/FindClassInfo', data)
     },
-    classroomSettingSaveOrUpdate: function (data) {
-        return post('/api/Classroom/SaveOrUpdate', data);
-    },
-    dataDefault: function (data) {
-        return post('/api/Common/DataDefault', data);
+    classroomSettingSaveOrUpdate: function(data) {
+        return post('/api/Classroom/SaveOrUpdate', data)
     },
+    dataDefault: function(data) {
+        return post('/api/Common/DataDefault', data)
+    }
 }

+ 12 - 12
TEAMModelOS/ClientApp/src/api/stuAccount.js

@@ -1,21 +1,21 @@
 import { fetch, post } from '@/filters/http'
 export default {
-    saveStudent: function (data) {
-        return post('/api/Student/SaveStudent', data);
+    saveStudent: function(data) {
+        return post('/api/Student/SaveStudent', data)
     },
-    findStudent: function (data) {
-        return post('/api/Student/FindStudent', data);
+    findStudent: function(data) {
+        return post('/api/Student/FindStudent', data)
     },
-    saveAllStudent: function (data) {
-        return post('/api/Student/SaveAllStudent', data);
+    saveAllStudent: function(data) {
+        return post('/api/Student/SaveAllStudent', data)
     },
-    updateStudent: function (data) {
-        return post('/api/Student/UpdateStudent', data);
+    updateStudent: function(data) {
+        return post('/api/Student/UpdateStudent', data)
     },
-    updateAllStudent: function (data) {
-        return post('/api/Student/UpdateAllStudent', data);
+    updateAllStudent: function(data) {
+        return post('/api/Student/UpdateAllStudent', data)
     },
-    deleteStudent: function (data) {
-        return post('/api/Student/DeleteStudent', data);
+    deleteStudent: function(data) {
+        return post('/api/Student/DeleteStudent', data)
     }
 }

+ 19 - 19
TEAMModelOS/ClientApp/src/api/syllabus.js

@@ -1,39 +1,39 @@
 import { post } from '@/filters/http'
 export default {
-    // 根据条件获取学校数据
-    GetSchoolInfo: function (data) {
+    // 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷取学校锟斤拷锟斤拷
+    GetSchoolInfo: function(data) {
         return post('/api/School/FindSchool', data)
     },
-    // 保存或更新课纲册别
-    SaveOrUpdateVolume: function (data) {
+    // �������¿θٲ��
+    SaveOrUpdateVolume: function(data) {
         return post('/api/Volume/SaveOrUpdate', data)
     },
-    // 查找课纲册别
-    GetVolumes: function (data) {
+    // ���ҿθٲ��
+    GetVolumes: function(data) {
         return post('/api/Volume/Find', data)
     },
-    // 删除课纲册别
-    DeleteVolume: function (data) {
+    // ɾ���θٲ��
+    DeleteVolume: function(data) {
         return post('/api/Volume/Delete', data)
     },
-    // 根据册别查找课纲数据
-    GetTreeByVolume: function (data) {
+    // 锟斤拷锟捷诧拷锟斤拷锟揭课革拷锟斤拷锟斤拷
+    GetTreeByVolume: function(data) {
         return post('/api/Syllabus/Find', data)
     },
-    // 按照树形保存整个课纲
-    SaveOrUpdateAsTree: function (data) {
+    // 锟斤拷锟斤拷锟斤拷锟轿憋拷锟斤拷锟斤拷锟斤拷锟轿革拷
+    SaveOrUpdateAsTree: function(data) {
         return post('/api/Syllabus/SaveOrUpdateAsTree', data)
     },
-    // 保存或者新增单个节点
-    SaveOrUpdateAsNodes: function (data) {
+    // ����������������ڵ�
+    SaveOrUpdateAsNodes: function(data) {
         return post('/api/Syllabus/SaveOrUpdateAsNodes', data)
     },
-    // 保存或者新增单个节点
-    SaveOrUpdateAsNodes: function (data) {
+    // ����������������ڵ�
+    SaveOrUpdateAsNodes: function(data) {
         return post('/api/Syllabus/SaveOrUpdateAsNodes', data)
     },
-    // 通用集合查询接口
-    FindCollection: function (data) {
+    // 通锟矫硷拷锟较诧拷询锟接匡拷
+    FindCollection: function(data) {
         return post('/api/Common/FindCollection', data)
-    },
+    }
 }

+ 6 - 6
TEAMModelOS/ClientApp/src/api/teachContent.js

@@ -1,12 +1,12 @@
 import { fetch, post } from '@/filters/http'
 export default {
-    saveOrUpdateResource: function (data) {
-        return post('/api/Resource/SaveOrUpdateSyllabusResource', data);
+    saveOrUpdateResource: function(data) {
+        return post('/api/Resource/SaveOrUpdateSyllabusResource', data)
     },
-    findResourceByDict: function (data) {
-        return post('/api/Resource/FindSyllabusResourceByDict', data);
+    findResourceByDict: function(data) {
+        return post('/api/Resource/FindSyllabusResourceByDict', data)
     },
-    deleteResource: function (data) {
-        return post('/api/Resource/DeleteSyllabusResource', data);
+    deleteResource: function(data) {
+        return post('/api/Resource/DeleteSyllabusResource', data)
     }
 }

+ 7 - 7
TEAMModelOS/ClientApp/src/api/totalAnalysis.js

@@ -2,31 +2,31 @@
 import { post } from '@/filters/http'
 export default {
     // 获取学情首页数据
-    getHomePageData: function (data) {
+    getHomePageData: function(data) {
         return post('/api/achievement/HomeStatistics', data)
     },
     // 获取评测列表数据
-    getExamList: function (data) {
+    getExamList: function(data) {
         return post('/api/achievement/FindExamInfo', data)
     },
     // 获取评测对应所有试题数据
-    getExamPaper: function (data) {
+    getExamPaper: function(data) {
         return post('/api/achievement/FindExamPaper', data)
     },
     // 获取成绩分析数据
-    getAchievementData: function (data) {
+    getAchievementData: function(data) {
         return post('/api/Achievement/Achievement', data)
     },
     // 获取落点分析数据
-    getScatterData: function (data) {
+    getScatterData: function(data) {
         return post('/api/achievement/PointAnalysis', data)
     },
     // 获取试题分析数据
-    getExerciseData: function (data) {
+    getExerciseData: function(data) {
         return post('/api/achievement/ExerciseScatter', data)
     },
     // 获取知识点掌握数据
-    getKnowledgeData: function (data) {
+    getKnowledgeData: function(data) {
         return post('/api/achievement/knowledgePoint', data)
     }
 }

+ 5 - 5
TEAMModelOS/ClientApp/src/api/uploadFile.js

@@ -1,10 +1,10 @@
 import { fetch, post } from '@/filters/http'
 export default {
-    getBlobSAS: function (data) {
-        return post('/api/File/getBlobSAS', data);
+    getBlobSAS: function(data) {
+        return post('/api/File/getBlobSAS', data)
     },
-    getContainerSAS: function (data) {
-        return post('/api/File/getContainerSAS', data);
+    getContainerSAS: function(data) {
+        return post('/api/File/getContainerSAS', data)
     }
 
-}
+}

+ 4 - 2
TEAMModelOS/ClientApp/src/boot-app.js

@@ -5,11 +5,10 @@ import store from './store'
 import { sync } from 'vuex-router-sync'
 import App from './components/app-root'
 import { FontAwesomeIcon } from './icons'
-// import iView from 'iview';
-// import 'iview/dist/styles/iview.css';
 import ViewUI from 'view-design'
 import 'view-design/dist/styles/iview.css'
 import tools from '@/utils/public.js'
+import jsFn from '@/utils/js-fn.js'
 import apiTools from '@/api'
 import mockTools from '@/mock'
 import { fetch, post } from '@/filters/http'
@@ -25,6 +24,7 @@ import 'element-ui/lib/theme-chalk/tree.css'
 import 'element-ui/lib/theme-chalk/icon.css'
 import animated from 'animate.css'
 import VueLogger from 'vuejs-logger'
+import _ from 'lodash'
 
 require('video.js/dist/video-js.css')
 require('vue-video-player/src/custom-theme.css')
@@ -62,6 +62,8 @@ Vue.prototype.$jwtDecode = jwtDecode
 Vue.prototype.$JSONPath = JSONPath
 Vue.prototype.$echarts = echarts
 Vue.prototype.$tools = tools
+Vue.prototype.$jsFn = jsFn //常用工具方法
+Vue.prototype._ = _
 
 // Registration of global components
 Vue.component('icon', FontAwesomeIcon)

+ 1 - 1
TEAMModelOS/ClientApp/src/common/BaseExamList.vue

@@ -73,7 +73,7 @@
             }
         },
         mounted() {
-            //this.$emit('chooseExam', this.examList[0]);
+            // this.$emit('chooseExam', this.examList[0]);
         }
     }
 </script>

+ 3 - 0
TEAMModelOS/ClientApp/src/common/Loading.vue

@@ -46,6 +46,9 @@
                 case '4':
                     this.imgSrc = require('@/assets/loading/loading4.svg')
                     break
+                case '5':
+                    this.imgSrc = require('@/assets/loading/logo_loading.png')
+                    break
                 default:
                     break
             }

File diff suppressed because it is too large
+ 7 - 7
TEAMModelOS/ClientApp/src/common/NoData.vue


+ 39 - 39
TEAMModelOS/ClientApp/src/common/UploadFile.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <div>
     <Upload type="drag" action="" multiple :before-upload="beforeUpload" class="upload-wrap">
       <p style="margin:20px 0px; margin-top:80px;font-size:30px;">{{$t('teachContent.uploadText')}}</p>
@@ -16,12 +16,12 @@
   </div>
 </template>
 <script>
-  require('@/utils/azure-storage-blob.js')
   import sha1 from 'js-sha1'
+  require('@/utils/azure-storage-blob.js')
   export default {
     data() {
       return {
-        urlString:'',
+        urlString: '',
         containerURL: undefined,
         sasString: '',
         uploadedList: [],
@@ -29,7 +29,7 @@
           ['JPG', 'JPEG', 'PNG', 'GIF'],
           ['AVI', 'MP4'],
           ['PPT', 'PPTX', 'DOC', 'DOCX', 'PDF', 'XLS', 'XLSX', 'HTE', 'HETX']
-        ],
+        ]
       }
     },
     props: {
@@ -57,18 +57,18 @@
       },
       initBlob() {
         this.containerURL = new window.azblob.ContainerURL(
-          //`https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}?${this.sasString}`,
-          this.urlString+ '/'+ this.pathName+this.sasString ,
+          // `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}?${this.sasString}`,
+          this.urlString + '/' + this.pathName + this.sasString,
           window.azblob.StorageURL.newPipeline(new window.azblob.AnonymousCredential())
         )
       },
       dataURLtoFile(dataurl, filename) {
-        var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
-          bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
+        var arr = dataurl.split(','); var mime = arr[0].match(/:(.*?);/)[1]
+          var bstr = atob(arr[1]); var n = bstr.length; var u8arr = new Uint8Array(n)
         while (n--) {
-          u8arr[n] = bstr.charCodeAt(n);
+          u8arr[n] = bstr.charCodeAt(n)
         }
-        return new File([u8arr], filename, { type: mime });
+        return new File([u8arr], filename, { type: mime })
       },
       compressFile(file, fileInfo) {
         if (fileInfo.type == 'picture') {
@@ -101,9 +101,9 @@
                 options
               ).then(
                 res => {
-                  //fileInfo['compressUrl'] = `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}/compress${file.name}`
-                  fileInfo['compressUrl'] = this.urlString  + '/' + this.pathName + '/compress' + file.name
-                  this.$emit("successData", fileInfo)
+                  // fileInfo['compressUrl'] = `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}/compress${file.name}`
+                  fileInfo['compressUrl'] = this.urlString + '/' + this.pathName + '/compress' + file.name
+                  this.$emit('successData', fileInfo)
                 },
                 err => {
                   fileInfo['status'] = 2
@@ -114,10 +114,10 @@
           }
         } else {
           let video = document.createElement('video')
-          video.setAttribute("width", "300")
-          video.setAttribute("controls", "controls")
-          video.setAttribute("crossOrigin",'*')
-          video.setAttribute("src", fileInfo.blobUrl + this.sasString)
+          video.setAttribute('width', '300')
+          video.setAttribute('controls', 'controls')
+          video.setAttribute('crossOrigin', '*')
+          video.setAttribute('src', fileInfo.blobUrl + this.sasString)
           video.addEventListener('loadeddata', () => {
             let canvas = document.createElement('canvas')
             canvas.width = 300
@@ -138,9 +138,9 @@
               compressBlobURL
             ).then(
               res => {
-                //fileInfo['compressUrl'] = `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}/${posterName}`
+                // fileInfo['compressUrl'] = `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}/${posterName}`
                 fileInfo['compressUrl'] = this.urlString + '/' + this.pathName + '/' + posterName
-                this.$emit("successData", fileInfo)
+                this.$emit('successData', fileInfo)
               },
               err => {
                 fileInfo['status'] = 2
@@ -157,13 +157,13 @@
         )
         let fileItem = {}
         fileItem['fileName'] = file.name
-        //fileItem['blobUrl'] = `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}/${file.name}`
-        fileItem['blobUrl'] = this.urlString + '/' + this.pathName + '/'+ file.name
+        // fileItem['blobUrl'] = `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}/${this.pathName}/${file.name}`
+        fileItem['blobUrl'] = this.urlString + '/' + this.pathName + '/' + file.name
         fileItem['extension'] = file.name.substring(file.name.lastIndexOf('.') + 1)
         fileItem['size'] = file.size
         fileItem['status'] = 0
         fileItem['contentType'] = file.type
-        let type = 'other';
+        let type = 'other'
         for (let item in this.contentTypes) {
           if (this.contentTypes[item].indexOf(fileItem.extension.toUpperCase()) !== -1) {
             switch (true) {
@@ -192,7 +192,7 @@
           res => {
             let reader = new FileReader()
             reader.readAsArrayBuffer(file)
-            //reader.readAsArrayBuffer(file)
+            // reader.readAsArrayBuffer(file)
             reader.onload = (ev) => {
               try {
                 let fileRes = ev.target.result
@@ -202,9 +202,9 @@
                 this.uploadedList[index]['createTime'] = Date.parse(res.lastModified)
                 this.uploadedList[index]['sha1Code'] = str
                 if (this.uploadedList[index].type == 'picture' || this.uploadedList[index].type == 'video') {
-                  this.compressFile(file,this.uploadedList[index])
+                  this.compressFile(file, this.uploadedList[index])
                 } else {
-                  this.$emit("successData", this.uploadedList[index])
+                  this.$emit('successData', this.uploadedList[index])
                 }
               } catch (e) {
                 console.log(e)
@@ -219,7 +219,7 @@
         return false
       },
       beforeUpload(file) {
-        let url =  file.name
+        let url = file.name
         this.$api.uploadFile.getContainerSAS().then(
           (res) => {
             if (res.error == null) {
@@ -228,37 +228,37 @@
               this.initBlob()
               this.uploadToBlob(file)
             } else {
-              alert("API error!")
+              alert('API error!')
             }
           },
           (err) => {
-            alert("API error!")
+            alert('API error!')
           }
         )
         return false
       },
       getIndex(_arr, _obj) {
-        var len = _arr.length;
+        var len = _arr.length
         for (let i = 0; i < len; i++) {
-          if (this.isObjEqual(_arr[i],_obj)) {
-            return parseInt(i);
+          if (this.isObjEqual(_arr[i], _obj)) {
+            return parseInt(i)
           }
         }
-        return -1;
+        return -1
       },
       isObjEqual(o1, o2) {
-        var props1 = Object.keys(o1);
-        var props2 = Object.keys(o2);
+        var props1 = Object.keys(o1)
+        var props2 = Object.keys(o2)
         if (props1.length != props2.length) {
-          return false;
+          return false
         }
         for (var i = 0, max = props1.length; i < max; i++) {
-          var propName = props1[i];
+          var propName = props1[i]
           if (o1[propName] !== o2[propName]) {
-            return false;
+            return false
           }
         }
-        return true;
+        return true
       }
     },
     mounted() {
@@ -281,4 +281,4 @@
     display:inline-block;
     margin-left:10px;
   }
-</style>
+</style>

+ 28 - 1
TEAMModelOS/ClientApp/src/components/learnactivity/ChooseContent.less

@@ -7,6 +7,9 @@
 
 .choose-question-wrap {
   height: ~"calc(100% - 76px)";
+  position:relative;
+  padding-left:10px;
+  padding-bottom:40px;
 }
 .seach-input {
   position: absolute;
@@ -21,7 +24,7 @@
     height: ~"calc(100% - 30px)";
     background: #2c2c2c;
     padding-top: 15px;
-
+    
     .content-filter-wrap {
       width: 100%;
       border-bottom: 1px solid #606060;
@@ -41,6 +44,15 @@
     }
   }
 }
+.page-wrap {
+    width: 100%;
+    position: fixed;
+    bottom: 30px;
+    padding: 5px 0px;
+    background: rgba(20,20,20,.8);
+    text-align: center;
+    color: white;
+}
 .syllabus-content-wrap {
   display: flex;
   flex-direction: row;
@@ -110,4 +122,19 @@
     vertical-align: text-top;
     border-radius: 2px;
   }
+}
+.manual-filter-item {
+    margin-top: 5px;
+    margin-bottom: 8px;
+    color:white;
+    .manual-filter-label {
+        width: 60px;
+        display: inline-block;
+    }
+}
+.question-filter-wrap {
+    width: 100%;
+    border-bottom: 1px solid #666666;
+    margin-bottom: 10px;
+    padding-left:10px;
 }

File diff suppressed because it is too large
+ 599 - 471
TEAMModelOS/ClientApp/src/components/learnactivity/ChooseContent.vue


+ 7 - 9
TEAMModelOS/ClientApp/src/components/learnactivity/QuestionList.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <div>
     <div :class="index == openIndex ? 'question-item-wrap-detail question-item-wrap':'question-item-wrap'" v-for="(item,index) in questions">
       <p class="question-content">
@@ -23,8 +23,6 @@
           <span v-for="(answerItem,index) in item.answer" v-html='answerItem'></span>
         </p>
         <div class="question-control-wrap">
-          <!--<Button class="question-control-btn" type="warning" size="small">补救资源</Button>
-          <Button class="question-control-btn" type="warning" size="small">删除</Button>-->
           <Icon type="md-trash" class="question-control-btn" size="25" title="删除" v-if="config.showDelete" @click="deleteQuestion(index)"/>
           <Icon type="ios-link" class="question-control-btn" size="25" title="补救资源" v-if="config.showRemedy"/>
         </div>
@@ -53,9 +51,9 @@
           }
         }
       },
-      showSelect: { //是否显示选题图标
+      showSelect: { // 是否显示选题图标
         type: Boolean,
-        default:false
+        default: false
       }
     },
     data() {
@@ -67,19 +65,19 @@
     },
     methods: {
       deleteQuestion(index) {
-        this.$emit('deleteQuestion',this.questions[index])
+        this.$emit('deleteQuestion', this.questions[index])
       },
       selectQuestion(data) {
         this.$emit('seleteQuestion', data)
       },
       groupBy(array, key) {
         const groups = {}
-        array.forEach(function (item) {
+        array.forEach(function(item) {
           const group = JSON.stringify(item[key])
           groups[group] = groups[group] || []
           groups[group].push(item)
         })
-        return Object.keys(groups).map(function (group) {
+        return Object.keys(groups).map(function(group) {
           return groups[group]
         })
       },
@@ -104,4 +102,4 @@
     border-radius:0px;
     border-bottom:1px solid #aaaaaa;
   }
-</style>
+</style>

+ 17 - 18
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseBar.vue

@@ -10,15 +10,15 @@
             return {
                 subjectList: [],
                 subjectSeries: [],
-                subjectColors:['#db615e','#db8dd2','#42beda','#1EB58D','#99ccff','#dbaf4f'],
+                subjectColors: ['#db615e', '#db8dd2', '#42beda', '#1EB58D', '#99ccff', '#dbaf4f'],
                 lineData: 440,
                 areaData: 490.5
             }
         },
         created() {
-            //this.subjectList = this.echartsData
-            //console.log(this.echartsData)
-            //if (this.getBaseBarData) this.handleOptions(this.getBaseBarData)
+            // this.subjectList = this.echartsData
+            // console.log(this.echartsData)
+            // if (this.getBaseBarData) this.handleOptions(this.getBaseBarData)
 
         },
 
@@ -26,10 +26,10 @@
 
             // 处理动态配置文件
             handleOptions(val) {
-                let subjectList = val.datas;
+                let subjectList = val.datas
 
                 // 配置 柱状图的 Series 根据科目 配置
-                subjectList.forEach((item,index) => {
+                subjectList.forEach((item, index) => {
                     let seriesItem = {
                         name: item.name,
                         type: 'bar',
@@ -39,7 +39,7 @@
                             color: this.subjectColors[index],
                             width: 10
                         },
-                        data:item.score
+                        data: item.score
                     }
                     this.subjectSeries.push(seriesItem)
                 })
@@ -67,7 +67,7 @@
                             width: 2
                         }
                     }, // 平均分为各科平均分总和
-                    data: [...Array(val.classList.length)].map(() => val.subjectAverage.map(item => Number(item)).reduce(function (pre, cur) { return pre + cur }).toFixed(2))
+                    data: [...Array(val.classList.length)].map(() => val.subjectAverage.map(item => Number(item)).reduce(function(pre, cur) { return pre + cur }).toFixed(2))
                 }
 
                 // 配置区级平均分折线图Series
@@ -131,7 +131,7 @@
                         textStyle: {
                             color: '#fff'
                         },
-                        formatter: function (value) {
+                        formatter: function(value) {
                             let arr = value[0].name + '<br>'
                             let sum = 0
                             for (var i = 0; i < value.length; i++) {
@@ -302,17 +302,17 @@
 
                 // 绘制图表
                 myBar.setOption(option)
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myBar.resize()
                 })
 
                 // 渲染完成事件
-                myBar.on('finished', function () {
-                    //console.log("Render Finish!!!")
-                });
+                myBar.on('finished', function() {
+                    // console.log("Render Finish!!!")
+                })
 
                 // 点击图例 根据展示的科目来计算最新的 校级和区级平均总和
-                myBar.on('legendselectchanged', function (obj) {
+                myBar.on('legendselectchanged', function(obj) {
                     var selected = obj.selected
                     let arr = []
                     for (let i in selected) {
@@ -332,7 +332,7 @@
                                 schoolArr.push(Number(data.datas.filter(item => item.name === key)[0].schoolAverage))
                                 areaArr.push(Number(data.datas.filter(item => item.name === key)[0].areaAverage) + 15)
                             } else {
-                                emptyNum ++
+                                emptyNum++
                             }
                         }
                     })
@@ -343,14 +343,13 @@
                         myBar.setOption(option)
                     } else {
                         // 如果展示 则计算展示科目的平均分之和
-                        let newSchoolAverage = schoolArr.reduce(function (pre, cur) { return pre + cur }).toFixed(2)
-                        let newAreaAverage = areaArr.reduce(function (pre, cur) { return pre + cur }).toFixed(2)
+                        let newSchoolAverage = schoolArr.reduce(function(pre, cur) { return pre + cur }).toFixed(2)
+                        let newAreaAverage = areaArr.reduce(function(pre, cur) { return pre + cur }).toFixed(2)
                         // 计算完赋值最新的 平均分折线 值
                         option.series[option.series.length - 2].data = [...Array(data.classList.length).keys()].map(item => newSchoolAverage)
                         option.series[option.series.length - 1].data = [...Array(data.classList.length).keys()].map(item => newAreaAverage)
                             myBar.setOption(option)
                     }
-
                 })
             }
         },

+ 24 - 28
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseClassBar.vue

@@ -7,7 +7,7 @@
 <script>
     export default {
         name: 'BaseClassBar',
-        props: ['echartsId', 'echartsData','cIndex'],
+        props: ['echartsId', 'echartsData', 'cIndex'],
         data() {
             return {
                 radarData: []
@@ -17,19 +17,19 @@
         methods: {
             // 计算数组平均值
             getAverage(arr) {
-                return arr.reduce((acc, val) => acc + val, 0) / arr.length;
+                return arr.reduce((acc, val) => acc + val, 0) / arr.length
             },
             drawLine(echartsData) {
                 let that = this
 
-                let origin = this.echartsData  // 拿到传过来的雷达图数据
-                let cIndex = this.cIndex  // 拿到当前要展示的班级序号
+                let origin = this.echartsData // 拿到传过来的雷达图数据
+                let cIndex = this.cIndex // 拿到当前要展示的班级序号
                 let radarOpt = {}
                 radarOpt.index = []
                 radarOpt.indicator = []
                 radarOpt.classAverage = []
                 radarOpt.gradeAverage = []
-                origin.subjectName.forEach((item,index) => {
+                origin.subjectName.forEach((item, index) => {
                     radarOpt.indicator.push({ name: item, max: 1 }) // 雷达图顶点
                     radarOpt.classAverage.push(origin.AveragePoint[index][cIndex] * 100) // 班级平均
                     radarOpt.gradeAverage.push((this.getAverage(origin.AveragePoint[index]) * 100).toFixed(2)) // 平均值
@@ -39,14 +39,14 @@
                 let myLine = this.$echarts.init(
                     document.getElementById(this.echartsId),
                     'chalk'
-                );
+                )
 
                 myLine.showLoading({
                     text: '',
                     color: '#4cbbff',
                     textColor: '#4cbbff',
-                    maskColor: 'rgba(0, 0, 0, 0)',
-                });
+                    maskColor: 'rgba(0, 0, 0, 0)'
+                })
 
                 // 指定图表的配置项和数据
                 var option = {
@@ -58,14 +58,13 @@
                         axisPointer: {
                             type: 'shadow'
                         },
-                        formatter: function (params) {
+                        formatter: function(params) {
                             let result = params[0].name
                             for (let i = 0; i < params.length; i++) {
                                 if (i === params.length - 1) {
                                     result += '<br>' + params[i].marker + params[i].seriesName + ':' + (parseInt(params[i].value))
                                 } else {
                                     result += '<br>' + params[i].marker + that.$t('totalAnalysis.ka_table_text6') + params[i].seriesName + ':' + (params[i].value) + '%'
-
                                 }
                             }
                             return result
@@ -86,7 +85,7 @@
                         }
                     },
                     legend: {
-                        data: [this.$t('totalAnalysis.echarts_text4'), this.$t('totalAnalysis.echarts_text5'),this.$t('totalAnalysis.echarts_text16')],
+                        data: [this.$t('totalAnalysis.echarts_text4'), this.$t('totalAnalysis.echarts_text5'), this.$t('totalAnalysis.echarts_text16')],
                         textStyle: {
                             color: '#FFFFFF'
                         }
@@ -155,21 +154,21 @@
                         itemStyle: {
                             normal: {
                                 color: '#fccb05',
-                                barBorderRadius: 12,
-                            },
+                                barBorderRadius: 12
+                            }
                         }
                         }, {
                             name: this.$t('totalAnalysis.echarts_text5'),
                             type: 'bar',
                             data: radarOpt.gradeAverage,
-                            barWidth: 20, //柱图宽度
+                            barWidth: 20, // 柱图宽度
                             itemStyle: {
                                 normal: {
                                     color: '#09bcb7',
-                                    barBorderRadius: 11,
+                                    barBorderRadius: 11
                                 }
 
-                            },
+                            }
                         }, {
                             name: this.$t('totalAnalysis.echarts_text16'),
                             type: 'line',
@@ -178,22 +177,20 @@
                             itemStyle: {
                                 normal: {
                                     color: '#F79510',
-                                    barBorderRadius: 11,
+                                    barBorderRadius: 11
                                 }
-                            },
+                            }
                         }]
-                };
+                }
 
                 setTimeout(() => {
                     // 绘制图表
-                    myLine.setOption(option);
+                    myLine.setOption(option)
 
-                    myLine.hideLoading();
+                    myLine.hideLoading()
                 }, 100)
 
-
-
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myLine.resize()
                 })
             }
@@ -201,18 +198,17 @@
         mounted() {
             document.getElementById(this.echartsId).style.width = '290px'
 
-            if (this.echartsData) this.drawLine(this.echartsData);
+            if (this.echartsData) this.drawLine(this.echartsData)
         },
         watch: {
             echartsData(val) {
                 if (!val) return
                 console.log(val)
 
-                this.drawLine(val);
-
+                this.drawLine(val)
             }
         }
-    };
+    }
 </script>
 
 <!-- Add 'scoped' attribute to limit CSS to this component only -->

+ 22 - 22
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseClassRadar.vue

@@ -7,26 +7,26 @@
 <script>
     export default {
         name: 'BaseClassRadar',
-        props: ['echartsId','boxWidth','echartsData','cIndex'],
+        props: ['echartsId', 'boxWidth', 'echartsData', 'cIndex'],
         data() {
             return {
                 radarData: []
             }
         },
         created() {
-            //this.drawLine()
+            // this.drawLine()
         },
         methods: {
             // 计算数组平均值
             getAverage(arr) {
-                return arr.reduce((acc, val) => acc + val, 0) / arr.length;
+                return arr.reduce((acc, val) => acc + val, 0) / arr.length
             },
             drawLine(radarOpt) {
                 let that = this
                 let myRadar = this.$echarts.init(
                     document.getElementById(this.echartsId),
                     'chalk'
-                );
+                )
 
                 // 指定图表的配置项和数据
                 var option = {
@@ -48,7 +48,7 @@
                         }
                     },
                     tooltip: {
-                        formatter: function (params) {
+                        formatter: function(params) {
                             let result = '得分率' + params.name
                             let subjectList = that.echartsData.subjectName
                             for (let i = 0; i < subjectList.length; i++) {
@@ -62,7 +62,7 @@
                         data: [this.$t('totalAnalysis.echarts_text4'), this.$t('totalAnalysis.echarts_text5')],
                         textStyle: {
                             color: '#fff',
-                            padding:[2,0,0,0]
+                            padding: [2, 0, 0, 0]
                         }
                     },
                     radar: {
@@ -103,7 +103,7 @@
                                     shadowColor: 'rgba(0,0,0,.2)',
                                     shadowOffsetX: 0,
                                     shadowOffsetY: 10,
-                                    opacity: .4
+                                    opacity: 0.4
                                 }
                             },
                             data: [
@@ -118,42 +118,42 @@
                             ]
                         }
                     ],
-                    color: ['#7db41b', '#b1eadb'],
-                };
-                 
+                    color: ['#7db41b', '#b1eadb']
+                }
+
                 // 绘制图表
-                myRadar.setOption(option);
+                myRadar.setOption(option)
                 myRadar.resize()
 
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myRadar.resize()
                 })
-                //console.log(document.getElementById(this.echartsId).style)
+                // console.log(document.getElementById(this.echartsId).style)
             }
 
         },
         mounted() {
-            //this.drawLine()
-            this.$nextTick(function () {
+            // this.drawLine()
+            this.$nextTick(function() {
                 document.getElementById(this.echartsId).style.width = this.boxWidth + 'px'
 
-                let origin = this.echartsData  // 拿到传过来的雷达图数据
-                let cIndex = this.cIndex  // 拿到当前要展示的班级序号
+                let origin = this.echartsData // 拿到传过来的雷达图数据
+                let cIndex = this.cIndex // 拿到当前要展示的班级序号
                 let radarOpt = {}
                 radarOpt.index = parseInt(origin.ClassCore[cIndex])
                 radarOpt.indicator = []
                 radarOpt.classAverage = []
-                radarOpt.gradeAverage =[]
-                origin.subjectName.forEach((item,index) => {
+                radarOpt.gradeAverage = []
+                origin.subjectName.forEach((item, index) => {
                     radarOpt.indicator.push({ name: item, max: 1 }) // 雷达图顶点
                     radarOpt.classAverage.push(origin.AveragePoint[index][cIndex]) // 班级平均
                     radarOpt.gradeAverage.push(this.getAverage(origin.AveragePoint[index]).toFixed(2)) // 平均值
                 })
 
-                this.drawLine(radarOpt);
-            });
+                this.drawLine(radarOpt)
+            })
         }
-    };
+    }
 </script>
 
 <!-- Add 'scoped' attribute to limit CSS to this component only -->

+ 11 - 13
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseEntryBar.vue

@@ -9,7 +9,7 @@
             return {
             }
         },
-        
+
         methods: {
             drawLine(data) {
                 // 基于准备好的dom,初始化echarts实例
@@ -39,17 +39,16 @@
                             // 提示框内容的样式
                             color: '#fff'
                         },
-                        formatter: function (params) {
-                            var results = params[0].name + '<br>';
+                        formatter: function(params) {
+                            var results = params[0].name + '<br>'
                             for (var i = 0; i < params.length; i++) {
                                 if (params[i].seriesType === 'line') {
-                                    results += params[i].marker + params[i].seriesName + ':' + params[i].data + '%<br>';
+                                    results += params[i].marker + params[i].seriesName + ':' + params[i].data + '%<br>'
                                 } else {
-                                    results += params[i].marker + params[i].seriesName + ':' + params[i].data + '<br>';
+                                    results += params[i].marker + params[i].seriesName + ':' + params[i].data + '<br>'
                                 }
-                                
                             }
-                            return results;
+                            return results
                         }
                     },
                     grid: {
@@ -204,8 +203,8 @@
                                     fontFamily: 'Microsoft YaHei'
                                 }
                             }
-                        },
-                        , {
+                        },,
+                         {
                             type: 'value',
                             max: 100,
                             min: 0,
@@ -226,7 +225,7 @@
                                 color: '#989898', // 默认轴线的颜色
                                 fontSize: 12,
                                 fontFamily: 'Microsoft YaHei',
-                                formatter: function (value) {
+                                formatter: function(value) {
                                     return value + '%'
                                 }
                             },
@@ -264,7 +263,7 @@
                                 borderWidth: 3
                             },
                             symbolSize: 10,
-                            yAxisIndex:1,
+                            yAxisIndex: 1,
                             lineStyle: {
                                 normal: {
                                     width: 2,
@@ -281,7 +280,7 @@
 
                 // 绘制图表
                 myBar.setOption(option)
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myBar.resize()
                 })
             }
@@ -299,7 +298,6 @@
             getEntryBarData(val) {
                 if (!val) return
                 this.drawLine(this.$tools.jsonTransform(val.entryLineBar))
-
             }
         }
     }

+ 17 - 19
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseGeniusLine.vue

@@ -7,7 +7,7 @@
 <script>
     export default {
         name: 'BaseGeniusLine',
-        props: ['echartsId','echartsData'],
+        props: ['echartsId', 'echartsData'],
         data() {
             return {
                 radarData: []
@@ -20,14 +20,14 @@
                 let myLine = this.$echarts.init(
                     document.getElementById(this.echartsId),
                     'chalk'
-                );
+                )
 
                 myLine.showLoading({
                     text: '',
                     color: '#4cbbff',
                     textColor: '#4cbbff',
-                    maskColor: 'rgba(0, 0, 0, 0)',
-                });
+                    maskColor: 'rgba(0, 0, 0, 0)'
+                })
 
                 // 指定图表的配置项和数据
                 var option = {
@@ -40,17 +40,16 @@
                         axisPointer: {
                             type: 'shadow'
                         },
-                        formatter: function (params) {
-                            var results = params[0].name + '<br>';
+                        formatter: function(params) {
+                            var results = params[0].name + '<br>'
                             for (var i = 0; i < params.length; i++) {
                                 if (params[i].seriesType === 'line') {
-                                    results += params[i].marker + params[i].seriesName + ':' + params[i].data + '%<br>';
+                                    results += params[i].marker + params[i].seriesName + ':' + params[i].data + '%<br>'
                                 } else {
-                                    results += params[i].marker + params[i].seriesName + ':' + params[i].data + '<br>';
+                                    results += params[i].marker + params[i].seriesName + ':' + params[i].data + '<br>'
                                 }
-
                             }
-                            return results;
+                            return results
                         }
                     },
                     grid: {
@@ -162,7 +161,7 @@
                             type: 'bar',
                             itemStyle: {
                                 normal: {
-                                    //barBorderRadius: [30, 30, 0, 0],
+                                    // barBorderRadius: [30, 30, 0, 0],
                                     color: this.$echarts.graphic.LinearGradient(0, 1, 0, 0, [
                                         {
                                             offset: 0,
@@ -232,28 +231,27 @@
                             }
                         }
                     ]
-                };
+                }
 
                     // 绘制图表
-                myLine.setOption(option);
-                myLine.hideLoading();
+                myLine.setOption(option)
+                myLine.hideLoading()
 
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myLine.resize()
                 })
             }
         },
         mounted() {
-            if (this.echartsData) this.drawLine();
+            if (this.echartsData) this.drawLine()
         },
         watch: {
             echartsData(val) {
                 if (!val) return
-                this.drawLine(val);
-
+                this.drawLine(val)
             }
         }
-    };
+    }
 </script>
 
 <!-- Add 'scoped' attribute to limit CSS to this component only -->

+ 32 - 35
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseGradeRadar.vue

@@ -7,20 +7,19 @@
 <script>
     export default {
         name: 'BaseGradeRadar',
-        props: ['echartsId','echartsData'],
+        props: ['echartsId', 'echartsData'],
         data() {
             return {
                 radarData: []
             }
         },
         created() {
-            
 
         },
         methods: {
             // 计算数组平均值
             getAverage(arr) {
-                return arr.reduce((acc, val) => acc + val, 0) / arr.length;
+                return arr.reduce((acc, val) => acc + val, 0) / arr.length
             },
 
             drawLine(radarOpt) {
@@ -28,29 +27,29 @@
                 let myRadar = this.$echarts.init(
                     document.getElementById(this.echartsId),
                     'chalk'
-                );
+                )
 
                 // 指定图表的配置项和数据
                 var option = {
                     title: {
                         text: parseInt(radarOpt.index),
-                        subtext:'成就指数',
+                        subtext: '成就指数',
                         left: 'center',
-                        top:'46.3%',
+                        top: '46.3%',
                         textStyle: {
-                            color:'#F4F8FA',
-                            fontWeight:'bold',
+                            color: '#F4F8FA',
+                            fontWeight: 'bold',
                             fontSize: 34
                         },
-                        subtextStyle:{
-                            color:'#E7EBEC',
-                            fontWeight:'normal',
+                        subtextStyle: {
+                            color: '#E7EBEC',
+                            fontWeight: 'normal',
                             fontSize: 12,
-                            lineHeight:8
+                            lineHeight: 8
                         }
                     },
                     tooltip: {
-                        formatter: function (params) {
+                        formatter: function(params) {
                             let result = '得分率' + params.name
                             let subjectList = that.echartsData.subjectName
                             for (let i = 0; i < subjectList.length; i++) {
@@ -59,18 +58,18 @@
                             return result
                         }
                     },
-                    
+
                     legend: {
                         itemHeight: 14,
-                        selectedMode:false,
+                        selectedMode: false,
                         data: [this.$t('totalAnalysis.echarts_text1'), this.$t('totalAnalysis.echarts_text2'), this.$t('totalAnalysis.echarts_text3')],
                         textStyle: {
                             color: '#fff',
-                            padding:[5,0,0,0]
+                            padding: [5, 0, 0, 0]
                         },
                         top: 0,
-                        right:"4%",
-                        orient: 'vertical',
+                        right: '4%',
+                        orient: 'vertical'
 
                     },
                     radar: {
@@ -107,7 +106,7 @@
                             },
                             lineStyle: {
                                 normal: {
-                                    width:4
+                                    width: 4
                                 }
                             },
                             data: [
@@ -132,18 +131,17 @@
                             },
                             lineStyle: {
                                 normal: {
-                                    width:4
+                                    width: 4
                                 }
                             },
                             data: [
-                                
+
                                 {
                                     value: radarOpt.average,
                                     name: this.$t('totalAnalysis.echarts_text2')
                                 }
                             ]
-                        },
-                        ,
+                        },,
                         {
                             name: '高一年级',
                             type: 'radar',
@@ -159,11 +157,11 @@
                             },
                             lineStyle: {
                                 normal: {
-                                    width:4
+                                    width: 4
                                 }
                             },
                             data: [
-                                
+
                                 {
                                     value: radarOpt.RL,
                                     name: this.$t('totalAnalysis.echarts_text3')
@@ -171,27 +169,26 @@
                             ]
                         }
                     ],
-                    color: ['rgba(86,199,60, 1)', 'rgba(0,183,238, 1)', '#b6a2de'],
-                };
+                    color: ['rgba(86,199,60, 1)', 'rgba(0,183,238, 1)', '#b6a2de']
+                }
 
                 // 绘制图表
-                myRadar.setOption(option);
-                window.addEventListener('resize', function () {
+                myRadar.setOption(option)
+                window.addEventListener('resize', function() {
                     myRadar.resize()
                 })
-            },
-
+            }
 
         },
         mounted() {
-            let origin = this.echartsData  // 拿到传过来的雷达图数据
+            let origin = this.echartsData // 拿到传过来的雷达图数据
             let radarOpt = {}
             radarOpt.index = origin.index
             radarOpt.indicator = []
             radarOpt.RH = []
             radarOpt.RL = []
-            radarOpt.average =[]
-            origin.subjectName.forEach((item,index) => {
+            radarOpt.average = []
+            origin.subjectName.forEach((item, index) => {
                 radarOpt.indicator.push({ name: item, max: 1 }) // 雷达图顶点
                 radarOpt.RH.push(Math.max.apply(null, origin.AveragePoint[index])) // 最高值
                 radarOpt.RL.push(Math.min.apply(null, origin.AveragePoint[index])) // 最低值
@@ -199,7 +196,7 @@
             })
             this.drawLine(radarOpt)
         }
-    };
+    }
 </script>
 
 <!-- Add 'scoped' attribute to limit CSS to this component only -->

+ 5 - 5
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseKnowledgeDetail.vue

@@ -5,7 +5,7 @@
 <script>
     export default {
         name: 'hello',
-        props: ['echartData','echartsId'],
+        props: ['echartData', 'echartsId'],
         data() {
             return {
                 knowledgeData: [],
@@ -42,7 +42,7 @@
                             // 提示框内容的样式
                             color: '#fff'
                         },
-                        formatter: function (value) {
+                        formatter: function(value) {
                             // console.log(value);
                             return value[0].name + ' : ' + value[0].data + '%'
                         }
@@ -155,7 +155,7 @@
                             type: 'bar',
                             animation: false,
                             itemStyle: {
-                                color: function (params) {
+                                color: function(params) {
                                     var key = params.dataIndex
                                     if (key === _this.activeItemIndex) {
                                         return '#ff9999'
@@ -178,12 +178,12 @@
                 // 绘制图表
                 myBar.setOption(option)
                 myBar.resize()
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myBar.resize()
                 })
 
                 let that = this
-                myBar.on('click', function (params) {
+                myBar.on('click', function(params) {
                     that.activeItemIndex = params.dataIndex
                     that.$emit('handleItemClick', params)
                     myBar.setOption(option)

+ 4 - 5
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseKnowledgeRadar.vue

@@ -26,12 +26,12 @@
                 // 指定图表的配置项和数据
                 var option = {
                     tooltip: {
-                        formatter: function (params) {
-                            var results = params.marker + '知识点占比情况<br>';
+                        formatter: function(params) {
+                            var results = params.marker + '知识点占比情况<br>'
                             for (var i = 0; i < params.value.length; i++) {
-                                results += indicator[i].name + ':' + params.value[i] + '%<br>';
+                                results += indicator[i].name + ':' + params.value[i] + '%<br>'
                             }
-                            return results;
+                            return results
                         }
                     },
                     radar: {
@@ -116,7 +116,6 @@
 
                 // 绘制图表
                 myRadar.setOption(option)
-
             },
 
             doRender(data) {

+ 4 - 5
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLevelPie.vue

@@ -26,7 +26,7 @@
                         formatter: '{a} <br/>{b} : {c} ({d}%)'
                     },
                     calculable: true,
-                    roseType:true,
+                    roseType: true,
                     series: {
                         name: that.$t('totalAnalysis.ka_title1'),
                         type: 'pie',
@@ -40,10 +40,9 @@
 
                 // 绘制图表
                 myLevelPie.setOption(option)
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myLevelPie.resize()
                 })
-
             }
         },
         mounted() {
@@ -54,7 +53,7 @@
                 pointList.forEach((item, index) => {
                     let o = {}
                     o.name = item
-                    o.value = valList[index].replace('%','')
+                    o.value = valList[index].replace('%', '')
                     arr.push(o)
                 })
                 this.drawLine(arr)
@@ -76,7 +75,7 @@
                     pointList.forEach((item, index) => {
                         let o = {}
                         o.name = item
-                        o.value = valList[index].replace('%','')
+                        o.value = valList[index].replace('%', '')
                         arr.push(o)
                     })
                     this.drawLine(arr)

+ 9 - 10
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLevelRadar.vue

@@ -7,7 +7,7 @@
 <script>
     export default {
         name: 'helloLine',
-        props:['echartsId'],
+        props: ['echartsId'],
         data() {
             return {
                 radarData: []
@@ -18,7 +18,7 @@
             this.drawLine(this.radarData)
         },
         methods: {
-            drawLine(indicator,data) {
+            drawLine(indicator, data) {
                 // 基于准备好的dom,初始化echarts实例
                 let that = this
                 let myRadar = this.$echarts.init(document.getElementById(this.echartsId), 'chalk')
@@ -26,13 +26,13 @@
                 // 指定图表的配置项和数据
                 var option = {
                     tooltip: {
-                        formatter: function (params) {
-                            var results = params.marker + '知识点占比情况<br>';
+                        formatter: function(params) {
+                            var results = params.marker + '知识点占比情况<br>'
                             for (var i = 0; i < params.value.length; i++) {
-                                results += indicator[i].name + ':' + params.value[i] + '%<br>';
+                                results += indicator[i].name + ':' + params.value[i] + '%<br>'
                             }
-                            return results;
-                        }},
+                            return results
+                        } },
                     radar: {
                         triggerEvent: true,
                         name: {
@@ -45,7 +45,7 @@
                         },
                         center: ['50%', '50%'],
                         tooltip: {
-                            
+
                         },
                         indicator: indicator,
                         splitArea: {
@@ -115,7 +115,6 @@
 
                 // 绘制图表
                 myRadar.setOption(option)
-
             },
 
             doRender(data) {
@@ -124,7 +123,7 @@
                 list.pointList.forEach(item => {
                     indicator.push({
                         name: item,
-                        max:100
+                        max: 100
                     })
                 })
                 this.drawLine(indicator, list.per.map(item => (Number(item) * 100).toFixed(2)))

+ 3 - 4
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLine.vue

@@ -12,7 +12,7 @@
             }
         },
         created() {
-            
+
         },
         mounted() {
             this.drawLine()
@@ -134,7 +134,7 @@
             }
         },
         watch: {
-            
+
             // 渲染最新试题统计数据
             echartsData(val) {
                 if (!val) return
@@ -148,8 +148,7 @@
                 arr.push(Number(echartsData.R6))
                 this.y = arr
                 this.drawLine()
-                //this.tableData = JSON.parse(JSON.stringify(val))
-
+                // this.tableData = JSON.parse(JSON.stringify(val))
             }
         }
     }

+ 6 - 7
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseLineBar.vue

@@ -5,17 +5,17 @@
 <script>
     export default {
         name: 'hello',
-        props: ['echartData','exerciseIndex'],
+        props: ['echartData', 'exerciseIndex'],
         data() {
             return {
                 echartDatas: [],
-                currentExerciseIndex:0
+                currentExerciseIndex: 0
             }
         },
         created() {
         },
         methods: {
-            drawLine(echartData,exerciseIndex) {
+            drawLine(echartData, exerciseIndex) {
                 let that = this
                 let myBar = this.$echarts.init(document.getElementById('stuAverageBar'))
                 var option = {
@@ -58,7 +58,7 @@
                         textStyle: {
                             color: '#fff'
                         },
-                        formatter: function (params) {
+                        formatter: function(params) {
                             let result = params[0].name
                             for (let i = 0; i < params.length; i++) {
                                 result += '<br>' + params[i].marker + params[i].seriesName + ':' + params[i].data + '%'
@@ -211,7 +211,7 @@
 
                 // 绘制图表
                 myBar.setOption(option)
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myBar.resize()
                 })
             },
@@ -222,7 +222,7 @@
                 if (!data || !exerciseData) return
                 this.gradeRate = exerciseData[this.currentExerciseIndex].gradeScoreRate
                 this.areaRate = exerciseData[this.currentExerciseIndex].areaScoreRate
-                this.drawLine(data,this.currentExerciseIndex)
+                this.drawLine(data, this.currentExerciseIndex)
             }
         },
         mounted() {
@@ -247,7 +247,6 @@
                     this.currentExerciseIndex = +val - 1 // 拿到当前所选择的题号 确认数据下标
                     this.doRender(this.getClassExerciseData)
                 }
-
             }
 
         }

+ 21 - 23
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseMyTable.vue

@@ -58,17 +58,17 @@
         data() {
             return {
                 isShowBorder: true,
-                isFirst:true,
+                isFirst: true,
                 subjectSelectVal: 0,
                 tableData: [],
-                firstData:[],
-                originData:[],
+                firstData: [],
+                originData: [],
                 tableColumns: [],
                 subjectList: [],
-                currentPage:1,
-                pageSizes:10,
+                currentPage: 1,
+                pageSizes: 10,
                 pageSizeOpts: [5, 10, 20, 30, 40],
-                poperData: [],
+                poperData: []
             }
         },
         created() {
@@ -86,15 +86,15 @@
                 switch (order) {
                     case 'asc':
                         this.originData = this.tableDatas.sort((a, b) => { return Number(a[key]) - Number(b[key]) })
-                        break;
+                        break
                     case 'desc':
                         this.originData = this.tableDatas.sort((a, b) => { return Number(b[key]) - Number(a[key]) })
-                        break;
+                        break
                     case 'normal':
                         this.originData = this.firstData
-                        break;
+                        break
                     default:
-                        break;
+                        break
                 }
                 this.pageChange(1)
             },
@@ -109,20 +109,19 @@
                         this.originData = this.tableDatas.filter(item => item.score > 180 && item.score < 200)
                         break
                     case 3:
-                        console.log("进步班级")
+                        console.log('进步班级')
                         break
                     case 4:
-                        console.log("退步班级")
+                        console.log('退步班级')
                         break
                     case 5:
-                        console.log("稳定班级")
+                        console.log('稳定班级')
                         break
                     default:
                         this.originData = this.firstData
                         break
                 }
                         this.pageChange(1)
-
             },
 
             // 分页操作
@@ -147,7 +146,7 @@
                 let row = params.row
                 return h('span', {
                     on: {
-                        click: function () {
+                        click: function() {
                             that.$router.push({ name: 'earlyWarning', params: { name: params.row.classId } })
                         }
                     },
@@ -181,7 +180,7 @@
                 let that = this
                 return h('span', {
                     on: {
-                        click: function () {
+                        click: function() {
                             that.$parent.$parent.$parent.isShowQuestions = true
                             that.$router.push({ path: '/total/questionList', query: { QIndex: params.row.id } })
                         }
@@ -324,7 +323,7 @@
             renderHard(h, params) {
                 let that = this
                 const list = params.row.hardList ? params.row.hardList : params.row.itemNO.split(',')
-                return h('span', list.map(function (item, index) {
+                return h('span', list.map(function(item, index) {
                     return h('span', {
                         style: {
                             fontSize: '16px',
@@ -333,7 +332,7 @@
                             cursor: 'pointer'
                         },
                         on: {
-                            'click': function () {
+                            'click': function() {
                                 that.$parent.$parent.$parent.isShowQuestions = true
                                 that.$router.push({ path: '/total/questionList', query: { QIndex: item } })
                             }
@@ -346,7 +345,7 @@
             renderCareful(h, params) {
                 let that = this
                 const row = params.row
-                return h('span', row.carefulList.map(function (item, index) {
+                return h('span', row.carefulList.map(function(item, index) {
                     return h('span', {
                         style: {
                             fontSize: '16px',
@@ -356,7 +355,7 @@
                             // textDecoration: "underline"
                         },
                         on: {
-                            'click': function () {
+                            'click': function() {
                                 that.$parent.$parent.$parent.isShowQuestions = true
                                 that.$router.push({ path: '/total/questionList', query: { QIndex: item } })
                             }
@@ -365,7 +364,6 @@
                 }))
             },
 
-
             // 渲染百分比数据
             renderPercent(h, params) {
                 return h('span', params.row.scoreRate + '%')
@@ -377,8 +375,8 @@
         },
 
         watch: {
-            tableDatas: function (data) {
-                this.originData = JSON.parse(JSON.stringify(data));
+            tableDatas: function(data) {
+                this.originData = JSON.parse(JSON.stringify(data))
                 if (this.isFirst) this.firstData = JSON.parse(JSON.stringify(data))
                 // 获取当前测评班级数据
                 this.subjectList = ['全部'].concat(this.$store.state.totalAnalysis.subjectList)

+ 4 - 5
TEAMModelOS/ClientApp/src/components/student-analysis/total/BasePie.vue

@@ -25,7 +25,7 @@
                         formatter: '{a} <br/>{b} : {c} ({d}%)'
                     },
                     calculable: true,
-                    roseType:true,
+                    roseType: true,
                     series: {
                         name: that.$t('totalAnalysis.ka_title1'),
                         type: 'pie',
@@ -40,10 +40,9 @@
                 // 绘制图表
                 myPie.setOption(option)
 
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myPie.resize()
                 })
-
             }
         },
         mounted() {
@@ -55,7 +54,7 @@
                     pointList.forEach((item, index) => {
                         let o = {}
                         o.name = item
-                        o.value = valList[index].replace('%','')
+                        o.value = valList[index].replace('%', '')
                         arr.push(o)
                     })
                     this.drawLine(arr)
@@ -71,7 +70,7 @@
             getPieData: {
                 deep: true,
                 handler(val) {
-                    //this.drawLine(newName)
+                    // this.drawLine(newName)
                     console.log(val)
                     let pointList = val.pointList
                     let valList = val.per

+ 4 - 5
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseRadar.vue

@@ -7,7 +7,7 @@
 <script>
     export default {
         name: 'helloLine',
-        props:['echartsId'],
+        props: ['echartsId'],
         data() {
             return {
                 radarData: []
@@ -18,7 +18,7 @@
             this.drawLine(this.radarData)
         },
         methods: {
-            drawLine(indicator,data) {
+            drawLine(indicator, data) {
                 // 基于准备好的dom,初始化echarts实例
                 let that = this
                 let myRadar = this.$echarts.init(document.getElementById(this.echartsId), 'chalk')
@@ -26,7 +26,7 @@
                 // 指定图表的配置项和数据
                 var option = {
                     tooltip: {
-                        formatter: function (params) {
+                        formatter: function(params) {
                             let result = params.name
                             let pointList = that.getKnowledgeData.pointList
                             for (let i = 0; i < pointList.length; i++) {
@@ -117,7 +117,6 @@
 
                 // 绘制图表
                 myRadar.setOption(option)
-
             },
 
             doRender(data) {
@@ -126,7 +125,7 @@
                 list.pointList.forEach(item => {
                     indicator.push({
                         name: item,
-                        max:100
+                        max: 100
                     })
                 })
                 this.drawLine(indicator, list.stupercent.grade.map(item => (Number(item) * 100).toFixed(0)))

+ 12 - 15
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseScatter.vue

@@ -5,12 +5,12 @@
 <script>
     export default {
         name: 'myScatter',
-        props:['scatterData'],
+        props: ['scatterData'],
         data() {
             return {
                 originArr: [],
                 dataArr: [],
-                childIndex:0,
+                childIndex: 0,
                 activeItemIndex: 0
             }
         },
@@ -36,7 +36,6 @@
                 return newArr
             },
 
-
             // 渲染散点图
             drawLine(data) {
                 // 基于准备好的dom,初始化echarts实例
@@ -58,7 +57,7 @@
                         textStyle: {
                             height: '160px'
                         },
-                        formatter: function (params) {
+                        formatter: function(params) {
                             const item = params
                             return `${_this.$t('totalAnalysis.base_name')}:${item.data[2]}
                         <br/>${_this.$t('totalAnalysis.sca_chart_text1')}:${item.data[1]}%
@@ -69,14 +68,14 @@
                     legend: {
                         data: [_this.$t('totalAnalysis.sca_text4')]
                     },
-                    //toolbox: {
+                    // toolbox: {
                     //    show: true,
                     //    right: '70px',
                     //    feature: {
                     //        dataZoom: { show: true },
                     //        restore: { show: false }
                     //    }
-                    //},
+                    // },
                     xAxis: [
                         {
                             type: 'value',
@@ -112,7 +111,7 @@
                             interval: 25,
                             axisLabel: {
                                 show: true,
-                                formatter: function (value) {
+                                formatter: function(value) {
                                     let val = []
                                     if (value !== 25) {
                                         val.push(value + '%')
@@ -127,15 +126,15 @@
                     ],
                     dataZoom: [{
                         show: true,
-                        type:'inside',
+                        type: 'inside',
                         start: 0,
                         end: 100,
                         bottom: 10,
-                        height: 15,
+                        height: 15
                     },
                     {
                         show: true,
-                        type:'slider',
+                        type: 'slider',
                         start: 0,
                         end: 100,
                         bottom: 0,
@@ -305,15 +304,14 @@
 
                 // 绘制图表
                 myScatter.setOption(option)
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myScatter.resize()
                 })
 
                 // 散点图元素点击事件
-                myScatter.on('click', function (item) {
+                myScatter.on('click', function(item) {
                     _this.activeItemIndex = item.dataIndex
                 })
-
             }
         },
 
@@ -339,10 +337,9 @@
                     } else {
                         this.drawLine(this.renderData(this.getScatterData))
                     }
-
                 }
 
-            },
+            }
         }
     }
 </script>

+ 26 - 30
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseSubjectBar.vue

@@ -16,19 +16,19 @@
         methods: {
             // 计算数组平均值
             getAverage(arr) {
-                return arr.reduce((acc, val) => acc + val, 0) / arr.length;
+                return arr.reduce((acc, val) => acc + val, 0) / arr.length
             },
             drawLine(echartsData) {
                 let that = this
 
-                let origin = this.echartsData  // 拿到传过来的雷达图数据
+                let origin = this.echartsData // 拿到传过来的雷达图数据
                 let radarOpt = {}
                 radarOpt.index = []
                 radarOpt.indicator = []
                 radarOpt.RH = []
                 radarOpt.RL = []
-                radarOpt.average =[]
-                origin.subjectName.forEach((item,index) => {
+                radarOpt.average = []
+                origin.subjectName.forEach((item, index) => {
                     radarOpt.indicator.push({ name: item, max: 1 }) // 雷达图顶点
                     radarOpt.RH.push(Math.max.apply(null, origin.AveragePoint[index]) * 100) // 最高值
                     radarOpt.RL.push(Math.min.apply(null, origin.AveragePoint[index]) * 100) // 最低值
@@ -39,14 +39,14 @@
                 let myLine = this.$echarts.init(
                     document.getElementById(this.echartsId),
                     'chalk'
-                );
+                )
 
                 myLine.showLoading({
                     text: '',
                     color: '#4cbbff',
                     textColor: '#4cbbff',
-                    maskColor: 'rgba(0, 0, 0, 0)',
-                });
+                    maskColor: 'rgba(0, 0, 0, 0)'
+                })
 
                 // 指定图表的配置项和数据
                 var option = {
@@ -58,14 +58,13 @@
                         axisPointer: {
                             type: 'shadow'
                         },
-                        formatter: function (params) {
+                        formatter: function(params) {
                             let result = params[0].name
                             for (let i = 0; i < params.length; i++) {
                                 if (i === params.length - 1) {
                                     result += '<br>' + params[i].marker + params[i].seriesName + ':' + (parseInt(params[i].value))
                                 } else {
                                     result += '<br>' + params[i].marker + that.$t('totalAnalysis.ka_table_text6') + params[i].seriesName + ':' + (params[i].value) + '%'
-
                                 }
                             }
                             return result
@@ -86,7 +85,7 @@
                         }
                     },
                     legend: {
-                        data: [this.$t('totalAnalysis.echarts_text1'), this.$t('totalAnalysis.echarts_text2'), this.$t('totalAnalysis.echarts_text3'),this.$t('totalAnalysis.echarts_text16')],
+                        data: [this.$t('totalAnalysis.echarts_text1'), this.$t('totalAnalysis.echarts_text2'), this.$t('totalAnalysis.echarts_text3'), this.$t('totalAnalysis.echarts_text16')],
                         textStyle: {
                             color: '#FFFFFF'
                         }
@@ -155,32 +154,32 @@
                         itemStyle: {
                             normal: {
                                 color: '#fccb05',
-                                barBorderRadius: 12,
-                            },
+                                barBorderRadius: 12
+                            }
                         }
                         }, {
                             name: this.$t('totalAnalysis.echarts_text2'),
                             type: 'bar',
                             data: radarOpt.RL,
-                            barWidth: 20, //柱图宽度
+                            barWidth: 20, // 柱图宽度
                             itemStyle: {
                                 normal: {
                                     color: '#09bcb7',
-                                    barBorderRadius: 11,
+                                    barBorderRadius: 11
                                 }
 
-                            },
+                            }
                         }, {
                             name: this.$t('totalAnalysis.echarts_text3'),
                             type: 'bar',
                             data: radarOpt.average,
-                            barWidth: 20, //柱图宽度
+                            barWidth: 20, // 柱图宽度
                             itemStyle: {
                                 normal: {
                                     color: '#248ff7',
-                                    barBorderRadius: 11,
+                                    barBorderRadius: 11
                                 }
-                            },
+                            }
                         }, {
                             name: this.$t('totalAnalysis.echarts_text16'),
                             type: 'line',
@@ -189,37 +188,34 @@
                             itemStyle: {
                                 normal: {
                                     color: '#F79510',
-                                    barBorderRadius: 11,
+                                    barBorderRadius: 11
                                 }
-                            },
+                            }
                         }]
-                };
+                }
 
                 setTimeout(() => {
                     // 绘制图表
-                    myLine.setOption(option);
+                    myLine.setOption(option)
 
-                    myLine.hideLoading();
+                    myLine.hideLoading()
                 }, 100)
 
-
-
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myLine.resize()
                 })
             }
         },
         mounted() {
-            if (this.echartsData) this.drawLine(this.echartsData);
+            if (this.echartsData) this.drawLine(this.echartsData)
         },
         watch: {
             echartsData(val) {
                 if (!val) return
-                this.drawLine(val);
-
+                this.drawLine(val)
             }
         }
-    };
+    }
 </script>
 
 <!-- Add 'scoped' attribute to limit CSS to this component only -->

+ 7 - 9
TEAMModelOS/ClientApp/src/components/student-analysis/total/BaseTestScatter.vue

@@ -5,7 +5,7 @@
 <script>
     export default {
         name: 'hello',
-        props:['currentIndex'],
+        props: ['currentIndex'],
         data() {
             return {
                 originArr: [],
@@ -53,7 +53,7 @@
                         textStyle: {
                             height: '160px'
                         },
-                        formatter: function (params) {
+                        formatter: function(params) {
                             const item = params
                             return `${_this.$t('totalAnalysis.ta_table_text1')}:${item.data[3]}
                         <br/>${_this.$t('totalAnalysis.ta_table_text2')}:${item.data[2]}
@@ -70,7 +70,7 @@
                         start: 0,
                         end: 100,
                         bottom: 10,
-                        height: 15,
+                        height: 15
                     },
                     {
                         show: true,
@@ -118,7 +118,7 @@
                             interval: 50,
                             axisLabel: {
                                 show: true,
-                                formatter: function (value) {
+                                formatter: function(value) {
                                     let val = []
                                     if (value !== 25) {
                                         val.push(value + '%')
@@ -146,7 +146,7 @@
                             //  color: "#79c8e8"
                             // },
                             itemStyle: {
-                                color: function (params) {
+                                color: function(params) {
                                     var key = params.dataIndex
                                     if (key === _this.activeItemIndex) {
                                         return '#ff99cc'
@@ -255,17 +255,16 @@
 
                 // 绘制图表
                 myScatter.setOption(option)
-                window.addEventListener('resize', function () {
+                window.addEventListener('resize', function() {
                     myScatter.resize()
                 })
 
                 let that = this
-                myScatter.on('click', function (item) {
+                myScatter.on('click', function(item) {
                     that.activeItemIndex = item.dataIndex
                     that.$emit('handleIndexClick', item.dataIndex + 1)
                     myScatter.setOption(option)
                 })
-
             }
         },
 
@@ -299,7 +298,6 @@
                         this.activeItemIndex = +val - 1
                         this.drawLine(this.renderData(this.getExerciseData))
                     }
-
                 }
             }
         }

+ 23 - 0
TEAMModelOS/ClientApp/src/css/dark-iview-split.less

@@ -0,0 +1,23 @@
+.dark-iview-split {
+    .ivu-split-trigger-vertical {
+        width: 2px;
+        background: #525252;
+    }
+
+    .ivu-split-trigger {
+        border-color: #424242;
+        border: none;
+    }
+
+    .ivu-split-trigger-bar-con.vertical {
+        left: 0px;
+    }
+
+    .ivu-split-trigger-vertical .ivu-split-trigger-bar {
+        background: white;
+        width: 2px;
+    }
+    /*.demo-split-pane {
+    height: 100%;
+  }*/
+}

+ 2 - 2
TEAMModelOS/ClientApp/src/locale/lang/en-US/courseManage.js

@@ -1,4 +1,4 @@
-export default {
+export default {
   addCourse: 'New course',
   courseList: 'course list',
   courseShow: 'show all courses',
@@ -92,4 +92,4 @@
     groupType3: 'group by seat order S'
   },
   tips1: 'modify information'
-}
+}

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

@@ -31,4 +31,4 @@ export default {
   props6: 'file upload succeeded! ',
   props7: 'not enough storage space! ',
   uploadText: 'Click or drag to upload'
-}
+}

+ 18 - 18
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/courseManage.js

@@ -1,5 +1,5 @@
-export default {
-  addCourse:'新建课程',
+export default {
+  addCourse: '新建课程',
   courseList: '课程列表',
   courseShow: '显示所有课程',
   baseSetting: '课程设置',
@@ -8,9 +8,9 @@
   btnEdit: '编辑',
   btnSave: '保存变更',
   btnDel: '删除',
-  btnCancel:'取消变更',
-  noData1:'暂无数据',
-  noData2:'教室平面图信息',
+  btnCancel: '取消变更',
+  noData1: '暂无数据',
+  noData2: '教室平面图信息',
   base: {
     baseTag: '基础设置',
     courseName: '课程名称',
@@ -27,7 +27,7 @@
     courseTag: '平日课程',
     start: '开始',
     end: '结束',
-    selectClassroomHolder:'请选择教室'
+    selectClassroomHolder: '请选择教室'
   },
   syllabus: {
     schoolSyllabus: '校本课纲',
@@ -39,9 +39,9 @@
     knowledge: '知识点:',
     content: '内容:',
     question: '题库:',
-    placeHolder1:'请选择学制',
-    placeHolder2:'请选择科目',
-    placeHolder3:'请选择年级'
+    placeHolder1: '请选择学制',
+    placeHolder2: '请选择科目',
+    placeHolder3: '请选择年级'
   },
   classroom: {
     classroomList: '教室列表',
@@ -57,18 +57,18 @@
     classroomTeacher: '授课教师',
     classroomNotice: '备注',
     deleteStudent: '删除所选学生',
-    deleteStuBtn:'删除',
-    removeStudent1:'移动所选学生到',
+    deleteStuBtn: '删除',
+    removeStudent1: '移动所选学生到',
     removeStudent2: '组',
     removeStuBtn: '套用',
     autoGroupBtn: '自动分组',
-    studentTableC1:'座号',
-    studentTableC2:'姓名',
-    studentTableC3:'学制',
-    studentTableC4:'年级',
-    studentTableC5:'组别',
+    studentTableC1: '座号',
+    studentTableC2: '姓名',
+    studentTableC3: '学制',
+    studentTableC4: '年级',
+    studentTableC5: '组别',
     studentTableC6: '组名',
-    addClassroomProp1:'选择预设教室',
+    addClassroomProp1: '选择预设教室',
     addClassroomProp2: '新建私人教室',
     chooseClassroom: '请选择已建立的教室',
     searchHolder1: '关键字搜索',
@@ -92,4 +92,4 @@
     groupType3: '依座顺序S形分组'
   },
   tips1: '修改信息'
-}
+}

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

@@ -74,7 +74,7 @@ export default {
   csTips4: '至少需要保留一项!',
   csTips5: '上传成功!',
   csTips6: '此序号已绑定到教室!',
-  csTips7:'删除成功!',
+  csTips7: '删除成功!',
   presetClassroomName: '预设教室',
   presetHeadmaster: '未指定班主任'
 

+ 7 - 7
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/teachContent.js

@@ -1,4 +1,4 @@
-export default {
+export default {
   personalResource: '私有资源',
   schoolResource: '校本资源',
   filterAll: '全部',
@@ -23,12 +23,12 @@
   tips6: '编辑名称',
   tips7: '删除文件',
   tips8: '您的浏览器不支持 video 标签。',
-  props1:'确认删除',
-  props2:'文件删除成功!',
-  props3:'文件删除失败!',
-  props4:'取消删除!',
-  props5:'文件名修改成功!',
+  props1: '确认删除',
+  props2: '文件删除成功!',
+  props3: '文件删除失败!',
+  props4: '取消删除!',
+  props5: '文件名修改成功!',
   props6: '文件上传成功!',
   props7: '存储空间不足!',
   uploadText: '点击或者拖拽上传'
-}
+}

+ 32 - 33
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/totalAnalysis.js

@@ -19,40 +19,40 @@ export default {
 
     // totalIndex.vue
     ti_title1: '基本数据统计',
-    ti_title2:'评测数据统计',
-    ti_title3:'学科对比统计',
-    ti_title4:'年级优生率统计',
+    ti_title2: '评测数据统计',
+    ti_title3: '学科对比统计',
+    ti_title4: '年级优生率统计',
     ti_title5: '评测列表数据',
-    ti_text1:'教师人数',
-    ti_text2:'学生人数',
-    ti_text3:'学段数',
-    ti_text4:'年级数',
-    ti_text5:'班级数',
-    ti_text12:'全部评测',
-    ti_text6:'段考',
-    ti_text7:'联考',
-    ti_text8:'平常考',
-    ti_text9:'其它',
-    ti_text10:'模拟测验',
+    ti_text1: '教师人数',
+    ti_text2: '学生人数',
+    ti_text3: '学段数',
+    ti_text4: '年级数',
+    ti_text5: '班级数',
+    ti_text12: '全部评测',
+    ti_text6: '段考',
+    ti_text7: '联考',
+    ti_text8: '平常考',
+    ti_text9: '其它',
+    ti_text10: '模拟测验',
     ti_text11: '诊断测验',
-    echarts_text1:'最高值',
-    echarts_text2:'最低值',
-    echarts_text3:'平均值',
-    echarts_text4:'班级平均',
-    echarts_text5:'年级平均',
-    echarts_text6:'班级总人数',
-    echarts_text7:'进线总人数',
-    echarts_text8:'进线率',
-    echarts_text9:'当前年级',
-    echarts_text10:'筛选',
-    echarts_text11:'施测时间',
-    echarts_text12:'应参与人数',
-    echarts_text13:'实际参与人数',
-    echarts_text14:'参与率',
-    echarts_text15:'平均分',
-    echarts_text16:'成就指数',
-    echarts_text17:'优生率',
-    echarts_text18:'优生人数',
+    echarts_text1: '最高值',
+    echarts_text2: '最低值',
+    echarts_text3: '平均值',
+    echarts_text4: '班级平均',
+    echarts_text5: '年级平均',
+    echarts_text6: '班级总人数',
+    echarts_text7: '进线总人数',
+    echarts_text8: '进线率',
+    echarts_text9: '当前年级',
+    echarts_text10: '筛选',
+    echarts_text11: '施测时间',
+    echarts_text12: '应参与人数',
+    echarts_text13: '实际参与人数',
+    echarts_text14: '参与率',
+    echarts_text15: '平均分',
+    echarts_text16: '成就指数',
+    echarts_text17: '优生率',
+    echarts_text18: '优生人数',
 
     // Base Info
     base_name: '姓名',
@@ -221,7 +221,6 @@ export default {
     le_title5: '认知层次得分详情',
     le_title6: '错题率关系表',
 
-
     // QuestionList.vue
     ql_text1: '试卷总分',
     ql_text2: '单项选择题',

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

@@ -1,4 +1,4 @@
-export default {
+export default {
   addCourse: '新建課程',
   courseList: '課程清單',
   courseShow: '顯示所有課程',
@@ -91,5 +91,5 @@
     groupType2: '依座號分組',
     groupType3: '依座順序S形分組'
   },
-  tips1:'修改資訊'
-}
+  tips1: '修改資訊'
+}

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

@@ -1,4 +1,4 @@
-export default {
+export default {
   personalResource: '私有資源',
   schoolResource: '校本資源',
   filterAll: '全部',
@@ -30,5 +30,5 @@
   props5: '檔名修改成功!',
   props6: '文件上傳成功!',
   props7: '存儲空間不足!',
-  uploadText:'點擊或者拖拽上傳'
-}
+  uploadText: '點擊或者拖拽上傳'
+}

+ 208 - 194
TEAMModelOS/ClientApp/src/router/routes.js

@@ -5,203 +5,217 @@ import Main from '@/components/public/main'
 // import { resolve } from 'url'
 
 export const routes = [
-  { path: '*', redirect: '/404' },
-  { name: '404', path: '/404', component: resolve => require(['@/view/404'], resolve) },
-  { name: 'index', path: '', redirect: '/home' },
-  { name: 'selectModule', path: '/selectModule', redirect: '/home' },
-  { name: 'login', path: '/login', component: Login },
-  { name: 'ServerSideLogin', path: '/serverside/login', component: ServerSideLogin },
-  { name: 'smartschooldashboard', path: '/smartschooldashboard', component: resolve => require(['@/view/smartschooldashboard/Index.vue'], resolve) },
-  { name: 'smartclassdashboard', path: '/smartclassdashboard', component: resolve => require(['@/view/smartclassdashboard/Index.vue'], resolve) },
-  { name: 'embedschooldashboard', path: '/embedclassdashboard/:schoolshortcode', component: resolve => require(['@/view/smartclassdashboard/Index.vue'], resolve) }, // IES 呼叫專用
-  { // 共用組件試用
-    path: '/teachermgmt',
-    component: Main,
-    children: [
-      {
-        path: '/',
-        component: () => import('@/view/teachermgmt/Index.vue')
-      }
-    ]
-  },
-
-  // 学生账号管理
-  {
-    path: '/studentAccount',
-    component: resolve => require(['@/view/student-account/Index.vue'], resolve)
-  },
-
-  // 整合功能
-  {
-    name: 'home',
-    path: '/home',
-    redirect: 'totalIndex',
-    component: resolve => require(['@/view/Home'], resolve),
-    children: [
-
-      {
-        name: 'totalIndex',
-        path: '/home',
-        component: resolve => require(['@/view/student-analysis/total-analysis/EvaluationList/TotalIndex.vue'], resolve),
-      },
-      {
-        name: 'total',
-        path: 'total',
-        component: resolve => require(['@/view/student-analysis/total-analysis/index.vue'], resolve),
+    { path: '*', redirect: '/404' },
+    { name: '404', path: '/404', component: resolve => require(['@/view/404'], resolve) },
+    { name: 'index', path: '', redirect: '/home' },
+    { name: 'selectModule', path: '/selectModule', redirect: '/home' },
+    { name: 'login', path: '/login', component: Login },
+    { name: 'ServerSideLogin', path: '/serverside/login', component: ServerSideLogin },
+    { name: 'smartschooldashboard', path: '/smartschooldashboard', component: resolve => require(['@/view/smartschooldashboard/Index.vue'], resolve) },
+    { name: 'smartclassdashboard', path: '/smartclassdashboard', component: resolve => require(['@/view/smartclassdashboard/Index.vue'], resolve) },
+    { name: 'embedschooldashboard', path: '/embedclassdashboard/:schoolshortcode', component: resolve => require(['@/view/smartclassdashboard/Index.vue'], resolve) }, // IES 呼叫專用
+    { // 共用組件試用
+        path: '/teachermgmt',
+        component: Main,
         children: [
-          {
-            path: '/total',
-            component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/AchievementAnalysis.vue'], resolve)
-          },
-          {
-            path: '/total/evaluationList',
-            component: resolve => require(['@/view/student-analysis/total-analysis/EvaluationList/EvaluationList.vue'], resolve)
-          },
-          {
-            path: '/total/achievement',
-            component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/AchievementAnalysis.vue'], resolve)
-          },
-          {
-            path: '/total/achievement/entryTables',
-            component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/EntryTables.vue'], resolve)
-          },
-          {
-            name: 'earlyWarning',
-            path: '/total/achievement/earlyWarning',
-            component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/EarlyWarning.vue'], resolve)
-          },
-          {
-            path: '/total/scatter',
-            component: resolve => require(['@/view/student-analysis/total-analysis/ScatterAnalysis/ScatterAnalysis.vue'], resolve)
-          },
-          {
-            path: '/total/knowledge',
-            component: resolve => require(['@/view/student-analysis/total-analysis/KnowledgeAnalysis/KnowledgeAnalysis.vue'], resolve)
-          },
-          {
-            path: '/total/knowledge/details',
-            component: resolve => require(['@/view/student-analysis/total-analysis/KnowledgeAnalysis/ScoreDetails.vue'], resolve)
-          },
-          {
-            path: '/total/cognitionLevel',
-            component: resolve => require(['@/view/student-analysis/total-analysis/LevelAnalysis/LevelAnalysis.vue'], resolve)
-          },
-          {
-            path: '/total/cognitionLevel/details',
-            component: resolve => require(['@/view/student-analysis/total-analysis/LevelAnalysis/ScoreDetails.vue'], resolve)
-          },
-          {
-            path: '/total/test',
-            component: resolve => require(['@/view/student-analysis/total-analysis/TestAnalysis/TestAnalysis.vue'], resolve)
-          },
-          {
-            path: '/total/questionList',
-            component: resolve => require(['@/view/student-analysis/total-analysis/TestAnalysis/QuestionList.vue'], resolve)
-          }
+            {
+                path: '/',
+                component: () => import('@/view/teachermgmt/Index.vue')
+            }
         ]
-      },
-      {
-        name: 'system',
-        path: 'system',
-        component: resolve => require(['@/view/school-mgmt/SystemSetting/SystemSetting.vue'], resolve)
-      },
-      {
-        name: 'classroom',
-        path: 'classroom',
-        component: resolve => require(['@/view/school-mgmt/ClassroomSetting/ClassroomSetting.vue'], resolve)
-      },
-      {
-        name: 'studentAccount',
-        path: 'studentAccount',
+    },
+
+    // 学生账号管理
+    {
+        path: '/studentAccount',
         component: resolve => require(['@/view/student-account/Index.vue'], resolve)
-      },
-      {
-        path: 'evaluation',
-        name: 'evaluation',
-        redirect: '/home/evaluation/createTest',
-        component: resolve => require(['@/view/evaluation/index/index.vue'], resolve),
+    },
+
+    // 整合功能
+    {
+        name: 'home',
+        path: '/home',
+        redirect: 'totalIndex',
+        component: resolve => require(['@/view/Home'], resolve),
         children: [
-          {
-            path: 'createExercises',
-            name: 'createExercises',
-            component: resolve => require(['@/view/evaluation/index/CreateExercises.vue'], resolve)
-          },
-          {
-            path: 'exercisesList',
-            name: 'exercisesList',
-            component: resolve => require(['@/view/evaluation/index/ExercisesList.vue'], resolve)
-          },
-          {
-            path: 'testPaper',
-            name: 'testPaper',
-            component: resolve => require(['@/view/evaluation/index/TestPaper.vue'], resolve)
-          },
-          {
-            path: 'createTest',
-            name: 'createTest',
-            component: resolve => require(['@/view/evaluation/index/CreateTest.vue'], resolve)
-          },
-          {
-            path: 'testPaperList',
-            name: 'testPaperList',
-            component: resolve => require(['@/view/evaluation/bank/index.vue'], resolve)
-          },
-          {
-            path: 'createCompose',
-            name: 'createCompose',
-            component: resolve => require(['@/view/evaluation/index/CreateCompose.vue'], resolve)
-          },
-          {
-            path: 'editChild',
-            name: 'editChild',
-            component: resolve => require(['@/view/evaluation/index/EditChild.vue'], resolve)
-          }
-        ]
-      },
-      {
-        path: 'courseManage',
-        name: 'courseManage',
-        component: resolve => require(['@/view/coursemgmt/CourseManage.vue'], resolve)
-      },
-      // 新课纲管理
-      {
-        path: 'syllabus',
-        name: 'syllabus',
-        component: resolve => require(['@/view/syllabus/newSyllabus/Index.vue'], resolve)
-      },
-      {
-        path: 'teachcontent',
-        name: 'teachcontent',
-        component: resolve => require(['@/view/teachcontent/index.vue'], resolve)
-      },
-      // 知识点管理
-      {
-        path: 'knowledge',
-        name: 'knowledge',
-        component: resolve => require(['@/view/knowledge-point/index/Index.vue'], resolve)
-      },
-      //新学习活动模块
-      {
-        path: 'createEvaluation',
-        name: 'createEvaluation',
-        component: resolve => require(['@/view/learnactivity/CreateEvaluation.vue'], resolve)
-      },
-      {
-        path: 'createLearnUnit',
-        name: 'createLearnUnit',
-        component: resolve => require(['@/view/selflearning/CreateLearnUnit.vue'], resolve)
-      },
-      {
-        path: 'createOrderLearn',
-        name: 'createOrderLearn',
-        component: resolve => require(['@/view/selflearning/CreateOrderLearn.vue'], resolve)
-      },
-      {
-        path: 'manageEvaluation',
-        name: 'manageEvaluation',
-        component: resolve => require(['@/view/learnactivity/ManageEvaluation.vue'], resolve)
-      },
 
-    ]
-  }
+            {
+                name: 'totalIndex',
+                path: '/home',
+                component: resolve => require(['@/view/student-analysis/total-analysis/EvaluationList/TotalIndex.vue'], resolve)
+            },
+            {
+                name: 'total',
+                path: 'total',
+                component: resolve => require(['@/view/student-analysis/total-analysis/index.vue'], resolve),
+                children: [
+                    {
+                        path: '/total',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/AchievementAnalysis.vue'], resolve)
+                    },
+                    {
+                        path: '/total/evaluationList',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/EvaluationList/EvaluationList.vue'], resolve)
+                    },
+                    {
+                        path: '/total/achievement',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/AchievementAnalysis.vue'], resolve)
+                    },
+                    {
+                        path: '/total/achievement/entryTables',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/EntryTables.vue'], resolve)
+                    },
+                    {
+                        name: 'earlyWarning',
+                        path: '/total/achievement/earlyWarning',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/AchievementAnalysis/EarlyWarning.vue'], resolve)
+                    },
+                    {
+                        path: '/total/scatter',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/ScatterAnalysis/ScatterAnalysis.vue'], resolve)
+                    },
+                    {
+                        path: '/total/knowledge',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/KnowledgeAnalysis/KnowledgeAnalysis.vue'], resolve)
+                    },
+                    {
+                        path: '/total/knowledge/details',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/KnowledgeAnalysis/ScoreDetails.vue'], resolve)
+                    },
+                    {
+                        path: '/total/cognitionLevel',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/LevelAnalysis/LevelAnalysis.vue'], resolve)
+                    },
+                    {
+                        path: '/total/cognitionLevel/details',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/LevelAnalysis/ScoreDetails.vue'], resolve)
+                    },
+                    {
+                        path: '/total/test',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/TestAnalysis/TestAnalysis.vue'], resolve)
+                    },
+                    {
+                        path: '/total/questionList',
+                        component: resolve => require(['@/view/student-analysis/total-analysis/TestAnalysis/QuestionList.vue'], resolve)
+                    }
+                ]
+            },
+            {
+                name: 'system',
+                path: 'system',
+                component: resolve => require(['@/view/school-mgmt/SystemSetting/SystemSetting.vue'], resolve)
+            },
+            {
+                name: 'classroom',
+                path: 'classroom',
+                component: resolve => require(['@/view/school-mgmt/ClassroomSetting/ClassroomSetting.vue'], resolve)
+            },
+            {
+                name: 'studentAccount',
+                path: 'studentAccount',
+                component: resolve => require(['@/view/student-account/Index.vue'], resolve)
+            },
+            {
+                path: 'evaluation',
+                name: 'evaluation',
+                redirect: '/home/evaluation/createTest',
+                component: resolve => require(['@/view/evaluation/index/index.vue'], resolve),
+                children: [
+                    {
+                        path: 'createExercises',
+                        name: 'createExercises',
+                        component: resolve => require(['@/view/evaluation/index/CreateExercises.vue'], resolve)
+                    },
+                    {
+                        path: 'exercisesList',
+                        name: 'exercisesList',
+                        component: resolve => require(['@/view/evaluation/index/PickExercise.vue'], resolve)
+                    },
+                    {
+                        path: 'testPaper',
+                        name: 'testPaper',
+                        component: resolve => require(['@/view/evaluation/index/TestPaper.vue'], resolve)
+                    },
+                    {
+                        path: 'createTest',
+                        name: 'createTest',
+                        component: resolve => require(['@/view/evaluation/index/CreateTest.vue'], resolve)
+                    },
+                    {
+                        path: 'testPaperList',
+                        name: 'testPaperList',
+                        component: resolve => require(['@/view/evaluation/bank/index.vue'], resolve)
+                    },
+                    {
+                        path: 'createCompose',
+                        name: 'createCompose',
+                        component: resolve => require(['@/view/evaluation/index/CreateCompose.vue'], resolve)
+                    },
+                    {
+                        path: 'editChild',
+                        name: 'editChild',
+                        component: resolve => require(['@/view/evaluation/index/EditChild.vue'], resolve)
+                    }
+                ]
+            },
+            {
+                path: 'courseManage',
+                name: 'courseManage',
+                component: resolve => require(['@/view/coursemgmt/CourseManage.vue'], resolve)
+            },
+            // 新课纲管理
+            {
+                path: 'syllabus',
+                name: 'syllabus',
+                component: resolve => require(['@/view/syllabus/newSyllabus/Index.vue'], resolve)
+            },
+            {
+                path: 'teachcontent',
+                name: 'teachcontent',
+                component: resolve => require(['@/view/teachcontent/index.vue'], resolve)
+            },
+            // 知识点管理
+            {
+                path: 'knowledge',
+                name: 'knowledge',
+                component: resolve => require(['@/view/knowledge-point/index/Index.vue'], resolve)
+            },
+            // 新学习活动模块
+            {
+                path: 'createEvaluation',
+                name: 'createEvaluation',
+                component: resolve => require(['@/view/learnactivity/CreateEvaluation.vue'], resolve)
+            },
+            {
+                path: 'createLearnUnit',
+                name: 'createLearnUnit',
+                component: resolve => require(['@/view/selflearning/CreateLearnUnit.vue'], resolve)
+            },
+            {
+                path: 'createOrderLearn',
+                name: 'createOrderLearn',
+                component: resolve => require(['@/view/selflearning/CreateOrderLearn.vue'], resolve)
+            },
+            {
+                path: 'manageEvaluation',
+                name: 'manageEvaluation',
+                component: resolve => require(['@/view/learnactivity/ManageEvaluation.vue'], resolve)
+            },
+            {
+                path: 'manageUnit',
+                name: 'manageUnit',
+                component: resolve => require(['@/view/selflearning/ManageUnit.vue'], resolve)
+            },
+            {
+                path: 'manageOrderLearn',
+                name: 'manageOrderLearn',
+                component: resolve => require(['@/view/selflearning/ManageOrderLearn.vue'], resolve)
+            },
+            {
+                path: 'activityReport',
+                name: 'activityReport',
+                component: resolve => require(['@/view/selflearning/ActivityReport.vue'], resolve)
+            }
+        ]
+    }
 ]

+ 4 - 4
TEAMModelOS/ClientApp/src/store/module/courseMgmt.js

@@ -1,4 +1,4 @@
-import apiTools from '@/api'
+import apiTools from '@/api'
 import JSONPath from 'jsonpath'
 export default {
   namespaced: true,
@@ -10,7 +10,7 @@ export default {
       TEAMModelId: 'habook#0001',
       school: '醍摩豆书院',
       schoolCode: 'HBCN'
-    },
+    }
   },
   getters: {
     courseInfo(state) {
@@ -31,13 +31,13 @@ export default {
         (resolve, reject) => {
           if (context.state.courseList.length == 0) {
             apiTools.courseMgmt.findCourse({
-              //TEAMModelId: context.state.demoLoginInfo.TEAMModelId
+              // TEAMModelId: context.state.demoLoginInfo.TEAMModelId
               scopeCode: context.state.demoLoginInfo.TEAMModelId
             }).then(
               res => {
                 if (res.error == null) {
                   if (res.result.data.length > 0) {
-                    context.commit("setCourseList", res.result.data)
+                    context.commit('setCourseList', res.result.data)
                     resolve({
                       code: 1,
                       message: '数据请求成功'

+ 12 - 13
TEAMModelOS/ClientApp/src/store/module/schoolBaseInfo.js

@@ -12,7 +12,7 @@ export default {
             TEAMModelId: 'habook#0001',
             school: '醍摩豆书院',
             schoolCode: 'HBCN'
-        },
+        }
     },
     getters: {
 
@@ -36,23 +36,23 @@ export default {
                             res => {
                                 if (res.error == null) {
                                     if (res.result.data.length > 0) {
-                                        context.commit("setSchoolInfo", res.result.data[0])
+                                        context.commit('setSchoolInfo', res.result.data[0])
                                         resolve({
                                             code: 1,
-                                            data:res.result.data[0],
+                                            data: res.result.data[0],
                                             message: '数据请求成功'
                                         })
                                     } else {
                                         resolve({
                                             code: 2,
-                                            data:[],
+                                            data: [],
                                             message: '请求成功,数据为空'
                                         })
                                     }
                                 } else {
                                     reject({
                                         code: 0,
-                                        data:[],
+                                        data: [],
                                         message: '请求失败,API error!'
                                     })
                                 }
@@ -60,7 +60,7 @@ export default {
                             err => {
                                 reject({
                                     code: 0,
-                                    data:[],
+                                    data: [],
                                     message: '请求失败,API error!'
                                 })
                             }
@@ -80,9 +80,9 @@ export default {
                 (resolve, reject) => {
                     if (context.state.classroomList == undefined) {
                         apiTools.schoolSetting.findClassInfo({
-                            //schoolCode: context.state.demoLoginInfo.schoolCode,
-                            //status: 1,
-                            //scope: 'school'
+                            // schoolCode: context.state.demoLoginInfo.schoolCode,
+                            // status: 1,
+                            // scope: 'school'
                           scopeCode: context.state.demoLoginInfo.schoolCode
                         }).then(
                             res => {
@@ -94,17 +94,16 @@ export default {
                                                 if (res.code == 1 || res.code == 3) {
                                                     for (let item of resData) {
                                                         let currentSchoolInfo = JSONPath.query(context.state.schoolBaseInfo, "$..period[?(@.periodCode=='" + item.periodCode + "')]")
-                                                        //let currentClassroomlInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.classroomList, "$..[?(@.classroomCode=='" + item.classroom.classroomCode + "')]");
+                                                        // let currentClassroomlInfo = this.$JSONPath.query(this.$store.state.schoolBaseInfo.classroomList, "$..[?(@.classroomCode=='" + item.classroom.classroomCode + "')]");
 
                                                         if (currentSchoolInfo.length > 0) {
-                                                            item.periodName = currentSchoolInfo[0].periodName;
+                                                            item.periodName = currentSchoolInfo[0].periodName
                                                           item.gradeName = JSONPath.query(context.state.schoolBaseInfo, "$..grades[?(@.gradeCode=='" + item.gradeCode + "')]")[0].gradeName
-                                                            
                                                         }
                                                         console.log(item)
                                                     }
                                                     console.log(resData)
-                                                    context.commit("setClassroomList", resData)
+                                                    context.commit('setClassroomList', resData)
                                                     resolve({
                                                         code: 1,
                                                         message: '数据请求成功'

+ 32 - 37
TEAMModelOS/ClientApp/src/store/module/totalAnalysis.js

@@ -20,7 +20,7 @@ export default {
         classExerciseData: null,
         knowledgeData: null,
         levelData: null,
-        examPaper:null
+        examPaper: null
     },
     getters: {
 
@@ -99,7 +99,6 @@ export default {
                 result.push(o)
             }
             state.classExerciseData = result
-
         },
 
         // 更新知识点掌握数据
@@ -116,15 +115,14 @@ export default {
         updateCurSubject(state, data) {
             let local = localStorage.getItem('cur_s')
             // 先把之前科目缓存数据清空 重新获取
-            //state.scatterData = null
-            //state.exerciseData = null
+            // state.scatterData = null
+            // state.exerciseData = null
             if (data) {
                 localStorage.setItem('cur_s', data)
                 state.currentSubject = data
             } else if (!data && local) {
                 state.currentSubject = local
             }
-
         }
     },
     actions: {
@@ -133,41 +131,39 @@ export default {
         getExamList(context) {
             return new Promise((r, j) => {
                 if (context.state.examList) {
-                    console.log("Cache-examList")
+                    console.log('Cache-examList')
                     r(context.state.examList)
                 } else {
                     apiTools.totalAnalysis.getExamList({ Code: 'qcs' }).then(res => { // api请求
                         let data = res[0]
-                        data.name = "第二次测试"
+                        data.name = '第二次测试'
                         res.push(data)
                         context.commit('updateExamList', data) // 提交到vuex保存数据
-                        console.log("API-examList")
+                        console.log('API-examList')
                         r(data)
                     }).catch(err => {
                         j(err)
                     })
-                } 
+                }
             })
-
         },
 
         // 异步获取 试卷数据
         getExamPaper(context) {
             return new Promise((r, j) => {
                 if (context.state.examPaper) {
-                    console.log("Cache-examPaper")
+                    console.log('Cache-examPaper')
                     r(context.state.examPaper)
                 } else {
                     apiTools.totalAnalysis.getExamPaper({ Subject: '数学' }).then(res => { // api请求
                         context.commit('updateExamPaper', res.result.data) // 提交到vuex保存数据
-                        console.log("API-examPaper")
+                        console.log('API-examPaper')
                         r(res.result.data)
                     }).catch(err => {
                         j(err)
                     })
-                } 
+                }
             })
-
         },
 
         // 异步更新雷达图数据
@@ -179,37 +175,36 @@ export default {
         getAchievementData(context) {
             return new Promise((r, j) => {
                 if (context.state.achievementData) {
-                    console.log("Cache-Achievement")
+                    console.log('Cache-Achievement')
                     r(context.state.achievementData)
                 } else {
-                    apiTools.totalAnalysis.getAchievementData({ "ExamCode": "1371cb0c-6c72-4c1c-868a-aac00e74a0fb"}).then(res => { // api请求
+                    apiTools.totalAnalysis.getAchievementData({ 'ExamCode': '1371cb0c-6c72-4c1c-868a-aac00e74a0fb' }).then(res => { // api请求
                         context.commit('getAchievementData', res.result.data) // 提交到vuex保存数据
                         context.commit('updateCurSubject', res.result.data.average.datas.map(item => item.name)[2]) // 提交到vuex保存数据
-                        console.log("API-Achievement")
+                        console.log('API-Achievement')
                         r(res.result.data)
                     }).catch(err => {
                         j(err)
                     })
                 }
             })
-
         },
 
         // 异步获取 落点分析模块真实数据
         getScatterData(context) {
             let params = {
                 Subject: context.state.currentSubject,
-                ExamCode: "1371cb0c-6c72-4c1c-868a-aac00e74a0fb"
+                ExamCode: '1371cb0c-6c72-4c1c-868a-aac00e74a0fb'
             }
             return new Promise((r, j) => {
                 if (context.state.scatterData) {
-                    console.log("Cache-Scatter")
+                    console.log('Cache-Scatter')
                     r(context.state.scatterData)
                 } else {
                     apiTools.totalAnalysis.getScatterData(params).then(res => { // api请求
-                        console.log("落点分析 科目切换成--" + context.state.currentSubject)
+                        console.log('落点分析 科目切换成--' + context.state.currentSubject)
                         context.commit('getScatterData', res.result.data) // 提交到vuex保存数据
-                        console.log("API-Scatter ")
+                        console.log('API-Scatter ')
                         r(res.result.data)
                     }).catch(err => {
                         j(err)
@@ -222,18 +217,18 @@ export default {
         getExerciseData(context) {
             let params = {
                 Subject: '数学',
-                ExamCode: "1371cb0c-6c72-4c1c-868a-aac00e74a0fb"
+                ExamCode: '1371cb0c-6c72-4c1c-868a-aac00e74a0fb'
             }
             return new Promise((r, j) => {
                 if (context.state.exerciseData) {
-                    console.log("Cache-ExerciseData")
+                    console.log('Cache-ExerciseData')
                     r(context.state.exerciseData)
                 } else {
                     apiTools.totalAnalysis.getExerciseData(params).then(res => { // api请求
-                        console.log("试题分析 科目切换成--" + context.state.currentSubject)
+                        console.log('试题分析 科目切换成--' + context.state.currentSubject)
                         context.commit('getExerciseData', res.result.data) // 提交到vuex保存数据
                         context.commit('getClassExerciseData', res.result.data) // 提交到vuex保存数据
-                        console.log("API-ExerciseData ")
+                        console.log('API-ExerciseData ')
                         r(res.result.data)
                     }).catch(err => {
                         j(err)
@@ -245,20 +240,20 @@ export default {
         // 异步获取 知识点掌握模块真实数据
         getKnowledgeData(context) {
             let params = {
-                //Subject: context.state.currentSubject
+                // Subject: context.state.currentSubject
                 Subject: '数学',
                 SchoolCode: 'qcs',
-                ExamCode: "1371cb0c-6c72-4c1c-868a-aac00e74a0fb"
+                ExamCode: '1371cb0c-6c72-4c1c-868a-aac00e74a0fb'
             }
             return new Promise((r, j) => {
                 if (context.state.knowledgeData) {
-                    console.log("Cache-knowledgeData")
+                    console.log('Cache-knowledgeData')
                     r(context.state.knowledgeData)
                 } else {
                     apiTools.totalAnalysis.getKnowledgeData(params).then(res => { // api请求
-                        console.log("知识点掌握 科目切换成--" + context.state.currentSubject)
+                        console.log('知识点掌握 科目切换成--' + context.state.currentSubject)
                         context.commit('getKnowledgeData', res.result.data) // 提交到vuex保存数据
-                        console.log("API-knowledgeData ")
+                        console.log('API-knowledgeData ')
                         r(res.result.data)
                     }).catch(err => {
                         j(err)
@@ -270,27 +265,27 @@ export default {
         // 异步获取 认知层次分布情况模块真实数据
         getLevelData(context) {
             let params = {
-                //Subject: context.state.currentSubject
+                // Subject: context.state.currentSubject
                 Subject: '数学',
                 SchoolCode: 'qcs',
                 Type: '5',
-                ExamCode: "1371cb0c-6c72-4c1c-868a-aac00e74a0fb"
+                ExamCode: '1371cb0c-6c72-4c1c-868a-aac00e74a0fb'
             }
             return new Promise((r, j) => {
                 if (context.state.levelData) {
-                    console.log("Cache-getLevelData")
+                    console.log('Cache-getLevelData')
                     r(context.state.levelData)
                 } else {
                     apiTools.totalAnalysis.getKnowledgeData(params).then(res => { // api请求
-                        console.log("知识点掌握 科目切换成--" + context.state.currentSubject)
+                        console.log('知识点掌握 科目切换成--' + context.state.currentSubject)
                         context.commit('getLevelData', res.result.data) // 提交到vuex保存数据
-                        console.log("API-getLevelData ")
+                        console.log('API-getLevelData ')
                         r(res.result.data)
                     }).catch(err => {
                         j(err)
                     })
                 }
             })
-        },
+        }
     }
 }

File diff suppressed because it is too large
+ 6651 - 6792
TEAMModelOS/ClientApp/src/utils/azure-storage-blob.js


File diff suppressed because it is too large
+ 2 - 2
TEAMModelOS/ClientApp/src/utils/azure-storage-blob.min.js


+ 25 - 23
TEAMModelOS/ClientApp/src/utils/js-fn.js

@@ -1,15 +1,15 @@
-/*
+/*
  * 根据某个属性进行分组
  */
 import JSONPath from 'jsonpath'
 function groupBy(array, key) {
   const groups = {}
-  array.forEach(function (item) {
+  array.forEach(function(item) {
     const group = JSON.stringify(item[key])
     groups[group] = groups[group] || []
     groups[group].push(item)
   })
-  return Object.keys(groups).map(function (group) {
+  return Object.keys(groups).map(function(group) {
     return groups[group]
   })
 }
@@ -17,30 +17,30 @@ function groupBy(array, key) {
  * 判断两个对象是否相等
  */
 function isObjEqual(o1, o2) {
-  var props1 = Object.keys(o1);
-  var props2 = Object.keys(o2);
+  var props1 = Object.keys(o1)
+  var props2 = Object.keys(o2)
   if (props1.length != props2.length) {
-    return false;
+    return false
   }
   for (var i = 0, max = props1.length; i < max; i++) {
-    var propName = props1[i];
+    var propName = props1[i]
     if (o1[propName] !== o2[propName]) {
-      return false;
+      return false
     }
   }
-  return true;
+  return true
 }
 /*
  * 获取对象在对象数组的index
  */
 function getIndex(_arr, _obj) {
-  var len = _arr.length;
+  var len = _arr.length
   for (let i = 0; i < len; i++) {
     if (isObjEqual(_arr[i], _obj)) {
-      return parseInt(i);
+      return parseInt(i)
     }
   }
-  return -1;
+  return -1
 }
 /*
  * 产生某个范围的随机数
@@ -57,24 +57,26 @@ function getPeriod(data, periodCode) {
       periodName: '暂无数据',
       periodCode: '00',
       grades: [],
-      subjects:[]
+      subjects: []
     }
   } else {
-    let result = JSONPath.query(data, "$..[?(@.periodCode=='" + periodCode + "')]")
-    if (result.length == 0) {
-      return {
-        periodName: '暂无数据'
-      }
-    } else {
+      let result = JSONPath.query(data, "$..[?(@.periodCode=='" + periodCode + "')]")
+      if (result.length == 0) {
+          return {
+              periodName: '暂无数据',
+              periodCode: '00',
+              grades: [],
+              subjects: []
+          }
+      } else {
       return result[0]
     }
   }
-  
 }
 /*
  * 根据年级编码获取对应Name
  */
-function getGradeName(data,gradeCode) {
+function getGradeName(data, gradeCode) {
   let result = JSONPath.query(data, "$..[?(@.gradeCode=='" + gradeCode + "')]")
   if (result.length == 0) {
     return '暂无数据'
@@ -85,7 +87,7 @@ function getGradeName(data,gradeCode) {
 /*
  * 根据学科编码获取对应Name
  */
-function getSubjectName(data,subjectCode) {
+function getSubjectName(data, subjectCode) {
   let result = JSONPath.query(data, "$..[?(@.subjectCode=='" + subjectCode + "')]")
   if (result.length == 0) {
     return '暂无数据'
@@ -101,4 +103,4 @@ export default {
   getPeriod,
   getGradeName,
   getSubjectName
-}
+}

+ 55 - 57
TEAMModelOS/ClientApp/src/utils/upload-file.js

@@ -1,118 +1,116 @@
-var AccountName = "teammodelostest";
-var SasString = "sv=2019-02-02&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-12-13T10:01:41Z&st=2019-12-13T02:01:41Z&spr=https&sig=0s%2FWA0r7QdtLx4mgCF6nMBwhDZaXLzPAOV5Hig2agDU%3D";
-var ContainerName = "spatest";
-var ContainerURL = undefined;
-let azblobtest = require('./azure-storage-blob');
-console.log('1__________________1');
-//console.log(azblob);
-export default{
+var AccountName = 'teammodelostest'
+var SasString = 'sv=2019-02-02&ss=bfqt&srt=sco&sp=rwdlacup&se=2019-12-13T10:01:41Z&st=2019-12-13T02:01:41Z&spr=https&sig=0s%2FWA0r7QdtLx4mgCF6nMBwhDZaXLzPAOV5Hig2agDU%3D'
+var ContainerName = 'spatest'
+var ContainerURL = undefined
+let azblobtest = require('./azure-storage-blob')
+console.log('1__________________1')
+// console.log(azblob);
+export default {
     async init() {
         this.containerURL = new azblob.ContainerURL(
             `https://${this.accountName}.blob.core.chinacloudapi.cn/${this.containerName}?${this.sasString}`,
             azblob.StorageURL.newPipeline(new azblob.AnonymousCredential())
-        );
+        )
     },
-    async deleteFiles(fileList){
+    async deleteFiles(fileList) {
         try {
             if (fileList.selectedOptions.length > 0) {
                 for (const option of fileList.selectedOptions) {
-                    const blobURL = azblob.BlobURL.fromContainerURL(ContainerURL, option.text);
-                    await blobURL.delete(azblob.Aborter.none);
+                    const blobURL = azblob.BlobURL.fromContainerURL(ContainerURL, option.text)
+                    await blobURL.delete(azblob.Aborter.none)
                 }
                 // this.listFiles();
             } else {
-                console.log("No files selected.");
+                console.log('No files selected.')
             }
         } catch (error) {
-            console.log(error.body.message);
+            console.log(error.body.message)
         }
     },
-    async listFiles(){
-        let fileList = [];
+    async listFiles() {
+        let fileList = []
         try {
-            let marker = undefined;
+            let marker
             do {
                 const listBlobsResponse = await ContainerURL.listBlobFlatSegment(
-                    azblob.Aborter.none, marker);
-                marker = listBlobsResponse.nextMarker;
-                const items = listBlobsResponse.segment.blobItems;
-                for(const blob of items) {
-                    fileList.push(blob);
+                    azblob.Aborter.none, marker)
+                marker = listBlobsResponse.nextMarker
+                const items = listBlobsResponse.segment.blobItems
+                for (const blob of items) {
+                    fileList.push(blob)
                 }
-            } while (marker);
-            if(fileList.size > 0) {
-                this.reportStatus("Done.");
+            } while (marker)
+            if (fileList.size > 0) {
+                this.reportStatus('Done.')
             } else {
-                this.reportStatus("The container does not contain any files.");
+                this.reportStatus('The container does not contain any files.')
             }
-        } catch(error) {
-            this.reportStatus(error.body.message);
+        } catch (error) {
+            this.reportStatus(error.body.message)
         }
     },
     async uploadToBlob(file) {
-        const promises = [];
+        const promises = []
         const blockBlobURL = azblob.BlockBlobURL.fromContainerURL(
             this.containerURL,
             file.name
-        );
+        )
         promises.push(
             azblob.uploadBrowserDataToBlockBlob(
                 azblob.Aborter.none,
                 file,
                 blockBlobURL
             )
-        );
+        )
         await Promise.all(promises).then(
-            res =>{
-               console.log(res);     
-
+            res => {
+               console.log(res)
             },
-            err =>{
-                console.log(err);
-
-            }    
+            err => {
+                console.log(err)
+            }
 
-        );
-        this.listFiles();
-        return false;
+        )
+        this.listFiles()
+        return false
     },
     reportStatus(message) {
-        let status = document.getElementById("status");
-        status.innerHTML += `${message}<br/>`;
-        status.scrollTop = status.scrollHeight;
+        let status = document.getElementById('status')
+        status.innerHTML += `${message}<br/>`
+        status.scrollTop = status.scrollHeight
     },
-    
+
     async createContainer() {
         try {
             this.reportStatus(
                 `Creating container "${this.containerName}"...`
-            );
-            await this.containerURL.create(window.azblob.Aborter.none);
-            this.reportStatus(`Done.`);
+            )
+            await this.containerURL.create(window.azblob.Aborter.none)
+            this.reportStatus(`Done.`)
         } catch (error) {
-            this.reportStatus(error.body.message);
+            this.reportStatus(error.body.message)
         }
     },
     async upload() {
-        const blobName = "quickstart" + uuidv1() + ".txt";
+        const blobName = 'quickstart' + uuidv1() + '.txt'
 
         // Get a block blob client
         const blockBlobClient = containerClient.getBlockBlobClient(
             blobName
-        );
+        )
 
-        console.log("\nUploading to Azure storage as blob:\n\t", blobName);
+        console.log('\nUploading to Azure storage as blob:\n\t', blobName)
 
         // Upload data to the blob
-        const data = "Hello, World!";
+        const data = 'Hello, World!'
         const uploadBlobResponse = await blockBlobClient.upload(
             data,
             data.length
-        );
+        )
         console.log(
-            "Blob was uploaded successfully. requestId: ",
+            'Blob was uploaded successfully. requestId: ',
             uploadBlobResponse.requestId
-        );
+        )
     }
 
-}
+}

+ 347 - 355
TEAMModelOS/ClientApp/src/view/Home.vue

@@ -1,401 +1,393 @@
 <template>
-  <div id="main">
-    <div class="header-container">
-      <!-- 头部左侧按钮及LOGO -->
-      <div class="header-left-box fl-around">
-        <Icon type="md-menu" class="header-btn-menu" @click="isOpenDrawer = true" />
-        <img src="../assets/mark.svg" />
-      </div>
-      <!-- 头部右侧个人中心部分 -->
-      <div class="header-right-box fl-around">
-        <Icon type="md-help-circle" />
-        <Icon type="ios-settings" />
-        <Icon type="ios-bug" />
-        <Dropdown @on-click="basicMenu">
-          <a href="javascript:void(0)">
-            <img src="../assets/icon/icon_header.png" />
-          </a>
-          <DropdownMenu slot="list" >
-            <DropdownItem>个人信息</DropdownItem>
-            <DropdownItem>推送消息</DropdownItem>
-            <DropdownItem>公告栏</DropdownItem>
-            <DropdownItem>行事历</DropdownItem>
-            <DropdownItem name="quit">退出</DropdownItem>
-          </DropdownMenu>
-        </Dropdown>
-      </div>
-
-      <!-- 全局抽屉部分 -->
-      <Drawer placement="left" :closable="false" v-model="isOpenDrawer" class-name="drawer-container" :width="270">
-        <div class="drawer-header fl-center" slot="header">
-          <Icon type="md-menu" class="header-btn-menu" @click="isOpenDrawer = true" />
-          <img src="../assets/mark.svg" />
-        </div>
-
-        <!-- 抽屉菜单栏 -->
-        <Menu theme="dark" :open-names="['0']" accordion style="width:100%;padding-left:30px;margin-top:20px;" @on-select="closeMenu">
-          <Submenu name="0">
-            <template slot="title">
-              <Icon type="ios-paper" size="18" />
-              <span class="first-menu">学情分析系统</span>
-            </template>
-            <MenuItem name="0-1" to="/home">学情分析仪表盘<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-          </Submenu>
-          <Submenu name="1">
-            <template slot="title">
-              <Icon type="ios-paper" size="18" />
-              <span class="first-menu">智慧校园管理</span>
-            </template>
-            <MenuItem name="1-1" to="/home/system">校园基础数据<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-            <MenuItem name="1-4" to="/home/classroom">班级教室管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-            <MenuItem name="1-2" to="/home/studentAccount">学生账号管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-            <MenuItem name="1-3" to="/home/404">教师账号管理</MenuItem>
-            <MenuItem name="1-5" to="/home/404">软件及授权管理</MenuItem>
-          </Submenu>
-          <Submenu name="2">
-            <template slot="title">
-              <Icon type="ios-people" size="18" />
-              <span class="first-menu">课程管理</span>
-            </template>
-            <MenuItem name="2-2" to="/home/courseManage">课程管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-
-          </Submenu>
-          <Submenu name="3">
-            <template slot="title">
-              <Icon type="ios-folder" size="18" />
-              <span class="first-menu">教材内容管理</span>
-            </template>
-            <MenuItem name="3-1" to="/home/syllabus">课纲管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-            <MenuItem name="3-3" to="/home/teachcontent">内容管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-            <MenuItem name="3-4" to="/home/evaluation/testPaperList">题目/库管理<span style="color:aqua;margin-left:5px;">待完善</span></MenuItem>
-            <MenuItem name="3-5" to="/home/knowledge">知识点管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
-          </Submenu>
-          <!--<Submenu name="4">
-            <template slot="title">
-              <Icon type="md-bug" size="18" />
-              <span class="first-menu">学习活动服务</span>
-            </template>
-            <MenuItem name="4-1" to="/home/evaluation/createTest">创建活动</MenuItem>
-            <MenuItem name="4-2" to="/home/evaluation/testPaperList">管理活动</MenuItem>
-            <MenuItem name="4-3">活动评价</MenuItem>
-            <MenuItem name="4-4">活动仪表</MenuItem>
-          </Submenu>-->
-          <Submenu name="learnActivity">
-            <template slot="title">
-              <Icon type="md-bug" size="18" />
-              <span class="first-menu">学习活动服务<span style="color:aqua;margin-left:5px;font-size:14px;">(新)</span></span>
-            </template>
-            <Submenu name="create">
-              <template slot="title">
-                <Icon type="ios-create" size="18" />
-                <span class="first-menu">创建学习活动</span>
-              </template>
-              <MenuItem name="createEvaluation" to="/home/createEvaluation">评测活动</MenuItem>
-              <MenuItem name="createUnit" to="/home/createLearnUnit">最小单元</MenuItem>
-              <MenuItem name="createOrder" to="/home/createOrderLearn">编序式活动</MenuItem>
-              <MenuItem name="createPreview" to="/404">课前预习</MenuItem>
-              <MenuItem name="createHomework" to="/404">作业活动</MenuItem>
-            </Submenu>
-            <Submenu name="manage">
-              <template slot="title">
-                <Icon type="md-list" size="18" />
-                <span class="first-menu">管理学习活动</span>
-              </template>
-              <MenuItem name="manageEvaluation" to="/home/manageEvaluation">评测活动</MenuItem>
-              <MenuItem name="manageLearn" to="/home/404">自主学习</MenuItem>
-              <MenuItem name="manageWork" to="/home/manageActivity">作业活动</MenuItem>
-            </Submenu>
-
-          </Submenu>
-          <!--<Submenu name="5">
-            <template slot="title">
-              <Icon type="ios-stats" size="18" />
-              <span class="first-menu">班级智慧服务</span>
-            </template>
-            <MenuItem name="5-1">区班校活动记录簿</MenuItem>
-            <MenuItem name="5-3">操行成绩管理</MenuItem>
-            <MenuItem name="5-4">成绩总览与登录</MenuItem>
-            <MenuItem name="5-5" to="/totalIndex">学情仪表盘</MenuItem>
-          </Submenu>-->
-        </Menu>
-
-      </Drawer>
+    <div id="main">
+        <div class="header-container">
+            <!-- 头部左侧按钮及LOGO -->
+            <div class="header-left-box fl-around">
+                <Icon type="md-menu" class="header-btn-menu" @click="isOpenDrawer = true" />
+                <img src="../assets/mark.svg" />
+            </div>
+            <!-- 头部右侧个人中心部分 -->
+            <div class="header-right-box fl-around">
+                <Icon type="md-help-circle" />
+                <Icon type="ios-settings" />
+                <Icon type="ios-bug" />
+                <Dropdown @on-click="basicMenu">
+                    <a href="javascript:void(0)">
+                        <img src="../assets/icon/icon_header.png" />
+                    </a>
+                    <DropdownMenu slot="list">
+                        <DropdownItem>个人信息</DropdownItem>
+                        <DropdownItem>推送消息</DropdownItem>
+                        <DropdownItem>公告栏</DropdownItem>
+                        <DropdownItem>行事历</DropdownItem>
+                        <DropdownItem name="quit">退出</DropdownItem>
+                    </DropdownMenu>
+                </Dropdown>
+            </div>
+
+            <!-- 全局抽屉部分 -->
+            <Drawer placement="left" :closable="false" v-model="isOpenDrawer" class-name="drawer-container" :width="270">
+                <div class="drawer-header fl-center" slot="header">
+                    <Icon type="md-menu" class="header-btn-menu" @click="isOpenDrawer = true" />
+                    <img src="../assets/mark.svg" />
+                </div>
+
+                <!-- 抽屉菜单栏 -->
+                <Menu theme="dark" :open-names="['0']" accordion style="width:100%;padding-left:30px;margin-top:20px;" @on-select="closeMenu">
+                    <Submenu name="0">
+                        <template slot="title">
+                            <Icon type="ios-paper" size="18" />
+                            <span class="first-menu">学情分析系统</span>
+                        </template>
+                        <MenuItem name="0-1" to="/home">学情分析仪表盘<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+                    </Submenu>
+                    <Submenu name="1">
+                        <template slot="title">
+                            <Icon type="ios-paper" size="18" />
+                            <span class="first-menu">智慧校园管理</span>
+                        </template>
+                        <MenuItem name="1-1" to="/home/system">校园基础数据<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+                        <MenuItem name="1-4" to="/home/classroom">班级教室管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+                        <MenuItem name="1-2" to="/home/studentAccount">学生账号管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+                        <MenuItem name="1-3" to="/home/404">教师账号管理</MenuItem>
+                        <MenuItem name="1-5" to="/home/404">软件及授权管理</MenuItem>
+                    </Submenu>
+                    <Submenu name="2">
+                        <template slot="title">
+                            <Icon type="ios-people" size="18" />
+                            <span class="first-menu">课程管理</span>
+                        </template>
+                        <MenuItem name="2-2" to="/home/courseManage">课程管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+
+                    </Submenu>
+                    <Submenu name="3">
+                        <template slot="title">
+                            <Icon type="ios-folder" size="18" />
+                            <span class="first-menu">教材内容管理</span>
+                        </template>
+                        <MenuItem name="3-1" to="/home/syllabus">课纲管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+                        <MenuItem name="3-3" to="/home/teachcontent">内容管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+                        <MenuItem name="3-4" to="/home/evaluation/testPaperList">题目/库管理<span style="color:aqua;margin-left:5px;">待完善</span></MenuItem>
+                        <MenuItem name="3-5" to="/home/knowledge">知识点管理<span style="color:aqua;margin-left:5px;">√</span></MenuItem>
+                    </Submenu>
+                    <Submenu name="learnActivity">
+                        <template slot="title">
+                            <Icon type="md-bug" size="18" />
+                            <span class="first-menu">学习活动服务</span>
+                        </template>
+                        <Submenu name="create">
+                            <template slot="title">
+                                <span class="first-menu">创建学习活动</span>
+                            </template>
+                            <MenuItem name="createEvaluation" to="/home/createEvaluation">评测活动</MenuItem>
+                            <MenuItem name="createUnit" to="/home/createLearnUnit">最小单元</MenuItem>
+                            <MenuItem name="createOrder" to="/home/createOrderLearn">编序式活动</MenuItem>
+                            <MenuItem name="createPreview" to="/404">课前预习</MenuItem>
+                            <MenuItem name="createHomework" to="/404">作业活动</MenuItem>
+                        </Submenu>
+                        <Submenu name="manage">
+                            <template slot="title">
+                                <span class="first-menu">管理学习活动</span>
+                            </template>
+                            <MenuItem name="manageEvaluation" to="/home/manageEvaluation">评测活动</MenuItem>
+                            <MenuItem name="manageLearn" to="/home/manageUnit">最小自学单元</MenuItem>
+                            <MenuItem name="manageOrder" to="/home/manageOrderLearn">作业活动</MenuItem>
+                        </Submenu>
+                        <MenuItem name="activityReport" to="/home/activityReport">
+                            <span style="font-size:16px;">学习活动仪表</span>
+                        </MenuItem>
+                    </Submenu>
+                    <!--<Submenu name="5">
+                      <template slot="title">
+                        <Icon type="ios-stats" size="18" />
+                        <span class="first-menu">班级智慧服务</span>
+                      </template>
+                      <MenuItem name="5-1">区班校活动记录簿</MenuItem>
+                      <MenuItem name="5-3">操行成绩管理</MenuItem>
+                      <MenuItem name="5-4">成绩总览与登录</MenuItem>
+                      <MenuItem name="5-5" to="/totalIndex">学情仪表盘</MenuItem>
+                    </Submenu>-->
+                </Menu>
+
+            </Drawer>
 
+        </div>
+        <div id="content">
+            <router-view></router-view>
+        </div>
     </div>
-    <div id="content">
-      <router-view></router-view>
-    </div>
-  </div>
 </template>
 
 <script>
-  export default {
-    name: 'headers',
-    props: ['parentToChild', 'identityselect'],
-    data() {
-      return {
-        isOpenDrawer: false
+    export default {
+        name: 'headers',
+        props: ['parentToChild', 'identityselect'],
+        data() {
+            return {
+                isOpenDrawer: false
 
-      }
-    },
-    created() {
-      //this.getSchoolBaseInfo()
-    },
-    methods: {
-      getSchoolBaseInfo() {
-        this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(
-          (res) => {
-            if (res.code == 2) {
-              alert('数据为空!')
-            } else {
-              
             }
-          },
-          (err) => {
-            alert('API error!')
-          }
-        )
-      },
-      closeMenu() {
-        this.isOpenDrawer = false
-      },
-      basicMenu(name) {
-        if (name == 'quit') {
-          this.$router.push({
-            path: '/selectModule'
-          })
+        },
+        created() {
+            //this.getSchoolBaseInfo()
+        },
+        methods: {
+            getSchoolBaseInfo() {
+                this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(
+                    (res) => {
+                        if (res.code == 2) {
+                            alert('数据为空!')
+                        } else {
+
+                        }
+                    },
+                    (err) => {
+                        alert('API error!')
+                    }
+                )
+            },
+            closeMenu() {
+                this.isOpenDrawer = false
+            },
+            basicMenu(name) {
+                if (name == 'quit') {
+                    this.$router.push({
+                        path: '/selectModule'
+                    })
+                }
+            }
+        },
+        mounted() {
+            this.getSchoolBaseInfo()
         }
-      }
-    },
-    mounted() {
-      this.getSchoolBaseInfo()
     }
-  }
 </script>
 
 <style scoped>
-  .header-container {
-    width: 100%;
-    height: 83px;
-    background: #191919;
-    display: flex;
-    flex-direction: row;
-    justify-content: space-between;
-    border-bottom: 1px solid rgba(128,128,128,.3);
-    position:fixed;
-    z-index:999;
-  }
-
-  .header-left-box {
-    width: 220px;
-    height: 100%;
-  }
-
-    .header-left-box .header-btn-menu {
-      color: #fff;
-      font-size: 24px;
-      margin-right: 20px;
-      cursor: pointer;
+    .header-container {
+        width: 100%;
+        height: 83px;
+        background: #191919;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        border-bottom: 1px solid rgba(128,128,128,.3);
+        position: fixed;
+        z-index: 999;
     }
 
-    .header-left-box img {
-      width: 140px;
+    .header-left-box {
+        width: 220px;
+        height: 100%;
     }
 
-  .header-right-box {
-    width: 270px;
-    border-left: 2px solid #595959;
-    margin: 20px;
-  }
+        .header-left-box .header-btn-menu {
+            color: #fff;
+            font-size: 24px;
+            margin-right: 20px;
+            cursor: pointer;
+        }
 
-    .header-right-box .ivu-icon {
-      font-size: 28px;
-      color: #d0d0d0;
-      cursor: pointer;
-    }
+        .header-left-box img {
+            width: 140px;
+        }
 
-    .header-right-box img {
-      width: 40px;
-      border-radius: 50%;
-      border: 2px solid #595959;
+    .header-right-box {
+        width: 270px;
+        border-left: 2px solid #595959;
+        margin: 20px;
     }
 
-  .drawer-header {
-    height: 83px;
-    width: 100%;
-    background: #000;
-  }
-
-    .drawer-header .header-btn-menu {
-      color: #fff;
-      font-size: 22px;
-      margin-right: 20px;
-      cursor: pointer;
-      background: #afafaf;
-      border-radius: 50%;
-      padding: 5px;
-    }
+        .header-right-box .ivu-icon {
+            font-size: 28px;
+            color: #d0d0d0;
+            cursor: pointer;
+        }
+
+        .header-right-box img {
+            width: 40px;
+            border-radius: 50%;
+            border: 2px solid #595959;
+        }
 
-    .drawer-header img {
-      width: 140px;
-      margin-top: 4px;
-      margin-right: 3px;
+    .drawer-header {
+        height: 83px;
+        width: 100%;
+        background: #000;
     }
 
-  .drawer-body {
-    margin-top: 50px;
-  }
+        .drawer-header .header-btn-menu {
+            color: #fff;
+            font-size: 22px;
+            margin-right: 20px;
+            cursor: pointer;
+            background: #afafaf;
+            border-radius: 50%;
+            padding: 5px;
+        }
+
+        .drawer-header img {
+            width: 140px;
+            margin-top: 4px;
+            margin-right: 3px;
+        }
 
-    .drawer-body .drawer-menu-item {
-      width: 100%;
+    .drawer-body {
+        margin-top: 50px;
     }
 
-      .drawer-body .drawer-menu-item .drawer-menu-top {
-        width: 100%;
-        height: 10px;
-      }
+        .drawer-body .drawer-menu-item {
+            width: 100%;
+        }
 
-        .drawer-body .drawer-menu-item .drawer-menu-top img {
-          width: 20px;
+            .drawer-body .drawer-menu-item .drawer-menu-top {
+                width: 100%;
+                height: 10px;
+            }
+
+                .drawer-body .drawer-menu-item .drawer-menu-top img {
+                    width: 20px;
+                }
+
+            .drawer-body .drawer-menu-item .drawer-menu-name {
+                color: #b5b5b5;
+                font-size: 16px;
+                font-weight: bolder;
+                margin-left: 20px;
+                margin-top: 7px;
+                letter-spacing: 1px;
+            }
+
+        .drawer-body .drawer-menu-bottom {
+            width: 100%;
+            padding: 20px 10px;
+            margin: 20px 0;
+            background-image: linear-gradient(90deg, rgba(30,30,30,0) 0%, rgba(110,110,110,.2) 50%, rgba(110,110,110,.4) 100%);
         }
 
-      .drawer-body .drawer-menu-item .drawer-menu-name {
-        color: #b5b5b5;
-        font-size: 16px;
-        font-weight: bolder;
-        margin-left: 20px;
-        margin-top: 7px;
-        letter-spacing: 1px;
-      }
+            .drawer-body .drawer-menu-bottom ul {
+                list-style: none;
+                width: 100%;
+                padding-left: 80px;
+            }
 
-    .drawer-body .drawer-menu-bottom {
-      width: 100%;
-      padding: 20px 10px;
-      margin: 20px 0;
-      background-image: linear-gradient(90deg, rgba(30,30,30,0) 0%, rgba(110,110,110,.2) 50%, rgba(110,110,110,.4) 100%);
+                .drawer-body .drawer-menu-bottom ul li {
+                    padding: 8px 0;
+                    width: 100%;
+                    font-size: 14px;
+                    font-weight: bold;
+                    color: #8a8a8a;
+                    cursor: pointer;
+                }
+
+    .fl-center {
+        display: flex;
+        align-items: center;
+        justify-content: center;
     }
 
-      .drawer-body .drawer-menu-bottom ul {
-        list-style: none;
-        width: 100%;
-        padding-left: 80px;
+    .fl-around {
+        display: flex;
+        align-items: center;
+        justify-content: space-around;
+    }
+</style>
+
+<style>
+      html, body {
+          height: 100%;
+          margin: 0px;
+          padding: 0px;
       }
 
-        .drawer-body .drawer-menu-bottom ul li {
-          padding: 8px 0;
+      #main {
           width: 100%;
-          font-size: 14px;
-          font-weight: bold;
-          color: #8a8a8a;
-          cursor: pointer;
-        }
+          height: 100%;
+      }
 
-  .fl-center {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-  }
-
-  .fl-around {
-    display: flex;
-    align-items: center;
-    justify-content: space-around;
-  }
-</style>
+      #content {
+          width: 100%;
+          position: absolute;
+          top: 83px;
+          left: 0px;
+          bottom: 0px;
+          overflow-y: auto;
+          background: #212121;
+      }
+      /*修改iview抽屉样式*/
+      .drawer-container .ivu-drawer-left {
+          background: #000;
+          font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI','Microsoft JhengHei' !important;
+      }
 
-<style>
-  html, body {
-    height: 100%;
-    margin: 0px;
-    padding: 0px;
-  }
-
-  #main {
-    width: 100%;
-    height: 100%;
-  }
-
-  #content {
-    width: 100%;
-    position: absolute;
-    top: 83px;
-    left: 0px;
-    bottom: 0px;
-    overflow-y:auto;
-    background: #212121;
-  }
-  /*修改iview抽屉样式*/
-  .drawer-container .ivu-drawer-left {
-    background: #000;
-    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI','Microsoft JhengHei' !important;
-  }
-
-  .drawer-container .ivu-drawer-header {
-    padding: 0;
-    border: none;
-  }
-
-  .drawer-container .ivu-drawer-content {
-    background: #000;
-  }
-  /*.drawer-container .ivu-drawer-wrap {
-    z-index:9999;
-  }*/
-  .drawer-container .ivu-drawer-body {
-    padding: 0;
-  }
-
-  /*重绘滚动条样式*/
-  .scrollstyle::-webkit-scrollbar {
-    width: 5px;
-  }
-
-  .ivu-drawer-body::-webkit-scrollbar-track {
-    display: none;
-  }
-
-  .scrollstyle::-webkit-scrollbar-thumb {
-    border-radius: 10px;
-    background: #94998a;
-  }
-
-    .scrollstyle::-webkit-scrollbar-thumb:hover {
-      /*background: #555;*/
-    }
+      .drawer-container .ivu-drawer-header {
+          padding: 0;
+          border: none;
+      }
 
-  .scrollstyle::-webkit-scrollbar-button {
-    display: none;
-  }
+      .drawer-container .ivu-drawer-content {
+          background: #000;
+      }
+      /*.drawer-container .ivu-drawer-wrap {
+      z-index:9999;
+    }*/
+      .drawer-container .ivu-drawer-body {
+          padding: 0;
+      }
 
-  .drawer-container .ivu-menu-dark {
-    background: black;
-  }
+      /*重绘滚动条样式*/
+      .scrollstyle::-webkit-scrollbar {
+          width: 5px;
+      }
 
-    .drawer-container .ivu-menu-dark.ivu-menu-vertical .ivu-menu-opened .ivu-menu-submenu-title {
-      background: black;
-    }
+      .ivu-drawer-body::-webkit-scrollbar-track {
+          display: none;
+      }
+
+      .scrollstyle::-webkit-scrollbar-thumb {
+          border-radius: 10px;
+          background: #94998a;
+      }
+
+          .scrollstyle::-webkit-scrollbar-thumb:hover {
+              /*background: #555;*/
+          }
+
+      .scrollstyle::-webkit-scrollbar-button {
+          display: none;
+      }
+
+      .drawer-container .ivu-menu-dark {
+          background: black;
+      }
+
+          .drawer-container .ivu-menu-dark.ivu-menu-vertical .ivu-menu-opened .ivu-menu-submenu-title {
+              background: black;
+          }
+
+      .drawer-container .ivu-menu-opened .ivu-menu {
+          background-image: linear-gradient(to right, black, #2C2C2C);
+      }
+
+      .drawer-container .first-menu {
+          color: #b5b5b5;
+          font-size: 16px;
+          font-weight: bolder;
+          /*margin-left: 20px;*/
+          margin-top: 7px;
+          letter-spacing: 1px;
+      }
 
-  .drawer-container .ivu-menu-opened .ivu-menu {
-    background-image: linear-gradient(to right, black, #2C2C2C);
-  }
-
-  .drawer-container .first-menu {
-    color: #b5b5b5;
-    font-size: 16px;
-    font-weight: bolder;
-    /*margin-left: 20px;*/
-    margin-top: 7px;
-    letter-spacing: 1px;
-  }
-  .drawer-container .ivu-menu-dark.ivu-menu-vertical .ivu-menu-item:hover, .drawer-container .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title:hover {
-    background: black;
-  }
+      .drawer-container .ivu-menu-dark.ivu-menu-vertical .ivu-menu-item:hover, .drawer-container .ivu-menu-dark.ivu-menu-vertical .ivu-menu-submenu-title:hover {
+          background: black;
+      }
 </style>
 
 <style lang="less">
-  @import '../css/dark-iview-modal.less';
-  @import '../css/dark-iview-tabs.less';
-  @import '../css/dark-iview-collapse.less';
-  @import '../css/dark-iview-form.less';
-  @import '../css/dark-iview-table.less';
+    @import '../css/dark-iview-modal.less';
+    @import '../css/dark-iview-tabs.less';
+    @import '../css/dark-iview-collapse.less';
+    @import '../css/dark-iview-form.less';
+    @import '../css/dark-iview-table.less';
+    @import '../css/dark-iview-split.less';
 </style>

+ 37 - 38
TEAMModelOS/ClientApp/src/view/coursemgmt/CourseBaseSetting.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <div class="course-detail-content">
     <div class="course-base-info">
       <div class="course-base-info-header">
@@ -158,7 +158,7 @@
         ],
         noticeEditor: undefined,
         editTimeIndex: -1,
-        isFull:false,
+        isFull: false,
         weekList: [
           {
             label: '星期一',
@@ -198,10 +198,10 @@
             label: '每周课程',
             value: 'week'
           },
-          //{
+          // {
           //  label: '每月课程',
           //  value: 'month'
-          //},
+          // },
           {
             label: '临时课程',
             value: 'temporary'
@@ -267,11 +267,11 @@
       addCourseTime() {
         this.courseInfo.courseTime.push(
           {
-            frequencyCode: 'day',//上课频率 每日、每周、每月、临时课程
-            beginTime: '',//课程开始时间
-            endTime: '',//课程结束时间
-            classroomCode: '',//上课班级/教室
-            frequencyName: '',//临时课程
+            frequencyCode: 'day', // 上课频率 每日、每周、每月、临时课程
+            beginTime: '', // 课程开始时间
+            endTime: '', // 课程结束时间
+            classroomCode: '', // 上课班级/教室
+            frequencyName: ''// 临时课程
           }
         )
         this.editTimeIndex = this.courseInfo.courseTime.length - 1
@@ -281,7 +281,7 @@
         this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(
           (res) => {
             if (res.code == 2) {
-              alert('数据为空!');
+              alert('数据为空!')
             }
             this.isLoaded = true
           },
@@ -295,7 +295,7 @@
         this.$store.dispatch('schoolBaseInfo/getClassroom').then(
           (res) => {
             if (res.code == 2) {
-              alert('数据为空!');
+              alert('数据为空!')
             }
           },
           (err) => {
@@ -309,12 +309,12 @@
           this.courseInfo.baseInfo.notice = html
         }
         noticeEditor.customConfig.menus = [
-          'bold',  // 粗体
-          'italic',  // 斜体
-          'underline',  // 下划线
-          'list',  // 列表
-          'link',  // 插入链接
-          'image',  // 插入图片
+          'bold', // 粗体
+          'italic', // 斜体
+          'underline', // 下划线
+          'list', // 列表
+          'link', // 插入链接
+          'image' // 插入图片
         ],
         noticeEditor.customConfig.showLinkImg = false
         noticeEditor.customConfig.uploadFileName = 'files'
@@ -325,13 +325,13 @@
       /*
        * js-fn里面的getPeriod方法取代
        */
-      //getCurrentGrade(index) {
+      // getCurrentGrade(index) {
       //  this.gradeList = this.$store.state.schoolBaseInfo.schoolBaseInfo.period[index].grades
       //  this.subjectList = this.$store.state.schoolBaseInfo.schoolBaseInfo.period[index].subjects
-      //},
+      // },
       checkStatus() {
         if (!this.baseEditStatus) {
-          this.$Message.warning('请先保存基础信息!');
+          this.$Message.warning('请先保存基础信息!')
         }
       },
       submit(model) {
@@ -345,57 +345,56 @@
               this.$api.courseMgmt.saveOrUpdateCourse([this.courseInfo]).then(
                 res => {
                   if (res.error == null) {
-                    this.$Message.success('保存成功!');
+                    this.$Message.success('保存成功!')
                   } else {
-                    this.$Message.error('保存失败,API Error!');
+                    this.$Message.error('保存失败,API Error!')
                   }
                   this.baseEditStatus = true
                   this.isFull = false
                 },
                 err => {
-                  this.$Message.error('保存失败,API Error!');
+                  this.$Message.error('保存失败,API Error!')
                   this.baseEditStatus = true
                   this.isFull = false
                 }
               )
             } else {
-              this.$Message.error('请完善信息在保存!');
+              this.$Message.error('请完善信息在保存!')
             }
           }
-        } else if(model == 'courseTime'){
+        } else if (model == 'courseTime') {
           this.$api.courseMgmt.saveOrUpdateCourse([this.courseInfo]).then(
             res => {
               if (res.error == null) {
-                this.$Message.success('保存成功!');
+                this.$Message.success('保存成功!')
                 this.editTimeIndex = -1
                 this.recordEdit = {}
               } else {
-                this.$Message.error('保存失败,API Error!');
+                this.$Message.error('保存失败,API Error!')
               }
             },
             err => {
-              this.$Message.error('保存失败,API Error!');
+              this.$Message.error('保存失败,API Error!')
             }
           )
         }
-        
       },
       saveChange() {
         if (this.baseEditStatus) {
           this.$api.courseMgmt.saveOrUpdateCourse([this.courseInfo]).then(
             res => {
               if (res.error == null) {
-                this.$Message.success('保存成功!');
+                this.$Message.success('保存成功!')
               } else {
-                this.$Message.error('保存失败,API Error!');
+                this.$Message.error('保存失败,API Error!')
               }
             },
             err => {
-              this.$Message.error('保存失败,API Error!');
+              this.$Message.error('保存失败,API Error!')
             }
           )
         } else {
-          this.$Message.error('请先保存课程基础信息!');
+          this.$Message.error('请先保存课程基础信息!')
         }
       },
       deleteTime(index) {
@@ -403,10 +402,10 @@
         this.editTimeIndex = -1
       },
       cancelEditTime(index) {
-        if (JSON.stringify(this.recordEdit) !== "{}") {
+        if (JSON.stringify(this.recordEdit) !== '{}') {
           Object.assign(this.courseInfo.courseTime[index], this.recordEdit)
         } else {
-          this.courseInfo.courseTime.splice(index,1)
+          this.courseInfo.courseTime.splice(index, 1)
         }
         this.editTimeIndex = -1
         this.recordEdit = {}
@@ -445,7 +444,7 @@
             }
           })
         },
-        deep: true //true 深度监听
+        deep: true // true 深度监听
       }
     }
   }
@@ -492,7 +491,7 @@
 
   .course-time-item .ivu-select-disabled .ivu-select-selection .ivu-select-arrow {
     display: none;
-    
+
   }
   .disabled-style .ivu-select-disabled .ivu-select-selection .ivu-select-arrow {
     display: none;
@@ -505,4 +504,4 @@
     -webkit-text-fill-color:white;
     font-size:18px;
   }
-</style>
+</style>

+ 3 - 0
TEAMModelOS/ClientApp/src/view/coursemgmt/CourseClassroom.less

@@ -212,4 +212,7 @@
 .close-btn:hover {
   transform: rotate(270deg);
   transition: transform 1s;
+}
+.add-learn-step-icon{
+
 }

+ 30 - 32
TEAMModelOS/ClientApp/src/view/coursemgmt/CourseClassroom.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <div class="course-classroom-box">
     <div class="course-classroom-list">
       <div class="course-classroom-list-header">
@@ -185,11 +185,11 @@
         fn,
         joinQRcode: undefined,
         personalClassroom: {
-          classroomCode:'',
+          classroomCode: '',
           classroomName: '',
-          notice:''
+          notice: ''
         },
-        newPersonalStatus:false,
+        newPersonalStatus: false,
         groupNum: 2,
         groupType: '1',
         selections: [],
@@ -465,15 +465,15 @@
         this.$api.courseMgmt.saveOrUpdateCourse([this.courseInfo]).then(
           res => {
             if (res.error == null) {
-              this.$Message.success('保存成功!');
+              this.$Message.success('保存成功!')
             } else {
-              this.$Message.error('保存失败,API Error!');
+              this.$Message.error('保存失败,API Error!')
             }
             this.baseEditStatus = true
             this.isFull = false
           },
           err => {
-            this.$Message.error('保存失败,API Error!');
+            this.$Message.error('保存失败,API Error!')
             this.baseEditStatus = true
             this.isFull = false
           }
@@ -539,8 +539,8 @@
 
       },
       orderGroupS() {
-        let surplus = this.classroomStudent.length % this.groupNum//余数
-        let maxCount = surplus == 0 ? this.classroomStudent.length / this.groupNum : Math.ceil(this.classroomStudent.length / this.groupNum)//每组最大人数
+        let surplus = this.classroomStudent.length % this.groupNum// 余数
+        let maxCount = surplus == 0 ? this.classroomStudent.length / this.groupNum : Math.ceil(this.classroomStudent.length / this.groupNum)// 每组最大人数
         this.classroomStudent = this.classroomStudent.sort((a, b) => {
           a.seatNo > b.seatNo
         })
@@ -549,7 +549,7 @@
             let startIndex = this.groupNum * i
             if (startIndex + j < this.classroomStudent.length) {
               this.classroomStudent[startIndex + j].group = j + 1
-              this.classroomStudent[startIndex + j].groupName = "组别别名" + (j + 1)
+              this.classroomStudent[startIndex + j].groupName = '组别别名' + (j + 1)
             } else {
               break
             }
@@ -557,8 +557,8 @@
         }
       },
       orderGroup() {
-        let surplus = this.classroomStudent.length % this.groupNum//余数
-        let maxCount = surplus == 0 ? this.classroomStudent.length / this.groupNum : Math.ceil(this.classroomStudent.length / this.groupNum)//每组最大人数
+        let surplus = this.classroomStudent.length % this.groupNum// 余数
+        let maxCount = surplus == 0 ? this.classroomStudent.length / this.groupNum : Math.ceil(this.classroomStudent.length / this.groupNum)// 每组最大人数
         this.classroomStudent = this.classroomStudent.sort((a, b) => {
           a.seatNo > b.seatNo
         })
@@ -568,7 +568,7 @@
           for (let j = 0; j < maxCount; j++) {
             if (startIndex + j < this.classroomStudent.length) {
               this.classroomStudent[startIndex + j].group = i + 1
-              this.classroomStudent[startIndex + j].groupName = "组别别名" + (i + 1)
+              this.classroomStudent[startIndex + j].groupName = '组别别名' + (i + 1)
             } else {
               break
             }
@@ -581,10 +581,10 @@
         }
       },
       randomGroup() {
-        let surplus = this.classroomStudent.length % this.groupNum//余数
-        let surplusCount = surplus//余数
-        let maxCount = surplus == 0 ? this.classroomStudent.length / this.groupNum : Math.ceil(this.classroomStudent.length / this.groupNum)//每组最大人数
-        let record = {}//记录每个组已经分配的人数
+        let surplus = this.classroomStudent.length % this.groupNum// 余数
+        let surplusCount = surplus// 余数
+        let maxCount = surplus == 0 ? this.classroomStudent.length / this.groupNum : Math.ceil(this.classroomStudent.length / this.groupNum)// 每组最大人数
+        let record = {}// 记录每个组已经分配的人数
         for (let i = 1; i <= this.groupNum; i++) {
           record[i] = 0
         }
@@ -603,7 +603,7 @@
             }
           }
           this.classroomStudent[index].group = groupIndex
-          this.classroomStudent[index].groupName = "组别别名" + groupIndex
+          this.classroomStudent[index].groupName = '组别别名' + groupIndex
           if (record[groupIndex] == maxCount) {
             surplusCount--
           }
@@ -633,7 +633,7 @@
             this.classroomStudent[index].group = groupInfo.group
             this.classroomStudent[index].groupName = groupInfo.groupName
           } else {
-            this.$Message.error('error!');
+            this.$Message.error('error!')
           }
         }
       },
@@ -651,14 +651,13 @@
           (err) => {
             console.log(err)
           }
-        )  
-
+        )
       },
       getPersonalClassroom() {
         let requestData = {
           scope: 'personal',
           schoolCode: 'HBCN',
-          TEAMModelId:'habook#0001'
+          TEAMModelId: 'habook#0001'
         }
         this.$api.schoolSetting.findClassInfo(requestData).then(
           res => {
@@ -685,7 +684,7 @@
           this.newPersonalStatus = true
         }
       },
-      
+
       selectSetIndex(index) {
         this.currentSetIndex = index
         if (this.courseClassroomList[this.currentClassroomIndex].scope == 'personal') {
@@ -706,12 +705,12 @@
             this.test = html
           }
           noticeEditor.customConfig.menus = [
-            'bold',  // 粗体
-            'italic',  // 斜体
-            'underline',  // 下划线
-            'list',  // 列表
-            'link',  // 插入链接
-            'image',  // 插入图片
+            'bold', // 粗体
+            'italic', // 斜体
+            'underline', // 下划线
+            'list', // 列表
+            'link', // 插入链接
+            'image' // 插入图片
           ],
             noticeEditor.customConfig.showLinkImg = false
           noticeEditor.customConfig.uploadFileName = 'files'
@@ -722,12 +721,12 @@
         }
       },
       createQRCode(url) {
-        this.$nextTick(()=> {
+        this.$nextTick(() => {
           // 此时已经渲染完成
           let qrcode = new QRCode('qrcode', {
             width: 200, // 设置宽度,单位像素
             height: 200, // 设置高度,单位像素
-            text: url   // 设置二维码内容或跳转地址
+            text: url // 设置二维码内容或跳转地址
           })
           this.joinQRcode = qrcode
         })
@@ -814,7 +813,6 @@
     color: white;
   }
 
-
   .classroom-base-info .w-e-toolbar {
     background: #383838 !important;
     border-radius: 5px 5px 0px 0px;

+ 23 - 25
TEAMModelOS/ClientApp/src/view/coursemgmt/CourseManage.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <div class="course-mgmt-content">
     <div class="course-list">
       <div class="course-list-header">
@@ -60,14 +60,14 @@
     data() {
       return {
         fn,
-        courseListShow:[],
+        courseListShow: [],
         currentSettingIndex: 0,
         addCourseStatus: false,
         demoLoginInfo: {
-          user: "admin",
-          TEAMModelId: "habook#0001",
-          school: "醍摩豆书院",
-          schoolCode: "HBCN"
+          user: 'admin',
+          TEAMModelId: 'habook#0001',
+          school: '醍摩豆书院',
+          schoolCode: 'HBCN'
         }
       }
     },
@@ -76,7 +76,7 @@
         this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(
           (res) => {
             if (res.code == 2) {
-              alert('数据为空!');
+              alert('数据为空!')
             }
             this.isLoaded = true
           },
@@ -90,7 +90,7 @@
         this.$store.dispatch('schoolBaseInfo/getClassroom').then(
           (res) => {
             if (res.code == 2) {
-              alert('数据为空!');
+              alert('数据为空!')
             }
           },
           (err) => {
@@ -100,42 +100,41 @@
       },
       selectSetting(index) {
         this.currentSettingIndex = index
-
       },
       selectCourse(index) {
         this.$store.commit('courseMgmt/setCurrentCourseIndex', index)
-        //setTimeout(() => {
+        // setTimeout(() => {
         //  if (this.$refs.courseBaseSetting != undefined) {
         //    this.$refs.courseBaseSetting.setNoticeContent()
         //  }
-        //}, 800)
-        this.$nextTick(()=> {
+        // }, 800)
+        this.$nextTick(() => {
           // 此时已经渲染完成
           if (this.$refs.courseBaseSetting != undefined) {
             this.$refs.courseBaseSetting.setNoticeContent()
           }
-        });
+        })
       },
       addCourse() {
         this.addCourseStatus = true
         let item = {
           id: Math.uuid(),
           TEAMModelId: 'habook#0001',
-          partitionKey:'personal',
+          partitionKey: 'personal',
           schoolCode: '0101',
-          scope: 'personal',//personal:私有 school:校本
+          scope: 'personal', // personal:私有 school:校本
           baseInfo: {
             courseCode: 'T968475',
             courseName: '',
             periodCode: '',
             gradeCode: '',
             subjectCode: '',
-            notice: '',//课程公告
+            notice: ''// 课程公告
           },
-          assistTeacher: [],//协同教师
-          courseTime: [],//上课时间表
-          classroom: [],//课程“教室”
-          syllabus: []//关联课纲
+          assistTeacher: [], // 协同教师
+          courseTime: [], // 上课时间表
+          classroom: [], // 课程“教室”
+          syllabus: []// 关联课纲
         }
         let test = this.$store.state.courseMgmt.courseList
         test.push(item)
@@ -143,7 +142,7 @@
         this.$store.commit('courseMgmt/setCurrentCourseIndex', this.$store.state.courseMgmt.courseList.length - 1)
         setTimeout(() => {
           this.$refs.courseBaseSetting.setNoticeContent()
-        },500)
+        }, 500)
       },
       getCourseInfo() {
         this.$store.dispatch('courseMgmt/getCourseList').then(
@@ -152,7 +151,7 @@
             if (res.code == 1 || res.code == 3) {
               this.schoolSetting = this.$store.state.schoolBaseInfo.schoolBaseInfo
             } else {
-              //this.getDefaultData()
+              // this.getDefaultData()
             }
             console.log(this.$store.state.courseMgmt.courseList)
           },
@@ -160,7 +159,7 @@
             console.log(err)
           }
         )
-      },
+      }
     },
     created() {
       this.getCourseInfo()
@@ -297,7 +296,6 @@
 
   }
 
-  
   /*对话框样式修改*/
   .add-course-modal .ivu-modal-content {
     background-color: #383838 !important;
@@ -334,4 +332,4 @@
   .course-list-header .ivu-input {
     color: white;
   }
-</style>
+</style>

+ 12 - 12
TEAMModelOS/ClientApp/src/view/coursemgmt/CourseSyllabus.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <div class="course-syllabus-content">
     <div class="course-syllabus-tab-box">
       <span :class="currentTabIndex == 0 ? 'tab-label tab-label-active':'tab-label'" @click="selectSyllabusTab(0)">{{$t('courseManage.syllabus.schoolSyllabus')}}</span>
@@ -27,7 +27,7 @@
         <div slot="left" class="demo-split-pane" style="padding-top:15px;">
           <vuescroll>
             <Collapse simple accordion @on-change="getVolumeCode" v-show="volumes.length > 0">
-              <Panel v-for="(item,index) in volumes" :name="item.volumeCode" :key="index"> 
+              <Panel v-for="(item,index) in volumes" :name="item.volumeCode" :key="index">
                 {{item.volumeName}}
                 <div slot="content">
                   <Tree ref="syllabusTree" :data="syllabus" show-checkbox multiple @on-check-change="getSelectSyllabus($event,index)"></Tree>
@@ -55,7 +55,7 @@
           </vuescroll>
         </div>
       </Split>
-      
+
     </div>
   </div>
 </template>
@@ -69,23 +69,23 @@
     data() {
       return {
         fn,
-        checkedSyllabus:[],
-        syllabus:[],
-        volumes:[],
-        split1:0.8,
+        checkedSyllabus: [],
+        syllabus: [],
+        volumes: [],
+        split1: 0.8,
         showAll: false,
         currentTabIndex: 0,
         filters: {
           periodCode: '',
           gradeCode: '',
-          subjectCode:''
+          subjectCode: ''
         },
         gradeList: [],
-        subjectList:[]
+        subjectList: []
       }
     },
     methods: {
-      getSelectSyllabus(data,index) {
+      getSelectSyllabus(data, index) {
         console.log('----')
         console.log(index)
         console.log(data)
@@ -134,7 +134,7 @@
           schoolCode: 'HBCN',
           status: 1,
           subjectCode: this.filters.subjectCode,
-          type:0
+          type: 0
         }
         this.$api.syllabus.GetVolumes(requestData).then(
           res => {
@@ -209,4 +209,4 @@
   .course-syllabus-box .ivu-tree-empty {
     color:#909090;
   }
-</style>
+</style>

+ 4 - 0
TEAMModelOS/ClientApp/src/view/evaluation/bank/ExerciseList.less

@@ -426,6 +426,10 @@
     padding-left: 0;
 }
 
+.exercise-item .item-tools .item-tools-info:last-child {
+    border:none;
+}
+
 
 .ev-list-container h1, h2, h3, h4, h5, h6 {
     display: inline-block;

+ 52 - 55
TEAMModelOS/ClientApp/src/view/evaluation/bank/ExerciseList.vue

@@ -1,6 +1,7 @@
 <template>
     <div class="ev-list-container">
         <!-- 筛选部分 -->
+        <Loading :top="100" v-show="importLoading" type="1"></Loading>
         <div class="filter-wrap">
             <div class="filter-item">
                 <span class="filter-title">来源:</span>
@@ -24,10 +25,9 @@
             </div>
             <div class="filter-item">
                 <span class="filter-title">科目:</span>
-                <CheckboxGroup v-model="filterSubject" border @on-change="filterSubjectChange">
-                    <Checkbox lable="all">全部</Checkbox>
-                    <Checkbox v-for="(item,index) in subjectList" :key="index" :label="item.subjectCode">{{ item.subjectName }}</Checkbox>
-                </CheckboxGroup>
+                <RadioGroup v-model="filterSubject" type="button" @on-change="filterSubjectChange">
+                    <Radio v-for="(item,index) in subjectList" :key="index" :label="index">{{ item.subjectName }}</Radio>
+                </RadioGroup>
             </div>
             <div class="filter-item">
                 <span class="filter-title">题型:</span>
@@ -38,6 +38,7 @@
                     <Checkbox label="Judge">判断</Checkbox>
                     <Checkbox label="Complete">填空</Checkbox>
                     <Checkbox label="Subjective">问答</Checkbox>
+                    <Checkbox label="Compose">综合</Checkbox>
                 </CheckboxGroup>
             </div>
             <div class="filter-item">
@@ -72,9 +73,7 @@
             <span class="import-exercise">
                 <Button type="success" @click="goCreatePaper">挑题组卷</Button>
                 <Button type="info" @click="goCreateExercise">新建习题</Button>
-                <Upload multiple action="api/ImportExercise/uploadWord" :headers="headers" :show-upload-list="isShowUploadList" :on-success="uploadSuccess">
-                    <Button type="info">导入习题</Button>
-                </Upload>
+                <BaseImport></BaseImport>
             </span>
         </div>
         <!-- 筛选部分结束 -->
@@ -151,7 +150,8 @@
                     <span class="item-tools-info">题型:{{ exersicesType[item.type] }}</span>
                     <span class="item-tools-info">难度:{{ exersicesDiff[item.level - 1] }}</span>
                     <span class="item-tools-info">使用次数:{{ item.usageCount }} 次</span>
-                    <span class="item-tools-info" style="border:0">更新时间:{{ formatDateTime(new Date(item.createTime * 1000)) }}</span>
+
+                    <!--<span class="item-tools-info" style="border:0">更新时间:{{ formatDateTime(new Date(item.createTime * 1000)) }}</span>-->
                     <!--<Button type="info" :style="{backgroundColor:basketList.all.indexOf(item) > -1 ? '#bbbbbb' : ''}" @click="handleChoose(item)">{{basketList.all.indexOf(item) > -1 ? '已选入' : '选题'}} </Button>-->
 
                     <Button type="primary" @click.stop="handleEdit(item)" style="margin-right:10px">编辑</Button>
@@ -174,10 +174,11 @@
 </template>
 <script>
     import Loading from '@/common/Loading.vue'
+    import BaseImport from '../components/BaseImport'
     import { setTimeout } from 'core-js'
     export default {
         components: {
-            Loading
+            Loading,BaseImport
         },
         data() {
             return {
@@ -188,11 +189,11 @@
                 schoolInfo: {},
                 isShowUploadList: false,
                 exersicesType: {
-                    Single: '单选',
-                    Multiple: '多选',
-                    Judge: '判断',
-                    Complete: '填空',
-                    Subjective: '问答',
+                    Single: '单选',
+                    Multiple: '多选',
+                    Judge: '判断',
+                    Complete: '填空',
+                    Subjective: '问答',
                     Compose: '综合题'
                 },
                 exersicesDiff: ['容易', '较易', '一般', '较难', '困难'],
@@ -204,7 +205,7 @@
                 filterSort: 'createTime',
                 filterPeriod: 0,
                 filterGrade: [false],
-                filterSubject: [false],
+                filterSubject: 0,
                 totalNum: 0,
                 isShowAnswer: true,
                 importLoading: false,
@@ -215,12 +216,13 @@
                 periodList: [],
                 gradeList: [],
                 subjectList: [],
-                filterParams: {}
+                filterParams: {},
+                uploadUrl:''
             }
         },
         created() {
             this.getSchoolInfo()
-
+            this.uploadUrl = 'https://' + window.location.host + '/api/ImportExercise/uploadWord'
         },
         methods: {
             /** 获取区班校信息 */
@@ -231,7 +233,7 @@
                     this.periodList = res.data.period
                     this.gradeList = res.data.period[0].grades
                     this.subjectList = res.data.period[0].subjects
-                    this.doFilter();
+                    this.doFilter()
                 })
             },
 
@@ -247,29 +249,28 @@
                     'scopeCode': this.filterOrigin,
                     'periodCode': [this.periodList[this.filterPeriod].periodCode],
                     'gradeCode': this.deleteFalse(this.filterGrade),
-                    'subjectCode': this.deleteFalse(this.filterSubject),
+                    'subjectCode': [this.periodList[this.filterPeriod].subjects[this.filterSubject].subjectCode],
                     'scopeCode': this.filterOrigin,
                     'level': this.deleteFalse(this.filterDiff),
                     'type': this.deleteFalse(this.filterType),
-                    'field': this.deleteFalse(this.filterField),
+                    'field': this.deleteFalse(this.filterField)
                 }
 
                 /** 查询总数参数 */
                 let findCountParams = {
-                    "collectionName": "ExamItem",
-                    "queryDict": {
+                    'collectionName': 'ExamItem',
+                    'queryDict': {
                         'scopeCode': this.filterOrigin,
                         'periodCode': [this.periodList[this.filterPeriod].periodCode],
                         'gradeCode': this.deleteFalse(this.filterGrade),
-                        'subjectCode': this.deleteFalse(this.filterSubject),
+                        'subjectCode': [this.periodList[this.filterPeriod].subjects[this.filterSubject].subjectCode],
                         'scopeCode': this.filterOrigin,
                         'level': this.deleteFalse(this.filterDiff),
                         'type': this.deleteFalse(this.filterType),
-                        'field': this.deleteFalse(this.filterField),
+                        'field': this.deleteFalse(this.filterField)
                     }
                 }
 
-
                 this.getExerciseList(this.filterParams)
                 this.getResultCount(findCountParams)
             },
@@ -303,9 +304,9 @@
              * @param id 试题ID
              */
             getDetailsById(id, index) {
-                this.$api.newEvaluation.FindExerciseById(id).then(res => {
+                this.$api.newEvaluation.FindExerciseById([id]).then(res => {
                     /* 查询到详细数据则替换掉原数据 */
-                    this.exerciseList.splice(index, 1, res.result.data)
+                    this.exerciseList.splice(index, 1, res.result.data[0])
                 })
             },
 
@@ -315,7 +316,7 @@
              * @param id
              */
             onQuestionToggle(index, id, e) {
-                e.stopPropagation();
+                e.stopPropagation()
                 let listIndex = this.collapseList.indexOf(index)
                 if (listIndex > -1) {
                     this.collapseList.splice(listIndex, 1)
@@ -326,17 +327,16 @@
                 }
             },
 
-
             /**
              * 筛选学段条件
              * @param val
              */
             filterPeriodChange(val) {
-                //this.filterPeriod = this.periodList[val].periodCode
+                // this.filterPeriod = this.periodList[val].periodCode
                 this.gradeList = this.schoolInfo.period[val].grades
                 this.subjectList = this.schoolInfo.period[val].subjects
                 this.filterGrade = [false]
-                this.filterSubject = [false]
+                this.filterSubject = 0
                 this.pageChange(1)
             },
 
@@ -358,11 +358,11 @@
              * @param val
              */
             filterSubjectChange(val) {
-                if (val !== [false] && val.indexOf(false) === 0) {
-                    this.filterSubject.splice(val.indexOf(false), 1)
-                } else if (val.indexOf(false) > 0) {
-                    this.filterSubject = [false]
-                }
+                //if (val !== [false] && val.indexOf(false) === 0) {
+                //    this.filterSubject.splice(val.indexOf(false), 1)
+                //} else if (val.indexOf(false) > 0) {
+                //    this.filterSubject = [false]
+                //}
                 this.pageChange(1)
             },
 
@@ -373,7 +373,6 @@
             filterOriginChange(origin) {
                 this.filterOrigin = origin
                 this.pageChange(1)
-
             },
 
             /**
@@ -485,18 +484,18 @@
              * @param date
              */
             formatDateTime(date) {
-                var y = date.getFullYear();
-                var m = date.getMonth() + 1;
-                m = m < 10 ? ('0' + m) : m;
-                var d = date.getDate();
-                d = d < 10 ? ('0' + d) : d;
-                var h = date.getHours();
-                h = h < 10 ? ('0' + h) : h;
-                var minute = date.getMinutes();
-                minute = minute < 10 ? ('0' + minute) : minute;
-                var second = date.getSeconds();
-                second = second < 10 ? ('0' + second) : second;
-                return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
+                var y = date.getFullYear()
+                var m = date.getMonth() + 1
+                m = m < 10 ? ('0' + m) : m
+                var d = date.getDate()
+                d = d < 10 ? ('0' + d) : d
+                var h = date.getHours()
+                h = h < 10 ? ('0' + h) : h
+                var minute = date.getMinutes()
+                minute = minute < 10 ? ('0' + minute) : minute
+                var second = date.getSeconds()
+                second = second < 10 ? ('0' + second) : second
+                return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second
             },
 
             /**
@@ -524,7 +523,6 @@
                         })
                     }
                 })
-                
             },
 
             /**
@@ -542,7 +540,6 @@
                         }
                     })
                 })
-                
             },
 
             // 导入试题
@@ -553,9 +550,9 @@
                     let requestData = { htmlString: response.result.data.HtmlString }
                     this.$api.SaveAnalyzeHtml(requestData).then(res => {
                         if (res.error === null) {
-                            setTimeout(function () {
+                            setTimeout(function() {
                                 that.$Message.success('文件上传解析成功!')
-                                that.exerciseList = res.result.data
+                                //that.exerciseList = res.result.data
                                 that.importLoading = false
                             }, 1000)
                             // this.saveItemBank(res.result.data);
@@ -587,7 +584,7 @@
     }
 </script>
 <style scoped>
-    @import "../index/ExercisesList.css";
+    @import "../index/PickExercise.css";
 </style>
 
 <style>
@@ -611,4 +608,4 @@
         transform: translateY(10px);
         opacity: 0;
     }
-</style>
+</style>

+ 24 - 1
TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.less

@@ -115,13 +115,15 @@
     .fl-col-center;
 
     .paper-item {
+        position: relative;
         width: 100%;
         height: 90px;
         background: White;
         margin-top: 15px;
         .fl-col-center;
         align-items: start;
-        border-radius:5px;
+        border-radius: 5px;
+        cursor: pointer;
 
         &-name {
             font-size: 20px;
@@ -155,6 +157,27 @@
                 border-right: 2px solid #f3f3f3;
             }
         }
+
+        &-tools {
+            position: absolute;
+            height: 100%;
+            right: 50px;
+            top: 0;
+            font-size: 14px;
+            .fl-row-center;
+            display: none;
+
+            span{
+                font-weight:bold;
+                color:red;
+            }
+        }
+
+        &:hover {
+            .paper-item-tools {
+                display: flex;
+            }
+        }
     }
 }
 

+ 169 - 29
TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.vue

@@ -7,9 +7,9 @@
         <div class="ev-list-operation">
             <Checkbox style="visibility:hidden"></Checkbox>
             <span class="import-exercise">
-                <Button type="success" @click="goCreatePaper">手动挑题</Button>
+                <Button type="success" @click="goPickExercises">手动挑题</Button>
                 <Button type="info" @click="randomModal = true">随机挑题</Button>
-                <Upload multiple action="api/ImportExercise/uploadWord" :headers="headers"  :on-success="uploadSuccess">
+                <Upload multiple action="/api/ImportExercise/UploadWord" :headers="headers" :on-success="uploadSuccess">
                     <Button type="info">导入习题</Button>
                 </Upload>
             </span>
@@ -24,10 +24,10 @@
         <!-- 试卷列表页面 -->
         <div class="pl-content-wrap" v-else>
             <Loading :top="100" v-show="dataLoading" type="1"></Loading>
-            <div class="paper-item" v-for="(paper,index) in paperList" :key="index">
+            <div class="paper-item" v-for="(paper,index) in paperList" :key="index" @click="goToPaper(paper)">
                 <div class="paper-item-name">
-                    <span class="paper-item-tag">语文</span>
-                    <span>青城山学校2019年6月语文考卷</span>
+                    <span class="paper-item-tag">{{ getSubjectName(paper.subjectCode) }}</span>
+                    <span>{{ paper.name }}</span>
                 </div>
                 <div class="paper-item-info">
                     <span class="info-item">适用学段:<span class="info-bold">初中</span></span>
@@ -35,6 +35,9 @@
                     <span class="info-item">题量:<span class="info-bold">{{ paper.item ? paper.item.length : 0 }}</span></span>
                     <span class="info-item">难度系数:<span class="info-bold">0.6</span></span>
                 </div>
+                <div class="paper-item-tools">
+                    <span @click.stop="onDeletePaper(paper)">删除</span>
+                </div>
             </div>
 
             <!-- 底部分页区域 -->
@@ -51,17 +54,19 @@
         <!-- 随机挑题组卷 -->
         <Modal v-model="randomModal"
                title="随机挑题"
+               footer-hide
+               class-name="random-pick-modal"
                width="1000px">
-            <!--<BasePoints period="6f705b1b-8221-5307-18da-13da05adf91e" subject="Subject_Chinese" @onCheckChange="onCheckChange"></BasePoints>-->
-            <!--<CreateNewChild v-if="isLoadModal" ref="newChild" :isChildEdit="isChildEdit" :editItem="editChild"></CreateNewChild>-->
-            <AutoCreate 
-                        @getExercises="autoQuestions"
-                        @goToPreview="goCreatePaper"
-                        ></AutoCreate>
-            <div slot="footer">
-                <Button type="text" @click="randomModal = false">取消</Button>
-                <Button type="primary" @click="randomModal = false">确定</Button>
-            </div>
+            <Form :model="paperInfo" label-position="top">
+                <FormItem label="试卷名称">
+                    <Input v-model="paperInfo.name" placeholder="请输入新建试卷名称,必填项"></Input>
+                </FormItem>
+                <FormItem label="设置配分">
+                    <InputNumber :max="100" :min="1" v-model="paperInfo.score" value="100"></InputNumber>
+                </FormItem>
+            </Form>
+            <AutoCreate @getExercises="autoQuestions"
+                        @goToPreview="goCreatePaper"></AutoCreate>
         </Modal>
     </div>
 </template>
@@ -71,7 +76,7 @@
     import AutoCreate from '../../learnactivity/AutoCreate'
     export default {
         components: {
-            Loading,BaseFilter,AutoCreate
+            Loading, BaseFilter, AutoCreate
         },
         data() {
             return {
@@ -81,18 +86,24 @@
                 pageSize: 5,
                 pageNum: 1,
                 dataLoading: false,
-                randomModal:false,
+                randomModal: false,
                 paperList: new Array(10).fill('1'),
                 periodList: [],
                 gradeList: [],
                 subjectList: [],
                 filterParams: {},
                 findCountParams: {},
+                schoolInfo: {},
                 filterSort: 'createTime',
+                paperInfo: {
+                    name: "",
+                    score: 100,
+                    item: []
+                }
             }
         },
         created() {
-            //this.getPaperList()
+            // this.getPaperList()
 
         },
         methods: {
@@ -105,6 +116,7 @@
             },
 
             onFilterChange(filterParams, findCountParams) {
+
                 this.filterParams = {
                     '@CURRPAGE': this.pageNum,
                     '@PAGESIZE': this.pageSize,
@@ -112,9 +124,12 @@
                     'scopeCode': filterParams.scopeCode,
                     'periodCode': filterParams.periodCode,
                     'gradeCode': filterParams.gradeCode,
-                    'subjectCode': filterParams.subjectCode,
+                    'subjectCode': filterParams.subjectCode
                 }
                 this.findCountParams = findCountParams
+
+                //this.gradeList = this.periodList.filter(item => item.periodCode = filterParams.periodCode[0])[0].grades
+                //this.subjectList = this.periodList.filter(item => item.periodCode = filterParams.periodCode[0])[0].subjects
                 this.pageChange(1)
             },
 
@@ -129,6 +144,22 @@
                 })
             },
 
+            /**
+             * 点击查看试卷详情
+             * @param paper
+             */
+            goToPaper(paper) {
+                paper.items = paper.item
+                paper.paperName = paper.name
+                paper.paperScore = paper.score
+                this.$router.push({
+                    name: 'testPaper',
+                    params: {
+                        paper: paper
+                    }
+                })
+            },
+
             /**
              * 获取筛选结果数量
              * @param data
@@ -139,8 +170,49 @@
                 })
             },
 
+            /**
+             * 删除试卷
+             * @param item
+             */
+            onDeletePaper(item) {
+                this.$Modal.confirm({
+                    title: '提示',
+                    content: '<p>确认删除该试卷吗?</p>',
+                    okText: '确认',
+                    cancelText: '取消',
+                    onOk: () => {
+                        this.dataLoading = true
+                        this.$api.learnActivity.DeleteExamPaper({ id: item.id, pk: item.scopeCode }).then(res => {
+                            if (!res.error && res.result.data) {
+                                this.$Message.success('删除成功')
+                                this.pageChange(1)
+                            } else {
+                                this.$Message.warning('删除失败,错误代码:' + res.error.code + ',错误信息:' + res.error.message)
+                            }
+                        }).catch(err => {
+                            console.log(err)
+                            this.$Message.warning('删除失败')
+                        })
+                    }
+                })
+            },
+
             autoQuestions(res) {
-                console.log(res)
+                if (this.paperInfo.name) {
+                    let items = []
+                    res.forEach(item => {
+                        items = items.concat(item.item)
+                    })
+                    console.log(res)
+                    this.paperInfo.item = items
+                    this.paperInfo.scopeCode = this.filterParams.scopeCode,
+                        this.paperInfo.periodCode = this.filterParams.periodCode[0],
+                        this.paperInfo.subjectCode = this.filterParams.subjectCode[0]
+
+                    this.goCreatePaper()
+                } else {
+                    this.$Message.warning("请先输入试卷名称!")
+                }
             },
 
             /**
@@ -153,7 +225,6 @@
                 this.doFilter()
             },
 
-
             /**
              * 切换每页显示数量
              * @param val
@@ -163,8 +234,18 @@
                 this.pageChange(1)
             },
 
-            /** 前往卷页面 */
+            /** 前往卷页面 */
             goCreatePaper() {
+                this.$router.push({
+                    name: 'testPaper',
+                    params: {
+                        paper: this.paperInfo
+                    }
+                })
+            },
+
+            /** 前往手动挑题页面 */
+            goPickExercises() {
                 this.$router.push({
                     name: 'exercisesList'
                 })
@@ -191,8 +272,19 @@
                 }
             },
 
+            /**
+             * 根据SubjectCode换取SubjectName
+             * @param code
+             */
+            getSubjectName(code) {
+                return this.$jsFn.getSubjectName(this.$store.state.schoolBaseInfo.schoolBaseInfo, code)
+            }
 
         },
+        mounted() {
+            this.schoolInfo = this.$store.state.schoolBaseInfo.schoolBaseInfo
+            this.periodList = this.schoolInfo.period
+        },
         computed: {
             headers() {
                 let hd = {}
@@ -205,16 +297,64 @@
 <style src="./TestPaperList.less" lang="less" scoped>
 </style>
 
-
 <style>
     .pl-content-wrap .ivu-page {
-    display: flex;
-    flex-direction: row;
-    justify-content: center;
-    margin: 20px 0;
-}
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        margin: 20px 0;
+    }
 
     .pl-container .ivu-checkbox-inner {
-        display:none !important;
+        display: none !important;
+    }
+
+    .random-pick-modal .question-condition-wrap .question-condition-item .condition-label,
+    .random-pick-modal .question-condition-wrap .question-condition-item {
+        color: #000;
+        font-size: 14px;
+    }
+
+    .random-pick-modal .question-num-item .ivu-select-selection {
+        color: #333333;
+    }
+
+    .random-pick-modal .question-num-item .ivu-input-number,
+    .random-pick-modal .question-num-item .ivu-input-number-small input {
+        color: #000;
+    }
+
+    .random-pick-modal .auto-create-wrap {
+        background: transparent;
+    }
+
+    .random-pick-modal .auto-create-name {
+        color: #515a6e;
+        text-align: left;
+        font-size: 14px;
+        font-weight: normal;
+        margin-top: 0;
+    }
+
+    .random-pick-modal .question-condition-wrap .ivu-btn {
+        height: 40px;
+        line-height: 40px;
+        margin-top: 0;
+    }
+
+    .random-pick-modal .question-condition-wrap {
+        overflow: hidden;
+    }
+
+    .random-pick-modal .ivu-tag {
+        background: transparent !important;
+    }
+
+    .random-pick-modal .ivu-tag-color-white {
+        color: #515a6e !important;
+    }
+
+    .random-pick-modal .ivu-tag .ivu-icon-ios-close {
+        color: #515a6e !important;
     }
 </style>

+ 2 - 4
TEAMModelOS/ClientApp/src/view/evaluation/bank/index.vue

@@ -17,7 +17,7 @@
         components: { PaperList, ExerciseList },
         data() {
             return {
-                tabName:'exercise'
+                tabName: 'exercise'
             }
         },
         created() {
@@ -25,11 +25,9 @@
         },
         methods: {
 
-
-
         },
         mounted() {
-            if(this.$route.params.tabName) this.tabName = this.$route.params.tabName
+            if (this.$route.params.tabName) this.tabName = this.$route.params.tabName
         }
     }
 </script>

+ 468 - 0
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseEditExercise.vue

@@ -0,0 +1,468 @@
+<template>
+    <div class="ev-container">
+        <span class="ev-title"><Icon type="ios-paper" />{{isEdit?'编辑习题':'新建习题'}}</span>
+        <Divider />
+        <div class="display-flex">
+            <div class="exersices-attr my-radio-style">
+                <IconText :text="'选择学段'" :color="'#00b8ff'" :icon="'md-school'"></IconText>
+                <Select v-model="exercisePeriod" @on-change="onPeriodChange">
+                    <Option v-for="(period,index) in schoolInfo.period" :value="index" :key="index">{{ period.periodName }}</Option>
+                </Select>
+            </div>
+            <div class="my-radio-style exersices-attr">
+                <IconText :text="'选择年级'" :color="'#00b8ff'" :icon="'logo-buffer'"></IconText>
+                <Select v-model="exerciseGrade" multiple>
+                    <Option v-for="(grade,index) in gradeList" :value="grade.gradeCode" :key="index">{{ grade.gradeName }}</Option>
+                </Select>
+            </div>
+            <div class="exersices-attr my-radio-style">
+                <IconText :text="'选择科目'" :color="'#00b8ff'" :icon="'md-bookmarks'"></IconText>
+                <Select v-model="exerciseSubject">
+                    <Option v-for="(subject,index) in subjectList" :value="index" :key="index">{{ subject.subjectName }}</Option>
+                </Select>
+            </div>
+        </div>
+        <div class="display-flex">
+            <div class="exersices-attr my-radio-style">
+                <IconText :text="'题目归属'" :color="'#00b8ff'" :icon="'md-cube'"></IconText>
+                <Select v-model="exerciseScope">
+                    <Option v-for="(item,index) in scopeList" :value="index" :key="index">{{ item }}</Option>
+                </Select>
+            </div>
+            <div class="exersices-attr my-radio-style">
+                <IconText :text="'关联认知层次'" :color="'#00b8ff'" :icon="'md-planet'"></IconText>
+                <Select v-model="exerciseField">
+                    <Option v-for="(item,index) in fieldList" :value="index" :key="index">{{ item }}</Option>
+                </Select>
+            </div>
+            <div class="exersices-attr my-radio-style">
+                <IconText :text="'关联知识点'" :color="'#00b8ff'" :icon="'md-infinite'"></IconText>
+                <Button type="info" style="margin-top:20px" @click="selectPointsModal = true" v-if="exercisePoints.length === 0">选择知识点</Button>
+                <div v-else style="margin-top:10px">
+                    <span v-for="(item,index) in exercisePoints" :key="index" class="exercise-item-point">
+                        {{item.name}}
+                        <span class="exercise-item-point-close"><Icon type="md-close" @click="onDeletePoint(index)" style="display:none" /></span>
+                    </span>
+                    <span class="exercise-item-point-modify" @click="selectPointsModal = true">修改</span>
+                </div>
+            </div>
+
+        </div>
+        <div class="exersices-attr display-flex">
+            <div class="exersices-attr-type my-radio-style">
+                <IconText :text="'选择题型'" :color="'#00b8ff'" :icon="'md-pricetags'"></IconText>
+                <RadioGroup v-model="exersicesType" type="button" @on-change="typeChange">
+                    <Radio label="Single" :disabled="isEdit">单选</Radio>
+                    <Radio label="Multiple" :disabled="isEdit">多选</Radio>
+                    <Radio label="Judge" :disabled="isEdit">判断</Radio>
+                    <Radio label="Complete" :disabled="isEdit">填空</Radio>
+                    <Radio label="Subjective" :disabled="isEdit">问答</Radio>
+                    <Radio label="Compose" :disabled="isEdit">综合</Radio>
+                </RadioGroup>
+            </div>
+            <div class="exersices-attr-diff my-radio-style">
+                <IconText :text="'题目难度'" :color="'#00b8ff'" :icon="'md-pulse'"></IconText>
+                <RadioGroup v-model="exersicesDiff" type="button">
+                    <Radio label="1" @click.native="diffChange($event,'1')">容易</Radio>
+                    <Radio label="2" @click.native="diffChange($event,'2')">较易</Radio>
+                    <Radio label="3" @click.native="diffChange($event,'3')">一般</Radio>
+                    <Radio label="4" @click.native="diffChange($event,'4')">较难</Radio>
+                    <Radio label="5" @click.native="diffChange($event,'5')">困难</Radio>
+                </RadioGroup>
+            </div>
+        </div>
+
+        <BaseSingle v-if="exersicesType==='Single'" ref="single" :editInfo="editInfo"></BaseSingle>
+        <BaseMultiple v-else-if="exersicesType==='Multiple'" ref="multiple" :editInfo="editInfo"></BaseMultiple>
+        <BaseJudge v-else-if="exersicesType==='Judge'" ref="judge" :editInfo="editInfo"></BaseJudge>
+        <BaseCompletion v-else-if="exersicesType==='Complete'" ref="complete" :editInfo="editInfo"></BaseCompletion>
+        <BaseSubjective v-else-if="exersicesType==='Subjective'" ref="subjective" :editInfo="editInfo"></BaseSubjective>
+
+        <!-- 解析的富文本部分 -->
+        <div class="exersices-analysis">
+            <IconText :text="'解析'" :color="'#2892DD'" :icon="'md-list'" style="margin-bottom:10px;"></IconText>
+            <div>
+                <div ref="analysisEditor" style="text-align:left"></div>
+            </div>
+        </div>
+
+        <!-- 补救的富文本部分 -->
+        <div class="exersices-analysis">
+            <IconText :text="'补救资源'" :color="'#2892DD'" :icon="'md-list'" style="margin-bottom:10px"></IconText>
+            <div>
+                <div ref="repairEditor" style="text-align:left"></div>
+            </div>
+        </div>
+
+        <div class="save-wrap display-flex">
+            <Button type="success" @click="getContent(exersicesType)">保存</Button>
+            <Button type="success" @click="reloadCreate" style="margin-left:10px" v-show="isEdit">新增习题</Button>
+            <Button type="success" @click="resetEditor" style="margin-left:10px">题库</Button>
+        </div>
+
+        <Modal v-model="selectPointsModal"
+               title="选择知识点"
+               width="600px"
+               style="z-index:99999">
+            <BasePoints period="6f705b1b-8221-5307-18da-13da05adf91e" subject="Subject_Chinese" @onCheckChange="onCheckChange"></BasePoints>
+            <!--<CreateNewChild v-if="isLoadModal" ref="newChild" :isChildEdit="isChildEdit" :editItem="editChild"></CreateNewChild>-->
+            <div slot="footer">
+                <Button type="text" @click="onConfirm">取消</Button>
+                <Button type="primary" @click="onConfirm">确定</Button>
+            </div>
+        </Modal>
+
+    </div>
+</template>
+<script>
+    import 'videojs-contrib-hls.js/src/videojs.hlsjs'
+    import IconText from '@/components/evaluation/IconText.vue'
+    import BaseSingle from '@/view/evaluation/types/BaseSingle.vue'
+    import BaseMultiple from '@/view/evaluation/types/BaseMultiple.vue'
+    import BaseCompletion from '@/view/evaluation/types/BaseCompletion.vue'
+    import BaseJudge from '@/view/evaluation/types/BaseJudge.vue'
+    import BaseSubjective from '@/view/evaluation/types/BaseSubjective.vue'
+    import BasePoints from '@/view/evaluation/components/BasePoints'
+    import E from 'wangeditor'
+    // 默认创建题目模板
+    const defaultExercise = {
+        question: '',
+        options: [],
+        level: 1,
+        answer: [],
+        explain: '',
+        type: ''
+    }
+    export default {
+        props:['exerciseItem'],
+        components: {
+            IconText, BaseSingle, BaseJudge, BaseMultiple, BaseCompletion, BaseSubjective, BasePoints
+        },
+        data() {
+            return {
+                selectPointsModal: false,
+                isEdit: false,
+                editInfo: {},
+                schoolInfo: {},
+                exersicesType: 'Single',
+                exerciseField: 0,
+                exercisePeriod: 0,
+                exerciseGrade: [],
+                exerciseSubject: 0,
+                exerciseScope: 0,
+                exercisePoints: [],
+                scopeList: ['个人题库', '校本题库'],
+                fieldList: ['知识', '理解', '应用', '分析', '综合', '评鉴'],
+                periodList: [],
+                gradeList: [],
+                subjectList: [],
+                exersicesDiff: '1',
+                analysisContent: '',
+                repairContent: '',
+                stemContent: '',
+                analysisEditor: null,
+                repairEditor: null,
+                videoHtml: '',
+                playerOptions: {
+                    playbackRates: [0.7, 1.0, 1.5, 2.0], // 播放速度
+                    autoplay: false, // 如果true,浏览器准备好时开始回放。
+                    controls: true, // 控制条
+                    preload: 'auto', // 视频预加载
+                    muted: false, // 默认情况下将会消除任何音频。
+                    loop: false, // 导致视频一结束就重新开始。
+                    language: 'zh-CN',
+                    aspectRatio: '16:9', // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
+                    fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
+                    sources: [{
+                        // type: 'application/x-mpegURL',
+                        src: 'https://teammodelstorage.blob.core.chinacloudapi.cn/teammodelcontest/20190517/history/history.m3u8'
+                    }],
+                    // poster: "http://static.smartisanos.cn/pr/img/video/video_03_cc87ce5bdb.jpg", //你的封面地址
+                    width: document.documentElement.clientWidth,
+                    notSupportedMessage: '此视频暂无法播放,请稍后再试' // 允许覆盖Video.js无法播放媒体源时显示的默认信息。
+                }
+            }
+        },
+        created() {
+            let editItem = this.$route.params.item // 编辑题目
+            if (editItem) {
+                this.editInfo = editItem
+                console.log(editItem)
+            } else {
+                // 初始化区班校信息
+                this.getSchoolInfo()
+            }
+        },
+        methods: {
+            getSchoolInfo() {
+                this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(res => {
+                    this.schoolInfo = res.data
+                    this.gradeList = res.data.period[0].grades
+                    this.subjectList = res.data.period[0].subjects
+                })
+            },
+
+            getContent: function (type) {
+                let exerciseItem = Object.assign({}, defaultExercise)
+                switch (type) {
+                    case 'Single':
+                        exerciseItem.question = this.$refs.single._data.stemContent
+                        exerciseItem.option = this.$refs.single._data.optionsContent.length === this.$refs.single._data.options.length ? this.$refs.single._data.optionsContent : null
+                        exerciseItem.type = this.exersicesType
+                        exerciseItem.level = +this.exersicesDiff
+                        exerciseItem.explain = this.analysisContent
+                        exerciseItem.answer = [String.fromCharCode(64 + parseInt(this.$refs.single._data.trueIndex + 1))]
+
+                        break
+                    case 'Multiple':
+                        exerciseItem.question = this.$refs.multiple._data.stemContent
+                        exerciseItem.option = this.$refs.multiple._data.optionsContent.length === this.$refs.multiple._data.options.length ? this.$refs.multiple._data.optionsContent : null
+                        exerciseItem.type = this.exersicesType
+                        exerciseItem.level = +this.exersicesDiff
+                        exerciseItem.explain = this.analysisContent
+                        exerciseItem.answer = this.$refs.multiple._data.transferArr
+                        break
+                    case 'Judge':
+                        exerciseItem.question = this.$refs.judge._data.stemContent
+                        exerciseItem.option = []
+                        exerciseItem.type = this.exersicesType
+                        exerciseItem.level = +this.exersicesDiff
+                        exerciseItem.explain = this.analysisContent
+                        exerciseItem.answer = [this.$refs.judge._data.trueAnswer]
+                        break
+                    case 'Complete':
+                        exerciseItem.question = this.$refs.complete._data.stemContent
+                        exerciseItem.option = []
+                        exerciseItem.type = this.exersicesType
+                        exerciseItem.level = +this.exersicesDiff
+                        exerciseItem.explain = this.analysisContent
+                        exerciseItem.answer = this.$refs.complete._data.optionsContent.map(item => item.value)
+                        break
+                    case 'Subjective':
+                        exerciseItem.question = this.$refs.subjective._data.stemContent
+                        exerciseItem.option = []
+                        exerciseItem.type = this.exersicesType
+                        exerciseItem.level = +this.exersicesDiff
+                        exerciseItem.explain = this.analysisContent
+                        exerciseItem.answer = this.$refs.subjective._data.answerContent
+                        break
+                }
+                exerciseItem.id = this.editInfo.id ? this.editInfo.id : ''
+                exerciseItem.repair = this.repairContent
+                exerciseItem.field = this.fieldList[this.exerciseField]
+                exerciseItem.points = this.exercisePoints.map(item => item.id)
+                exerciseItem.periodCode = this.schoolInfo.period[this.exercisePeriod].periodCode
+                exerciseItem.gradeCode = this.exerciseGrade
+                exerciseItem.subjectCode = this.schoolInfo.period[this.exercisePeriod].subjects[this.exerciseSubject].subjectCode
+                exerciseItem.scopeCode = this.exerciseScope === 0 ? 'habook#0001' : this.schoolInfo.schoolCode
+
+                // 判断获取的数据是否有空数据以及是否为空字符串
+                if (this.checkContent(exerciseItem) && this.getSimpleText(exerciseItem.question) && this.getSimpleText(exerciseItem.explain) && exerciseItem.gradeCode.length) {
+                    this.saveExercise(exerciseItem)
+                    console.log(exerciseItem)
+                    this.$router.push({
+                        name: 'testPaperList',
+                        params: {
+                            tabName: 'exercise'
+                        }
+                    })
+                } else {
+                    this.$Message.warning('请将题目填写完整!')
+                    console.log(exerciseItem)
+                }
+            },
+
+            saveExercise(item) {
+                this.$api.newEvaluation.SaveSingleExercise(item).then(res => {
+                    console.log(res)
+                })
+            },
+
+            onConfirm() {
+                this.selectPointsModal = false
+            },
+
+            onCheckChange(val, list) {
+                this.exercisePoints = []
+                val.forEach(item => {
+                    this.exercisePoints.push(list.filter(point => point.id === item)[0])
+                })
+            },
+
+            onDeletePoint(index) {
+                this.exercisePoints.splice(index, 1)
+            },
+
+            // 题目类型转换
+            typeChange(val) {
+                if (this.isEdit) {
+                    this.$Message.warning('暂不支持更换题型!')
+                } else if (val === 'Compose') {
+                    this.$router.push({
+                        name: 'createCompose'
+                    })
+                } else {
+                    this.exersicesType = val
+                    this.analysisEditor.txt.clear()
+                    this.repairEditor.txt.clear()
+                }
+            },
+
+            // 难度与背景颜色切换
+            diffChange(e, type) {
+                this.exersicesDiff = +type
+                e.preventDefault()
+                let colorArr = ['#10abe7', '#E8BE15', '#F19300', '#EB5E00', '#D30000']
+                let ac = document.getElementsByClassName('exersices-attr-diff')[0].children[1].children
+                for (let i = 0; i < ac.length; i++) {
+                    ac[i].style.background = '#fff'
+                    ac[i].style.color = '#515a6e'
+                }
+                e.target.style.background = colorArr[type - 1]
+                e.target.style.color = '#fff'
+            },
+
+            onPeriodChange(val) {
+                console.log('学段变化')
+                this.gradeList = this.schoolInfo.period[val].grades
+                this.subjectList = this.schoolInfo.period[val].subjects
+                this.exerciseGrade = 0
+                this.exerciseSubject = 0
+            },
+
+            // 提取富文本内容中的文本
+            getSimpleText(html) {
+                var msg = html.replace(/<(?!img|video).*?>/g, '')// 执行替换成空字符
+                return msg.replace(/&nbsp;/ig, '')
+            },
+            // 排除对象空属性
+            checkContent(Obj) {
+                let flag = true
+                for (let key in Obj) {
+                    if (!Obj[key] && key !== 'id') {
+                        flag = false
+                    }
+                }
+                return flag
+            },
+
+            // 重置编辑器
+            resetEditor() {
+                this.$router.push({
+                    name: 'testPaperList',
+                    params: {
+                        tabName: 'exercise'
+                    }
+                })
+            },
+
+            // 重置
+            reloadCreate() {
+                location.reload()
+            },
+
+            // 文件上传成功回调
+            handleSuccess(res, file) {
+                // this.videoHtml = "<br><iframe src='https://teammodelstorage.blob.core.chinacloudapi.cn/wechatfilescontainer/wechatfilescontainer/HilearningMobile_function_10.mp4' frameborder='0' allowfullscreen='true'></iframe><br>"
+                this.videoHtml = '<br><a href=' + res.data[0] + " download='w3logo'>" + file.name + '</a><br>'
+                this.analysisContent = this.analysisContent + this.videoHtml
+                this.analysisEditor.txt.append(this.videoHtml)
+            },
+
+            // 文件上传成功回调
+            handleRepairSuccess(res, file) {
+                this.videoHtml = '<br><a href=' + res.data[0] + " download='w3logo'>" + file.name + '</a><br>'
+                this.repairContent = this.repairContent + this.videoHtml
+                this.repairEditor.txt.append(this.videoHtml)
+            },
+
+            renderExercise(editItem) {
+                let schoolInfo = this.$store.state.schoolBaseInfo.schoolBaseInfo
+
+                this.isEdit = true
+                this.editInfo = editItem
+                this.exersicesDiff = editItem.level.toString() || '1'
+                this.exersicesType = editItem.type
+                this.exerciseField = this.fieldList.indexOf(editItem.field)
+                console.log(this.fieldList.indexOf(editItem.field))
+                console.log(this.exerciseField)
+
+                // 重新渲染题目难度
+                let diffDom = document.getElementsByClassName('exersices-attr-diff')[0].getElementsByClassName('ivu-radio-wrapper')[editItem.level - 1]
+                let colorArr = ['#32CF74', '#E8BE15', '#F19300', '#EB5E00', '#D30000']
+                diffDom.style.background = colorArr[editItem.level - 1]
+                diffDom.style.color = '#fff'
+
+                this.schoolInfo = schoolInfo
+                this.exerciseGrade = editItem.gradeCode
+                this.exercisePeriod = schoolInfo.period.map(item => item.periodCode).indexOf(editItem.periodCode)
+                this.subjectList = schoolInfo.period[this.exercisePeriod].subjects
+                this.gradeList = schoolInfo.period[this.exercisePeriod].grades
+                this.exerciseSubject = this.subjectList.map(item => item.subjectCode).indexOf(editItem.subjectCode)
+
+                this.stemContent = editItem.question
+                this.optionsContent = editItem.option
+                this.analysisContent = editItem.explain
+                this.repairContent = editItem.repair
+                this.analysisEditor.txt.html(editItem.explain)
+                this.repairEditor.txt.html(editItem.repair)
+            }
+
+        },
+        mounted() {
+            /** 初始化解析编辑器 */
+            let analysisEditor = new E(this.$refs.analysisEditor)
+            analysisEditor.customConfig.onchange = (html) => {
+                this.analysisContent = html
+            },
+                analysisEditor.customConfig.uploadImgServer = '/api/file/uploadWangEditor'
+            analysisEditor.customConfig.showLinkImg = false
+            analysisEditor.customConfig.uploadFileName = 'files'
+            analysisEditor.create()
+            this.analysisEditor = analysisEditor
+
+            /** 初始化补救编辑器 */
+            let repairEditor = new E(this.$refs.repairEditor)
+            repairEditor.customConfig.onchange = (html) => {
+                this.repairContent = html
+            },
+                repairEditor.customConfig.uploadImgServer = '/api/file/uploadWangEditor'
+            repairEditor.customConfig.showLinkImg = false
+            repairEditor.customConfig.uploadFileName = 'files'
+            repairEditor.create()
+            this.repairEditor = repairEditor
+
+        },
+        watch: {
+            exerciseItem: {
+                handler(newValue, oldValue) {
+                    if (newValue) {
+                        this.editItem = newValue
+                        console.log("传进来的ITEM")
+                        console.log(newValue)
+                        this.renderExercise(newValue)
+                    }
+                },
+                immediate:true
+            },
+           
+        }
+    }
+</script>
+<style src="../index/CreateExercises.css" scoped>
+</style>
+
+<style>
+    .exersices-attr .ivu-select-multiple .ivu-tag {
+        height: 32px;
+        line-height: 31px;
+    }
+
+        .exersices-attr .ivu-select-multiple .ivu-tag i {
+            top: 9px;
+        }
+
+    .exersices-attr .ivu-select-multiple .ivu-select-selection .ivu-select-placeholder {
+        line-height: 38px;
+    }
+</style>

+ 414 - 108
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseExerciseList.vue

@@ -1,97 +1,115 @@
 
 <template>
-    <div class="form-container">
+    <div class="components-el-container">
         <!-- 题目列表部分 -->
         <div v-if="exerciseList.length === 0" class="no-data-text">
             <img src="../../../assets/icon/no_data.svg" width="120" />
             <span style="margin-top:15px;color:#808080">暂无数据</span>
         </div>
         <div class="content-wrap" v-else>
-            <Loading :top="100" v-show="dataLoading" type="1"></Loading>
-            <div class="exercise-item" v-for="(item,index) of exerciseList" :key="index" @click="onQuestionToggle(index,item.id,$event)">
-                <!-- 题干部分 -->
-                <div class="item-question" style="pointer-events:none">
-                    <p>{{ pageSize * (pageNum - 1) + index + 1 }} : <span v-html="item.question"></span></p>
-                    <span class="item-btn-toggle">
-                        <Icon :type="collapseList.indexOf(index) > -1 ? 'ios-arrow-dropup' : 'ios-arrow-dropdown'" />
-                        <!--<Button type="primary">选题</Button>-->
-                    </span>
-                </div>
-                <!-- 选项部分 -->
-                <div v-for="(option,optionIndex) in item.option" :key="optionIndex" class="item-options" style="pointer-events:none">
-                    <p class="item-option-content">{{String.fromCharCode(64 + parseInt(optionIndex+1))}} : <span v-html="option.value"></span></p>
-                </div>
-                <transition name="slide">
-                    <div v-show="collapseList.indexOf(index) > -1" class="toggle-area">
-                        <!-- 如果是组合题 -->
-                        <div v-for="(childQuestion,childIndex) in item.children" :key="childIndex">
-                            <div v-if="item.children.length">
-                                <div class="item-question">
-                                    <p>{{childIndex+1}} : <span v-html="childQuestion.question"></span></p>
-                                </div>
-                                <div v-for="(childOption,childOptionIndex) in childQuestion.option" :key="childOptionIndex">
-                                    <p>{{String.fromCharCode(64 + parseInt(childOptionIndex+1))}} : <span v-html="childOption.value"></span></p>
-                                </div>
-                                <div class="item-answer" v-show="isShowAnswer">
-                                    <span style="color:#01b4ef">【答案】:</span>
-                                    <span v-html="childQuestion.answer[0] || childQuestion.answer" v-if="childQuestion.type === 'Subjective'"></span>
-                                    <span :class="[ childQuestion.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,answerIndex) in childQuestion.answer" :key="answerIndex" v-else-if="childQuestion.type === 'Complete'" v-html="answer"></span>
-                                    <span :class="[ childQuestion.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,answerIndex) in childQuestion.answer" :key="answerIndex" v-else>{{answer}}</span>
-                                </div>
-                                <div class="item-explain" v-show="isShowAnswer">
-                                    <span style="color:#01b4ef">【解析】:</span>
-                                    <span v-html="childQuestion.explain || '暂无解析'"></span>
+            <Loading :top="200" v-show="dataLoading" type="1"></Loading>
+
+            <div class="list-view" v-for="(typeItem,typeIndex) in groupList">
+                <p v-show="viewModel === 'type'" class="type-name">{{ numberConvertToUppercase(typeIndex + 1) }} : {{  exersicesType[typeItem.type] }} ( {{ typeItem.score }} 分)</p>
+                <div class="exercise-item" v-for="(item,index) of typeItem.list" :key="index" @click="onQuestionToggle(exerciseList.indexOf(item),item.id,$event,typeItem.list)" @mouseenter="exerciseMouseover($event)" @mouseleave="exerciseMouseleave($event)">
+                    <div class="item-tools-wrap">
+                        <div class="item-tools-t flex-row-center" @click.stop="handleSetScore(item,exerciseList.indexOf(item))"><Icon type="ios-list-box-outline" />配分</div>
+                        <div class="item-tools-t flex-row-center" @click.stop="handleToolEdit(item)"><Icon type="ios-brush-outline" />编辑</div>
+                        <div class="item-tools-t flex-row-center" @click.stop="handleDelete(typeItem.list,item,index)"><Icon type="ios-archive-outline" />删除</div>
+                        <div class="item-tools-t flex-row-center" v-show="index != 0" @click.stop="handleMoveUp(typeItem.list,index)"><Icon type="md-arrow-up" />上移</div>
+                        <div class="item-tools-t flex-row-center" v-show="index != (typeItem.list.length - 1)" @click.stop="handleMoveDown(typeItem.list,index)"><Icon type="md-arrow-down" />下移</div>
+                    </div>
+
+                    <!-- 题干部分 -->
+                    <div class="item-question" style="pointer-events:none">
+                        <p v-if="viewModel === 'list'">{{pageSize * (pageNum - 1) + exerciseList.indexOf(item) + 1}} : <span v-html="item.question"></span></p>
+                        <p v-else>{{ pageSize * (pageNum - 1) + index + 1 }} : <span v-html="item.question"></span></p>
+                        <span class="item-btn-toggle">
+                            <span class="item-score">{{ item.score }} 分</span>
+
+                            <Icon :type="collapseList.indexOf(index) > -1 ? 'ios-arrow-dropup' : 'ios-arrow-dropdown'" />
+                            <!--<Button type="primary">选题</Button>-->
+                        </span>
+                    </div>
+                    <!-- 选项部分 -->
+                    <div v-for="(option,optionIndex) in item.option" :key="optionIndex" class="item-options" style="pointer-events:none">
+                        <p class="item-option-content">{{String.fromCharCode(64 + parseInt(optionIndex+1))}} : <span v-html="option.value"></span></p>
+                    </div>
+                    <transition name="slide">
+                        <div v-show="collapseList.indexOf(exerciseList.indexOf(item)) > -1" class="toggle-area">
+                            <!-- 答案展示部分 -->
+                            <div class="item-explain" v-show="isShowAnswer">
+                                <span class="explain-title">【答案】</span>
+                                <div class="item-explain-details">
+                                    <span v-html="item.answer" v-if="item.type === 'Subjective'"></span>
+                                    <span :class="[ item.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,index) in item.answer" :key="index" v-else-if="item.type === 'Complete'" v-html="answer"></span>
+                                    <span :class="[ item.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,index) in item.answer" :key="index" v-else>{{answer}}</span>
                                 </div>
                             </div>
-                        </div>
-                        <!-- 组合题结束 -->
-                        <!-- 答案展示部分 -->
-                        <div class="item-explain" v-show="isShowAnswer">
-                            <span class="explain-title">【答案】</span>
-                            <div class="item-explain-details">
-                                <span v-html="item.answer" v-if="item.type === 'Subjective'"></span>
-                                <span :class="[ item.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,index) in item.answer" :key="index" v-else-if="item.type === 'Complete'" v-html="answer"></span>
-                                <span :class="[ item.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,index) in item.answer" :key="index" v-else>{{answer}}</span>
-                            </div>
-                        </div>
-                        <!-- 解析部分 -->
-                        <div class="item-explain" v-show="isShowAnswer">
-                            <span class="explain-title">【解析】</span>
-                            <div class="item-explain-details">
-                                <span v-html="item.explain || '暂无解析'"></span>
+                            <!-- 解析部分 -->
+                            <div class="item-explain" v-show="isShowAnswer">
+                                <span class="explain-title">【解析】</span>
+                                <div class="item-explain-details">
+                                    <span v-html="item.explain || '暂无解析'"></span>
+                                </div>
                             </div>
-                        </div>
-                        <!-- 知识点部分 -->
-                        <div class="item-explain" v-show="isShowAnswer">
-                            <span class="explain-title">【知识点】</span>
-                            <div class="item-explain-details">
-                                <span v-html="item.points.length ? item.points : '暂未绑定知识点'"></span>
+                            <!-- 知识点部分 -->
+                            <div class="item-explain" v-show="isShowAnswer">
+                                <span class="explain-title">【知识点】</span>
+                                <div class="item-explain-details">
+                                    <span v-html="item.points.length ? item.points : '暂未绑定知识点'"></span>
+                                </div>
                             </div>
-                        </div>
 
-                    </div>
-                </transition>
-
-                <!-- 底部题目操作栏 -->
-                <div class="item-tools">
-                    <span class="item-tools-info">题型:{{ exersicesType[item.type] }}</span>
-                    <span class="item-tools-info">难度:{{ exersicesDiff[item.level - 1] }}</span>
-                    <span class="item-tools-info" style="border:0">使用次数:{{ item.usageCount }} 次</span>
-                    <!--<span class="item-tools-info" style="border:0">更新时间:{{ formatDateTime(new Date(item.createTime * 1000)) }}</span>-->
-                    <!--<Button type="info" :style="{backgroundColor:basketList.all.indexOf(item) > -1 ? '#bbbbbb' : ''}" @click="handleChoose(item)">{{basketList.all.indexOf(item) > -1 ? '已选入' : '选题'}} </Button>-->
-
-                    <Button type="info" :style="{background: basketList.indexOf(item) > -1 ? '#acaaaa' : '#14B6EF'}" @click.stop="selectExercise(item)" style="margin-right:10px">{{ basketList.indexOf(item) > -1 ? '移除' : '选题' }}</Button>
-                    <Button type="info" @click.stop="handleEdit(item)" style="margin-right:10px">编辑</Button>
+                        </div>
+                    </transition>
                 </div>
             </div>
+
         </div>
+
+        <!-- 底部分页区域 -->
+        <Page :total="totalNum"
+              show-sizer
+              show-total
+              :page-size="pageSize"
+              :current="pageNum"
+              @on-page-size-change="pageSizeChange"
+              @on-change="pageChange"
+              :page-size-opts="[5,10,15,20]" />
+
+        <Modal v-model="scoreModal"
+               title="题目配分"
+               @on-ok="onConfirmScore"
+               >
+            <InputNumber :max="curItemScore + surPlusScore" :min="0" :step="scoreStep" v-model="curItemScore" @on-change="onScoreChange"></InputNumber>
+            <p>剩余可分配分数:{{ surPlusScore }}</p>
+        </Modal>
+
+        <Modal v-model="typeScoreModel"
+               title="题型配分"
+               footer-hide>
+            <span class="type-score-item">已分配总分 : {{ getTotalScore(groupTypeList) }}</span>
+            <div v-for="item in groupTypeList" class="type-score-item">
+                <span>{{ exersicesType[item.type] }} </span>
+                <span>共 {{ item.list.length }} 道题,总分配:</span>
+                <InputNumber :max="paper.score" :min="0" :step="scoreStep" v-model="item.score"></InputNumber>
+                <span> 分</span>
+            </div>
+
+            <Button class="type-score-btn" @click="onConfirmTypeScore" type="info" :disabled="getTotalScore(groupTypeList) > paper.score">确认</Button>
+            <p style="color:red;text-align:center;font-weight:bold;margin-top:10px" v-show="getTotalScore(groupTypeList) > paper.score">配分已超试卷总分,请重新分配!</p>
+
+        </Modal>
+
+
     </div>
 </template>
 
 <script>
     import Loading from '@/common/Loading.vue'
     export default {
-        props: ['exerciseData'],
+        props: ['paper'],
         components: {
             Loading
         },
@@ -103,13 +121,14 @@
                 exerciseList: [],
                 schoolInfo: {},
                 isShowUploadList: false,
-                setPaperInfoModal:false,
+                typeScoreModel:false,
+                setPaperInfoModal: false,
                 exersicesType: {
-                    Single: '单选',
-                    Multiple: '多选',
-                    Judge: '判断',
-                    Complete: '填空',
-                    Subjective: '问答',
+                    Single: '单选',
+                    Multiple: '多选',
+                    Judge: '判断',
+                    Complete: '填空',
+                    Subjective: '问答',
                     Compose: '综合题'
                 },
                 exersicesDiff: ['容易', '较易', '一般', '较难', '困难'],
@@ -117,30 +136,42 @@
                 totalNum: 0,
                 isShowAnswer: true,
                 importLoading: false,
-                pageSize: 5,
+                pageSize: 99,
                 pageNum: 1,
-                currentPage:1,
+                currentPage: 1,
                 collapseList: [],
                 periodList: [],
                 gradeList: [],
                 subjectList: [],
-                basketList:[],
-                filterParams: {}
+                basketList: [],
+                originData: [],
+                groupList: [],
+                groupTypeList:[],
+                typeList: ['Single', 'Multiple', 'Judge', 'Complete', 'Subjective', 'Compose'],
+                viewModel:'type',
+                filterParams: {},
+                surPlusScore: 0,
+                curItemScore: 0,
+                curIndex:0,
+                lastScore: 0,
+                scoreStep:0.5,
+                scoreModal:false
             }
         },
 
         created() {
-            console.log(this.exerciseList)
+            //console.log(this.exerciseList)
         },
         methods: {
             /**
              * 根据ID获取试题详细数据
              * @param id 试题ID
              */
-            getDetailsById(id, index) {
-                this.$api.newEvaluation.FindExerciseById(id).then(res => {
+            getDetailsById(arr, id, index) {
+                this.$api.newEvaluation.FindExerciseById([id]).then(res => {
                     /* 查询到详细数据则替换掉原数据 */
-                    this.exerciseList.splice(index, 1, res.result.data)
+                    this.exerciseList.splice(index, 1, res.result.data[0])
+                    arr.splice(index, 1, res.result.data[0])
                 })
             },
 
@@ -149,35 +180,59 @@
              * @param index
              * @param id
              */
-            onQuestionToggle(index, id, e) {
-                e.stopPropagation();
+            onQuestionToggle(index, id, e, arr) {
+                e.stopPropagation()
                 let listIndex = this.collapseList.indexOf(index)
                 if (listIndex > -1) {
                     this.collapseList.splice(listIndex, 1)
                 } else {
                     this.collapseList.push(index)
-                    if (!this.exerciseList[index].answer.length) this.getDetailsById(id, index)
-                    this.pageScrollTo(e.target.offsetTop + 420) // content-wrap 距离顶部高度
+                    if (!this.exerciseList[index].answer.length) this.getDetailsById(arr, id, index)
+                    this.pageScrollTo(e.target.offsetTop + 60) // content-wrap 距离顶部高度
                 }
-                
             },
 
             /**
-             * 切换页码操作
-             * @param page
+             * 数字与中文转换
+             * @param num
              */
+            numberConvertToUppercase(num) {
+                num = Number(num)
+                var upperCaseNumber = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九', '十', '百', '千', '万', '亿']
+                var length = String(num).length
+                if (length === 1) {
+                    return upperCaseNumber[num]
+                } else if (length === 2) {
+                    if (num === 10) {
+                        return upperCaseNumber[num]
+                    } else if (num > 10 && num < 20) {
+                        return '十' + upperCaseNumber[String(num).charAt(1)]
+                    } else {
+                        return upperCaseNumber[String(num).charAt(0)] + '十' + upperCaseNumber[String(num).charAt(1)].replace('零', '')
+                    }
+                }
+            },
+
+           // 分页操作
             pageChange(page) {
+                let start = this.pageSize * (page - 1)
+                let end = this.pageSize * page
                 this.pageNum = page
-                this.doFilter()
+                this.collapseList = []
+                this.exerciseList = this.originData.slice(start, end)
                 this.pageScrollTo(0)
             },
 
+            pageSizeChange(val) {
+                this.pageSize = val
+                this.pageChange(1)
+            },
+
             /**
              * 页面滚动事件
              * @param scrollDistance 页面滚动距离
              */
             pageScrollTo(scrollDistance) {
-                console.log(this)
                 let parentVm = this.$parent.$parent.$parent.$parent
                 parentVm.$refs['evScroll'].scrollTo(
                     {
@@ -186,33 +241,284 @@
                     500, 'easeInQuad'
                 )
             },
+            // 题目鼠标滑过事件
+            exerciseMouseover(e) {
+                e.preventDefault()
+                e.target.children[0].style.display = 'block'
+            },
+
+            // 题目鼠标移出事件
+            exerciseMouseleave(e) {
+                e.preventDefault()
+                e.target.children[0].style.display = 'none'
+            },
+
+            // 子题顺序操作
+            moveItems(arr, index1, index2) {
+                arr[index1] = arr.splice(index2, 1, arr[index1])[0]
+                return arr
+            },
+
+            // 子题上移操作
+            handleMoveUp(arr, index) {
+                this.moveItems(arr, index, index - 1)
+            },
+
+            // 子题下移操作
+            handleMoveDown(arr, index) {
+                this.moveItems(arr, index, index + 1)
+            },
+
+
+            /**
+             * 删除试卷中的单个试题
+             * @param index
+             */
+            handleDelete(arr,item,index) {
+                this.$Modal.confirm({
+                    title: '提示',
+                    content: '<p>确认删除该试题吗?</p>',
+                    okText: '确认',
+                    cancelText: '取消',
+                    onOk: () => {
+                        this.$Message.success('删除成功')
+                        this.surPlusScore += item.score
+                        console.log(this.surPlusScore)
+                        arr.splice(index, 1)
+                        this.exerciseList.splice(this.exerciseList.indexOf(item), 1)
+                        this.$emit('dataUpdate', this.exerciseList)
+                    }
+                })
+            },
 
             /**
-             * 切换每页显示数量
+             * 编辑单个试题
+             * @param item
+             */
+            handleToolEdit(item) {
+                this.$api.newEvaluation.FindExerciseById(item.id).then(res => {
+                    res.result.data.options = res.result.data.option
+                    res.result.data.level = res.result.data.level || 1
+                    this.$router.push({
+                        name: 'createExercises',
+                        params: {
+                            item: res.result.data
+                        }
+                    })
+                })
+            },
+
+
+            /**
+             * 给单个试题配分
+             * @param item
+             * @param index
+             */
+            handleSetScore(item, index) {
+                this.curIndex = index
+                this.curItemScore = item.score
+                this.lastScore = item.score
+                this.scoreModal = true
+            },
+
+            /**
+             * 配分变化时的剩余分数处理
              * @param val
              */
-            pageSizeChange(val) {
-                this.pageSize = val
-                this.pageChange(1)
+            onScoreChange(val) {
+                this.surPlusScore = this.surPlusScore + this.lastScore - val 
+                this.lastScore = val
+
             },
-        },
-        mounted() {
+
+            /** 确认单个试题配分 */
+            onConfirmScore() {
+                this.$set(this.exerciseList[this.curIndex], 'score', this.curItemScore);
+            },
+
+            /** 按照题型配分 */
+            onConfirmTypeScore() {
+                /** 重新计算剩余分配分数 */
+                this.surPlusScore = this.paper.score - this.groupTypeList.reduce((p, e) => p + e.score, 0)
+                if (this.surPlusScore < 0) {
+                    this.$Message.warning("当前配分超过试卷总分,请重新分配!")
+                } else {
+                    /* 按照题型配分后平均分配给每个子题 */
+                    this.groupTypeList.forEach(item => {
+                        item.list.forEach(exercise => {
+                            exercise.score = item.score / item.list.length
+                            this.exerciseList.filter(item => item.id === exercise.id)[0].score = item.score / item.list.length
+                        })
+                    })
+                    /** 回到题型视图 */
+                    this.groupList = this.groupTypeList
+                    this.$parent.viewModel = 'type'
+                    this.typeScoreModel = false
+                }
+
+            },
+
+
+            /** 打开题型配分 */
+            onSetScoreByType() {
+                this.typeScoreModel = true;
+            },
+
+
+            /**
+             * 获取题目列表总分
+             * @param arr
+             */
+            getTotalScore(arr) {
+                return arr.reduce((p,e)=>p+e.score,0)
+            }
+
+
         },
         watch: {
-            exerciseData: {
-                handler(newValue, oldValue) {
-                    if (newValue) {
-                        this.exerciseList = newValue
-                        console.log("List")
-                        console.log(newValue)
+            paper: {
+                handler(newPaper, oldValue) {
+                    if (newPaper) {
+                        
+                        let that = this
+                        this.groupList = []
+                        this.exerciseList = []
+
+                        /* 处理试卷内题目按照题型排序 */
+                        this.typeList.forEach(item => {
+                            this._.mapKeys(this._.groupBy(newPaper.item, 'type'), function (value, key) {
+                                if (key === item) { /* 按照题型排序,并且计算每种题型的总分 */
+                                    that.groupList.push({ type: key, list: value, score : value.reduce((p,e)=>p+e.score,0) })
+                                    that.exerciseList = that.exerciseList.concat(value)
+                                }
+                            })
+                        });
+
+                        this.originData = this.exerciseList
+                        this.groupTypeList = this.groupList
+                        this.totalNum = newPaper.item.length
+                        this.surPlusScore = newPaper.score - newPaper.item.reduce((p,e)=>p+e.score,0);
+                        this.pageScrollTo(0)
+                        this.pageChange(1)
                     }
                 }
             },
+            viewModel: {
+                handler(newValue) {
+                    if (newValue) {
+                        if (newValue === 'list') {
+                            this.groupList = [{
+                                type: 'all',
+                                score:this.exerciseList.reduce((p,e)=>p+e.score,0),
+                                list: this.exerciseList
+                            }]
+                        } else {
+                            this.groupList = this.groupTypeList
+                        }
+                    }
+                },
+                immediate:true
+            }
         }
 
     }
 </script>
 
 <style scoped>
-    @import "../index/ExercisesList.css";
+    @import "../index/PickExercise.css";
+</style>
+
+<style scoped>
+    .components-el-container .ivu-page {
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        margin: 20px 0;
+    }
+
+    .components-el-container .type-name {
+        font-size:18px;
+        font-weight:bold;
+        margin-top:20px;
+    }
+
+    .components-el-container .exercise-item {
+        position:relative;
+        margin-top:30px;
+        font-size:14px;
+    }
+
+    .components-el-container .exercise-item p {
+        width:92%;
+    }
+
+    .components-el-container .exercise-item .item-tools-wrap {
+            position: absolute;
+            right: 0;
+            top: -30px;
+            width:auto;
+            height: 30px;
+            margin:0;
+            padding:0;
+            background: #01b4ef;
+            display:none;
+        }
+
+            .components-el-container .exercise-item .item-tools-t {
+                height: 100%;
+                padding: 0 15px;
+                float: left;
+                color: white;
+                cursor: pointer;
+            }
+
+                .components-el-container .exercise-item .item-tools-t:hover {
+                    background: #4a5ae6;
+                }
+
+        .components-el-container .exercise-item .item-score {
+            margin-right:10px;
+            color:#fff;
+            background:#01b4ef;
+            padding:4px 10px;
+            border-radius:5px;
+        }
+
+        .components-el-container .exercise-item .item-tools-t .ivu-icon{
+            color:white;
+            font-size:14px;
+            margin:0 3px;
+        }
+
+    .type-score-btn {
+        width:80%;
+        margin-left:10%;
+        height:40px;
+        line-height:40px;
+    }
+
+    .type-score-item {
+        margin:20px 10px;
+    }
+
+
+        /*横向垂直水平居中*/
+    .flex-row-center {
+        display: flex;
+        flex-direction: row;
+        justify-content: center;
+        align-items: center;
+    }
+
+.no-data-text {
+    width: 100%;
+    padding: 30px;
+    background: #fff;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    margin-top: 10px;
+    font-size: 16px;
+}
 </style>

+ 10 - 13
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseFilter.vue

@@ -35,6 +35,7 @@
                 <Checkbox label="Judge">判断</Checkbox>
                 <Checkbox label="Complete">填空</Checkbox>
                 <Checkbox label="Subjective">问答</Checkbox>
+                <Checkbox label="Compose">综合</Checkbox>
             </CheckboxGroup>
         </div>
         <div class="filter-item">
@@ -127,24 +128,23 @@
                     'subjectCode': [this.subjectList[this.filterSubject].subjectCode],
                     'level': this.deleteFalse(this.filterDiff),
                     'type': this.deleteFalse(this.filterType),
-                    'field': this.deleteFalse(this.filterField),
+                    'field': this.deleteFalse(this.filterField)
                 }
 
                 /** 查询总数参数 */
                 let findCountParams = {
-                    "collectionName": "ExamPaper",
-                    "queryDict": {
+                    'collectionName': 'ExamPaper',
+                    'queryDict': {
                         'scopeCode': this.filterOrigin,
                         'periodCode': [this.periodList[this.filterPeriod].periodCode],
                         'gradeCode': this.deleteFalse(this.filterGrade),
                         'subjectCode': [this.subjectList[this.filterSubject].subjectCode],
                         'level': this.deleteFalse(this.filterDiff),
                         'type': this.deleteFalse(this.filterType),
-                        'field': this.deleteFalse(this.filterField),
+                        'field': this.deleteFalse(this.filterField)
                     }
                 }
 
-
                 this.$emit('onChange', this.filterParams, findCountParams)
             },
 
@@ -153,7 +153,7 @@
              * @param val
              */
             filterPeriodChange(val) {
-                //this.filterPeriod = this.periodList[val].periodCode
+                // this.filterPeriod = this.periodList[val].periodCode
                 this.gradeList = this.schoolInfo.period[val].grades
                 this.subjectList = this.schoolInfo.period[val].subjects
                 this.filterGrade = [false]
@@ -179,11 +179,11 @@
              * @param val
              */
             filterSubjectChange(val) {
-                //if (val !== [false] && val.indexOf(false) === 0) {
+                // if (val !== [false] && val.indexOf(false) === 0) {
                 //    this.filterSubject.splice(val.indexOf(false), 1)
-                //} else if (val.indexOf(false) > 0) {
+                // } else if (val.indexOf(false) > 0) {
                 //    this.filterSubject = [false]
-                //}
+                // }
                 this.doFilter()
             },
 
@@ -194,7 +194,6 @@
             filterOriginChange(origin) {
                 this.filterOrigin = origin
                 this.doFilter()
-
             },
 
             /**
@@ -252,7 +251,7 @@
                 let list = JSON.parse(JSON.stringify(arr))
                 list.forEach((item, index) => { if (!item || item === 'all') list.splice(index, 1) })
                 return list
-            },
+            }
         },
 
         mounted() {
@@ -320,8 +319,6 @@
             color: #fff !important;
         }
 
-
-
         .filter-wrap .ivu-checkbox-group {
             padding-bottom: 4px;
             display: inline-block;

+ 354 - 0
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseImport.vue

@@ -0,0 +1,354 @@
+<template>
+    <div class="cp-import-container">
+        <Button type="info" @click="handleUpload">导入习题</Button>
+        <Modal v-model="importPreviewModal"
+               width="1200px"
+               class-name="import-modal"
+               title="导入预览">
+
+            <div v-if="!isImportFinish" style="padding:40px">
+                <Upload multiple
+                        v-show="!isSelectFinish"
+                        type="drag"
+                        :action="uploadUrl"
+                        :headers="headers"
+                        :format="['doc','docx','xls','xlsx','csv']"
+                        :max-size="102400"
+                        :on-format-error="handleFormatError"
+                        :on-exceeded-size="handleMaxSize"
+                        :show-upload-list="isShowList"
+                        :before-upload="beforeUpload"
+                        :on-success="uploadSuccess">
+                    <div class="import-tips">
+                        <Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
+                        <p style="font-size:18px;font-weight:bold;">导入注意事项</p>
+                        <p>1.暂时只支持".docx、.xlsx、.csv"格式的文件导入,文件大小不超过10M,请按照模板格式导入</p>
+                        <p>2.导入题型暂时只支持单选、多选、判断、填空、问答题型</p>
+                    </div>
+                </Upload>
+                <div v-show="isSelectFinish" class="import-loading-wrap">
+                    <img src="@/assets/loading/loading.svg" width="100px" />
+                    <p style="font-size:16px;font-weight:bold">读取中</p>
+                </div>
+            </div>
+            <div v-else style="padding:40px">
+                <div class="exercise-item" v-for="(item,index) of exerciseList" :key="index">
+                    <!-- 题干部分 -->
+                    <div class="item-question">
+                        <p>{{ index + 1 }} : <span v-html="item.question"></span></p>
+                        <span class="item-btn-toggle btn-edit-exercise">
+                            <Icon type="md-create" color="#B5B5B5" @click="onEditExercise(item)"/>
+                        </span>
+                    </div>
+                    <!-- 选项部分 -->
+                    <div v-for="(option,optionIndex) in item.option" :key="optionIndex" class="item-options" style="pointer-events:none">
+                        <p class="item-option-content">{{String.fromCharCode(64 + parseInt(optionIndex+1))}} : <span v-html="option.value"></span></p>
+                    </div>
+                    <div>
+                        <!-- 答案展示部分 -->
+                        <div class="item-explain">
+                            <span class="explain-title">【答案】</span>
+                            <div class="item-explain-details">
+                                <span v-html="item.answer" v-if="item.type === 'Subjective'"></span>
+                                <span :class="[ item.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,index) in item.answer" :key="index" v-else-if="item.type === 'Complete'" v-html="answer"></span>
+                                <span :class="[ item.type === 'Complete' ? 'item-answer-item':'']" v-for="(answer,index) in item.answer" :key="index" v-else>{{answer}}</span>
+                            </div>
+                        </div>
+                        <!-- 解析部分 -->
+                        <div class="item-explain">
+                            <span class="explain-title">【解析】</span>
+                            <div class="item-explain-details">
+                                <span v-html="item.explain || '暂无解析'"></span>
+                            </div>
+                        </div>
+
+                    </div>
+                </div>
+            </div>
+            <div slot="footer">
+                <Button class="type-score-btn" type="info" @click="onReImport" v-show="isImportFinish">重新导入</Button>
+                <Button class="type-score-btn" type="success" :loading="isBtnLoading" :disabled="isBtnLoading || !isImportFinish" @click="onSelectUsage">确认导入</Button>
+            </div>
+
+        </Modal>
+
+        <Modal v-model="selectUsageModal"
+               class-name="usage-modal"
+               width="800px"
+               title="选择用途">
+
+            <div class="usage-modal-content">
+                <div class="usage-modal-baseInfo">
+                    <p>当前学段:<span>初中</span></p>
+                    <p>当前科目:<span>语文</span></p>
+                    <p>
+                        选择用途:
+                        <RadioGroup v-model="currentUsage">
+                            <Radio label="bank">加入试题库</Radio>
+                            <Radio label="paper">创建试卷</Radio>
+                            <Radio label="all">创建试卷并同步到试题库</Radio>
+                        </RadioGroup>
+                    </p>
+                </div>
+                <div class="usage-modal-paperInfo" v-show="currentUsage !== 'bank'">
+                    <Form :model="paperInfo" label-position="left">
+                        <FormItem label="试卷名称">
+                            <Input v-model="paperInfo.name" placeholder="请输入新建试卷名称,必填项"></Input>
+                        </FormItem>
+                        <FormItem label="设置配分">
+                            <InputNumber :max="100" :min="1" v-model="paperInfo.score" value="100"></InputNumber>
+                        </FormItem>
+                    </Form>
+                </div>
+
+
+
+            </div>
+            <div slot="footer">
+                <Button type="success">确认</Button>
+            </div>
+
+        </Modal>
+
+        <Modal v-model="editExerciseModal"
+               class-name="edit-exercise-modal"
+               width="1200px"
+               title="编辑习题">
+
+            <BaseEditExercise :exerciseItem="currentExercise"></BaseEditExercise>
+
+            <div slot="footer">
+                <Button type="success">确认</Button>
+            </div>
+
+        </Modal>
+    </div>
+</template>
+<script>
+    import Loading from '@/common/Loading.vue'
+    import BaseEditExercise from './BaseEditExercise'
+    export default {
+        components: {
+            Loading,BaseEditExercise
+        },
+        props: ['period', 'subject'],
+        data() {
+            return {
+                isBtnLoading: false,
+                isSelectFinish: false,
+                importLoading: false,
+                isImportFinish: false,
+                isShowList: true,
+                exerciseList: [],
+                importPreviewModal: false,
+                selectUsageModal: false,
+                editExerciseModal: false,
+                currentExercise:null,
+                currentUsage:'bank',
+                uploadUrl: '',
+                paperInfo: {
+                    name: '',
+                    score:100
+                }
+            }
+        },
+        created() {
+            this.uploadUrl = 'https://' + window.location.host + '/api/ImportExercise/uploadWord'
+        },
+        methods: {
+
+            /** 点击导入习题 */
+            handleUpload() {
+                //this.importPreviewModal = true
+                this.editExerciseModal = true
+                this.currentExercise = JSON.parse(localStorage.getItem('ex'))
+            },
+
+            /**
+             * 编辑单个试题
+             * @param item
+             */
+            onEditExercise(item) {
+                localStorage.setItem('ex',JSON.stringify(item))
+                this.currentExercise = item
+                this.editExerciseModal = true
+            },
+
+            /** 重新导入文件 */
+            onReImport() {
+                this.isImportFinish = false
+                this.isSelectFinish = false
+                this.exerciseList = []
+            },
+
+            /** 选择文件上传之前 */
+            beforeUpload() {
+                this.isBtnLoading = true
+                this.isSelectFinish = true
+            },
+
+            /**
+             * 当上传文件格式错误
+             * @param
+             */
+            handleFormatError() {
+                this.$Message.error('上传格式有误,请重新上传!')
+                this.isBtnLoading = false
+            },
+
+            /**
+             * 当上传文件超过限制大小
+             * @param file
+             */
+            handleMaxSize() {
+                this.$Message.error('最大上传大小为10M,请重新上传!')
+                this.isBtnLoading = false
+            },
+
+            /**
+             * 上传文件成功回调
+             * @param response
+             */
+            uploadSuccess(response) {
+                let that = this
+                if (response.error === null) {
+                    let requestData = { htmlString: response.result.data.HtmlString }
+                    this.$api.SaveAnalyzeHtml(requestData).then(res => {
+                        if (res.error === null) {
+                            setTimeout(function () {
+                                that.$Message.success('试题数据读取完成!')
+                                that.exerciseList = res.result.data
+                                that.isImportFinish = true
+                                that.isBtnLoading = false
+                            }, 1000)
+                        }
+                    })
+                } else {
+                    this.$Message.error('对不起,文档解析失败!')
+                }
+            },
+
+            /** 导入后选择试题用途 */
+            onSelectUsage() {
+                this.selectUsageModal = true
+            },
+
+            onSelectBank() {
+
+            },
+
+            onSelectPaper() {
+
+            },
+
+            onSelectAll() {
+
+            }
+        },
+
+        mounted() {
+
+        },
+        computed: {
+            headers() {
+                let hd = {}
+                hd['Authorization'] = 'Bearer ' + localStorage.getItem('token')
+                return hd
+            }
+
+        }
+    }
+</script>
+
+<style scoped>
+    @import "../index/PickExercise.css";
+</style>
+
+<style lang="less">
+
+    .import-modal .ivu-modal-body,
+    .edit-exercise-modal .ivu-modal-body{
+        max-height: 700px;
+        overflow: auto;
+        padding: 0;
+    }
+
+    .import-modal .item-explain-details {
+        width: 94%;
+    }
+
+    .import-modal .ivu-modal {
+        max-height: 600px;
+        position: relative;
+        font-family: '微軟正黑體', 'Heiti TC' !important;
+    }
+
+    .import-tips {
+        padding: 20px 0;
+    }
+
+        .import-tips p {
+            margin: 10px;
+        }
+
+    .import-modal .exercise-item:not(:first-child) {
+        margin-top: 20px;
+        padding-top: 20px;
+        border-top: 1px solid #DEDEDE;
+    }
+
+    .import-modal .exercise-item .btn-edit-exercise {
+        display:none;
+    }
+
+    .import-modal .exercise-item:hover .btn-edit-exercise {
+        display:unset;
+    }
+
+
+    .import-modal .import-loading-wrap {
+        position: relative;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        flex-direction: column;
+    }
+
+    .usage-modal {
+        font-family: '微軟正黑體', 'Heiti TC' !important;
+    }
+
+        .usage-modal .usage-modal-content {
+            display: flex;
+            flex-direction: column;
+        }
+
+        .usage-modal .usage-modal-baseInfo {
+            margin: 10px;
+         }
+
+        .usage-modal .usage-modal-paperInfo {
+            margin-top: 20px;
+            
+         }
+
+            .usage-modal .usage-modal-baseInfo p {
+                margin:30px 0 0 0;
+            }
+
+
+    .usage-modal .ivu-radio-group {
+        vertical-align:bottom;
+    }
+
+        .usage-modal .ivu-input-wrapper {
+            width:75%;
+        }
+        .usage-modal .ivu-radio-wrapper {
+            margin-right:30px;
+        }
+
+        .usage-modal .ivu-form-item {
+            padding:0 10px;
+        }
+</style>

+ 48 - 14
TEAMModelOS/ClientApp/src/view/evaluation/components/BasePaperInfo.vue

@@ -3,10 +3,15 @@
     <div class="form-container">
         <Form :model="formTop" label-position="top">
             <FormItem label="试卷名称">
-                <Input v-model="formTop.paperName" placeholder="请输入新建试卷名称,必填项"></Input>
+                <Input v-model="formTop.name" placeholder="请输入新建试卷名称,必填项"></Input>
             </FormItem>
             <FormItem label="设置配分">
-                <InputNumber :max="100" :min="1" v-model="formTop.paperScore" value="100"></InputNumber>
+                <InputNumber :max="100" :min="1" v-model="formTop.score" value="100"></InputNumber>
+            </FormItem>
+            <FormItem label="适用年级">
+                <Select v-model="gradeCode" multiple  style="width:200px" >
+                    <Option v-for="item in gradeList" :value="item.gradeCode" :key="item.gradeCode">{{ item.gradeName }}</Option>
+                </Select>
             </FormItem>
             <FormItem>
                 <Button @click="handleSubmit()" :loading="isLoading">进入试卷预览</Button>
@@ -17,42 +22,54 @@
 
 <script>
     export default {
-        props: ['exerciseList'],
+        props: ['exerciseList','paperInfo','grades'],
         data() {
             return {
                 isLoading: false,
-                exerciseData:[],
+                exerciseData: [],
+                gradeList: [],
+                gradeCode:[],
+                paper: {},
                 formTop: {
-                    paperName: '',
-                    paperScore: 100
+                    name: '',
+                    score: 100
                 }
             }
         },
 
         created() {
-            console.log(this.exerciseList)
+            console.log(this.$parent.$parent.filterPeriod)
         },
         methods: {
             // 提交添加
             handleSubmit() {
-                let newName = this.formTop.paperName
+                let newName = this.formTop.name
+                let parentVm = this.$parent.$parent
                 if (!newName) {
                     this.$Message.warning('知识点名称不能为空!')
                 } else {
                     this.isLoading = true
                     let params = {
-                        paperName: newName,
-                        paperScore: this.formTop.paperScore,
-                        items: this.exerciseData
+                        name: newName,
+                        score: this.formTop.score,
+                        item: this.exerciseData,
+                        scopeCode: parentVm.filterParams.scopeCode,
+                        periodCode: parentVm.filterParams.periodCode[0],
+                        gradeCode: this.gradeCode,
+                        subjectCode:parentVm.filterParams.subjectCode[0]
+                    }
+                    if (this.paper.id) {
+                        this.paper.name = newName
+                        this.paper.score = this.formTop.score
                     }
                     this.$router.push({
                         name: 'testPaper',
                         params: {
-                            paper: params
+                            paper: this.paper.id ? this.paper : params
                         }
                     })
                 }
-            },
+            }
         },
         mounted() {
         },
@@ -64,6 +81,24 @@
                     }
                 }
             },
+            paperInfo: {
+                handler(newValue, oldValue) {
+                    if (newValue) {
+                        console.log(newValue)
+                        this.paper = newValue
+                        this.formTop.name = newValue.name
+                        this.gradeCode = newValue.gradeCode
+                        this.formTop.score = newValue.score
+                    }
+                }
+            },
+            grades: {
+                handler(newValue, oldValue) {
+                    if (newValue) {
+                        this.gradeList = newValue
+                    }
+                }
+            }
         }
 
     }
@@ -80,7 +115,6 @@
             color: #808080;
         }
 
-
     .form-container .ivu-select-single .ivu-select-arrow {
         color: #0E0D0D;
     }

+ 6 - 8
TEAMModelOS/ClientApp/src/view/evaluation/components/BasePoints.vue

@@ -19,12 +19,12 @@
     export default {
         components: {
         },
-        props: ['period','subject'],
+        props: ['period', 'subject'],
         data() {
             return {
                 pointList: [],
-                checkedList:[],
-                originPointList:[],
+                checkedList: [],
+                originPointList: [],
                 defaultParams: {
                     scopeCode: 'HBCN',
                     period: null,
@@ -57,11 +57,10 @@
                 return this.pointList.filter(item => item.id === id)[0].name
             },
 
-
             onCheckChange(val) {
                 if (val.length > 5) {
-                    this.$Message.warning("最多绑定5个知识点")
-                    this.checkedList.splice(this.checkedList.length - 1 , 1)
+                    this.$Message.warning('最多绑定5个知识点')
+                    this.checkedList.splice(this.checkedList.length - 1, 1)
                 } else {
                     this.$emit('onCheckChange', val, this.pointList)
                 }
@@ -69,7 +68,7 @@
         },
 
         mounted() {
-            
+
         }
 
     }
@@ -94,7 +93,6 @@
         padding:30px 0;
     }
 
-
     .points-container .points-title {
         margin:10px 0;
      }

+ 84 - 0
TEAMModelOS/ClientApp/src/view/evaluation/components/BaseTypePie.vue

@@ -0,0 +1,84 @@
+<template>
+    <div id="myTypePie"></div>
+</template>
+
+<script>
+    export default {
+        name: 'BaseTypePie',
+        props: ['pieId','echartsData'],
+        data() {
+            return {
+                pieData: []
+            }
+        },
+        methods: {
+
+            drawLine(data) {
+                let that = this
+                // 基于准备好的dom,初始化echarts实例
+                let myPie = this.$echarts.init(document.getElementById('myTypePie'), 'chalk')
+
+                // 指定图表的配置项和数据
+                var option = {
+                    title: {
+                        'text': '试卷题型分布图',
+                        'top': '5%',
+                        'left': '30%',
+                        'textStyle': {
+                            'fontSize': 14,
+                            'color': '#8D8D8D'
+                        }
+                    },
+                    color: ['#37a2da', '#e7bcf3', '#9fe6b8', '#ff9f7f', '#fb7293', '#e7bcf3', '#8378ea'],
+                    tooltip: {
+                        trigger: 'item',
+                        formatter: '{a} <br/>{b} : {c} ({d}%)'
+                    },
+                    calculable: true,
+                    series: [
+                        {
+                            name: '题型分布饼图',
+                            type: 'pie',
+                            radius: [20, 100],
+                            data: data
+                        }
+                    ]
+                }
+
+                // 绘制图表
+                myPie.setOption(option)
+
+                window.addEventListener('resize', function() {
+                    myPie.resize()
+                })
+            }
+        },
+        mounted() {
+            //this.drawLine()
+        },
+        computed: {
+            // 获取最新知识点占比饼图数据
+            getPieData() {
+                return this.$store.state.totalAnalysis.knowledgeData
+            }
+        },
+        watch: {
+            echartsData(val) {
+                if (!val) return
+                this.drawLine(val)
+            }
+        }
+
+    }
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped>
+
+    #myTypePie {
+        width: 100%;
+        height: 380px;
+        margin: 20px auto;
+        display: block;
+    }
+</style>

+ 17 - 28
TEAMModelOS/ClientApp/src/view/evaluation/index/CreateExercises.vue

@@ -88,7 +88,7 @@
                 <div ref="analysisEditor" style="text-align:left"></div>
             </div>
         </div>
-    
+
         <!-- 补救的富文本部分 -->
         <div class="exersices-analysis">
             <IconText :text="'补救资源'" :color="'#2892DD'" :icon="'md-list'" style="margin-bottom:10px"></IconText>
@@ -100,15 +100,12 @@
             </div>
         </div>
 
-
-
         <div class="save-wrap display-flex">
             <Button type="success" @click="getContent(exersicesType)">保存</Button>
             <Button type="success" @click="reloadCreate" style="margin-left:10px" v-show="isEdit">新增习题</Button>
             <Button type="success" @click="resetEditor" style="margin-left:10px">题库</Button>
         </div>
 
-
         <Modal v-model="selectPointsModal"
                title="选择知识点"
                width="600px"
@@ -121,7 +118,6 @@
             </div>
         </Modal>
 
-
     </div>
 </template>
 <script>
@@ -145,23 +141,23 @@
     }
     export default {
         components: {
-            IconText, BaseSingle, BaseJudge, BaseMultiple, BaseCompletion, BaseSubjective,BasePoints
+            IconText, BaseSingle, BaseJudge, BaseMultiple, BaseCompletion, BaseSubjective, BasePoints
         },
         data() {
             return {
-                selectPointsModal:false,
+                selectPointsModal: false,
                 isEdit: false,
                 editInfo: {},
                 schoolInfo: {},
                 exersicesType: 'Single',
-                exerciseField:0,
+                exerciseField: 0,
                 exercisePeriod: 0,
                 exerciseGrade: [],
                 exerciseSubject: 0,
                 exerciseScope: 0,
-                exercisePoints:[],
+                exercisePoints: [],
                 scopeList: ['个人题库', '校本题库'],
-                fieldList:['知识','理解','应用','分析','综合','评鉴'],
+                fieldList: ['知识', '理解', '应用', '分析', '综合', '评鉴'],
                 periodList: [],
                 gradeList: [],
                 subjectList: [],
@@ -193,7 +189,6 @@
             }
         },
         created() {
-            
             let editItem = this.$route.params.item // 编辑题目
             if (editItem) {
                 this.editInfo = editItem
@@ -212,7 +207,7 @@
                 })
             },
 
-            getContent: function (type) {
+            getContent: function(type) {
                 let exerciseItem = Object.assign({}, defaultExercise)
                 switch (type) {
                     case 'Single':
@@ -266,7 +261,6 @@
                 exerciseItem.subjectCode = this.schoolInfo.period[this.exercisePeriod].subjects[this.exerciseSubject].subjectCode
                 exerciseItem.scopeCode = this.exerciseScope === 0 ? 'habook#0001' : this.schoolInfo.schoolCode
 
-
                 // 判断获取的数据是否有空数据以及是否为空字符串
                 if (this.checkContent(exerciseItem) && this.getSimpleText(exerciseItem.question) && this.getSimpleText(exerciseItem.explain) && exerciseItem.gradeCode.length) {
                     this.saveExercise(exerciseItem)
@@ -274,15 +268,13 @@
                     this.$router.push({
                         name: 'testPaperList',
                         params: {
-                            tabName:'exercise'
+                            tabName: 'exercise'
                         }
                     })
                 } else {
                     this.$Message.warning('请将题目填写完整!')
                     console.log(exerciseItem)
                 }
-
-
             },
 
             saveExercise(item) {
@@ -303,8 +295,8 @@
             },
 
             onDeletePoint(index) {
-                this.exercisePoints.splice(index,1)
-            }, 
+                this.exercisePoints.splice(index, 1)
+            },
 
             // 题目类型转换
             typeChange(val) {
@@ -336,7 +328,7 @@
             },
 
             onPeriodChange(val) {
-                console.log("学段变化")
+                console.log('学段变化')
                 this.gradeList = this.schoolInfo.period[val].grades
                 this.subjectList = this.schoolInfo.period[val].subjects
                 this.exerciseGrade = 0
@@ -364,7 +356,7 @@
                 this.$router.push({
                     name: 'testPaperList',
                     params: {
-                        tabName:'exercise'
+                        tabName: 'exercise'
                     }
                 })
             },
@@ -376,22 +368,21 @@
 
             // 文件上传成功回调
             handleSuccess(res, file) {
-                //this.videoHtml = "<br><iframe src='https://teammodelstorage.blob.core.chinacloudapi.cn/wechatfilescontainer/wechatfilescontainer/HilearningMobile_function_10.mp4' frameborder='0' allowfullscreen='true'></iframe><br>"
-                this.videoHtml = "<br><a href=" + res.data[0] + " download='w3logo'>" + file.name + "</a><br>"
+                // this.videoHtml = "<br><iframe src='https://teammodelstorage.blob.core.chinacloudapi.cn/wechatfilescontainer/wechatfilescontainer/HilearningMobile_function_10.mp4' frameborder='0' allowfullscreen='true'></iframe><br>"
+                this.videoHtml = '<br><a href=' + res.data[0] + " download='w3logo'>" + file.name + '</a><br>'
                 this.analysisContent = this.analysisContent + this.videoHtml
                 this.analysisEditor.txt.append(this.videoHtml)
             },
 
             // 文件上传成功回调
             handleRepairSuccess(res, file) {
-                this.videoHtml = "<br><a href=" + res.data[0] + " download='w3logo'>" + file.name + "</a><br>"
+                this.videoHtml = '<br><a href=' + res.data[0] + " download='w3logo'>" + file.name + '</a><br>'
                 this.repairContent = this.repairContent + this.videoHtml
                 this.repairEditor.txt.append(this.videoHtml)
             }
 
         },
         mounted() {
-
             let analysisEditor = new E(this.$refs.analysisEditor)
             analysisEditor.customConfig.onchange = (html) => {
                 this.analysisContent = html
@@ -402,7 +393,6 @@
             analysisEditor.create()
             this.analysisEditor = analysisEditor
 
-            
             let repairEditor = new E(this.$refs.repairEditor)
             repairEditor.customConfig.onchange = (html) => {
                 this.repairContent = html
@@ -414,7 +404,7 @@
             this.repairEditor = repairEditor
 
             let editItem = this.$route.params.item // 编辑题目
-            
+
             if (editItem) {
                 let schoolInfo = this.$store.state.schoolBaseInfo.schoolBaseInfo
 
@@ -442,14 +432,13 @@
                 this.subjectList = schoolInfo.period[this.exercisePeriod].subjects
                 this.gradeList = schoolInfo.period[this.exercisePeriod].grades
                 this.exerciseSubject = this.subjectList.map(item => item.subjectCode).indexOf(editItem.subjectCode)
-                
+
                 this.stemContent = editItem.question
                 this.optionsContent = editItem.options
                 this.analysisContent = editItem.explain
                 this.repairContent = editItem.repair
                 this.analysisEditor.txt.html(editItem.explain)
                 this.repairEditor.txt.html(editItem.repair)
-                
             }
         }
     }

+ 4 - 2
TEAMModelOS/ClientApp/src/view/evaluation/index/ExercisesList.css

@@ -260,8 +260,10 @@
 }
 
 .exercise-item .item-explain-details {
-    margin: 10px;
-    display:inline-block;
+    /*margin: 10px;*/
+    vertical-align:top;
+    display:table-cell;
+    width:95%;
 }
 
 .exercise-item .item-explain .explain-title-line {

+ 58 - 74
TEAMModelOS/ClientApp/src/view/evaluation/index/ExercisesList.vue

@@ -29,10 +29,9 @@
             </div>
             <div class="filter-item">
                 <span class="filter-title">科目:</span>
-                <CheckboxGroup v-model="filterSubject" border @on-change="filterSubjectChange">
-                    <Checkbox lable="all">全部</Checkbox>
-                    <Checkbox v-for="(item,index) in subjectList" :key="index" :label="item.subjectCode">{{ item.subjectName }}</Checkbox>
-                </CheckboxGroup>
+                <RadioGroup v-model="filterSubject" type="button" @on-change="filterSubjectChange">
+                    <Radio v-for="(item,index) in subjectList" :key="index" :label="index">{{ item.subjectName }}</Radio>
+                </RadioGroup>
             </div>
             <div class="filter-item">
                 <span class="filter-title">题型:</span>
@@ -43,6 +42,7 @@
                     <Checkbox label="Judge">判断</Checkbox>
                     <Checkbox label="Complete">填空</Checkbox>
                     <Checkbox label="Subjective">问答</Checkbox>
+                    <Checkbox label="Compose">综合</Checkbox>
                 </CheckboxGroup>
             </div>
             <div class="filter-item">
@@ -80,6 +80,7 @@
                 <span class="exercise-backet-item">判断题:<span class="exercise-backet-num">{{ basketList.filter(item => item.type === 'Judge').length }}</span> 道</span>
                 <span class="exercise-backet-item">填空题:<span class="exercise-backet-num">{{ basketList.filter(item => item.type === 'Complete').length }}</span> 道</span>
                 <span class="exercise-backet-item">问答题:<span class="exercise-backet-num">{{ basketList.filter(item => item.type === 'Subjective').length }}</span> 道</span>
+                <span class="exercise-backet-item">综合题:<span class="exercise-backet-num">{{ basketList.filter(item => item.type === 'Compose').length }}</span> 道</span>
             </div>
             <span class="import-exercise">
                 <Badge :count="basketList.length" show-zero>
@@ -167,7 +168,7 @@
                     <!--<span class="item-tools-info" style="border:0">更新时间:{{ formatDateTime(new Date(item.createTime * 1000)) }}</span>-->
                     <!--<Button type="info" :style="{backgroundColor:basketList.all.indexOf(item) > -1 ? '#bbbbbb' : ''}" @click="handleChoose(item)">{{basketList.all.indexOf(item) > -1 ? '已选入' : '选题'}} </Button>-->
 
-                    <Button type="info" :style="{background: basketList.indexOf(item) > -1 ? '#acaaaa' : '#14B6EF'}" @click.stop="selectExercise(item)" style="margin-right:10px">{{ basketList.indexOf(item) > -1 ? '移除' : '选题' }}</Button>
+                <Button type="info" :style="{background: basketList.map(item => item.id).indexOf(item.id) > -1 ? '#acaaaa' : '#14B6EF'}" @click.stop="selectExercise(item)" style="margin-right:10px">{{ basketList.map(item => item.id).indexOf(item.id) > -1 ? '移除' : '选题' }}</Button>
                     <Button type="info" @click.stop="handleEdit(item)" style="margin-right:10px">编辑</Button>
                 </div>
             </div>
@@ -183,13 +184,12 @@
               @on-change="pageChange"
               :page-size-opts="[5,10,15,20]" />
 
-
         <!-- 完善试卷信息 -->
         <Modal v-model="setPaperInfoModal"
                title="新建试卷"
                footer-hide
                width="600px">
-            <BasePaperInfo :exerciseList="basketList"></BasePaperInfo>
+            <BasePaperInfo :exerciseList="basketList" :paperInfo="paperInfo" :grades="gradeList"></BasePaperInfo>
         </Modal>
     </div>
 </template>
@@ -199,7 +199,7 @@
     import { setTimeout } from 'core-js'
     export default {
         components: {
-            Loading,BasePaperInfo
+            Loading, BasePaperInfo
         },
         data() {
             return {
@@ -209,13 +209,13 @@
                 exerciseList: [],
                 schoolInfo: {},
                 isShowUploadList: false,
-                setPaperInfoModal:false,
+                setPaperInfoModal: false,
                 exersicesType: {
-                    Single: '单选',
-                    Multiple: '多选',
-                    Judge: '判断',
-                    Complete: '填空',
-                    Subjective: '问答',
+                    Single: '单选',
+                    Multiple: '多选',
+                    Judge: '判断',
+                    Complete: '填空',
+                    Subjective: '问答',
                     Compose: '综合题'
                 },
                 exersicesDiff: ['容易', '较易', '一般', '较难', '困难'],
@@ -227,24 +227,24 @@
                 filterSort: 'createTime',
                 filterPeriod: 0,
                 filterGrade: [false],
-                filterSubject: [false],
+                filterSubject: 0,
                 totalNum: 0,
                 isShowAnswer: true,
                 importLoading: false,
                 pageSize: 5,
                 pageNum: 1,
-                currentPage:1,
+                currentPage: 1,
                 collapseList: [],
                 periodList: [],
                 gradeList: [],
                 subjectList: [],
-                basketList:[],
-                filterParams: {}
+                basketList: [],
+                filterParams: {},
+                paperInfo: {}
             }
         },
         created() {
             this.getSchoolInfo()
-
         },
         methods: {
             /** 获取区班校信息 */
@@ -255,7 +255,7 @@
                     this.periodList = res.data.period
                     this.gradeList = res.data.period[0].grades
                     this.subjectList = res.data.period[0].subjects
-                    this.doFilter();
+                    this.doFilter()
                 })
             },
 
@@ -271,29 +271,28 @@
                     'scopeCode': this.filterOrigin,
                     'periodCode': [this.periodList[this.filterPeriod].periodCode],
                     'gradeCode': this.deleteFalse(this.filterGrade),
-                    'subjectCode': this.deleteFalse(this.filterSubject),
+                    'subjectCode': [this.periodList[this.filterPeriod].subjects[this.filterSubject].subjectCode],
                     'scopeCode': this.filterOrigin,
                     'level': this.deleteFalse(this.filterDiff),
                     'type': this.deleteFalse(this.filterType),
-                    'field': this.deleteFalse(this.filterField),
+                    'field': this.deleteFalse(this.filterField)
                 }
 
                 /** 查询总数参数 */
                 let findCountParams = {
-                    "collectionName": "ExamItem",
-                    "queryDict": {
+                    'collectionName': 'ExamItem',
+                    'queryDict': {
                         'scopeCode': this.filterOrigin,
                         'periodCode': [this.periodList[this.filterPeriod].periodCode],
                         'gradeCode': this.deleteFalse(this.filterGrade),
-                        'subjectCode': this.deleteFalse(this.filterSubject),
+                        'subjectCode': [this.periodList[this.filterPeriod].subjects[this.filterSubject].subjectCode],
                         'scopeCode': this.filterOrigin,
                         'level': this.deleteFalse(this.filterDiff),
                         'type': this.deleteFalse(this.filterType),
-                        'field': this.deleteFalse(this.filterField),
+                        'field': this.deleteFalse(this.filterField)
                     }
                 }
 
-
                 this.getExerciseList(this.filterParams)
                 this.getResultCount(findCountParams)
             },
@@ -327,9 +326,9 @@
              * @param id 试题ID
              */
             getDetailsById(id, index) {
-                this.$api.newEvaluation.FindExerciseById(id).then(res => {
+                this.$api.newEvaluation.FindExerciseById([id]).then(res => {
                     /* 查询到详细数据则替换掉原数据 */
-                    this.exerciseList.splice(index, 1, res.result.data)
+                    this.exerciseList.splice(index, 1, res.result.data[0])
                 })
             },
 
@@ -339,7 +338,7 @@
              * @param id
              */
             onQuestionToggle(index, id, e) {
-                e.stopPropagation();
+                e.stopPropagation()
                 let listIndex = this.collapseList.indexOf(index)
                 if (listIndex > -1) {
                     this.collapseList.splice(listIndex, 1)
@@ -348,20 +347,18 @@
                     if (!this.exerciseList[index].answer.length) this.getDetailsById(id, index)
                     this.pageScrollTo(e.target.offsetTop + 420) // content-wrap 距离顶部高度
                 }
-                
             },
 
-
             /**
              * 筛选学段条件
              * @param val
              */
             filterPeriodChange(val) {
-                //this.filterPeriod = this.periodList[val].periodCode
+                // this.filterPeriod = this.periodList[val].periodCode
                 this.gradeList = this.schoolInfo.period[val].grades
                 this.subjectList = this.schoolInfo.period[val].subjects
                 this.filterGrade = [false]
-                this.filterSubject = [false]
+                this.filterSubject = 0
                 this.pageChange(1)
             },
 
@@ -383,11 +380,6 @@
              * @param val
              */
             filterSubjectChange(val) {
-                if (val !== [false] && val.indexOf(false) === 0) {
-                    this.filterSubject.splice(val.indexOf(false), 1)
-                } else if (val.indexOf(false) > 0) {
-                    this.filterSubject = [false]
-                }
                 this.pageChange(1)
             },
 
@@ -398,7 +390,6 @@
             filterOriginChange(origin) {
                 this.filterOrigin = origin
                 this.pageChange(1)
-
             },
 
             /**
@@ -503,18 +494,18 @@
              * @param date
              */
             formatDateTime(date) {
-                var y = date.getFullYear();
-                var m = date.getMonth() + 1;
-                m = m < 10 ? ('0' + m) : m;
-                var d = date.getDate();
-                d = d < 10 ? ('0' + d) : d;
-                var h = date.getHours();
-                h = h < 10 ? ('0' + h) : h;
-                var minute = date.getMinutes();
-                minute = minute < 10 ? ('0' + minute) : minute;
-                var second = date.getSeconds();
-                second = second < 10 ? ('0' + second) : second;
-                return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
+                var y = date.getFullYear()
+                var m = date.getMonth() + 1
+                m = m < 10 ? ('0' + m) : m
+                var d = date.getDate()
+                d = d < 10 ? ('0' + d) : d
+                var h = date.getHours()
+                h = h < 10 ? ('0' + h) : h
+                var minute = date.getMinutes()
+                minute = minute < 10 ? ('0' + minute) : minute
+                var second = date.getSeconds()
+                second = second < 10 ? ('0' + second) : second
+                return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second
             },
 
             /**
@@ -522,11 +513,14 @@
              * @param item
              */
             selectExercise(item) {
-                let index = this.basketList.indexOf(item)
+                console.log(item)
+                let index = this.basketList.map(item => item.id).indexOf(item.id)
                 if (index > -1) {
                     this.basketList.splice(index, 1)
                 } else {
-                    this.basketList.push(item)
+                    this.$api.newEvaluation.FindExerciseById([item.id]).then(res => {
+                        this.basketList.push(res.result.data[0])
+                    })
                 }
             },
 
@@ -546,27 +540,12 @@
             onSetPaperInfo() {
                 let list = this.basketList
                 if (!list.length) {
-                    this.$Message.warning("请先选题再进行组卷操作!")
+                    this.$Message.warning('请先选题再进行组卷操作!')
                 } else {
                     this.setPaperInfoModal = true
                 }
             },
 
-            /** 进入组卷中心 */
-            goTestPaper() {
-                let list = this.basketList
-                if (!list.length) {
-                    this.$Message.warning("请先选题再进行组卷操作!")
-                } else {
-                    this.$router.push({
-                        name: 'testPaper',
-                        params: {
-                            list: list
-                        }
-                    })
-                }
-            },
-
             // 导入试题
             uploadSuccess(response, file, fileList) {
                 let that = this
@@ -575,7 +554,7 @@
                     let requestData = { htmlString: response.result.data.HtmlString }
                     this.$api.SaveAnalyzeHtml(requestData).then(res => {
                         if (res.error === null) {
-                            setTimeout(function () {
+                            setTimeout(function() {
                                 that.$Message.success('文件上传解析成功!')
                                 that.exerciseList = res.result.data
                                 that.importLoading = false
@@ -597,7 +576,12 @@
 
         },
         mounted() {
-
+            let paperInfo = this.$route.params.paperInfo
+            console.log(paperInfo)
+            if (paperInfo) {
+                this.basketList = paperInfo.item
+                this.paperInfo = paperInfo
+            }
         },
         computed: {
             headers() {
@@ -609,7 +593,7 @@
     }
 </script>
 <style scoped>
-    @import "../index/ExercisesList.css";
+    @import "../index/PickExercise.css";
 </style>
 
 <style>
@@ -640,4 +624,4 @@
         z-index:999;
         box-shadow: 0px 6px 3px 0px #d9d9d9;
     }
-</style>
+</style>

+ 0 - 205
TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaper.css

@@ -1,205 +0,0 @@
-.paper-container {
-    user-select: none !important;
-    font-family: '微軟正黑體', 'Heiti TC' !important;
-}
-
-    .paper-container .ev-header {
-        background: #fff;
-        padding: 10px;
-    }
-
-    .paper-container .ev-title {
-        font-size: 20px;
-        font-weight: bold;
-        margin-left: 5px;
-        vertical-align: middle;
-    }
-
-    .paper-container .ev-length {
-        font-size: 12px;
-        font-weight: bold;
-        margin-left: 30px;
-        display: inline-block;
-        margin-top: 5px;
-        vertical-align: text-top;
-    }
-    .paper-container .paper-header {
-        background: #fff;
-    }
-    .paper-container .paper-title {
-        font-size: 20px;
-        font-weight: bold;
-        vertical-align: middle;
-        text-align:center
-    }
-    .paper-container .paper-subTitle {
-        font-size: 16px;
-        font-weight: bold;
-        margin: 15px;
-        text-align:center;
-        vertical-align: middle;
-    }
-    .paper-container .paper-info {
-        font-size: 14px;
-        vertical-align: middle;
-    }
-
-    .paper-container .paper-toolbar {
-        background: #fff;
-        padding:20px;
-    }
-
-    .paper-container .paper-toolbar .filter-title {
-        font-size:14px;
-    }
-
-.paper-main-wrap {
-    width:100%;
-    display:flex;
-    justify-content:space-between;
-    margin-top:10px;
-    padding:20px;
-}
-
-    .paper-main-wrap .paper-analysis {
-        background:#01b4ef;
-        height:100px;
-        width:20%
-    }
-
-.paper-content {
-    width:78%;
-    background: #fff;
-    padding:20px;
-    display:flex;
-    flex-direction:row;
-}
-
-    .paper-content .paper-body {
-       width:90%;
-       padding-left:50px;
-    }
-
-    .paper-content .paper-part {
-        padding: 15px;
-    }
-
-        /*.paper-content .paper-part:hover {
-            background: #bfcdad45;
-        }*/
-
-    .paper-content .exercise-item {
-        position: relative;
-        font-size: 14px !important;
-        margin-top: 0 !important;
-        padding: 5px 10px !important;
-        box-sizing: border-box;
-        background: transparent;
-        border: 1px solid rgba(1,1,1,0);
-    }
-
-        .paper-content .exercise-item .item-concept {
-            margin-top:10px;
-        }
-
-        .paper-content .exercise-item .item-tools {
-            position: absolute;
-            right: -2px;
-            top: -30px;
-            width:auto;
-            height: 30px;
-            margin:0;
-            padding:0;
-            background: #01b4ef;
-            display:none;
-        }
-
-            .paper-content .exercise-item .item-tools-t {
-                height: 100%;
-                padding: 0 15px;
-                float: left;
-                color: white;
-                cursor: pointer;
-            }
-
-                .paper-content .exercise-item .item-tools-t:hover {
-                    background: #4a5ae6;
-                }
-
-        .paper-content .exercise-item .item-tools-t .ivu-icon{
-            color:white;
-            font-size:14px;
-            margin:0 3px;
-        }
-
-        .paper-content .paper-content-section {
-             font-size: 18px;
-            font-weight: bold;
-            margin-top: 20px;
-        }
-
-    .paper-content .paper-content-section span {
-        font-size:14px;
-        font-weight:500;
-        margin-left:10px;
-    }
-
-    .paper-content  .exercise-item:hover {
-        box-shadow: none !important;
-        border-color:#cfcfcf;
-    }
-
-    .paper-content .item-answer, .paper-content .item-explain {
-        /*text-indent:-8px;*/
-        line-height:26px;
-    }
-
-
-
-
-
-.paper-tools {
-    width: 100%;
-    height: 60px;
-    margin-top: 10px;
-    border-top: 1px dashed #cfcfcf;
-    padding:10px 0;
-}
-    
-    .paper-tools .paper-tools-title {
-        font-size: 14px;
-        font-weight:bold;
-        margin-right:10px;
-    }    
-    .paper-tools .ivu-checkbox-wrapper {
-        font-size: 14px;
-        margin-left:10px;
-    }
-
-    .paper-tools .ivu-checkbox {
-        margin: 0 4px;
-        vertical-align:text-bottom;
-    }
-    .paper-tools .ivu-checkbox-checked .ivu-checkbox-inner {
-        background: #01b4ef;
-        border-color: #01b4ef;
-    }
-
-
-
-/*横向垂直水平居中*/
-.flex-row-center {
-    display: flex;
-    flex-direction: row;
-    justify-content: center;
-    align-items: center;
-}
-
-/*向垂直水平居中*/
-.flex-col-center {
-    display: flex;
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-}
-

+ 251 - 0
TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaper.less

@@ -0,0 +1,251 @@
+.paper-container {
+    user-select: none !important;
+    font-family: '微軟正黑體', 'Heiti TC' !important;
+
+
+    .paper-title {
+        font-size: 30px;
+        font-weight: bold;
+        vertical-align: middle;
+        text-align: center;
+    }
+
+    .paper-subTitle {
+        font-size: 16px;
+        font-weight: bold;
+        margin: 15px;
+        text-align: center;
+        vertical-align: middle;
+    }
+
+    .paper-info {
+        font-size: 14px;
+        vertical-align: middle;
+    }
+
+    .paper-toolbar {
+        background: #fff;
+        padding: 20px;
+
+        .filter-title {
+            font-size: 14px;
+        }
+    }
+}
+
+.paper-main-wrap {
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    margin-top: 10px;
+    padding: 20px;
+
+    .paper-analysis {
+        position:sticky;
+        top:0;
+        background: White;
+        width: 20%;
+        padding: 20px 10px;
+
+        .ivu-radio-group{
+            margin:15px 0 0 0;
+        }
+
+        .analysis-btns {
+            width: 100%;
+            .flex-row-center;
+            justify-content: space-around;
+
+            .ivu-btn {
+                width: 30%;
+                height: 40px;
+            }
+        }
+
+        .analysis-infos {
+            margin-top: 15px;
+            border-top: 1px dotted #cfcfcf;
+            padding: 0 20px 0 20px;
+
+            .analysis-title {
+                font-size: 18px;
+                margin: 30px 0 10px 0;
+                font-weight: bold;
+
+                &::before {
+                    content: "";
+                    height: 14px;
+                    width: 5px;
+                    margin-top: 2px;
+                    margin-right: 8px;
+                    border-radius: 5px;
+                    background: #01b4ef;
+                    display: inline-block;
+                    vertical-align: baseline;
+                }
+            }
+
+            .flex-row-center {
+                justify-content: space-between;
+            }
+
+            .analysis-info {
+                font-weight: bold;
+                color: #69baec;
+                margin: 0 5px;
+            }
+
+            .analysis-index-wrap {
+                display: flex;
+                flex-wrap: wrap;
+            }
+
+            .exercise-index-item {
+                width: 34px;
+                height: 34px;
+                line-height: 34px;
+                text-align: center;
+                margin-right: 10px;
+                margin-top: 10px;
+                background: #69BAEC;
+                color: #fff;
+                border-radius: 5px;
+                cursor: pointer;
+                .flex-row-center;
+
+                &:hover {
+                    background: #0097F4;
+                }
+            }
+        }
+    }
+}
+
+.paper-content {
+    width: 78%;
+    background: #fff;
+    padding: 20px;
+    display: flex;
+    flex-direction: row;
+
+    .paper-body {
+        width: 94%;
+        padding-left: 50px;
+    }
+
+    .paper-part {
+        padding: 15px;
+    }
+
+    .exercise-item {
+        position: relative;
+        font-size: 14px !important;
+        margin-top: 0 !important;
+        padding: 5px 10px !important;
+        box-sizing: border-box;
+        background: transparent;
+        border: 1px solid rgba(1,1,1,0);
+
+        .item-concept {
+            margin-top: 10px;
+        }
+
+        .item-tools {
+            position: absolute;
+            right: -2px;
+            top: -30px;
+            width: auto;
+            height: 30px;
+            margin: 0;
+            padding: 0;
+            background: #01b4ef;
+            display: none;
+        }
+
+        .item-tools-t {
+            height: 100%;
+            padding: 0 15px;
+            float: left;
+            color: white;
+            cursor: pointer;
+
+            &:hover {
+                background: #4a5ae6;
+            }
+
+            .ivu-icon {
+                color: white;
+                font-size: 14px;
+                margin: 0 3px;
+            }
+        }
+
+        &:hover {
+            box-shadow: none !important;
+            border-color: #cfcfcf;
+        }
+    }
+
+    .paper-content-section {
+        font-size: 18px;
+        font-weight: bold;
+        margin-top: 20px;
+
+        span {
+            font-size: 14px;
+            font-weight: 500;
+            margin-left: 10px;
+        }
+    }
+}
+/*.paper-content .paper-part:hover {
+            background: #bfcdad45;
+        }*/
+.paper-content .item-answer, .paper-content .item-explain {
+    line-height: 26px;
+}
+
+.paper-tools {
+    width: 100%;
+    height: 60px;
+    margin-top: 10px;
+    border-top: 1px dashed #cfcfcf;
+    padding: 10px 0;
+
+    .paper-tools-title {
+        font-size: 14px;
+        font-weight: bold;
+        margin-right: 10px;
+    }
+
+    .ivu-checkbox-wrapper {
+        font-size: 14px;
+        margin-left: 10px;
+    }
+
+    .ivu-checkbox {
+        margin: 0 4px;
+        vertical-align: text-bottom;
+    }
+
+    .ivu-checkbox-checked {
+        .ivu-checkbox-inner {
+            background: #01b4ef;
+            border-color: #01b4ef;
+        }
+    }
+}
+/*横向垂直水平居中*/
+.flex-row-center {
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+}
+/*向垂直水平居中*/
+.flex-col-center {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+}

File diff suppressed because it is too large
+ 136 - 129
TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaper.vue


+ 6 - 8
TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaperList.vue

@@ -1,25 +1,23 @@
 <template>
-  
+
 </template>
 <script>
-  
+
   export default {
-    
+
     data() {
       return {
-        
+
       }
     },
     created() {
-      
+
     },
     methods: {
 
-     
-
     },
     mounted() {
-        
+
     }
   }
 </script>

+ 29 - 110
TEAMModelOS/ClientApp/src/view/evaluation/index/index.vue

@@ -1,44 +1,25 @@
 <template>
-  <div class="evaluation">
-    <div class="ev-header" style="display:none;">
-      <Header :parentToChild="syllabusTitle" :identityselect="identitydata"></Header>
-    </div>
-    <vuescroll ref="evScroll">
-        <div class="ev-body">
-            <!--<div class="ev-slide">
-          <div class="ev-slide-school"><Icon type="ios-school" size="26" color="#10abe7" style="vertical-align:sub"/> {{schoolInfo.claimName}}</div>
-          <div class="ev-slide-header">选择学段及科目</div>
-          <div class="ev-slide-select">
-            <Select v-model="evPeriodSelect" @on-change="periodChange" label-in-value>
-              <Option v-for="item in evPeriodsList" :value="item.code" :key="item.rowKey">{{ item.name }}</Option>
-            </Select>
-            <Select v-model="evSubjectSelect" @on-change="subjectChange" label-in-value>
-              <Option v-for="item in evSubjectList" :value="item.code" :key="item.rowKey">{{ item.name }}</Option>
-            </Select>
-          </div>
-          <div class="ev-slide-header ev-slide-select-volumes" style="position:relative">
-            <Select v-model="evVolumeSelect" @on-change="volumeChange" label-in-value placeholder="请选择册别">
-              <Option v-for="item in evVolumesList" :value="item.rowKey" :key="item.rowKey">{{ item.gradeName + '' + item.termName }}</Option>
-            </Select>
-          </div>
-          <SyllabusTree :treeDatas="treeData"></SyllabusTree>
-        </div>-->
-            <div class="ev-content">
-                <router-view />
+    <div class="evaluation">
+        <div class="ev-header" style="display:none;">
+            <Header :parentToChild="syllabusTitle" :identityselect="identitydata"></Header>
+        </div>
+        <Loading :top="100" v-show="dataLoading" type="3"></Loading>
+        <vuescroll ref="evScroll">
+            <div class="ev-body">
+                <div class="ev-content">
+                    <router-view />
+                </div>
             </div>
+        </vuescroll>
+        <div class="slide-menu animated">
+            <ul>
+                <li @click="goRouter('createExercises')">创建习题</li>
+                <li @click="goRouter('exercisesList')">组卷中心</li>
+                <li @click="goRouter('testPaperList')">试卷试题库</li>
+            </ul>
+            <!--<Icon type="md-list" />-->
         </div>
-    </vuescroll>
-    <div class="slide-menu animated">
-      <ul>
-        <li @click="goRouter('createExercises')">创建习题</li>
-        <li @click="goRouter('exercisesList')">我的题库</li>
-        <li @click="goRouter('createTest')">创建评测</li>
-        <li @click="goRouter('testPaper')">编辑评测</li>
-        <li @click="goRouter('testPaperList')">我的评测</li>
-      </ul>
-      <!--<Icon type="md-list" />-->
     </div>
-  </div>
 
 </template>
 <script>
@@ -67,83 +48,20 @@
         evSubjectSelect: '',
         evPeriodSelect: '',
         evVolumeSelect: '',
-        isLoadingFinish: false
+        dataLoading: false
       }
     },
     created() {
-      //this.schoolInfo = JSON.parse(localStorage.getItem('c_role_info')).roleClaim[0].claim[0] // 默认选中第一个学校
-      //this.findSchoolPeriodsByDict()
+      
     },
     methods: {
-      goRouter(name) {
-        this.$router.push({
-          name: name
-        })
-      },
-
-      // 获取当前学校全部学段
-      findSchoolPeriodsByDict() {
-        this.$api.FindSchoolPeriodsByDict({ SchoolCode: this.schoolInfo.claimCode }).then(res => {
-          // this.evPeriodsList = res.result.data;
-          // this.evPeriodSelect = res.result.data[0].code;
-          // this.findSchoolSubjectsByDict();
-        })
-      },
-
-      // 查找当前学校已有科目
-      findSchoolSubjectsByDict() {
-        this.$api.FindSchoolSubjectsByDict({ SchoolCode: this.schoolInfo.claimCode, Status: 1 }).then(res => {
-          this.evSubjectList = res.result.data
-          this.evSubjectSelect = res.result.data[0].code
-          this.findVolumesBySubjectAndPeriod(this.evPeriodSelect, this.evSubjectSelect)
-        })
-      },
-
-      // 根据当前选择的科目及学段获取所有册别
-      findVolumesBySubjectAndPeriod(periodCode, subjectCode) {
-        let defaultData = {
-          SchoolCode: this.schoolInfo.claimCode,
-          SubjectCode: subjectCode,
-          PeriodCode: periodCode,
-          Status: 1
-        }
-        this.$api.FindSchoolVolumesByDict(defaultData).then(res => {
-          this.evVolumesList = res.result.data
-          if (res.result.data.length) {
-            this.evVolumeSelect = res.result.data[0].rowKey
-            this.findSyllabusByVolumeCode(res.result.data[0].rowKey)
-          } else {
-            this.evVolumeSelect = ''
-            this.treeData = []
-          }
-         })
+        goRouter(name) {
+            this.$router.push({
+              name: name
+            })
       },
 
-      // 根据册别来获取课纲树形结构
-      findSyllabusByVolumeCode(volumeCode) {
-        this.isLoadingFinish = false
-        this.$api.FindSyllabusByVolumeCode({ VolumeCode: volumeCode, Status: 1 }).then(res => {
-          let list = res.result.data
-          list.forEach(item => { item.expand = false })
-          this.treeData = list
-          this.isLoadingFinish = true
-        })
-      },
-
-      // 选择科目变化
-      subjectChange(val) {
-        this.findVolumesBySubjectAndPeriod(this.evPeriodSelect, val.value)
-      },
-
-      // 选择学段变化
-      periodChange(val) {
-        this.findVolumesBySubjectAndPeriod(val.value, this.evSubjectSelect)
-      },
-
-      // 选择册别变化
-      volumeChange(val) {
-        this.findSyllabusByVolumeCode(val.value)
-      }
+      
     },
     mounted() {
     }
@@ -157,9 +75,10 @@
     height:100%;
     position:relative;
     overflow:hidden;
+    font-family: '微軟正黑體', 'Heiti TC' !important;
   }
   .ev-body {
-    width:100%;
+    width:98%;
     min-width:1200px;
     min-height:700px;
     margin:auto;
@@ -247,7 +166,7 @@
 
   .slide-menu {
     width:150px;
-    background:#bdbcbc;
+    background:#191919;
     position:fixed;
     top:100px;
     left:-140px;
@@ -295,7 +214,7 @@
           width: 1em;
           height: 1em;
           border-radius: 50%;
-          background:#2cbeff;
+          background:#a28f5c;
           transform-origin: center;
           transform: translate3d(50%, 50%, 0) scale3d(0, 0, 0);
           transition: transform 0.45s ease-in-out;

+ 5 - 8
TEAMModelOS/ClientApp/src/view/knowledge-point/index/Index.vue

@@ -294,7 +294,7 @@
                         this.blockList = list
                         this.originBlockList = list
                         this.handleBlockTap(0, list.length ? list[0] : null)
-                        setTimeout(function () {
+                        setTimeout(function() {
                             that.isLoadBlocks = false
                         }, 400)
                     } else {
@@ -311,7 +311,7 @@
                     if (!res.error && res.result.data) {
                         this.pointList = res.result.data
                         this.originPointList = res.result.data
-                        setTimeout(function () {
+                        setTimeout(function() {
                             that.isLoadPoints = false
                         }, 800)
                     } else {
@@ -363,7 +363,7 @@
                     this.subjectList = this.periodList[index].subjects // 切换学段后更新 学科 列表
                     this.originSubjectList = this.periodList[index].subjects // 筛选学科源数据
                     this.handleSubjectTap(0)
-                    setTimeout(function () {
+                    setTimeout(function() {
                         that.isLoadSubject = false
                     }, 400)
                 }
@@ -403,7 +403,7 @@
                     this.originPointList = []
                     this.pointList = []
                 }
-                setTimeout(function () {
+                setTimeout(function() {
                     that.isLoadPoints = false
                 }, 400)
             },
@@ -429,7 +429,7 @@
                 this.$Message.success('操作成功!')
                 this.isAddPoint = false // 关闭窗口
                 this.isEditPoint = false
-                setTimeout(function () {
+                setTimeout(function() {
                     that.isLoadPoints = false
                 }, 400)
             },
@@ -513,7 +513,6 @@
                 this.parentBlock = this.isShowPoints ? null : this.currentBlock
             },
 
-
             // 知识点点击事件
             onPointCheck(item) {
                 if (this.isShowPoints) {
@@ -525,7 +524,6 @@
                         this.checkedPointList.push(item)
                     }
                 }
-
             },
 
             // 点击组成知识块
@@ -594,7 +592,6 @@
                 this.pageChange(1)
             },
 
-
             // 获取知识点完整对象数据 ID换对象
             getPointObject(arr) {
                 let params = {

+ 1 - 1
TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/AddBlock.vue

@@ -62,7 +62,7 @@
                         period: this.currentPeriod.periodCode,
                         points: [],
                         scope: 'school',
-                        TEAMModelId:"habook#001",
+                        TEAMModelId: 'habook#001',
                         source: 1
                     }
                     if (this.editItem) {

+ 4 - 6
TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/AddPoint.vue

@@ -26,7 +26,7 @@
                 currentPoint: null,
                 schoolInfos: {},
                 addPointType: 'school',
-                isHideBlock:false,
+                isHideBlock: false,
                 isLoading: false,
                 uuid: '',
                 formTop: {
@@ -61,8 +61,8 @@
                         period: editPointItem ? editPointItem.period : this.schoolInfos.period,
                         source: 1,
                         scope: this.addPointType,
-                        TEAMModelId: "habook#001",
-                        points:this.blockDatas ? [this.blockDatas.id] : [],
+                        TEAMModelId: 'habook#001',
+                        points: this.blockDatas ? [this.blockDatas.id] : [],
                         id: null
                     }
 
@@ -81,7 +81,7 @@
                         this.$emit('addFinish', res.result.data[0])
                         this.closeModal()
                         this.currentPoint = null
-                        this.formTop.name = ""
+                        this.formTop.name = ''
                         this.isLoading = false
                     } else {
                         this.$Message.warning('操作失败,错误代码:' + res.error.code + ',错误信息:' + res.error.message)
@@ -92,8 +92,6 @@
                 })
             },
 
-
-
             // 添加完成 关闭窗口
             closeModal() {
                 this.formTop.name = ''

+ 11 - 14
TEAMModelOS/ClientApp/src/view/knowledge-point/index/operation/ComposeBlock.vue

@@ -35,22 +35,21 @@
 <script>
     import '@/utils/Math.uuid'
     export default {
-        props: ['list','params','blockList'],
+        props: ['list', 'params', 'blockList'],
         data() {
             return {
-                existBlockList:[],
+                existBlockList: [],
                 checkedList: [],
-                currentParams:null,
-                newBlockName: "",
+                currentParams: null,
+                newBlockName: '',
                 isLoading: false,
                 selectBlock: '',
-                currentTab:'0'
+                currentTab: '0'
             }
         },
 
         created() {
             this.currentParams = this.params
-
         },
         methods: {
 
@@ -66,7 +65,7 @@
                     let list = this.existBlockList.map(item => item.name)
                     let isExistIndex = list.indexOf(this.newBlockName)
                     if (isExistIndex > -1) {
-                        this.$Message.warning("已存在同名知识块,请修改名称!")
+                        this.$Message.warning('已存在同名知识块,请修改名称!')
                         this.isLoading = false
                     } else {
                         let params = {
@@ -81,7 +80,7 @@
                             period: this.currentParams.period,
                             points: this.checkedList.map(item => item.id),
                             scope: this.currentParams.partitionKey === 'personal' ? 'personal' : 'school',
-                            TEAMModelId: "habook#000011",
+                            TEAMModelId: 'habook#000011',
                             source: 1
                         }
 
@@ -99,7 +98,7 @@
                         })
                     }
                 } else {
-                    this.$Message.warning("知识块名称不能为空")
+                    this.$Message.warning('知识块名称不能为空')
                     this.isLoading = false
                 }
             },
@@ -127,12 +126,11 @@
             },
 
             onSplicePoint(item) {
-                this.checkedList.splice(this.checkedList.indexOf(item),1)
+                this.checkedList.splice(this.checkedList.indexOf(item), 1)
             }
         },
         mounted() {
 
-
         },
         watch: {
             list: {
@@ -156,12 +154,12 @@
                 handler(newValue, oldValue) {
                     if (newValue.length) {
                         console.log(newValue)
-                        this.newBlockName = ""
+                        this.newBlockName = ''
                         this.existBlockList = newValue
                         this.selectBlock = newValue[0].id
                     }
                 }
-            },
+            }
         }
 
     }
@@ -266,7 +264,6 @@
         color: #fff;
     }
 
-
     .compose-container .ivu-select-single .ivu-select-selection {
         background: #575757;
         color: #fbfbfb;

+ 10 - 1
TEAMModelOS/ClientApp/src/view/learnactivity/AutoCreate.less

@@ -5,7 +5,16 @@
 @primary-fontSize: 14px;
 @second-fontSize: 16px;
 
-
+.auto-create-name {
+    text-align: center;
+    margin-top: 30px;
+    color: #CCCCCC;
+    display: block;
+}
+.auto-create-wrap {
+    height: 100%;
+    background: #404040;
+}
 .question-condition-wrap {
   width: 1000px;
   margin: auto;

+ 25 - 39
TEAMModelOS/ClientApp/src/view/learnactivity/AutoCreate.vue

@@ -1,7 +1,7 @@
-<template>
-  <div style="height:100%;background:#404040;">
+<template>
+  <div class="auto-create-wrap">
     <vuescroll>
-      <h2 style="text-align:center;margin-top:30px;color:#CCCCCC;display:block;">设置组题条件</h2>
+      <h2 class="auto-create-name">设置组题条件</h2>
       <div class="question-condition-wrap">
         <div class="question-condition-item">
           <span class="condition-label">题库范围:</span>
@@ -218,15 +218,6 @@
         </div>
       </div>
     </vuescroll>
-    <Modal v-model="comfirmPreviewStatus"
-           ok-text="是"
-           cancel-text="否"
-           :mask-closable="false"
-           @on-ok="goToPreview"
-           @on-cancel="cancel">
-
-      <p style="font-size:18px;padding-top:15px;">自动组题成功,是否跳转到试题预览界面预览题目?</p>
-    </Modal>
     <Modal v-model="selectPointsStatus"
            title="设置知识点"
            width="70"
@@ -283,12 +274,12 @@
             school: '醍摩豆书院',
             schoolCode: 'HBCN'
         },
-        activePointTab:1,
+        activePointTab: 1,
         openKeys: [],
-        pointsInBlockList:[],
-        pointBlockList:[],
-        pointTab:'pioints',
-        selectPointsStatus:false,
+        pointsInBlockList: [],
+        pointBlockList: [],
+        pointTab: 'pioints',
+        selectPointsStatus: false,
         single: {
           total: 1,
           policy: 'random',
@@ -347,20 +338,20 @@
           scopeCode: [],
           periodCode: [],
           questionType: ['single'],
-          points:[]
+          points: []
         },
         difficultyList: [
           {
             value: 'random',
-            label:'随机'
+            label: '随机'
           },
           {
             value: 'average',
-            label:'平均分配'
+            label: '平均分配'
           },
           {
             value: 'custom',
-            label:'自定义'
+            label: '自定义'
           }
         ]
       }
@@ -368,9 +359,6 @@
     methods: {
       cancel() {
 
-      },
-      goToPreview() {
-        this.$emit('goToPreview')
       },
       selectPointScope(index) {
         this.activePointTab = index
@@ -386,14 +374,14 @@
         this.$api.FindCollection(params).then(res => {
           if (!res.error && res.result.data) {
             this.pointsInBlockList = res.result.data
-            //this.pointList = res.result.data
+            // this.pointList = res.result.data
           } else {
             this.$Message.warning('获取数据失败')
           }
         })
       },
       getOpenKeys(data) {
-        
+
       },
       getCurrentIndex(points) {
         this.getPointObject(points)
@@ -439,39 +427,38 @@
           scopeCode: this.autoCreateFilter.scopeCode,
           period: this.autoCreateFilter.periodCode,
           points: this.autoCreateFilter.points,
-          quInfos:[]
+          quInfos: []
         }
         let count = 0
         for (let item of this.autoCreateFilter.questionType) {
           let quInfoItem = {
             type: item.charAt(0).toUpperCase() + item.slice(1),
-            policy: this[item].policy,
+            policy: this[item].policy
           }
           if (this[item].policy == 'custom') {
             quInfoItem.custom = []
             quInfoItem.custom.push({
-              level: 1,//容易,
-              count: this.getNumber(this[item].easy) 
+              level: 1, // 容易,
+              count: this.getNumber(this[item].easy)
             })
             quInfoItem.custom.push({
-              level: 2,//较易,
+              level: 2, // 较易,
               count: this.getNumber(this[item].relativeEasy)
             })
             quInfoItem.custom.push({
-              level: 3,//一般,
+              level: 3, // 一般,
               count: this.getNumber(this[item].common)
             })
             quInfoItem.custom.push({
-              level: 4,//较难,
+              level: 4, // 较难,
               count: this.getNumber(this[item].relativeDifficulty)
             })
             quInfoItem.custom.push({
-              level: 5,//困难,
+              level: 5, // 困难,
               count: this.getNumber(this[item].difficulty)
             })
-            //quInfoItem.count = this.getNumber(this[item].easy) + this.getNumber(this[item].common) + this.getNumber(this[item].difficulty)
+            // quInfoItem.count = this.getNumber(this[item].easy) + this.getNumber(this[item].common) + this.getNumber(this[item].difficulty)
             quInfoItem.count = this.getCount(this[item])
-            
           } else {
             quInfoItem.count = this.getNumber(this[item].total)
           }
@@ -487,7 +474,6 @@
                   for (let i = 0; i < res.result.data.length; i++) {
                       this.$emit('autoQuestions', res.result.data[i].item)
                 }
-                this.comfirmPreviewStatus = true
               } else {
                 this.$Message.error('未能匹配满足条件的题目!')
               }
@@ -502,7 +488,7 @@
       }
     },
     mounted() {
-      
+
     }
   }
 </script>
@@ -533,4 +519,4 @@
   .question-num-item .ivu-input-number-input {
     padding:0px;
   }
-</style>
+</style>

+ 472 - 456
TEAMModelOS/ClientApp/src/view/learnactivity/CreateEvaluation.vue

@@ -1,483 +1,499 @@
 <template>
-  <div class="create-evaluation-container">
-    <div class="create-header">
-      <p class="create-header-title">创建评测活动</p>
-      <p class="btn-save" @click="saveEvaluation"><Icon type="ios-albums-outline" color="#6BE9C3" style="margin-right:10px;" />保存评测</p>
-    </div>
-    <div class="create-body">
-      <div class="evaluation-attr-wrap">
-        <p class="wrap-label">基础信息</p>
-        <div style="width:100%; height:calc(100% - 45px);padding-top:30px;">
-          <!--<vuescroll>-->
-          <Form ref="evaluationInfo" :model="evaluationInfo" label-position="top" class="evaluation-attr-form" label-colon :rules="ruleValidate">
-            <FormItem label="评测名称" prop="name">
-              <Input v-model="evaluationInfo.name"></Input>
-            </FormItem>
-            <FormItem label="测试类型" prop="type">
-              <Select v-model="evaluationInfo.type">
-                <Option v-for="(item,index) in typeList" :value="item.value" :key="index">{{ item.label }}</Option>
-              </Select>
-            </FormItem>
-            <FormItem label="发布方式" prop="publish">
-              <Select v-model="evaluationInfo.publish">
-                <Option v-for="(item,index) in publishList" :value="item.value" :key="index">{{ item.label }}</Option>
-              </Select>
-            </FormItem>
-            <FormItem label="施测对象">
-              <Select v-model="evaluationInfo.target" multiple>
-                <Option v-for="(item,index) in classroomList" :value="item" :key="index">{{ item }}</Option>
-              </Select>
-            </FormItem>
-            <FormItem label="施测时间">
-              <DatePicker type="daterange" split-panels placeholder="请选择发布时间" style="width:100%" @on-change="getDate"></DatePicker>
-            </FormItem>
-          </Form>
-          <!--</vuescroll>-->
-        </div>
-      </div>
-      <div class="evaluation-question-wrap">
-        <div class="wrap-label">
-          <p>测试科目:</p>
-          <span v-for="(item,index) in evaluationInfo.testPaper" :class="index == currentSubjectIndex ? 'subject-item subject-item-active':'subject-item'" @click="selectSubject(index)">
-            {{jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo, item.periodCode).periodName}}
-            <span style="margin:0px 5px;">·</span>
-            {{jsFn.getSubjectName(jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo, item.periodCode), item.subjectCode)}}
-            <Icon type="ios-close" size="18" class="delete-subject-btn" @click="deleteSubject(index)" />
-          </span>
-          <Icon @click="addSubject" type="md-add-circle" title="添加科目" color="white" class="add-subject-icon" size="20" />
+    <div class="create-evaluation-container">
+        <div class="create-header">
+            <p class="create-header-title">创建评测活动</p>
+            <p class="btn-save" @click="saveEvaluation"><Icon type="ios-albums-outline" color="#6BE9C3" style="margin-right:10px;" />保存评测</p>
         </div>
-        <div class="evaluation-question-main">
-          <NoData style="margin-top:120px;" v-if="evaluationInfo.testPaper.length == 0" textContent="暂无科目,请添加科目"></NoData>
-          <div class="create-type-wrap" v-if="evaluationInfo.testPaper.length > 0">
-            <span>创建方式:</span>
-            <RadioGroup v-model="evaluationInfo.testPaper[currentSubjectIndex].createType" style="margin-left:25px;" @on-change="setActiveTab">
-              <Radio label="auto">自动组题</Radio>
-              <Radio label="manual">手动挑题/卷</Radio>
-              <Radio label="import">试卷导入</Radio>
-            </RadioGroup>
-          </div>
-          <Tabs v-model="activeTab" type="card" class="question-main-tabs" v-if="evaluationInfo.testPaper.length > 0" name="createTest">
-            <TabPane label="组题条件" name="auto" v-if="evaluationInfo.testPaper[currentSubjectIndex].createType == 'auto'" :index="1" tab="createTest">
-              <AutoCreate :subjectCode="evaluationInfo.testPaper[currentSubjectIndex].subjectCode" :periodCode="evaluationInfo.testPaper[currentSubjectIndex].periodCode" @goToPreview="goToPreview" @autoQuestions="getImportQuestions"></AutoCreate>
-            </TabPane>
-            <TabPane label="备选题目" name="manual" v-if="evaluationInfo.testPaper[currentSubjectIndex].createType == 'manual'" :index="2" tab="createTest">
-              <ManualCreate :questionList="questionList" @goToPreview="goToPreview" @selectedQuestion="getSelectedQuestion"></ManualCreate>
-            </TabPane>
-            <TabPane label="导入说明" name="import" v-if="evaluationInfo.testPaper[currentSubjectIndex].createType == 'import'" :index="3" tab="createTest">
-              <ImportCreate @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></ImportCreate>
-            </TabPane>
-            <TabPane label="试题预览" name="preview" :index="4" tab="createTest">
-              <TeacherPreview :testPaper="evaluationInfo.testPaper[currentSubjectIndex]" :paperName="evaluationInfo.name"></TeacherPreview>
-            </TabPane>
-            <TabPane label="学生作答预览" name="student" :index="5" tab="createTest">
-              <StudentPreview></StudentPreview>
-            </TabPane>
-          </Tabs>
+        <div class="create-body">
+            <div class="evaluation-attr-wrap">
+                <p class="wrap-label">基础信息</p>
+                <div style="width:100%; height:calc(100% - 45px);padding-top:30px;">
+                    <!--<vuescroll>-->
+                    <Form ref="evaluationInfo" :model="evaluationInfo" label-position="top" class="evaluation-attr-form" label-colon :rules="ruleValidate">
+                        <FormItem label="评测名称" prop="name">
+                            <Input v-model="evaluationInfo.name"></Input>
+                        </FormItem>
+                        <FormItem label="测试类型" prop="type">
+                            <Select v-model="evaluationInfo.type">
+                                <Option v-for="(item,index) in typeList" :value="item.value" :key="index">{{ item.label }}</Option>
+                            </Select>
+                        </FormItem>
+                        <FormItem label="发布方式" prop="publish">
+                            <Select v-model="evaluationInfo.publish">
+                                <Option v-for="(item,index) in publishList" :value="item.value" :key="index">{{ item.label }}</Option>
+                            </Select>
+                        </FormItem>
+                        <FormItem label="施测对象">
+                            <Select v-model="evaluationInfo.target" multiple>
+                                <Option v-for="(item,index) in classroomList" :value="item" :key="index">{{ item }}</Option>
+                            </Select>
+                        </FormItem>
+                        <FormItem label="施测时间">
+                            <DatePicker type="daterange" format="yyyy/MM/dd" split-panels placeholder="请选择发布时间" style="width:100%" @on-change="getDate"></DatePicker>
+                        </FormItem>
+                    </Form>
+                    <!--</vuescroll>-->
+                </div>
+            </div>
+            <div class="evaluation-question-wrap">
+                <div class="wrap-label">
+                    <p>测试科目:</p>
+                    <span v-for="(item,index) in evaluationInfo.testPaper" :class="index == currentSubjectIndex ? 'subject-item subject-item-active':'subject-item'" @click="selectSubject(index)">
+                        {{jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo, item.periodCode).periodName}}
+                        <span style="margin:0px 5px;">·</span>
+                        {{jsFn.getSubjectName(jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo, item.periodCode), item.subjectCode)}}
+                        <Icon type="ios-close" size="18" class="delete-subject-btn" @click="deleteSubject(index)" />
+                    </span>
+                    <Icon @click="addSubject" type="md-add-circle" title="添加科目" color="white" class="add-subject-icon" size="20" />
+                </div>
+                <div class="evaluation-question-main">
+                    <NoData style="margin-top:120px;" v-if="evaluationInfo.testPaper.length == 0" textContent="暂无科目,请添加科目"></NoData>
+                    <div class="create-type-wrap" v-if="evaluationInfo.testPaper.length > 0">
+                        <span>创建方式:</span>
+                        <RadioGroup v-model="evaluationInfo.testPaper[currentSubjectIndex].createType" style="margin-left:25px;" @on-change="setActiveTab">
+                            <Radio label="auto">自动组题</Radio>
+                            <Radio label="manual">手动挑题/卷</Radio>
+                            <Radio label="import">试卷导入</Radio>
+                        </RadioGroup>
+                    </div>
+                    <Tabs v-model="activeTab" type="card" class="question-main-tabs" v-if="evaluationInfo.testPaper.length > 0" name="createTest">
+                        <TabPane label="组题条件" name="auto" v-if="evaluationInfo.testPaper[currentSubjectIndex].createType == 'auto'" :index="1" tab="createTest">
+                            <AutoCreate :subjectCode="evaluationInfo.testPaper[currentSubjectIndex].subjectCode" :periodCode="evaluationInfo.testPaper[currentSubjectIndex].periodCode" @goToPreview="goToPreview" @autoQuestions="getAutoQuestions"></AutoCreate>
+                        </TabPane>
+                        <TabPane label="备选题目" name="manual" v-if="evaluationInfo.testPaper[currentSubjectIndex].createType == 'manual'" :index="2" tab="createTest">
+                            <ManualCreate :questionList="questionList" @goToPreview="goToPreview" @selectedQuestion="getSelectedQuestion"></ManualCreate>
+                        </TabPane>
+                        <TabPane label="导入说明" name="import" v-if="evaluationInfo.testPaper[currentSubjectIndex].createType == 'import'" :index="3" tab="createTest">
+                            <ImportCreate @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></ImportCreate>
+                        </TabPane>
+                        <TabPane label="试题预览" name="preview" :index="4" tab="createTest">
+                            <TeacherPreview :testPaper="evaluationInfo.testPaper[currentSubjectIndex]" :paperName="evaluationInfo.name"></TeacherPreview>
+                        </TabPane>
+                        <TabPane label="学生作答预览" name="student" :index="5" tab="createTest">
+                            <StudentPreview></StudentPreview>
+                        </TabPane>
+                    </Tabs>
+                </div>
+            </div>
         </div>
-      </div>
+        <Modal v-model="addSubjectStatus"
+               title="添加测试学科"
+               class-name="dark-iview-modal"
+               @on-ok="confirmAddSubject"
+               @on-cancel="cancelAddSubject">
+            <div v-for="(item,index) in $store.state.schoolBaseInfo.schoolBaseInfo.period" style="margin-top:10px;margin-bottom:30px;">
+                <div style="padding-bottom:6px;margin-bottom:6px;">
+                    <span>{{item.periodName}}</span>
+                </div>
+                <CheckboxGroup v-model="testSubjects[index]">
+                    <Checkbox v-for="(subjectItem,i) in item.subjects" :label="subjectItem.subjectCode" :disabled="checkIsDisabled(index,subjectItem.subjectCode)" @input="newAddSubject(index,i,subjectItem.subjectCode)">
+                        <span>{{subjectItem.subjectName}}</span>
+                    </Checkbox>
+                </CheckboxGroup>
+            </div>
+        </Modal>
+        <Modal v-model="goToManageStatus"
+               title="管理评测"
+               ok-text="是"
+               cancel-text="否"
+               @on-ok="confirmToManage">
+            <p>评测保存成功,是否跳转到管理评测页面查看?</p>
+        </Modal>
+        <Modal v-model="comfirmPreviewStatus"
+               ok-text="是"
+               cancel-text="否"
+               :mask-closable="false"
+               @on-ok="goToPreview"
+               @on-cancel="cancel">
+
+            <p style="font-size:18px;padding-top:15px;">自动组题成功,是否跳转到试题预览界面预览题目?</p>
+        </Modal>
     </div>
-    <Modal v-model="addSubjectStatus"
-           title="添加测试学科"
-           class-name="dark-iview-modal"
-           @on-ok="confirmAddSubject"
-           @on-cancel="cancelAddSubject">
-      <div v-for="(item,index) in $store.state.schoolBaseInfo.schoolBaseInfo.period" style="margin-top:10px;margin-bottom:30px;">
-        <div style="padding-bottom:6px;margin-bottom:6px;">
-          <span>{{item.periodName}}</span>
-        </div>
-        <CheckboxGroup v-model="testSubjects[index]">
-          <Checkbox v-for="(subjectItem,i) in item.subjects" :label="subjectItem.subjectCode" :disabled="checkIsDisabled(index,subjectItem.subjectCode)" @input="newAddSubject(index,i,subjectItem.subjectCode)">
-            <span>{{subjectItem.subjectName}}</span>
-          </Checkbox>
-        </CheckboxGroup>
-      </div>
-    </Modal>
-    <Modal v-model="goToManageStatus"
-           title="管理评测"
-           ok-text="是"
-           cancel-text="否"
-           @on-ok="confirmToManage">
-      <p>评测保存成功,是否跳转到管理评测页面查看?</p>
-    </Modal>
-    
-  </div>
 </template>
 <script>
-  import questions from '../evaluation/index/list.json'
-  import AutoCreate from './AutoCreate.vue'
-  import ManualCreate from './ManualCreate.vue'
-  import ImportCreate from './ImportCreate.vue'
-  import TeacherPreview from './TeacherPreview.vue'
-  import StudentPreview from './StudentPreview.vue'
-  import NoData from '@/common/NoData.vue'
-  import jsFn from '@/utils/js-fn.js'
-  export default {
-    components: {
-      NoData,
-      AutoCreate,
-      ManualCreate,
-      TeacherPreview,
-      StudentPreview,
-      ImportCreate
-    },
-    data() {
-      return {
-        jsFn,
-        goToManageStatus: false,
-        examInfo: {},
-        ruleValidate: {
-          name: [
-            { required: true, message: '评测名称不能为空!', trigger: 'change' }
-          ],
-          type: [
-            { required: true, message: '测试类型不能为空!', trigger: 'change' }
-          ],
-          publish: [
-            { required: true, message: '发布方式不能为空!', trigger: 'change' }
-          ]
+    import questions from '../evaluation/index/list.json'
+    import AutoCreate from './AutoCreate.vue'
+    import ManualCreate from './ManualCreate.vue'
+    import ImportCreate from './ImportCreate.vue'
+    import TeacherPreview from './TeacherPreview.vue'
+    import StudentPreview from './StudentPreview.vue'
+    import NoData from '@/common/NoData.vue'
+    import jsFn from '@/utils/js-fn.js'
+    export default {
+        components: {
+            NoData,
+            AutoCreate,
+            ManualCreate,
+            TeacherPreview,
+            StudentPreview,
+            ImportCreate
         },
-        demoLoginInfo: {
-            user: 'admin',
-            TEAMModelId: 'habook#0001',
-            school: '醍摩豆书院',
-            schoolCode: 'HBCN'
-        },
-        deleteIndex:-1,
-        testSubjects:[],
-        activeTab:'auto',
-        addSubjectStatus: false,
-        addSubjectBefore: [],
-        newAddSubjects:[],
-        questionList:[],
-        currentSubjectIndex: 0,
-        evaluationInfo: {
-          name: '',
-          target: [],
-          type: '',
-          publish: '',
-          publishTime: '',
-          testPaper: [
-            //{
-            //  periodName:'小学',
-            //  subjectName: '语文',
-            //  createType: 'auto',//不需要保存
-            //  filter: {},//前端用于区分创建评测的方式,以及创建的一些过滤条件,不需要保存
-            //  questions:[]
-            //}
-          ]
-        },
-        classroomList: [
-          '一年级一班',
-          '一年级二班',
-          '一年级三班'
-        ],
-        
-        typeList: [
-          {
-            value: '1',
-            label:'联考'
-          },
-          {
-            value: '2',
-            label:'段考'
-          },
-          {
-            value: '3',
-            label:'平常考'
-          },
-          {
-            value: '4',
-            label:'其他'
-          }
-        ],
-        publishList: [
-          {
-            value: '1',
-            label:'自动发布'
-          },
-          {
-            value: '2',
-            label:'手动发布'
-          }
-        ]
-      }
-    },
-    methods: {
-      confirmToManage() {
-        this.$router.push({
-          name:'manageEvaluation'
-        })
-      },
-      getDate(value, date) {
-        console.log(value)
-        console.log(date)
-      },
-      getImportQuestions(questions) {
-        if (this.evaluationInfo.testPaper[this.currentSubjectIndex].item != undefined) {
-          this.evaluationInfo.testPaper[this.currentSubjectIndex].item = [...questions, ...this.evaluationInfo.testPaper[this.currentSubjectIndex].item]
-        } else {
-          this.evaluationInfo.testPaper[this.currentSubjectIndex].item = [...questions]
-        }
-      },
-      getSelectedQuestion(data) {
-        if (this.evaluationInfo.testPaper[this.currentSubjectIndex].item == undefined) {
-          this.evaluationInfo.testPaper[this.currentSubjectIndex].item = []
-          this.evaluationInfo.testPaper[this.currentSubjectIndex].item.push(data.item)
-        } else {
-          this.evaluationInfo.testPaper[this.currentSubjectIndex].item.push(data.item)
-        }
-        console.log("index")
-        console.log(this.evaluationInfo.testPaper[this.currentSubjectIndex])
-      },
-      goToPreview() {
-        this.activeTab = 'preview'
-      },
-      deleteSubject(index) {
-        this.deleteIndex = index
-        this.$Modal.confirm({
-          title: '删除科目',
-          content: '确认删除' + this.evaluationInfo.testPaper[index].periodName + '·' + this.evaluationInfo.testPaper[index].subjectName + '吗?',
-          onOk: () => {
-            let periodIndex = -1
-            for (let i in this.$store.state.schoolBaseInfo.schoolBaseInfo.period) {
-              if (this.$store.state.schoolBaseInfo.schoolBaseInfo.period[i].periodCode == this.evaluationInfo.testPaper[index].periodCode) {
-                periodIndex = i
-              }
-            }
-            for (let i = 0; i < this.testSubjects[periodIndex].length; i++) {
-              if (this.evaluationInfo.testPaper[index].subjectCode == this.testSubjects[periodIndex][i]) {
-                this.testSubjects[periodIndex].splice(i,1)
-              }
-            }
-            this.evaluationInfo.testPaper.splice(this.deleteIndex, 1)
-            this.currentSubjectIndex = 0
-            this.deleteIndex = -1
-            this.$Message.success('删除成功!')
-          },
-          onCancel: () => {
-            this.deleteIndex = -1
-          },
-        })
-      },
-      newAddSubject(index, i,code) {
-        if (!this.checkIsDisabled(index, code)) {
-          let flag = true
-          for (let j = 0; j < this.newAddSubjects.length; j++) {
-            if (this.newAddSubjects[j].index == index && this.newAddSubjects[j].i == i) {
-              flag = false
-              this.newAddSubjects.splice(j, 1)
-              break
-            }
-          }
-          if (flag) {
-            this.newAddSubjects.push({
-              index,i
-            })
-          }
-        } else {
-          alert('disabled')
-        }
-      },
-      checkIsDisabled(index,code) {
-        if (this.addSubjectBefore[index] !== undefined) {
-          return this.addSubjectBefore[index].indexOf(code) !== -1
-        } else {
-          return false
-        }
-      },
-      inDevelopment() {
-        this.$Message.info('功能正在开发中,敬请期待!')
-      },
-      setActiveTab(data) {
-        this.activeTab = data
-      },
-      confirmAddSubject() {
-        for (let item of this.newAddSubjects) {
-          this.evaluationInfo.testPaper.push({
-            periodName: this.$store.state.schoolBaseInfo.schoolBaseInfo.period[item.index].periodName,
-            periodCode: this.$store.state.schoolBaseInfo.schoolBaseInfo.period[item.index].periodCode,
-            subjectName: this.$store.state.schoolBaseInfo.schoolBaseInfo.period[item.index].subjects[item.i].subjectName,
-            subjectCode: this.$store.state.schoolBaseInfo.schoolBaseInfo.period[item.index].subjects[item.i].subjectCode,
-            createType: 'auto',
-            score:100,
-            item: [],
-            filter: {}
-          })
-        }
-        this.newAddSubjects.length = 0
-        this.addSubjectBefore.length = 0
-      },
-      cancelAddSubject() {
-        [...this.testSubjects] = this.addSubjectBefore
-        this.addSubjectBefore.length = 0
-      },
-      getSchoolBaseInfo() {
-        this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(
-          (res) => {
-            if (res.code == 2) {
-              alert('数据为空!')
-            } else {
-              
-            }
-          },
-          (err) => {
-            alert('API error!')
-          }
-        )
-      },
-      selectSubject(index) {
-        this.currentSubjectIndex = index
-        this.activeTab = this.evaluationInfo.testPaper[index].createType
-      },
-      checkData() {
-        let flag = true
-         this.$refs.evaluationInfo.validate((valid) => {
-          if (!valid) {
-            flag = false
-          } 
-         })
-        return flag
-      },
-      handleData() {
-        this.evaluationInfo.schoolCode = this.demoLoginInfo.schoolCode
-        let requestData = {
-          name: this.evaluationInfo.name,
-          scopeCode: this.demoLoginInfo.TEAMModelId,
-          createTime: Date.parse(new Date())/1000,
-          target: this.evaluationInfo.target,
-          startTime: 0,
-          endTime: 0,
-          publish: this.evaluationInfo.publish,
-          type:this.evaluationInfo.type,
-        }
-        if (this.examInfo.id != undefined) {
-          requestData.id = this.examInfo.id
-        } else if (this.evaluationInfo.id != undefined) {
-          requestData.id = this.evaluationInfo.id
-        }
-        this.$api.learnActivity.SaveExamInfo(requestData).then(
-          res => {
-            if (res.error == null) {
-              this.examInfo = res.result.data
-              for (let index in this.evaluationInfo.testPaper) {
-                this.saveTestPaper(this.evaluationInfo.testPaper[index], index)
-              }
-              //this.$Message.success('保存成功!')
-              this.goToManageStatus = true
+        data() {
+            return {
+                jsFn,
+                comfirmPreviewStatus: false,
+                goToManageStatus: false,
+                examInfo: {},
+                ruleValidate: {
+                    name: [
+                        { required: true, message: '评测名称不能为空!', trigger: 'change' }
+                    ],
+                    type: [
+                        { required: true, message: '测试类型不能为空!', trigger: 'change' }
+                    ],
+                    publish: [
+                        { required: true, message: '发布方式不能为空!', trigger: 'change' }
+                    ]
+                },
+                demoLoginInfo: {
+                    user: 'admin',
+                    TEAMModelId: 'habook#0001',
+                    school: '醍摩豆书院',
+                    schoolCode: 'HBCN'
+                },
+                deleteIndex: -1,
+                testSubjects: [],
+                activeTab: 'auto',
+                addSubjectStatus: false,
+                addSubjectBefore: [],
+                newAddSubjects: [],
+                questionList: [],
+                currentSubjectIndex: 0,
+                evaluationInfo: {
+                    name: '',
+                    target: [],
+                    type: '',
+                    publish: '',
+                    startTime: 0,
+                    endTime: 0,
+                    testPaper: [
+                        //{
+                        //  periodName:'小学',
+                        //  subjectName: '语文',
+                        //  createType: 'auto',//不需要保存
+                        //  filter: {},//前端用于区分创建评测的方式,以及创建的一些过滤条件,不需要保存
+                        //  questions:[]
+                        //}
+                    ]
+                },
+                classroomList: [
+                    '一年级一班',
+                    '一年级二班',
+                    '一年级三班'
+                ],
 
-            } else {
-              this.$Message.error('API ERROR!')
+                typeList: [
+                    {
+                        value: '1',
+                        label: '联考'
+                    },
+                    {
+                        value: '2',
+                        label: '段考'
+                    },
+                    {
+                        value: '3',
+                        label: '平常考'
+                    },
+                    {
+                        value: '4',
+                        label: '其他'
+                    }
+                ],
+                publishList: [
+                    {
+                        value: '1',
+                        label: '自动发布'
+                    },
+                    {
+                        value: '2',
+                        label: '手动发布'
+                    }
+                ]
             }
-          },
-          err => {
+        },
+        methods: {
+            confirmToManage() {
+                this.$router.push({
+                    name: 'manageEvaluation'
+                })
+            },
+            getDate(value, date) {
+                this.evaluationInfo.startTime = new Date(value[0]).getTime()
+                this.evaluationInfo.endTime = new Date(value[1]).getTime()
+            },
+            getAutoQuestions(questions) {
+                if (this.evaluationInfo.testPaper[this.currentSubjectIndex].item != undefined) {
+                    this.evaluationInfo.testPaper[this.currentSubjectIndex].item = [...questions, ...this.evaluationInfo.testPaper[this.currentSubjectIndex].item]
+                } else {
+                    this.evaluationInfo.testPaper[this.currentSubjectIndex].item = [...questions]
+                }
+                this.comfirmPreviewStatus = true
+            },
+            getImportQuestions(questions) {
+                if (this.evaluationInfo.testPaper[this.currentSubjectIndex].item != undefined) {
+                    this.evaluationInfo.testPaper[this.currentSubjectIndex].item = [...questions, ...this.evaluationInfo.testPaper[this.currentSubjectIndex].item]
+                } else {
+                    this.evaluationInfo.testPaper[this.currentSubjectIndex].item = [...questions]
+                }
+            },
+            getSelectedQuestion(data) {
+                if (this.evaluationInfo.testPaper[this.currentSubjectIndex].item == undefined) {
+                    this.evaluationInfo.testPaper[this.currentSubjectIndex].item = []
+                    this.evaluationInfo.testPaper[this.currentSubjectIndex].item.push(data.item)
+                } else {
+                    this.evaluationInfo.testPaper[this.currentSubjectIndex].item.push(data.item)
+                }
+            },
+            goToPreview() {
+                this.activeTab = 'preview'
+            },
+            deleteSubject(index) {
+                this.deleteIndex = index
+                this.$Modal.confirm({
+                    title: '删除科目',
+                    content: '确认删除' + this.evaluationInfo.testPaper[index].periodName + '·' + this.evaluationInfo.testPaper[index].subjectName + '吗?',
+                    onOk: () => {
+                        let periodIndex = -1
+                        for (let i in this.$store.state.schoolBaseInfo.schoolBaseInfo.period) {
+                            if (this.$store.state.schoolBaseInfo.schoolBaseInfo.period[i].periodCode == this.evaluationInfo.testPaper[index].periodCode) {
+                                periodIndex = i
+                            }
+                        }
+                        for (let i = 0; i < this.testSubjects[periodIndex].length; i++) {
+                            if (this.evaluationInfo.testPaper[index].subjectCode == this.testSubjects[periodIndex][i]) {
+                                this.testSubjects[periodIndex].splice(i, 1)
+                            }
+                        }
+                        this.evaluationInfo.testPaper.splice(this.deleteIndex, 1)
+                        this.currentSubjectIndex = 0
+                        this.deleteIndex = -1
+                        this.$Message.success('删除成功!')
+                    },
+                    onCancel: () => {
+                        this.deleteIndex = -1
+                    },
+                })
+            },
+            newAddSubject(index, i, code) {
+                if (!this.checkIsDisabled(index, code)) {
+                    let flag = true
+                    for (let j = 0; j < this.newAddSubjects.length; j++) {
+                        if (this.newAddSubjects[j].index == index && this.newAddSubjects[j].i == i) {
+                            flag = false
+                            this.newAddSubjects.splice(j, 1)
+                            break
+                        }
+                    }
+                    if (flag) {
+                        this.newAddSubjects.push({
+                            index, i
+                        })
+                    }
+                } else {
+                    alert('disabled')
+                }
+            },
+            checkIsDisabled(index, code) {
+                if (this.addSubjectBefore[index] !== undefined) {
+                    return this.addSubjectBefore[index].indexOf(code) !== -1
+                } else {
+                    return false
+                }
+            },
+            inDevelopment() {
+                this.$Message.info('功能正在开发中,敬请期待!')
+            },
+            setActiveTab(data) {
+                this.activeTab = data
+            },
+            confirmAddSubject() {
+                for (let item of this.newAddSubjects) {
+                    this.evaluationInfo.testPaper.push({
+                        periodName: this.$store.state.schoolBaseInfo.schoolBaseInfo.period[item.index].periodName,
+                        periodCode: this.$store.state.schoolBaseInfo.schoolBaseInfo.period[item.index].periodCode,
+                        subjectName: this.$store.state.schoolBaseInfo.schoolBaseInfo.period[item.index].subjects[item.i].subjectName,
+                        subjectCode: this.$store.state.schoolBaseInfo.schoolBaseInfo.period[item.index].subjects[item.i].subjectCode,
+                        createType: 'auto',
+                        score: 100,
+                        item: [],
+                        filter: {}
+                    })
+                }
+                this.newAddSubjects.length = 0
+                this.addSubjectBefore.length = 0
+            },
+            cancelAddSubject() {
+                [...this.testSubjects] = this.addSubjectBefore
+                this.addSubjectBefore.length = 0
+            },
+            getSchoolBaseInfo() {
+                this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(
+                    (res) => {
+                        if (res.code == 2) {
+                            alert('数据为空!')
+                        } else {
+
+                        }
+                    },
+                    (err) => {
+                        alert('API error!')
+                    }
+                )
+            },
+            selectSubject(index) {
+                this.currentSubjectIndex = index
+                this.activeTab = this.evaluationInfo.testPaper[index].createType
+            },
+            checkData() {
+                let flag = true
+                this.$refs.evaluationInfo.validate((valid) => {
+                    if (!valid) {
+                        flag = false
+                    }
+                })
+                return flag
+            },
+            handleData() {
+                this.evaluationInfo.schoolCode = this.demoLoginInfo.schoolCode
+                let requestData = {
+                    name: this.evaluationInfo.name,
+                    scopeCode: this.demoLoginInfo.TEAMModelId,
+                    createTime: Date.parse(new Date()),
+                    target: this.evaluationInfo.target,
+                    startTime: this.evaluationInfo.startTime,
+                    endTime: this.evaluationInfo.endTime,
+                    publish: this.evaluationInfo.publish,
+                    type: this.evaluationInfo.type,
+                }
+                if (this.examInfo.id != undefined) {
+                    requestData.id = this.examInfo.id
+                } else if (this.evaluationInfo.id != undefined) {
+                    requestData.id = this.evaluationInfo.id
+                }
+                this.$api.learnActivity.SaveExamInfo(requestData).then(
+                    res => {
+                        if (res.error == null) {
+                            this.examInfo = res.result.data
+                            for (let index in this.evaluationInfo.testPaper) {
+                                this.saveTestPaper(this.evaluationInfo.testPaper[index], index)
+                            }
+                            //this.$Message.success('保存成功!')
+                            this.goToManageStatus = true
+
+                        } else {
+                            this.$Message.error('API ERROR!')
+                        }
+                    },
+                    err => {
 
-          }
-        )
-      },
-      saveTestPaper(testPaper, index) {
-        if (this.examInfo.id == undefined) {
-          this.saveEvaluation()
-        } else {
-          let requestData = {
-            id: testPaper.id == undefined ? null : testPaper.id,
-            scopeCode: this.examInfo.id,
-            schoolCode: this.demoLoginInfo.schoolCode,
-            subjectCode: testPaper.subjectCode,
-            periodCode: testPaper.periodCode,
-            item: testPaper.item,
-            score: testPaper.score
-          }
-          this.$api.learnActivity.SaveExamPaper(requestData).then(
-            res => {
-              if (res.error == null) {
-                this.evaluationInfo.testPaper[index].id = res.result.data.id
-              } else {
-                this.$Message.error('API ERROR!')
-              }
+                    }
+                )
             },
-            err => {
-              this.$Message.error('API ERROR!')
+            saveTestPaper(testPaper, index) {
+                if (this.examInfo.id == undefined) {
+                    this.saveEvaluation()
+                } else {
+                    let requestData = {
+                        id: testPaper.id == undefined ? null : testPaper.id,
+                        scopeCode: this.examInfo.id,
+                        schoolCode: this.demoLoginInfo.schoolCode,
+                        subjectCode: testPaper.subjectCode,
+                        periodCode: testPaper.periodCode,
+                        item: testPaper.item,
+                        score: testPaper.score
+                    }
+                    this.$api.learnActivity.SaveExamPaper(requestData).then(
+                        res => {
+                            if (res.error == null) {
+                                this.evaluationInfo.testPaper[index].id = res.result.data.id
+                            } else {
+                                this.$Message.error('API ERROR!')
+                            }
+                        },
+                        err => {
+                            this.$Message.error('API ERROR!')
+                        }
+                    )
+                }
+            },
+            saveEvaluation() {
+                if (this.checkData()) {
+                    this.handleData()
+
+                } else {
+                    this.$Message.error('请完善基础信息,再保存!')
+                }
+
+            },
+            addSubject() {
+                [...this.addSubjectBefore] = this.testSubjects
+                this.addSubjectStatus = true
+            },
+            cancel() {
+
             }
-          )
-        }
-      },
-      saveEvaluation() {
-        if (this.checkData()) {
-          this.handleData()
-          
-        } else {
-          this.$Message.error('请完善基础信息,再保存!')
-        }
-        
-      },
-      addSubject() {
-        [...this.addSubjectBefore] = this.testSubjects
-        this.addSubjectStatus = true
-      },
-      cancel() {
+        },
+        created() {
+            let routerData = this.$route.params.evaluationInfo
+            if (routerData !== undefined) {
+                for (let i = 0; i < routerData.testPaper.length; i++) {
+                    routerData.testPaper[i].createType = 'auto'
+                }
+                this.evaluationInfo = routerData
+                this.activeTab = 'preview'
+            }
+            this.getSchoolBaseInfo()
+            this.questionList = questions.result.data
+        },
+        mounted() {
 
-      }
-    },
-    created() {
-      let routerData = this.$route.params.evaluationInfo
-      if (routerData !== undefined) {
-        for (let i = 0; i < routerData.testPaper.length; i++) {
-          routerData.testPaper[i].createType = 'auto'
         }
-        this.evaluationInfo = routerData
-        this.activeTab = 'preview'
-      }
-      //this.evaluationInfo = routerData == undefined ? this.evaluationInfo : routerData
-      console.log(this.evaluationInfo)
-      this.getSchoolBaseInfo()
-      this.questionList = questions.result.data
-    },
-    mounted() {
-      
     }
-  }
 </script>
 <style scoped lang="less">
-  @import "./CreateEvaluation.less";
+    @import "./CreateEvaluation.less";
 </style>
 <style>
-  .evaluation-attr-form .ivu-input, .evaluation-attr-form .ivu-select-selection {
-    background: none;
-    color: white;
-    border-color: #999999;
-    font-size:16px;
-  }
+    .evaluation-attr-form .ivu-input, .evaluation-attr-form .ivu-select-selection {
+        background: none;
+        color: white;
+        border-color: #999999;
+        font-size: 16px;
+    }
 
-  .evaluation-attr-form .ivu-input {
-    /*border:none;
+    .evaluation-attr-form .ivu-input {
+        /*border:none;
     border-bottom:1px solid #424242;
     border-radius:0px;*/
-  }
+    }
+
+    .evaluation-attr-wrap .ivu-form .ivu-form-item-label {
+        color: #a5a5a5;
+    }
 
-  .evaluation-attr-wrap .ivu-form .ivu-form-item-label {
-    color: #a5a5a5;
-  }
+    .evaluation-question-main .ivu-tabs-bar {
+        border-color: #404040;
+    }
 
-  .evaluation-question-main .ivu-tabs-bar {
-    border-color: #404040;
-  }
+    .evaluation-question-main .ivu-tabs.ivu-tabs-card > .ivu-tabs-bar .ivu-tabs-tab {
+        border: none;
+        background-color: #303030;
+        color: white;
+        margin-right: 2px;
+    }
 
-  .evaluation-question-main .ivu-tabs.ivu-tabs-card > .ivu-tabs-bar .ivu-tabs-tab {
-    border: none;
-    background-color: #303030;
-    color: white;
-    margin-right: 2px;
-  }
+    .evaluation-question-main .ivu-tabs.ivu-tabs-card > .ivu-tabs-bar .ivu-tabs-tab-active {
+        background-color: #404040;
+        color: white;
+        font-weight: 600;
+    }
 
-  .evaluation-question-main .ivu-tabs.ivu-tabs-card > .ivu-tabs-bar .ivu-tabs-tab-active {
-    background-color: #404040;
-    color: white;
-    font-weight:600;
-  }
-  .evaluation-question-main .ivu-tabs .ivu-tabs-content-animated {
-    height:100%;
-  }
-  .evaluation-question-main .ivu-tabs-bar {
-    margin-bottom:0px;
-  }
+    .evaluation-question-main .ivu-tabs .ivu-tabs-content-animated {
+        height: 100%;
+    }
+
+    .evaluation-question-main .ivu-tabs-bar {
+        margin-bottom: 0px;
+    }
 </style> 

+ 16 - 18
TEAMModelOS/ClientApp/src/view/learnactivity/ExamPaperAnalysis.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <div class="dark-iview-table exam-analysis-wrap">
     <div class="exam-analysis-title-wrap">
       <span class="exam-analysis-title">试卷整体分析</span>
@@ -51,7 +51,7 @@
             {{item.score}}({{item.scorePercent}}%)
           </div>
         </div>
-        
+
       </div>
       <div class="question-diff-distribution">
         <div class="exam-analysis-title-wrap">
@@ -98,7 +98,7 @@
         type: Object,
         default: () => {
           return {
-            item:[]
+            item: []
           }
         }
       }
@@ -110,22 +110,22 @@
           {
             title: '序号',
             slot: 'index',
-            align:'center'
+            align: 'center'
           },
           {
             title: '知识点',
             key: 'point',
-            align:'center'
+            align: 'center'
           },
           {
             title: '分值(占比)',
             slot: 'score',
-            align:'center'
+            align: 'center'
           },
           {
             title: '对应题号',
             slot: 'questionIndex',
-            align:'center'
+            align: 'center'
           }
         ],
         option: {
@@ -133,13 +133,13 @@
             orient: 'vertical', // 'vertical'
             x: 'right', // 'center' | 'left' | {number},
             y: '0', // 'center' | 'bottom' | {number}
-            padding: [10, 0, 10, 5],    // [5, 10, 15, 20]
+            padding: [10, 0, 10, 5], // [5, 10, 15, 20]
             itemGap: 20,
-            textStyle: { color: '#c3cad9' },
+            textStyle: { color: '#c3cad9' }
           },
           tooltip: {
             trigger: 'item',
-            formatter: "{b} : {c} ({d}%)"
+            formatter: '{b} : {c} ({d}%)'
           },
 
           series: [{
@@ -150,11 +150,11 @@
             selectedOffset: 10,
             clockwise: true,
             center: ['45%', '50%'],
-            color: ['#10abe7', '#E8BE15', '#F19300', '#EB5E00', '#D30000'], 
+            color: ['#10abe7', '#E8BE15', '#F19300', '#EB5E00', '#D30000'],
             data: [
               {
                 value: 0,
-                name:'容易'
+                name: '容易'
               }
             ],
             roseType: false,
@@ -168,8 +168,8 @@
               borderColor: '#FFF',
               normal: {
                 borderWidth: '0',
-                borderColor: 'rgba(0,0,0,2)',
-              },
+                borderColor: 'rgba(0,0,0,2)'
+              }
             }
           }]
         }
@@ -181,8 +181,6 @@
       },
       drawDiffChart() {
         this.option.series[0].data = this.examAnalysisData.difficult.count
-        console.log('option')
-        console.log(this.option)
         this.myPie.setOption(this.option)
       },
       getQuestionLabel(key) {
@@ -212,7 +210,7 @@
       this.myPie = this.$echarts.init(document.getElementById('exam-diff-chart'))
     },
     create() {
-      
+
     }
   }
 </script>
@@ -232,4 +230,4 @@
     width:400px;
     height:400px;
   }*/
-</style>
+</style>

+ 7 - 8
TEAMModelOS/ClientApp/src/view/learnactivity/ImportCreate.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <div style="height: 100%; background: #404040;" class="import-create-wrap">
     <vuescroll>
       <h2 class="import-title">
@@ -53,11 +53,11 @@
     data() {
       return {
         disabled: false,
-        comfirmPreviewStatus:false,
-        comfirmSyncStatus:false,
+        comfirmPreviewStatus: false,
+        comfirmSyncStatus: false,
         wordPreviewStatus: false,
         srcdoc: '',
-        importQuestions:[]
+        importQuestions: []
       }
     },
     methods: {
@@ -98,7 +98,7 @@
 
       },
       beforeUpload() {
-        //this.$Message.success('上传之前!')
+        // this.$Message.success('上传之前!')
         this.disabled = true
       },
       uploadSuccess(response, file, fileList) {
@@ -110,8 +110,7 @@
         } else {
           this.$Message.error('文档解析失败!')
         }
-        
-      },
+      }
     },
     computed: {
       headers() {
@@ -149,4 +148,4 @@
     }
   }
 
-</style>
+</style>

+ 137 - 129
TEAMModelOS/ClientApp/src/view/learnactivity/ManageEvaluation.less

@@ -6,164 +6,172 @@
 @second-fontSize: 16px;
 
 .manage-evaluation-container {
-  width: 100%;
-  height: 100%;
-  color: white;
-  display: flex;
-  flex-direction: row;
-
-  .evaluation-list-wrap {
-    width: 350px;
-    height: 100%;
-    border-right: 1px solid @borderColor;
-    padding-left: 15px;
-  }
-
-  .evaluation-detail-wrap {
-    width: ~"calc(100% - 350px)";
-    height: 100%;
-    padding-left: 15px;
-  }
-}
-
-.evaluation-list-wrap {
-  .evaluation-list-title {
     width: 100%;
-    height: 45px;
-    line-height: 45px;
-    border-bottom: 1px solid @borderColor;
-    color: @second-textColor;
-  }
+    height: 100%;
+    display: flex;
+    flex-direction: row;
 
-  .evaluation-list-main {
-    width: 100%;
-    height: ~"calc(100% - 45px)";
+    .evaluation-list-wrap {
+        width: 350px;
+        height: 100%;
+        border-right: 1px solid @borderColor;
+        padding-left: 15px;
+        color: white;
+    }
 
-    .evaluation-item {
-      border-bottom: 1px solid @borderColor;
-      padding: 10px 10px 10px 0px;
-      cursor: pointer;
+    .evaluation-detail-wrap {
+        width: ~"calc(100% - 350px)";
+        height: 100%;
+        padding-left: 15px;
+    }
+}
 
-      .evaluation-name {
-        font-size: 20px;
-      }
+.test-paper-analysis {
+    color: aqua;
+    cursor: pointer;
+}
 
-      .evaluation-type {
+.evaluation-list-wrap {
+    .evaluation-list-title {
+        width: 100%;
+        height: 45px;
+        line-height: 45px;
+        border-bottom: 1px solid @borderColor;
         color: @second-textColor;
-      }
     }
 
-    .evaluation-item-active {
-      background-image: linear-gradient(90deg, rgba(30, 30, 30, 0) 0%, rgba(110, 110, 110, 0.2) 50%, rgba(110, 110, 110, 0.4) 100%);
-    }
-  }
-}
-.evaluation-detail-wrap {
+    .evaluation-list-main {
+        width: 100%;
+        height: ~"calc(100% - 45px)";
 
-  .evaluation-detail-bar {
-    width: 100%;
-    height: 45px;
-    line-height: 45px;
-    border-bottom: 1px solid @borderColor;
-    color: @second-textColor;
+        .evaluation-item {
+            border-bottom: 1px solid @borderColor;
+            padding: 10px 10px 10px 0px;
+            cursor: pointer;
 
-    .edit-evaluation {
-      float: right;
-      margin-right: 45px;
-      display: inline-block;
-      cursor: pointer;
-      color:white;
-    }
+            .evaluation-name {
+                font-size: 20px;
+            }
 
-    .edit-evaluation:hover{
-      color:aqua;
-    }
-    .evalustion-bar-item {
-      margin-right: 30px;
-      display: inline-block;
-      cursor: pointer;
-      line-height: 38px;
-    }
+            .evaluation-type {
+                color: @second-textColor;
+                margin-top: 5px
+            }
+        }
 
-    .evalustion-bar-item-active {
-      color: white;
-      border-bottom: 2px solid white;
+        .evaluation-item-active {
+            background-image: linear-gradient(90deg, rgba(30, 30, 30, 0) 0%, rgba(110, 110, 110, 0.2) 50%, rgba(110, 110, 110, 0.4) 100%);
+        }
     }
-  }
-
-  .evaluation-base-info {
-    width: 100%;
-    height: ~"calc(100% - 45px)";
-    display: flex;
-    flex-direction: row;
+}
 
-    .evalustion-base-attr {
-      width: 350px;
-      height: 100%;
-      border-right: 1px solid @borderColor;
+.evaluation-detail-wrap {
 
-      .evalustion-base-attr-header {
+    .evaluation-detail-bar {
+        width: 100%;
         height: 45px;
         line-height: 45px;
-        color: @second-textColor;
         border-bottom: 1px solid @borderColor;
-        margin-bottom: 25px;
-      }
+        color: @second-textColor;
 
-      .evaluation-attr-form {
-        margin-right: 15px;
-        color: white;
-      }
+        .edit-evaluation {
+            float: right;
+            margin-right: 45px;
+            display: inline-block;
+            cursor: pointer;
+            color: white;
+        }
+
+        .edit-evaluation:hover {
+            color: aqua;
+        }
+
+        .evalustion-bar-item {
+            margin-right: 30px;
+            display: inline-block;
+            cursor: pointer;
+            line-height: 38px;
+        }
+
+        .evalustion-bar-item-active {
+            color: white;
+            border-bottom: 2px solid white;
+        }
     }
 
-    .evaluation-test-paper {
-      width: ~"calc(100% - 350px)";
-      height: 100%;
-      padding-left: 15px;
-
-      .evaluation-test-paper-header {
-        height: 45px;
-        line-height: 45px;
-        color: @second-textColor;
-        border-bottom: 1px solid @borderColor;
-      }
+    .evaluation-base-info {
+        width: 100%;
+        height: ~"calc(100% - 45px)";
+        display: flex;
+        flex-direction: row;
+
+        .evalustion-base-attr {
+            width: 350px;
+            height: 100%;
+            border-right: 1px solid @borderColor;
+
+            .evalustion-base-attr-header {
+                height: 45px;
+                line-height: 45px;
+                color: @second-textColor;
+                border-bottom: 1px solid @borderColor;
+                margin-bottom: 25px;
+            }
+
+            .evaluation-attr-form {
+                margin-right: 15px;
+                /*color: white;*/
+            }
+        }
+
+        .evaluation-test-paper {
+            width: ~"calc(100% - 350px)";
+            height: 100%;
+            padding-left: 15px;
+
+            .evaluation-test-paper-header {
+                height: 45px;
+                line-height: 45px;
+                color: @second-textColor;
+                border-bottom: 1px solid @borderColor;
+            }
+        }
     }
-  }
 }
 
 .subject-item {
-  display: inline-block;
-  margin-right: 15px;
-  color: @second-textColor;
-  cursor: pointer;
-  line-height: 40px;
-  min-width: 50px;
-  font-size: 15px;
-  text-align: center;
-  margin-left:15px;
-
+    display: inline-block;
+    margin-right: 15px;
+    color: @second-textColor;
+    cursor: pointer;
+    line-height: 40px;
+    min-width: 50px;
+    font-size: 15px;
+    text-align: center;
+    margin-left: 15px;
 }
 
 .subject-item-active {
-  color: @primary-textColor;
-  border-bottom: 2px solid white;
-  font-weight: 500;
-
+    color: @primary-textColor;
+    border-bottom: 2px solid white;
+    font-weight: 500;
 }
+
 .test-paper-detail {
-  width: 100%;
-  height: ~"calc(100% - 45px)";
-  color: white;
-  padding-top: 15px;
-
-  .test-paper-info {
-    margin-bottom: 15px;
-  }
+    width: 100%;
+    height: ~"calc(100% - 45px)";
+    color: white;
+    padding-top: 15px;
+
+    .test-paper-info {
+        margin-bottom: 15px;
+    }
 }
+
 .question-type-count {
-  color: white;
-  font-size: 16px;
-  display: inline-block;
-  margin-top:15px;
-  margin-bottom:5px;
-}
+    color: white;
+    font-size: 16px;
+    display: inline-block;
+    margin-top: 15px;
+    margin-bottom: 5px;
+}

+ 527 - 355
TEAMModelOS/ClientApp/src/view/learnactivity/ManageEvaluation.vue

@@ -1,379 +1,551 @@
 <template>
-  <div class="manage-evaluation-container">
-    <div class="evaluation-list-wrap">
-      <div class="evaluation-list-title">
-        评测列表
-      </div>
-      <div class="evaluation-list-main">
-        <vuescroll>
-          <div :class="index == avtiveEvaluationIndex ? 'evaluation-item evaluation-item-active':'evaluation-item'" v-for="(item,index) in evaluationList" @click="selectEvaluation(index)">
-            <p class="evaluation-name">{{item.name}}</p>
-            <p class="evaluation-type">
-              <Icon type="ios-cube" color="#a5a5a5" style="margin-right:10px;" size="16" />
-              <span>评测类型:段考</span>
-            </p>
-            <p class="evaluation-type">
-              <Icon type="ios-funnel" color="#a5a5a5" style="margin-right:10px;" size="16" />
-              <span>创建时间:{{formatDate(item.createTime)}}</span>
-            </p>
-          </div>
-        </vuescroll>
-      </div>
+    <div class="manage-evaluation-container">
+        <div class="evaluation-list-wrap">
+            <div class="evaluation-list-title">
+                评测列表
+            </div>
+            <div class="evaluation-list-main">
+                <vuescroll>
+                    <div :class="index == avtiveEvaluationIndex ? 'evaluation-item evaluation-item-active':'evaluation-item'" v-for="(item,index) in evaluationList" @click="selectEvaluation(index)">
+                        <p class="evaluation-name">{{item.name}}</p>
+                        <p class="evaluation-type">
+                            <Icon type="ios-cube" color="#a5a5a5" style="margin-right:10px;" size="16" />
+                            <span>评测类型:段考</span>
+                        </p>
+                        <p class="evaluation-type">
+                            <Icon type="ios-funnel" color="#a5a5a5" style="margin-right:10px;" size="16" />
+                            <span>创建时间:{{formatDate(item.createTime)}}</span>
+                        </p>
+                    </div>
+                </vuescroll>
+            </div>
 
-    </div>
-    <div class="evaluation-detail-wrap">
-      <div class="evaluation-detail-bar">
-        <span :class="currentBraIndex == 0 ? 'evalustion-bar-item evalustion-bar-item-active':'evalustion-bar-item'" @click="selectBar(0)">评测信息</span>
-        <span :class="currentBraIndex == 1 ? 'evalustion-bar-item evalustion-bar-item-active':'evalustion-bar-item'" @click="selectBar(1)">活动数据</span>
-        <span class="edit-evaluation" @click="editEvaluation"><Icon type="ios-create-outline" size="20" />编辑信息</span>
-        <span class="edit-evaluation"><Icon type="ios-send" size="20" />发布评测</span>
-      </div>
-      <div class="evaluation-base-info">
-        <div class="evalustion-base-attr dark-iview-input dark-iview-select">
-          <div class="evalustion-base-attr-header">
-            基础信息
-          </div>
-          <Form ref="evaluationInfo" :model="evaluationList[avtiveEvaluationIndex]" label-position="top" class="evaluation-attr-form" label-colon :rules="ruleValidate" v-if="evaluationList.length > 0">
-            <FormItem label="评测名称" prop="name">
-              <Input v-model="evaluationList[avtiveEvaluationIndex].name"></Input>
-            </FormItem>
-            <FormItem label="测试类型" prop="type">
-              <Select v-model="evaluationList[avtiveEvaluationIndex].type">
-                <Option v-for="(item,index) in typeList" :value="item.value" :key="index">{{ item.label }}</Option>
-              </Select>
-            </FormItem>
-            <FormItem label="发布方式" prop="publish">
-              <Select v-model="evaluationList[avtiveEvaluationIndex].publish">
-                <Option v-for="(item,index) in publishList" :value="item.value" :key="index">{{ item.label }}</Option>
-              </Select>
-            </FormItem>
-            <FormItem label="施测对象">
-              <Select v-model="evaluationList[avtiveEvaluationIndex].target" multiple>
-                <Option v-for="(item,index) in classroomList" :value="item" :key="index">{{ item }}</Option>
-              </Select>
-            </FormItem>
-            <FormItem label="施测时间">
-              <DatePicker type="daterange" split-panels placeholder="请选择发布时间" style="width:100%" @on-change="getDate"></DatePicker>
-            </FormItem>
-          </Form>
         </div>
-        <div class="evaluation-test-paper">
-          <div class="evaluation-test-paper-header">
-            <span>测试科目</span>
-            <span v-if="examPaperList.length > 0" v-for="(item,index) in examPaperList" :class="index == currentSubjectIndex ? 'subject-item subject-item-active':'subject-item'" @click="selectSubject(index)">
-              {{jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo, item.periodCode).periodName}}
-              <span style="margin:0px 2px;">·</span>
-              {{jsFn.getSubjectName(jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo, item.periodCode), item.subjectCode)}}
-            </span>
-          </div>
-          <div class="test-paper-detail">
-            <vuescroll>
-              <div class="test-paper-info" v-if="examPaperList.length > 0">
-                <h3 style="text-align:center;margin-bottom:15px;">{{evaluationList[avtiveEvaluationIndex].name}}<span style="color:aqua;">{{ '   (' + jsFn.getSubjectName($store.state.schoolBaseInfo.schoolBaseInfo, examPaperList[currentSubjectIndex].subjectCode)+ ')'}}</span></h3>
-                <Row class="dark-iview-inputnumber">
-                  <Col :xs="24" :sm="24" :md="12" :lg="6">
-                  <span>总分:</span>
-                  <InputNumber :max="1000" :min="1" v-model="examPaperList[currentSubjectIndex].score" size="small"></InputNumber>
-                  </Col>
-                  <Col :xs="24" :sm="24" :md="12" :lg="6">
-                  <span>整体难度:</span>
-                  <span>0.6</span>
-                  </Col>
-                  <Col :xs="24" :sm="24" :md="12" :lg="6">
-                  <span>题量:</span>
-                  <span>{{examPaperList[currentSubjectIndex].item.length}}</span>
-                  </Col>
-                </Row>
-              </div>
-              <div class="question-type-scope" v-if="groupQuestion.Single != undefined">
-                <span class="question-type-count">{{getOrder('Single')}}单选题(共{{groupQuestion.Single.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Single" :config="questionConfig"></QuestionList>
-              </div>
-              <div class="question-type-scope" v-if="groupQuestion.Multiple != undefined">
-                <span class="question-type-count">{{getOrder('Multiple')}}多选题(共{{groupQuestion.Multiple.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Multiple" :config="questionConfig"></QuestionList>
-              </div>
-              <div class="question-type-scope" v-if="groupQuestion.Complete != undefined">
-                <span class="question-type-count">{{getOrder('Complete')}}填空题(共{{groupQuestion.Complete.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Complete" :config="questionConfig"></QuestionList>
-              </div>
-              <div class="question-type-scope" v-if="groupQuestion.Judge != undefined">
-                <span class="question-type-count">{{getOrder('Judge')}}判断题(共{{groupQuestion.Judge.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Judge" :config="questionConfig"></QuestionList>
-              </div>
-              <div class="question-type-scope" v-if="groupQuestion.Subjective != undefined">
-                <span class="question-type-count">{{getOrder('Subjective')}}问答题(共{{groupQuestion.Subjective.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Subjective" :config="questionConfig"></QuestionList>
-              </div>
-              <div class="question-type-scope" v-if="groupQuestion.Compose != undefined">
-                <span class="question-type-count">{{getOrder('Compose')}}综合题(共{{groupQuestion.Compose.length}}题)</span>
-                <QuestionList :questions="groupQuestion.Compose" :config="questionConfig"></QuestionList>
-              </div>
-              <NoData v-if="examPaperList.length == 0" style="margin-top:50px;"></NoData>
-            </vuescroll>
-          </div>
+        <div class="evaluation-detail-wrap">
+            <div class="evaluation-detail-bar">
+                <span :class="currentBraIndex == 0 ? 'evalustion-bar-item evalustion-bar-item-active':'evalustion-bar-item'" @click="selectBar(0)">评测信息</span>
+                <span :class="currentBraIndex == 1 ? 'evalustion-bar-item evalustion-bar-item-active':'evalustion-bar-item'" @click="selectBar(1)">活动数据</span>
+                <span class="edit-evaluation" @click="editEvaluation"><Icon type="ios-create-outline" size="20" />编辑信息</span>
+                <span class="edit-evaluation"><Icon type="ios-send" size="20" />发布评测</span>
+            </div>
+            <div :class="currentBraIndex == 0 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="currentBraIndex == 0">
+                <div class="evalustion-base-attr dark-iview-input dark-iview-select">
+                    <div class="evalustion-base-attr-header">
+                        基础信息
+                    </div>
+                    <Form ref="evaluationInfo" :model="evaluationList[avtiveEvaluationIndex]" label-position="top" class="evaluation-attr-form" label-colon :rules="ruleValidate" v-if="evaluationList.length > 0">
+                        <FormItem label="评测名称" prop="name">
+                            <Input v-model="evaluationList[avtiveEvaluationIndex].name"></Input>
+                        </FormItem>
+                        <FormItem label="测试类型" prop="type">
+                            <Select v-model="evaluationList[avtiveEvaluationIndex].type">
+                                <Option v-for="(item,index) in typeList" :value="item.value" :key="index">{{ item.label }}</Option>
+                            </Select>
+                        </FormItem>
+                        <FormItem label="发布方式" prop="publish">
+                            <Select v-model="evaluationList[avtiveEvaluationIndex].publish">
+                                <Option v-for="(item,index) in publishList" :value="item.value" :key="index">{{ item.label }}</Option>
+                            </Select>
+                        </FormItem>
+                        <FormItem label="施测对象">
+                            <Select v-model="evaluationList[avtiveEvaluationIndex].target" multiple>
+                                <Option v-for="(item,index) in classroomList" :value="item" :key="index">{{ item }}</Option>
+                            </Select>
+                        </FormItem>
+                        <FormItem label="施测时间">
+                            <DatePicker type="daterange" v-model="myDate" split-panels placeholder="请选择发布时间" style="width:100%" @on-change="getDate"></DatePicker>
+                        </FormItem>
+                    </Form>
+                </div>
+                <div class="evaluation-test-paper">
+                    <div class="evaluation-test-paper-header">
+                        <span>测试科目</span>
+                        <span v-if="examPaperList.length > 0" v-for="(item,index) in examPaperList" :class="index == currentSubjectIndex ? 'subject-item subject-item-active':'subject-item'" @click="selectSubject(index)">
+                            {{jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo, item.periodCode).periodName}}
+                            <span style="margin:0px 2px;">·</span>
+                            {{jsFn.getSubjectName(jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo, item.periodCode), item.subjectCode)}}
+                        </span>
+                    </div>
+                    <div class="test-paper-detail">
+                        <vuescroll>
+                            <div class="test-paper-info" v-if="examPaperList.length > 0">
+                                <h3 style="text-align:center;margin-bottom:15px;">{{evaluationList[avtiveEvaluationIndex].name}}<span style="color:aqua;">{{ '   (' + jsFn.getSubjectName($store.state.schoolBaseInfo.schoolBaseInfo, examPaperList[currentSubjectIndex].subjectCode)+ ')'}}</span></h3>
+                                <Row class="dark-iview-inputnumber">
+                                    <Col :xs="24" :sm="24" :md="12" :lg="6">
+                                    <span>总分:</span>
+                                    <InputNumber :max="1000" :min="1" v-model="examPaperList[currentSubjectIndex].score" size="small"></InputNumber>
+                                    </Col>
+                                    <Col :xs="24" :sm="24" :md="12" :lg="6">
+                                    <span>整体难度:</span>
+                                    <span>0.6</span>
+                                    </Col>
+                                    <Col :xs="24" :sm="24" :md="12" :lg="6">
+                                    <span>题量:</span>
+                                    <span>{{examPaperList[currentSubjectIndex].item.length}}</span>
+                                    </Col>
+                                    <Col :xs="24" :sm="24" :md="12" :lg="6">
+                                    <span class="test-paper-analysis" @click="showAnalysis"><Icon type="md-stats" style="margin-right:5px;" />试卷分析</span>
+                                    </Col>
+                                </Row>
+                            </div>
+                            <div class="question-type-scope" v-if="groupQuestion.Single != undefined">
+                                <span class="question-type-count">{{getOrder('Single')}}单选题(共{{groupQuestion.Single.length}}题)</span>
+                                <QuestionList :questions="groupQuestion.Single" :config="questionConfig"></QuestionList>
+                            </div>
+                            <div class="question-type-scope" v-if="groupQuestion.Multiple != undefined">
+                                <span class="question-type-count">{{getOrder('Multiple')}}多选题(共{{groupQuestion.Multiple.length}}题)</span>
+                                <QuestionList :questions="groupQuestion.Multiple" :config="questionConfig"></QuestionList>
+                            </div>
+                            <div class="question-type-scope" v-if="groupQuestion.Complete != undefined">
+                                <span class="question-type-count">{{getOrder('Complete')}}填空题(共{{groupQuestion.Complete.length}}题)</span>
+                                <QuestionList :questions="groupQuestion.Complete" :config="questionConfig"></QuestionList>
+                            </div>
+                            <div class="question-type-scope" v-if="groupQuestion.Judge != undefined">
+                                <span class="question-type-count">{{getOrder('Judge')}}判断题(共{{groupQuestion.Judge.length}}题)</span>
+                                <QuestionList :questions="groupQuestion.Judge" :config="questionConfig"></QuestionList>
+                            </div>
+                            <div class="question-type-scope" v-if="groupQuestion.Subjective != undefined">
+                                <span class="question-type-count">{{getOrder('Subjective')}}问答题(共{{groupQuestion.Subjective.length}}题)</span>
+                                <QuestionList :questions="groupQuestion.Subjective" :config="questionConfig"></QuestionList>
+                            </div>
+                            <div class="question-type-scope" v-if="groupQuestion.Compose != undefined">
+                                <span class="question-type-count">{{getOrder('Compose')}}综合题(共{{groupQuestion.Compose.length}}题)</span>
+                                <QuestionList :questions="groupQuestion.Compose" :config="questionConfig"></QuestionList>
+                            </div>
+                            <NoData v-if="examPaperList.length == 0" style="margin-top:50px;"></NoData>
+                        </vuescroll>
+                    </div>
+                </div>
+            </div>
+            <div :class="currentBraIndex == 1 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="currentBraIndex == 1">
+                <h2 style="text-align:center;margin-top:100px;color:#aaaaaa;width:100%;font-size:25px;">学生作答数据分析</h2>
+            </div>
         </div>
-      </div>
+        <Modal v-model="editEvaluationStatus"
+               title="编辑评测"
+               @on-ok="confirmEdit">
+            <p>即将跳转到评测编辑页面?</p>
+        </Modal>
+        <Modal v-model="examAnalysisStatus"
+               title="试卷分析"
+               class-name="dark-iview-modal"
+               @on-visible-change="drawPie"
+               width="800px">
+            <ExamPaperAnalysis ref="examPaperAnalysis" :examAnalysisData="examAnalysisData"></ExamPaperAnalysis>
+        </Modal>
     </div>
-    <Modal v-model="editEvaluationStatus"
-           title="编辑评测"
-           @on-ok="confirmEdit"
-           @on-cancel="cancelEdit">
-      <p>即将跳转到评测编辑页面?</p>
-    </Modal>
-  </div>
 </template>
 <script>
-  import QuestionList from '@/components/learnactivity/QuestionList.vue'
-  import NoData from '@/common/NoData.vue'
-  import jsFn from '@/utils/js-fn.js'
-  export default {
-    components: {
-      QuestionList,
-      NoData
-    },
-    data() {
-      return {
-        editEvaluationStatus:false,
-        questionConfig: {
-          showScore: true
-        },
-        jsFn,
-        groupQuestion: {},
-        currentSubjectIndex:0,
-        ruleValidate: {
-          name: [
-            { required: true, message: '评测名称不能为空!', trigger: 'change' }
-          ],
-          type: [
-            { required: true, message: '测试类型不能为空!', trigger: 'change' }
-          ],
-          publish: [
-            { required: true, message: '发布方式不能为空!', trigger: 'change' }
-          ]
+    import QuestionList from '@/components/learnactivity/QuestionList.vue'
+    import ExamPaperAnalysis from './ExamPaperAnalysis.vue'
+    import NoData from '@/common/NoData.vue'
+    import jsFn from '@/utils/js-fn.js'
+    export default {
+        components: {
+            QuestionList,
+            NoData,
+            ExamPaperAnalysis
         },
-        currentBraIndex:0,
-        avtiveEvaluationIndex: 0,
-        evaluationList: [],
-        examPaperList:[],
-        demoLoginInfo: {
-            user: 'admin',
-            TEAMModelId: 'habook#0001',
-            school: '醍摩豆书院',
-            schoolCode: 'HBCN'
+        data() {
+            return {
+                editEvaluationStatus: false,
+                questionConfig: {
+                    showScore: true
+                },
+                examAnalysisData: {
+                    whole: {},
+                    question: {},
+                    difficult: {},
+                    point: []
+                },
+                jsFn,
+                examAnalysisStatus: false,
+                myDate: [],
+                groupQuestion: {},
+                currentSubjectIndex: 0,
+                ruleValidate: {
+                    name: [
+                        { required: true, message: '评测名称不能为空!', trigger: 'change' }
+                    ],
+                    type: [
+                        { required: true, message: '测试类型不能为空!', trigger: 'change' }
+                    ],
+                    publish: [
+                        { required: true, message: '发布方式不能为空!', trigger: 'change' }
+                    ]
+                },
+                currentBraIndex: 0,
+                avtiveEvaluationIndex: 0,
+                evaluationList: [],
+                examPaperList: [],
+                demoLoginInfo: {
+                    user: 'admin',
+                    TEAMModelId: 'habook#0001',
+                    school: '醍摩豆书院',
+                    schoolCode: 'HBCN'
+                },
+                classroomList: [
+                    '一年级一班',
+                    '一年级二班',
+                    '一年级三班'
+                ],
+                typeList: [
+                    {
+                        value: '1',
+                        label: '联考'
+                    },
+                    {
+                        value: '2',
+                        label: '段考'
+                    },
+                    {
+                        value: '3',
+                        label: '平常考'
+                    },
+                    {
+                        value: '4',
+                        label: '其他'
+                    }
+                ],
+                publishList: [
+                    {
+                        value: '1',
+                        label: '自动发布'
+                    },
+                    {
+                        value: '2',
+                        label: '手动发布'
+                    }
+                ]
+            }
         },
-        classroomList: [
-          '一年级一班',
-          '一年级二班',
-          '一年级三班'
-        ],
-        typeList: [
-          {
-            value: '1',
-            label:'联考'
-          },
-          {
-            value: '2',
-            label:'段考'
-          },
-          {
-            value: '3',
-            label:'平常考'
-          },
-          {
-            value: '4',
-            label:'其他'
-          }
-        ],
-        publishList: [
-          {
-            value: '1',
-            label:'自动发布'
-          },
-          {
-            value: '2',
-            label:'手动发布'
-          }
-        ]
-      }
-    },
-    methods: {
-      cancelEdit() {
+        methods: {
+            drawPie(flag) {
+                if (flag) {
+                    this.$refs.examPaperAnalysis.drawDiffChart()
+                }
+            },
+            showAnalysis() {
+                this.examAnalysisStatus = true
+                this.handleAnalysisData()
+            },
+            /**
+             * 处理试卷分析数据
+             */
+            handleAnalysisData() {
+                //计算试卷整体分析数据
+                let exmaData = this.getWholeAnalysis()
+                this.examAnalysisData.whole = {}
+                this.$set(this.examAnalysisData.whole, 'score', this.examPaperList[this.currentSubjectIndex].score)
+                this.examAnalysisData.whole.subjectiveScore = exmaData.subjectiveScore
+                this.examAnalysisData.whole.objectiveScore = exmaData.objectiveScore
+                this.examAnalysisData.whole.subjectiveNum = exmaData.subjectiveNum
+                this.examAnalysisData.whole.objectiveNum = exmaData.objectiveNum
+                this.examAnalysisData.whole.subjectiveScoreP = exmaData.subjectiveScoreP
+                this.examAnalysisData.whole.objectiveScoreP = exmaData.objectiveScoreP
+                this.examAnalysisData.whole.subjectiveNumP = exmaData.subjectiveNumP
+                this.examAnalysisData.whole.objectiveNumP = exmaData.objectiveNumP
+                //计算试卷题型分布数据
+                this.examAnalysisData.question = this.getQuestionType()
+                //计算试卷难度数据
+                this.examAnalysisData.difficult = this.getQuestionDiff()
+                //计算知识点分析
+                this.examAnalysisData.point = this.getPointData()
+            },
 
-      },
-      confirmEdit() {
-        let evaluationInfo = this.evaluationList[this.avtiveEvaluationIndex]
-        evaluationInfo.testPaper = this.examPaperList
-        console.log(evaluationInfo)
-        this.$router.push({
-          name: 'createEvaluation',
-          params: {
-            evaluationInfo
-          }
-        })
-      },
-      editEvaluation() {
-        this.editEvaluationStatus = true
-      },
-      selectSubject(index) {
-        this.currentSubjectIndex = index
-        this.groupQuestion = {}
-        let groupResult = jsFn.groupBy(this.examPaperList[this.currentSubjectIndex].item, 'type')
-        for (let i = 0; i < groupResult.length; i++) {
-          this.groupQuestion[groupResult[i][0].type] = groupResult[i]
-        }
-      },
-      getDate() {
+            getWholeAnalysis() {
+                let subjectiveScore = 0
+                let objectiveScore = 0
+                let subjectiveNum = 0
+                let objectiveNum = 0
+                let subjectiveScoreP = 0
+                let objectiveScoreP = 0
+                let subjectiveNumP = 0
+                let objectiveNumP = 0
+                for (let key in this.groupQuestion) {
+                    if (key == 'Complete' || key == 'Subjective' || key == 'Compose') {
+                        subjectiveNum += this.groupQuestion[key].length
+                        subjectiveScore += this.groupQuestion[key].reduce((total, item) => total + item.score, 0)
+                    } else {
+                        objectiveNum += this.groupQuestion[key].length
+                        objectiveScore += this.groupQuestion[key].reduce((total, item) => total + item.score, 0)
+                    }
+                }
+                subjectiveScoreP = ((subjectiveScore + objectiveScore) == 0 ? 0 : subjectiveScore * 100 / (subjectiveScore + objectiveScore)).toFixed(1)
+                objectiveScoreP = (subjectiveScore + objectiveScore) == 0 ? 0 : objectiveScore == 0 ? 0 : 100 - subjectiveScoreP
+                subjectiveNumP = ((subjectiveNum + objectiveNum) == 0 ? 0 : subjectiveNum * 100 / (subjectiveNum + objectiveNum)).toFixed(1)
+                objectiveNumP = (subjectiveNum + objectiveNum) == 0 ? 0 : objectiveNum == 0 ? 0 : 100 - subjectiveNumP
 
-      },
-      selectBar(index) {
-        this.currentBraIndex = index
-      },
-      formatDate(timestamp) {
-        let date = new Date(timestamp*1000)
-        return date.toLocaleString()
-      },
-      selectEvaluation(index) {
-        this.avtiveEvaluationIndex = index
-        this.findExamPaper()
-      },
-      findEvaluation() {
-        let requestData = {
-          scopeCode: this.demoLoginInfo.TEAMModelId
-        }
-        this.$api.learnActivity.FindExamInfo(requestData).then(
-          res => {
-            if (res.error == null) {
-              this.evaluationList = res.result.data
-              console.log(this.evaluationList)
-              if (this.evaluationList.length > 0) {
-                this.findExamPaper()
-              }
-            } else {
-              this$Message.error('API ERROR!')
-            }
-          },
-          res => {
+                return { subjectiveScore, objectiveScore, subjectiveNum, objectiveNum, subjectiveScoreP, objectiveScoreP, subjectiveNumP, objectiveNumP }
+            },
 
-          }
-        )
-      },
-      findExamPaper() {
-        let requestData = {
-          scopeCode: this.evaluationList[this.avtiveEvaluationIndex].id
-        }
-        this.$api.learnActivity.FindExamPaper(requestData).then(
-          res => {
-            if (res.error == null) {
-              this.examPaperList = res.result.data
-              if (this.examPaperList.length > 0) {
-                let groupResult = jsFn.groupBy(this.examPaperList[0].item, 'type')
-                for (let i = 0; i < groupResult.length; i++) {
-                  this.groupQuestion[groupResult[i][0].type] = groupResult[i]
+            getQuestionType() {
+                let data = {}
+                for (let key in this.groupQuestion) {
+                    data[key] = {}
+                    data[key]['count'] = this.groupQuestion[key].length
+                    data[key]['countPercent'] = (this.groupQuestion[key].length * 100 / this.examPaperList[this.currentSubjectIndex].item.length).toFixed(1)
+                    data[key]['score'] = this.groupQuestion[key].reduce((total, item) => total + item.score, 0)
+                    data[key]['scorePercent'] = (data[key]['score'] * 100 / this.examPaperList[this.currentSubjectIndex].score).toFixed(1)
+                }
+                return data
+            },
+            getQuestionDiff() {
+                let count = []
+                let score = []
+                let group = jsFn.groupBy(this.examPaperList[this.currentSubjectIndex].item, 'level')
+                for (let item of group) {
+                    count.push(
+                        {
+                            value: item.length,
+                            name: this.getDiffLabel(item[0].level)
+                        }
+                    )
+                    score.push(
+                        {
+                            value: item.reduce((total, i) => total + i.score, 0),
+                            name: this.getDiffLabel(item[0].level)
+                        }
+                    )
+                }
+                return { count, score }
+            },
+            getDiffLabel(level) {
+                switch (level) {
+                    case 1:
+                        return '容易'
+                        break
+                    case 2:
+                        return '较易'
+                        break
+                    case 3:
+                        return '一般'
+                        break
+                    case 4:
+                        return '较难'
+                        break
+                    case 5:
+                        return '困难'
+                        break
+                }
+            },
+            getPointData() {
+                let data = {}
+                let str = ''
+                for (let i = 0; i < this.examPaperList[this.currentSubjectIndex].item.length; i++) {
+                    if (this.examPaperList[this.currentSubjectIndex].item[i].points.length > 0) {
+                        let avgScore = parseInt((this.examPaperList[this.currentSubjectIndex].item[i].score / this.examPaperList[this.currentSubjectIndex].item[i].points.length).toFixed(0))
+                        for (let j = 0; j < this.examPaperList[this.currentSubjectIndex].item[i].points.length; j++) {
+                            if (str.indexOf(this.examPaperList[this.currentSubjectIndex].item[i].points[j]) == -1) {
+                                str += this.examPaperList[this.currentSubjectIndex].item[i].points[j]
+                                data[this.examPaperList[this.currentSubjectIndex].item[i].points[j]] = {
+                                    questionIndex: [i + 1],
+                                    score: avgScore
+                                }
+                            } else {
+                                data[this.examPaperList[this.currentSubjectIndex].item[i].points[j]].questionIndex.push(i + 1)
+                                data[this.examPaperList[this.currentSubjectIndex].item[i].points[j]].score += avgScore
+                            }
+                        }
+                    }
                 }
-              } else {
+                let tableData = []
+                for (let key in data) {
+                    tableData.push(
+                        {
+                            point: key,
+                            score: data[key].score,
+                            questionIndex: data[key].questionIndex
+                        }
+                    )
+                }
+                return tableData
+            },
+            confirmEdit() {
+                let evaluationInfo = this.evaluationList[this.avtiveEvaluationIndex]
+                evaluationInfo.testPaper = this.examPaperList
+                this.$router.push({
+                    name: 'createEvaluation',
+                    params: {
+                        evaluationInfo
+                    }
+                })
+            },
+
+            editEvaluation() {
+                this.editEvaluationStatus = true
+            },
+            selectSubject(index) {
+                this.currentSubjectIndex = index
                 this.groupQuestion = {}
-              }
-              
-            } else {
-              this$Message.error('API ERROR!')
-            }
-          },
-          res => {
+                let groupResult = jsFn.groupBy(this.examPaperList[this.currentSubjectIndex].item, 'type')
+                for (let i = 0; i < groupResult.length; i++) {
+                    this.groupQuestion[groupResult[i][0].type] = groupResult[i]
+                }
 
-          }
-        )
-      },
-      checkCount(count) {
-        switch (count) {
-          case 0:
-            return '一、'
-            break
-          case 1:
-            return '二、'
-            break
-          case 2:
-            return '三、'
-            break
-          case 3:
-            return '四、'
-            break
-          case 4:
-            return '五、'
-            break
-          case 5:
-            return '六、'
-            break
-          default:
-            return ''
-            break
-        }
-      },
-      getOrder(type) {
-        let count = 0
-        switch (type) {
-          case 'Single':
-            return '一、'
-            break
-          case 'Multiple':
-            if (this.groupQuestion.Single != undefined) {
-              return '二、'
-            } else {
-              return '一、'
-            }
-            break
-          case 'Complete':
-            for (let key in this.groupQuestion) {
-              if (key == 'Single' || key == 'Multiple') {
-                count++
-              }
-            }
-            return this.checkCount(count)
-            break
-          case 'Judge':
-            
-            for (let key in this.groupQuestion) {
-              if (key == 'Single' || key == 'Complete' || key == 'Multiple') {
-                count++
-              }
-            }
-            return this.checkCount(count)
-            break
-          case 'Subjective':
-            for (let key in this.groupQuestion) {
-              if (key == 'Single' || key == 'Complete' || key == 'Multiple' || key == 'Judge') {
-                count++
-              }
+            },
+            getDate() {
+
+            },
+            selectBar(index) {
+                this.currentBraIndex = index
+            },
+            formatDate(timestamp) {
+                let date = new Date(timestamp)
+                return date.toLocaleString()
+            },
+            getMyDate(start, end) {
+                this.myDate.length = 0
+                this.myDate = [this.formatDate(start), this.formatDate(end)]
+            },
+            selectEvaluation(index) {
+                this.avtiveEvaluationIndex = index
+                this.getMyDate(this.evaluationList[this.avtiveEvaluationIndex].startTime, this.evaluationList[this.avtiveEvaluationIndex].endTime)
+                this.findExamPaper()
+            },
+            timestampToTime(timestamp) {
+                var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+                var Y = date.getFullYear() + '-';
+                var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+                var D = date.getDate()
+                return Y + M + D;
+            },
+            findEvaluation() {
+                let requestData = {
+                    scopeCode: this.demoLoginInfo.TEAMModelId
+                }
+                this.$api.learnActivity.FindExamInfo(requestData).then(
+                    res => {
+                        if (res.error == null) {
+                            this.evaluationList = res.result.data
+                            if (this.evaluationList.length > 0) {
+                                this.findExamPaper()
+                            }
+                        } else {
+                            this$Message.error('API ERROR!')
+                        }
+                    },
+                    res => {
+
+                    }
+                )
+            },
+            findExamPaper() {
+                let requestData = {
+                    scopeCode: this.evaluationList[this.avtiveEvaluationIndex].id
+                }
+                this.$api.learnActivity.FindExamPaper(requestData).then(
+                    res => {
+                        if (res.error == null) {
+                            this.examPaperList = res.result.data
+                            if (this.examPaperList.length > 0) {
+                                let groupResult = jsFn.groupBy(this.examPaperList[0].item, 'type')
+                                for (let i = 0; i < groupResult.length; i++) {
+                                    this.groupQuestion[groupResult[i][0].type] = groupResult[i]
+                                }
+                            } else {
+                                this.groupQuestion = {}
+                            }
+
+                        } else {
+                            this$Message.error('API ERROR!')
+                        }
+                    },
+                    res => {
+
+                    }
+                )
+            },
+            checkCount(count) {
+                switch (count) {
+                    case 0:
+                        return '一、'
+                        break
+                    case 1:
+                        return '二、'
+                        break
+                    case 2:
+                        return '三、'
+                        break
+                    case 3:
+                        return '四、'
+                        break
+                    case 4:
+                        return '五、'
+                        break
+                    case 5:
+                        return '六、'
+                        break
+                    default:
+                        return ''
+                        break
+                }
+            },
+            getOrder(type) {
+                let count = 0
+                switch (type) {
+                    case 'Single':
+                        return '一、'
+                        break
+                    case 'Multiple':
+                        if (this.groupQuestion.Single != undefined) {
+                            return '二、'
+                        } else {
+                            return '一、'
+                        }
+                        break
+                    case 'Complete':
+                        for (let key in this.groupQuestion) {
+                            if (key == 'Single' || key == 'Multiple') {
+                                count++
+                            }
+                        }
+                        return this.checkCount(count)
+                        break
+                    case 'Judge':
+
+                        for (let key in this.groupQuestion) {
+                            if (key == 'Single' || key == 'Complete' || key == 'Multiple') {
+                                count++
+                            }
+                        }
+                        return this.checkCount(count)
+                        break
+                    case 'Subjective':
+                        for (let key in this.groupQuestion) {
+                            if (key == 'Single' || key == 'Complete' || key == 'Multiple' || key == 'Judge') {
+                                count++
+                            }
+                        }
+                        return this.checkCount(count)
+                        break
+                    case 'Compose':
+                        for (let key in this.groupQuestion) {
+                            if (key == 'Single' || key == 'Complete' || key == 'Multiple' || key == 'Judge' || key == 'Subjective') {
+                                count++
+                            }
+                        }
+                        return this.checkCount(count)
+                        break
+                    default:
+                        return ''
+                        break
+                }
             }
-            return this.checkCount(count)
-            break
-          case 'Compose':
-            for (let key in this.groupQuestion) {
-              if (key == 'Single' || key == 'Complete' || key == 'Multiple' || key == 'Judge' || key == 'Subjective') {
-                count++
-              }
+        },
+        mounted() {
+            Date.prototype.toLocaleString = function () {
+                return this.getFullYear() + "/" + (this.getMonth() + 1) + "/" + this.getDate();
             }
-            return this.checkCount(count)
-            break
-          default:
-            return ''
-            break
+            this.findEvaluation()
         }
-      }
-    },
-    mounted() {
-      Date.prototype.toLocaleString = function () {
-        return this.getFullYear() + "/" + (this.getMonth() + 1) + "/" + this.getDate();
-      }
-      this.findEvaluation()
     }
-  }
 </script>
 <style lang="less" scoped>
-@import "./ManageEvaluation.less";
+    @import "./ManageEvaluation.less";
 </style>
 <style>
-  .evalustion-base-attr .ivu-form .ivu-form-item-label {
-    color:#a5a5a5;
-  }
+    .evalustion-base-attr .ivu-form .ivu-form-item-label {
+        color: #a5a5a5;
+    }
 </style>

+ 2 - 14
TEAMModelOS/ClientApp/src/view/learnactivity/ManualCreate.less

@@ -13,19 +13,11 @@
   display: flex;
   flex-direction: row;
 
-  &-left {
-    width: 50%;
-  }
-
-  &-right {
-    width: 50%;
-  }
-
   .manual-filter-item {
     margin-top:5px;
     margin-bottom:20px;
     .manual-filter-label {
-      width:80px;
+      width:60px;
       display:inline-block;
       color: @second-textColor;
     }
@@ -34,7 +26,7 @@
 
 .question-list-wrap {
   padding: 10px;
-  padding-bottom: 30px;
+  padding-bottom: 130px;
   position: relative;
 
   .page-wrap {
@@ -85,10 +77,6 @@
   }
 
   .shopping-car-detail-item {
-    /*&:nth-last-child(3) {
-      margin-bottom: 15px;
-    }*/
-
     margin-top: 15px;
     padding: 0px 10px;
 

+ 297 - 186
TEAMModelOS/ClientApp/src/view/learnactivity/ManualCreate.vue

@@ -1,198 +1,309 @@
 <template>
-  <div style="height: 100%;background: #404040;position:relative;">
+    <div style="height: 100%;background: #404040;position:relative;">
 
-    <Poptip padding="0px 0px" offset="10" placement="top-end" width="300" trigger="hover" :class="shoppingCarClass">
-      <Badge type="success" :count="shoppingQuestionList.length" show-zero :offset="[-3,-3]" style="margin-top:10px;cursor:pointer;" @mouseenter.native="changeActive($event)" @mouseleave.native="removeActive($event)">
-        <!--<Icon type="ios-cart" color="#6bdfc3" size="50" />-->
-        <img src="../../assets/shopping_car.svg" width="40" height="40" />
-      </Badge>
-      <div slot="content">
-        <div class="shopping-car-detail">
-          <p class="shopping-car-detail-title">共计<span style="margin:0px 5px;">{{shoppingQuestionList.length}}</span>题</p>
-          <div class="shopping-car-detail-item">
-            <span class="question-type">单选题:</span>
-            <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Single*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
-            <span class="question-num">{{groupQuestion.Single}}道</span>
-          </div>
-          <div class="shopping-car-detail-item">
-            <span class="question-type">多选题:</span>
-            <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Multiple*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
-            <span class="question-num">{{groupQuestion.Multiple}}道</span>
-          </div>
-          <div class="shopping-car-detail-item">
-            <span class="question-type">判断题:</span>
-            <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Judge*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
-            <span class="question-num">{{groupQuestion.Judge}}道</span>
-          </div>
-          <div class="shopping-car-detail-item">
-            <span class="question-type">填空题:</span>
-            <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Complete*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
-            <span class="question-num">{{groupQuestion.Complete}}道</span>
-          </div>
-          <div class="shopping-car-detail-item">
-            <span class="question-type">问答题:</span>
-            <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Subjective*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
-            <span class="question-num">{{groupQuestion.Subjective}}道</span>
-          </div>
-          <div class="shopping-car-detail-item">
-            <span class="question-type">综合题:</span>
-            <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Compose*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
-            <span class="question-num">{{groupQuestion.Compose}}道</span>
-          </div>
-          <p class="shopping-car-detail-bottom" @click="goToPreview">查看详情</p>
-        </div>
+        <Poptip padding="0px 0px" offset="10" placement="top-end" width="300" trigger="hover" :class="shoppingCarClass">
+            <Badge type="success" :count="shoppingQuestionList.length" show-zero :offset="[-3,-3]" style="margin-top:10px;cursor:pointer;" @mouseenter.native="changeActive($event)" @mouseleave.native="removeActive($event)">
+                <!--<Icon type="ios-cart" color="#6bdfc3" size="50" />-->
+                <img src="../../assets/shopping_car.svg" width="40" height="40" />
+            </Badge>
+            <div slot="content">
+                <div class="shopping-car-detail">
+                    <p class="shopping-car-detail-title">共计<span style="margin:0px 5px;">{{shoppingQuestionList.length}}</span>题</p>
+                    <div class="shopping-car-detail-item">
+                        <span class="question-type">单选题:</span>
+                        <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Single*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
+                        <span class="question-num">{{groupQuestion.Single}}道</span>
+                    </div>
+                    <div class="shopping-car-detail-item">
+                        <span class="question-type">多选题:</span>
+                        <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Multiple*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
+                        <span class="question-num">{{groupQuestion.Multiple}}道</span>
+                    </div>
+                    <div class="shopping-car-detail-item">
+                        <span class="question-type">判断题:</span>
+                        <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Judge*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
+                        <span class="question-num">{{groupQuestion.Judge}}道</span>
+                    </div>
+                    <div class="shopping-car-detail-item">
+                        <span class="question-type">填空题:</span>
+                        <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Complete*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
+                        <span class="question-num">{{groupQuestion.Complete}}道</span>
+                    </div>
+                    <div class="shopping-car-detail-item">
+                        <span class="question-type">问答题:</span>
+                        <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Subjective*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
+                        <span class="question-num">{{groupQuestion.Subjective}}道</span>
+                    </div>
+                    <div class="shopping-car-detail-item">
+                        <span class="question-type">综合题:</span>
+                        <Progress stroke-color="#6bdfc3" :percent="groupQuestion.Compose*100/shoppingQuestionList.length" :stroke-width="15" style="width:165px;vertical-align:top;padding-top:2px;" hide-info />
+                        <span class="question-num">{{groupQuestion.Compose}}道</span>
+                    </div>
+                    <p class="shopping-car-detail-bottom" @click="goToPreview">查看详情</p>
+                </div>
 
-      </div>
-    </Poptip>
-    <vuescroll>
-      <div class="manual-filter-wrap">
-        <div class="manual-filter-wrap-left">
-          <div class="manual-filter-item">
-            <span class="manual-filter-label">学段:</span>
-            <CheckboxGroup v-model="manualFilter.periodCode" style="display: inline-block;">
-              <Checkbox label="">小学</Checkbox>
-              <Checkbox label="">初中</Checkbox>
-              <Checkbox label="">高中</Checkbox>
-            </CheckboxGroup>
-          </div>
-          <div class="manual-filter-item">
-            <span class="manual-filter-label">知识点:</span>
-            <span>暂无知识点</span>
-            <Icon @click="addKnowledge" type="md-add-circle" title="添加知识点" color="white" style="margin-left:15px;cursor:pointer;" size="18" />
-          </div>
-        </div>
-        <div class="manual-filter-wrap-right">
-          <div class="manual-filter-item">
-            <span class="manual-filter-label">题库范围:</span>
-            <CheckboxGroup v-model="manualFilter.scopeCode" style="display:inline-block;">
-              <Checkbox label="">私有题库</Checkbox>
-              <Checkbox label="">校本题库</Checkbox>
-            </CheckboxGroup>
-          </div>
-        </div>
-      </div>
-      <div class="question-list-wrap">
-        <QuestionList :config="questionConfig" :questions="questionList" @seleteQuestion="seleteQuestion"></QuestionList>
-        <div class="page-wrap">
-          <Page :total="40" size="small" show-elevator show-sizer />
-        </div>
-      </div>
-    </vuescroll>
-    <Modal v-model="selectPointsStatus"
-           title="设置知识点"
-           width="70"
-           class-name="dark-iview-modal"
-           @on-ok="confirmSelectPoints"
-           @on-cancel="cancelSelectPoints">
-      <Tabs type="card" v-model="pointTab" name="manual">
-        <TabPane label="课纲关联挑选" name="syllabus" tab="manual">
-          <div class="point-tab-content">
-            <p>123456498712</p>
-          </div>
-        </TabPane>
-        <TabPane label="知识点库挑选" name="pioints" tab="manual">
-          <div class="point-tab-content">
-            456
-          </div>
-        </TabPane>
-      </Tabs>
-    </Modal>
-  </div>
+            </div>
+        </Poptip>
+        <vuescroll>
+            <div class="manual-filter-wrap">
+                <Row style="width:100%;">
+                    <Col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
+                    <div class="manual-filter-item">
+                        <span class="manual-filter-label">来源:</span>
+                        <CheckboxGroup v-model="manualFilter.scopeCode" style="display:inline-block;" @on-change="checkAll($event,'scopeCode')">
+                            <Checkbox label="all">全部</Checkbox>
+                            <Checkbox :label="demoLoginInfo.TEAMModelId">私有题库</Checkbox>
+                            <Checkbox :label="demoLoginInfo.schoolCode">校本题库</Checkbox>
+                        </CheckboxGroup>
+                    </div>
+                    </Col>
+                    <Col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
+                    <div class="manual-filter-item">
+                        <span class="manual-filter-label">学段:</span>
+                        <CheckboxGroup v-model="manualFilter.periodCode" style="display: inline-block;" @on-change="checkAll($event,'periodCode')">
+                            <Checkbox label="all">全部</Checkbox>
+                            <Checkbox v-for="(item,index) in $store.state.schoolBaseInfo.schoolBaseInfo.period" :label="item.periodCode">{{item.periodName}}</Checkbox>
+                        </CheckboxGroup>
+                    </div>
+                    </Col>
+                    <Col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
+                    <div class="manual-filter-item">
+                        <span class="manual-filter-label">题型:</span>
+                        <CheckboxGroup v-model="manualFilter.type" border style="display: inline-block;" @on-change="checkAll($event,'type')">
+                            <Checkbox label="all">全部</Checkbox>
+                            <Checkbox label="Single">单选</Checkbox>
+                            <Checkbox label="Multiple">多选</Checkbox>
+                            <Checkbox label="Judge">判断</Checkbox>
+                            <Checkbox label="Complete">填空</Checkbox>
+                            <Checkbox label="Subjective">问答</Checkbox>
+                            <Checkbox label="Compose">综合</Checkbox>
+                        </CheckboxGroup>
+                    </div>
+                    </Col>
+                    <Col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
+                    <div class="manual-filter-item">
+                        <span class="manual-filter-label">难度:</span>
+                        <CheckboxGroup v-model="manualFilter.level" border style="display: inline-block;" @on-change="checkAll($event,'level')">
+                            <Checkbox label="all">全部</Checkbox>
+                            <Checkbox v-for="(item,index) in exersicesDiff" :key="index" :label="index + 1">{{ item }}</Checkbox>
+                        </CheckboxGroup>
+                    </div>
+                    </Col>
+                    <Col :xs="24" :sm="24" :md="24" :lg="24" :xl="12">
+                    <div class="manual-filter-item">
+                        <span class="manual-filter-label">知识点:</span>
+                        <span>暂无知识点</span>
+                        <Icon @click="addKnowledge" type="md-add-circle" title="添加知识点" color="white" style="margin-left:15px;cursor:pointer;" size="18" />
+                    </div>
+                    </Col>
+                </Row>
+            </div>
+            <div class="question-list-wrap">
+                <Loading :top="100" v-show="isLoading"></Loading>
+                <QuestionList :class="isLoading ? '':'animated fadeIn'" v-show="!isLoading" :config="questionConfig" :questions="questionList" @seleteQuestion="seleteQuestion"></QuestionList>
+                <NoData style="margin-top:120px;" v-if="!isLoading && questionList.length == 0" textContent="没有查询到题目"></NoData>
+                <div class="page-wrap">
+                    <Page :current.sync="pageNum" :total="totalNum" :page-size="pageSize" size="small" show-elevator show-sizer @on-change="getCurrentPageData" />
+                </div>
+            </div>
+        </vuescroll>
+        <Modal v-model="selectPointsStatus"
+               title="设置知识点"
+               width="70"
+               class-name="dark-iview-modal"
+               @on-ok="confirmSelectPoints">
+            <Tabs type="card" v-model="pointTab" name="manual">
+                <TabPane label="课纲关联挑选" name="syllabus" tab="manual">
+                    <div class="point-tab-content">
+                        <p>123456498712</p>
+                    </div>
+                </TabPane>
+                <TabPane label="知识点库挑选" name="pioints" tab="manual">
+                    <div class="point-tab-content">
+                        456
+                    </div>
+                </TabPane>
+            </Tabs>
+        </Modal>
+    </div>
 </template>
 <script>
-  import QuestionList from '@/components/learnactivity/QuestionList.vue'
-  import { setTimeout } from 'core-js'
-  import jsFn from '@/utils/js-fn.js'
-  export default {
-    components: {
-      QuestionList
-    },
-    props: {
-      questionList: {
-        type: Array,
-        default: []
-      }
-    },
-    data() {
-      return {
-        questionConfig: {
-          showSelect: true
+    import QuestionList from '@/components/learnactivity/QuestionList.vue'
+    import Loading from '@/common/Loading.vue'
+    import NoData from '@/common/NoData.vue'
+    import { setTimeout } from 'core-js'
+    export default {
+        components: {
+            QuestionList,
+            Loading,
+            NoData
         },
-        groupQuestion: {
-          Single: 0,
-          Multiple:0,
-          Judge: 0,
-          Complete: 0,
-          Subjective: 0,
-          Compose: 0
+        data() {
+            return {
+                isLoading: false,
+                questionList:[],
+                pageSize: 20,
+                totalNum: 0,
+                pageNum:1,
+                demoLoginInfo: {
+                    user: 'admin',
+                    TEAMModelId: 'habook#0001',
+                    school: '醍摩豆书院',
+                    schoolCode: 'HBCN'
+                },
+                exersicesDiff: ['容易', '较易', '一般', '较难', '困难'],
+                questionConfig: {
+                    showSelect: true
+                },
+                groupQuestion: {
+                    Single: 0,
+                    Multiple: 0,
+                    Judge: 0,
+                    Complete: 0,
+                    Subjective: 0,
+                    Compose: 0
+                },
+                shoppingQuestionList: [],
+                shoppingCarClass: 'question-shopping-car',
+                pointTab: '',
+                selectPointsStatus: false,
+                addKnowledgeStatus: false,
+                manualFilter: {
+                    periodCode: ['all'],
+                    scopeCode: ['all'],
+                    points: ['all'],
+                    type: ['all'],
+                    level: ['all'],
+                    subjectCode: ['all']
+                }
+            }
         },
-        shoppingQuestionList: [],
-        shoppingCarClass: 'question-shopping-car',
-        pointTab: '',
-        selectPointsStatus: false,
-        addKnowledgeStatus: false,
-        manualFilter: {
-          periodCode: [],
-          scopeCode: []
-        }
-      }
-    },
-    methods: {
-      seleteQuestion(data) {
-        let flag = true
-        for (let item of this.shoppingQuestionList) {
-          if (item.shaCode == data.shaCode) {
-            flag = false
-            break
-          }
-        }
-        if (flag) {
-          this.shoppingQuestionList.push(data)
-          this.$Message.success('添加成功!')
-          this.shoppingCarClass = 'question-shopping-car animated heartBeat'
-          setTimeout(() => {
-            this.shoppingCarClass = 'question-shopping-car'
-          }, 1000)
-          let groupResult = jsFn.groupBy(this.shoppingQuestionList, 'type')
-          for (let i = 0; i < groupResult.length; i++) {
-            this.groupQuestion[groupResult[i][0].type] = groupResult[i].length
-          }
-          this.$emit('selectedQuestion', {
-            questions: this.shoppingQuestionList,
-            item:data
-          })
-        } else {
-          this.$Message.warning('此题目已添加!')
-        }
-      },
-      goToPreview() {
-        this.$emit('goToPreview')
-      },
-      changeActive(e) {
-        this.shoppingCarClass = 'question-shopping-car animated pulse'
-      },
-      removeActive() {
-        this.shoppingCarClass = 'question-shopping-car'
-      },
-      addKnowledge() {
-        this.addKnowledgeStatus = true
-      },
-      confirmSelectPoints() {
-
-      },
-      cancelSelectPoints() {
+        mounted() {
+            this.getResultCount()
+            this.queryQuestionByPage()
+        },
+        methods: {
+            /**
+             * 查询当前页题目
+             * @param data:选中数据
+             * @param field:字段名
+             */
+            getCurrentPageData(pageNum) {
+                this.queryQuestionByPage()
+            },
+            /**
+             * 选择全部逻辑
+             * @param data:选中数据
+             * @param field:字段名
+             */
+            checkAll(data, field) {
+                if (this.manualFilter[field].length !== 1 && this.manualFilter[field].indexOf('all') === 0) {
+                    this.manualFilter[field].splice(this.manualFilter[field].indexOf('all'), 1)
+                } else if (this.manualFilter[field].indexOf('all') > 0) {
+                    this.manualFilter[field].length = 0
+                    this.$set(this.manualFilter[field],0,'all')
+                }
+                console.log(this.manualFilter)
+                this.pageNum = 1
+                this.getResultCount()
+                this.queryQuestionByPage()
+            },
+            /**
+             * 获取题库数量
+             */
+            getResultCount() {
+                let findCountParams = {
+                    "collectionName": "ExamItem",
+                    "queryDict": {
+                        'scopeCode': this.deleteAll(this.manualFilter.scopeCode),
+                        'periodCode': this.deleteAll(this.manualFilter.periodCode),
+                        'level': this.deleteAll(this.manualFilter.level),
+                        'type': this.deleteAll(this.manualFilter.type),
+                        'gradeCode': [],
+                        'subjectCode': [],
+                        'field': [],
+                    }
+                }
+                this.$api.newEvaluation.FindCount(findCountParams).then(res => {
+                    this.totalNum = res.result.data[0]
+                })
+            },
+            queryQuestionByPage() {
+                let queryData = {
+                    '@CURRPAGE': this.pageNum,
+                    '@PAGESIZE': this.pageSize,
+                    'scopeCode': this.deleteAll(this.manualFilter.scopeCode),
+                    'periodCode': this.deleteAll(this.manualFilter.periodCode),
+                    'level': this.deleteAll(this.manualFilter.level),
+                    'type': this.deleteAll(this.manualFilter.type),
+                    'gradeCode': [],
+                    'subjectCode': [],
+                    
+                }
+                this.isLoading = true
+                this.$api.newEvaluation.FindExerciseList(queryData).then(res => {
+                    this.questionList = res.result.data
+                    setTimeout(() => {
+                        this.isLoading = false
+                    },500)
+                })
+            },
+            deleteAll(data) {
+                if (data.length == 1) {
+                    if (data[0] == 'all') {
+                        return []
+                    } else {
+                        return data
+                    }
+                } else {
+                    return data
+                }
+            },
+            seleteQuestion(data) {
+                let flag = true
+                for (let item of this.shoppingQuestionList) {
+                    if (item.id == data.id) {
+                        flag = false
+                        break
+                    }
+                }
+                if (flag) {
+                    this.shoppingQuestionList.push(data)
+                    this.$Message.success('添加成功!')
+                    this.shoppingCarClass = 'question-shopping-car animated heartBeat'
+                    setTimeout(() => {
+                        this.shoppingCarClass = 'question-shopping-car'
+                    }, 1000)
+                    let groupResult = this.$jsFn.groupBy(this.shoppingQuestionList, 'type')
+                    for (let i = 0; i < groupResult.length; i++) {
+                        this.groupQuestion[groupResult[i][0].type] = groupResult[i].length
+                    }
+                    this.$emit('selectedQuestion', {
+                        questions: this.shoppingQuestionList,
+                        item: data
+                    })
+                } else {
+                    this.$Message.warning('此题目已添加!')
+                }
+            },
+            goToPreview() {
+                this.$emit('goToPreview')
+            },
+            changeActive(e) {
+                this.shoppingCarClass = 'question-shopping-car animated pulse'
+            },
+            removeActive() {
+                this.shoppingCarClass = 'question-shopping-car'
+            },
+            addKnowledge() {
+                this.addKnowledgeStatus = true
+            },
+            confirmSelectPoints() {
 
-      }
-    },
-    computed: {
-      //groupQuestion() {
-      //  console.log('0001010')
-      //  console.log(this.groupQuestion)
-      //  return jsFn.groupBy(this.shoppingQuestionList,'type')
-      //}
+            }
+        }
     }
-  }
 </script>
 <style lang="less">
-  @import "./ManualCreate.less";
+    @import "./ManualCreate.less";
 </style>

+ 0 - 0
TEAMModelOS/ClientApp/src/view/learnactivity/StudentPreview.vue


Some files were not shown because too many files changed in this diff