import request from '@/utils/request'

// 查询回答问卷列表
export function listAnswer(query) {
  return request({
    url: '/elder/questionnaire/answer/list',
    method: 'get',
    params: query
  })
}

// 查询回答问卷详细
export function getAnswer(answerId) {
  return request({
    url: '/elder/questionnaire/answer/' + answerId,
    method: 'get'
  })
}

// 新增回答问卷
export function addAnswer(data) {
  return request({
    url: '/elder/questionnaire/answer',
    method: 'post',
    data: data
  })
}

// 修改回答问卷
export function updateAnswer(data) {
  return request({
    url: '/elder/questionnaire/answer',
    method: 'put',
    data: data
  })
}

// 删除回答问卷
export function delAnswer(answerId) {
  return request({
    url: '/elder/questionnaire/answer/' + answerId,
    method: 'delete'
  })
}
