import req from '@/request'

const portal = window.context.portal

// 导出培训记录档案
export function exportWord(userIds = '') {
  return new Promise((resolve, reject) => {
    req.downloadGet(portal + `/biz/train/task/selectUser/exportWord?userIds=${userIds}`)
      .then(res => resolve(res.data || {}))
      .catch(err => reject(err))
  })
}

// 查看个人培训记录档案
export function userTrainRecord(userId) {
  return new Promise((resolve, reject) => {
    req.get(portal + `/biz/train/task/threeLevel/userTrainRecord?userId=${userId}`)
      .then(res => resolve(res?.data?.value || {}))
      .catch(err => reject(err))
  })
}



