diff --git a/src/views/modules/volunteer/Dynamicmanagement/add.vue b/src/views/modules/volunteer/Dynamicmanagement/add.vue index 5bdcdaeca..eff1d399a 100644 --- a/src/views/modules/volunteer/Dynamicmanagement/add.vue +++ b/src/views/modules/volunteer/Dynamicmanagement/add.vue @@ -7,16 +7,17 @@ class="form"> - - - - - - + + + + + + - - + @@ -29,16 +30,16 @@ - +
- +
- @@ -78,6 +79,10 @@ activityImgs: [],//活动照片 fileList:[], searchValue:"", + optionstype: [ + { value: 0, label: "消息发布" }, + { value: 1, label: "志愿风采" }, + ], ServicetypeList:[ { label: "敬老爱老", value: 1 }, { label: "助残帮困", value: 2 }, @@ -94,37 +99,14 @@ ], formData: { - Servicelevel:"",//服务等级 - VolunteerPic:"",//品牌图片 - Volunteerbrand:"",//志愿品牌 - Organizational:"",//组织介绍 - fileList: [],//封面图片 - AdministratorIDCard:"",//身份证信息 - Administratorphone:"",//管理员电话 - AdministratorName:"",//管理员姓名 - Organizationaltype:"",//组织类型 - Servicetype:"",//服务类型 - OrganizationName:"",//组织名称 - agencyName:"",//所属组织 - id: "", - typeId: "", - activityName: "",//活动名称 - status: 0,//状态 - assistingParty: "",//协办方 - startTime: "",//开始时间 - endTime: "",//结束时间 - coverPic: "",//封面图片地址 - content: "",//活动内容 - address: "",//地址 - online: 0,//开关 - cutOffTime: "",//截止时间 - points: 0,//积分 - participants: 0,//活动人数 - sendMessage: 0,//推送数 - sumUp: "",//活动总结 - activityImgs: [],//图片列表 - longitude: this.$store.state.user.longitude, //经度 - latitude: this.$store.state.user.latitude,//纬度 + columnId:'',//栏目id + coverImg:"",//封面图片 + title:"",//标题 + top:0,//置顶 + online:'',//是否上线 + releaseTime:"",//发布时间 + content:"",//内容 + }, corganizerList: [], @@ -295,9 +277,9 @@ fileUrl: item.response.data.url })) : []; // 当e为空时清空fileList if (e.length > 0) { - this.formData.coverPic = e[0].response.data.url; + this.formData.coverImg = e[0].response.data.url; } else { - this.formData.coverPic = ''; + this.formData.coverImg = ''; } }, @@ -473,51 +455,30 @@ async handleComfirm() { - - - - if (!this.formData.Administratorphone) { + if (!this.formData.content) { this.$message.error('请输入活动详情'); return; } - if (!this.formData.AdministratorName) { + if (!this.formData.coverImg) { this.$message.error('请上传封面图片'); return; } - if (!this.formData.Organizationaltype) { + if (!this.formData.title) { this.$message.error('请输入文章标题'); return; } - if (!this.formData.Servicetype) { + if (!this.formData.columnId) { this.$message.error('请输入所属项目'); return; } - - console.log(this.formData,"this.formData"); this.addActivity() }, async addActivity() { - if (this.formType === 'edit' || this.formType === 'summary') { - let url = '/actual/base/communityActivity/update' - const { data, code, msg } = await requestPost(url, this.formData) - if (code === 0) { - this.$message({ - type: 'success', - message: '操作成功' - }) - this.resetData() - this.$emit('dialogOk') - this.btnDisable = false - } else { - this.btnDisable = false - this.$message.error(msg) - } - } else { - let url = '/actual/base/communityActivity/save' + let url = '/voluntary/newsTrends/saveOrUpdate' const { data, code, msg } = await requestPost(url, this.formData) if (code === 0) { this.$message({ @@ -531,10 +492,11 @@ this.btnDisable = false this.$message.error(msg) } - } - + console.log("sdlkfjklsdf "); + this.$emit('showAddClose') + }, + - }, handleCancle() { console.log("sdlkfjklsdf "); @@ -562,14 +524,14 @@ computed: { dataRule() { return { - Servicetype: [ + columnId: [ { required: true, message: '请选择所属栏目', trigger: 'blur' } ], - zhaomu: [ + content: [ { required: true, message: '活动详情不能为空', trigger: 'blur' } ], - sumUp: [ - { required: true, message: '请填写文章标题', trigger: 'blur' } + title: [ + { required: true, message: '文章标题不能为空', trigger: 'blur' } ], fileList: [ { required: true, message: '请选择活动照片', trigger: 'blur' } diff --git a/src/views/modules/volunteer/Dynamicmanagement/edit.vue b/src/views/modules/volunteer/Dynamicmanagement/edit.vue index e38d9f1a3..c62a1abfc 100644 --- a/src/views/modules/volunteer/Dynamicmanagement/edit.vue +++ b/src/views/modules/volunteer/Dynamicmanagement/edit.vue @@ -7,21 +7,22 @@ class="form"> - - - - - - + + + + + + - - + - +