xiatian %!s(int64=2) %!d(string=hai) anos
pai
achega
f3d0bef663
Modificáronse 1 ficheiros con 12 adicións e 7 borrados
  1. 12 7
      src/modules/questions/views/AddPaperSelect.vue

+ 12 - 7
src/modules/questions/views/AddPaperSelect.vue

@@ -187,6 +187,7 @@
 <script>
 import qs from "qs";
 import { mapState } from "vuex";
+import { QUESTION_API } from "@/constants/constants";
 import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
 export default {
   name: "AddPaperSelect",
@@ -361,13 +362,17 @@ export default {
         });
     },
     getStruct() {
-      let apiUrl = "/api/ecs_ques/paperStruct/1/10000";
-      let params =
-        this.form.paperStructType == "EXACT"
-          ? { courseNo: "ALL", type: "EXACT" }
-          : { type: "BLUEPRINT" };
-      this.$http.get(apiUrl, { params }).then((res) => {
-        this.options1 = res.data.content;
+      var courseNo = this.$route.query.courseNo;
+      var url =
+        QUESTION_API +
+        "/paperStruct?courseNo=" +
+        courseNo +
+        "&type=" +
+        this.form.paperStructType;
+      this.loading = true;
+      this.$http.get(url).then((response) => {
+        this.options1 = response.data;
+        this.loading = false;
       });
     },
     getTable2(bool) {