浏览代码

试题列表查询必选课程

xiatian 2 年之前
父节点
当前提交
b8559d68d3
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      src/modules/questions/views/Question.vue

+ 10 - 1
src/modules/questions/views/Question.vue

@@ -457,6 +457,13 @@ export default {
       this.searchQues();
       this.searchQues();
     },
     },
     searchQues() {
     searchQues() {
+      if (!this.formSearch.courseNo) {
+        this.$notify({
+          message: "请选择课程",
+          type: "warning",
+        });
+        return;
+      }
       this.tableData = [];
       this.tableData = [];
       var url =
       var url =
         QUESTION_API + "/question/" + this.currentPage + "/" + this.pageSize;
         QUESTION_API + "/question/" + this.currentPage + "/" + this.pageSize;
@@ -736,7 +743,9 @@ export default {
           secondPropertyId: "",
           secondPropertyId: "",
         };
         };
       }
       }
-      this.searchQues();
+      if (this.formSearch.courseNo) {
+        this.searchQues();
+      }
     },
     },
   },
   },
 };
 };