HZH 5 лет назад
Родитель
Сommit
e999726998

+ 7 - 2
src/components/controlMainPage/DocList.vue

@@ -73,7 +73,9 @@ table{
               <td>{{gradeMap[item.grade]}}</td>
               <td>{{statusList[item.status]}}</td>
               <td>
-                <a @click="visibleChange = true;changeUser.id = item.id">修改</a>
+                <a @click="visibleChange = true;changeUser.id = item.id">修改参数</a>
+                &nbsp;&nbsp;
+                <a @click="changeQuestion(item.id)">修改试题</a>
                 &nbsp;&nbsp;
                 <a @click="visibleDelete = true;deleteId = item.id">删除</a>
               </td>
@@ -145,7 +147,7 @@ table{
 </template>
 
 <script>
-import { getPaperList, getPaperById ,addPaper, deletePaper } from "@/api/exam";
+import { getPaperList ,addPaper, deletePaper } from "@/api/exam";
 import { GRADE_OPTION, GRADE_MAP } from '@/services/constant';
 
 export default {
@@ -201,6 +203,9 @@ export default {
         this.visibleDelete = false
         this.searchDoc();
       })
+    },
+    changeQuestion(id){
+      this.$router.push({ path: "/ctrlApp/ctrlMainPage/questionList/" + id })
     }
   }
 }

+ 203 - 0
src/components/controlMainPage/docList/QuestionList.vue

