mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 04:46: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);
|
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{
|
export default{
|
||||||
list,
|
list,
|
||||||
searchLoginName,
|
searchLoginName,
|
||||||
getByIds,
|
getByIds,
|
||||||
getByLoginName,
|
getByLoginName,
|
||||||
findByName,
|
findByName,
|
||||||
detail
|
detail,
|
||||||
|
getOrgSimpleByUserId
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -387,6 +387,7 @@ import apiTag from '../../api/modules/tag.js';
|
|||||||
import apiHRBP from '../../api/boe/HRBP.js';
|
import apiHRBP from '../../api/boe/HRBP.js';
|
||||||
import apiCourse from '../../api/modules/course.js';
|
import apiCourse from '../../api/modules/course.js';
|
||||||
import apiOrg from '../../api/system/organiza.js';
|
import apiOrg from '../../api/system/organiza.js';
|
||||||
|
import apiUser from '../../api/system/user.js';
|
||||||
import WxEditor from '@/components/Editor/index.vue';
|
import WxEditor from '@/components/Editor/index.vue';
|
||||||
import catalogSort from '@/components/Course/catalogSort.vue';
|
import catalogSort from '@/components/Course/catalogSort.vue';
|
||||||
import { courseType, getType } from '../../utils/tools.js';
|
import { courseType, getType } from '../../utils/tools.js';
|
||||||
@@ -779,11 +780,23 @@ export default {
|
|||||||
this.courseTeachers = result.teachers; //课程的老师信息
|
this.courseTeachers = result.teachers; //课程的老师信息
|
||||||
|
|
||||||
if(!this.courseInfo.orgId){
|
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){
|
}else{
|
||||||
apiOrg.getSimple($this.courseInfo.orgId).then(rrs=>{
|
//
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
}else{
|
||||||
|
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
|
||||||
if(rrs.status==200){
|
if(rrs.status==200){
|
||||||
$this.orgName=rrs.result.name;
|
$this.orgName=rrs.result.name;
|
||||||
$this.orgKid=rrs.result.kid;
|
$this.orgKid=rrs.result.kid;
|
||||||
|
|||||||
Reference in New Issue
Block a user