import request from '@/utils/request.js'

export function getTaskList() {
    return request({
        url: "/workflow/process/task",
        method: "get",
    })
}

export function getTaskInfo(taskId) {
    return request({
        url: "/workflow/process/task/"+taskId,
        method: "get",
    })
}
export function completeTask(params) {
    return request({
        url: "/workflow/process/task/complete",
        method: "put",
        data: params
    })
}
export function refuseTask(params) {
    return request({
        url: "/workflow/process/task/refuse",
        method: "put",
        data: params
    })
}

export function rollBackTask(params) {
    return request({
        url: "/workflow/process/task/rollback",
        method: "put",
        data: params
    })
}

export function addComment(params) {
    return request({
        url: "/workflow/process/task/comment",
        method: "post",
        data: params
    })
}
