xiatian 2 роки тому
батько
коміт
3d7ea4b329
1 змінених файлів з 25 додано та 21 видалено
  1. 25 21
      src/modules/marking/views/MarkWorkOverview.vue

+ 25 - 21
src/modules/marking/views/MarkWorkOverview.vue

@@ -166,11 +166,7 @@
 </template>
 
 <script>
-import {
-  MARKING_API,
-  MARKING_LOGIC_API,
-  QUESTION_API,
-} from "@/constants/constants";
+import { MARKING_API, MARKING_LOGIC_API } from "@/constants/constants";
 import { mapState } from "vuex";
 import ECharts from "vue-echarts/components/ECharts";
 import "echarts/lib/chart/pie";
@@ -331,22 +327,30 @@ export default {
         type: "warning",
       }).then(() => {
         this.loading = true;
-        this.$http.put(QUESTION_API + "/paper_storage/release/" + row.id).then(
-          () => {
-            this.$notify({
-              message: "操作成功",
-              type: "success",
-            });
-            this.searchBtnFn();
-          },
-          (response) => {
-            this.$notify({
-              message: response.response.data.desc,
-              type: "error",
-            });
-            this.loading = false;
-          }
-        );
+        this.$http
+          .post(
+            MARKING_API +
+              "/markWorks/release?workId=" +
+              row.workId +
+              "&courseCode=" +
+              row.code
+          )
+          .then(
+            () => {
+              this.$notify({
+                message: "操作成功",
+                type: "success",
+              });
+              this.searchBtnFn();
+            },
+            (response) => {
+              this.$notify({
+                message: response.response.data.desc,
+                type: "error",
+              });
+              this.loading = false;
+            }
+          );
       });
     },
     cleanMarkWork() {