import request from '@/utils/request'
import {download} from '@/utils/request'

// 查询流程待办列表
export function listWfJob(query) {
    return request({
        url: '/tongzhou/wfJob/wfJob/list',
        method: 'get',
        params: query
    })
}

// 查询流程待办详细
export function getWfJob(jobId) {
    return request({
        url: '/tongzhou/wfJob/wfJob/' + jobId,
        method: 'get'
    })
}

// 新增流程待办
export function addWfJob(data) {
    return request({
        url: '/tongzhou/wfJob/wfJob',
        method: 'post',
        data: data
    })
}

// 修改流程待办
export function updateWfJob(data) {
    return request({
        url: '/tongzhou/wfJob/wfJob',
        method: 'put',
        data: data
    })
}

// 删除流程待办
export function delWfJob(jobId) {
    return request({
        url: '/tongzhou/wfJob/wfJob/' + jobId,
        method: 'delete'
    })
}

// 导出流程待办
export function downloadWfJob(data) {
    download(
        '/tongzhou/wfJob/wfJob/export',
        data,
        `wfJob_${new Date().getTime()}.xlsx`)
}
