mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-07 01:46:42 +08:00
仅内网可见-管理员端
This commit is contained in:
@@ -491,6 +491,7 @@ export default {
|
||||
},
|
||||
visibleShow:false,
|
||||
isPermission:false,
|
||||
dicts:[],
|
||||
extendRefId:'',
|
||||
extendRefType:'',
|
||||
courseTeachers: [], //课程的老师
|
||||
@@ -558,6 +559,7 @@ export default {
|
||||
handler(newVal) {
|
||||
//需要保存
|
||||
this.requireSaveCourse = true;
|
||||
this.checkOrgPermission(newVal.orgId);
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
@@ -584,6 +586,14 @@ export default {
|
||||
this.loadUserGroup();
|
||||
},
|
||||
methods: {
|
||||
// 检查机构权限
|
||||
checkOrgPermission(orgId) {
|
||||
if (!orgId) {
|
||||
this.isPermission = false;
|
||||
return;
|
||||
}
|
||||
this.isPermission = this.dicts.includes(orgId);
|
||||
},
|
||||
// 关键字的更改
|
||||
changeKeywords(option){
|
||||
if(option.target.value){
|
||||
@@ -892,6 +902,7 @@ export default {
|
||||
async getDetail(id) {
|
||||
this.curCourseId = id;
|
||||
this.orgName='';
|
||||
this.isPermission = false;
|
||||
let $this = this;
|
||||
try {
|
||||
const { result, status } = await apiCourse.detail(id);
|
||||
@@ -910,6 +921,7 @@ export default {
|
||||
this.sectionInfo.list = result.sections;
|
||||
this.courseTeachers = result.teachers; //课程的老师信息
|
||||
this.isPermission = result.teachers; //课程的老师信息
|
||||
this.dicts = result.dicts; //课程的老师信息
|
||||
|
||||
if(!this.courseInfo.orgId){
|
||||
//根据课程创建者获取机构id
|
||||
|
||||
Reference in New Issue
Block a user