import request from '@/utils/request'

// 获取列表
export function getList(params) {
  return request({
    url: '/businessProcessingTask/doDifferenceList',
    method: 'get',
    params
  })
}

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

// 根据角色获取用户
export const getUserFormRole = (code) => (
  request({
    url: '/user/findUserByRoleName',
    method: 'get',
    params: {
      roleName: code
    }
  })
)

// 获取时间轴
export const getTimeAxis = (params) => (
  request({
    url: '/businessProcessingTask/doTimelineList',
    method: 'get',
    params
  })
)

// 查看接口
export const doBusinessHistoryView = (params) => (
  request({
    url: '/businessProcessingTask/doBusinessHistoryView',
    method: 'get',
    params
  })
)

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

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

export const getEnterpriseInspectionInfo = (params) => (
  request({
    url: '/electronic/signature/company/getBusinessByKeyWord',
    method: 'get',
    params
  })
)
