Browse Source

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

CrazyIter 5 năm trước cách đây
mục cha
commit
2a3fa1484e
28 tập tin đã thay đổi với 1875 bổ sung472 xóa
  1. 18 5
      TEAMModelOS.SDK/Module/AzureCosmosDBV3/SQLHelperParametric.cs
  2. 14 0
      TEAMModelOS/ClientApp/src/components/learnactivity/QuestionList.less
  3. 13 1
      TEAMModelOS/ClientApp/src/components/learnactivity/QuestionList.vue
  4. 6 0
      TEAMModelOS/ClientApp/src/css/dark-iview-form.less
  5. 1 1
      TEAMModelOS/ClientApp/src/router/routes.js
  6. 17 1
      TEAMModelOS/ClientApp/src/view/Home.vue
  7. 634 0
      TEAMModelOS/ClientApp/src/view/evaluation/bank/ExerciseList.less
  8. 576 0
      TEAMModelOS/ClientApp/src/view/evaluation/bank/ExerciseList.vue
  9. 68 0
      TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.less
  10. 107 0
      TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.vue
  11. 0 0
      TEAMModelOS/ClientApp/src/view/evaluation/bank/index.less
  12. 58 0
      TEAMModelOS/ClientApp/src/view/evaluation/bank/index.vue
  13. 22 10
      TEAMModelOS/ClientApp/src/view/evaluation/index/CreateExercises.css
  14. 32 17
      TEAMModelOS/ClientApp/src/view/evaluation/index/CreateExercises.vue
  15. 2 1
      TEAMModelOS/ClientApp/src/view/evaluation/index/ExercisesList.css
  16. 0 16
      TEAMModelOS/ClientApp/src/view/evaluation/index/ExercisesList.vue
  17. 7 356
      TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaperList.vue
  18. 1 0
      TEAMModelOS/ClientApp/src/view/evaluation/index/index.vue
  19. 4 2
      TEAMModelOS/ClientApp/src/view/learnactivity/CreateEvaluation.vue
  20. 5 0
      TEAMModelOS/ClientApp/src/view/learnactivity/ImportCreate.vue
  21. 51 4
      TEAMModelOS/ClientApp/src/view/learnactivity/ManageEvaluation.less
  22. 152 3
      TEAMModelOS/ClientApp/src/view/learnactivity/ManageEvaluation.vue
  23. 37 12
      TEAMModelOS/ClientApp/src/view/learnactivity/TeacherPreview.vue
  24. 26 6
      TEAMModelOS/Controllers/Analysis/AchievementController.cs
  25. 4 22
      TEAMModelOS/Controllers/Syllabus/KnowledgeController.cs
  26. 2 1
      TEAMModelOS/Controllers/Syllabus/SyllabusController.cs
  27. 9 5
      TEAMModelOS/Controllers/Test/TestController.cs
  28. 9 9
      TEAMModelOS/Models/SampleCustomerRepository.cs

+ 18 - 5
TEAMModelOS.SDK/Module/AzureCosmosDBV3/SQLHelperParametric.cs

@@ -162,7 +162,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
                 string[] sqlHead = new string[] { "A", "B", "C", "D", "E", "F" };
                 int kslength = 0;
                 int logicOperNum = 0;
-                bool keyListValueList = true;
+                bool keyListValueList = false;
                 int keyListValueListNum = 0;
                 int stackCount = stack.Count;
                 for (int k = 0; k < stackCount; k++)
