// WFProcess 流程模版基本信息
import { defHttp } from '@/utils/http/axios';
import {
  countItem,
  countModel,
  AccountParams,
  AddParams,
  countDetItem
} from './model/index';

enum Api {
  // 获取分页列表
  GetListDataInfo = '/api/TaxBuilding/LoadBuildingPageList',
  //  根据id获取单个企业信息
  GetConpanyInfoById = '/api/TaxBuilding/GetBuildingInfoById',
  // 新增
  AddCompany = '/api/TaxBuilding/AddBuilding',
  // 编辑
  UpdateCompany = '/api/TaxBuilding/UpdateBuilding',
  // 删除
  DeleteCompany = '/api/TaxBuilding/DeleteBuilding',
  // 查询乡镇
  GetStreetInfo = '/api/TaxBuilding/GetStreetInfo',
  //导入
  ImportCompanyInfo = '/api/TaxBuilding/ImportBuildingInfo',
  //导出
  ExportBuilds = '/api/TaxBuilding/Export',
}


/**
 * @description: getCaseFlowLog
 */
export function GetListDataInfo(params?: AccountParams) {
  return defHttp.get<countModel>({ url: Api.GetListDataInfo, params });
}
export function GetConpanyInfoById(params?: countItem) {
  return defHttp.get<countModel>({ url: Api.GetConpanyInfoById, params });
}
export function AddCompany(params?: AddParams) {
  return defHttp.post<countModel>({ url: Api.AddCompany, params });
}
export function UpdateCompany(params?: AddParams) {
  return defHttp.post<countModel>({ url: Api.UpdateCompany, params });
}
export function DeleteCompany(params?: countDetItem) {
  return defHttp.post<countModel>({ url: Api.DeleteCompany, params });
}
export function GetStreetInfo(params?: countItem) {
  return defHttp.get<countModel>({ url: Api.GetStreetInfo, params });
}
export function ImportCompanyInfo(params?: countItem) {
  return defHttp.post<countItem[]>({
    url: Api.ImportCompanyInfo,
    params,
    headers: {
      'Content-type': 'multipart/form-data',
    },
  })
}
export function ExportBuilds(params?: countDetItem) {
  return defHttp.post<countModel[]>({
    url: Api.ExportBuilds,
    responseType: 'blob',
  })
}