xiatian 3 роки тому
батько
коміт
a12d0aa830

+ 9 - 0
src/constants/constants.js

@@ -118,3 +118,12 @@ export const AUDIT_AUTHORITY = [
   { code: "SECOND", name: "中级" },
   { code: "THIRD", name: "高级" },
 ];
+
+export const PAPER_AUDIT_STATUS = [
+  { code: "FIRST_PENDING_TRIAL", name: "初级待审" },
+  { code: "SECOND_PENDING_TRIAL", name: "中级待审" },
+  { code: "THIRD_PENDING_TRIAL", name: "高级待审" },
+  { code: "WITHDRAW", name: "已撤回" },
+  { code: "NOT_PASS", name: "审核未通过" },
+  { code: "PASS", name: "审核通过" },
+];

+ 13 - 1
src/filters/filters.js

@@ -1,6 +1,10 @@
 import "../modules/questions/filters/filters";
 import Vue from "vue";
-import { LEVEL_TYPE_SELECT, AUDIT_AUTHORITY } from "@/constants/constants";
+import {
+  LEVEL_TYPE_SELECT,
+  AUDIT_AUTHORITY,
+  PAPER_AUDIT_STATUS,
+} from "@/constants/constants";
 
 // 课程层次过滤器
 Vue.filter("levelTypeFilter", function (val) {
@@ -18,3 +22,11 @@ Vue.filter("auditAuthorityFilter", function (val) {
     }
   }
 });
+
+Vue.filter("paperAuditStatusFilter", function (val) {
+  for (let e of PAPER_AUDIT_STATUS) {
+    if (e.code === val) {
+      return e.name;
+    }
+  }
+});

+ 5 - 0
src/modules/questions/routes/routes.js

@@ -27,6 +27,7 @@ import data_previllege from "../views/data_previllege.vue";
 import PaperStorage from "../views/PaperStorage.vue";
 import ViewPaper from "../views/ViewPaper.vue";
 import OrgProperty from "../views/OrgProperty.vue";
