Browse Source

题库所有列表页,条数控制,排序

weiwenhai 6 năm trước cách đây
mục cha
commit
df3e8300e5

+ 10 - 9
src/modules/questions/views/BluePaperStructure.vue

@@ -102,20 +102,14 @@
             <span>{{ getType(scope.row.genPaperType) }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="大题数" width="65">
-          <template slot-scope="scope">
-            <span>{{ scope.row.detailCount }}</span>
-          </template>
+        <el-table-column label="大题数" width="88" sortable prop="detailCount">
         </el-table-column>
         <el-table-column label="难度" width="95">
           <template slot-scope="scope">
             <span>{{ getDifficulty(scope.row.difficulty) }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="总分" width="55">
-          <template slot-scope="scope">
-            <span>{{ scope.row.totalScore }}</span>
-          </template>
+        <el-table-column label="总分" width="78" sortable prop="totalScore">
         </el-table-column>
         <el-table-column label="操作" width="175">
           <template slot-scope="scope">
@@ -142,7 +136,9 @@
           @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-size="pageSize"
-          layout="total, prev, pager, next, jumper"
+          :page-sizes="[10, 20, 50, 100]"
+          @size-change="handleSizeChange"
+          layout="total, sizes, prev, pager, next, jumper"
           :total="total"
         ></el-pagination>
       </div>
@@ -192,6 +188,11 @@ export default {
       this.currentPage = val;
       this.searchAll();
     },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.searchAll();
+    },
     searchFrom() {
       this.currentPage = 1;
       this.searchAll();

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

@@ -159,7 +159,9 @@
           @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-size="pageSize"
-          layout="total, prev, pager, next, jumper"
+          :page-sizes="[10, 20, 50, 100]"
+          @size-change="handleSizeChange"
+          layout="total, sizes, prev, pager, next, jumper"
           :total="total"
         >
         </el-pagination>
@@ -416,6 +418,11 @@ export default {
       this.currentPage = val;
       this.searchCourProperty();
     },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.searchCourProperty();
+    },
     //确定
     submit(formData) {
       this.$refs[formData].validate(valid => {

+ 2 - 2
src/modules/questions/views/EditOtherQuestion.vue

@@ -145,10 +145,10 @@
             <el-col :xs="3" :sm="3" :md="3" :lg="3">
               <el-form-item>
                 <el-button
-                  type="info"
+                  type="primary"
                   @click="insertProperty"
                   style="margin-left:-30px;"
-                  >新增属性</el-button
+                  ><i class="el-icon-plus"></i> 新增属性</el-button
                 >
               </el-form-item>
             </el-col>

+ 2 - 2
src/modules/questions/views/EditSelectQuestion.vue

@@ -191,8 +191,8 @@
             <el-col> <span v-html="answer"></span> </el-col>
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" icon="plus" @click="addQuesOption"
-              >新增选项</el-button
+            <el-button type="primary" @click="addQuesOption"
+              ><i class="el-icon-plus"></i> 新增选项</el-button
             >
             <el-button
               type="primary"

+ 8 - 2
src/modules/questions/views/ExportStructure.vue

@@ -138,7 +138,9 @@
           @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-size="pageSize"
-          layout="total, prev, pager, next, jumper"
+          :page-sizes="[10, 20, 50, 100]"
+          @size-change="handleSizeChange"
+          layout="total, sizes, prev, pager, next, jumper"
           :total="total"
         >
         </el-pagination>
@@ -486,7 +488,11 @@ export default {
       this.currentPage = val;
       this.search();
     },
-
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.search();
+    },
     closeQuesDialog() {
       this.dialogModel = false;
     },

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

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

+ 8 - 1
src/modules/questions/views/ExtractPaperRule.vue

@@ -154,7 +154,9 @@
           @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-size="pageSize"
-          layout="total, prev, pager, next, jumper"
+          :page-sizes="[10, 20, 50, 100]"
+          @size-change="handleSizeChange"
+          layout="total, sizes, prev, pager, next, jumper"
           :total="total"
         >
         </el-pagination>
@@ -368,6 +370,11 @@ export default {
       this.currentPage = val;
       this.searchRulePaper();
     },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.searchRulePaper();
+    },
     //制定调卷规则
     markRules() {
       sessionStorage.setItem("extract_paper_examId", this.formSearch.examId);

+ 32 - 17
src/modules/questions/views/GenPaper.vue

@@ -132,30 +132,38 @@
             <span>{{ scope.row.name }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="试卷总分" width="80">
-          <template slot-scope="scope">
-            <span>{{ scope.row.totalScore }}</span>
-          </template>
+        <el-table-column
+          label="试卷总分"
+          width="103"
+          sortable
+          prop="totalScore"
+        >
         </el-table-column>
-        <el-table-column label="试卷难度" width="80">
-          <template slot-scope="scope">
-            <span>{{ scope.row.difficultyDegree }}</span>
-          </template>
+        <el-table-column
+          label="试卷难度"
+          width="103"
+          sortable
+          prop="difficultyDegree"
+        >
         </el-table-column>
-        <el-table-column label="大题数量" width="80">
-          <template slot-scope="scope">
-            <span>{{ scope.row.paperDetailCount }}</span>
-          </template>
+        <el-table-column
+          label="大题数量"
+          width="103"
+          sortable
+          prop="paperDetailCount"
+        >
         </el-table-column>
         <el-table-column label="录入员" width="150">
           <template slot-scope="scope">
             <span>{{ scope.row.creator }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="创建时间" width="153">
-          <template slot-scope="scope">
-            <span>{{ scope.row.createTime }}</span>
-          </template>
+        <el-table-column
+          label="创建时间"
+          width="153"
+          sortable
+          prop="createTime"
+        >
         </el-table-column>
         <el-table-column label="修改人" width="150">
           <template slot-scope="scope">
@@ -223,7 +231,9 @@
           @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-size="pageSize"
-          layout="total, prev, pager, next, jumper"
+          :page-sizes="[10, 20, 50, 100]"
+          @size-change="handleSizeChange"
+          layout="total, sizes, prev, pager, next, jumper"
           :total="total"
         >
         </el-pagination>
@@ -437,6 +447,11 @@ export default {
       this.currentPage = val;
       this.searchGenPaper();
     },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.searchGenPaper();
+    },
     getCourseObj(courseNo) {
       for (let course of this.courseList) {
         if (course.code == courseNo) {

+ 32 - 17
src/modules/questions/views/ImportPaper.vue

@@ -144,30 +144,38 @@
             <span>{{ scope.row.name }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="试卷总分" width="80">
-          <template slot-scope="scope">
-            <span>{{ scope.row.totalScore }}</span>
-          </template>
+        <el-table-column
+          label="试卷总分"
+          width="103"
+          sortable
+          prop="totalScore"
+        >
         </el-table-column>
-        <el-table-column label="试卷难度" width="80">
-          <template slot-scope="scope">
-            <span>{{ scope.row.difficultyDegree }}</span>
-          </template>
+        <el-table-column
+          label="试卷难度"
+          width="103"
+          sortable
+          prop="difficultyDegree"
+        >
         </el-table-column>
-        <el-table-column label="大题数量" width="80">
-          <template slot-scope="scope">
-            <span>{{ scope.row.paperDetailCount }}</span>
-          </template>
+        <el-table-column
+          label="大题数量"
+          width="103"
+          sortable
+          prop="paperDetailCount"
+        >
         </el-table-column>
         <el-table-column label="录入员" width="150">
           <template slot-scope="scope">
             <span>{{ scope.row.creator }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="创建时间" width="153">
-          <template slot-scope="scope">
-            <span>{{ scope.row.createTime }}</span>
-          </template>
+        <el-table-column
+          label="创建时间"
+          width="153"
+          sortable
+          prop="createTime"
+        >
         </el-table-column>
         <el-table-column label="修改人" width="150">
           <template slot-scope="scope">
@@ -226,7 +234,9 @@
           @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-size="pageSize"
-          layout="total, prev, pager, next, jumper"
+          :page-sizes="[10, 20, 50, 100]"
+          @size-change="handleSizeChange"
+          layout="total, sizes, prev, pager, next, jumper"
           :total="total"
         >
         </el-pagination>
@@ -422,6 +432,11 @@ export default {
       this.currentPage = val;
       this.searchImportPaper();
     },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.searchImportPaper();
+    },
     getCourseName(courseNo) {
       for (let course of this.courseList) {
         if (course.code == courseNo) {

+ 11 - 15
src/modules/questions/views/PaperStructure.vue

@@ -96,7 +96,7 @@
         @selection-change="selectionChange"
       >
         <el-table-column type="selection" width="35"></el-table-column>
-        <el-table-column label="预设精确结构名称">
+        <el-table-column label="预设精确结构名称" width="190">
           <template slot-scope="scope">
             <span>{{ scope.row.name }}</span>
           </template>
@@ -116,27 +116,23 @@
             <span>{{ getType(scope.row.courseNo) }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="大题数" width="65">
-          <template slot-scope="scope">
-            <span>{{ scope.row.detailCount }}</span>
-          </template>
+        <el-table-column label="大题数" width="88" sortable prop="detailCount">
         </el-table-column>
-        <el-table-column label="小题数" width="65">
-          <template slot-scope="scope">
-            <span>{{ scope.row.detailUnitCount }}</span>
-          </template>
+        <el-table-column
+          label="小题数"
+          width="88"
+          sortable
+          prop="detailUnitCount"
+        >
         </el-table-column>
-        <el-table-column label="总分" width="55">
-          <template slot-scope="scope">
-            <span>{{ scope.row.totalScore }}</span>
-          </template>
+        <el-table-column label="总分" width="78" sortable prop="totalScore">
         </el-table-column>
         <el-table-column label="创建人" width="100">
           <template slot-scope="scope">
             <span>{{ scope.row.creator }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="操作" width="175">
+        <el-table-column label="操作" width="175" fixed="right">
           <template slot-scope="scope">
             <div class="operate_left">
               <el-button
@@ -163,7 +159,7 @@
           :page-size="pageSize"
           :page-sizes="[10, 20, 50, 100]"
           @size-change="handleSizeChange"
-          layout="total, prev, pager, next, jumper"
+          layout="total, sizes, prev, pager, next, jumper"
           :total="total"
         ></el-pagination>
       </div>

+ 8 - 1
src/modules/questions/views/Question.vue

@@ -226,7 +226,9 @@
           @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-size="pageSize"
-          layout="total, prev, pager, next, jumper"
+          :page-sizes="[10, 20, 50, 100]"
+          @size-change="handleSizeChange"
+          layout="total, sizes, prev, pager, next, jumper"
           :total="total"
         >
         </el-pagination>
@@ -420,6 +422,11 @@ export default {
       this.currentPage = val;
       this.searchQues();
     },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.searchQues();
+    },
     getCourseName(courseNo) {
       for (let course of this.courseList) {
         if (course.code == courseNo) {