课程审核时显示的机构名称,也需要从新的用户系统接口中获取名称显示,根据id

This commit is contained in:
daihh
2022-12-09 18:49:21 +08:00
parent f9176e3f6b
commit 0368239ce8
2 changed files with 51 additions and 20 deletions

View File

@@ -253,6 +253,7 @@ import apiCourseFile from '@/api/modules/courseFile.js';
import filecloud from '@/components/FileCloud/index.vue'; import filecloud from '@/components/FileCloud/index.vue';
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
import chooseOrg from '@/components/System/chooseOrg.vue'; import chooseOrg from '@/components/System/chooseOrg.vue';
import apiUserBasic from '../../api/boe/userbasic.js';
// import hyperLink from '@/components/Course/hyperLink.vue'; // import hyperLink from '@/components/Course/hyperLink.vue';
export default { export default {
name: "auditCourse1", name: "auditCourse1",
@@ -594,23 +595,37 @@ export default {
//加载所属机构名称 //加载所属机构名称
this.orgKid=''; this.orgKid='';
if(this.courseInfo.orgId){ if(this.courseInfo.orgId){
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{ apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rrs=>{
if(rrs.status==200){ if(rs.status==200){
this.orgName=rrs.result.name; this.orgName=rrs.result.name;
this.orgKid=rrs.result.kid; //this.orgKid=rrs.result.kid;
//this.orgNamePath=rrs.result.namePath;
} }
}) });
// apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
// if(rrs.status==200){
// this.orgName=rrs.result.name;
// this.orgKid=rrs.result.kid;
// }
// })
}else{ }else{
//根据课程创建者获取机构id //根据课程创建者获取机构id
apiUser.getOrgSimpleByUserId(this.courseInfo.sysCreateAid).then(ors=>{ apiUser.getOrgSimpleByUserId(this.courseInfo.sysCreateAid).then(ors=>{
if(ors.status==200){ if(ors.status==200){
$this.courseInfo.orgId=ors.result.id; $this.courseInfo.orgId=ors.result.id;
apiOrg.getSimple(ors.result.id).then(rrs=>{ apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
if(rrs.status==200){ if(rs.status==200){
$this.orgName=rrs.result.name; $this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid; //this.orgKid=rrs.result.kid;
//$this.orgNamePath=rrs.result.namePath;
} }
}) });
// apiOrg.getSimple(ors.result.id).then(rrs=>{
// if(rrs.status==200){
// $this.orgName=rrs.result.name;
// $this.orgKid=rrs.result.kid;
// }
// })
}else{ }else{
// //
} }

View File

@@ -292,6 +292,7 @@ import { mapGetters,mapActions} from 'vuex';
import hyperLink from '@/components/Course/hyperLink.vue'; import hyperLink from '@/components/Course/hyperLink.vue';
import apiCourseFile from '../../api/modules/courseFile.js'; import apiCourseFile from '../../api/modules/courseFile.js';
import filecloud from '@/components/FileCloud/index.vue'; import filecloud from '@/components/FileCloud/index.vue';
import apiUserBasic from '../../api/boe/userbasic.js';
export default { export default {
name:"auditCourse2", name:"auditCourse2",
components: { components: {
@@ -634,23 +635,38 @@ export default {
//加载所属机构名称 //加载所属机构名称
this.orgKid=''; this.orgKid='';
if(this.courseInfo.orgId){ if(this.courseInfo.orgId){
apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{ apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rrs=>{
if(rrs.status==200){ if(rs.status==200){
this.orgName=rrs.result.name; this.orgName=rrs.result.name;
this.orgKid=rrs.result.kid; //this.orgKid=rrs.result.kid;
//this.orgNamePath=rrs.result.namePath;
} }
}) });
// apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{
// if(rrs.status==200){
// this.orgName=rrs.result.name;
// this.orgKid=rrs.result.kid;
// }
// })
}else{ }else{
//根据课程创建者获取机构id //根据课程创建者获取机构id
apiUser.getOrgSimpleByUserId(this.courseInfo.sysCreateAid).then(ors=>{ apiUser.getOrgSimpleByUserId(this.courseInfo.sysCreateAid).then(ors=>{
if(ors.status==200){ if(ors.status==200){
$this.courseInfo.orgId=ors.result.id; $this.courseInfo.orgId=ors.result.id;
apiOrg.getSimple(ors.result.id).then(rrs=>{
if(rrs.status==200){ apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{
if(rs.status==200){
$this.orgName=rrs.result.name; $this.orgName=rrs.result.name;
$this.orgKid=rrs.result.kid; //this.orgKid=rrs.result.kid;
//$this.orgNamePath=rrs.result.namePath;
} }
}) });
// apiOrg.getSimple(ors.result.id).then(rrs=>{
// if(rrs.status==200){
// $this.orgName=rrs.result.name;
// $this.orgKid=rrs.result.kid;
// }
// })
}else{ }else{
// //
} }