WANG 6 жил өмнө
parent
commit
9c95e7da5a

+ 21 - 0
src/modules/examwork/view/examInfo.vue

@@ -331,6 +331,7 @@ export default {
       this.examId = "";
     },
     editExamInfoDialog(row) {
+      this.setSearchParams();
       if (row.examType == "ONLINE") {
         this.$router.push({ path: "/examwork/onlineExam/" + row.id });
       } else if (row.examType == "TRADITION") {
@@ -344,6 +345,7 @@ export default {
       }
     },
     editOrgSettings(row) {
+      this.setSearchParams();
       if (row.examType == "OFFLINE") {
         this.$router.push({
           path: "/examwork/offlineExamOrgSettings/" + row.id
@@ -355,26 +357,40 @@ export default {
       }
     },
     showExamCourseSettingsDialog(row) {
+      this.setSearchParams();
       this.$router.push({ path: "/examwork/examCourseSettings/" + row.id });
     },
     showExamOrgSettingsDialog(row) {
+      this.setSearchParams();
       this.$router.push({ path: "/examwork/examOrgSettings/" + row.id });
     },
     toTradition() {
+      this.setSearchParams();
       this.$router.push({ path: "/examwork/traditionExam/add" });
     },
     toOnline() {
+      this.setSearchParams();
       this.$router.push({ path: "/examwork/onlineExam/add" });
     },
     toPractice() {
+      this.setSearchParams();
       this.$router.push({ path: "/examwork/practiceExam/add" });
     },
     toOffline() {
+      this.setSearchParams();
       this.$router.push({ path: "/examwork/offlineExam/add" });
     },
     toPrint() {
+      this.setSearchParams();
       this.$router.push({ path: "/examwork/printExam/add" });
     },
+
+    setSearchParams() {
+      sessionStorage.setItem(
+        "E_EAXM_SEARCH_PARAMS",
+        JSON.stringify(this.formSearch)
+      );
+    },
     getExamType(examType) {
       for (let tempExamType of this.examTypeList) {
         if (tempExamType.value == examType) {
@@ -394,6 +410,11 @@ export default {
   },
   //初始化查询
   created() {
+    let sessionData = sessionStorage.getItem("E_EAXM_SEARCH_PARAMS");
+    if (sessionData) {
+      this.formSearch = JSON.parse(sessionData);
+    }
+    sessionStorage.removeItem("E_EAXM_SEARCH_PARAMS");
     this.initPrivileges();
     this.searchForm();
   }