import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listModel(query) {
  return request({
    url: '/business/elevator/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】列表
export function listModelNew(query) {
  return request({
    url: '/business/elevator/listNew',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】列表 不分页
export function listModelNewAll(query) {
  return request({
    url: '/business/elevator/listNewAll',
    method: 'get',
    params: query
  })
}

export function listNewAllParam(elevatorModelId, query) {
  return request({
    url: '/business/elevator/listNewAllParam/' + elevatorModelId,
    method: 'get',
    params: query
  })
}

export function listElevatorParam(elevatorModelId, query) {
  return request({
    url: '/business/elevator/listElevatorParam/' + elevatorModelId,
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getModel(id) {
  return request({
    url: '/business/elevator/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addModel(data) {
  return request({
    url: '/business/elevator',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateModel(data) {
  return request({
    url: '/business/elevator',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delModel(id) {
  return request({
    url: '/business/elevator/' + id,
    method: 'delete'
  })
}

// 删除【请填写功能名称】
export function delModelCheck(data) {
  return request({
    url: '/business/elevator/delete',
    method: 'post',
    data: data
  })
}

// 角色状态修改
export function changeEleStatus(id, status, updateTime) {
  const data = {
    id,
    status,
    updateTime
  }
  return request({
    url: '/business/elevator/changeStatus',
    method: 'put',
    data: data
  })
}

// 查询地区
export function getArea() {
  return request({
    url: '/user/area/getAllAreaList',
    method: 'get'
  })
}

// 查询【请填写功能名称】详细
export function getModelParam(id) {
  return request({
    url: '/business/elevator/paramInfo/' + id,
    method: 'get'
  })
}


export function listForComponents(query) {
  return request({
    url: '/business/elevator/listForComponents',
    method: 'get',
    params: query
  })
}

export function getModelSelecItem(id) {
  return request({
    url: '/business/elevator/itemInfo/' + id,
    method: 'get'
  })
}

export function getModelStandItem(id) {
  return request({
    url: '/business/elevator/itemStandInfo/' + id,
    method: 'get'
  })
}

export function getModelJgbInfo(id) {
  return request({
    url: '/business/elevator/modelJGBInfo/' + id,
    method: 'get'
  })
}
