任务修改

This commit is contained in:
daihh
2023-03-01 17:32:54 +08:00
parent 34f16c6c0a
commit b0b477bb0e
2 changed files with 50 additions and 50 deletions

View File

@@ -80,24 +80,24 @@ const user = {
}) })
}, },
refrashStudyTaskCount({ commit }) { refrashStudyTaskCount({ commit }) {
apiManage.getTaskNum().then(res=>{ // apiManage.getTaskNum().then(res=>{
if(res.code==200){ // if(res.code==200){
commit('SET_StudyTaskCount',res.data.todoTaskCounts); // commit('SET_StudyTaskCount',res.data.todoTaskCounts);
}else{
console.log("获取学习任务数失败:"+res.msg);
}
})
// apiBoeCourse.cmtaskList({page:1,size:1,get_count:1}).then(res=>{
// if(res.status==200){
// let count = 0;
// if(res.result.count > 0){
// count = res.result.count;
// }
// commit('SET_StudyTaskCount',count);
// }else{ // }else{
// console.log("取学习任务数失败:"+res.message); // console.log("取学习任务数失败:"+res.msg);
// } // }
// }) // })
apiBoeCourse.cmtaskList({page:1,size:1,get_count:1}).then(res=>{
if(res.status==200){
let count = 0;
if(res.result.count > 0){
count = res.result.count;
}
commit('SET_StudyTaskCount',count);
}else{
console.log("读取学习任务数失败:"+res.message);
}
})
}, },
//设置用户身份 //设置用户身份
SetIdentity({ commit }, iden) { SetIdentity({ commit }, iden) {

View File

@@ -122,17 +122,17 @@ export default {
methods: { methods: {
jumpRouter(item) { jumpRouter(item) {
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`,'_self' ) //window.open(`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`,'_self')
let urlPre=window.location.protocol+'//'+window.location.host; location.href=`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`;
//location.href=`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`;
if(item.cmtask_type==1){ //学习路径图
//let params=encodeURIComponent('projectId='+courseId);
//this.$router.push('/forward?to='+studentPath+'/projectdetails&params='+params);
location.href=urlPre+'/fe-student/pathdetails?routerId='+item.cmtask_code let urlPre=window.location.protocol+'//'+window.location.host;
}else if(item.cmtask_type==2){ //学习项目 // if(item.cmtask_type==1){ //学习路径图
location.href=urlPre+'/fe-student/projectdetails?projectId='+item.cmtask_code // //let params=encodeURIComponent('projectId='+courseId);
} // //this.$router.push('/forward?to='+studentPath+'/projectdetails&params='+params);
// location.href=urlPre+'/fe-student/pathdetails?routerId='+item.cmtask_code
// }else if(item.cmtask_type==2){ //学习项目
// location.href=urlPre+'/fe-student/projectdetails?projectId='+item.cmtask_code
// }
}, },
loadBoeData() { loadBoeData() {
@@ -146,29 +146,29 @@ export default {
cmtask_name:this.params.cmtask_name, cmtask_name:this.params.cmtask_name,
} }
this.loading=true; this.loading=true;
apiManage.userTaskList(params).then(res=>{ // apiManage.userTaskList(params).then(res=>{
if(res.code==200){ // if(res.code==200){
this.total = 10; // this.total = 10;
this.couresList = res.data.records; // this.couresList = res.data.records;
}else{
this.$message.error('查询数据失败:'+res.msg);
}
this.loading=false;
}).catch(()=>{
this.loading=false;
})
// apiBoeCourse.cmtaskList(params).then(res=>{
// if(res.status==200){
// this.total = res.result.count
// this.couresList = res.result.list;
// }else{ // }else{
// this.$message.error('查询数据失败:'+res.message); // this.$message.error('查询数据失败:'+res.msg);
// } // }
// this.loading=false; // this.loading=false;
// }).catch(()=>{ // }).catch(()=>{
// this.loading=false; // this.loading=false;
// }) // })
apiBoeCourse.cmtaskList(params).then(res=>{
if(res.status==200){
this.total = res.result.count
this.couresList = res.result.list;
}else{
this.$message.error('查询数据失败:'+res.message);
}
this.loading=false;
}).catch(()=>{
this.loading=false;
})
}, },
search(){ search(){
this.loadBoeData() this.loadBoeData()