Browse Source

feat: 考点考场查询条件调整

zhangjie 11 months ago
parent
commit
096244fbd3

+ 9 - 0
src/components/base/PlaceSelect.vue

@@ -29,6 +29,7 @@ export default {
     value: { type: [Number, String], default: "" },
     clearable: { type: Boolean, default: true },
     printPlanId: { type: [String, Array], default: "" },
+    examId: { type: String, default: "" },
   },
   data() {
     return {
@@ -50,6 +51,13 @@ export default {
         this.$emit("change", {});
       }
     },
+    examId(val, oldval) {
+      if (val !== oldval) {
+        this.search("");
+        this.$emit("input", "");
+        this.$emit("change", {});
+      }
+    },
   },
   async created() {
     this.search();
@@ -59,6 +67,7 @@ export default {
       const res = await placeQuery({
         param: query,
         printPlanId: this.printPlanId,
+        examId: this.examId,
       });
       this.optionList = res;
     },

+ 9 - 0
src/components/base/RoomSelect.vue

@@ -29,6 +29,7 @@ export default {
     value: { type: [Number, String], default: "" },
     clearable: { type: Boolean, default: true },
     printPlanId: { type: [String, Array], default: "" },
+    examId: { type: String, default: "" },
   },
   data() {
     return {
@@ -50,6 +51,13 @@ export default {
         this.$emit("change", {});
       }
     },
+    examId(val, oldval) {
+      if (val !== oldval) {
+        this.search("");
+        this.$emit("input", "");
+        this.$emit("change", {});
+      }
+    },
   },
   async created() {
     this.search();
@@ -59,6 +67,7 @@ export default {
       const res = await roomQuery({
         param: query,
         printPlanId: this.printPlanId,
+        examId: this.examId,
       });
       this.optionList = res;
     },

+ 2 - 0
src/modules/print/views/BusinessDataDetail.vue

@@ -53,6 +53,7 @@
           <el-form-item label="考点:" label-width="55px">
             <place-select
               v-model.trim="filter.examPlace"
+              :exam-id="filter.examId"
               :print-plan-id="filter.printPlanIdList"
               placeholder="考点"
               clearable
@@ -61,6 +62,7 @@
           <el-form-item label="考场:" label-width="55px">
             <room-select
               v-model.trim="filter.examRoom"
+              :exam-id="filter.examId"
               :print-plan-id="filter.printPlanIdList"
               placeholder="考场"
               clearable

+ 2 - 0
src/modules/print/views/BusinessDataExport.vue

@@ -54,6 +54,7 @@
           <el-form-item label="考点:" label-width="55px">
             <place-select
               v-model.trim="filter.examPlace"
+              :exam-id="filter.examId"
               :print-plan-id="filter.printPlanIdList"
               placeholder="考点"
               clearable
@@ -62,6 +63,7 @@
           <el-form-item label="考场:" label-width="55px">
             <room-select
               v-model.trim="filter.examRoom"
+              :exam-id="filter.examId"
               :print-plan-id="filter.printPlanIdList"
               placeholder="考场"
               clearable

+ 2 - 0
src/modules/print/views/PrintTaskManage.vue

@@ -70,6 +70,7 @@
           <el-form-item label="考点:" label-width="55px">
             <place-select
               v-model.trim="filter.examPlace"
+              :exam-id="filter.examId"
               :print-plan-id="filter.printPlanId"
               placeholder="考点"
               clearable
@@ -78,6 +79,7 @@
           <el-form-item label="考场:" label-width="55px">
             <room-select
               v-model.trim="filter.examRoom"
+              :exam-id="filter.examId"
               :print-plan-id="filter.printPlanId"
               placeholder="考场"
               clearable