@@ -195,7 +195,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
                     {
                         key = key.Replace("[*]", "");
                         key = key.Replace(".", "");
-
+                        key += k;
                         kslength += keyBody.Length;
                         if (kslength < (7 + heada))
                         {
@@ -258,6 +258,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
                     else
                     {
                         string itemKey = key.Replace(".", "");
+                        itemKey += k;
                         WhereString.Append(KeyNotElement(dict[item.Key], item.Key, itemKey, LogicOpers[logicOper], logicOperNum, compareOper));
                     }
                     logicOperNum += 1;
@@ -370,6 +371,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
             StringBuilder sql = new StringBuilder(logicOper + key + " in (");
             if (value is JArray array)
             {
+                keyListValueList = true;
                 int aa = 0;
                 foreach (JValue obja in array)
                 {
@@ -383,6 +385,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
             }
             else if (value is IEnumerable enumerable && !(value is String))
             {
+                keyListValueList = true;
                 int aa = 0;
                 foreach (object obja in enumerable)
                 {
@@ -395,8 +398,10 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
             }
             else if (value is JsonElement jsonElement)
             {
+                
                 if (jsonElement.ValueKind is JsonValueKind.Array)
                 {
+                    keyListValueList = true;
                     int aa = 0;
                     foreach (JsonElement obja in jsonElement.EnumerateArray().ToArray())
                     {
@@ -406,7 +411,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
                 }
                 else
                 {
-                    if (compareOperNum == 4) keyListValueList = false;
+                    if (compareOperNum != 4) keyListValueList = true; 
                     return logicOper + key + compareOper + " @" + key1 + " ";
                 }
 
@@ -418,7 +423,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
             {
                 Type s = value.GetType();
                 TypeCode typeCode = Type.GetTypeCode(s);
-                if (compareOperNum == 4) keyListValueList = false;
+                if (compareOperNum != 4) keyListValueList = true;
                 return logicOper + key + compareOper + " @" + key1 + " ";
 
             }
@@ -434,6 +439,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
 
             if (value is JArray array)
             {
+                keyListValueList = true;
                 int aa = 0;
                 foreach (JValue obja in array)
                 {
@@ -453,6 +459,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
             }
             else if (value is IEnumerable enumerable && !(value is String))
             {
+                keyListValueList = true;
                 int aa = 0;
                 foreach (object obja in enumerable)
                 {
@@ -471,6 +478,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
             }
             else if (value is JsonElement jsonElement && jsonElement.ValueKind is JsonValueKind.Array)
             {
+                keyListValueList = true;
                 int aa = 0;
                 foreach (JsonElement obja in jsonElement.EnumerateArray().ToArray())
                 {
@@ -491,7 +499,8 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
             {
                 Type stype = value.GetType();
                 TypeCode typeCode = Type.GetTypeCode(stype);
-                keyListValueList = false;
+                
+                if(compareOperNum == 7) keyListValueList = true;
                 string sql = "";
                 if (value is string)
                 {
@@ -706,6 +715,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
 
         private static Dictionary<string, object> GetParmeter(Dictionary<string, object> dict, Dictionary<string, object> parmeters,int offset = 0,int limit = 0)
         {
+            int i = 0;
             foreach (KeyValuePair<string, object> keyValue in dict)
             {
                 string key = "";
@@ -750,6 +760,8 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
                 }
                 key = key.Replace("[*]", "");
                 key = key.Replace(".", "");
+
+                key += i;
                 if (keyValue.Value is JArray array)
                 {
                     int aa = 0;
@@ -822,6 +834,7 @@ namespace TEAMModelOS.SDK.Module.AzureCosmosDBV3
                 {
                     parmeters.Add("@" + key, keyValue.Value);
                 }
+                i++;
             }
             if (offset != -1 && limit != 0)
             {

+ 14 - 0
TEAMModelOS/ClientApp/src/components/learnactivity/QuestionList.less

@@ -80,4 +80,18 @@
 }
 .choose-question-btn:hover {
   color: cyan;
+}
+.question-control-wrap {
+  width: 100%;
+  margin: 15px 0px;
+  text-align: right;
+
+  .question-control-btn {
+    margin-left: 30px;
+    cursor: pointer;
+  }
+
+  .question-control-btn:hover{
+    color:aqua;
+  }
 }

+ 13 - 1
TEAMModelOS/ClientApp/src/components/learnactivity/QuestionList.vue

@@ -22,7 +22,14 @@
         <p class="answer-detail">
           <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>
       </div>
+
     </div>
   </div>
 </template>
@@ -40,7 +47,9 @@
         default: () => {
           return {
             showSelect: false,
-            showScore:false
+            showScore: false,
+            showDelete: false,
+            showRemedy: false
           }
         }
       },
@@ -57,6 +66,9 @@
       }
     },
     methods: {
+      deleteQuestion(index) {
+        this.$emit('deleteQuestion',this.questions[index])
+      },
       selectQuestion(data) {
         this.$emit('seleteQuestion', data)
       },

+ 6 - 0
TEAMModelOS/ClientApp/src/css/dark-iview-form.less

@@ -19,4 +19,10 @@
     color: white;
     border-color: #606060;
   }
+}
+.dark-iview-inputnumber {
+  .ivu-input-number{
+    background:none;
+    border-color:#606060;
+  }
 }

+ 1 - 1
TEAMModelOS/ClientApp/src/router/routes.js

@@ -144,7 +144,7 @@ export const routes = [
           {
             path: 'testPaperList',
             name: 'testPaperList',
-            component: resolve => require(['@/view/evaluation/index/TestPaperList.vue'], resolve)
+            component: resolve => require(['@/view/evaluation/bank/index.vue'], resolve)
           },
           {
             path: 'createCompose',

+ 17 - 1
TEAMModelOS/ClientApp/src/view/Home.vue

@@ -142,7 +142,20 @@
       //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
       },
@@ -153,6 +166,9 @@
           })
         }
       }
+    },
+    mounted() {
+      this.getSchoolBaseInfo()
     }
   }
 </script>

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

@@ -0,0 +1,634 @@
+.ev-list-container {
+    user-select: none !important;
+    position: relative;
+    font-family: '微軟正黑體', 'Heiti TC' !important;
+}
+
+.ev-list-container .ev-header {
+    background: #fff;
+    padding: 10px;
+    display: flex;
+    align-items: center;
+}
+
+.ev-list-container .ev-title {
+    font-size: 20px;
+    font-weight: bold;
+    margin-left: 5px;
+    vertical-align: middle;
+}
+
+.ev-list-container .ev-length {
+    font-size: 12px;
+    font-weight: bold;
+    margin-left: 30px;
+    display: inline-block;
+    margin-top: 5px;
+    vertical-align: text-top;
+}
+
+.ev-list-container .ivu-divider-horizontal {
+    margin: 15px 0;
+}
+
+.ev-list-container .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;
+}
+
+.ev-list-operation {
+    width: 100%;
+    height: 60px;
+    background: #fff;
+    padding: 10px;
+    /*border-top:1px dashed rgba(128, 128, 128,0.4);*/
+    margin-top: 10px;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: space-between;
+}
+
+.ev-list-operation .ivu-checkbox-wrapper {
+    font-size: 14px;
+}
+
+.ev-list-operation .ivu-checkbox {
+    margin: 10px;
+}
+
+.ev-list-operation .import-exercise {
+    font-weight: bold;
+    color: rgb(16, 171, 231);
+    font-size: 16px;
+    display: flex;
+}
+
+.ev-list-operation .import-exercise .ivu-btn {
+    margin-right: 10px;
+}
+
+.ev-list-operation .ivu-icon {
+    font-size: 16px;
+    margin-right: 6px;
+    cursor: pointer;
+    vertical-align: initial;
+}
+
+.ev-list-operation .ivu-checkbox-checked .ivu-checkbox-inner {
+    background: #01b4ef;
+    border-color: #01b4ef;
+}
+
+.ev-list-operation .operation-cart {
+    position: fixed;
+    right: 70px;
+    bottom: -10px;
+    height: 100px;
+    width: 100px;
+    padding: 0 10px;
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+    z-index: 999;
+}
+
+.ev-list-operation .operation-cart img {
+    width: 60px;
+    height: 50px;
+    cursor: pointer;
+}
+
+.ev-list-operation .operation-cart span {
+    cursor: pointer;
+    font-size: 16px;
+    font-weight: bold;
+    margin-right: 10px;
+}
+
+.ev-list-operation .ivu-poptip-title {
+    display: none;
+}
+
+.ev-list-operation .ivu-poptip-body {
+    padding: 0;
+}
+
+.ev-list-operation .ivu-poptip-popper[x-placement^=top] .ivu-poptip-arrow::after {
+    border-top-color: rgb(16, 171, 231);
+}
+
+.basket-content {
+    width: 300px;
+}
+
+.basket-content .basket-title {
+    height: 40px;
+    font-size: 16px;
+    text-align: center;
+    line-height: 40px;
+    color: #fff;
+    background: rgb(16, 171, 231);
+}
+
+.basket-content .basket-body {
+    width: 100%;
+    padding: 20px;
+}
+
+.basket-content .basket-body .ivu-progress {
+    width: 45%;
+}
+
+.basket-content .basket-body .ivu-progress-inner {
+    vertical-align: unset;
+}
+
+.basket-content .basket-body .basket-item {
+    margin-top: 15px;
+}
+
+.basket-content .basket-body .basket-delete {
+    font-size: 14px;
+    margin-left: 5px;
+    color: #01b4ef;
+}
+
+.basket-content .basket-footer {
+    height: 40px;
+    font-size: 16px;
+    text-align: center;
+    line-height: 40px;
+    margin-top: 20px;
+    color: #fff;
+    background: rgb(16, 171, 231);
+    cursor: pointer;
+}
+
+.basket-content .basket-footer-no {
+    height: 40px;
+    font-size: 16px;
+    text-align: center;
+    line-height: 40px;
+    margin-top: 20px;
+    color: #fff;
+    background: #ccc;
+    cursor: pointer;
+}
+
+
+
+.ev-content {
+    background: none;
+}
+
+.content-wrap {
+    position: relative;
+    width: 100%;
+    height: auto;
+    display: flex;
+    flex-direction: column;
+}
+
+.content-wrap .exercise-item {
+    width: 100%;
+    height: auto;
+    padding: 10px 20px 10px 20px;
+    margin-top: 10px;
+    font-size: 16px;
+    font-weight: 600;
+    background: #fff;
+    cursor: pointer;
+    /*box-shadow: 6px 5px 5px 2px rgb(214, 214, 214);*/
+}
+
+.content-wrap .exercise-item table, .content-wrap .exercise-item td {
+    border: 1px solid rgb(128, 128, 128);
+    border-collapse: collapse;
+    text-align: center;
+    padding: 5px 10px;
+}
+
+.content-wrap .exercise-item:hover {
+    box-shadow: 0px 0px 20px 2px rgb(228, 224, 224);
+}
+
+.content-wrap .exercise-item:hover .item-tools-bind {
+    display: unset;
+}
+
+.content-wrap .exercise-item p {
+    /*margin: 10px 0;*/
+    display: inline-block;
+    word-break: break-all;
+}
+
+.complete-line {
+    margin: 0 5px;
+    padding: 0 45px;
+    border-bottom: 2px solid rgb(128, 128, 128);
+}
+
+.exercise-item .item-question {
+    /*display: inline-block;*/
+    /*margin-top:20px;*/
+    position: relative;
+    cursor: pointer;
+}
+
+.exercise-item .item-question .item-btn-toggle {
+    position: absolute;
+    right: 0;
+    top: 0;
+}
+
+.exercise-item .item-question .item-btn-toggle .ivu-icon {
+    font-size: 22px;
+    cursor: pointer;
+}
+
+.exercise-item .item-difficulty {
+    display: inline-block;
+    padding: 2px 10px;
+    background: rgb(16, 171, 231);
+    border-radius: 5px;
+    color: #fff;
+    font-size: 12px;
+}
+
+.exercise-item .item-type {
+    display: inline-block;
+    padding: 1px 9px;
+    border-radius: 5px;
+    color: #fff;
+    font-size: 12px;
+    margin-left: 5px;
+    background: rgb(16, 171, 231);
+}
+
+.exercise-item .item-relevant-points {
+    display: inline-block;
+    padding: 1px 9px;
+    font-size: 13px;
+}
+
+.exercise-item .item-options {
+    margin-top: 10px;
+}
+
+.exercise-item .item-options .item-option-content {
+    margin: 7px 0;
+}
+
+.exercise-item .toggle-area {
+    border-top: 1px #c3c3c34d dashed;
+    padding-top: 10px;
+    margin-top: 10px;
+}
+
+.exercise-item .item-answer {
+    display: inline-block;
+    cursor: pointer;
+    margin-top: 12px;
+    font-size: 14px;
+}
+
+.exercise-item .item-answer-item {
+    margin-left: 25px;
+    padding: 0 25px;
+    border-bottom: 2px solid rgb(128, 128, 128);
+}
+
+.exercise-item .item-answer-details {
+    margin: 10px 20px;
+}
+
+.exercise-item .item-answer .answer-title-line {
+    background: rgb(0, 173, 37);
+    padding: 0 3px;
+    border-radius: 5px;
+}
+
+.exercise-item .item-answer .answer-title {
+    margin-left: 10px;
+    color: rgb(0, 173, 37);
+}
+
+.exercise-item .item-explain {
+    display: table;
+    margin-top: 10px;
+    margin-left: -10px;
+    cursor: pointer;
+    font-size: 14px;
+}
+
+.exercise-item .item-explain-item {
+    margin-left: 25px;
+    padding: 0 25px;
+    border-bottom: 2px solid rgb(128, 128, 128);
+}
+
+.exercise-item .item-explain-details {
+    margin: 10px;
+    display: inline-block;
+}
+
+.exercise-item .item-explain .explain-title-line {
+    background: rgb(16, 171, 231);
+    padding: 0 3px;
+    border-radius: 5px;
+}
+
+.exercise-item .item-explain .explain-title {
+    margin-left: 10px;
+    color: rgb(16, 171, 231);
+}
+
+.exercise-item .item-tools {
+    width: 100%;
+    padding: 10px 0;
+    margin-top: 20px;
+    font-size: 14px;
+    border-top: 1px #c3c3c34d dashed;
+}
+
+.exercise-item .item-tools .item-tools-action {
+    float: right;
+    color: #01b4ef;
+    margin: 0 20px;
+    margin-top: 8px;
+    font-size: 14px;
+    display: flex;
+    align-items: center;
+    cursor: pointer;
+}
+
+.exercise-item .item-tools .item-tools-action .ivu-icon {
+    font-size: 18px;
+}
+
+.exercise-item .item-tools .ivu-icon {
+    font-size: 16px;
+    margin-right: 5px;
+    font-weight: bold;
+}
+
+.exercise-item .item-tools .ivu-btn {
+    float: right;
+    border-color: transparent;
+    box-shadow: none;
+}
+
+.exercise-item .item-tools-tool {
+    margin-left: 10px;
+    font-weight: bold;
+    cursor: pointer;
+    color: rgb(16, 171, 231);
+    font-size: 14px;
+}
+
+.exercise-item .item-tools-tool .ivu-icon {
+    margin-left: 15px;
+    vertical-align: top;
+}
+
+.exercise-item .item-tools-tool .item-bind-point {
+    color: rgb(128, 128, 128);
+    margin-left: 5px;
+}
+
+.exercise-item .item-tools-tool .ivu-tag {
+    margin-top: -2px;
+}
+
+.exercise-item .item-tools-tool .ivu-tag-border {
+    line-height: 22px;
+}
+
+
+.exercise-item .item-tools .item-tools-info {
+    vertical-align: sub;
+    color: #868686;
+    border-right: 2px solid #d2d2d2;
+    font-size: 12px;
+    padding: 0 10px;
+}
+
+.exercise-item .item-tools .item-tools-info:first-child {
+    padding-left: 0;
+}
+
+
+.ev-list-container h1, h2, h3, h4, h5, h6 {
+    display: inline-block;
+}
+
+.filter-wrap {
+    width: 100%;
+    padding: 20px;
+    background: #fff;
+}
+
+.filter-wrap .filter-item:first-child {
+    margin-top: 0px;
+}
+
+.filter-wrap .filter-item {
+    margin-top: 10px;
+}
+
+.filter-wrap .filter-title {
+    font-size: 16px;
+    font-weight: bold;
+    margin-right: 10px;
+}
+
+.filter-wrap .ivu-radio-group {
+    padding-bottom: 4px;
+}
+
+.filter-wrap .ivu-radio-wrapper {
+    padding: 0 10px;
+    margin-left: 15px;
+    height: 28px;
+    line-height: 28px;
+    box-shadow: none !important;
+    border: none !important;
+    font-size: 14px;
+    border-radius: 0 !important;
+}
+
+.filter-wrap .ivu-radio-wrapper .ivu-icon {
+    margin-bottom: 2px;
+}
+
+.filter-wrap .ivu-radio-wrapper:after, .ivu-radio-group-button .ivu-radio-wrapper:before {
+    content: none;
+}
+
+.filter-wrap .ivu-radio-group-item {
+    border-radius: 5px !important;
+}
+
+.filter-wrap .ivu-radio-wrapper-checked {
+    background: rgb(16, 171, 231);
+    box-shadow: none !important;
+    color: white;
+}
+
+.filter-wrap .ivu-radio-group-button .ivu-radio-wrapper-checked:hover {
+    color: #fff !important;
+}
+
+
+
+.filter-wrap .ivu-checkbox-group {
+    padding-bottom: 4px;
+    display: inline-block;
+}
+
+.filter-wrap .ivu-checkbox-inner,
+.filter-wrap .ivu-checkbox-checked,
+.filter-wrap .ivu-checkbox {
+    display: none;
+}
+
+.filter-wrap .ivu-checkbox-wrapper {
+    padding: 0 10px;
+    margin-left: 15px;
+    height: 28px;
+    line-height: 28px;
+    box-shadow: none !important;
+    border: none !important;
+    font-size: 14px;
+    border-radius: 0 !important;
+}
+
+.filter-wrap .ivu-checkbox-wrapper .ivu-icon {
+    margin-bottom: 2px;
+}
+
+.filter-wrap .ivu-checkbox-wrapper:after, .ivu-checkbox-group-button .ivu-checkbox-wrapper:before {
+    content: none;
+}
+
+.filter-wrap .ivu-checkbox-group-item {
+    border-radius: 5px !important;
+}
+
+.filter-wrap .ivu-checkbox-wrapper-checked {
+    background: rgb(16, 171, 231);
+    box-shadow: none !important;
+    color: white;
+}
+
+.filter-wrap .ivu-checkbox-group-button .ivu-checkbox-wrapper-checked:hover {
+    color: #fff !important;
+}
+
+
+.ev-list-container .ivu-page {
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    margin: 20px 0;
+}
+
+/*绑定知识点部分树形结构样式*/
+
+.singleClass {
+    cursor: pointer;
+    font-size: 14px;
+    margin: 10px;
+}
+
+.transferModal {
+    overflow: hidden;
+}
+
+.transferModal .point-list {
+    max-height: 400px;
+    overflow: auto;
+}
+
+.transferModal .point-list .ivu-input-wrapper {
+    width: 90%;
+    margin-bottom: 10px;
+}
+
+.transferModal .selected-point-list {
+    padding: 10px;
+    width: 100%;
+    border-top: 1px solid rgba(128, 128, 128,.3);
+    margin-top: 15px;
+}
+
+.transferModal .bind-title {
+    margin: 10px 0;
+    font-weight: bold;
+    font-size: 14px;
+}
+
+.transferModal .checked-point {
+    margin: 5px 10px;
+    background: rgb(16, 171, 231);
+    padding: 5px 10px;
+    color: #fff;
+    border-radius: 5px;
+    display: inline-block;
+}
+
+.transferModal .ivu-checkbox-checked .ivu-checkbox-inner {
+    background: rgb(16, 171, 231);
+    border-color: rgb(16, 171, 231);
+}
+
+.transferModal .ivu-icon {
+    color: rgb(16, 171, 231);
+}
+
+.transferModal .btn-clear {
+    float: right;
+    font-weight: 500;
+    font-size: 12px;
+    color: rgb(16, 171, 231);
+    cursor: pointer;
+    letter-spacing: 1px;
+}
+
+.transferModal .point-checkbox {
+    margin-left: 10px;
+    border-radius: 2px;
+    width: 15px;
+    height: 15px;
+    padding: 2px;
+    vertical-align: middle;
+    box-sizing: border-box;
+    border: 1px solid #dcdee2;
+}
+
+.transferModal .point-checked {
+    background: rgb(16, 171, 231);
+    background-clip: content-box;
+}
+
+.transferModal .ivu-tabs-nav-scroll {
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+}
+
+.transferModal .ivu-tree-empty {
+    text-align: center;
+    margin: 15px;
+    color: rgb(128, 128, 128);
+}
+

+ 576 - 0
TEAMModelOS/ClientApp/src/view/evaluation/bank/ExerciseList.vue

@@ -0,0 +1,576 @@
+<template>
+    <div class="ev-list-container">
+        <!-- 筛选部分 -->
+        <div class="filter-wrap">
+            <div class="filter-item">
+                <span class="filter-title">来源:</span>
+                <RadioGroup v-model="filterOrigin" type="button" @on-change="filterOriginChange">
+                    <Radio :label="userId">私有题库</Radio>
+                    <Radio :label="schoolCode">学校公用库</Radio>
+                </RadioGroup>
+            </div>
+            <div class="filter-item">
+                <span class="filter-title">学段:</span>
+                <RadioGroup v-model="filterPeriod" type="button" @on-change="filterPeriodChange">
+                    <Radio v-for="(item,index) in periodList" :key="index" :label="index">{{ item.periodName }}</Radio>
+                </RadioGroup>
+            </div>
+            <div class="filter-item">
+                <span class="filter-title">年级:</span>
+                <CheckboxGroup v-model="filterGrade" border @on-change="filterGradeChange">
+                    <Checkbox lable="all">全部</Checkbox>
+                    <Checkbox v-for="(item,index) in gradeList" :key="index" :label="item.gradeCode">{{ item.gradeName }}</Checkbox>
+                </CheckboxGroup>
+            </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>
+            </div>
+            <div class="filter-item">
+                <span class="filter-title">题型:</span>
+                <CheckboxGroup v-model="filterType" border @on-change="filterTypeChange">
+                    <Checkbox label="all">全部</Checkbox>
+                    <Checkbox label="Single">单选</Checkbox>
+                    <Checkbox label="Multiple">多选</Checkbox>
+                    <Checkbox label="Judge">判断</Checkbox>
+                    <Checkbox label="Complete">填空</Checkbox>
+                    <Checkbox label="Subjective">问答</Checkbox>
+                </CheckboxGroup>
+            </div>
+            <div class="filter-item">
+                <span class="filter-title">难度:</span>
+                <CheckboxGroup v-model="filterDiff" border @on-change="filterDiffChange">
+                    <Checkbox label="all">全部</Checkbox>
+                    <Checkbox v-for="(item,index) in exersicesDiff" :key="index" :label="index + 1">{{ item }}</Checkbox>
+                </CheckboxGroup>
+            </div>
+            <div class="filter-item">
+                <span class="filter-title">层次:</span>
+                <CheckboxGroup v-model="filterField" border @on-change="filterFieldChange">
+                    <Checkbox label="all">全部</Checkbox>
+                    <Checkbox label="0">应用</Checkbox>
+                    <Checkbox label="1">综合</Checkbox>
+                    <Checkbox label="2">理解</Checkbox>
+                    <Checkbox label="3">评鉴</Checkbox>
+                    <Checkbox label="4">知识</Checkbox>
+                </CheckboxGroup>
+            </div>
+            <div class="filter-item">
+                <span class="filter-title">排序:</span>
+                <RadioGroup v-model="filterSort" type="button" @on-change="filterSortChange">
+                    <Radio label="createTime">新增时间<Icon type="md-arrow-round-down" /></Radio>
+                    <Radio label="usageCount">使用次数<Icon type="md-arrow-round-down" /></Radio>
+                </RadioGroup>
+            </div>
+        </div>
+        <div class="ev-list-operation">
+            <Checkbox v-model="isShowAnswer" style="visibility:hidden"></Checkbox>
+            <span class="import-exercise">
+                <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>
+            </span>
+        </div>
+        <!-- 筛选部分结束 -->
+        <!-- 题目列表部分 -->
+        <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'" />
+                    </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>
+                                </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>
+                        </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>
+                        </div>
+                        <!-- 底部题目操作栏 -->
+                        <div class="item-tools">
+                            <span class="item-tools-info">题型:{{ exersicesType[item.type] }}</span>
+                            <span class="item-tools-info">难度:{{ exersicesDiff[item.level] }}</span>
+                            <span class="item-tools-info">使用次数:{{ 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="primary" @click="handleEdit(item)" style="margin-right:10px">选题</Button>
+                            <div class="item-tools-action">
+                                <Icon type="md-trash" />删除
+                            </div>
+                            <div class="item-tools-action">
+                                <Icon type="md-create" />编辑
+                            </div>
+                        </div>
+                    </div>
+                </transition>
+            </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]" />
+
+    </div>
+</template>
+<script>
+    import Loading from '@/common/Loading.vue'
+    import { setTimeout } from 'core-js'
+    export default {
+        components: {
+            Loading
+        },
+        data() {
+            return {
+                userId: 'habook0001',
+                schoolCode: '',
+                dataLoading: false,
+                exerciseList: [],
+                schoolInfo: {},
+                isShowUploadList: false,
+                exersicesType: {
+                    Single: '单选',
+                    Multiple: '多选',
+                    Judge: '判断',
+                    Complete: '填空',
+                    Subjective: '问答',
+                    Compose: '综合题'
+                },
+                exersicesDiff: ['容易', '较易', '一般', '较难', '困难'],
+                diffColors: ['#32CF74', '#E8BE15', '#F19300', '#EB5E00', '#D30000'],
+                filterType: ['all'],
+                filterOrigin: 'habook0001',
+                filterDiff: ['all'],
+                filterField: ['all'],
+                filterSort: 'createTime',
+                filterPeriod: 0,
+                filterGrade: [false],
+                filterSubject: [false],
+                totalNum: 0,
+                isShowAnswer: true,
+                importLoading: false,
+                pageSize: 5,
+                pageNum: 1,
+                currentPage: 1,
+                collapseList: [],
+                periodList: [],
+                gradeList: [],
+                subjectList: [],
+                filterParams: {}
+            }
+        },
+        created() {
+            this.getSchoolInfo()
+
+        },
+        methods: {
+            /** 获取区班校信息 */
+            getSchoolInfo() {
+                this.$store.dispatch('schoolBaseInfo/getSchoolBaseData').then(res => {
+                    this.schoolInfo = JSON.parse(JSON.stringify(res.data))
+                    this.schoolCode = res.data.schoolCode
+                    this.periodList = res.data.period
+                    this.gradeList = res.data.period[0].grades
+                    this.subjectList = res.data.period[0].subjects
+                    this.doFilter();
+                })
+            },
+
+            /** 执行筛选条件获取数据 */
+            doFilter() {
+                this.dataLoading = true
+                this.collapseList = [] // 所有详情都收起来
+                /** 定义查询接口的参数规格 */
+                this.filterParams = {
+                    '@CURRPAGE': this.pageNum,
+                    '@PAGESIZE': this.pageSize,
+                    '@DESC': this.filterSort,
+                    'scopeCode': this.filterOrigin,
+                    'period': [this.periodList[this.filterPeriod].periodCode],
+                    'grade': this.deleteFalse(this.filterGrade),
+                    'subject': this.deleteFalse(this.filterSubject),
+                    'scopeCode': this.filterOrigin,
+                    'level': this.deleteFalse(this.filterDiff),
+                    'type': this.deleteFalse(this.filterType),
+                    'field': this.deleteFalse(this.filterField),
+                }
+
+                /** 查询总数参数 */
+                let findCountParams = {
+                    "collectionName": "ExamItem",
+                    "queryDict": {
+                        'scopeCode': this.filterOrigin,
+                        'period': [this.periodList[this.filterPeriod].periodCode],
+                        'grade': this.deleteFalse(this.filterGrade),
+                        'subject': this.deleteFalse(this.filterSubject),
+                        'scopeCode': this.filterOrigin,
+                        'level': this.deleteFalse(this.filterDiff),
+                        'type': this.deleteFalse(this.filterType),
+                        'field': this.deleteFalse(this.filterField),
+                    }
+                }
+
+
+                this.getExerciseList(this.filterParams)
+                this.getResultCount(findCountParams)
+            },
+
+            /**
+             * 获取最新题库列表
+             * @param data
+             */
+            getExerciseList(data) {
+                let that = this
+                this.$api.newEvaluation.FindExerciseList(data).then(res => {
+                    this.exerciseList = res.result.data
+                    setTimeout(() => {
+                        that.dataLoading = false
+                    }, 1000)
+                })
+            },
+
+            /**
+             * 获取筛选结果数量
+             * @param data
+             */
+            getResultCount(data) {
+                this.$api.newEvaluation.FindCount(data).then(res => {
+                    this.totalNum = res.result.data[0]
+                })
+            },
+
+            /**
+             * 根据ID获取试题详细数据
+             * @param id 试题ID
+             */
+            getDetailsById(id, index) {
+                this.$api.newEvaluation.FindExerciseById(id).then(res => {
+                    /* 查询到详细数据则替换掉原数据 */
+                    this.exerciseList.splice(index, 1, res.result.data)
+                })
+            },
+
+            /**
+             * 题干展开与收缩
+             * @param index
+             * @param id
+             */
+            onQuestionToggle(index, id, e) {
+                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 + 490) // 490就是 content-wrap 距离顶部高度
+            },
+
+
+            /**
+             * 筛选学段条件
+             * @param val
+             */
+            filterPeriodChange(val) {
+                //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.pageChange(1)
+            },
+
+            /**
+             * 筛选年级
+             * @param val
+             */
+            filterGradeChange(val) {
+                if (val !== [false] && val.indexOf(false) === 0) {
+                    this.filterGrade.splice(val.indexOf(false), 1)
+                } else if (val.indexOf(false) > 0) {
+                    this.filterGrade = [false]
+                }
+                this.pageChange(1)
+            },
+
+            /**
+             * 筛选科目
+             * @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)
+            },
+
+            /**
+             * 根据题库加载题目
+             * @param val
+             */
+            filterOriginChange(origin) {
+                this.filterOrigin = origin
+                this.pageChange(1)
+
+            },
+
+            /**
+             * 筛选题型
+             * @param val
+             */
+            filterTypeChange(val) {
+                if (val !== ['all'] && val.indexOf('all') === 0) {
+                    this.filterType.splice(val.indexOf('all'), 1)
+                } else if (val.indexOf('all') > 0) {
+                    this.filterType = ['all']
+                }
+                this.pageChange(1)
+            },
+
+            /**
+             * 筛选难度
+             * @param val
+             */
+            filterDiffChange(val) {
+                if (val !== ['all'] && val.indexOf('all') === 0) {
+                    this.filterDiff.splice(val.indexOf('all'), 1)
+                } else if (val.indexOf('all') > 0) {
+                    this.filterDiff = ['all']
+                }
+                this.pageChange(1)
+            },
+
+            /**
+             * 筛选认知层次
+             * @param val
+             */
+            filterFieldChange(val) {
+                if (val !== ['all'] && val.indexOf('all') === 0) {
+                    this.filterField.splice(val.indexOf('all'), 1)
+                } else if (val.indexOf('all') > 0) {
+                    this.filterField = ['all']
+                }
+                this.pageChange(1)
+            },
+
+            /**
+             * 排序条件更换
+             * @param val
+             */
+            filterSortChange(val) {
+                this.pageChange(1)
+            },
+
+            /**
+             * 删除筛选条件里面的False值与All值
+             * @param arr
+             */
+            deleteFalse(arr) {
+                let list = JSON.parse(JSON.stringify(arr))
+                list.forEach((item, index) => { if (!item || item === 'all') list.splice(index, 1) })
+                return list
+            },
+
+            /** 返回创建试题页面 */
+            goCreateExercise() {
+                this.$router.push({
+                    name: 'createExercises'
+                })
+            },
+
+            /**
+             * 切换页码操作
+             * @param page
+             */
+            pageChange(page) {
+                this.pageNum = page
+                this.doFilter()
+                this.pageScrollTo(0)
+            },
+
+            /**
+             * 页面滚动事件
+             * @param scrollDistance 页面滚动距离
+             */
+            pageScrollTo(scrollDistance) {
+                let parentVm = this.$parent.$parent.$parent.$parent.$parent.$parent
+                parentVm.$refs['evScroll'].scrollTo(
+                    {
+                        y: scrollDistance
+                    },
+                    500, 'easeInQuad'
+                )
+            },
+
+            /**
+             * 切换每页显示数量
+             * @param val
+             */
+            pageSizeChange(val) {
+                this.pageSize = val
+                this.pageChange(1)
+            },
+
+            /**
+             * 更新时间日期格式化
+             * @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;
+            },
+
+            // 编辑习题
+            handleEdit(item) {
+                item.options = item.option
+                item.difficulty = item.difficulty || 2
+                this.$router.push({
+                    name: 'createExercises',
+                    params: {
+                        item: item
+                    }
+                })
+            },
+
+            // 导入试题
+            uploadSuccess(response, file, fileList) {
+                let that = this
+                this.importLoading = true
+                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.importLoading = false
+                            }, 1000)
+                            // this.saveItemBank(res.result.data);
+                        }
+                    })
+                } else {
+                    this.$Message.error('对不起,文档解析失败!')
+                }
+            },
+
+            // 保存试题到数据库
+            saveItemBank(list) {
+                this.$api.SaveItemBank(list).then(res => {
+                    console.log(res)
+                })
+            }
+
+        },
+        mounted() {
+
+        },
+        computed: {
+            headers() {
+                let hd = {}
+                hd['Authorization'] = 'Bearer ' + localStorage.getItem('token')
+                return hd
+            }
+        }
+    }
+</script>
+<style scoped>
+    @import "../index/ExercisesList.css";
+</style>
+
+<style>
+    .circle {
+        border: solid 1px red;
+        background-color: red;
+        border-radius: 50%;
+        width: 50px;
+        height: 50px;
+    }
+
+    .slide-enter-active {
+        transition: all .3s ease;
+    }
+
+    .slide-leave-active {
+        transition: all .3s ease;
+    }
+
+    .slide-enter, .slide-leave-to {
+        transform: translateY(10px);
+        opacity: 0;
+    }
+</style>

+ 68 - 0
TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.less

@@ -0,0 +1,68 @@
+.pl-container {
+    height: 100%;
+    width: 98%;
+    margin: 0 auto;
+    user-select: none;
+    font-family: '微軟正黑體', 'Heiti TC' !important;
+}
+
+.pl-content-wrap {
+    width: 100%;
+    .fl-col-center;
+
+    .paper-item {
+        width: 100%;
+        height: 90px;
+        background: White;
+        margin-top: 15px;
+        .fl-col-center;
+        align-items: start;
+        border-radius:5px;
+
+        &-name {
+            font-size: 20px;
+            font-weight: bold;
+            .fl-row-center;
+        }
+
+        &-tag {
+            font-size: 12px;
+            padding: 1px 10px;
+            border-radius: 5px;
+            color: #fff;
+            background: #15a06c;
+            margin: 0 10px;
+        }
+
+        &-info {
+            margin-top: 15px;
+
+            .info-item {
+                font-size: 12px;
+                padding: 0 10px;
+
+                .info-bold {
+                    font-weight: bold;
+                    color: #494949;
+                }
+            }
+
+            .info-item:not(:last-child) {
+                border-right: 2px solid #f3f3f3;
+            }
+        }
+    }
+}
+
+.fl-col-center {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+}
+
+.fl-row-center {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}

+ 107 - 0
TEAMModelOS/ClientApp/src/view/evaluation/bank/TestPaperList.vue

@@ -0,0 +1,107 @@
+<template>
+    <div class="pl-container">
+        <!-- 条件筛选部分 -->
+        <div class="pl-filter-wrap">
+
+        </div>
+        <div v-if="paperList.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="pl-content-wrap" v-else>
+            <Loading :top="100" v-show="dataLoading" type="1"></Loading>
+            <div class="paper-item" v-for="(item,index) in paperList" :key="index">
+                <div class="paper-item-name">
+                    <span class="paper-item-tag">语文</span>
+                    <span>青城山学校2019年6月语文考卷</span>
+                </div>
+                <div class="paper-item-info">
+                    <span class="info-item">适用学段:<span class="info-bold">初中</span></span>
+                    <span class="info-item">适用年级:<span class="info-bold">七年级、八年级</span></span>
+                    <span class="info-item">题量:<span class="info-bold">25</span></span>
+                    <span class="info-item">难度系数:<span class="info-bold">0.6</span></span>
+                </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]" />
+        </div>
+    </div>
+</template>
+<script>
+    import Loading from '@/common/Loading.vue'
+    export default {
+        components: {
+            Loading
+        },
+        data() {
+            return {
+                totalNum: 0,
+                pageSize: 5,
+                pageNum: 1,
+                dataLoading: false,
+                paperList: new Array(10).fill('1')
+            }
+        },
+        created() {
+            this.getPaperList()
+        },
+        methods: {
+            /** 获取试卷列表 */
+            getPaperList() {
+                let that = this
+                this.$api.learnActivity.FindExamPaper({ scopeCode: ['habook0001', 'HBCN'] }).then(res => {
+                    this.paperList = res.result.data
+                    this.totalNum = res.result.data.length
+                    setTimeout(() => {
+                        that.dataLoading = false
+                    }, 1000)
+                })
+            },
+
+            /**
+            * 切换页码操作
+            * @param page
+            */
+            pageChange(page) {
+                this.pageNum = page
+                //this.doFilter()
+                //this.pageScrollTo(0)
+            },
+
+
+            /**
+             * 切换每页显示数量
+             * @param val
+             */
+            pageSizeChange(val) {
+                this.pageSize = val
+                this.pageChange(1)
+            },
+
+
+        },
+        mounted() {
+
+        }
+    }
+</script>
+<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;
+}
+</style>

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


+ 58 - 0
TEAMModelOS/ClientApp/src/view/evaluation/bank/index.vue

@@ -0,0 +1,58 @@
+<template>
+    <div class="bank-container">
+        <Tabs value="paper">
+            <TabPane label="试卷库" name="paper">
+                <PaperList></PaperList>
+            </TabPane>
+            <TabPane label="试题库" name="exercise">
+                <ExerciseList></ExerciseList>
+            </TabPane>
+        </Tabs>
+    </div>
+</template>
+<script>
+    import PaperList from './TestPaperList'
+    import ExerciseList from './ExerciseList'
+    export default {
+        components: { PaperList, ExerciseList },
+        data() {
+            return {
+
+            }
+        },
+        created() {
+
+        },
+        methods: {
+
+
+
+        },
+        mounted() {
+
+        }
+    }
+</script>
+<style src="./index.less" lang="less" scoped></style>
+<style>
+    .bank-container .ivu-tabs-bar {
+        border-bottom: 1px solid Silver;
+        margin: 10px 20px;
+        font-family: '微軟正黑體', 'Heiti TC' !important;
+    }
+
+    .bank-container .ivu-tabs-nav .ivu-tabs-tab:active,
+    .bank-container .ivu-tabs-nav .ivu-tabs-tab:hover,
+    .bank-container .ivu-tabs-nav .ivu-tabs-tab-active,
+    .bank-container .ivu-tabs-nav .ivu-tabs-tab {
+        color: #515050;
+        font-weight: bold;
+        font-size: 16px;
+    }
+
+    .bank-container .ivu-tabs-ink-bar {
+        height: 4px;
+        background: #5d6260;
+        /*margin-left:20px;*/
+    }
+</style>

+ 22 - 10
TEAMModelOS/ClientApp/src/view/evaluation/index/CreateExercises.css

@@ -1,7 +1,8 @@
 .ev-container {
-    user-select:none !important;
-    background:#fff;
-    padding:30px;
+    user-select: none !important;
+    background: #fff;
+    padding: 30px;
+    font-family: '微軟正黑體', 'Heiti TC' !important;
 }
 
     .ev-container .w-e-text-container {
@@ -32,11 +33,26 @@
 
 .exersices-attr {
     width: 100%;
+    margin-top:30px;
 }
 
-.exersices-attr-type {
-    width: 50%;
-}
+    .exersices-attr .ivu-select-selection {
+        width:300px;
+        margin-top:20px;
+        height:40px;
+    }
+        .exersices-attr .ivu-select-selection .ivu-select-selected-value {
+            height: 40px;
+            line-height: 40px;
+        }
+    .exersices-attr .ivu-select-dropdown {
+        min-width: 300px !important;
+    }
+
+
+    .exersices-attr-type {
+        width: 33%;
+    }
 
 
 .my-radio-style .ivu-radio-group-button .ivu-radio-wrapper {
@@ -248,7 +264,3 @@ exersices-attr-diff {
     margin-left: -40px;
     margin-top: -20px;
 }
-
-.exersices-attr-diff .ivu-radio-group-button .ivu-radio-wrapper-checked {
-    background: rgb(50, 207, 116);
-}

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

@@ -2,37 +2,50 @@
     <div class="ev-container">
         <span class="ev-title"><Icon type="ios-paper" />{{isEdit?'编辑习题':'新建习题'}}</span>
         <Divider />
-        <div class="exersices-attr display-flex exersice-school-info">
-            <div class="exersices-attr-type my-radio-style">
-                <IconText :text="'选择学段'" :color="'green'" :icon="'md-apps'"></IconText>
-                <Select v-model="exercisePeriod" style="width:200px;margin-top:20px" @on-change="onPeriodChange">
+        <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">
-                <IconText :text="'选择年级'" :color="'red'" :icon="'md-pulse'"></IconText>
-                <Select v-model="exerciseGrade" style="width:200px;margin-top:20px">
+            <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="index" :key="index">{{ grade.gradeName }}</Option>
                 </Select>
             </div>
-        </div>
-        <div class="exersices-attr display-flex" style="margin-top:30px">
             <div class="exersices-attr my-radio-style">
-                <IconText :text="'选择科目'" :color="'red'" :icon="'md-pulse'"></IconText>
-                <Select v-model="exerciseSubject" style="width:200px;margin-top:20px">
+                <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="'red'" :icon="'md-pulse'"></IconText>
-                <Select v-model="exerciseScope" style="width:200px;margin-top:20px">
+                <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>
+                <Select v-model="exerciseSubject">
+                    <Option v-for="(subject,index) in subjectList" :value="index" :key="index">{{ subject.subjectName }}</Option>
+                </Select>
+            </div>
+
         </div>
-        <div class="exersices-attr display-flex" style="margin-top:30px">
+        <div class="exersices-attr display-flex">
             <div class="exersices-attr-type my-radio-style">
-                <IconText :text="'选择题型'" :color="'green'" :icon="'md-apps'"></IconText>
+                <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>
@@ -43,7 +56,7 @@
                 </RadioGroup>
             </div>
             <div class="exersices-attr-diff my-radio-style">
-                <IconText :text="'题目难度'" :color="'red'" :icon="'md-pulse'"></IconText>
+                <IconText :text="'题目难度'" :color="'#00b8ff'" :icon="'md-pulse'"></IconText>
                 <RadioGroup v-model="exersicesDiff" type="button">
                     <Radio label="0" @click.native="diffChange($event,'0')">容易</Radio>
                     <Radio label="1" @click.native="diffChange($event,'1')">较易</Radio>
@@ -104,11 +117,13 @@
                 editInfo: {},
                 schoolInfo: {},
                 exersicesType: 'Single',
+                exerciseField:0,
                 exercisePeriod: 0,
                 exerciseGrade: 0,
                 exerciseSubject: 0,
                 exerciseScope: 0,
                 scopeList: ['个人题库', '校本题库'],
+                fieldList:['应用','综合','理解','评鉴','知识'],
                 periodList: [],
                 gradeList: [],
                 subjectList: [],
@@ -248,7 +263,7 @@
             diffChange(e, type) {
                 this.exersicesDiff = type
                 e.preventDefault()
-                let colorArr = ['#32CF74', '#E8BE15', '#F19300', '#EB5E00', '#D30000']
+                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'

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

@@ -201,7 +201,7 @@
     .content-wrap .exercise-item {
         width: 100%;
         height: auto;
-        padding: 20px 20px 10px 20px;
+        padding: 10px 20px 10px 20px;
         margin-top: 10px;
         font-size: 16px;
         font-weight: 600;
@@ -247,6 +247,7 @@
     .exercise-item .item-question .item-btn-toggle {
         position: absolute;
         right: 0;
+        top:0;
     }
 
         .exercise-item .item-question .item-btn-toggle .ivu-icon {

+ 0 - 16
TEAMModelOS/ClientApp/src/view/evaluation/index/ExercisesList.vue

@@ -89,22 +89,6 @@
         <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-types">
-                    <span class="item-difficulty" :style="{backgroundColor:diffColors[item.difficulty || 3]}">{{exersicesDiff[item.difficulty || 3]}}</span>
-                    <span class="item-type">{{exersicesType[item.type]}}</span>
-                    <span class="item-relevant-points">
-                        <span class="item-tools-bind">
-                            <span class="item-tools-tool">
-                                <span class="item-bind-point">已关联知识点:</span>
-                                <span class="item-bind-point" v-for="(concept,index) in item.concept" :key="index" v-show="item.concept"><Tag color="success">{{concept.name}}</Tag></span>
-                                <span class="item-bind-point" v-show="!item.concept">暂未关联</span>
-                                <Icon type="md-link" size="20" />
-                                <span @click="handleBindPoint(item.concept || [])">绑定知识点</span>
-                            </span>
-                        </span>
-                    </span>
-                </div>-->
                 <!-- 题干部分 -->
                 <div class="item-question" style="pointer-events:none">
                     <p>{{ pageSize * (pageNum - 1) + index + 1 }} : <span v-html="item.question"></span></p>

+ 7 - 356
TEAMModelOS/ClientApp/src/view/evaluation/index/TestPaperList.vue

@@ -1,374 +1,25 @@
 <template>
-  <div class="ev-list-container">
-    <div class="ev-header">
-      <Icon type="md-bookmarks" size="30" color="rgb(16, 171, 231)" />
-      <span class="ev-title">我的评测</span>
-      <span class="ev-length">共 {{list.length}} 道题</span>
-    </div>
-    <!-- 筛选部分 -->
-    <div class="filter-wrap">
-      <div class="filter-item">
-        <span class="filter-title">测试用途:</span>
-        <RadioGroup v-model="testAttr.testType" type="button" @on-change="filterTypeChange">
-          <Radio label="0">正式考试</Radio>
-          <Radio label="1">普通测试</Radio>
-          <Radio label="2">统计</Radio>
-        </RadioGroup>
-      </div>
-      <div class="filter-item">
-        <span class="filter-title">测试情景:</span>
-        <RadioGroup v-model="testAttr.testScene" type="button" @on-change="filterSceneChange">
-          <Radio label="0">模拟</Radio>
-          <Radio label="1">段考</Radio>
-          <Radio label="2">周考</Radio>
-          <Radio label="3">小考</Radio>
-          <Radio label="4">自定义</Radio>
-        </RadioGroup>
-      </div>
-      <div class="filter-item">
-        <span class="filter-title">测试对象:</span>
-        <RadioGroup v-model="testAttr.testTarget" type="button" @on-change="filterTargetChange">
-          <Radio label="0">同年级</Radio>
-          <Radio label="1">跨年级</Radio>
-          <Radio label="2">跨学校</Radio>
-        </RadioGroup>
-      </div>
-      <div class="filter-item">
-        <span class="filter-title">创建方式:</span>
-        <RadioGroup v-model="testAttr.createType" type="button" @on-change="filterCreateChange">
-          <Radio label="0">自动组题</Radio>
-          <Radio label="1">批量导入</Radio>
-          <Radio label="2">题库挑选</Radio>
-        </RadioGroup>
-      </div>
-      <div class="filter-item">
-        <span class="filter-title">排序方式:</span>
-        <RadioGroup v-model="filterSort" type="button" @on-change="filterSortChange">
-          <Radio label="0">新增时间<Icon type="md-arrow-round-down" /></Radio>
-          <Radio label="1">使用次数<Icon type="md-arrow-round-down" /></Radio>
-        </RadioGroup>
-      </div>
-    </div>
-    <!-- 题目列表部分 -->
-    <div v-if="list.length === 0">暂无数据</div>
-    <div class="content-wrap" v-else>
-      <div class="exercise-item" v-for="(item,index) of list" :key="index">
-        <img class="icon-paper" src="../../../assets/icon/icon_paper.png" />
-        <div class="paper-content">
-          <p class="paper-title" v-html="item.type"></p>
-          <p class="paper-info">
-            <span style="margin-left:0"><Icon type="md-clock" />修改时间:2019-06-26</span>
-            <span><Icon type="md-eye" />使用次数:8</span>
-            <span><Icon type="md-document" />类型:期末考试</span>
-          </p>
-        </div>
-        <div class="paper-operation">
-          <Button type="primary" icon="ios-download-outline">推送</Button>
-          <Button type="success" icon="ios-download-outline">下载</Button>
-        </div>
-      </div>
-
-    </div>
-    <Page :total="totalNum"
-          show-sizer
-          @on-page-size-change="pageSizeChange"
-          @on-change="pageChange"
-          :page-size-opts="[5,10,15,20]" />
-    <Button type="success" @click="backToAdd" style="margin:10px;">返回</Button>
-    <Button type="success" @click="backToPaper" style="margin:10px;">试卷</Button>
-    <create-link :path="'/home/evaluation/createTest'" :tips="'新建测试'" ></create-link>
-  </div>
+  
 </template>
 <script>
-  import questions from './list.json'
-  import { setTimeout } from 'core-js'
-  import CreateLink from '@/common/CreateLink.vue'
+  
   export default {
-    components: {
-      CreateLink
-    },
+    
     data() {
       return {
-        list: [],
-        searchWord: '',
-        pointListLoading: true,
-        schoolInfo: {},
-        bindPointModal: false,
-        exersicesType: {
-          single: '单选',
-          multiple: '多选',
-          judge: '判断',
-          complete: '填空',
-          subjective: '问答'
-        },
-        exersicesDiff: ['容易', '较易', '一般', '较难', '困难'],
-        diffColors: ['#32CF74', '#E8BE15', '#F19300', '#EB5E00', '#D30000'],
-        testAttr: {
-          testScene: '0',
-          testType: '0',
-          testTarget: '0',
-          testMode: '0',
-          createType: '0',
-          questionFilter: []
-        },
-        filterSort: '0',
-        pageSize: 5,
-        pageNum: 1,
-        totalNum: 100,
-        allList: questions.result.data,
-        knowPointList: [],
-        schoolPointList: [],
-        allPointList: [],
-        checkedPointList: []
+        
       }
     },
     created() {
-      this.schoolInfo = JSON.parse(localStorage.getItem('c_role_info')).roleClaim[0]
-      this.list = questions.result.data
-      this.totalNum = questions.result.data.length
-      if (this.$route.params.exerciseItem) {
-        this.list.unshift(this.$route.params.exerciseItem)
-      }
+      
     },
     methods: {
 
-      // 筛选题型
-      filterTypeChange(val) {
-        if (val === 'all') {
-          this.list = questions.result.data
-        } else {
-          this.list = questions.result.data.filter(item => item.type === val)
-        }
-      },
-
-      // 筛选难度
-      filterDiffChange(val) {
-         if (val === 'all') {
-          this.list = questions.result.data
-         } else {
-           this.list = questions.result.data.filter(item => item.difficulty === val)
-        }
-      },
-
-      // 排序条件更换
-      filterSortChange(val) {
-        console.log(val)
-      },
-
-      // 展开与收起答案
-      showAnswer(e, type) {
-        let el = e.currentTarget
-        let isShow = e.currentTarget.nextElementSibling.style.display || 'none'
-        setTimeout(function() {
-          if (type === 'explain') {
-            el.nextElementSibling.style.display = isShow === 'none' ? 'block' : 'none'
-            el.innerHTML = isShow === 'none' ? '解析:点击收起解析详情' : '解析:点击展开解析详情'
-          } else {
-            el.nextElementSibling.style.display = isShow === 'none' ? 'block' : 'none'
-            el.innerHTML = isShow === 'none' ? '答案:点击收起答案详情' : '答案:点击展开答案详情'
-          }
-        }, 100)
-      },
-
-      backToAdd() {
-        this.$router.push({
-            path: '/createExercises'// 或者路径跳转path: '/addCreditCards',
-          })
-      },
-
-      backToPaper() {
-        this.$router.push({
-            path: '/testPaper'// 或者路径跳转path: '/addCreditCards',
-          })
-      },
-
-      // 切换页码
-      pageChange(page) {
-        let start = this.pageSize * (page - 1)
-        let end = this.pageSize * page
-        let list = questions.result.data
-        this.list = list.slice(start, end)
-        window.scroll(0, 0)
-      },
-
-      // 切换分页Size
-      pageSizeChange(val) {
-        this.pageSize = val
-        this.pageChange(1)
-      },
-
-      // 编辑习题
-      handleEdit(item) {
-        this.$router.push({
-            name: 'createExercises',
-            params: {
-              item: item
-            }
-          })
-      },
-
-      // 绑定知识点操作
-      handleBindPoint() {
-        this.bindPointModal = true
-        this.checkedPointList = []
-        this.knowPointList = this.schoolPointList
-      },
-
-      // 获取标准知识块数据
-      getStandardList() {
-        // let data = {
-        //  periods: ['Period_21'],
-        //  pointParams: {
-        //      SubjectCode: 'Subject_Chinese',
-        //      PartitionKey: 'zh-CN'
-        //    }
-        // }
-        // this.$api.FindKnowledgeBlockAndPointByDict(data).then(res => {
-
-        // })
-      },
-
-      // 获取标准知识点仓库数据
-      getAllPoints() {
-         let data = {
-          pointParams: {
-              SubjectCode: 'Subject_Chinese',
-              PartitionKey: 'zh-CN'
-            }
-        }
-        this.$api.FindKnowledgePointByDict(data).then(res => {
-          let list = res.result.data
-          this.allPointList = list
-          this.pointListLoading = false
-        })
-      },
-
-       // 获取学校知识点仓库数据
-      getSchoolPoints() {
-         let data = {
-              SubjectCode: 'Subject_Chinese',
-              PartitionKey: 'zh-CN',
-              SchoolCode: this.schoolInfo.claim[0].claimCode,
-              Status: 1
-        }
-        this.$api.FindSchoolPointByDict(data).then(res => {
-          let list = res.result.data
-          this.schoolPointList = list
-          this.pointListLoading = false
-        })
-      },
-
-      // 确认编辑知识块
-      handleTransferBlock() {
-
-      },
-
-      // 知识点绑定选中事件
-      pointTreeCheck(val, data) {
-        let points = val.filter(item => item.children.length === 0)
-        if (points.length > 5) {
-          this.checkedPointList = points.slice(0, 5)
-          this.$Message.warning('最多绑定5个知识点!')
-        } else {
-          this.checkedPointList = points
-        }
-        console.log(val, data)
-      },
-
-      // 知识点树形结构渲染
-       renderContent(h, { root, node, data }) {
-        return h(
-          'span',
-          {
-            domProps: {
-              className: 'singleClass'
-            },
-            on: {
-              click: () => {
-                this.titleClick(root, node, data, event)
-              }
-            }
-          }, [
-            h('span', [
-              h('Icon', {
-                props: {
-                  type:
-                    data.children && data.children.length > 0
-                      ? 'md-albums'
-                      : 'ios-paper-outline'
-                },
-                style: {
-                  marginRight: '5px'
-                }
-              }),
-              h('span', data.name),
-              h('span', {
-                domProps: {
-                  className: this.checkedPointList.indexOf(data) > -1 ? 'point-checkbox point-checked' : 'point-checkbox point-unchecked'
-                },
-                style: {
-                  display: data.children && data.children.length > 0
-                      ? 'none'
-                    : 'inline-block'
-                },
-                on: {
-                  click: () => {
-                    if (this.checkedPointList.indexOf(data) === -1) {
-                      if (this.checkedPointList.length < 5) {
-                        this.checkedPointList.push(data)
-                      } else {
-                        this.$Message.warning('最多绑定5个知识点!')
-                      }
-                    } else {
-                      this.checkedPointList.splice(this.checkedPointList.indexOf(data), 1)
-                    }
-                  }
-                }
-            })
-            ])
-          ]
-        )
-      },
-       // 标题点击收缩展开
-      titleClick(root, node, data, event) {
-        data.expand = !data.expand
-      },
-
-      handleClearChecked() {
-        console.log(this.$refs.pointTree.getCheckedNodes())
-        // this.$refs.pointTree.getSelectedNodes() = [];
-        this.checkedPointList = []
-      },
-
-      deleteCheckedPoint(item) {
-        this.checkedPointList.splice(this.checkedPointList.indexOf(item), 1)
-      },
-
-      // 知识点筛选功能
-      filterChange() {
-        this.knowPointList = !this.searchWord ? this.schoolPointList : this.schoolPointList.filter(item => item.name.toUpperCase().indexOf(this.searchWord.toUpperCase()) > -1)
-      },
-
-      // 测试情景
-      filterSceneChange(val) {
-
-      },
-
-      // 测试对象
-      filterTargetChange(val) {
-
-      },
-
-      // 创建方式
-      filterCreateChange(val) {
-
-      }
+     
 
     },
     mounted() {
-        // this.getStandardList();
-        this.getSchoolPoints()
-        // this.getAllPoints();
+        
     }
   }
 </script>

+ 1 - 0
TEAMModelOS/ClientApp/src/view/evaluation/index/index.vue

@@ -252,6 +252,7 @@
     top:100px;
     left:-140px;
     border-radius: 0 10px 10px 0;
+    z-index:9999;
   }
 
     .slide-menu ul {

+ 4 - 2
TEAMModelOS/ClientApp/src/view/learnactivity/CreateEvaluation.vue

@@ -67,7 +67,7 @@
               <ImportCreate @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></ImportCreate>
             </TabPane>
             <TabPane label="试题预览" name="preview" :index="4" tab="createTest">
-              <TeacherPreview :testPaper="evaluationInfo.testPaper[currentSubjectIndex]"></TeacherPreview>
+              <TeacherPreview :testPaper="evaluationInfo.testPaper[currentSubjectIndex]" :paperName="evaluationInfo.name"></TeacherPreview>
             </TabPane>
             <TabPane label="学生作答预览" name="student" :index="5" tab="createTest">
               <StudentPreview></StudentPreview>
@@ -193,6 +193,8 @@
     },
     methods: {
       getDate(value, date) {
+        console.log(value)
+        console.log(date)
       },
       getImportQuestions(questions) {
         if (this.evaluationInfo.testPaper[this.currentSubjectIndex].questions != undefined) {
@@ -357,7 +359,7 @@
         } else {
           let requestData = {
             id: testPaper.id == undefined ? null : testPaper.id,
-            examCode: this.examInfo.id,
+            scopeCode: this.examInfo.id,
             schoolCode: this.demoLoginInfo.schoolCode,
             subjectCode: testPaper.subjectCode,
             periodCode: testPaper.periodCode,

+ 5 - 0
TEAMModelOS/ClientApp/src/view/learnactivity/ImportCreate.vue

@@ -72,6 +72,11 @@
           if (res.error === null) {
             for (let i = 0; i < res.result.data.length; i++) {
               res.result.data[i].scopeCode = 'personal'
+              if (res.result.data[i].children.length > 0) {
+                for (let j = 0; j < res.result.data[i].children.length; j++) {
+                  res.result.data[i].children[j].scopeCode = 'personal'
+                }
+              }
             }
             this.importQuestions = res.result.data
             this.$emit('importedQuestions', this.importQuestions)

+ 51 - 4
TEAMModelOS/ClientApp/src/view/learnactivity/ManageEvaluation.less

@@ -49,7 +49,6 @@
       }
 
       .evaluation-type {
-        margin-top: 8px;
         color: @second-textColor;
       }
     }
@@ -68,6 +67,17 @@
     border-bottom: 1px solid @borderColor;
     color: @second-textColor;
 
+    .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;
@@ -100,9 +110,9 @@
         margin-bottom: 25px;
       }
 
-      .evaluation-attr-form{
-        margin-right:15px;
-        color:white;
+      .evaluation-attr-form {
+        margin-right: 15px;
+        color: white;
       }
     }
 
@@ -120,3 +130,40 @@
     }
   }
 }
+
+.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;
+
+}
+
+.subject-item-active {
+  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;
+  }
+}
+.question-type-count {
+  color: white;
+  font-size: 16px;
+  display: inline-block;
+  margin-top:15px;
+  margin-bottom:5px;
+}

+ 152 - 3
TEAMModelOS/ClientApp/src/view/learnactivity/ManageEvaluation.vue

@@ -25,6 +25,8 @@
       <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"><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 drak-iview-input dark-iview-select">
@@ -60,21 +62,75 @@
             <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 5px;">·</span>
-              {{item.getSubjectName($store.state.schoolBaseInfo.schoolBaseInfo, item.subjectCode)}}
+              <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="evaluationList[avtiveEvaluationIndex].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>
       </div>
     </div>
   </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 {
+        questionConfig: {},
         jsFn,
+        groupQuestion: {},
         currentSubjectIndex:0,
         ruleValidate: {
           name: [
@@ -133,6 +189,14 @@
       }
     },
     methods: {
+      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() {
 
       },
@@ -170,12 +234,21 @@
       },
       findExamPaper() {
         let requestData = {
-          examCode: this.evaluationList[this.avtiveEvaluationIndex].examCode
+          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!')
             }
@@ -184,6 +257,82 @@
 
           }
         )
+      },
+      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
+        }
       }
     },
     mounted() {

+ 37 - 12
TEAMModelOS/ClientApp/src/view/learnactivity/TeacherPreview.vue

@@ -4,7 +4,10 @@
     padding: 10px;
     padding-bottom: 30px;">
     <vuescroll>
-      <h2 style="text-align: center; color: white; display: block;">一次函数的性质周末测试</h2>
+      <h2 style="text-align: center; color: white; display: block;">
+        {{paperName == '' ? '暂无信息':paperName}}
+        <span style="color:aqua;">{{'   (' + jsFn.getSubjectName($store.state.schoolBaseInfo.schoolBaseInfo, testPaper.subjectCode)+ ')'}}</span>
+      </h2>
       <div class="test-paper-info">
         <Row>
           <Col :xs="24" :sm="24" :md="12" :lg="6">
@@ -36,27 +39,27 @@
       </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>
+        <QuestionList :questions="groupQuestion.Single" :config="questionConfig" @deleteQuestion="deleteQuestion"></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>
+        <QuestionList :questions="groupQuestion.Multiple" :config="questionConfig" @deleteQuestion="deleteQuestion"></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>
+        <QuestionList :questions="groupQuestion.Complete" :config="questionConfig" @deleteQuestion="deleteQuestion"></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>
+        <QuestionList :questions="groupQuestion.Judge" :config="questionConfig" @deleteQuestion="deleteQuestion"></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>
+        <QuestionList :questions="groupQuestion.Subjective" :config="questionConfig" @deleteQuestion="deleteQuestion"></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>
+        <QuestionList :questions="groupQuestion.Compose" :config="questionConfig" @deleteQuestion="deleteQuestion"></QuestionList>
       </div>
 
       <div style="text-align:center;margin-top:20px;margin-bottom:30px;">
@@ -73,6 +76,10 @@
       QuestionList
     },
     props: {
+      paperName: {
+        type: String,
+        default:'暂无信息'
+      },
       testPaper: {
         type: Object,
         default: () => {
@@ -84,8 +91,11 @@
     },
     data() {
       return {
+        jsFn,
         questionConfig: {
-          showScore:true
+          showScore: true,
+          showDelete: true,
+          showRemedy: true,
         },
         value1: 100,
         index: -1,
@@ -99,6 +109,25 @@
       }
     },
     methods: {
+      deleteQuestion(question) {
+        let index = this.testPaper.questions.indexOf(question)
+        if (index >= 0) {
+          this.$Modal.confirm({
+            title: '删除题目',
+            content: '确认删除此题吗?',
+            onOk: () => {
+              this.testPaper.questions.splice(index, 1)
+              let groupResult = jsFn.groupBy(this.testPaper.questions, 'type')
+              for (let i = 0; i < groupResult.length; i++) {
+                this.groupQuestion[groupResult[i][0].type] = groupResult[i]
+              }
+            },
+            onCancel: () => {
+
+            },
+          })
+        }
+      },
       saveTestPaper(testPaper, index) {
         if (this.examInfo.id == undefined) {
           this.saveEvaluation()
@@ -126,8 +155,6 @@
         }
       },
       saveTestPaper() {
-        console.log('123456789')
-        console.log(this.groupQuestion)
       },
       checkCount(count) {
         switch (count) {
@@ -212,11 +239,9 @@
       'testPaper.questions': {
         handler(newName, oldName) {
           let groupResult = jsFn.groupBy(this.testPaper.questions, 'type')
-          console.log('45678')
           for (let i = 0; i < groupResult.length; i++) {
             this.groupQuestion[groupResult[i][0].type] = groupResult[i]
           }
-          console.log(this.groupQuestion)
         },
         deep: true
       }

+ 26 - 6
TEAMModelOS/Controllers/Analysis/AchievementController.cs

@@ -1251,6 +1251,8 @@ namespace TEAMModelOS.Controllers.Analysis
             JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
             //说明 同学校、同类型考试数据
             List<ExamInfo> exams = await azureCosmosDBRepository.FindByDict<ExamInfo>(request.@params);
+            //查询学校对应的年级信息
+            List<School> schools = await azureCosmosDBRepository.FindByDict<School>(request.@params);
             HashSet<string> classList = new HashSet<string>();
             HashSet<string> subjectList = new HashSet<string>();
             List<List<List<string>>> AllPoint = new List<List<List<string>>>();
@@ -1261,12 +1263,27 @@ namespace TEAMModelOS.Controllers.Analysis
             List<double> CoreAverage = new List<double>();
             double weightSum = 0;
             try {
+                List<Period> periods = new List<Period>();
+                List<Grade> grades = new List<Grade>();
+                foreach (School s in schools) {
+                    periods = s.period;
+                }
+                periods.ForEach(p =>
+                {
+                    if (p.periodName.Equals("初中")) {
+                        grades = p.grades;
+                    }
+                });
+                //循环处理不同年级考试信息
+                /*foreach (Grade g in grades) { 
+                    
+                }*/
                 foreach (ExamInfo e in exams)
                 {
                     Dictionary<string, object> sub = new Dictionary<string, object>
-                {
-                    { "ExamCode",  e.id}
-                };
+                    {
+                        { "ExamCode",  e.id}
+                    };
                     Period = e.conditions.period;
                     Grade = e.conditions.grade;
                     List<string> subjects = new List<string>();
@@ -1305,9 +1322,9 @@ namespace TEAMModelOS.Controllers.Analysis
                     simples.ForEach(s =>
                     {
                         Dictionary<string, object> detail = new Dictionary<string, object>
-                    {
-                        { "name", s.Subject }
-                    };
+                        {
+                            { "name", s.Subject }
+                        };
                         subjects.Add(s.Subject);
                         subjectList.Add(s.Subject);
                         //计算试卷总分
@@ -1426,6 +1443,9 @@ namespace TEAMModelOS.Controllers.Analysis
 
                 }
                 //年级成就指标
+                if (weightSum == 0) {
+                    weightSum = 1;
+                }
                 double index = CoreAverage.Sum() / weightSum;
                 List<List<double>> AveragePoint = new List<List<double>>();
                 List<List<double>> AverageClassPoint = new List<List<double>>();

+ 4 - 22
TEAMModelOS/Controllers/Syllabus/KnowledgeController.cs

@@ -304,20 +304,6 @@ namespace TEAMModelOS.Controllers.Syllabus
             return builder.build();
         }
 
-
-
-        [HttpPost("Test")]
-        public async Task<BaseJosnRPCResponse> Test(JosnRPCRequest<Dictionary<string, object>> request)
-        {
-            JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
-      
-            List<Knowledge> knowledges = await _cosmos.FindByDict<Knowledge>(request.@params);
-
-            builder.Data(knowledges);
-            return builder.build();
-        }
-
-
         private async Task<List<T>> Delete<T>(JosnRPCRequest<Dictionary<string, object>> request, JsonRPCResponseBuilder builder) where T : ID
         {
             List<T> schoolBlocks = await _cosmos.FindByDict<T>(request.@params);
@@ -325,26 +311,22 @@ namespace TEAMModelOS.Controllers.Syllabus
             List<T> list = new List<T>();
             if (schoolBlocks.IsNotEmpty())
             {
-                foreach (T item  in schoolBlocks) {
-                    await _cosmos.DeleteAsync<T>(item);
-                    list.Add(item);
-
-                }
-                if (list.Count > 0)
+                List<IdPk> idPks = await _cosmos.DeleteAll<T>(schoolBlocks);
+                if (idPks.IsNotEmpty())
                 {
                     builder.Data("删除成功");
                 }
                 else {
                     builder.Error(false, ResponseCode.FAILED, "删除失败");
-
                 }
+
             }
             else
             {
                 builder.Error(false, ResponseCode.NOT_FOUND, "未找到对应删除数据");
             }
 
-            return list;
+            return schoolBlocks;
         }
 
     }

+ 2 - 1
TEAMModelOS/Controllers/Syllabus/SyllabusController.cs

@@ -254,7 +254,7 @@ namespace TEAMModelOS.Controllers.Syllabus
             }
 
             List<Syllabuses> data = await azureCosmosDBRepository.FindByDict<Syllabuses>(dict);
-            if (data.Count > 0)
+            if (data.IsNotEmpty())
             {
                 Dictionary<string, Syllabuses> syllabuses = new Dictionary<string, Syllabuses>();
                 data.ForEach(x => syllabuses.TryAdd(x.id, x));
@@ -287,6 +287,7 @@ namespace TEAMModelOS.Controllers.Syllabus
                 return builder.Data(treess).build();
             }
             else return builder.Error(false, ResponseCode.NOT_FOUND, "资源未找到").build();
+            //throw new BizException("sss");
         }
     }
 }

+ 9 - 5
TEAMModelOS/Controllers/Test/TestController.cs

@@ -36,6 +36,8 @@ namespace TEAMModelOS.Controllers.Test
         {
             var repository = new SampleCustomerRepository();
             List<Family> customers = repository.GetCustomers().ToList();
+            customers.ForEach(x => { x.LastName = x.Parents[0].FamilyName; x.Children.ForEach(a => a.FamilyName = x.Parents[0].FamilyName); });
+
             List<Family> customers1 = await azureCosmosDBRepository.SaveAll<Family>(customers);
             return customers;
         }
@@ -45,12 +47,14 @@ namespace TEAMModelOS.Controllers.Test
         public async Task<BaseJosnRPCResponse> FindSchoolPointByDict(JosnRPCRequest<Dictionary<string, object>> request)
         {
           JsonRPCResponseBuilder builder = JsonRPCResponseBuilder.custom();
-            List<string> st = new List<string> { "FamilyOrder", "LastName","Children", "Parents" , "Address" };
             //List<Family> families = await azureCosmosDBRepository.FindAll<Family>(propertys: st);
-            Dictionary<string,object > keyValuePairs = new Dictionary<string, object>();
-            List<Family> families1 = new List<Family>();
-            keyValuePairs.Add("aaaa", families1);
-            //List<Family> families = await azureCosmosDBRepository.FindByDict<Family>(dict: keyValuePairs, propertys: st);
+            //Dictionary<string,object > keyValuePairs = new Dictionary<string, object>();
+            //List<Family> families1 = new List<Family>();
+            //keyValuePairs.Add("aaaa", families1);
+
+            //List<string> st = new List<string> { "FamilyOrder", "Parents", "Address" };
+            //List<Family> families = await azureCosmosDBRepository.FindByDict<Family>(dict: request.@params, propertys: st);
+
             List<Family> families = await azureCosmosDBRepository.FindByDict<Family>(dict: request.@params);
 
           return builder.Data(families).Extend(new Dictionary<string, object> { {"Count", families.Count } }).build();

+ 9 - 9
TEAMModelOS/Models/SampleCustomerRepository.cs

@@ -10,28 +10,28 @@ namespace TEAMModelOS.Controllers.Test
     {
         public enum Gender
         {
-            Male,
-            Female
+            ,
+            
         }
         public IEnumerable<Family> GetCustomers()
         {
        
 
         //Randomizer.Seed = new Random(123456);
-        var parent = new Faker<Parent>("zh_CN")
+            var parent = new Faker<Parent>("zh_CN")
                 .RuleFor(o => o.FamilyName, f => f.Name.FirstName())
                 .RuleFor(o => o.FirstName, f => f.Name.LastName());
 
             var pet = new Faker<Pet>("zh_CN")
-              .RuleFor(o => o.GivenName, f => f.Name.FullName())
-               .RuleFor(o => o.Age, f => f.Random.Number(0,13));
+                .RuleFor(o => o.GivenName, f => f.Name.LastName())
+                .RuleFor(o => o.Age, f => f.Random.Number(0,13));
 
             var child = new Faker<Child>("zh_CN")
              .RuleFor(o => o.FamilyName, f => f.Name.FirstName())
-             .RuleFor(o => o.FirstName, f => f.Name.FirstName())
+             .RuleFor(o => o.FirstName, f => f.Name.LastName())
              .RuleFor(o => o.Gender, f => f.PickRandom<Gender>().ToString())
              .RuleFor(o => o.Grade, f => f.Random.Number(1, 16))
-             .RuleFor(o => o.Score, f => f.Random.Double(30, 100))
+             .RuleFor(o => o.Score, f => Math.Round(f.Random.Double(30, 100), 2))
              .RuleFor(o => o.Pets, f => pet.Generate(f.Random.Number(1, 4)).ToList());
 
             var address = new Faker<Address>("zh_CN")
@@ -43,13 +43,13 @@ namespace TEAMModelOS.Controllers.Test
             var customerGenerator = new Faker<Family>("zh_CN")
                 .RuleFor(c => c.FamilyOrder, f => orderIds++)
                 .RuleFor(c => c.id, f =>f.Random.Guid().ToString())//Guid.NewGuid().ToString()
-                .RuleFor(c => c.LastName, f => f.Name.LastName())
+                .RuleFor(c => c.LastName, f => f.Name.FirstName())
                 .RuleFor(c => c.IsRegistered, f => f.Random.Bool())
                 .RuleFor(c => c.Parents, f => parent.Generate(f.Random.Number(2,2)).ToList())
                 .RuleFor(c => c.Children, f => child.Generate(f.Random.Number(1,3)).ToList())
                 .RuleFor(c => c.Address, f => address.Generate(1).ToList()[0]);
 
-            return customerGenerator.Generate(350);
+            return customerGenerator.Generate(150);
         }
     }
 }