import request from '@/utils/request'

const courseApi = {
    list: '/archives/user/listPage',
    autoTrainList: '/archives/user/autoTrainPageList',
    autoTrainDetailList: '/archives/user/autoTrainDetailPageList',
    autoTrainAnswerList: '/archives/user/autoTrainAnswerPageList',
    terminalTrainList: '/archives/user/terminalTrainPageList',
    terminalTrainDetail: '/archives/user/terminalTrainDetail',
    selfStudyList: '/archives/user/selfStudyPageList',
    violationList: '/archives/user/violationPageList'
}

// 人员档案 列表
export function getArchivesUserList(params) {
    return request({
        url: courseApi.list,
        method: 'get',
        params: params
    })
}

// 人员档案-自主培训 列表
export function getArchivesUserAutoTrainList(params) {
    return request({
        url: courseApi.autoTrainList,
        method: 'get',
        params: params
    })
}

// 人员档案-自主培训-培训详情 列表
export function getArchivesUserAutoTrainDetailList(params) {
    return request({
        url: courseApi.autoTrainDetailList,
        method: 'get',
        params: params
    })
}

// 人员档案-自主培训-答题记录 列表
export function getArchivesUserAutoTrainAnswerList(params) {
    return request({
        url: courseApi.autoTrainAnswerList,
        method: 'get',
        params: params
    })
}

// 人员档案-终端培训 列表
export function getArchivesUserTerminalTrainList(params) {
    return request({
        url: courseApi.terminalTrainList,
        method: 'get',
        params: params
    })
}

// 人员档案-终端培训-查看详情
export function getArchivesUserTerminalTrainDetail(params) {
    return request({
        url: courseApi.terminalTrainDetail,
        method: 'get',
        params: params
    })
}

// 人员档案-自学档案
export function getArchivesUserSelfStudyList(params) {
    return request({
        url: courseApi.selfStudyList,
        method: 'get',
        params: params
    })
}

// 人员档案-违章档案
export function getArchivesUserViolationList(params) {
    return request({
        url: courseApi.violationList,
        method: 'get',
        params: params
    })
}