فهرست منبع

“试卷检查”课程和评卷员查询条件取消联动

deason 4 سال پیش
والد
کامیت
0679f09cd0
1فایلهای تغییر یافته به همراه10 افزوده شده و 5 حذف شده
  1. 10 5
      src/modules/marking/views/MarkPaperCheck.vue

+ 10 - 5
src/modules/marking/views/MarkPaperCheck.vue

@@ -82,7 +82,6 @@
             <el-form-item label="课程" prop="courseCode">
               <el-select
                 clearable
-                @change="getUserList"
                 filterable
                 class="input"
                 v-model="formSearch.courseCode"
@@ -100,8 +99,8 @@
             <el-form-item label="评委" prop="userId">
               <el-select
                 clearable
-                class="input"
                 filterable
+                class="input"
                 v-model="formSearch.userId"
                 placeholder="请选择"
                 style="width:150px;"
@@ -319,7 +318,10 @@ export default {
       if (this.$route.query) {
         this.$router.push({ path: "/marking/mark_paper_check" });
       }
+
       this.getCourses();
+      this.getUserList();
+
       this.formSearch = Object.assign(this.formSearch, {
         orgCode: "",
         studentName: "",
@@ -362,19 +364,21 @@ export default {
           this.courseList = response.data;
           if (this.$route.query && this.$route.query.courseCode) {
             this.formSearch.courseCode = this.$route.query.courseCode;
-            this.getUserList();
           }
         });
     },
     //查询评委
     getUserList() {
+      if (!this.formSearch.workId) {
+        return;
+      }
+
       this.$http
         .get(
           DATA_PROCESS_API +
             "/markUsers/assign?workId=" +
             this.formSearch.workId +
-            "&courseCode=" +
-            this.formSearch.courseCode
+            "&courseCode="
         )
         .then(response => {
           this.userList = response.data;
@@ -528,6 +532,7 @@ export default {
         this.currentPage = parseInt(formData.currentPage);
         this.pageSize = parseInt(formData.pageSize);
         this.getCourses();
+        this.getUserList();
         this.initMarkPaperCheck();
       }
     }