Browse Source

add:删除任务

sunjh 5 năm trước cách đây
mục cha
commit
1c3866fb00
1 tập tin đã thay đổi với 12 bổ sung2 xóa
  1. 12 2
      src/components/project/Project.vue

+ 12 - 2
src/components/project/Project.vue

@@ -284,7 +284,8 @@ import {
   receiveProjectRequest,
   rejectProject,
   storageGet,
-  submitProjectRequest
+  submitProjectRequest,
+  deleteTask
 } from '@/js/index'
 
 export default {
@@ -763,13 +764,22 @@ export default {
       this.$confirm('确认删除该任务?')
         .then(_ => {
           //done()
-          notify('success', '删除成功')
+          //id->taskid
+          console.log(id)
+          console.log(this.projectId)
+          deleteTask(this.projectId,id,this.deleteTaskSuccess,this.deleteTaskFail)
         })
         .catch(_ => {
           notify('error', '删除失败')
         })
       //this.task.splice(index, 1)
     },
+    deleteTaskSuccess(res){
+      notify('success', '删除成功')
+    },
+    deleteTaskFail(error){
+      notify('error', '删除失败:'+error)
+    },
     beforeApkUpload (file) {
       const isAPK = file.type === 'application/vnd.android.package-archive'
       const isDMG = file.type === 'application/octet-stream'