فهرست منبع

提交题库页面bug修改

weiwenhai 6 سال پیش
والد
کامیت
834580d21a

+ 6 - 1
src/modules/marking/views/Marking.vue

@@ -198,7 +198,12 @@
             </span>
           </small>
           <small class="marktitle titlefont marksign">
-            <el-button type="success" @click="backIndex" size="small" icon="el-icon-arrow-left">
+            <el-button
+              type="success"
+              @click="backIndex"
+              size="small"
+              icon="el-icon-arrow-left"
+            >
               <!-- <v-icon name="sign-out-alt" scale="0.5"/> -->
               <span class="titlefont">返回</span>
             </el-button>

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

@@ -3,6 +3,10 @@
   width: 150px;
 }
 
+.search_width_80px {
+  width: 80px;
+}
+
 .form_width {
   width: 200px;
 }

+ 1 - 2
src/modules/questions/views/ExtractPaperInfo.vue

@@ -540,8 +540,7 @@ export default {
               this.loading = false;
               this.$notify({ type: "success", message: "保存成功" });
               this.$router.push({
-                path:
-                  "/questions/extract_paper_rule/" + this.extractConfig.examId
+                path: "/questions/extract_paper_rule/0"
               });
             },
             error => {

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

@@ -416,19 +416,16 @@ export default {
     },
     genPaperDetail() {
       var courseNo = this.formSearch.courseNo;
-      this.getCourseName(courseNo);
-      var level = this.formSearch.level;
-      if (!level) {
-        this.$notify({
-          message: "请选择课程层次",
-          type: "error"
-        });
-      } else if (!courseNo) {
+      if (!courseNo) {
         this.$notify({
+          title: "警告",
           message: "请选择课程",
-          type: "error"
+          type: "warning"
         });
       } else {
+        var course = this.getCourseObj(courseNo);
+        this.formSearch.courseName = course.name;
+        var level = course.level;
         sessionStorage.setItem("gen_paper", JSON.stringify(this.formSearch));
         sessionStorage.setItem("gen_paper_currentPage", this.currentPage);
         this.$router.push({
@@ -440,10 +437,10 @@ export default {
       this.currentPage = val;
       this.searchGenPaper();
     },
-    getCourseName(courseNo) {
+    getCourseObj(courseNo) {
       for (let course of this.courseList) {
         if (course.code == courseNo) {
-          this.formSearch.courseName = course.name;
+          return course;
         }
       }
     },

+ 3 - 0
src/modules/questions/views/ImportPaper.vue

@@ -596,6 +596,7 @@ export default {
     expQuesType() {
       if (!this.formSearch.courseNo) {
         this.$notify({
+          title: "警告",
           message: "请输入课程",
           type: "warning"
         });
@@ -651,6 +652,7 @@ export default {
     openQuesPro() {
       if (!this.selectedPaperIds || this.selectedPaperIds.length < 1) {
         this.$notify({
+          title: "警告",
           message: "请选择试卷",
           type: "warning"
         });
@@ -663,6 +665,7 @@ export default {
     openQuesProC() {
       if (!this.formSearch.courseNo) {
         this.$notify({
+          title: "警告",
           message: "请输入课程",
           type: "warning"
         });

+ 28 - 12
src/modules/questions/views/InsertPaperStructureInfo.vue

@@ -43,12 +43,16 @@
           </el-col>
           <el-col :span="6">
             <el-form-item label="题目数量" prop="count">
-              <el-input 
-                class="search_width"
-                v-model.number="paperUnitForm.count" 
-                :disabled="true">
+              <el-input
+                class="search_width_80px"
+                v-model.number="paperUnitForm.count"
+                :disabled="true"
+              >
               </el-input>
-              <el-button @click="propertyDialog = true" icon="el-icon-plus"></el-button>
+              <el-button
+                @click="propertyDialog = true"
+                icon="el-icon-plus"
+              ></el-button>
             </el-form-item>
           </el-col>
         </el-row>
@@ -200,7 +204,11 @@
           >
             <el-row>
               <el-col :span="12">
-                <el-form-item label="题型结构" prop="questionType">
+                <el-form-item
+                  label="题型结构"
+                  prop="questionType"
+                  label-width="78px"
+                >
                   <el-select
                     class="form_width"
                     @change="getQuesNameList"
@@ -217,7 +225,7 @@
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <el-form-item label="每题分值" prop="score">
+                <el-form-item label="每题分值" prop="score" label-width="78px">
                   <el-input
                     class="form_width"
                     v-model.number="paperUnitForm2.score"
@@ -229,7 +237,11 @@
             </el-row>
             <el-row>
               <el-col :span="12">
-                <el-form-item label="题型总分" prop="totalScore">
+                <el-form-item
+                  label="题型总分"
+                  prop="totalScore"
+                  label-width="78px"
+                >
                   <el-input
                     class="form_width"
                     v-model="paperUnitForm2.totalScore"
@@ -238,7 +250,11 @@
                 </el-form-item>
               </el-col>
               <el-col :span="12">
-                <el-form-item label="来源大题" prop="quesNames">
+                <el-form-item
+                  label="来源大题"
+                  prop="quesNames"
+                  label-width="78px"
+                >
                   <el-select
                     class="form_width"
                     multiple
@@ -1124,11 +1140,11 @@ export default {
         paperUnitForm.totalScore =
           (paperUnitForm.score * 1000 * paperUnitForm.count) / 1000;
       }, 5);
-      if(this.clearCheck(paperUnitForm.count)){
-        this.$refs['paperUnitForm'].clearValidate('count');
+      if (this.clearCheck(paperUnitForm.count)) {
+        this.$refs["paperUnitForm"].clearValidate("count");
       }
     },
-    clearCheck(value){
+    clearCheck(value) {
       var reg = /^\d+(?=\.{0,1}\d+$|$)/;
       if (!value) {
         return true;

+ 7 - 1
src/modules/questions/views/PaperStructure.vue

@@ -161,6 +161,8 @@
           @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-size="pageSize"
+          :page-sizes="[10, 20, 50, 100]"
+          @size-change="handleSizeChange"
           layout="total, prev, pager, next, jumper"
           :total="total"
         ></el-pagination>
@@ -316,7 +318,11 @@ export default {
       this.currentPage = val;
       this.searchPaperStructs();
     },
-
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.searchPaperStructs();
+    },
     //查询所有课程
     getCourses(query) {
       query = query.trim();