import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询任务列表
export function listQuestion(query) {
  return request({
    url: '/customer/question/list',
    method: 'get',
    params: query
  })
}
// 查询任务详细
export function getTask(taskId) {
  return request({
    url: '/task/taskManagement/' + parseStrEmpty(taskId),
    method: 'get'
  })
}
// 任务状态修改
export function changeTaskStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/task/taskManagement/changeStatus',
    method: 'put',
    data: data
  })
}
// 修改任务
export function updateTask(data) {
  return request({
    url: '/task/taskManagement',
    method: 'put',
    data: data
  })
}
// 新增任务
export function addTask(data) {
  return request({
    url: '/task/taskManagement',
    method: 'post',
    data: data
  })
}
