mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
修改课程编辑资源归属为空的情况的处理,适应老课程的处理
This commit is contained in:
@@ -62,11 +62,16 @@ const detail = function(id) {
|
||||
return ajax.get('/xboe/sys/user/detail?id='+id);
|
||||
}
|
||||
|
||||
const getOrgSimpleByUserId = function(id) {
|
||||
return ajax.get('/xboe/sys/user/org/org-byuserid?userId='+id);
|
||||
}
|
||||
|
||||
export default{
|
||||
list,
|
||||
searchLoginName,
|
||||
getByIds,
|
||||
getByLoginName,
|
||||
findByName,
|
||||
detail
|
||||
detail,
|
||||
getOrgSimpleByUserId
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
@@ -779,11 +780,23 @@ export default {
|
||||
this.courseTeachers = result.teachers; //课程的老师信息
|
||||
|
||||
if(!this.courseInfo.orgId){
|
||||
this.courseInfo.orgId=this.userInfo.departId;
|
||||
//根据课程创建者获取机构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;
|
||||
}
|
||||
//$this.orgKid='';
|
||||
if($this.courseInfo.orgId){
|
||||
apiOrg.getSimple($this.courseInfo.orgId).then(rrs=>{
|
||||
})
|
||||
}else{
|
||||
//
|
||||
}
|
||||
})
|
||||
|
||||
}else{
|
||||
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
||||
if(rrs.status==200){
|
||||
$this.orgName=rrs.result.name;
|
||||
$this.orgKid=rrs.result.kid;
|
||||
|
||||
Reference in New Issue
Block a user