import request from '@/utils/request'

// 查询选项列表
export function listItem(query) {
  return request({
    url: '/business/selectItem/list',
    method: 'get',
    params: query
  })
}

// 查询选项详细
export function getItem(id) {
  return request({
    url: '/business/selectItem/' + id,
    method: 'get'
  })
}

// 新增选项
export function addItem(data) {
  return request({
    url: '/business/selectItem',
    method: 'post',
    data: data
  })
}

// 修改选项
export function updateItem(data) {
  return request({
    url: '/business/selectItem',
    method: 'put',
    data: data
  })
}

// 删除选项
export function delItem(id) {
  return request({
    url: '/business/selectItem/' + id,
    method: 'delete'
  })
}

export function getSelectItemListByParaId(paraId) {
  return request({
    url: '/business/selectItem/getSelectItemListByParaId/' + paraId,
    method: 'get'
  })
}
