mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 19:06:43 +08:00
124 lines
2.9 KiB
JavaScript
124 lines
2.9 KiB
JavaScript
/**我的授课记录*/
|
|
import ajax from '@/api/boe/boeApiAjax.js'
|
|
import ajax2 from '@/api/unionAjax.js'
|
|
import axios from 'axios'
|
|
import { getToken } from '@/utils/token'
|
|
const baseURL = process.env.VUE_APP_BOE_BASE_API;
|
|
|
|
|
|
|
|
/**
|
|
* 导出授课记录
|
|
*
|
|
* @param {Object} data
|
|
*/
|
|
const courseRecordExport = function(data) {
|
|
return axios.request({
|
|
baseURL,
|
|
url: '/b1/system/teacher/teacher-course-export',
|
|
method: 'post',
|
|
data:data,
|
|
headers:{'Content-Type':'application/json;charset=utf-8'},
|
|
responseType: 'blob'
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 导出课程下的学员信息
|
|
*
|
|
*/
|
|
const exportStudentOfCourse = function(userId,courseId) {
|
|
return axios.request({
|
|
baseURL,
|
|
url: '/b1/system/teacher/teacher-course-student-export?userId='+userId+'&courseId='+courseId,
|
|
method: 'post',
|
|
headers:{'Content-Type':'application/json;charset=utf-8'},
|
|
responseType: 'blob'
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 导出教师下的所有授课记录下的学员信息
|
|
*
|
|
*/
|
|
const exportStudentOfTearcher = function(userId) {
|
|
return axios.request({
|
|
baseURL,
|
|
url: '/b1/system/teacher/teacher-course-student-export?userId='+userId,
|
|
method: 'post',
|
|
headers:{'Content-Type':'application/json;charset=utf-8'},
|
|
responseType: 'blob'
|
|
})
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* 授课记录列表
|
|
*
|
|
* @param {Object} data
|
|
*/
|
|
const courseRecordList = function(data) {
|
|
return ajax.postJson('/b1/system/teacher/teacher-course-list',data);
|
|
}
|
|
const getListByToken = function(data) {
|
|
return ajax2.get('/manageApi',`/admin/teacherRecord/getListByToken?courseName=${data.courseName}&pageNo=${data.pageNo}&pageSize=${data.pageSize}`);
|
|
}
|
|
|
|
/**
|
|
* 导出授课记录
|
|
*
|
|
* @param {Object} data
|
|
*/
|
|
const courseRecordExport2 = function(data) {
|
|
return axios.request({
|
|
baseURL: "/manageApi",
|
|
url: '/admin/export/exportInTeacherRecord',
|
|
method: 'get',
|
|
data:data,
|
|
headers:{'Content-Type':'application/json;charset=utf-8'},
|
|
responseType: 'blob'
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 导出课程下的学员信息
|
|
*
|
|
*/
|
|
const exportStudentOfCourse2 = function(courseId,courseType) {
|
|
return axios.request({
|
|
baseURL: "/manageApi",
|
|
url: '/admin/export/exportTeacherRecordStudentInfo?courseId='+courseId+'&courseType='+courseType,
|
|
method: 'get'
|
|
// headers:{'Content-Type':'application/json;charset=utf-8'},
|
|
// responseType: 'blob'
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 导出教师下的所有授课记录下的学员信息
|
|
*
|
|
*/
|
|
const exportStudentOfTearcher2 = function(userId) {
|
|
return axios.request({
|
|
baseURL: "/manageApi",
|
|
url: '/b1/system/teacher/teacher-course-student-export?userId='+userId,
|
|
method: 'post',
|
|
headers:{'Content-Type':'application/json;charset=utf-8'},
|
|
responseType: 'blob'
|
|
})
|
|
}
|
|
|
|
|
|
export default {
|
|
courseRecordExport,
|
|
courseRecordExport2,
|
|
courseRecordList,
|
|
getListByToken,
|
|
exportStudentOfCourse,
|
|
exportStudentOfCourse2,
|
|
exportStudentOfTearcher,
|
|
exportStudentOfTearcher2,
|
|
|
|
}
|