@@ -0,0 +1,203 @@
+<style src="@/components/doTest/doTest.scss" lang="scss" scoped></style>
+<style lang="scss" scoped>
+.index-area,.change-area{
+  display: inline-block;
+  vertical-align: top;
+  height: 100%;
+}
+.index-area{
+  width: 60px;
+  border-right: solid 1px #e6e6e6;
+  overflow: auto;
+  /deep/.el-collapse-item__header{
+    padding-left: 5px;
+  }
+  /deep/.el-collapse-item__content{
+    padding-bottom: 0;
+  }
+  ul{
+    margin-bottom: 0;
+    cursor: pointer;
+    li{
+      text-align: center;
+      padding: 5px 0;
+      &:hover,&.choose{
+        background: #e6e6e6;
+      }
+    }
+  }
+}
+.change-area{
+  .material-part{
+    width: 400px;
+  }
+  .question-part{
+    width: 800px;
+  }
+}
+/deep/.el-drawer__header{
+  background: #fafafa;
+  padding: 30px;
+  margin-bottom: 0; 
+}
+/deep/.el-drawer__body{
+  height: calc(100% - 60px);
+}
+.dialog-style{
+  div{
+    text-align: center;
+    margin: 5px;
+    /deep/ .el-input{
+      display: inline-block;
+      width: 200px;
+    }
+  }
+}
+</style>
+<template>
+<div>
+  <div class="index-area">
+    <el-collapse v-model="currentSection" accordion>
+      <el-collapse-item v-for="(item,index) in paper.sections" :key="index" :title="'M' + String(index + 1)" :name="index + 1">
+        <ul>
+          <li v-for="(ques,i) in paper.questions" :key="i" v-show="currentSection == ques.section || currentSection == ques.section * -1" 
+          :class="{'choose':currentQuestion == i}" @click="changePage(i)">{{i+1}}</li>
+        </ul>
+      </el-collapse-item>
+    </el-collapse>
+  </div>
+  <div class="change-area">
+    <!-- <div class="material-part">
+
+    </div>
+    <div class="question-part">
+      <textarea></textarea>
+      <textarea></textarea> -->
+      <el-button @click="drawer = true" type="primary">查看</el-button>
+    <!-- </div> -->
+  </div>
+  <el-drawer
+    :visible.sync="drawer"
+    :size="'900px'"
+    :show-close="false"
+    v-if="currentSection != ''">
+    <div class="exam">
+      <div class="material-part" v-if="paper.sections[currentSection - 1].hasMaterial">
+          <div class="triangle-top"><span>材</span><span>料</span></div>
+          <div>
+              <div v-html="paper.sections[currentSection - 1].material" class="material-html"></div>
+          </div>
+      </div>
+      <div class="scroll-part" :class="{'halfScreen':paper.sections[currentSection - 1].hasMaterial}">
+          <div class="content-part">
+              <div class="question-area">
+                  <div class="triangle-top"><span>#{{currentQuestion - indexRange[currentSection - 1].min + 1}}</span></div>
+                  <div class="question-html">
+                      <div v-html="paper.questions[currentQuestion].content" class="content-html"></div>
+                  </div>
+              </div>
+              <div>
+                  <div class="answer-area2" v-for="answer in paper.questions[currentQuestion].options" :key="answer.id">
+                      <div :class="{'correct':answer.choose}">
+                          <i :class="{'multiChooseType':paper.questions[currentQuestion].correctNum > 1}">
+                              <img src="@/images/doTest/tick-up.png" v-if="answer.choose">
+                          </i>
+                          <label>{{allOptionList[answer.oindex]}}</label>
+                      </div>
+                      <div v-html="answer.content" class="answer-html" ref="htmlContent">
+                      </div>
+                  </div>
+              </div>
+          </div>
+      </div>
+      <div class="page-part">
+          <button @click="changePage(currentQuestion - 1)">
+              <span id="preLeft"><img src="@/images/doTest/pre.png"></span>
+              <label>上一题</label>
+          </button>
+          <button @click="changePage(currentQuestion + 1)">
+              <label>下一题</label>
+              <span id="nextRight"><img src="@/images/doTest/next.png"></span>
+          </button>
+      </div>
+    </div>
+  </el-drawer>
+  <el-dialog
+    title="提示"
+    :visible.sync="visibleDelete"
+    width="200px">
+    <p class="center-text">确认删除?</p>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="visibleDelete = false">取 消</el-button>
+      <el-button type="primary" >确 定</el-button>
+    </span>
+  </el-dialog>
+</div>
+</template>
+
+<script>
+import { getPaperById } from "@/api/exam";
+import { OPTION_LIST } from '@/services/constant';
+
+export default {
+  name: 'QuestionList',
+  components: {
+  },
+  data () {
+      return {
+        paper: {            //整张试卷数据
+            questions: [{}],
+            sections: [{}],
+        },
+        currentQuestion: 0,
+        currentSection: 1,
+        indexRange:[{min: 0,max: 1}],
+        allOptionList: OPTION_LIST,
+        drawer:false,
+        visibleDelete:false,
+      }
+  },
+  created() {
+    const oScript = document.createElement('script');
+    oScript.type = 'text/javascript';
+    oScript.src = 'mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML';
+    document.body.appendChild(oScript);
+    this.getQuestion(this.$route.params.pid);
+  },
+  methods: {
+    getQuestion(pid){
+      getPaperById(pid).then((result) => {
+        Object.assign(this.paper,result);
+        this.setIndexRange();
+        this.changePage(0);
+      })
+    },
+    setIndexRange() {
+        this.indexRange = []; 
+        let list = this.paper.sectionNums.split(',').map(Number);
+        list.forEach((item,index) => {
+            if(index != 0) {list[index] = item + list[index - 1];}
+            this.indexRange.push({
+                min: index == 0?0:list[index - 1],
+                max: list[index] - 1
+            })
+        })
+    },
+    changePage(page) {
+      if(page >= 0 && page < this.paper.questions.length){
+        this.currentQuestion = page;
+        setTimeout(() => {
+            MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
+        },100);
+      }
+    },
+    // updateUser(){
+    //   updateUser(this.changeUser).then((result) => {
+    //     alert(result.message);
+    //     this.visibleChange = false
+    //     this.searchDoc();
+    //   })
+    // },
+  },
+}
+</script>

