import request from '@/utils/request'

// 查询资源类型列表
export function listType(query) {
  return request({
    url: '/supporting/type/list',
    method: 'get',
    params: query
  })
}

// 查询资源类型详细
export function getType(typeId) {
  return request({
    url: '/supporting/type/' + typeId,
    method: 'get'
  })
}

// 新增资源类型
export function addType(data) {
  return request({
    url: '/supporting/type',
    method: 'post',
    data: data
  })
}

// 修改资源类型
export function updateType(data) {
  return request({
    url: '/supporting/type',
    method: 'put',
    data: data
  })
}

// 删除资源类型
export function delType(typeId) {
  return request({
    url: '/supporting/type/' + typeId,
    method: 'delete'
  })
}

// 导出资源类型
export function exportType(query) {
  return request({
    url: '/supporting/type/export',
    method: 'get',
    params: query
  })
}
