import request from '@/utils/request'

// 查询发起问卷列表
export function listAssign(query) {
  return request({
    url: '/elder/questionnaire/assign/list',
    method: 'get',
    params: query
  })
}

// 查询发起问卷详细
export function getAssign(assignId) {
  return request({
    url: '/elder/questionnaire/assign/' + assignId,
    method: 'get'
  })
}

// 新增发起问卷
export function addAssign(data) {
  return request({
    url: '/elder/questionnaire/assign',
    method: 'post',
    data: data
  })
}

// 修改发起问卷
export function updateAssign(data) {
  return request({
    url: '/elder/questionnaire/assign',
    method: 'put',
    data: data
  })
}

// 删除发起问卷
export function delAssign(assignId) {
  return request({
    url: '/elder/questionnaire/assign/' + assignId,
    method: 'delete'
  })
}
