소스 검색

删除试卷接口修改

xiatian 1 년 전
부모
커밋
4d58c449c8
3개의 변경된 파일20개의 추가작업 그리고 7개의 파일을 삭제
  1. 4 1
      src/modules/questions/views/EditPaper.vue
  2. 8 3
      src/modules/questions/views/GenPaper.vue
  3. 8 3
      src/modules/questions/views/ImportPaper.vue

+ 4 - 1
src/modules/questions/views/EditPaper.vue

@@ -1921,7 +1921,10 @@ export default {
         type: "warning",
       }).then(() => {
         this.loading = true;
-        this.$http.delete(QUESTION_API + "/paper/" + id).then(
+        let param = new URLSearchParams({
+          paperIds: id,
+        });
+        this.$http.post(QUESTION_API + "/paper", param).then(
           () => {
             this.$notify({
               message: "删除成功",

+ 8 - 3
src/modules/questions/views/GenPaper.vue

@@ -864,7 +864,10 @@ export default {
         type: "warning",
       }).then(() => {
         this.loading = true;
-        this.$http.delete(QUESTION_API + "/paper/" + row.id).then(
+        let param = new URLSearchParams({
+          paperIds: row.id,
+        });
+        this.$http.post(QUESTION_API + "/paper", param).then(
           () => {
             this.$notify({
               message: "删除成功",
@@ -946,13 +949,15 @@ export default {
       });
     },
     batchDeleteGenPaper() {
-      var paperIds = this.paperIds;
       if (this.selectedPaperIds.length != 0) {
         this.$confirm("确认删除试卷吗?", "提示", {
           type: "warning",
         }).then(() => {
           this.loading = true;
-          this.$http.delete(QUESTION_API + "/paper/" + paperIds).then(
+          let param = new URLSearchParams({
+            paperIds: this.paperIds,
+          });
+          this.$http.post(QUESTION_API + "/paper", param).then(
             () => {
               this.$notify({
                 message: "删除成功",

+ 8 - 3
src/modules/questions/views/ImportPaper.vue

@@ -535,7 +535,10 @@ export default {
         type: "warning",
       }).then(() => {
         this.loading = true;
-        this.$http.delete(QUESTION_API + "/paper/" + row.id).then(
+        let param = new URLSearchParams({
+          paperIds: row.id,
+        });
+        this.$http.post(QUESTION_API + "/paper", param).then(
           () => {
             this.$notify({
               message: "删除成功",
@@ -560,12 +563,14 @@ export default {
       });
     },
     batchDeletePaper() {
-      var paperIds = this.paperIds;
       this.$confirm("确认删除试卷吗?", "提示", {
         type: "warning",
       }).then(() => {
         this.loading = true;
-        this.$http.delete(QUESTION_API + "/paper/" + paperIds).then(
+        let param = new URLSearchParams({
+          paperIds: this.paperIds,
+        });
+        this.$http.post(QUESTION_API + "/paper", param).then(
           () => {
             this.$notify({
               message: "删除成功",