+import PaperPendingTrial from "../views/PaperPendingTrial.vue";
 
 export default [
   {
@@ -99,6 +100,10 @@ export default [
         path: "import_paper/:isClear", //题库试卷列表
         component: ImportPaper,
       },
+      {
+        path: "paper_pending_trial/:isClear", //题库待审列表
+        component: PaperPendingTrial,
+      },
       {
         path: "gen_paper/:isClear", //卷库试卷列表
         component: GenPaper,

+ 79 - 0
src/modules/questions/views/AuditPaper.vue

@@ -0,0 +1,79 @@
+<template>
+  <el-form>
+    <el-form-item label="审核结果">
+      <el-select v-model="auditForm.auditResult" disabled>
+        <el-option label="通过" value="PASS"></el-option>
+        <el-option label="不通过" value="NOT_PASS"></el-option>
+      </el-select>
+    </el-form-item>
+    <el-form-item label="审核意见" style="margin-top: 15px">
+      <el-input
+        v-model="auditForm.auditRemark"
+        type="textarea"
+        placeholder="请输入内容"
+      ></el-input>
+    </el-form-item>
+    <div class="text-center" style="margin-top: 10px">
+      <el-button type="primary" @click="submitAudit">确定</el-button>
+    </div>
+  </el-form>
+</template>
+<script>
+import { QUESTION_API } from "@/constants/constants.js";
+import { mapState } from "vuex";
+
+export default {
+  props: {
+    paperIds: {
+      type: Array,
+      default: () => [],
+    },
+    auditResult: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      auditForm: { paperIds: [], auditResult: "", auditRemark: "" },
+      loading: false,
+    };
+  },
+  computed: {
+    ...mapState({ user: (state) => state.user }),
+  },
+  //初始化查询
+  created() {
+    this.init();
+  },
+  methods: {
+    init() {
+      this.auditForm.paperIds = this.paperIds;
+      this.auditForm.auditResult = this.auditResult;
+    },
+    submitAudit() {
+      this.$http
+        .post(
+          QUESTION_API + "/paper/audit",
+          new URLSearchParams(this.auditForm)
+        )
+        .then(() => {
+          this.$notify({
+            message: "保存成功",
+            type: "success",
+          });
+          this.loading = false;
+          this.$emit("afterAudit");
+        })
+        .catch((err) => {
+          this.loading = false;
+          this.$notify({
+            type: "error",
+            message: err.response.data.desc,
+          });
+        });
+    },
+  },
+};
+</script>
+<style scoped src="../styles/Common.css"></style>

+ 5 - 4
src/modules/questions/views/ImportPaperInfo.vue

@@ -203,7 +203,7 @@ export default {
     uploadProgress() {
       console.log("uploadProgress");
     },
-    uploadSuccess(response) {
+    uploadSuccess() {
       this.$notify({
         message: "上传成功",
         type: "success",
@@ -211,9 +211,10 @@ export default {
       this.fileLoading = false;
       sessionStorage.setItem("question_back", "true");
       if (this.importType == "word") {
-        this.$router.push({
-          path: "/edit_paper/" + response.id + "/import_paper",
-        });
+        // this.$router.push({
+        //   path: "/edit_paper/" + response.id + "/import_paper",
+        // });
+        this.back();
       } else {
         this.back();
       }

+ 815 - 0
src/modules/questions/views/PaperPendingTrial.vue

@@ -0,0 +1,815 @@
+<template>
+  <section class="content">
+    <div v-show="isClear == 1">
+      <LinkTitlesCustom :current-paths="['题库管理 ', '待审列表']" />
+    </div>
+    <div class="box-body">
+      <el-form
+        :inline="true"
+        :model="formSearch"
+        label-position="right"
+        label-width="70px"
+      >
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="课程名称">
+              <el-select
+                v-model="formSearch.courseNo"
+                class="search_width"
+                filterable
+                :remote-method="getCourses"
+                remote
+                clearable
+                placeholder="全部"
+                size="small"
+                @focus="(e) => getCourses(e.target.value)"
+              >
+                <el-option
+                  v-for="item in courseInfoSelect"
+                  :key="item.courseNo"
+                  :label="item.courseInfo"
+                  :value="item.courseNo"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="试卷名称">
+              <el-input
+                v-model="formSearch.name"
+                class="search_width"
+                placeholder="试卷名称"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="审核状态">
+              <el-select
+                v-model="formSearch.auditStatus"
+                class="search_width"
+                clearable
+                placeholder="请选择"
+                size="small"
+              >
+                <el-option label="初级待审" value="FIRST_PENDING_TRIAL">
+                </el-option>
+                <el-option label="中级待审" value="SECOND_PENDING_TRIAL">
+                </el-option>
+                <el-option label="高级待审" value="THIRD_PENDING_TRIAL">
+                </el-option>
+                <el-option label="已撤回" value="WITHDRAW"> </el-option>
+                <el-option label="审核未通过" value="NOT_PASS"> </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item label="录入人">
+              <el-input
+                v-model="formSearch.creator"
+                class="search_width"
+                placeholder="录入人"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="6">
+            <el-form-item label="修改人">
+              <el-input
+                v-model="formSearch.lastModifyName"
+                class="search_width"
+                placeholder="修改人"
+                size="small"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <div class="search_down">
+              <el-button size="small" type="primary" @click="searchFrom"
+                ><i class="el-icon-search"></i> 查询</el-button
+              >
+              <el-button size="small" @click="resetForm"
+                ><i class="el-icon-refresh"></i> 重 置</el-button
+              >
+            </div>
+          </el-col>
+        </el-row>
+        <div
+          style="width: 100%; border-bottom: 1px solid #ddd; margin: 10px 0"
+        ></div>
+        <el-row>
+          <el-form-item>
+            <span>批量操作:</span>
+            <el-button
+              :disabled="noBatchSelected"
+              size="mini"
+              type="danger"
+              plain
+              @click="deletePapers"
+              >批量删除</el-button
+            >
+            <el-button
+              :disabled="noBatchSelected"
+              size="mini"
+              type="primary"
+              plain
+              @click="auditPapers('PASS')"
+              >批量通过</el-button
+            >
+            <el-button
+              :disabled="noBatchSelected"
+              size="mini"
+              type="primary"
+              plain
+              @click="auditPapers('NOT_PASS')"
+              >批量不通过</el-button
+            >
+            <el-button
+              :disabled="noBatchSelected"
+              size="mini"
+              type="primary"
+              plain
+              @click="withdrawPapers()"
+              >批量撤回</el-button
+            >
+            <el-button
+              :disabled="noBatchSelected"
+              size="mini"
+              type="primary"
+              plain
+              @click="submitPapers()"
+              >批量提交</el-button
+            >
+          </el-form-item>
+        </el-row>
+      </el-form>
+      <div style="width: 100%; margin-bottom: 10px"></div>
+      <el-table
+        v-loading="loading"
+        element-loading-text="拼命加载中"
+        :data="tableData"
+        border
+        style="width: 100%"
+        @selection-change="selectChange"
+      >
+        <el-table-column type="selection" width="40"></el-table-column>
+        <el-table-column label="课程名称" width="180">
+          <template slot-scope="scope">
+            <span>{{ scope.row.course.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="课程代码" width="80">
+          <template slot-scope="scope">
+            <span>{{ scope.row.course.code }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="试卷名称" width="180">
+          <template slot-scope="scope">
+            <span>{{ scope.row.name }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="试卷总分"
+          width="103"
+          sortable
+          prop="totalScore"
+        >
+        </el-table-column>
+        <el-table-column
+          label="试卷难度"
+          width="103"
+          sortable
+          prop="difficultyDegree"
+        >
+        </el-table-column>
+        <el-table-column
+          label="大题数量"
+          width="103"
+          sortable
+          prop="paperDetailCount"
+        >
+        </el-table-column>
+        <el-table-column width="100" label="审核状态">
+          <span slot-scope="scope">{{
+            scope.row.auditStatus | paperAuditStatusFilter
+          }}</span>
+        </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"
+          sortable
+          prop="creationDate"
+        >
+        </el-table-column>
+        <el-table-column label="修改人" width="150">
+          <template slot-scope="scope">
+            <span>{{ scope.row.lastModifyName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="修改时间"
+          width="153"
+          sortable
+          prop="updateDate"
+        >
+        </el-table-column>
+        <el-table-column label="操作" width="270" fixed="right">
+          <template slot-scope="scope">
+            <div class="operate_left">
+              <el-button
+                size="mini"
+                type="primary"
+                plain
+                @click="editImportPaper(scope.row)"
+                ><i class="el-icon-view"></i>详情</el-button
+              >
+              <el-dropdown
+                v-show="isShowAuditBtn(scope.row)"
+                class="button_left"
+              >
+                <el-button type="primary" size="mini" plain>
+                  审核<i class="el-icon-arrow-down el-icon--right"></i>
+                </el-button>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item>
+                    <el-button
+                      size="mini"
+                      type="success"
+                      @click="auditPaper('PASS', scope.row.id)"
+                    >
+                      <i class="el-icon-success"></i>通过
+                    </el-button>
+                  </el-dropdown-item>
+                  <el-dropdown-item>
+                    <el-button
+                      size="mini"
+                      type="danger"
+                      @click="auditPaper('NOT_PASS', scope.row.id)"
+                    >
+                      <i class="el-icon-error"></i>不通过
+                    </el-button>
+                  </el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+              <el-dropdown class="button_left">
+                <el-button type="primary" size="mini" plain>
+                  更多 <i class="el-icon-arrow-down el-icon--right"></i>
+                </el-button>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item>
+                    <el-button
+                      v-show="isShowDeleteBtn(scope.row)"
+                      size="mini"
+                      type="danger"
+                      @click="deletePaper(scope.row)"
+                      ><i class="el-icon-delete"></i>删除</el-button
+                    >
+                  </el-dropdown-item>
+                  <el-dropdown-item>
+                    <el-button
+                      v-show="isShowWithdrawBtn(scope.row)"
+                      size="mini"
+                      type="primary"
+                      plain
+                      @click="withdrawPaper(scope.row)"
+                      ><i class="el-icon-tickets"></i>撤回</el-button
+                    >
+                  </el-dropdown-item>
+                  <el-dropdown-item>
+                    <el-button
+                      v-show="isShowSubmitBtn(scope.row)"
+                      size="mini"
+                      type="primary"
+                      plain
+                      @click="submitPaper(scope.row)"
+                      ><i class="el-icon-download"></i>提交</el-button
+                    >
+                  </el-dropdown-item>
+                  <el-dropdown-item>
+                    <el-button
+                      size="mini"
+                      type="primary"
+                      plain
+                      @click="exportPaper(scope.row)"
+                      ><i class="el-icon-download"></i>下载</el-button
+                    >
+                  </el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="page pull-right">
+        <el-pagination
+          :current-page="currentPage"
+          :page-size="pageSize"
+          :page-sizes="[10, 20, 50, 100, 200, 300]"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          @current-change="handleCurrentChange"
+          @size-change="handleSizeChange"
+        >
+        </el-pagination>
+      </div>
+    </div>
+    <el-dialog title="审核试卷" width="50%" :visible.sync="auditPaperDialog">
+      <AuditPaper
+        v-if="auditPaperDialog"
+        :paper-ids="selectedPaperIds"
+        :audit-result="auditResult"
+        @afterAudit="afterAudit"
+      ></AuditPaper>
+    </el-dialog>
+  </section>
+</template>
+
+<script>
+import { QUESTION_API } from "@/constants/constants";
+import { LEVEL_TYPE } from "../constants/constants";
+import { mapState } from "vuex";
+import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
+import AuditPaper from "./AuditPaper.vue";
+export default {
+  components: { LinkTitlesCustom, AuditPaper },
+  data() {
+    return {
+      auditPaperDialog: false,
+      auditResult: "",
+      publicityDis: false,
+      difficultyDegreeDis: false,
+      quesLoading: false,
+      quesPropertyDialog: false,
+      difficultyDegree: 0.1,
+      publicity: true,
+      isClear: 0,
+      courseLoading: false,
+      formSearch: {
+        courseNo: "",
+        courseName: "",
+        creator: "",
+        lastModifyName: "",
+        auditStatus: "",
+        name: "",
+      },
+      tableData: [],
+      currentPage: 1,
+      pageSize: 10,
+      total: 0,
+      loading: false,
+      courseList: [],
+      levelList: LEVEL_TYPE,
+      dialogVisible: false,
+      selectedPaperIds: [],
+      fileList: [],
+      uploadAction: "",
+      formUpload: {
+        paperName: "",
+      },
+      uploadData: {},
+      fileLoading: false,
+      exportDialog: false,
+      exportModel: {
+        id: "",
+        courseCode: "",
+        courseName: "",
+        exportContentList: [],
+        seqMode: "MODE1",
+      },
+      isShow: true,
+      dialogModel: false,
+      rowIds: [],
+      isShowPrintExamPackage: false,
+      isShowPrintExamPackagePassword: false,
+      printExamPackagePassword: "",
+      printFrom: {
+        examId: "",
+      },
+      rules: {
+        examId: [{ required: true, message: "请输入名称", trigger: "change" }],
+      },
+    };
+  },
+  computed: {
+    ...mapState({
+      user: (state) => state.user,
+    }),
+    paperIds() {
+      var paperIds = "";
+      for (let paperId of this.selectedPaperIds) {
+        if (!paperIds) {
+          paperIds += paperId;
+        } else {
+          paperIds += "," + paperId;
+        }
+      }
+      return paperIds;
+    },
+    courseInfoSelect() {
+      var courseList = [];
+      for (let course of this.courseList) {
+        var courseInfo = course.name + "(" + course.code + ")";
+        var courseNo = course.code;
+        var courseName = course.name;
+        courseList.push({
+          courseNo: courseNo,
+          courseInfo: courseInfo,
+          courseName: courseName,
+        });
+      }
+      return courseList;
+    },
+    noBatchSelected() {
+      return this.selectedPaperIds.length === 0;
+    },
+  },
+  watch: {
+    $route: "initVue",
+  },
+  created() {
+    this.initVue();
+  },
+  methods: {
+    getCourseName(courseNo) {
+      for (let course of this.courseList) {
+        if (course.code == courseNo) {
+          this.formSearch.courseName = course.name;
+        }
+      }
+    },
+    editImportPaper(row) {
+      //缓存查询对象
+      this.getCourseName(this.formSearch.courseNo);
+      sessionStorage.setItem("paper", JSON.stringify(this.formSearch));
+      sessionStorage.setItem("paper_currentPage", this.currentPage);
+      sessionStorage.setItem("question_back", "false");
+      this.$router.push({
+        path: "/edit_paper/" + row.id + "/paper_pending_trial",
+      });
+    },
+    afterAudit() {
+      this.auditPaperDialog = false;
+      this.searchPaper();
+    },
+    auditPapers(pass) {
+      this.auditResult = pass;
+      this.auditPaperDialog = true;
+    },
+    auditPaper(pass, id) {
+      this.auditResult = pass;
+      this.selectedPaperIds = [];
+      this.selectedPaperIds.push(id);
+      this.auditPaperDialog = true;
+    },
+    isShowAuditBtn(row) {
+      if (
+        row.auditStatus != "WITHDRAW" &&
+        row.auditStatus != "NOT_PASS" &&
+        this.isMyAudit(row)
+      ) {
+        return true;
+      } else {
+        return false;
+      }
+    },
+    isMyAudit(row) {
+      if (
+        row.auditStatus == "FIRST_PENDING_TRIAL" &&
+        this.user.auditAuthority == "FIRST"
+      ) {
+        return true;
+      }
+      if (
+        row.auditStatus == "SECOND_PENDING_TRIAL" &&
+        this.user.auditAuthority == "SECOND"
+      ) {
+        return true;
+      }
+      if (
+        row.auditStatus == "THIRD_PENDING_TRIAL" &&
+        this.user.auditAuthority == "THIRD"
+      ) {
+        return true;
+      }
+      return false;
+    },
+    exportPaper(row) {
+      var key = this.user.key;
+      var token = this.user.token;
+      window.open(
+        QUESTION_API +
+          "/originalPaper/export/" +
+          row.id +
+          "?$key=" +
+          key +
+          "&$token=" +
+          token
+      );
+    },
+    submitPapers() {
+      this.$confirm("确认提交试卷吗?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.loading = true;
+        this.$http
+          .post(
+            QUESTION_API + "/paper/submit",
+            new URLSearchParams({ paperIds: this.selectedPaperIds })
+          )
+          .then(
+            () => {
+              this.$notify({
+                message: "提交成功",
+                type: "success",
+              });
+              this.searchPaper();
+            },
+            (error) => {
+              this.$notify({
+                message: error.response.data.desc,
+                type: "error",
+              });
+              this.loading = false;
+            }
+          );
+      });
+    },
+    submitPaper(row) {
+      this.$confirm("确认提交试卷吗?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.selectedPaperIds = [];
+        this.selectedPaperIds.push(row.id);
+        this.loading = true;
+        this.$http
+          .post(
+            QUESTION_API + "/paper/submit",
+            new URLSearchParams({ paperIds: this.selectedPaperIds })
+          )
+          .then(
+            () => {
+              this.$notify({
+                message: "提交成功",
+                type: "success",
+              });
+              this.searchPaper();
+            },
+            (error) => {
+              this.$notify({
+                message: error.response.data.desc,
+                type: "error",
+              });
+              this.loading = false;
+            }
+          );
+      });
+    },
+    isShowSubmitBtn(row) {
+      if (row.creationBy == this.user.userId && row.auditStatus == "WITHDRAW") {
+        return true;
+      } else {
+        return false;
+      }
+    },
+    isShowWithdrawBtn(row) {
+      if (
+        row.creationBy == this.user.userId &&
+        row.auditStatus != "WITHDRAW" &&
+        row.auditStatus != "NOT_PASS"
+      ) {
+        return true;
+      } else {
+        return false;
+      }
+    },
+    withdrawPapers() {
+      this.$confirm("确认撤回试卷吗?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.loading = true;
+        this.$http
+          .post(
+            QUESTION_API + "/paper/withdraw",
+            new URLSearchParams({ paperIds: this.selectedPaperIds })
+          )
+          .then(
+            () => {
+              this.$notify({
+                message: "撤回成功",
+                type: "success",
+              });
+              this.searchPaper();
+            },
+            (error) => {
+              this.$notify({
+                message: error.response.data.desc,
+                type: "error",
+              });
+              this.loading = false;
+            }
+          );
+      });
+    },
+    withdrawPaper(row) {
+      this.$confirm("确认撤回试卷吗?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.loading = true;
+        this.selectedPaperIds = [];
+        this.selectedPaperIds.push(row.id);
+        this.$http
+          .post(
+            QUESTION_API + "/paper/withdraw",
+            new URLSearchParams({ paperIds: this.selectedPaperIds })
+          )
+          .then(
+            () => {
+              this.$notify({
+                message: "撤回成功",
+                type: "success",
+              });
+              this.searchPaper();
+            },
+            (error) => {
+              this.$notify({
+                message: error.response.data.desc,
+                type: "error",
+              });
+              this.loading = false;
+            }
+          );
+      });
+    },
+    isShowDeleteBtn(row) {
+      if (row.creationBy == this.user.userId && row.auditStatus == "WITHDRAW") {
+        return true;
+      } else {
+        return false;
+      }
+    },
+    deletePapers() {
+      this.$confirm("确认删除试卷吗?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.loading = true;
+
+        this.$http
+          .post(
+            QUESTION_API + "/paper/audit/delete",
+            new URLSearchParams({ paperIds: this.selectedPaperIds })
+          )
+          .then(
+            () => {
+              this.$notify({
+                message: "删除成功",
+                type: "success",
+              });
+              this.searchPaper();
+            },
+            (error) => {
+              this.$notify({
+                message: error.response.data.desc,
+                type: "error",
+              });
+              this.loading = false;
+            }
+          );
+      });
+    },
+    deletePaper(row) {
+      this.$confirm("确认删除试卷吗?", "提示", {
+        type: "warning",
+      }).then(() => {
+        this.loading = true;
+        this.selectedPaperIds = [];
+        this.selectedPaperIds.push(row.id);
+        this.$http
+          .post(
+            QUESTION_API + "/paper/audit/delete",
+            new URLSearchParams({ paperIds: this.selectedPaperIds })
+          )
+          .then(
+            () => {
+              this.$notify({
+                message: "删除成功",
+                type: "success",
+              });
+              this.searchPaper();
+            },
+            (error) => {
+              this.$notify({
+                message: error.response.data.desc,
+                type: "error",
+              });
+              this.loading = false;
+            }
+          );
+      });
+    },
+    resetForm() {
+      this.formSearch = {
+        courseNo: "",
+        courseName: "",
+        level: "",
+        name: "",
+      };
+    },
+    //查询
+    searchFrom() {
+      this.currentPage = 1;
+      this.searchPaper();
+    },
+    searchPaper() {
+      var pageNo = this.currentPage;
+      this.currentPage = 1;
+      this.loading = true;
+      var url =
+        QUESTION_API + "/pending_trial_paper/" + pageNo + "/" + this.pageSize;
+      this.$http.get(url, { params: this.formSearch }).then((response) => {
+        this.tableData = response.data.content;
+        this.total = response.data.totalElements;
+        this.currentPage = Number(pageNo);
+      });
+      this.loading = false;
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.searchPaper();
+    },
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.searchPaper();
+    },
+    getCourseObj(courseNo) {
+      for (let course of this.courseList) {
+        if (course.code == courseNo) {
+          return course;
+        }
+      }
+      return "";
+    },
+    selectChange(row) {
+      this.selectedPaperIds = [];
+      row.forEach((element) => {
+        this.selectedPaperIds.push(element.id);
+      });
+    },
+    //查询所有课程
+    getCourses(query) {
+      if (query) {
+        query = query.trim();
+      }
+      this.courseLoading = true;
+      this.$http
+        .get(QUESTION_API + "/course/query?name=" + query + "&enable=true")
+        .then((response) => {
+          this.courseList = response.data;
+          this.courseLoading = false;
+        });
+    },
+    removeItem() {
+      sessionStorage.removeItem("paper");
+      sessionStorage.removeItem("paper_currentPage");
+    },
+    cancel(formData) {
+      this.resetForm2(formData);
+      this.dialogModel = false;
+    },
+    resetForm2(formData) {
+      this.printFrom.examId = "";
+      this.$refs[formData].clearValidate();
+    },
+    initVue() {
+      this.isClear = this.$route.params.isClear;
+      if (this.isClear == 0 || !this.isClear) {
+        this.removeItem();
+        this.formSearch = {
+          courseNo: "",
+          courseName: "",
+          level: "",
+          name: "",
+        };
+        this.currentPage = 1;
+      } else {
+        this.formSearch = JSON.parse(sessionStorage.getItem("paper"));
+        this.currentPage =
+          sessionStorage.getItem("paper_currentPage") == null
+            ? 1
+            : parseInt(sessionStorage.getItem("paper_currentPage"));
+      }
+      this.getCourses(this.formSearch.courseName);
+      this.searchPaper();
+    },
+  },
+};
+</script>
+<style scoped src="../styles/Common.css"></style>

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

@@ -1,7 +1,7 @@
 <template>
   <section class="content">
     <div v-show="isClear == 1">
-      <LinkTitlesCustom :current-paths="['库管理 ', '试卷仓库管理']" />
+      <LinkTitlesCustom :current-paths="['库管理 ', '试卷仓库管理']" />
     </div>
     <div class="box-body">
       <el-form