Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

WANG 6 gadi atpakaļ
vecāks
revīzija
57cca601fc

+ 1 - 1
src/modules/marking/routes/routes.js

@@ -38,7 +38,7 @@ export default [
         component: Marker
       },
       {
-        path: "marker_detail/:workId/:examId/:name/:markerId/:userName", //评卷员详情
+        path: "marker_detail/:workId/:markerId/:userName", //评卷员详情
         component: MarkerDetail
       },
       {

+ 14 - 1
src/modules/marking/views/MarkWorkOverview.vue

@@ -70,7 +70,7 @@
                     size="small"
                     type="primary"
                     icon="el-icon-search"
-                    @click="searchSetting"
+                    @click="searchBtnFn"
                     >查询</el-button
                   >
                 </el-form-item>
@@ -135,6 +135,7 @@
           </el-table>
           <div class="page pull-right">
             <el-pagination
+              v-if="paginationShow"
               @current-change="handleSettingCurrentChange"
               @size-change="handleSizeChange"
               :current-page="currentPage"
@@ -161,6 +162,7 @@ export default {
   },
   data() {
     return {
+      paginationShow: false,
       formSearch: {
         courseCode: ""
       },
@@ -373,6 +375,9 @@ export default {
         )
         .then(response => {
           this.courseList = response.data;
+          if (this.$route.query && this.$route.query.courseCode) {
+            this.formSearch.courseCode = this.$route.query.courseCode;
+          }
         });
     },
     handleSettingCurrentChange(val) {
@@ -383,6 +388,10 @@ export default {
       this.pageSize = val;
       this.searchSetting();
     },
+    searchBtnFn() {
+      this.currentPage = 1;
+      this.searchSetting();
+    },
     searchSetting() {
       if (!this.markWorkSearchForm.markId) {
         this.$notify({
@@ -419,6 +428,9 @@ export default {
               "/marking/mark_work_overview?" +
               new URLSearchParams(JSON.parse(JSON.stringify(this.quertTemp)))
           });
+          this.$nextTick(function() {
+            this.paginationShow = true;
+          });
         });
     },
     courseDetail(row) {
@@ -588,6 +600,7 @@ export default {
         this.pageSize = parseInt(formData.pageSize);
         this.examId = parseInt(formData.examId);
         this.markWorkName = formData.markWorkName;
+        this.doPie();
         this.searchSetting();
         this.getCourses();
       }

+ 6 - 30
src/modules/marking/views/Marker.vue

@@ -120,7 +120,7 @@
           </el-table>
           <div class="page pull-right">
             <el-pagination
-              background
+              v-if="paginationShow"
               @current-change="handleSettingCurrentChange"
               @size-change="handleSizeChange"
               :current-page="currentPage"
@@ -153,9 +153,8 @@ export default {
       total: 10,
       loading: false,
       workId: "",
-      examId: "",
-      markWorkName: "",
-      markWorkList: []
+      markWorkList: [],
+      paginationShow: false
     };
   },
   methods: {
@@ -167,19 +166,6 @@ export default {
       this.pageSize = val;
       this.searchSetting();
     },
-    pagingSetting() {
-      var start = (this.currentPage - 1) * this.pageSize;
-      var end =
-        this.currentPage * this.pageSize < this.total
-          ? this.currentPage * this.pageSize
-          : this.total;
-      var tempData = [];
-      console.log(`当前页: ${this.currentPage},开始:${start},结束:${end}`);
-      for (let i = start; i < end; i++) {
-        tempData.push(this.tableData[i]);
-      }
-      this.tableData = tempData;
-    },
     searchSetting() {
       if (!this.formSearch.markId) {
         this.$notify({
@@ -189,15 +175,6 @@ export default {
         });
         return false;
       }
-      let obj = {};
-      for (let item of this.markWorkList) {
-        if (item.id === this.formSearch.markId) {
-          obj = item;
-          break;
-        }
-      }
-      this.examId = obj.examId;
-      this.markWorkName = obj.name;
       this.workId = this.formSearch.markId;
       this.loading = true;
       this.$http
@@ -221,6 +198,9 @@ export default {
               "/marking/marker?" +
               new URLSearchParams(JSON.parse(JSON.stringify(this.formSearch)))
           });
+          this.$nextTick(function() {
+            this.paginationShow = true;
+          });
         });
     },
     markerDetail(row) {
@@ -228,10 +208,6 @@ export default {
         "/marking/marker_detail/" +
         this.workId +
         "/" +
-        this.examId +
-        "/" +
-        this.markWorkName +
-        "/" +
         row.userId +
         "/" +
         row.userName;

+ 1 - 5
src/modules/marking/views/MarkerDetail.vue

@@ -114,9 +114,7 @@ export default {
       total: 10,
       loading: true,
       workId: "",
-      examId: "",
-      courseCode: "",
-      examName: ""
+      courseCode: ""
     };
   },
   components: {
@@ -194,8 +192,6 @@ export default {
   },
   created() {
     this.workId = this.$route.params.workId;
-    this.examId = this.$route.params.examId;
-    this.examName = this.$route.params.name;
     this.userName = this.$route.params.userName;
     this.userId = this.$route.params.markerId;
     this.initSetting();

+ 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>

+ 64 - 31
src/modules/oe/views/examScheduling.vue

@@ -524,38 +524,71 @@ export default {
       }
     },
     doUploadAnswer() {
-      this.uploadAnswerDialogLoading = true;
-      let config = {
-        headers: { "Content-Type": "multipart/form-data" }
-      };
-      let param = new FormData();
-      param.append("file", this.offlineAnswerFile);
-      param.append("examRecordDataId", this.currentOfflineExamRecordDataId);
+      var index = this.offlineAnswerFile.name.lastIndexOf(".");
+      var fileNameLength = this.offlineAnswerFile.name.length;
+      var fileSuffix = this.offlineAnswerFile.name
+        .substring(index + 1, fileNameLength)
+        .toUpperCase();
       this.$http
-        .post("/api/ecs_oe_student/offlineExam/submitPaper", param, config)
-        .then(() => {
-          this.$notify({
-            title: "提示",
-            message: "上传成功",
-            type: "success",
-            duration: 2000
-          });
-          this.uploadAnswerDialogVisible = false;
-          this.uploadAnswerDialogLoading = false;
-          this.$refs.offlineFileInput.value = "";
-          this.offlineAnswerFile = "";
-          this.search();
-        })
-        .catch(() => {
-          this.$notify({
-            title: "提示",
-            message: "上传失败",
-            type: "error",
-            duration: 2000
-          });
-          this.uploadAnswerDialogLoading = false;
-          this.$refs.offlineFileInput.value = "";
-          this.offlineAnswerFile = "";
+        .get(
+          "/api/ecs_exam_work/exam/property/" +
+            this.form.examId +
+            "/OFFLINE_UPLOAD_FILE_TYPE"
+        )
+        .then(response => {
+          var allowfileSuffixs = response.data;
+          if (!allowfileSuffixs || allowfileSuffixs.length == 0) {
+            this.$notify({
+              title: "提示",
+              message: "当前考试设置不允许上传附件",
+              type: "error",
+              duration: 2000
+            });
+            return false;
+          }
+          if (allowfileSuffixs.toString().indexOf(fileSuffix) < 0) {
+            this.$notify({
+              title: "提示",
+              message:
+                "当前考试允许上传文件格式为:" + allowfileSuffixs.toString(),
+              type: "error",
+              duration: 2000
+            });
+            return false;
+          }
+          this.uploadAnswerDialogLoading = true;
+          let config = {
+            headers: { "Content-Type": "multipart/form-data" }
+          };
+          let param = new FormData();
+          param.append("file", this.offlineAnswerFile);
+          param.append("examRecordDataId", this.currentOfflineExamRecordDataId);
+          this.$http
+            .post("/api/ecs_oe_student/offlineExam/submitPaper", param, config)
+            .then(() => {
+              this.$notify({
+                title: "提示",
+                message: "上传成功",
+                type: "success",
+                duration: 2000
+              });
+              this.uploadAnswerDialogVisible = false;
+              this.uploadAnswerDialogLoading = false;
+              this.$refs.offlineFileInput.value = "";
+              this.offlineAnswerFile = "";
+              this.search();
+            })
+            .catch(() => {
+              this.$notify({
+                title: "提示",
+                message: "上传失败",
+                type: "error",
+                duration: 2000
+              });
+              this.uploadAnswerDialogLoading = false;
+              this.$refs.offlineFileInput.value = "";
+              this.offlineAnswerFile = "";
+            });
         });
     },
     cleanOfflineFile() {

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

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

+ 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 - 4
src/modules/questions/views/ExtractPaperInfo.vue

@@ -539,10 +539,7 @@ export default {
               }
               this.loading = false;
               this.$notify({ type: "success", message: "保存成功" });
-              this.$router.push({
-                path:
-                  "/questions/extract_paper_rule/" + this.extractConfig.examId
-              });
+              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);

+ 40 - 28
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>
@@ -416,19 +426,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 +447,15 @@ export default {
       this.currentPage = val;
       this.searchGenPaper();
     },
-    getCourseName(courseNo) {
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.searchGenPaper();
+    },
+    getCourseObj(courseNo) {
       for (let course of this.courseList) {
         if (course.code == courseNo) {
-          this.formSearch.courseName = course.name;
+          return course;
         }
       }
     },

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

+ 18 - 16
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
@@ -161,7 +157,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>
@@ -316,7 +314,11 @@ export default {
       this.currentPage = val;
       this.searchPaperStructs();
     },
-
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.searchPaperStructs();
+    },
     //查询所有课程
     getCourses(query) {
       query = query.trim();

+ 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) {