import request from '@/utils/request'

// 创建问卷调查
export function createWq(data) {
  return request({
    url: '/system/wq/create',
    method: 'post',
    data: data
  })
}

// 更新问卷调查
export function updateWq(data) {
  return request({
    url: '/system/wq/update',
    method: 'put',
    data: data
  })
}

// 删除问卷调查
export function deleteWq(id) {
  return request({
    url: '/system/wq/delete?id=' + id,
    method: 'delete'
  })
}

// 获得问卷调查
export function getWq(id) {
  return request({
    url: '/system/wq/get?id=' + id,
    method: 'get'
  })
}

// 获得问卷调查分页
export function getWqPage(query) {
  return request({
    url: '/system/wq/page',
    method: 'get',
    params: query
  })
}

// 导出问卷调查 Excel
export function exportWqExcel(query) {
  return request({
    url: '/system/wq/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
