Merge remote-tracking branch '121-git/master-0720-lyc' into master-0720-lyc

This commit is contained in:
joshen
2025-08-02 15:14:05 +08:00
2 changed files with 26 additions and 14 deletions

View File

@@ -4,6 +4,7 @@
* *
**/ **/
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}`);
}
/** /**
* 更新内容的名称 * 更新内容的名称
@@ -446,6 +450,7 @@ export default {
findUpdateLogs, findUpdateLogs,
getUpdateLog, getUpdateLog,
detail, detail,
getDictIds,
saveContent, saveContent,
pageList, pageList,
setEnabled, setEnabled,

View File

@@ -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;