import request from '@/utils/request'
//下拉列表
export function select() {
  return request({
    url: '/definition/select',
    method: 'get',
  })
}

// 新增
export function add(data) {
  return request({
    url: '/leave',
    method: 'put',
    data: data
  })
}

// 分页查询
export function list(query) {
  return request({
    url: '/leave/list',
    method: 'get',
    params: query
  })
}
// 查看
export function get(id) {
  return request({
    url: '/leave/'+id,
    method: 'get',
  })
}

// 编辑
export function update(data) {
  return request({
    url: '/leave',
    method: 'post',
    data: data
  })
}

// 删除
export function delTitle(data) {
  return request({
    url: '/leave',
    method: 'delete',
    data: data
  })
}

// 编辑
export function submitApply(id) {
  return request({
    url: '/leave/submitApply/'+id,
    method: 'post',
  })
}