+ 2 - 1
src/components/doTest/doTest.html

@@ -118,7 +118,8 @@
         width="300px"
         :before-close="handleClose1">
         <!-- <span>模块{{paper.currentSection}}结束!</span> -->
-        <span>时间结束,停止作答!</span>
+        <span v-if="!dialog1Flag">{{tempModeName[paper.currentSection]}}结束!</span>
+        <span v-if="dialog1Flag">时间结束,停止作答!</span>
         <span slot="footer" class="dialog-footer">
             <el-button type="primary" @click="handleClose1">确 定</el-button>
         </span>

+ 9 - 5
src/components/doTest/doTest.js

@@ -1,4 +1,6 @@
 import { getPaperById,commitPaper,checkFirstTest } from '@/api/exam';
+import { OPTION_LIST } from '@/services/constant';
+
 export default {
     name: 'DoTest',
     components: {
@@ -13,7 +15,7 @@ export default {
         },
         interval: {},       //总计时器
         singleInterval: {}, //每题计时器
-        allOptionList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
+        allOptionList: OPTION_LIST,
         paper: {            //整张试卷数据
             questions: [{}],
             sections: [{}],
@@ -25,6 +27,7 @@ export default {
         largestHeight: 60,
         dialogVisible1: false,
         dialogVisible2: false,
+        dialog1Flag: false,
         loading:false,
         tempModeName:{'1':"A卷",'2':"B卷",'3':"C卷"},
       }
@@ -121,10 +124,10 @@ export default {
                         !item.ans;
             }).length > 0 ?
             this.$confirm('未全部作答,确认提交?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
-                this.submitMyAnswer();
+                this.postAnswer();
               }).catch(() => {})
             :this.$confirm('确认提交?', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
-                this.submitMyAnswer();
+                this.postAnswer();
               }).catch(() => {})
         },
         changePage(page,flag,$event) {
@@ -162,11 +165,12 @@ export default {
                 this.$router.replace({path: '/app/mainPage/abilityTest'})
             }).catch(() => {})
         },
