mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
Merge remote-tracking branch '121-git/master-0720-lyc' into master-0720-lyc
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*
|
||||
**/
|
||||
import ajax from '@/utils/xajax.js'
|
||||
import request from "../unionAjax";
|
||||
|
||||
/**
|
||||
* 保存课程基本信息,新增和更新都是此方式
|
||||
@@ -170,6 +171,9 @@ const updateContentOrders = function(cid,items) {
|
||||
const detail = function(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,
|
||||
getUpdateLog,
|
||||
detail,
|
||||
getDictIds,
|
||||
saveContent,
|
||||
pageList,
|
||||
setEnabled,
|
||||
|
||||
@@ -575,6 +575,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getDictIds();
|
||||
let extendFlag=this.$route.query.f; //是否是管理端过来的
|
||||
this.extendRefId=this.$route.query.refId;
|
||||
this.extendRefType=this.$route.query.refType;
|
||||
@@ -605,16 +606,8 @@ export default {
|
||||
this.isPermission = false;
|
||||
return;
|
||||
}
|
||||
console.log("--- dicts = ",this.dicts)
|
||||
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)
|
||||
},
|
||||
// 关键字的更改
|
||||
@@ -921,6 +914,20 @@ export default {
|
||||
this.courseCoverurl = '';
|
||||
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) {
|
||||
this.curCourseId = id;
|
||||
|
||||
Reference in New Issue
Block a user