xiatian há 3 anos atrás
pai
commit
901a353bf3

+ 2 - 1
src/modules/questions/routes/routes.js

@@ -122,7 +122,8 @@ export default [
         component: ImportPaperInfo,
       },
       {
-        path: "gen_paper_detail/:courseNo", //组卷页面
+        path: "gen_paper_detail", //组卷页面
+        name: "gen_paper_detail", //组卷页面
         component: GenPaperDetail,
       },
       {

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

@@ -626,7 +626,8 @@ export default {
         sessionStorage.setItem("gen_paper", JSON.stringify(this.formSearch));
         sessionStorage.setItem("gen_paper_currentPage", this.currentPage);
         this.$router.push({
-          path: "/questions/gen_paper_detail/" + courseNo,
+          name: "gen_paper_detail",
+          params: { courseNo: courseNo },
         });
       }
     },

+ 10 - 3
src/modules/questions/views/GenPaperDetail.vue

@@ -22,7 +22,7 @@
             @click="confirmGenPaper"
             >确定</el-button
           >
-          <el-button type="danger" plain icon="icon icon-back" @click="back"
+          <el-button type="danger" plain icon="icon icon-back" @click="toback"
             >返回</el-button
           >
         </div>
@@ -779,7 +779,7 @@ export default {
       "rootOrgId=" +
       this.user.rootOrgId +
       "&code=" +
-      this.genPaper.courseNo;
+      encodeURIComponent(this.genPaper.courseNo);
     this.$httpWithMsg
       .get(url)
       .then((response) => {
@@ -1074,6 +1074,9 @@ export default {
       this.curSelect = val;
       this.searchPaper();
     },
+    toback() {
+      this.$router.push({ path: "/questions/gen_paper/1" });
+    },
     back(status) {
       if ("PASS" == status) {
         this.$notify({
@@ -1230,7 +1233,11 @@ export default {
     getCoursePropertyList() {
       var courseNo = this.genPaper.courseNo;
       this.$http
-        .get(QUESTION_API + "/courseProperty/enable/" + courseNo)
+        .get(
+          QUESTION_API +
+            "/courseProperty/enable?courseNo=" +
+            encodeURIComponent(courseNo)
+        )
         .then((response) => {
           this.coursePropertyList = response.data;
           this.searchPaperStructs();