-        submitMyAnswer() {   //提交答案,停止计时,跳转下一模块
+        postAnswer(flag) {   //提交答案,停止计时,跳转下一模块
             clearInterval(this.interval);
             clearInterval(this.singleInterval);
             if(this.paper.currentSection < this.paper.indexRange.length){
                 this.dialogVisible1 = true;
+                this.dialog1Flag = flag == 'time';
             }
             else {
                 localStorage.setItem('testPaper%' + this.$store.state.loginUser.id + '%' + this.paper.id, JSON.stringify(this.paper));
@@ -259,7 +263,7 @@ export default {
     watch: {
         leftTimeSec(val) {
             if (val == 0) {
-                this.submitMyAnswer();
+                this.postAnswer('time');
             }
             else if(this.paper.id) {
                 localStorage.setItem('testPaper%' + this.$store.state.loginUser.id + '%' + this.paper.id, JSON.stringify(this.paper));

+ 123 - 184
src/components/doTest/doTest.scss

@@ -219,47 +219,6 @@ $questionIndexWidth:100px;
       }
     }
   }
-  .material-part{
-    width: calc(52% - 60px);
-    height: calc(100% - 125px);
-    margin-left: 30px;
-    margin-top: 15px;
-    border-radius: 3px;
-    border: solid 3px #30a5d4;
-    float: left;
-    overflow: auto;
-    &>div{
-      position: relative;
-      padding: 20px 40px;
-      .triangle-top{
-        span{
-          font-size: 17px;
-          &:nth-child(2){
-            left: 18px;
-          }
-        }
-      }
-      .material-html{
-        /deep/ img{
-          width: 100%;
-        }
-      }
-    }
-  }
-  .scroll-part{
-    height: calc(100% - 80px);
-    overflow: auto;
-    &.halfScreen{
-      float: right;
-      width: 48%;
-      .progress-part>div{
-        width: 300px;
-      }
-      .content-part{
-        width: 550px;
-      }
-    }
-  }
   .progress-part{
     height: 75px;
     text-align: center;
@@ -318,149 +277,6 @@ $questionIndexWidth:100px;
       margin-left: 25px;
     }
   }
-  .content-part{
-    width: 800px;
-    margin: 0 auto;
-    .question-area,.answer-area2{
-      border-radius: 3px;
-      border: solid 3px #30a5d4;
-    }
-    .question-area{
-      min-height: 70px;
-      padding: 20px 40px;
-      position: relative;
-      background: #fafafa;
-      .question-html{
-        font-size: 18px;
-      }
-    }
-    // .answer-area{
-    //   height: 60px;
-    //   margin: 15px 0;
-    //   background: #fafafa;
-    //   cursor: pointer;
-    //   &:hover,&.backChoose{
-    //     background: #C7EDF9;
-    //   }
-    //   &>div:first-child{
-    //     width: 125px;
-    //     height: 100%;
-    //     background: #c7edf8;
-    //     border-right: solid 3px #30a5d4;
-    //     display: inline-block;
-    //     vertical-align: top;
-    //     i,label{
-    //       display: inline-block;
-    //       position: relative;
-    //       top: 50%;
-    //       transform: translateY(-50%);
-    //       vertical-align: top;
-    //       cursor: pointer;
-    //     }
-    //     i{
-    //       width: 20px;
-    //       height: 20px;
-    //       background: #f2ede9;
-    //       border-radius: 10px;
-    //       box-shadow: inset 0 3px 2px -1px #888888;
-    //       margin-left: 15px;
-    //       &.multiChooseType{
-    //         border-radius: 2px;
-    //       }
-    //       img{
-    //         position: absolute;
-    //         left: 0;
-    //         top: -5px;
-    //       }
-    //     }
-    //     label{
-    //       font-size: 35px;
-    //       color: #99a3a5;
-    //       margin-left: 15px;
-    //     }
-    //     &.correct{
-    //       background: #30a5d4;
-    //       label{
-    //         color: white;
-    //       }
-    //     }
-    //   }
-    //   &>div:nth-child(2){
-    //     display: inline-block;
-    //     //vertical-align: top;
-    //     width: calc(100% - 135px);
-    //     padding: 5px 20px;
-    //     font-size: 18px;
-    //     position: relative;
-    //     top:50%;
-    //     transform: translateY(-50%);
-    //     &.transparent{
-    //       opacity: 0;
-    //     }
-    //   }
-    // }
-    .answer-area2{
-      min-height: 60px;
-      background: #fafafa;
-      display: flex;
-      cursor: pointer;
-      margin: 15px 0;
-      &:hover,&.backChoose{
-        background: #C7EDF9;
-      }
-      &>div:first-child{
-        width: 125px;
-        background: #c7edf8;
-        border-right: solid 3px #30a5d4;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        i,label{
-          position: relative;
-          cursor: pointer;
-        }
-        i{
-          width: 20px;
-          height: 20px;
-          background: #f2ede9;
-          border-radius: 10px;
-          box-shadow: inset 0 3px 2px -1px #888888;
-          margin-left: 15px;
-          &.multiChooseType{
-            border-radius: 2px;
-          }
-          img{
-            position: absolute;
-            left: 0;
-            top: -5px;
-          }
-        }
-        label{
-          font-size: 35px;
-          color: #99a3a5;
-          margin-left: 15px;
-        }
-        &.correct{
-          background: #30a5d4;
-          label{
-            color: white;
-          }
-        }
-      }
-      &>div:nth-child(2){
-        width: calc(100% - 135px);
-        padding: 5px 20px;
-        font-size: 18px;
-        display: flex;
-        align-items: center;
-      }
-    }
-    .content-html,.answer-html{
-      img{
-        max-width: 100%;
-      }
-    }
-  }
   .page-part{
     height: 105px;
     padding-top: 25px;
@@ -511,6 +327,129 @@ $questionIndexWidth:100px;
     }
   }
 }
