import request from '@/utils/request'

// 获取待办列表数据
export function getTodoList(params) {
  return request({
    url: 'api/TodoManagement/getlist',
    method: 'get',
    params
  })
}
// 添加待办信息
export function addTodo(params) {
  return request({
    url: 'api/TodoManagement/add',
    method: 'post',
    params
  })
}
// 编辑待办信息
export function editTodo(params) {
  return request({
    url: 'api/TodoManagement/update',
    method: 'post',
    params
  })
}
// 获取待办信息详情
export function getTodo(id) {
  return request({
    url: 'api/TodoManagement/getdetails',
    method: 'get',
    params:{
        id
    }
  })
}
// 删除待办信息
export function deleteTodo(ids) {
  return request({
    url: 'api/TodoManagement/delete',
    method: 'post',
    data:{
        ids
    }
  })
}

// 批量完成操作
export function getOperation(ids,state) {
    return request({
      url: 'api/TodoManagement/operation',
      method: 'post',
      data:{
        ids,
        state,
      }
    })
  }