Explorar o código

Merge branch 'dev_1.2.0' of http://git.qmth.com.cn/union-question/union-question-web into dev_1.2.0

zhangjie %!s(int64=2) %!d(string=hai) anos
pai
achega
e1c593e25f

+ 6 - 14
src/modules/questions/views/GenPaperDetail.vue

@@ -988,27 +988,19 @@ export default {
       var url = QUESTION_API + "/genPaper/manual";
 
       this.fullscreenLoading = true;
-      this.$http.post(url, this.genPaper).then(
-        (res) => {
+      this.$httpWithMsg
+        .post(url, this.genPaper)
+        .then((res) => {
           this.$notify({
             message: "组卷成功",
             type: "success",
           });
           this.fullscreenLoading = false;
-          // let paperId = response.data.paper.id;
-          // this.$router.push({
-          //   path: "/edit_paper/" + paperId + "/gen_paper",
-          // });
           this.back(res.data.status);
-        },
-        (error) => {
-          this.$notify({
-            message: error.response.data.msg,
-            type: "error",
-          });
+        })
+        .finally(() => {
           this.fullscreenLoading = false;
-        }
-      );
+        });
     },
     confirmGenPaper() {
       if (!this.checkGenPaper()) {

+ 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) {