deason 4 rokov pred
rodič
commit
149c5bb21e
1 zmenil súbory, kde vykonal 27 pridanie a 1 odobranie
  1. 27 1
      src/modules/oe/views/export_task_list.vue

+ 27 - 1
src/modules/oe/views/export_task_list.vue

@@ -106,7 +106,7 @@
         sortable
       />
 
-      <el-table-column label="操作" width="120px">
+      <el-table-column label="操作" width="180px">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -117,6 +117,16 @@
             plain
             >下载
           </el-button>
+
+          <el-button
+            size="mini"
+            type="danger"
+            icon="el-icon-delete"
+            :disabled="scope.row.status == 'EXPORTING'"
+            @click="doDelete(scope.row)"
+            plain
+            >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -187,6 +197,22 @@ export default {
         }
       );
     },
+    doDelete(row) {
+      this.$confirm("确认删除当前任务?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        let url = "/api/ecs_oe_admin/export/task/delete?taskId=" + row.id;
+        this.$httpWithMsg.post(url).then(() => {
+          this.$notify({
+            type: "success",
+            message: "删除成功"
+          });
+          this.doSearch();
+        });
+      });
+    },
     download(row) {
       window.location.href = row.filePath;
     },