|
@@ -2,7 +2,7 @@
|
|
|
<!-- 项目立项申请 -->
|
|
|
<div id="MakerSpaceApply" v-loading="loading">
|
|
|
<div class="pAHeader">
|
|
|
- <div class="pAHeader1">创客空间项目申请</div>
|
|
|
+ <div class="pAHeader1">创客空间申请</div>
|
|
|
</div>
|
|
|
<hr>
|
|
|
<MakerSpaceWord :wordData="wordData"/>
|
|
@@ -148,15 +148,16 @@
|
|
|
}else{
|
|
|
let num = 0;
|
|
|
this.wordData[i].forEach(item=>{
|
|
|
- for(let j in item){
|
|
|
- if(cEmpty.test(item[j])){
|
|
|
- num++;
|
|
|
- }
|
|
|
- }
|
|
|
+ if(cEmpty.test(item['name']))num++;
|
|
|
+ // for(let j in item){
|
|
|
+ // if(cEmpty.test(item[j])){
|
|
|
+ // num++;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
|
|
|
})
|
|
|
if(num>0){
|
|
|
- this.$message.error("请填完教师信息");
|
|
|
+ this.$message.error("教师姓名请不要留空");
|
|
|
document.querySelector('#five').scrollIntoView({ behavior: "smooth" });
|
|
|
return false;
|
|
|
}
|
|
@@ -171,88 +172,96 @@
|
|
|
}else{
|
|
|
let num = 0;
|
|
|
this.wordData[i].forEach(item=>{
|
|
|
- for(let j in item){
|
|
|
- if(cEmpty.test(item[j])){
|
|
|
- num++;
|
|
|
- }
|
|
|
- }
|
|
|
+ if(cEmpty.test(item['name']))num++;
|
|
|
+ // for(let j in item){
|
|
|
+ // if(cEmpty.test(item[j])){
|
|
|
+ // num++;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
})
|
|
|
if(num>0){
|
|
|
- this.$message.error("请填完学生信息");
|
|
|
+ this.$message.error("学生姓名请不要留空");
|
|
|
document.querySelector('#six').scrollIntoView({ behavior: "smooth" });
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
- case "brief":
|
|
|
- if(cEmpty.test(this.wordData[i])){
|
|
|
- this.$message.error("请填写项目简介");
|
|
|
- document.querySelector('#seven').scrollIntoView({ behavior: "smooth" });
|
|
|
- return false;
|
|
|
- }else{
|
|
|
- if(this.wordData[i].length<200||this.wordData>300){
|
|
|
- this.$message.error("项目简介需要200-300字")
|
|
|
- document.querySelector('#seven').scrollIntoView({ behavior: "smooth" });
|
|
|
- return false;
|
|
|
+ case 'fund':
|
|
|
+ if(this.wordData['fund']['total']==0){
|
|
|
+ // console.log(document.querySelector('#fund'))
|
|
|
+ document.querySelector('#fund').scrollIntoView({ behavior: "smooth" });
|
|
|
+ return this.$message.error('请输入预算经费');
|
|
|
}
|
|
|
- }
|
|
|
- break;
|
|
|
- case "Construction":
|
|
|
- if(cEmpty.test(this.wordData[i])){
|
|
|
- this.$message.error("请填写建设内容");
|
|
|
- document.querySelector('#eight').scrollIntoView({ behavior: "smooth" });
|
|
|
- return false;
|
|
|
- }
|
|
|
- break;
|
|
|
- case "ProjectBasis":
|
|
|
- if(cEmpty.test(this.wordData[i])){
|
|
|
- this.$message.error("请填写立项依据");
|
|
|
- document.querySelector('#nine').scrollIntoView({ behavior: "smooth" });
|
|
|
- return false;
|
|
|
- }
|
|
|
- break;
|
|
|
- case "development":
|
|
|
- if(cEmpty.test(this.wordData[i])){
|
|
|
- this.$message.error("请填写创客空间物理环境、制度建设及软件设施建设情况");
|
|
|
- document.querySelector('#ten').scrollIntoView({ behavior: "smooth" });
|
|
|
- return false;
|
|
|
- }
|
|
|
- break;
|
|
|
- case "studio":
|
|
|
- if(cEmpty.test(this.wordData[i])){
|
|
|
- this.$message.error("请填写学生创客工作室建设情况");
|
|
|
- document.querySelector('#eleven').scrollIntoView({ behavior: "smooth" });
|
|
|
- return false;
|
|
|
- }
|
|
|
- break;
|
|
|
- case "studentTeam":
|
|
|
- if(cEmpty.test(this.wordData[i])){
|
|
|
- this.$message.error("请填写学生创客团队(人才)培养预期成果、数量");
|
|
|
- document.querySelector('#twelve').scrollIntoView({ behavior: "smooth" });
|
|
|
- return false;
|
|
|
- }
|
|
|
- break;
|
|
|
- case "studentActivities":
|
|
|
- if(cEmpty.test(this.wordData[i])){
|
|
|
- this.$message.error("请填写学生创客活动组织实施情况");
|
|
|
- document.querySelector('#thirteen').scrollIntoView({ behavior: "smooth" });
|
|
|
- return false;
|
|
|
- }
|
|
|
- break;
|
|
|
- case "Transforming":
|
|
|
- if(cEmpty.test(this.wordData[i])){
|
|
|
- this.$message.error("请填写学生创客团队孵化、转化创业项目情况");
|
|
|
- document.querySelector('#fourteen').scrollIntoView({ behavior: "smooth" });
|
|
|
- return false;
|
|
|
- }
|
|
|
- break;
|
|
|
- case "condition":
|
|
|
- if(cEmpty.test(this.wordData[i])){
|
|
|
- this.$message.error("请填写基础条件");
|
|
|
- document.querySelector('#fifteen').scrollIntoView({ behavior: "smooth" });
|
|
|
- return false;
|
|
|
- }
|
|
|
- break
|
|
|
+ break;
|
|
|
+ // case "brief":
|
|
|
+ // if(cEmpty.test(this.wordData[i])){
|
|
|
+ // this.$message.error("请填写项目简介");
|
|
|
+ // document.querySelector('#seven').scrollIntoView({ behavior: "smooth" });
|
|
|
+ // return false;
|
|
|
+ // }else{
|
|
|
+ // if(this.wordData[i].length<200||this.wordData>300){
|
|
|
+ // this.$message.error("项目简介需要200-300字")
|
|
|
+ // document.querySelector('#seven').scrollIntoView({ behavior: "smooth" });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "Construction":
|
|
|
+ // if(cEmpty.test(this.wordData[i])){
|
|
|
+ // this.$message.error("请填写建设内容");
|
|
|
+ // document.querySelector('#eight').scrollIntoView({ behavior: "smooth" });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "ProjectBasis":
|
|
|
+ // if(cEmpty.test(this.wordData[i])){
|
|
|
+ // this.$message.error("请填写立项依据");
|
|
|
+ // document.querySelector('#nine').scrollIntoView({ behavior: "smooth" });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "development":
|
|
|
+ // if(cEmpty.test(this.wordData[i])){
|
|
|
+ // this.$message.error("请填写创客空间物理环境、制度建设及软件设施建设情况");
|
|
|
+ // document.querySelector('#ten').scrollIntoView({ behavior: "smooth" });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "studio":
|
|
|
+ // if(cEmpty.test(this.wordData[i])){
|
|
|
+ // this.$message.error("请填写学生创客工作室建设情况");
|
|
|
+ // document.querySelector('#eleven').scrollIntoView({ behavior: "smooth" });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "studentTeam":
|
|
|
+ // if(cEmpty.test(this.wordData[i])){
|
|
|
+ // this.$message.error("请填写学生创客团队(人才)培养预期成果、数量");
|
|
|
+ // document.querySelector('#twelve').scrollIntoView({ behavior: "smooth" });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "studentActivities":
|
|
|
+ // if(cEmpty.test(this.wordData[i])){
|
|
|
+ // this.$message.error("请填写学生创客活动组织实施情况");
|
|
|
+ // document.querySelector('#thirteen').scrollIntoView({ behavior: "smooth" });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "Transforming":
|
|
|
+ // if(cEmpty.test(this.wordData[i])){
|
|
|
+ // this.$message.error("请填写学生创客团队孵化、转化创业项目情况");
|
|
|
+ // document.querySelector('#fourteen').scrollIntoView({ behavior: "smooth" });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // break;
|
|
|
+ // case "condition":
|
|
|
+ // if(cEmpty.test(this.wordData[i])){
|
|
|
+ // this.$message.error("请填写基础条件");
|
|
|
+ // document.querySelector('#fifteen').scrollIntoView({ behavior: "smooth" });
|
|
|
+ // return false;
|
|
|
+ // }
|
|
|
+ // break
|
|
|
}
|
|
|
}
|
|
|
this.submitHint = true;
|
|
@@ -292,6 +301,8 @@
|
|
|
console.log(result)
|
|
|
if(result['data']==1){
|
|
|
this.$message.success("项目提交成功");
|
|
|
+ //提交项目成功,查看sessionStore是否有数据,有则删
|
|
|
+ if(sessionStorage.getItem("MakerSpaceApplyData"))sessionStorage.removeItem('MakerSpaceApplyData');
|
|
|
this.$router.push('/projectApplication')
|
|
|
}else{
|
|
|
this.$message.error("项目提交失败");
|
|
@@ -305,8 +316,14 @@
|
|
|
mounted(){ //跳转到此页面立刻获取数据
|
|
|
// this.getData(); //获取表格数据
|
|
|
// this.applyProject();
|
|
|
+ //判断,如果sessionStore里有MakerSpaceApplyData这个字段,则存到this.wordData里
|
|
|
+ if(sessionStorage.getItem('MakerSpaceApplyData'))this.wordData = JSON.parse(sessionStorage.getItem('MakerSpaceApplyData'))
|
|
|
+ },
|
|
|
+ beforeRouteLeave (to, from, next) {
|
|
|
+ //判断,如果还没提交然后切换页面了,则把数据存到sessionStore里;
|
|
|
+ if(!this.submitHint)sessionStorage.setItem('MakerSpaceApplyData',JSON.stringify(this.wordData));
|
|
|
+ next();
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
</script>
|
|
|
|