|
@@ -43,9 +43,32 @@ import makerActvityApply2 from './makerActvityApply2.vue';
|
|
this.status--
|
|
this.status--
|
|
},
|
|
},
|
|
submit(){
|
|
submit(){
|
|
- let data = {...this.makerActvityApplyData.select,...this.makerActvityApply2Data}
|
|
|
|
- console.log(data);
|
|
|
|
-
|
|
|
|
|
|
+ let data1 = this.makerActvityApplyData.select;
|
|
|
|
+ let param = {
|
|
|
|
+ uid:this.$store.state.userInfo.userid,
|
|
|
|
+ tit:data1['activityName'],
|
|
|
|
+ con:data1['introduce'],
|
|
|
|
+ leader:data1['leader'],
|
|
|
|
+ teacher:JSON.stringify(data1['teacher']),
|
|
|
|
+ chapters:JSON.stringify(this.makerActvityApply2Data),
|
|
|
|
+ pid:data1['pid'],
|
|
|
|
+ cid:data1['value'],
|
|
|
|
+ phone:data1['tel'],
|
|
|
|
+ beginTime:data1['time'],
|
|
|
|
+ }
|
|
|
|
+ console.log(param)
|
|
|
|
+ this.ajax.post(this.$store.state.api+"/CreateActivity",param).then(res=>{
|
|
|
|
+ if(res.data==1){
|
|
|
|
+ this.$message({message:"创建创客活动成功!",type:"success"})
|
|
|
|
+ this.$route.push("/makerActvity")
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(`创建创客活动失败:${res.data}`);
|
|
|
|
+ }
|
|
|
|
+ console.log(res)
|
|
|
|
+ }).catch(err=>{
|
|
|
|
+ this.$message.error(err.message);
|
|
|
|
+ })
|
|
|
|
+
|
|
},
|
|
},
|
|
getAllClass(){
|
|
getAllClass(){
|
|
this.ajax.get(this.$store.state.api+"/SelectAllDepartment",{
|
|
this.ajax.get(this.$store.state.api+"/SelectAllDepartment",{
|