import request from '@/utils/request'

// 创建导诊类型
export function createDzType(data) {
  return request({
    url: '/system/dz-type/create',
    method: 'post',
    data: data
  })
}

// 更新导诊类型
export function updateDzType(data) {
  return request({
    url: '/system/dz-type/update',
    method: 'put',
    data: data
  })
}

// 删除导诊类型
export function deleteDzType(id) {
  return request({
    url: '/system/dz-type/delete?id=' + id,
    method: 'delete'
  })
}

// 获得导诊类型
export function getDzType(id) {
  return request({
    url: '/system/dz-type/get?id=' + id,
    method: 'get'
  })
}

// 获得导诊类型分页
export function getDzTypePage(query) {
  return request({
    url: '/system/dz-type/page',
    method: 'get',
    params: query
  })
}

// 获得导诊类型分页
export function getDzTypePageGroup(query) {
  return request({
    url: '/system/dz-type/pagegroup',
    method: 'get',
    params: query
  })
}


export function getDzTypeGroup(query) {
  return request({
    url: '/system/dz-type/typegroup',
    method: 'get',
    params: query
  })
}

// 导出导诊类型 Excel
export function exportDzTypeExcel(query) {
  return request({
    url: '/system/dz-type/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
