大项目实际应用可能分几个子项目进行开发,比如HR平台,主项目需要调用子项目的准员工的身份信息
create(){
const query=this.$route.query
this.bacthNo=query.bacth;
if(!this.bacthNo){
this.$message.error('无效的报告')
}else{
this.getBasicInfo();
this.getStart()
this.dealApis();
}
this.getBasicInfo();
this.getStart();
this.dealApis();
}
methods:{
getStart(bacthNo='2323'){
const url=URL.start;
this.$axios.post(url,{"batchNo":batchNo}).then((res)=>{const result=res.data.data; this.apisAndNos=result;}).catch((err)=>{})
},
dealApis(){
this.apisAndNos={
EduDegree:{
id:5001
},
Blacklist:{
id:5001
} ,
.............
} ;
for(var key in this.apisAndNos){
if(this.apiAndNos.hasOwnProperty(key)){
const showFlag=`show${key}`;
const api=`get${key}`;
this[showFlag]=true;
const fun =this[api];
fun();//有的话,执行API
}
}
},
getBasicInfo(taskId=10001){
const url=URL.candidateBasicInfo;
this.$axios.post(url,{"taskId":taskId}).then((res)=>{}).catch((error)=>{})
},
getEduDegree(taskId=10001){
const url=URL.eduDegreeinfo;
this.$axios.post(url,{"taskId":taskId}).then((res)=>{}).catch((error)=>{})
},
getBlacklist(taskId=13){
const url=URL.candidateBasicInfo;
this.$axios.post(url,{"taskId":taskId}).then((res)=>{}).catch((error)=>{})
},
}