import request from '@/utils/request'

export function taskList(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/list', params })
}

export function taskMemberList(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/member/list', params })
}

export function taskBoardList(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/board/list', params })
}

export function taskDetailList(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/detail/list', params })
}

export function taskAtList(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/at/list', params })
}

export function taskListByTable(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/listByTable', params })
}

export function taskListMineGantt(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/list-mine-gantt', params })
}

export function taskListSubordinateGantt(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/list-subordinate-gantt', params })
}

export function taskListAtMine(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/at-mine-list', params })
}

export function taskGet(taskDateId: string | number) {
  return request({ method: 'get', url: '/task/get', params: { taskDateId } })
}

export function taskAdd(data: Record<string, any>) {
  return request({ method: 'post', url: '/task/add', data })
}

export function taskLogList(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/log/list', params })
}

export function taskCommentList(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/comment/list', params })
}

export function taskCommentAdd(data: Record<string, any>) {
  return request({ method: 'post', url: '/task/comment/add', data })
}

export function taskResourceList(params: Record<string, any>) {
  return request({ method: 'get', url: '/task/resource/list', params })
}
