import request from '@/utils/request'

// 查询运营服务列表
export function listOPSERVICE(query) {
  return request({
    url: '/OPSERVICE/list',
    method: 'get',
    params: query
  })
}

// 查询运营服务所有列表
export function listAllOPSERVICE(query) {
  return request({
    url: '/OPSERVICE/listAll',
    method: 'get',
    params: query
  })
}

// 查询运营服务详细
export function getOPSERVICE(id) {
  return request({
    url: '/OPSERVICE/getInfo/' + id,
    method: 'get'
  })
}

// 新增运营服务
export function addOPSERVICE(data) {
  return request({
    url: '/OPSERVICE/add',
    method: 'post',
    data: data
  })
}

// 修改运营服务
export function updateOPSERVICE(data) {
  return request({
    url: '/OPSERVICE/edit',
    method: 'post',
    data: data
  })
}

// 删除运营服务
export function delOPSERVICE(id) {
  return request({
    url: '/OPSERVICE/remove/' + id,
    method: 'get'
  })
}


// 上传文件
export function upload(data) {
  return request({
    url: '/common/upload',
    method: 'post',
    data: data
  })
}

// 获取文件流
export function download(data,id) {
  return request({
    url: '/OPSERVICE/download?delete=false&fileName=' + data + '&id='+id,
    method: 'get',
    responseType: "blob"
  })
}
