import request from '@/utils/request'

export function getConfig(data) {
  return request({
    url: 'DataQueryManage/DataQuery/GetConfig',
    method: 'post',
    data,
  })
}

export function getDataValue(data) {
  return request({
    url: 'Service/IO/RTDataJson.asmx/GetDataValue',
    method: 'post',
    data: data,
  })
}

export function getSelectOptions(data) {
  return request({
    url: 'DataQueryManage/DataQuery/GetSelectOptions',
    method: 'post',
    data: data,
  })
}

export function getData(data) {
  return request({
    url: 'DataQueryManage/DataQuery/GetData',
    method: 'post',
    data,
  })
}

export function exportData(data) {
  return request({
    url: 'DataQueryManage/DataQuery/ExportData',
    method: 'post',
    data,
  })
}

export function add(data) {
  return request({
    url: 'risk/type/insert',
    method: 'post',
    data,
  })
}

export function del(ids) {
  return request({
    url: 'risk/type/delete',
    method: 'post',
    data: ids,
  })
}
export function edit(data) {
  return request({
    url: 'risk/type/update',
    method: 'post',
    data,
  })
}

export default { add, edit, del }
