import request from '@/utils/request'

// 获取信号量列表
export function list(params) {
    return request({
        url: '/system/signal/list',
        method: 'get',
        params
    })
}

// 获取信号量详细
export function info(signalId) {
    return request({
      url: '/system/signal/' + signalId,
      method: 'get'
    })
  }

// 获取信号量选项详细
export function optionInfo(optionId) {
    return request({
      url: '/system/signal/' + optionId,
      method: 'get'
    })
  }

// 新增更新信号量
export function save(data) {
    return request({
        url: '/system/signal/save',
        method: 'post',
        data
    })
}

// 新增更新信号量选项
export function optionSave(data) {
    return request({
        url: '/system/signal/option/save',
        method: 'post',
        data
    })
}

// 删除信号量信息
export function del(ids) {
    return request({
        url: '/system/signal/' + ids,
        method: 'delete'
    })
}

// 删除信号量信号量选项
export function optionDel(id) {
    return request({
        url: '/system/signal/option/' + id,
        method: 'delete'
    })
}

// 获取选项下拉
export function select(params) {
    return request({
        url: '/system/signal/select',
        method: 'get',
        params
    })
}