mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-24 02:02:53 +08:00
Merge branch '251114-feature-course-online'
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*
|
||||
**/
|
||||
import ajax from '@/utils/xajax.js'
|
||||
import ajax2 from '../unionAjax.js';
|
||||
|
||||
/**
|
||||
* 保存课程基本信息,新增和更新都是此方式
|
||||
@@ -42,8 +43,8 @@ import ajax from '@/utils/xajax.js'
|
||||
]
|
||||
}
|
||||
*/
|
||||
const saveBase = function(data) {
|
||||
return ajax.postJson('/xboe/m/course/manage/save', data);
|
||||
const saveBase = function (data) {
|
||||
return ajax.postJson('/xboe/m/course/manage/save', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,39 +53,39 @@ const saveBase = function(data) {
|
||||
* 仅仅是保存课程信息,不包括教师信息
|
||||
* @param {Object} data
|
||||
*/
|
||||
const saveOnlyCourse = function(data) {
|
||||
return ajax.postJson('/xboe/m/course/manage/save-only-course', data);
|
||||
const saveOnlyCourse = function (data) {
|
||||
return ajax.postJson('/xboe/m/course/manage/save-only-course', data);
|
||||
}
|
||||
|
||||
/**提交课程*/
|
||||
const submitCourse = function(data) {
|
||||
return ajax.postJson('/xboe/m/course/manage/submit', data);
|
||||
const submitCourse = function (data) {
|
||||
return ajax.postJson('/xboe/m/course/manage/submit', data);
|
||||
}
|
||||
|
||||
/**撤销已提交审核的课程*/
|
||||
const revokeSubmit = function(id) {
|
||||
return ajax.post('/xboe/m/course/manage/revoke', {id});
|
||||
const revokeSubmit = function (id) {
|
||||
return ajax.post('/xboe/m/course/manage/revoke', { id });
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制课程
|
||||
* @param {Object}
|
||||
*/
|
||||
const copyCourse = function(data) {
|
||||
return ajax.post('/xboe/m/course/manage/copy',data);
|
||||
const copyCourse = function (data) {
|
||||
return ajax.post('/xboe/m/course/manage/copy', data);
|
||||
}
|
||||
/*
|
||||
查询课程是否有重复名称
|
||||
*/
|
||||
const isRedoName=function(){
|
||||
return ajax.get('/xboe/m/course/manage/isRedoName');
|
||||
const isRedoName = function () {
|
||||
return ajax.get('/xboe/m/course/manage/isRedoName');
|
||||
}
|
||||
/*
|
||||
查询当前添加课程是否已有
|
||||
courseName 要添加的课程姓名
|
||||
*/
|
||||
const isCourseName=function(courseName,courseId){
|
||||
return ajax.get(`/xboe/m/course/manage/isCourseName?courseName=${courseName}&courseId=${courseId}`);
|
||||
const isCourseName = function (courseName, courseId) {
|
||||
return ajax.get(`/xboe/m/course/manage/isCourseName?courseName=${courseName}&courseId=${courseId}`);
|
||||
}
|
||||
/**
|
||||
* 查询修改日志,列表,不分页
|
||||
@@ -95,16 +96,16 @@ const isCourseName=function(courseName,courseId){
|
||||
name: 修改人
|
||||
}
|
||||
*/
|
||||
const findUpdateLogs = function(params) {
|
||||
return ajax.post('/xboe/m/course/manage/upldate-logs',params);
|
||||
const findUpdateLogs = function (params) {
|
||||
return ajax.post('/xboe/m/course/manage/upldate-logs', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id获取修改的详细信息
|
||||
* @param {Object} id
|
||||
*/
|
||||
const getUpdateLog = function(id) {
|
||||
return ajax.get('/xboe/m/course/manage/upldate-log-detail?id='+id);
|
||||
const getUpdateLog = function (id) {
|
||||
return ajax.get('/xboe/m/course/manage/upldate-log-detail?id=' + id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,8 +140,8 @@ const getUpdateLog = function(id) {
|
||||
]
|
||||
}
|
||||
*/
|
||||
const saveContent = function(data) {
|
||||
return ajax.postJson('/xboe/m/course/content/save', data);
|
||||
const saveContent = function (data) {
|
||||
return ajax.postJson('/xboe/m/course/content/save', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -159,18 +160,18 @@ const saveContent = function(data) {
|
||||
* ]
|
||||
* @returns
|
||||
*/
|
||||
const updateContentOrders = function(cid,items) {
|
||||
return ajax.postJson('/xboe/m/course/content/update-orders/'+cid, items);
|
||||
const updateContentOrders = function (cid, items) {
|
||||
return ajax.postJson('/xboe/m/course/content/update-orders/' + cid, items);
|
||||
}
|
||||
|
||||
/**
|
||||
* 课程的详细信息
|
||||
* @param {String} id
|
||||
*/
|
||||
const detail = function(id) {
|
||||
return ajax.get('/xboe/m/course/manage/detail?id=' + id);
|
||||
const detail = function (id) {
|
||||
return ajax.get('/xboe/m/course/manage/detail?id=' + id);
|
||||
}
|
||||
const getDictIds = function(pid,type) {
|
||||
const getDictIds = function (pid, type) {
|
||||
return ajax.get(`/xboe/m/course/manage/getDictIds?pid=${pid}&type=${type}`);
|
||||
}
|
||||
/**
|
||||
@@ -181,8 +182,8 @@ const getDictIds = function(pid,type) {
|
||||
name:''
|
||||
}
|
||||
*/
|
||||
const updateContentName = function(data) {
|
||||
return ajax.post('/xboe/m/course/content/update-name', data);
|
||||
const updateContentName = function (data) {
|
||||
return ajax.post('/xboe/m/course/content/update-name', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,8 +195,8 @@ const updateContentName = function(data) {
|
||||
erasable:是否物理删除,此值是课程信息中系统带过来的字段,直接使用它就可以了
|
||||
}
|
||||
*/
|
||||
const delContent = function(data) {
|
||||
return ajax.post('/xboe/m/course/content/delete', data);
|
||||
const delContent = function (data) {
|
||||
return ajax.post('/xboe/m/course/content/delete', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,40 +208,40 @@ const delContent = function(data) {
|
||||
parentId: 上级id。如果没有可以填“-1”字符串
|
||||
orderIndex:显示顺序,顺序索引,整数
|
||||
*/
|
||||
const saveSection = function(data) {
|
||||
return ajax.post('/xboe/m/course/content/save-section', data);
|
||||
const saveSection = function (data) {
|
||||
return ajax.post('/xboe/m/course/content/save-section', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除章节目录,注意只有目录下没有学习内容时才允许删除
|
||||
* @param {Object} data
|
||||
*/
|
||||
const delSection = function(id) {
|
||||
return ajax.post('/xboe/m/course/content/delete-section?id=' + id);
|
||||
const delSection = function (id) {
|
||||
return ajax.post('/xboe/m/course/content/delete-section?id=' + id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据课程学习内容的id。获取作业信息,只有学习内容是作业时才会有信息
|
||||
* @param {Object} ccid
|
||||
*/
|
||||
const getHomework = function(ccid) {
|
||||
return ajax.post('/xboe/m/course/content/homework?ccid=' + ccid);
|
||||
const getHomework = function (ccid) {
|
||||
return ajax.post('/xboe/m/course/content/homework?ccid=' + ccid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据课程学习内容的id。获取考试信息,只有学习内容是考试时才会有信息
|
||||
* @param {Object} ccid
|
||||
*/
|
||||
const getExam = function(ccid) {
|
||||
return ajax.post('/xboe/m/course/content/exam?ccid=' + ccid);
|
||||
const getExam = function (ccid) {
|
||||
return ajax.post('/xboe/m/course/content/exam?ccid=' + ccid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据课程学习内容的id。获取评估信息,评估内容可以获取
|
||||
* @param {Object} ccid
|
||||
*/
|
||||
const getAssess = function(ccid) {
|
||||
return ajax.post('/xboe/m/course/content/assess?ccid=' + ccid);
|
||||
const getAssess = function (ccid) {
|
||||
return ajax.post('/xboe/m/course/content/assess?ccid=' + ccid);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -265,21 +266,21 @@ const getAssess = function(ccid) {
|
||||
name 课程名称
|
||||
|
||||
*/
|
||||
const pageList = function(query) {
|
||||
return ajax.post('/xboe/m/course/manage/pagelist', query);
|
||||
const pageList = function (query) {
|
||||
return ajax.post('/xboe/m/course/manage/pagelist', query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 课程管理分页查询(新)
|
||||
* @param {Object} query
|
||||
*/
|
||||
const managePage = function(query) {
|
||||
return ajax.postJson('/xboe/m/course/manage/page', query);
|
||||
const managePage = function (query) {
|
||||
return ajax.postJson('/xboe/m/course/manage/page', query);
|
||||
}
|
||||
|
||||
|
||||
/**计算待审核课程*/
|
||||
const countWaitAudit = function() {
|
||||
const countWaitAudit = function () {
|
||||
return ajax.get('/xboe/m/course/manage/wait-audit-num');
|
||||
}
|
||||
|
||||
@@ -288,8 +289,8 @@ const countWaitAudit = function() {
|
||||
* 当前用户需要审核的课程列表
|
||||
* @param {Object} query 同pageList
|
||||
*/
|
||||
const auditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/manage/audit-pagelist', query);
|
||||
const auditList = function (query) {
|
||||
return ajax.post('/xboe/m/course/manage/audit-pagelist', query);
|
||||
}
|
||||
|
||||
|
||||
@@ -297,8 +298,8 @@ const auditList = function(query) {
|
||||
* 【已移到courseAudit中】
|
||||
* 教师需要审核的课程列表
|
||||
*/
|
||||
const teacherAuditList = function(query) {
|
||||
return ajax.post('/xboe/m/course/audit/teacher-course', query);
|
||||
const teacherAuditList = function (query) {
|
||||
return ajax.post('/xboe/m/course/audit/teacher-course', query);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,16 +308,16 @@ const teacherAuditList = function(query) {
|
||||
* @param {Object} data
|
||||
* {courseId:课程id,teacherId:指定的审核人教师的id,teacherName:教师名称,remark:备注}
|
||||
*/
|
||||
const auditAppoint = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/appoint', data);
|
||||
const auditAppoint = function (data) {
|
||||
return ajax.post('/xboe/m/course/audit/appoint', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审核信息,上面教师点击审核课程时,用于查询,上面“转审”时,用户填写的备注信息
|
||||
* @param {courseId:'课程id',teacherId:'可以不填写,系统会查询当前人'} data
|
||||
*/
|
||||
const getAuditInfo = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/infos', data);
|
||||
const getAuditInfo = function (data) {
|
||||
return ajax.post('/xboe/m/course/audit/infos', data);
|
||||
}
|
||||
|
||||
|
||||
@@ -324,56 +325,56 @@ const getAuditInfo = function(data) {
|
||||
* 管理员的课程审核处理
|
||||
* @param {Object} query {id:课程id,title:课程的名称, Boolean pass 是否通过,remark 备注}
|
||||
*/
|
||||
const audit = function(data) {
|
||||
return ajax.post('/xboe/m/course/manage/audit', data);
|
||||
const audit = function (data) {
|
||||
return ajax.post('/xboe/m/course/manage/audit', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核记录列表,分页查询
|
||||
*/
|
||||
const auditPageRecords = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/page-records', data);
|
||||
const auditPageRecords = function (data) {
|
||||
return ajax.post('/xboe/m/course/audit/page-records', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核记录列表,要卖课程id,查询出审核列记录信息
|
||||
* { courseId:必须}
|
||||
*/
|
||||
const auditCourseRecords = function(data) {
|
||||
return ajax.post('/xboe/m/course/audit/course-records',data);
|
||||
const auditCourseRecords = function (data) {
|
||||
return ajax.post('/xboe/m/course/audit/course-records', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 管理员的课程发布,当前已经不再使用了
|
||||
* @param {Object} query {ids:课程id,多个使用逗号分隔,title:课程的名称, Boolean pass 是否发布}
|
||||
*/
|
||||
const publish = function(data) {
|
||||
return ajax.post('/xboe/m/course/manage/publish', data);
|
||||
const publish = function (data) {
|
||||
return ajax.post('/xboe/m/course/manage/publish', data);
|
||||
}
|
||||
|
||||
const auditAndPublish=function(data) {
|
||||
return ajax.post('/xboe/m/course/manage/audit-publish', data);
|
||||
const auditAndPublish = function (data) {
|
||||
return ajax.post('/xboe/m/course/manage/audit-publish', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置top
|
||||
* @param {Object} query {ids:课程id,多个使用逗号分隔,title:课程的名称,Boolean top 是否置顶}
|
||||
*/
|
||||
const setTop = function(data) {
|
||||
return ajax.post('/xboe/m/course/manage/top', data);
|
||||
const setTop = function (data) {
|
||||
return ajax.post('/xboe/m/course/manage/top', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否展示置顶相关功能
|
||||
*/
|
||||
const showSetTop = function() {
|
||||
const showSetTop = function () {
|
||||
return ajax.get('/xboe/m/course/manage/show-settop');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取置顶课程列表
|
||||
*/
|
||||
const fetchTopCourseList = function() {
|
||||
const fetchTopCourseList = function () {
|
||||
return ajax.get('/xboe/m/course/manage/topList');
|
||||
}
|
||||
|
||||
@@ -381,7 +382,7 @@ const fetchTopCourseList = function() {
|
||||
* 更新置顶课程排序
|
||||
* @param {Array<{id:string,sortWeight:number}>} data
|
||||
*/
|
||||
const updateTopCourseSort = function(data) {
|
||||
const updateTopCourseSort = function (data) {
|
||||
return ajax.postJson('/xboe/m/course/manage/top-sortchange', data);
|
||||
}
|
||||
|
||||
@@ -389,8 +390,8 @@ const updateTopCourseSort = function(data) {
|
||||
* 管理员的设置启用停用
|
||||
* @param {Object} query {ids:课程id,多个使用逗号分隔,title:课程的名称, Boolean enabled 是否启用}
|
||||
*/
|
||||
const setEnabled = function(data) {
|
||||
return ajax.post('/xboe/m/course/manage/enabled', data);
|
||||
const setEnabled = function (data) {
|
||||
return ajax.post('/xboe/m/course/manage/enabled', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -398,34 +399,34 @@ const setEnabled = function(data) {
|
||||
* erasable 此值是课程信息带过来的,直接传就可以
|
||||
* @param {Object} query {id:课程id,多个使用逗号分隔,Boolean erasable 是否物理删除,title:课程的名称, remark 备注}
|
||||
*/
|
||||
const del = function(data) {
|
||||
return ajax.post('/xboe/m/course/manage/delete', data);
|
||||
const del = function (data) {
|
||||
return ajax.post('/xboe/m/course/manage/delete', data);
|
||||
}
|
||||
/*
|
||||
详情
|
||||
*/
|
||||
const detailFew=function(id){
|
||||
return ajax.get('/xboe/m/course/portal/detail-few?id=' + id);
|
||||
const detailFew = function (id) {
|
||||
return ajax.get('/xboe/m/course/portal/detail-few?id=' + id);
|
||||
}
|
||||
|
||||
/*
|
||||
直接审核,教师提交审核
|
||||
*/
|
||||
const sumbits=function(data){
|
||||
return ajax.post('/xboe/m/course/manage/sumbits',data);
|
||||
const sumbits = function (data) {
|
||||
return ajax.post('/xboe/m/course/manage/sumbits', data);
|
||||
}
|
||||
/*
|
||||
教师授课记录
|
||||
*/
|
||||
const teacherCourse=function(teacherId){
|
||||
return ajax.get('/xboe/m/course/manage/teacher-course?teacherId='+teacherId);
|
||||
const teacherCourse = function (teacherId) {
|
||||
return ajax.get('/xboe/m/course/manage/teacher-course?teacherId=' + teacherId);
|
||||
}
|
||||
/*
|
||||
教师授课记录导出
|
||||
@param teacherId 教师id
|
||||
*/
|
||||
const exportTeacherCourse=function(teacherId){
|
||||
return ajax.post('/xboe/m/course/manage/export-teacher-course?teacherId='+teacherId)
|
||||
const exportTeacherCourse = function (teacherId) {
|
||||
return ajax.post('/xboe/m/course/manage/export-teacher-course?teacherId=' + teacherId)
|
||||
}
|
||||
/*
|
||||
*待审核课程记录导出
|
||||
@@ -445,25 +446,25 @@ const exportTeacherCourse=function(teacherId){
|
||||
type:课程类型,10微课,21在线课(直播);20:在线课( 录播);30:面授课;40:混合式,
|
||||
name 课程名称
|
||||
*/
|
||||
const exportCourseAudit=function(query){
|
||||
return ajax.post('/xboe/m/course/manage/exportCourseAudit',query);
|
||||
const exportCourseAudit = function (query) {
|
||||
return ajax.post('/xboe/m/course/manage/exportCourseAudit', query);
|
||||
}
|
||||
/*
|
||||
参数同上待审核课程记录导出
|
||||
课程的导出和已审核的课程导出
|
||||
*/
|
||||
const exportCourse = function(query) {
|
||||
return ajax.get({
|
||||
url: '/xboe/m/course/manage/export',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
const exportCourse = function (query) {
|
||||
return ajax.get({
|
||||
url: '/xboe/m/course/manage/export',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
});
|
||||
}
|
||||
|
||||
//判断受众id是否有关联
|
||||
const queryCrowd=function(query){
|
||||
return ajax.postJson('/xboe/m/course/manage/queryCrowd',query);
|
||||
const queryCrowd = function (query) {
|
||||
return ajax.postJson('/xboe/m/course/manage/queryCrowd', query);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -472,69 +473,78 @@ const queryCrowd=function(query){
|
||||
* ids
|
||||
* }
|
||||
* */
|
||||
const ids=function (data){
|
||||
return ajax.postJson('/xboe/m/course/manage/ids',data);
|
||||
const ids = function (data) {
|
||||
return ajax.postJson('/xboe/m/course/manage/ids', data);
|
||||
}
|
||||
|
||||
const saveTip = function() {
|
||||
const saveTip = function () {
|
||||
return ajax.postJson('/xboe/m/course/manage/saveTip');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取我开发的课程列表
|
||||
*/
|
||||
const courseList = function(data) {
|
||||
const courseList = function (data) {
|
||||
return ajax.postJson('/xboe/m/course/manage/develop_page', data);
|
||||
}
|
||||
|
||||
// ai播放器相关 - 批量AI设置
|
||||
const benchAiSet = function (data) {
|
||||
return ajax.postJson('/xboe/m/course/manage/benchAiSet', data);
|
||||
}
|
||||
const listByUser = function (data) {
|
||||
return ajax2.get('/manageApi/admin/thirdApi/permission/listByUser?permissionType=PAGE');
|
||||
}
|
||||
|
||||
export default {
|
||||
saveBase,
|
||||
submitCourse,
|
||||
revokeSubmit,
|
||||
copyCourse,
|
||||
findUpdateLogs,
|
||||
getUpdateLog,
|
||||
detail,
|
||||
getDictIds,
|
||||
saveContent,
|
||||
pageList,
|
||||
managePage,
|
||||
setEnabled,
|
||||
del,
|
||||
publish,
|
||||
saveSection,
|
||||
getHomework,
|
||||
countWaitAudit,
|
||||
auditList,
|
||||
teacherAuditList,
|
||||
auditAppoint,
|
||||
getAuditInfo,
|
||||
audit,
|
||||
auditPageRecords,
|
||||
auditCourseRecords,
|
||||
auditAndPublish,
|
||||
getAssess,
|
||||
setTop,
|
||||
showSetTop,
|
||||
fetchTopCourseList,
|
||||
updateTopCourseSort,
|
||||
delSection,
|
||||
getExam,
|
||||
delContent,
|
||||
updateContentName,
|
||||
updateContentOrders,
|
||||
saveOnlyCourse,
|
||||
isRedoName,
|
||||
isCourseName,
|
||||
detailFew,
|
||||
sumbits,
|
||||
teacherCourse,
|
||||
exportTeacherCourse,
|
||||
exportCourseAudit,
|
||||
exportCourse,
|
||||
queryCrowd,
|
||||
saveBase,
|
||||
submitCourse,
|
||||
revokeSubmit,
|
||||
copyCourse,
|
||||
findUpdateLogs,
|
||||
getUpdateLog,
|
||||
detail,
|
||||
getDictIds,
|
||||
saveContent,
|
||||
pageList,
|
||||
managePage,
|
||||
setEnabled,
|
||||
del,
|
||||
publish,
|
||||
saveSection,
|
||||
getHomework,
|
||||
countWaitAudit,
|
||||
auditList,
|
||||
teacherAuditList,
|
||||
auditAppoint,
|
||||
getAuditInfo,
|
||||
audit,
|
||||
auditPageRecords,
|
||||
auditCourseRecords,
|
||||
auditAndPublish,
|
||||
getAssess,
|
||||
setTop,
|
||||
showSetTop,
|
||||
fetchTopCourseList,
|
||||
updateTopCourseSort,
|
||||
delSection,
|
||||
getExam,
|
||||
delContent,
|
||||
updateContentName,
|
||||
updateContentOrders,
|
||||
saveOnlyCourse,
|
||||
isRedoName,
|
||||
isCourseName,
|
||||
detailFew,
|
||||
sumbits,
|
||||
teacherCourse,
|
||||
exportTeacherCourse,
|
||||
exportCourseAudit,
|
||||
exportCourse,
|
||||
queryCrowd,
|
||||
ids,
|
||||
saveTip,
|
||||
courseList
|
||||
courseList,
|
||||
benchAiSet,
|
||||
listByUser,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user