mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 22:06:43 +08:00
146 lines
4.0 KiB
JavaScript
146 lines
4.0 KiB
JavaScript
/**控制台相关的控制数据*/
|
||
import ajax from '@/api/boe/boeApiAjax.js'
|
||
/**
|
||
* 添加编辑接口
|
||
* @param {
|
||
{
|
||
"teacher_user_id":"",// 教师对应的用户的id
|
||
"teacher_id":"", // 教师id ,有则编辑,没有则新建教师
|
||
"teacher_type":"", // 教师类型:0:内部讲师;1:外聘讲师;2:助教
|
||
"teacher_name":"", // 教师名称
|
||
"teacher_thumb_url":"", // 头像地址
|
||
"description":"", // 介绍
|
||
"teacher_system_id":"", // 体系id
|
||
"teacher_system":"", // 体系名称
|
||
"default_teaching_time":"", //初始授课时长
|
||
"teacher_level_id":"", // 讲师级别id
|
||
"teacher_level":"", // 讲师级别名称
|
||
"is_certify":"", //是否认证 0:未认证 1:已认证)
|
||
"certification":"", //认证资料图片地址
|
||
"remark":"", // 备注
|
||
"email":"", // 邮件(外部讲师填写)
|
||
"mobile_no":"" // 手机号码(外部讲师填写)
|
||
}
|
||
* } data 查询条件
|
||
*/
|
||
const editTeacher = function(data) {
|
||
return ajax.postJson('/b1/system/teacher/add-and-edit-teacher',data);
|
||
}
|
||
/**
|
||
* 教师体系和级别接口
|
||
* @param {
|
||
longin_user_id
|
||
* } data 查询条件
|
||
*/
|
||
const teacherSystem = function(id) {
|
||
return ajax.get('/b1/system/teacher/teacher-system?longin_user_id='+ id);
|
||
}
|
||
/**
|
||
* 教师详情查询接口
|
||
* @param {
|
||
teacher_id 教师id
|
||
* } data 查询条件
|
||
*/
|
||
const teacherInfo = function(sysId) {
|
||
return ajax.get('/b1/system/teacher/teacher-info?teacher_id='+sysId);
|
||
}
|
||
/**
|
||
* 教师删除接口
|
||
* @param {
|
||
teacher_id 教师id
|
||
* } 查询条件
|
||
*/
|
||
const deleteTeacher = function(id) {
|
||
return ajax.get('/b1/system/teacher/delete-teacher?teacher_id='+id);
|
||
}
|
||
/**
|
||
* 教师启用禁用接口
|
||
* @param {
|
||
teacher_id
|
||
status 状态;0:临时;1:正式;2:停用
|
||
* } 查询条件
|
||
*/
|
||
const updateStatus = function(data) {
|
||
return ajax.postJson('/b1/system/teacher/update-status',data);
|
||
}
|
||
/**
|
||
* 教师授课记录查询接口
|
||
* @param {
|
||
```json
|
||
id // 教师id
|
||
courseType // 课程类型:‘1,2’:面授,训练班;‘0’:在线班
|
||
pageSize // 每页数据条数
|
||
page // 返回第几页数据
|
||
isPage // 是否分页:0分页返回,1:不分页直接返回全部
|
||
```
|
||
*/
|
||
const getCourseScore = function(data) {
|
||
return ajax.get(`/b1/system/teacher/course-score?id=${data.id}&courseType=${data.courseType}&pageSize=${data.pageSize}&page=${data.page}&isPage=${data.isPage}`);
|
||
}
|
||
/**
|
||
* 内部讲师-授课资格 查询接口
|
||
* @param {
|
||
id // 教师id
|
||
pageSize // 每页数据条数
|
||
page // 返回第几页数据
|
||
```}
|
||
*/
|
||
const getTeachingQualify = function(data) {
|
||
return ajax.get(`/b1/system/teacher/teaching-qualify?id=${data.id}&pageSize=${data.pageSize}&page=${data.page}`);
|
||
}
|
||
/**
|
||
* 内部讲师-未开班资源查询接口
|
||
* @param {
|
||
id // 教师id
|
||
```
|
||
*/
|
||
const getCourseInfo = function(id) {
|
||
return ajax.get('/b1/system/teacher/course-info?id='+id);
|
||
}
|
||
/**
|
||
* 内部讲师-晋级过程查询接口
|
||
* @param {
|
||
id // 教师id
|
||
```
|
||
*/
|
||
const teacherUpgradePrecess = function(id) {
|
||
return ajax.get('/b1/system/teacher/teacher-upgrade-precess?id='+id);
|
||
}
|
||
/**
|
||
* 内部讲师-修改模块讲师信息
|
||
* @param {
|
||
courseId // 课程id
|
||
modId // 模块id
|
||
teacherId // 教师id
|
||
teachingTime // 授课时间
|
||
*/
|
||
const editModelTeacher = function(data) {
|
||
return ajax.postJson('/b1/system/teacher/edit-model-teacher',data);
|
||
}
|
||
/**
|
||
* 内部讲师-删除模块讲师接口
|
||
* @param {
|
||
courseId // 课程id
|
||
modId // 模块id
|
||
teacherId // 教师id
|
||
remark // 备注
|
||
*/
|
||
const deleteModelTeacher = function(data) {
|
||
return ajax.postJson('/b1/system/teacher/delete-model-teacher',data);
|
||
}
|
||
|
||
|
||
export default {
|
||
editTeacher,
|
||
teacherSystem,
|
||
teacherInfo,
|
||
deleteTeacher,
|
||
updateStatus,
|
||
getCourseScore,
|
||
getTeachingQualify,
|
||
getCourseInfo,
|
||
teacherUpgradePrecess,
|
||
deleteModelTeacher,
|
||
editModelTeacher
|
||
}
|