+
+.material-part{
+  width: calc(52% - 60px);
+  height: calc(100% - 125px);
+  margin-left: 30px;
+  margin-top: 15px;
+  border-radius: 3px;
+  border: solid 3px #30a5d4;
+  float: left;
+  overflow: auto;
+  &>div{
+    position: relative;
+    padding: 20px 40px;
+    .triangle-top{
+      span{
+        font-size: 17px;
+        &:nth-child(2){
+          left: 18px;
+        }
+      }
+    }
+    .material-html{
+      /deep/ img{
+        width: 100%;
+      }
+    }
+  }
+}
+
+.scroll-part{
+  height: calc(100% - 80px);
+  overflow: auto;
+  &.halfScreen{
+    float: right;
+    width: 48%;
+    .progress-part>div{
+      width: 300px;
+    }
+    .content-part{
+      width: 550px;
+    }
+  }
+}
+
+.content-part{
+  width: 800px;
+  margin: 0 auto;
+  .question-area,.answer-area2{
+    border-radius: 3px;
+    border: solid 3px #30a5d4;
+  }
+  .question-area{
+    min-height: 70px;
+    padding: 20px 40px;
+    position: relative;
+    background: #fafafa;
+    .question-html{
+      font-size: 18px;
+    }
+  }
+  .answer-area2{
+    min-height: 60px;
+    background: #fafafa;
+    display: flex;
+    cursor: pointer;
+    margin: 15px 0;
+    &:hover,&.backChoose{
+      background: #C7EDF9;
+    }
+    &>div:first-child{
+      width: 125px;
+      background: #c7edf8;
+      border-right: solid 3px #30a5d4;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      i,label{
+        position: relative;
+        cursor: pointer;
+      }
+      i{
+        width: 20px;
+        height: 20px;
+        background: #f2ede9;
+        border-radius: 10px;
+        box-shadow: inset 0 3px 2px -1px #888888;
+        margin-left: 15px;
+        &.multiChooseType{
+          border-radius: 2px;
+        }
+        img{
+          position: absolute;
+          left: 0;
+          top: -5px;
+        }
+      }
+      label{
+        font-size: 35px;
+        color: #99a3a5;
+        margin-left: 15px;
+      }
+      &.correct{
+        background: #30a5d4;
+        label{
+          color: white;
+        }
+      }
+    }
+    &>div:nth-child(2){
+      width: calc(100% - 135px);
+      padding: 5px 20px;
+      font-size: 18px;
+      display: flex;
+      align-items: center;
+    }
+  }
+  .content-html,.answer-html{
+    img{
+      max-width: 100%;
+    }
+  }
+}
+
 .triangle-top {
   position: absolute;
   top:0;

+ 123 - 31
src/components/report/Knowledge.vue

@@ -21,6 +21,7 @@
             td{
                 padding: 10px 0;
                 color: white;
+                background: #4c4daa;
                 p:nth-child(1){
                     font-size: 28px;
                 }
@@ -28,40 +29,75 @@
         }
         tr:nth-child(2){
             td{
-                vertical-align: top;
-                div{
-                    padding: 8px 0;
-                    border-bottom: solid 2px black;
-                    p:nth-child(1){
-                        font-size: 20px;
-                    }
-                }
-                ul{
-                    display: flex;
-                    justify-content: space-around;
-                    margin: 0;
-                    li{
-                        border-left: solid 2px black;
-                        padding: 8px 0;
-                        &:first-child{
-                            border-left: none;
-                        }
-                        p{
-                            span{
-                                color: red;
-                            }
-                        }
-                    }
+                padding: 8px 0;
+                background: #cfcdff;
+                p:nth-child(1){
+                    font-size: 20px;
                 }
             }
         }
+        tr:nth-child(3){
+            td{
+                padding: 8px 0;
+            }
+        }
     }
 }
