import server from '@/utils/request'

//新增
interface Addobj{
  name:String	              //型号名称
  dccNumMin:String	        //仓位数量下限
  dccNumMax:String	        //仓位数量上限
  serviceCapability:String	//服务能力
  chargerPower:String	      //充电机功率
  autoLevel:String	        //自动化级别：1-无人值守，2-有人值守
}

export function adddicttype(data:Addobj) {
  return server.request({
    url: '/resource/stationtype/add',
    method: 'post',
    data
  })
}

//修改
export function update(data:Addobj) {
  return server.request({
    url: '/resource/stationtype/update',
    method: 'post',
    data
  })
}

//查询
interface Querydata{
  pageSize:String|number,	  //每页条数
  pageNo:String|number	    //页数
}
export function getdicttype(params:Querydata) {
  return server.request({
    url: '/resource/stationtype/list',
    method: 'get',
    params
  })
}

//删除
export function deltype(id:string) {
  return server.request({
    url: '/resource/stationtype/del',
    method: 'post',
    data:{
      id
    }
  })
}


