소스 검색

提交题库页面bug修改

weiwenhai 6 년 전
부모
커밋
1ca15ef6b8

+ 1 - 0
src/modules/questions/styles/Common.css

@@ -97,3 +97,4 @@
 .margin_left_40 {
   margin-left: 40%;
 }
+

+ 8 - 13
src/modules/questions/views/BluePaperStructure.vue

@@ -33,6 +33,7 @@
                 clearable
                 placeholder="请选择"
                 size="small"
+                @focus="e => getCourses(e.target.value)"
               >
                 <el-option
                   v-for="item in courseInfoSelect"
@@ -312,19 +313,13 @@ export default {
     //查询所有课程
     getCourses(query) {
       query = query.trim();
-      if (query) {
-        if (!(query.indexOf("(") > -1 && query.indexOf(")") > -1)) {
-          this.courseLoading = true;
-          this.$http
-            .get(CORE_API + "/course/query?name=" + query + "&enable=true")
-            .then(response => {
-              this.courseList = response.data;
-              this.courseLoading = false;
-            });
-        }
-      } else {
-        this.courseList = [];
-      }
+      this.courseLoading = true;
+      this.$http
+        .get(CORE_API + "/course/query?name=" + query + "&enable=true")
+        .then(response => {
+          this.courseList = response.data;
+          this.courseLoading = false;
+        });
     },
     getType(val) {
       if (val == "ENSEMBLE") {

+ 8 - 13
src/modules/questions/views/CourseProperty.vue

@@ -33,6 +33,7 @@
                 clearable
                 placeholder="请选择"
                 size="small"
+                @focus="e => getCourses(e.target.value)"
               >
                 <el-option
                   v-for="item in courseInfoSelect"
@@ -461,19 +462,13 @@ export default {
     //查询所有课程
     getCourses(query) {
       query = query.trim();
-      if (query) {
-        if (!(query.indexOf("(") > -1 && query.indexOf(")") > -1)) {
-          this.courseLoading = true;
-          this.$http
-            .get(CORE_API + "/course/query?name=" + query + "&enable=true")
-            .then(response => {
-              this.courseList = response.data;
-              this.courseLoading = false;
-            });
-        }
-      } else {
-        this.courseList = [];
-      }
+      this.courseLoading = true;
+      this.$http
+        .get(CORE_API + "/course/query?name=" + query + "&enable=true")
+        .then(response => {
+          this.courseList = response.data;
+          this.courseLoading = false;
+        });
     },
     removeItem() {
       sessionStorage.removeItem("course_property_name");

+ 1 - 1
src/modules/questions/views/EditPaper.vue

@@ -50,7 +50,7 @@
             type="primary"
             @click="openDialog"
             size="small"
-            ><i class="el-icon-upload2"></i> 上传音频文件
+            ><i class="el-icon-upload2"></i> 上传音频
           </el-button>
           <el-button @click="back" size="small" type="primary"
             ><i class="el-icon-arrow-left"></i> 返回</el-button

+ 12 - 18
src/modules/questions/views/ExtractPaperRule.vue

@@ -46,6 +46,7 @@
                 clearable
                 placeholder="请选择"
                 size="small"
+                @focus="e => getCourses(e.target.value)"
               >
                 <el-option
                   v-for="item in courseInfoSelect"
@@ -360,7 +361,7 @@ export default {
         .catch(error => {
           this.loading = false;
           this.$notify({
-            message: error.body.desc,
+            message: error.response.data.desc,
             type: "error"
           });
           this.tableData = [];
@@ -598,9 +599,8 @@ export default {
             }
           },
           error => {
-            console.log("aaa");
             this.$notify({
-              message: error.body.desc,
+              message: error.response.data.desc,
               type: "error"
             });
           }
@@ -614,21 +614,14 @@ export default {
     //查询所有课程
     getCourses(query) {
       query = query.trim();
-      console.log("query:", query);
-      if (query) {
-        if (!(query.indexOf("(") > -1 && query.indexOf(")") > -1)) {
-          this.courseLoading = true;
-          this.$http
-            .get(CORE_API + "/course/query?name=" + query + "&enable=true")
-            .then(response => {
-              this.courseList = response.data;
-              console.log("this.courseList:", this.courseList);
-              this.courseLoading = false;
-            });
-        }
-      } else {
-        this.courseList = [];
-      }
+      this.courseLoading = true;
+      this.$http
+        .get(CORE_API + "/course/query?name=" + query + "&enable=true")
+        .then(response => {
+          this.courseList = response.data;
+          console.log("this.courseList:", this.courseList);
+          this.courseLoading = false;
+        });
     },
     //查询考试
     getExams(query) {
@@ -656,6 +649,7 @@ export default {
           courseNo: "",
           courseName: ""
         };
+        this.currentPage = 1;
       } else {
         this.formSearch.courseNo =
           sessionStorage.getItem("extract_paper_courseNo") == "null"

+ 9 - 13
src/modules/questions/views/GenPaper.vue

@@ -22,6 +22,7 @@
                 clearable
                 placeholder="全部"
                 size="small"
+                @focus="e => getCourses(e.target.value)"
               >
                 <el-option
                   v-for="item in courseInfoSelect"
@@ -543,19 +544,13 @@ export default {
     //查询所有课程
     getCourses(query) {
       query = query.trim();
-      if (query) {
-        if (!(query.indexOf("(") > -1 && query.indexOf(")") > -1)) {
-          this.courseLoading = true;
-          this.$http
-            .get(CORE_API + "/course/query?name=" + query + "&enable=true")
-            .then(response => {
-              this.courseList = response.data;
-              this.courseLoading = false;
-            });
-        }
-      } else {
-        this.courseList = [];
-      }
+      this.courseLoading = true;
+      this.$http
+        .get(CORE_API + "/course/query?name=" + query + "&enable=true")
+        .then(response => {
+          this.courseList = response.data;
+          this.courseLoading = false;
+        });
     },
     //打开导出弹框
     openExportDialog(row) {
@@ -753,6 +748,7 @@ export default {
           level: "",
           name: ""
         };
+        this.currentPage = 1;
       } else {
         this.formSearch = JSON.parse(sessionStorage.getItem("gen_paper"));
         this.currentPage =

+ 8 - 11
src/modules/questions/views/ImportPaper.vue

@@ -23,6 +23,7 @@
                 clearable
                 placeholder="请输入"
                 size="small"
+                @focus="e => getCourses(e.target.value)"
               >
                 <el-option
                   v-for="item in courseInfoSelect"
@@ -517,17 +518,13 @@ export default {
     },
     //查询所有课程
     getCourses(query) {
-      if (query) {
-        this.courseLoading = true;
-        this.$http
-          .get(CORE_API + "/course/query?name=" + query + "&enable=true")
-          .then(response => {
-            this.courseList = response.data;
-            this.courseLoading = false;
-          });
-      } else {
-        this.courseList = [];
-      }
+      this.courseLoading = true;
+      this.$http
+        .get(CORE_API + "/course/query?name=" + query + "&enable=true")
+        .then(response => {
+          this.courseList = response.data;
+          this.courseLoading = false;
+        });
     },
     useBasePaper() {
       this.loading = true;

+ 26 - 28
src/modules/questions/views/InsertBluePaperStructure.vue

@@ -1,6 +1,8 @@
 <template>
   <div id="insertBlueApp">
-    <LinkTitlesCustom :currentPaths="['精确结构创建', '创建大题']" />
+    <LinkTitlesCustom
+      :currentPaths="['基础信息 ', '蓝图结构预设', '蓝图结构创建']"
+    />
     <section class="content">
       <!-- 正文信息 -->
       <div class="box-body">
@@ -8,10 +10,10 @@
           :inline="true"
           :model="blueStruct"
           label-position="right"
-          label-width="90px"
+          label-width="78px"
         >
           <el-row>
-            <el-col :span="6">
+            <el-col :span="8">
               <el-form-item label="结构名称">
                 <el-input
                   class="search_width"
@@ -21,7 +23,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="8">
               <el-form-item label="设置类型">
                 <el-select
                   class="search_width"
@@ -34,7 +36,7 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="8">
               <el-form-item label="总 分">
                 <el-input
                   class="search_width"
@@ -44,22 +46,9 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
-              <div class="search_down">
-                <el-button size="small" type="primary" @click="saveBlueStruct"
-                  >保 存</el-button
-                >
-                <el-button size="small" type="primary" @click="insertDetail"
-                  ><i class="el-icon-plus"></i> 添加大题</el-button
-                >
-                <el-button size="small" type="primary" @click="back"
-                  ><i class="el-icon-arrow-left"></i> 返 回</el-button
-                >
-              </div>
-            </el-col>
           </el-row>
           <el-row>
-            <el-col :span="6">
+            <el-col :span="8">
               <el-form-item label="制定课程">
                 <el-select
                   class="search_width"
@@ -83,7 +72,7 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="8">
               <el-form-item label="课程属性">
                 <el-select
                   class="search_width"
@@ -106,14 +95,12 @@
             </el-col>
           </el-row>
           <el-form-item label="考试说明">
-            <div style="width:550px;">
-              <ckeditor
-                :display="display"
-                :width="wValue"
-                :height="hValue"
-                v-model="blueStruct.examRemark"
-              ></ckeditor>
-            </div>
+            <ckeditor
+              :display="display"
+              :width="wValue"
+              :height="hValue"
+              v-model="blueStruct.examRemark"
+            ></ckeditor>
           </el-form-item>
         </el-form>
 
@@ -227,6 +214,17 @@
           </el-table-column>
         </el-table>
       </div>
+      <div class="search_down margin_top_10">
+        <el-button size="small" type="primary" @click="saveBlueStruct"
+          >保存试卷结构</el-button
+        >
+        <el-button size="small" type="primary" @click="insertDetail"
+          ><i class="el-icon-plus"></i> 添加大题</el-button
+        >
+        <el-button size="small" type="primary" @click="back"
+          ><i class="el-icon-arrow-left"></i> 返 回</el-button
+        >
+      </div>
     </section>
   </div>
 </template>

+ 1 - 1
src/modules/questions/views/InsertBluePaperStructureInfo.vue

@@ -8,7 +8,7 @@
           :inline="true"
           :model="paperDetailStruct"
           label-position="right"
-          label-width="90px"
+          label-width="70px"
         >
           <el-row>
             <el-col :span="6">

+ 32 - 32
src/modules/questions/views/InsertPaperStructure.vue

@@ -1,6 +1,8 @@
 <template>
   <div id="insertApp">
-    <LinkTitlesCustom :currentPaths="['精确结构创建', '创建大题']" />
+    <LinkTitlesCustom
+      :currentPaths="['基础信息 ', '精确结构预设', '精确结构创建']"
+    />
     <section class="content">
       <!-- 正文信息 -->
       <div class="box-body">
@@ -10,10 +12,10 @@
           ref="paperStruct"
           :rules="rules2"
           label-position="right"
-          label-width="90px"
+          label-width="78px"
         >
           <el-row>
-            <el-col :span="6">
+            <el-col :span="8">
               <el-form-item label="结构名称" prop="name">
                 <el-input
                   class="search_width"
@@ -23,7 +25,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="8">
               <el-form-item label="总分" prop="score">
                 <el-input
                   class="search_width"
@@ -33,7 +35,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="8">
               <el-form-item label="制定课程">
                 <el-select
                   class="search_width"
@@ -57,39 +59,18 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
-              <div class="search_down">
-                <el-button
-                  size="small"
-                  type="primary"
-                  :disabled="button_disabled"
-                  @click="savePaperStruct()"
-                  >保 存</el-button
-                >
-                <el-button
-                  size="small"
-                  type="primary"
-                  :disabled="button_disabled"
-                  @click="insert()"
-                  ><i class="el-icon-plus"></i> 新增大题</el-button
-                >
-                <el-button size="small" type="primary" @click="back"
-                  ><i class="el-icon-arrow-left"></i> 返 回</el-button
-                >
-              </div>
-            </el-col>
           </el-row>
           <el-row>
-            <el-form-item label="考试说明">
-              <div style="width:550px;">
+            <el-col :span="24">
+              <el-form-item label="考试说明" class="pull-left">
                 <ckeditor
                   :display="display"
                   :width="wValue"
                   :height="hValue"
                   v-model="paperStruct.examRemark"
                 ></ckeditor>
-              </div>
-            </el-form-item>
+              </el-form-item>
+            </el-col>
           </el-row>
         </el-form>
 
@@ -159,8 +140,8 @@
         </el-dialog>
 
         <!-- 页面列表 -->
-        <div style="margin-top:10px"></div>
-        <el-table :data="paperDetailStructs" border>
+        <div class="margin_top_10"></div>
+        <el-table :data="paperDetailStructs" border style="width:88.5%">
           <el-table-column label="大题名称">
             <template slot-scope="scope">
               <span>{{ scope.row.name }}</span>
@@ -202,6 +183,25 @@
           </el-table-column>
         </el-table>
       </div>
+      <div class="search_down margin_top_10">
+        <el-button
+          size="small"
+          type="primary"
+          :disabled="button_disabled"
+          @click="savePaperStruct()"
+          >保存试卷结构</el-button
+        >
+        <el-button
+          size="small"
+          type="primary"
+          :disabled="button_disabled"
+          @click="insert()"
+          ><i class="el-icon-plus"></i> 新增大题</el-button
+        >
+        <el-button size="small" type="primary" @click="back"
+          ><i class="el-icon-arrow-left"></i> 返 回</el-button
+        >
+      </div>
     </section>
   </div>
 </template>

+ 4 - 1
src/modules/questions/views/InsertPaperStructureInfo.vue

@@ -9,7 +9,7 @@
         :rules="rules"
         ref="paperUnitForm"
         label-position="right"
-        label-width="90px"
+        label-width="78px"
       >
         <el-row>
           <el-col :span="6">
@@ -107,6 +107,9 @@
           </el-col>
         </el-row>
       </el-form>
+      <div
+        style="width: 100%; border-bottom: 1px solid #ddd; margin: 10px 0;"
+      ></div>
       <!-- 页面列表 -->
       <el-table
         :data="unitStructs"

+ 4 - 0
src/modules/questions/views/PreviewPaper.vue

@@ -287,6 +287,7 @@ small {
 .paper {
   width: 75%;
   margin: 0 auto;
+  background-color: white;
 }
 .paper-input {
   font-size: 14px;
@@ -311,4 +312,7 @@ small {
 textarea {
   width: 200px;
 }
+#app {
+  background-color: white !important;
+}
 </style>

+ 26 - 25
src/modules/questions/views/Question.vue

@@ -21,6 +21,7 @@
                 @change="initCourseProperty"
                 placeholder="请选择"
                 size="small"
+                @focus="e => getCourses(e.target.value)"
               >
                 <el-option
                   v-for="item in courseInfoSelect"
@@ -517,31 +518,26 @@ export default {
     },
     //查询所有课程
     getCourses(query) {
-      console.log("查询课程!");
-      if (query) {
-        this.$http
-          .get(CORE_API + "/course/query?name=" + query + "&enable=true")
-          .then(response => {
-            this.courseList = response.data;
-            if (this.formSearch.courseNo) {
-              this.$http
-                .get(
-                  QUESTION_API +
-                    "/courseProperty/enable/" +
-                    this.formSearch.courseNo
-                )
-                .then(response => {
-                  this.coursePropertyList = response.data;
-                  //查询一级属性
-                  this.getFirst();
-                });
-            } else {
-              this.coursePropertyList = [];
-            }
-          });
-      } else {
-        this.courseList = [];
-      }
+      this.$http
+        .get(CORE_API + "/course/query?name=" + query + "&enable=true")
+        .then(response => {
+          this.courseList = response.data;
+          if (this.formSearch.courseNo) {
+            this.$http
+              .get(
+                QUESTION_API +
+                  "/courseProperty/enable/" +
+                  this.formSearch.courseNo
+              )
+              .then(response => {
+                this.coursePropertyList = response.data;
+                //查询一级属性
+                this.getFirst();
+              });
+          } else {
+            this.coursePropertyList = [];
+          }
+        });
     },
     //重置查询表单
     resetSearchForm() {
@@ -719,6 +715,7 @@ export default {
           firstPropertyId: "",
           secondPropertyId: ""
         };
+        this.currentPage = 1;
       }
       this.searchQues();
     }
@@ -775,5 +772,9 @@ export default {
 .select_width {
   width: 150px;
 }
+.row_quesBody >>> p {
+  text-overflow: ellipsis;
+  overflow: hidden;
+}
 </style>
 <style scoped src="../styles/Common.css"></style>