个人中心临时修改,后期优化

This commit is contained in:
zhangsir
2024-09-19 16:55:26 +08:00
parent 5119aadf66
commit fa044187bc
3 changed files with 70 additions and 149 deletions

View File

@@ -198,56 +198,56 @@ export default {
cmtask_name:this.params.cmtask_name,
}
this.loading=true;
// if(this.isType == 1){
// //领导力必修
// apiManage.leadership(params).then(res=>{
// if(res.code==200){
// this.total =parseInt(res.data.total);
// this.couresList = res.data.records;
// }else{
// this.$message.error('查询数据失败:'+res.msg);
// }
// this.loading=false;
// }).catch(()=>{
// this.loading=false;
// })
// }else if (this.isType == 2){
// //定制化学习
// apiManage.compulsoryList(params).then(res=>{
// if(res.code==200){
// this.total =parseInt(res.data.total);
// this.couresList = res.data.records;
// }else{
// this.$message.error('查询数据失败:'+res.msg);
// }
// this.loading=false;
// }).catch(()=>{
// this.loading=false;
// })
// }else{
// apiManage.leadership(params).then(res=>{
// if(res.code==200){
// this.total =parseInt(res.data.total);
// this.couresList = res.data.records;
// }else{
// this.$message.error('查询数据失败:'+res.msg);
// }
// this.loading=false;
// }).catch(()=>{
// this.loading=false;
// })
// // apiManage.userTaskList(params).then(res=>{
// // if(res.code==200){
// // this.total =parseInt(res.data.total);
// // this.couresList = res.data.records;
// // }else{
// // this.$message.error('查询数据失败:'+res.msg);
// // }
// // this.loading=false;
// // }).catch(()=>{
// // this.loading=false;
// // })
// }
if(this.isType == 1){
//领导力必修
apiManage.leadership(params).then(res=>{
if(res.code==200){
this.total =parseInt(res.data.total);
this.couresList = res.data.records;
}else{
this.$message.error('查询数据失败:'+res.msg);
}
this.loading=false;
}).catch(()=>{
this.loading=false;
})
}else if (this.isType == 2){
//定制化学习
apiManage.compulsoryList(params).then(res=>{
if(res.code==200){
this.total =parseInt(res.data.total);
this.couresList = res.data.records;
}else{
this.$message.error('查询数据失败:'+res.msg);
}
this.loading=false;
}).catch(()=>{
this.loading=false;
})
}else{
apiManage.leadership(params).then(res=>{
if(res.code==200){
this.total =parseInt(res.data.total);
this.couresList = res.data.records;
}else{
this.$message.error('查询数据失败:'+res.msg);
}
this.loading=false;
}).catch(()=>{
this.loading=false;
})
// apiManage.userTaskList(params).then(res=>{
// if(res.code==200){
// this.total =parseInt(res.data.total);
// this.couresList = res.data.records;
// }else{
// this.$message.error('查询数据失败:'+res.msg);
// }
// this.loading=false;
// }).catch(()=>{
// this.loading=false;
// })
}
},
search(){
this.page=1;