import request from '@/utils/request'




export function getContentList(query) {
  return request({
    url: '/ability/content/',
    method: 'get',
    params: query
  })
}

export function getContent(id) {
  return request({
    url: `/ability/content/${id}/`,
    method: 'get'
  })
}

export function createContent(data) {
  return request({
    url: '/ability/content/',
    method: 'post',
    data
  })
}

export function updateContent(id, data) {
  return request({
    url: `/ability/content/${id}/`,
    method: 'put',
    data
  })
}

export function deleteContent(id, data) {
  return request({
    url: `/ability/content/${id}/`,
    method: 'delete',
    data
  })
}


export function getRecordList(query) {
  return request({
    url: '/ability/record/',
    method: 'get',
    params: query
  })
}


export function getRecord(id) {
  return request({
    url: `/ability/record/${id}/`,
    method: 'get'
  })
}

export function confirmRecord(id, data) {
  return request({
    url: `/ability/record/${id}/confirm/`,
    method: 'put',
    data
  })
}

export function updateRecord(id, data) {
  return request({
    url: `/ability/record/${id}/`,
    method: 'put',
    data
  })
}
export function updateRecords(data) {
  return request({
    url: '/ability/record/updates/',
    method: 'put',
    data
  })
}


export function upRecord(id, data) {
  return request({
    url: `/ability/record/${id}/up/`,
    method: 'put',
    data
  })
}

export function rejectRecord(id, data) {
  return request({
    url: `/ability/record/${id}/reject/`,
    method: 'put',
    data
  })
}
export function deleteRecord(id) {
  return request({
    url: `/ability/record/${id}/`,
    method: 'delete',
  })
}
export function createRecord(data) {
  return request({
    url: `/ability/record/`,
    method: 'post',
    data
  })
}

//////
export function getAbilityQuality(query) {
  return request({
    url: `/ability/quali/`,
    method: 'get',
    params: query
  })
}
export function getQualityItem(id) {
  return request({
    url: `/ability/quali/${id}/`,
    method: 'get'
  })
}
export function getQualityMy(query) {
  return request({
    url: `/ability/quali/my/`,
    method: 'get',
    params: query
  })
}
export function getQtask(query) {
  return request({
    url: `/ability/qtask/`,
    method: 'get',
    params: query
  })
}
export function createQtask(data) {
  return request({
    url:`/ability/qtask/`,
    method:'post',
    data,
  })
}
export function updateQtask(id,data) {
  return request({
    url:`/ability/qtask/${id}/`,
    method:'put',
    data
  })
}

export function deleteQtask(id) {
  return request({
    url:`/ability/qtask/${id}/`,
    method:'delete'
  })
}

export function qtaskStart(id) {
  return request({
    url:`/ability/qtask/${id}/start/`,
    method:'put'
  })
}
//任务详情
export function qtaskDetail(query) {
  return request({
    url: `/ability/qorg/`,
    method: 'get',
    params: query
  })
}
export function getQtaskMy(query) {
  return request({
    url: `/ability/qorg/my/`,
    method: 'get',
    params: query
  })
}
//新增能力
export function createAbility(data) {
  return request({
    url:`/ability/qaction/ability_create/`,
    method:'post',
    data,
  })
}
//能力无新增
export function abilityNoChange(data) {
  return request({
    url:`/ability/qaction/ability_nochange/`,
    method:'post',
    data,
  })
}
//新增资质
export function createQuali(data) {
  return request({
    url:`/ability/qaction/quali_create/`,
    method:'post',
    data,
  })
}
export function qualiNoChange(data) {
  return request({
    url:`/ability/qaction/quali_nochange/`,
    method:'post',
    data,
  })
}
//修改资质
export function updateQuali(data) {
  return request({
    url:`/ability/qaction/quali_update/`,
    method:'post',
    data,
  })
}
//更新服务
export function updateService(data) {
  return request({
    url:`/ability/qaction/service_update/`,
    method:'post',
    data,
  })
}
//我的报送操作
export function qactionMy(query) {
  return request({
    url:`/ability/qaction/my/`,
    method:'get',
    params: query
  })
}
//我的报送操作
export function qactionList(query) {
  return request({
    url:`/ability/qaction/`,
    method:'get',
    params: query
  })
}
//报送操作操作记录
export function qactionItem(id) {
  return request({
    url:`/ability/qaction/${id}/`,
    method:'get',
  })
}
//报送操作操作记录确认
export function qactionConfirm(id) {
  return request({
    url:`/ability/qaction/${id}/confirm/`,
    method:'put',
  })
}
//报送操作操作记录del
export function qactionDelete(id) {
  return request({
    url:`/ability/qaction/${id}/`,
    method:'delete',
  })
}



export function provinceLists() {
  return request({
    url:`/system/province/`,
    method:'get',
  })
}
export function cityLists(query) {
  return request({
    url:`/system/city/`,
    method:'get',
    params: query
  })
}
