feat:新增用户检索功能,更新课程管理页面,添加课程置顶排序组件,优化课程管理列表,支持新课程管理视图。

This commit is contained in:
huweihang
2025-12-05 17:40:09 +08:00
committed by joshen
parent c2242631a0
commit 110b920725
5 changed files with 1758 additions and 3 deletions

View File

@@ -269,6 +269,14 @@ 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 countWaitAudit = function() {
@@ -355,6 +363,21 @@ const setTop = function(data) {
return ajax.post('/xboe/m/course/manage/top', data);
}
/**
* 获取置顶课程列表
*/
const fetchTopCourseList = function() {
return ajax.get('/xboe/m/course/manage/topList');
}
/**
* 更新置顶课程排序
* @param {Array<{id:string,sortWeight:number}>} data
*/
const updateTopCourseSort = function(data) {
return ajax.postJson('/xboe/m/course/manage/top-sortchange', data);
}
/**
* 管理员的设置启用停用
* @param {Object} query {ids:课程id,多个使用逗号分隔,title:课程的名称, Boolean enabled 是否启用}
@@ -422,8 +445,13 @@ const exportCourseAudit=function(query){
参数同上待审核课程记录导出
课程的导出和已审核的课程导出
*/
const exportCourse=function(query){
return ajax.post('/xboe/m/course/manage/exportCourse',query);
const exportCourse = function(query) {
return ajax.get({
url: '/xboe/m/course/manage/export',
method: 'get',
params: query,
responseType: 'blob'
});
}
//判断受众id是否有关联
@@ -469,6 +497,7 @@ export default {
getDictIds,
saveContent,
pageList,
managePage,
setEnabled,
del,
publish,
@@ -485,6 +514,8 @@ export default {
auditAndPublish,
getAssess,
setTop,
fetchTopCourseList,
updateTopCourseSort,
delSection,
getExam,
delContent,