فهرست منبع

开始接口联调

刘洋 11 ماه پیش
والد
کامیت
c28075253c
1فایلهای تغییر یافته به همراه27 افزوده شده و 0 حذف شده
  1. 27 0
      src/modules/examwork/view/ipConfig.vue

+ 27 - 0
src/modules/examwork/view/ipConfig.vue

@@ -112,6 +112,7 @@
       title="同步到考试"
       width="400px"
       :visible.sync="showSynchronousDialog"
+      :close-on-click-modal="false"
     >
       <el-form
         ref="synchronousRef"
@@ -146,6 +147,7 @@
       :title="curRow ? '修改' : '新增'"
       width="450px"
       :visible.sync="showEditDialog"
+      :close-on-click-modal="false"
     >
       <el-form
         ref="editRef"
@@ -194,6 +196,7 @@
 <script>
 import { CORE_API, EXAM_WORK_API } from "@/constants/constants.js";
 import { mapState } from "vuex";
+import qs from "qs";
 export default {
   name: "IpConfig",
   computed: {
@@ -398,6 +401,30 @@ export default {
     },
     deleteItem(item) {
       console.log(item);
+      this.deleteMult([item.id], true);
+    },
+    deleteMult(ids, bool) {
+      let str = bool ? "是否删除该条数据?" : "是否删除所选数据?";
+      this.$confirm(str, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        var url = EXAM_WORK_API + "/org/ip/delete";
+        this.$httpWithMsg
+          .post(url, qs.stringify({ ids: ids.join(",") }), {
+            headers: {
+              "content-type": "application/x-www-form-urlencoded",
+            },
+          })
+          .then(() => {
+            this.$notify({
+              type: "success",
+              message: "删除成功!",
+            });
+            this.searchForm();
+          });
+      });
     },
     selectChange(rows) {
       this.selectedIds = rows.map((item) => item.id);