import request, { postBlob, getBlob, handleImport } from '@/utils/request'

export function chargingStandardList2(data) {
  return request({
    url: `/charging/standard/list2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function chargingStandardTypeList2(data) {
  return request({
    url: `/charging/standard/type/list2?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function chargingStandardList3(data) {
  return request({
    url: `/charging/standard/list3?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

export function chargingStandardList3PageExport(data, name) {
  return postBlob({
    url: '/charging/standard/list3/pageExport',
    data,
    name
  })
}

// 导入
export function chargingStandardImport(data) {
  return handleImport('/charging/standard/import', data.formdata, data.id || '')
}


// 获取列表
export function getList(params) {
  return request({
    url: '/notice/list',
    method: 'get',
    params
  })
}

// 获取列表 - 首页配置
export function getHomeList(params) {
  return request({
    url: '/index/list',
    method: 'get',
    params
  })
}

// 获取详情 - 首页配置
export function getHomeDetail(params) {
  return request({
    url: '/index/detail',
    method: 'get',
    params
  })
}

// 修改 - 首页配置
export function editHome(params) {
  return request({
    url: '/index/update',
    method: 'post',
    params
  })
}

// 获取列表 - 服务品牌
export function getBrandList(params) {
  return request({
    url: '/brand/list',
    method: 'get',
    params
  })
}

// 获取详情 - 服务品牌
export function getBrandDetail(params) {
  return request({
    url: '/brand/detail',
    method: 'get',
    params
  })
}

// 保存 - 服务品牌
export function saveBrand(params) {
  return request({
    url: '/brand/save',
    method: 'post',
    data: params
  })
}

// 删除 - 服务品牌
export function deleteBrand(params) {
  return request({
    url: '/brand/delete',
    method: 'post',
    params
  })
}

// 获取列表 - 业务类型
export function getTypeList(params) {
  return request({
    url: '/charging/standard/type/list',
    method: 'get',
    params
  })
}

// 获取详情 - 业务类型
export function getTypeDetail(params) {
  return request({
    url: '/charging/standard/type/detail',
    method: 'get',
    params
  })
}

// 保存 - 业务类型
export function saveType(params) {
  return request({
    url: '/charging/standard/type/save',
    method: 'post',
    data: params
  })
}

// 删除 - 业务类型
export function deleteType(params) {
  return request({
    url: '/charging/standard/type/delete',
    method: 'post',
    params
  })
}

// 获取列表 - 收费标准/故障排查
export function getMainList(params) {
  return request({
    url: '/charging/standard/list',
    method: 'get',
    params
  })
}

// 获取详情 - 收费标准/故障排查
export function getMainDetail(params) {
  return request({
    url: '/charging/standard/detail',
    method: 'get',
    params
  })
}

// 保存 - 收费标准/故障排查
export function saveMain(params) {
  return request({
    url: '/charging/standard/save',
    method: 'post',
    data: params
  })
}

// 删除 - 收费标准/故障排查
export function deleteMain(params) {
  return request({
    url: '/charging/standard/delete',
    method: 'post',
    params
  })
}