소스 검색

短信提醒配置页面提交

jingyuanchao 1 년 전
부모
커밋
4e48734d58
2개의 변경된 파일10개의 추가작업 그리고 44개의 파일을 삭제
  1. 1 1
      src/api/reminder/reminder.js
  2. 9 43
      src/views/core/reminder/index.vue

+ 1 - 1
src/api/reminder/reminder.js

@@ -30,7 +30,7 @@ export function edit(data) {
 // 删除配置
 export function del(id) {
   return request({
-    url: '/core/reminder/del' + id,
+    url: '/core/reminder/del/' + id,
     method: 'delete'
   })
 }

+ 9 - 43
src/views/core/reminder/index.vue

@@ -194,7 +194,7 @@
                   size="mini"
                   type="text"
                   icon="el-icon-delete"
-                  @click="handleDelete(scope.row)"
+                  @click="handleDelete(scope.row.configId)"
                   v-hasPermi="['core:reminder:remove']"
                 >删除
                 </el-button>
@@ -638,51 +638,17 @@ export default {
       });
     },
     /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      const names = row.planName || this.names;
-      let msg = "";
-      if (row.planStatus == 1) {
-        if (row.planCycle == 1) {
-          msg = "本次删除将强制删除今日所有任务?";
-        } else {
-          msg = "本次删除将强制删除当前任务时间及以后所有任务";
-        }
-      } else {
-        msg = '是否确认删除名称为"' + row.planName + '"的任务?';
-      }
-      // this.$modal
-      //   .confirm("删除计划会清除本周期所有任务,确定执行?")
-      //   .then(function () {
-      //     return delPlan(ids);
-      //   })
-      //   .then(() => {
-      //     this.getList();
-      //     this.$modal.msgSuccess("删除成功");
-      //   })
-      //   .catch(() => {});
+    handleDelete(id) {
       this.$modal
-        .confirm(msg)
+        .confirm("是否确认删除该配置?")
+        .then(function () {
+          return del(id);
+        })
         .then(() => {
-          // 用户点击了确认按钮
-          console.log("执行操作...");
-          this.loading = true;
-          api
-            .delPlan(row.id)
-            .then(() => {
-              this.getList();
-              this.loading = false;
-              this.$modal.msgSuccess("删除成功");
-            })
-            .catch(() => {
-              this.loading = false;
-            });
+          this.$modal.msgSuccess("删除成功");
+          this.getList();
         })
-        .catch(() => {
-          // 用户点击了取消按钮
-          console.log("取消操作...");
-          this.loading = false;
-        });
+        .catch(() => {});
     },