修改课程编辑资源归属为空的情况的处理,适应老课程的处理

This commit is contained in:
daihh
2022-09-08 18:44:18 +08:00
parent 94e559fd57
commit 54f35ff4f2
2 changed files with 37 additions and 19 deletions

View File

@@ -387,6 +387,7 @@ import apiTag from '../../api/modules/tag.js';
import apiHRBP from '../../api/boe/HRBP.js';
import apiCourse from '../../api/modules/course.js';
import apiOrg from '../../api/system/organiza.js';
import apiUser from '../../api/system/user.js';
import WxEditor from '@/components/Editor/index.vue';
import catalogSort from '@/components/Course/catalogSort.vue';
import { courseType, getType } from '../../utils/tools.js';
@@ -777,20 +778,32 @@ export default {
this.contentInfo.list = result.contents;
this.sectionInfo.list = result.sections;
this.courseTeachers = result.teachers; //课程的老师信息
if(!this.courseInfo.orgId){
this.courseInfo.orgId=this.userInfo.departId;
}
//$this.orgKid='';
if($this.courseInfo.orgId){
apiOrg.getSimple($this.courseInfo.orgId).then(rrs=>{
//根据课程创建者获取机构id
apiUser.getOrgSimpleByUserId(result.course.sysCreateAid).then(ors=>{
if(ors.status==200){
$this.courseInfo.orgId=ors.result.id;
apiOrg.getSimple(ors.result.id).then(rrs=>{
if(rrs.status==200){
$this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid;
}
})
}else{
//
}
})
}else{
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
if(rrs.status==200){
$this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid;
}
})
}
this.resOwnerArray=[];
if (result.course.resOwner1 == '') {
this.resOwnerArray.push(result.course.resOwner1);