import req from '@/request'

const portal = window.context.portal

// 获取统计简报
export function tableData(data) {
    return new Promise((resolve, reject) => {
        req.get(portal + '/biz/train/task/brief?endTime=' + data)
            .then(res => resolve(res?.data || []))
            .catch(err => reject(err))
    })
}

// 统计简报导出
export function exportData(data) {
    return new Promise((resolve, reject) => {
        req.downloadGet(portal + '/biz/train/task/brief/export?endTime=' + data)
            .then(res => resolve(res?.data || []))
            .catch(err => reject(err))
    })
}


