luojun před 2 roky
rodič
revize
26c42a2bbe
2 změnil soubory, kde provedl 14 přidání a 11 odebrání
  1. 1 1
      .env.development
  2. 13 10
      src/views/resumption/plan/index.vue

+ 1 - 1
.env.development

@@ -15,7 +15,7 @@ ENV = 'development'
 #VUE_APP_BASE_API = 'http://10.87.11.94:8080'
 # VUE_APP_BASE_API = 'http://localhost:8080'
 # 55环境
-VUE_APP_BASE_API = 'http://10.87.10.55:8080'
+VUE_APP_BASE_API = 'http://localhost:8080'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 13 - 10
src/views/resumption/plan/index.vue

@@ -528,18 +528,21 @@ export default {
     async onDel(id, name) {
       this.$modal
         .confirm('是否确认删除名称为"' + name + '"的数据项?')
-        .then(function () {
-          this.loading=true;
-          return api.delelte(id);
-        })
         .then(() => {
-          this.getList();
-          this.loading=false;
-          this.$modal.msgSuccess("删除成功");
+          // 用户点击了确认按钮
+          console.log("执行操作...");
+          this.loading = true;
+          api.delelte(id).then(() => {
+            this.getList();
+            this.loading = false;
+            this.$modal.msgSuccess("删除成功");
+            
+          });
         })
-        .catch(() => {});
-      // await api.delelte(id);
-      // this.getList();
+        .catch(() => {
+          // 用户点击了取消按钮
+          console.log("取消操作...");
+        });
     },
     // 多选框选中数据
     handleSelectionChange(selection) {