xiatian 2 år sedan
förälder
incheckning
70bcb8a9f3
1 ändrade filer med 20 tillägg och 17 borttagningar
  1. 20 17
      src/modules/questions/views/SelectQuestion.vue

+ 20 - 17
src/modules/questions/views/SelectQuestion.vue

@@ -23,12 +23,12 @@
         class="part-filter-form"
       >
         <el-form-item label="课程">
-          <el-select v-model="course" :disabled="true" placeholder="请选择">
+          <el-select v-model="courseId" :disabled="true" placeholder="请选择">
             <el-option
               v-for="item in courseList"
-              :key="item.value"
+              :key="item.id"
               :label="item.name"
-              :value="item.value"
+              :value="item.id"
             >
             </el-option>
           </el-select>
@@ -48,14 +48,6 @@
             </el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="题干">
-          <el-input
-            v-model="formSearch.quesBody"
-            placeholder="请输入题干"
-            @blur="searchQuestionPaper"
-          >
-          </el-input>
-        </el-form-item>
         <el-form-item> </el-form-item>
       </el-form>
     </div>
@@ -134,6 +126,7 @@ export default {
       currentPage: 1,
       pageSize: 10,
       total: 10,
+      courseId: "",
       courseName: "",
       quesModel: {},
       questionTypes: [],
@@ -163,11 +156,14 @@ export default {
     });
     this.paperId = this.$route.params.id;
     this.courseName = this.$route.params.courseName;
-    var courseNo = this.$route.params.courseNo;
+    this.courseId = parseInt(this.$route.params.courseId);
     this.paperDetailId = this.$route.params.paperDetailId;
     this.parentView = this.$route.params.parentView;
-    this.courseList.push({ name: this.courseName, value: courseNo });
-    this.course = this.courseList[0].value;
+    this.$http
+      .get(QUESTION_API + "/course/" + this.courseId)
+      .then((response) => {
+        this.courseList.push(response.data);
+      });
     this.searchQuestionPaper();
   },
   mounted() {
@@ -259,9 +255,16 @@ export default {
     },
     //返回
     back() {
-      this.$router.push({
-        path: "/edit_paper/" + this.paperId + "/" + this.parentView,
-      });
+      if ("exam_paper_pending_trial" == this.parentView) {
+        this.$router.push({
+          path:
+            "/edit_paper_pending_trial/" + this.paperId + "/" + this.parentView,
+        });
+      } else {
+        this.$router.push({
+          path: "/edit_paper/" + this.paperId + "/" + this.parentView,
+        });
+      }
     },
     //全选
     handleSelectionChange(val) {