From ac9608cb94979d632caa6b6ae2e91a5879824e6f Mon Sep 17 00:00:00 2001
From: luohairen <3399054449@qq.com>
Date: 星期三, 30 十月 2024 19:45:21 +0800
Subject: [PATCH] bug

---
 src/views/exam/paper/edit.vue |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/views/exam/paper/edit.vue b/src/views/exam/paper/edit.vue
index 0d92b76..ff068b0 100644
--- a/src/views/exam/paper/edit.vue
+++ b/src/views/exam/paper/edit.vue
@@ -123,13 +123,13 @@
       </el-form-item>
     </el-form>
 
-    <el-dialog :visible.sync="questionPage.showDialog" width="70%">
+    <el-dialog :visible.sync="questionPage.showDialog" width="70%" :close-on-click-modal="false">
       <el-form :model="questionPage.queryParam" ref="queryForm" :inline="true">
         <el-form-item label="ID锛�">
-          <el-input v-model="questionPage.queryParam.id" clearable></el-input>
+          <el-input v-model="questionPage.queryParam.id" clearable @input="queryForm"></el-input>
         </el-form-item>
         <el-form-item label="瀛︾锛�">
-          <el-select v-model="questionPage.queryParam.subjectIdInt" placeholder="瀛︾">
+          <el-select v-model="questionPage.queryParam.subjectIdInt" placeholder="瀛︾" @change="queryForm">
             <el-option v-for="item in subjects" :key="item.id" :label="item.name" :value="item.id"/>
           </el-select>
         </el-form-item>
@@ -415,8 +415,12 @@
     },
     queryForm () {
       this.questionPage.queryParam.pageIndex = 1
-      this.questionPage.queryParam.subjectId = [this.questionPage.queryParam.subjectIdInt]
-      this.search()
+      if (!this.questionPage.queryParam.subjectIdInt){
+        this.search()
+      }else{
+        this.questionPage.queryParam.subjectId = [this.questionPage.queryParam.subjectIdInt]
+        this.search()
+      }
     },
     confirmQuestionSelect () {
       let _this = this

--
Gitblit v1.8.0