+// tr:nth-child(2){
+    //     td{
+    //         vertical-align: top;
+    //         div{
+    //             padding: 8px 0;
+    //             border-bottom: solid 2px black;
+    //             p:nth-child(1){
+    //                 font-size: 20px;
+    //             }
+    //         }
+    //         ul{
+    //             display: flex;
+    //             justify-content: space-around;
+    //             margin: 0;
+    //             li{
+    //                 border-left: solid 2px black;
+    //                 padding: 8px 0;
+    //                 &:first-child{
+    //                     border-left: none;
+    //                 }
+    //                 p{
+    //                     span{
+    //                         color: red;
+    //                     }
+    //                 }
+    //             }
+    //         }
+    //     }
+    // }
 </style>
 <template>
 <div class="report4">
-    <!-- <a><a @click="returnBack">返回</a></p> -->
     <table class="table-common" border="1" cellspacing="0" v-for="(root,index) in resultList" :key="index">
+        <tbody>
+            <tr>
+                <td v-for="(node1,a) in root[1]" :key="a" :colspan="node1.lengthNum">
+                    <p>{{node1.content}}</p>
+                    <p>掌握率:{{node1.master}}%</p>
+                </td>
+            </tr>
+            <tr>
+                <td v-for="(node2,a) in root[2]" :key="a" :colspan="node2.lengthNum">
+                    <p>{{node2.content}}</p>
+                    <p>掌握率:{{node2.master}}%</p>
+                </td>
+            </tr>
+            <tr>
+                <td v-for="(node3,a) in root[3]" :key="a">
+                    <p>{{node3.content}}</p>
+                    <p>评级:<span :style="{'color':node3.masterStatus == '掌握'?'green':'red'}">{{node3.masterStatus}}</span></p>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+    <!-- <table class="table-common" border="1" cellspacing="0" v-for="(root,index) in resultList" :key="index">
         <tbody>
             <tr :style="{'background':root.background}">
                 <td :colspan="root.children.length">
@@ -78,18 +114,19 @@
                     <ul>
                         <li v-for="(leaf,j) in child.children" :key="j">
                             <p>《{{leaf.content}}》</p>
-                            <p>评级:<span>{{leaf.masterStatus}}</span></p>
+                            <p>评级:<span :style="{'color':leaf.masterStatus == '掌握'?'green':'red'}">{{leaf.masterStatus}}</span></p>
                         </li>
                     </ul>
                 </td>
             </tr>
         </tbody>
-    </table>
+    </table> -->
 </div>
 </template>
 
 <script>
 import { getSpecialReport } from '@/api/report';
