HZH преди 5 години
родител
ревизия
def28ad6d7

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

@@ -91,6 +91,11 @@
     <div class="question-part" :class="{'halfScreen':paper.sections[currentSection - 1].hasMaterial}">
       <textarea v-model="paper.questions[currentQuestion].content"></textarea>
       <textarea v-for="answer in paper.questions[currentQuestion].options" :key="answer.id" v-model="answer.content"></textarea>
+      <br/><br/>
+      <div>
+        答案:<el-checkbox v-for="(answer,index) in paper.questions[currentQuestion].options" :key="index" v-model="answer.correct">{{allOptionList[answer.oindex]}}</el-checkbox>
+      </div>
+      <br/><br/>
       <el-button @click="drawer = true" type="primary">查看</el-button>
       <el-button @click="updateQuestion" type="danger">保存</el-button>
     </div>
@@ -211,6 +216,15 @@ export default {
       }
     },
     updateQuestion(){
+      let answer = this.paper.questions[this.currentQuestion].options.filter(option => {
+        return option.correct
+      }).map((option) => {
+        return this.allOptionList[option.oindex]
+      }).join(',');
+      this.paper.questions[this.currentQuestion].answer = answer;
+
+      console.log(this.paper.questions[this.currentQuestion]);
+
       updateQuestion(this.paper.questions[this.currentQuestion]).then((result) => {
         alert(result.result?'修改成功':'修改失败');
         this.getQuestion(this.$route.params.pid,this.currentQuestion);

+ 3 - 0
src/components/doTest/doTest.js

@@ -86,6 +86,7 @@ export default {
                     Object.assign(this.paper,result)
                     this.paper.currentSection = 1;
                     this.paper.currentQuestion = 0;
+                    this.paper.beginTime = new Date().getTime();
                     //设置题号范围
                     this.setIndexRange();
                     //设置时间
@@ -224,6 +225,8 @@ export default {
                 "name": this.paper.name,
                 "pid": this.paper.id,
                 "uid": this.$store.state.loginUser.id,
+                "beginTime": this.paper.beginTime,
+                "endTime": new Date().getTime(),
                 "answers": []
             }
             for (let indexs = 0;indexs < this.paper.questions.length; indexs++){

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
static/css/group-controlApp.1704a4c2.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.c846d1f3.css rel=prefetch><link href=/css/group-controlApp~group-doTest.40e89122.css rel=prefetch><link href=/css/group-doTest.a377aa8b.css rel=prefetch><link href=/css/group-mainPage.4239d005.css rel=prefetch><link href=/js/group-app.24429b9c.js rel=prefetch><link href=/js/group-controlApp.1602c604.js rel=prefetch><link href=/js/group-controlApp~group-doTest.68232a9c.js rel=prefetch><link href=/js/group-doTest.f3b96243.js rel=prefetch><link href=/js/group-mainPage.0c0574a3.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.495dd095.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.495dd095.js></script></body></html>
+      }</script><link href=/css/group-app.000700aa.css rel=prefetch><link href=/css/group-controlApp.1704a4c2.css rel=prefetch><link href=/css/group-controlApp~group-doTest.40e89122.css rel=prefetch><link href=/css/group-doTest.a377aa8b.css rel=prefetch><link href=/css/group-mainPage.4239d005.css rel=prefetch><link href=/js/group-app.24429b9c.js rel=prefetch><link href=/js/group-controlApp.b118fb23.js rel=prefetch><link href=/js/group-controlApp~group-doTest.68232a9c.js rel=prefetch><link href=/js/group-doTest.c5b6656f.js rel=prefetch><link href=/js/group-mainPage.0c0574a3.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.4a6d76f6.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.4a6d76f6.js></script></body></html>

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
static/js/app.4a6d76f6.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
static/js/group-controlApp.1602c604.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
static/js/group-controlApp.b118fb23.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
static/js/group-doTest.c5b6656f.js


Някои файлове не бяха показани, защото твърде много файлове са промени