瀏覽代碼

删除试卷接口修改

xiatian 1 年之前
父節點
當前提交
4d58c449c8

+ 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: "删除成功",