mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-08 18:36:43 +08:00
Merge remote-tracking branch '121-git/master-0720-lyc' into master-0720-lyc
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
* 课程的操作,课程的添加,修改,列表查询,课程的审核发布等操作。
|
* 课程的操作,课程的添加,修改,列表查询,课程的审核发布等操作。
|
||||||
* 针对于管理员,教师的功能
|
* 针对于管理员,教师的功能
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
import ajax from '@/utils/xajax.js'
|
import ajax from '@/utils/xajax.js'
|
||||||
|
import request from "../unionAjax";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存课程基本信息,新增和更新都是此方式
|
* 保存课程基本信息,新增和更新都是此方式
|
||||||
@@ -170,6 +171,9 @@ const updateContentOrders = function(cid,items) {
|
|||||||
const detail = function(id) {
|
const detail = function(id) {
|
||||||
return ajax.get('/xboe/m/course/manage/detail?id=' + id);
|
return ajax.get('/xboe/m/course/manage/detail?id=' + id);
|
||||||
}
|
}
|
||||||
|
const getDictIds = function(pid,type) {
|
||||||
|
return ajax.get(`/xboe/m/course/manage/getDictIds?pid=${pid}&type=${type}`);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新内容的名称
|
* 更新内容的名称
|
||||||
@@ -274,7 +278,7 @@ const countWaitAudit = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* [已用courseAudit中的hrbpAuditList替换]
|
* [已用courseAudit中的hrbpAuditList替换]
|
||||||
* 当前用户需要审核的课程列表
|
* 当前用户需要审核的课程列表
|
||||||
* @param {Object} query 同pageList
|
* @param {Object} query 同pageList
|
||||||
*/
|
*/
|
||||||
@@ -283,9 +287,9 @@ const auditList = function(query) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【已移到courseAudit中】
|
* 【已移到courseAudit中】
|
||||||
* 教师需要审核的课程列表
|
* 教师需要审核的课程列表
|
||||||
*/
|
*/
|
||||||
const teacherAuditList = function(query) {
|
const teacherAuditList = function(query) {
|
||||||
return ajax.post('/xboe/m/course/audit/teacher-course', query);
|
return ajax.post('/xboe/m/course/audit/teacher-course', query);
|
||||||
@@ -446,6 +450,7 @@ export default {
|
|||||||
findUpdateLogs,
|
findUpdateLogs,
|
||||||
getUpdateLog,
|
getUpdateLog,
|
||||||
detail,
|
detail,
|
||||||
|
getDictIds,
|
||||||
saveContent,
|
saveContent,
|
||||||
pageList,
|
pageList,
|
||||||
setEnabled,
|
setEnabled,
|
||||||
|
|||||||
@@ -575,6 +575,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.getDictIds();
|
||||||
let extendFlag=this.$route.query.f; //是否是管理端过来的
|
let extendFlag=this.$route.query.f; //是否是管理端过来的
|
||||||
this.extendRefId=this.$route.query.refId;
|
this.extendRefId=this.$route.query.refId;
|
||||||
this.extendRefType=this.$route.query.refType;
|
this.extendRefType=this.$route.query.refType;
|
||||||
@@ -605,16 +606,8 @@ export default {
|
|||||||
this.isPermission = false;
|
this.isPermission = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log("--- dicts = ",this.dicts)
|
||||||
this.isPermission = this.dicts.includes(orgId);
|
this.isPermission = this.dicts.includes(orgId);
|
||||||
/*if(this.isPermission && !this.courseInfo && !this.courseInfo.device){
|
|
||||||
this.courseInfo.device = 4;
|
|
||||||
}else{
|
|
||||||
if(!this.courseInfo && !this.courseInfo.device){
|
|
||||||
return;
|
|
||||||
}else{
|
|
||||||
this.courseInfo.device = 3;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
console.log("--- 监听结束 this.isPermission = ",this.isPermission)
|
console.log("--- 监听结束 this.isPermission = ",this.isPermission)
|
||||||
},
|
},
|
||||||
// 关键字的更改
|
// 关键字的更改
|
||||||
@@ -921,6 +914,20 @@ export default {
|
|||||||
this.courseCoverurl = '';
|
this.courseCoverurl = '';
|
||||||
this.courseInfo.coverImg = '';
|
this.courseInfo.coverImg = '';
|
||||||
},
|
},
|
||||||
|
//获取字典信息
|
||||||
|
async getDictIds() {
|
||||||
|
console.log("--- 获取字典信息 1 = ", this.dicts);
|
||||||
|
try {
|
||||||
|
const response = await apiCourse.getDictIds(637, 1); // 确保返回 Promise
|
||||||
|
console.log("--- 获取字典信息 2 result= ", response);
|
||||||
|
if (response.status === 200) {
|
||||||
|
this.dicts = response.result.dicts; // 正确提取 dicts
|
||||||
|
console.log("--- 获取字典信息 3 = ", this.dicts);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("获取字典信息失败:", error);
|
||||||
|
}
|
||||||
|
},
|
||||||
//获取课程信息
|
//获取课程信息
|
||||||
async getDetail(id) {
|
async getDetail(id) {
|
||||||
this.curCourseId = id;
|
this.curCourseId = id;
|
||||||
|
|||||||
Reference in New Issue
Block a user