diff --git a/src/views/modules/volunteer/activityArchive/realselect.vue b/src/views/modules/volunteer/activityArchive/realselect.vue index 2532608b1..56b6106f2 100644 --- a/src/views/modules/volunteer/activityArchive/realselect.vue +++ b/src/views/modules/volunteer/activityArchive/realselect.vue @@ -31,11 +31,6 @@ - {{ formData.strTime }} {{ formData.endTime }} @@ -43,7 +38,7 @@
- 不限名额
@@ -55,10 +50,10 @@ {{ formData.address }} - + {{ formData.linkman }} @@ -72,12 +67,12 @@
-
-
@@ -98,7 +93,7 @@ -
@@ -145,6 +140,7 @@ export default { data () { return { + disabled:false, loading: false, searchOptions: [], orgOptionProps: { @@ -233,15 +229,16 @@ }, components: { fileList,Tinymce,UploadImage}, async mounted () { - this.volunteerservicetype() - this.getTableData1() - this.getTableData() + await this.volunteerservicetype() + await this.getTableData1() + await this.getOrgTreeList() + await this.getTableData() // this.startLoading() // await this.loadInfo() // this.endLoading() console.log(this.list,"dsfslfjl"); - this.getOrgTreeList() + }, @@ -299,9 +296,11 @@ } requestGet(url, params).then((res) => { if (res.code == 0) { + this.formData=res.data; - this.tableDate=res.data.sponsors[0], + this.tableDate=res.data.sponsors?res.data.sponsors:{}, this.searchValue=res.data.address + console.log(this.typeList,"this.sfaafsd"); this.formData.activityImgs=[{url:res.data.imgs}] console.log(this.typeList,"this.sfaafsd"); this.typeList.list.forEach(item => { @@ -339,15 +338,7 @@ // } else { // } }, - //控制活动时间 - actcontrolTime(){ - console.log("dislfj"); - if(this.formData.strTime>this.formData.endTime){ - this.$message.error('活动结束时间不能在活动开始时间之前'); - this.formData.endTime='' - return - } - }, + //控制签到时间 controlTime(){ console.log("dislfj"); @@ -358,80 +349,7 @@ } }, //提交 - async handleComfirm() { - console.log(this.tableDate); - this.formData.sponsors.push(this.tableDate); - console.log(this.formData,"this,formD"); - if (this.formData.address == '') { - this.$message.error('请输入活动地点'); - return; - } - if (this.formData.agencyId == '') { - this.$message.error('请选择主办方'); - return; - } - if (this.formData.title == '') { - this.$message.error('请输入活动标题'); - return; - } - if (this.formData.content == '') { - this.$message.error('请输入活动详情'); - return; - } - // if (this.formData.imgs == '') { - // this.$message.error('请上传图片'); - // return; - // } - if (this.formData.strTime == '') { - this.$message.error('请填写活动开始时间'); - return; - } - if (this.formData.endTime == '') { - this.$message.error('请填写活动结束时间'); - return; - } - if (this.formData.type=='') { - this.$message.error('请填写活动和类型'); - return; - } - if (this.formData.linkman=='') { - this.$message.error('请填写联系人'); - return; - } - if (this.formData.linkMobile=='') { - this.$message.error('请填写联系电话'); - return; - } - if (this.formData.signInTime=='') { - this.$message.error('请填写签到开始时间'); - return; - } - if (this.formData.signOutTime=='') { - this.$message.error('请填写签到结束时间'); - return; - } - if (this.formData.deadline=='') { - this.$message.error('请填写报名截止时间'); - return; - } - let url="/voluntary/activityInfo/updateInfo"; - let parms={ - ...this.formData - } - console.log(parms,"parms"); - - await requestPost(url,parms).then((res)=>{ - console.log(res,"res"); - if (res.code==0) { - this.$message.success('添加成功'); - this.$emit('updateClose') - // this.$router.push({path:'/volunteer/activityArchive'}) - }else{ - this.$message.error(res.msg); - } - - }) - }, + addDomain() { console.log(this.formData.sponsors,this.tableDate,); this.formData.sponsors.push(this.tableDate);