增加课程查询添加受众信息

This commit is contained in:
daihh
2022-11-03 15:05:29 +08:00
parent d7d1e48426
commit e8801db141
4 changed files with 201 additions and 13 deletions

View File

@@ -255,9 +255,12 @@
import apiOldCourse from '@/api/modules/course.js'
import apiCoursePortal from '@/api/modules/coursePortal.js'
import apiUser from '@/api/system/user.js'
import apiQa from '@/api/modules/qa.js'
import {toScore} from '@/utils/tools.js'
import apiArticle from '@/api/modules/article.js'
import apiBoeCourse from '@/api/boe/course.js'
import apiUserGroup from "@/api/modules/usergroup.js";
import { mapGetters } from 'vuex'
export default{
data(){
return{
@@ -312,9 +315,33 @@
onLoad(options){
if(options.type){
this.conType=parseInt(options.type);
}else{
this.conType=1;
}
this.loadSeachWords();
//let localKey="user_"+this.userInfo.sysId+"_gids";
if(this.audiences.length==0){
//let hasIds;
// let hasIds=sessionStorage.getItem(localKey);
// if(hasIds && hasIds.length>0){
// this.audiences=hasIds.split(",");
// this.search();
// }else{
console.log(this.userInfo,'this.userInfo')
Promise.all([apiBoeCourse.audience(this.userInfo.sysId),apiUserGroup.userGroupIds()]).then(rs=>{
//console.log(rs,'rs');
let aids=[];
if(rs[0].status==200){
aids.push(rs[0].result);
}
if(rs[1].status==200){
aids.push(rs[1].result);
}
this.audiences=aids;
//sessionStorage.setItem(localKey,this.audiences);
//this.search();
})
}
//}
}
},
computed:{
@@ -526,6 +553,7 @@
},
async loadCourseData(){
uni.showLoading({title:'加载中...'});
this.course.params.keyword=this.keyword;
//查询课程
let $this=this;
let dataList = [];