import request from '@/utils/request'

// 获取字典
export const getTypeCode = ({ typeCode }) => (
  request({
    url: '/dictionary/do_findByParentCode',
    method: 'get',
    params: {
      parentCode: typeCode
    }
  })
)

// 获取文件预览
export const getFilePerview = (params) => (
  request({
    url: 'system/fileStorage/downloadPdfFile',
    method: 'get',
    params,
    responseType: 'arraybuffer'
  })
)

// 获取省市区
export const getRegion = (params) => (
  request({
    url: '/department/findAll',
    method: 'get',
    params
  })
)
