import {baseServer,dict} from '@/api'
import request from '@/utils/require'

// 详情
export function detailsFn(sbbh) {
  return request({
    url: `${baseServer}/equipment/${sbbh}`,
    method: 'get',
  })
}

// 删除
export function deleteFn(sblxbh) {
    return request({
      url: `${baseServer}/equipmentType/${sblxbh}`,
      method: 'delete',
    })
  }

// 获取分页列表
export function getPageList(pageData,params){
    return request({
        url: `${baseServer}/equipmentPage/${pageData.page}/${pageData.size}`,
        method: 'post',
        data:params
    })
}

// 获取设备类型分页列表
export function getPageListLx(pageData,params){
  return request({
      url: `${baseServer}/equipmentTypePage/${pageData.page}/${pageData.size}`,
      method: 'post',
      data:params
  })
}

// 设备类型新增
export function addFnLx(params) {
  return request({
    url: `${baseServer}/equipmentType`,
    method: 'post',
    data: params
  })
}

// 新增
export function addFn(params) {
    return request({
      url: `${baseServer}/equipmentBatch`,
      method: 'post',
      data: params
    })
}

// 编辑
export function editFn(params) {
    return request({
      url: `${baseServer}/equipment`,
      method: 'put',
      data: params
    })
}

//设备类型
export function sbfindByGroupId(data) {
  return request({
    url: `${dict}/dataDictionary/getDataGroup?groupId=${data.groupId}&pdictCode=${data.pdictCode}`,
    method: 'get'
  })
}
//
