import request from '@/utils/httpRequest'

export default class WorkClientService {
  list (params) {
    return request({
      url: '/cw_work_client/info/list',
      method: 'get',
      params: params
    })
  }
  listTree (params) {
    return request({
      url: '/cw_work_client/info/list_tree',
      method: 'get',
      params: params
    })
  }
  queryById (id) {
    return request({
      url: '/cw_work_client/info/queryById',
      method: 'get',
      params: {id: id}
    })
  }
  save (inputForm) {
    return request({
      url: `/cw_work_client/info/save`,
      method: 'post',
      data: inputForm
    })
  }
  saveForm (inputForm) {
    return request({
      url: `/cw_work_client/info/saveForm`,
      method: 'post',
      data: inputForm
    })
  }
  delete (ids) {
    return request({
      url: '/cw_work_client/info/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }
  updateStatusById (data) {
    return request({
      url: '/cw_work_client/info/updateStatusById',
      method: 'post',
      data: data
    })
  }
  exportFile (params) {
    return request({
      url: '/cw_work_client/info/export',
      method: 'get',
      params: params,
      responseType: 'blob'
    })
  }
}