+import { SUBJECT_MAP } from '@/services/constant';
 
 export default {
     name: 'Knowledge',
@@ -97,7 +134,9 @@ export default {
     },
     data () {
         return {
+            treeToObj:{},
             resultList:[],
+            subjectMap:SUBJECT_MAP,
             colorChoose:[
                 ['#4c4daa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa'],
                 ['#4c4daa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa','#cfcdff','#ebedfa'],
@@ -109,11 +148,17 @@ export default {
     },
     created() {
         getSpecialReport(this.$route.params.pid,this.$route.params.uid).then((result) => {
-            this.resultList = this.splitTreeData([10,-1],result.knowledges[0]);
+            this.splitNodeLevel(result.knowledges,1);
+            this.subjectMap[this.treeToObj[1][0].grade + this.treeToObj[1][0].subjectId].forEach((range) => {
+                let tree = JSON.parse(JSON.stringify(this.treeToObj));
+                this.resultList.push(this.splitTreeList(tree,range,3,[]));
+            })
+            console.log(this.resultList);
+            // this.resultList = this.splitTreeData([10,-1],result.knowledges[0]);
 
-            let node = Object.assign(JSON.parse(JSON.stringify(result.knowledges[1])),{children:[]});
-            this.cutData(node,-1,result.knowledges[1].children,this.colorChoose[2]);
-            this.resultList.push(node);
+            // let node = Object.assign(JSON.parse(JSON.stringify(result.knowledges[1])),{children:[]});
+            // this.cutData(node,-1,result.knowledges[1].children,this.colorChoose[2]);
+            // this.resultList.push(node);
         })
     },
     methods: {
@@ -149,6 +194,53 @@ export default {
                 }
             }
         },
+        splitNodeLevel(nodeList,level) {
+            let tempList = [];
+            this.treeToObj[level] = [];
+            nodeList.forEach((item) => {
+                if(item.children){
+                    tempList = tempList.concat(item.children);
+                }
+                this.treeToObj[level].push(Object.assign(JSON.parse(JSON.stringify(item)),{children:[]}));
+            })
+            if(tempList.length){
+                this.splitNodeLevel(tempList,level + 1);
+            }
+        },
+        splitTreeList(tree,range,level,countList){
+            let parentRange = {start:0,end:0};
+            let parentCountList = [];
+            range.end = range.end == -1?tree[level].length - 1:range.end;
+            tree[level] = tree[level].slice(range.start,range.end + 1);
+            if(!countList.length){
+                countList = new Array(tree[level].length).fill(1);
+            }
+            let parentCount = 0;
+            for(let i = 0;i < tree[level].length;i++){
+                tree[level][i].lengthNum = countList[i];
+                if(i == 0){
+                    parentCount = countList[i];
+                }
+                else if(tree[level][i].parentId == tree[level][i - 1].parentId){
+                    parentCount += countList[i];
+                }
+                else{
+                    parentCountList.push(parentCount);
+                    parentCount = countList[i];
+                }
+                if(i == tree[level].length - 1){
+                    parentCountList.push(parentCount);
+                }
+            }
+            if(level == 1){
+                return tree;
+            }
+            else{
+                parentRange.start = tree[level - 1].findIndex((value) => value.id == tree[level][0].parentId);
+                parentRange.end = tree[level - 1].findIndex((value) => value.id == tree[level][tree[level].length - 1].parentId);
+                return this.splitTreeList(tree,parentRange,level - 1,parentCountList);
+            }
+        },
         returnBack(){
             this.$router.push({path: '/ctrlApp/ctrlMainPage/paperListSimple'});
         }

+ 5 - 0
src/router/index.js

@@ -25,6 +25,7 @@ const ControlMainPage = () => import(/* webpackChunkName: "group-controlApp"*/'@
 const PaperList = () => import(/* webpackChunkName: "group-controlApp"*/'@/components/controlMainPage/PaperList');
 const PaperListSimple = () => import(/* webpackChunkName: "group-controlApp"*/'@/components/controlMainPage/PaperListSimple');
 const DocList = () => import(/* webpackChunkName: "group-controlApp"*/'@/components/controlMainPage/DocList');
+const QuestionList = () => import(/* webpackChunkName: "group-controlApp"*/'@/components/controlMainPage/docList/QuestionList');
 const UserList = () => import(/* webpackChunkName: "group-controlApp"*/'@/components/controlMainPage/UserList');
 const FirstEdition = () => import(/* webpackChunkName: "group-controlApp"*/'@/components/report/FirstEdition');
 const PDFTest = () => import(/* webpackChunkName: "group-controlApp"*/'@/components/report/PDFTest');
@@ -150,6 +151,10 @@ export default new Router({
                 path: 'docList',
                 name: 'DocList',
                 component: DocList,
+            },{
+                path: 'questionList/:pid',
+                name: 'QuestionList',
+                component: QuestionList
             }],
         },{
             path: 'firstEdition/:pid/:uid',

+ 10 - 1
src/services/constant.js

@@ -36,4 +36,13 @@ export const GRADE_MAP = {
     '8Y':'初二下',
     '9X':'初三上',
     '9Y':'初三下',
-}
+}
+
+export const OPTION_LIST = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
+
+export const SUBJECT_MAP = {
+    '6Y2':[{start:0,end:9},{start:10,end:18},{start:19,end:-1}],
+    '6X2':[{start:0,end:9},{start:10,end:18},{start:19,end:-1}],
+    '9X3':[{start:0,end:12},{start:13,end:25},{start:26,end:-1}],
+    '9Y3':[{start:0,end:12},{start:13,end:25},{start:26,end:-1}]
+}

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/css/group-controlApp.a1da1c5d.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/css/group-controlApp.d2853515.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/css/group-doTest.782500d8.css


+ 0 - 0
static/css/group-mainPage.9af7a1f8.css → static/css/group-mainPage.5a4551a7.css


+ 1 - 1
static/index.html

@@ -31,4 +31,4 @@
           if(window.confirm("您的浏览器版本过低,推荐使用IE10及以上浏览器或者chrome浏览器,点击确定下载chrome安装浏览器。若是360等浏览器,开启兼容模式")){
               window.open("/download/44.0.2403.89_chrome_installer.exe", "_blank");
           }
-      }</script><link href=/css/group-app.000700aa.css rel=prefetch><link href=/css/group-controlApp.a1da1c5d.css rel=prefetch><link href=/css/group-doTest.ffa9ced6.css rel=prefetch><link href=/css/group-mainPage.9af7a1f8.css rel=prefetch><link href=/js/group-app.24429b9c.js rel=prefetch><link href=/js/group-controlApp.f4228082.js rel=prefetch><link href=/js/group-doTest.198111c7.js rel=prefetch><link href=/js/group-mainPage.5fd1c98c.js rel=prefetch><link href=/css/app.e9f156cc.css rel=preload as=style><link href=/css/chunk-vendors.723a90c8.css rel=preload as=style><link href=/js/app.977b2915.js rel=preload as=script><link href=/js/chunk-vendors.2493bbd2.js rel=preload as=script><link href=/css/chunk-vendors.723a90c8.css rel=stylesheet><link href=/css/app.e9f156cc.css rel=stylesheet></head><body><noscript><strong>We're sorry but my-project doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.2493bbd2.js></script><script src=/js/app.977b2915.js></script></body></html>
+      }</script><link href=/css/group-app.000700aa.css rel=prefetch><link href=/css/group-controlApp.d2853515.css rel=prefetch><link href=/css/group-doTest.782500d8.css rel=prefetch><link href=/css/group-mainPage.5a4551a7.css rel=prefetch><link href=/js/group-app.24429b9c.js rel=prefetch><link href=/js/group-controlApp.6e2e3f99.js rel=prefetch><link href=/js/group-doTest.ceb1abc2.js rel=prefetch><link href=/js/group-mainPage.5fd1c98c.js rel=prefetch><link href=/css/app.e9f156cc.css rel=preload as=style><link href=/css/chunk-vendors.723a90c8.css rel=preload as=style><link href=/js/app.877278ae.js rel=preload as=script><link href=/js/chunk-vendors.2493bbd2.js rel=preload as=script><link href=/css/chunk-vendors.723a90c8.css rel=stylesheet><link href=/css/app.e9f156cc.css rel=stylesheet></head><body><noscript><strong>We're sorry but my-project doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.2493bbd2.js></script><script src=/js/app.877278ae.js></script></body></html>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/js/app.877278ae.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/js/app.977b2915.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/js/group-controlApp.6e2e3f99.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/js/group-controlApp.f4228082.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/js/group-doTest.198111c7.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/js/group-doTest.ceb1abc2.js


Некоторые файлы не были показаны из-за большого количества измененных файлов