Files
learning-system-portal/src/api/boe/teacher.js
2022-06-06 16:24:37 +08:00

154 lines
4.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**控制台相关的控制数据*/
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);
}
// api
/**
* 发薪地接口
*/
const getPayrollPlace = function(id) {
return ajax.get('/b1/system/teacher/payroll-place');
}
/**
* 教师体系和级别接口
* @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,
getPayrollPlace
}