Bladeren bron

提交前端代码

weiwenhai 6 jaren geleden
bovenliggende
commit
7462ba16c2

+ 1 - 1
src/modules/questions/views/EditPaper.vue

@@ -55,7 +55,7 @@
             上传音频文件
           </el-button>
           <el-button @click="back" size="small" type="primary"
-            ><i class="el-icon-arrow-left"></i> 退回</el-button
+            ><i class="el-icon-arrow-left"></i> 回</el-button
           >
         </div>
       </div>

+ 12 - 18
src/modules/questions/views/EditSelectQuestion.vue

@@ -148,10 +148,10 @@
             <el-col :xs="3" :sm="3" :md="3" :lg="3">
               <el-form-item>
                 <el-button
-                  type="info"
+                  type="primary"
                   @click="insertProperty"
                   style="margin-left:-30px;"
-                  >新增属性</el-button
+                  ><i class="el-icon-plus"></i> 新增属性</el-button
                 >
               </el-form-item>
             </el-col>
@@ -205,8 +205,7 @@
               type="primary"
               icon="caret-left"
               @click="backToQuesList()"
-            >
-              返回列表
+              ><i class="el-icon-arrow-left"></i> 返回列表
             </el-button>
           </el-form-item>
         </el-form>
@@ -376,9 +375,9 @@ export default {
         )
         .then(() => {
           this.fullscreenLoading = false;
-          this.$message({
+          this.$notify({
             type: "info",
-            message: `保存成功`
+            message: "保存成功"
           });
           this.$router.push({ path: "/questions/question_list/0" });
         })
@@ -578,23 +577,18 @@ export default {
         return false;
       }
       return true;
-    },
+    }
+  },
+  computed: {
     answer() {
       if (this.quesModel.questionType == "SINGLE_ANSWER_QUESTION") {
         return this.singleRightAnswer;
       } else if (this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION") {
-        return this.multipleRightAnswer.sort().toString();
+        var obj = this.multipleRightAnswer;
+        return obj.sort().toString();
       }
-    }
-  },
-  computed: {
-    // answer: function() {
-    //   if (this.quesModel.questionType == "SINGLE_ANSWER_QUESTION") {
-    //     return this.singleRightAnswer;
-    //   } else if (this.quesModel.questionType == "MULTIPLE_ANSWER_QUESTION") {
-    //     return this.multipleRightAnswer.sort().toString();
-    //   }
-    // },
+      return this.quesModel.quesAnswer;
+    },
     saveDisabled: function() {
       if (!this.questionId && this.quesModel.quesOptions.length == 0) {
         return true;

+ 10 - 6
src/modules/questions/views/ExtractPaperInfo.vue

@@ -540,7 +540,8 @@ export default {
               this.loading = false;
               this.$notify({ type: "success", message: "保存成功" });
               this.$router.push({
-                path: "/index/extract_paper_rule/" + this.extractConfig.examId
+                path:
+                  "/questions/extract_paper_rule/" + this.extractConfig.examId
               });
             },
             response => {
@@ -579,7 +580,6 @@ export default {
     },
     //校验调卷规则数据
     verificationData() {
-      debugger;
       let myExamPaperList = [];
       let examPaperList = this.examPaperList;
       for (let i = 0; i < examPaperList.length; i++) {
@@ -608,8 +608,10 @@ export default {
             break;
           } else {
             //$(".errorMsg_" + i + "_" + j).hide();
-            document.getElementById("errorMsg_" + i + "_" + j).style.display =
-              "none";
+            if (document.getElementById("errorMsg_" + i + "_" + j)) {
+              document.getElementById("errorMsg_" + i + "_" + j).style.display =
+                "none";
+            }
           }
           var reg = /^([1]?\d{1,2})$/;
           if (
@@ -627,8 +629,10 @@ export default {
             break;
           } else {
             //$(".errorMsg_" + i + "_" + j).hide();
-            document.getElementById("errorMsg_" + i + "_" + j).style.display =
-              "none";
+            if (document.getElementById("errorMsg_" + i + "_" + j)) {
+              document.getElementById("errorMsg_" + i + "_" + j).style.display =
+                "none";
+            }
             weightCount += parseInt(_paperInfoList[j].weight);
             selectedPaperIds.push(_paperInfoList[j].paper.id);
             myExamPaperList.push({

+ 11 - 8
src/modules/questions/views/InsertPaperTitle.vue

@@ -48,7 +48,11 @@
                 >
                 </el-option>
               </el-select>
-              <el-button type="info" @click="insertPaper">新增试卷</el-button>
+              <span style="padding-left:5px;">
+                <el-button type="primary" @click="insertPaper"
+                  ><i class="el-icon-plus"></i> 新增试卷</el-button
+                >
+              </span>
             </el-form-item>
           </el-row>
           <el-row v-if="paperDetailDisable">
@@ -100,30 +104,29 @@
         </el-form>
 
         <!-- 添加试卷弹出框 -->
-        <el-dialog title="新增试卷" v-model="paperDialog" size="tiny">
+        <el-dialog title="新增试卷" :visible.sync="paperDialog" width="500px">
           <el-form
-            :inline="true"
             :model="paperForm"
             ref="paperForm"
             :rules="rules"
             label-position="right"
-            label-width="90px"
+            label-width="120px"
+            inline-message
           >
             <el-row>
               <el-form-item label="试卷名称" label-width="120px" prop="name">
                 <el-input
-                  class="pull_length"
+                  class="dialog_input_width"
                   v-model="paperForm.name"
-                  auto-complete="off"
                   placeholder="请输入试卷名称"
                 ></el-input>
               </el-form-item>
             </el-row>
-            <el-row class="pull_center">
+            <el-row class="margin_top_10 margin_left_120">
               <el-button type="primary" @click="submitPaperForm('paperForm')"
                 >保 存</el-button
               >
-              <el-button type="danger" @click="resetPaperForm('paperForm')"
+              <el-button @click="resetPaperForm('paperForm')"
                 ><i class="el-icon-refresh"></i> 重 置</el-button
               >
             </el-row>