diff --git a/src/views/modules/communityParty/activity/eventDetails.vue b/src/views/modules/communityParty/activity/eventDetails.vue index 10f7c4d4d..25825e9d8 100644 --- a/src/views/modules/communityParty/activity/eventDetails.vue +++ b/src/views/modules/communityParty/activity/eventDetails.vue @@ -8,7 +8,7 @@
活动类型:   - {{ formData.typeId || "--" }} + {{ formData.typeName || "--" }}
活动名称: @@ -206,6 +206,7 @@ export default { }, async initForm(row) { + console.log("df "); this.startLoading(); this.formData = JSON.parse(JSON.stringify(row)); this.initLoading = true; diff --git a/src/views/modules/communityParty/activity/index.vue b/src/views/modules/communityParty/activity/index.vue index 80a3d1a7a..a14761c3c 100644 --- a/src/views/modules/communityParty/activity/index.vue +++ b/src/views/modules/communityParty/activity/index.vue @@ -277,7 +277,6 @@ let { data, code, msg } = await requestPost(url, params); if (code == 0) { this.corganizerList = data; - // console.log("corganizerList",this.corganizerList) } else if (code >= 8000) { this.$message.error(msg); } @@ -286,8 +285,8 @@ const url = "/actual/base/communityActivity/page"; let params = { - pageSize: this.pageSize, - pageNo: this.pageNo, + // pageSize: this.pageSize, + //pageNo: this.pageNo, agencyId: this.agencyId, ...this.formData, }; @@ -295,50 +294,52 @@ if (code === 0) { this.total = data.total this.tableData = data.list - this.tableData.forEach((item) => { this.typeList.forEach((itemuse)=>{ if(item.typeId==itemuse.id) { item.typeName=itemuse.typeName } - }) - const currentTime = new Date(); - if (item.startTime > currentTime) { + const year = currentTime.getFullYear(); + const month = String(currentTime.getMonth() + 1).padStart(2, '0'); + const day = String(currentTime.getDate()).padStart(2, '0'); + const hours = String(currentTime.getHours()).padStart(2, '0'); + const minutes = String(currentTime.getMinutes()).padStart(2, '0'); + const seconds = String(currentTime.getSeconds()).padStart(2, '0'); + let currentTime1 = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; + if (item.startTime > currentTime1) { if( item.status === 0 ){ return }else{ - item.status = 0 - this.formData = item; - this.updatetow() + // item.status = 0 + // this.formData = item; + // this.updatetow() } - } else if (item.startTime < currentTime && item.endTime > currentTime) { + } else if (item.startTime < currentTime1 && item.endTime > currentTime1) { if( item.status === 1 ){ return }else{ - item.status = 1 - this.formData = item; - this.updatetow() + // item.status = 1 + // this.formData = item; + // this.updatetow() } } else { if (item.status = 2) { return } else { - item.status = 2 - this.formData = item; - this.updatetow() + // item.status = 2 + // this.formData = item; + // this.updatetow() } } }); - } else { this.$message.error(msg) } - console.log(this.tableData); }, async getDemandOptions() { this.$http @@ -530,9 +531,11 @@ }, async update(row) { + console.log(row); let url = '/actual/base/communityActivity/update' this.formData = row this.formData.status = 3 + console.log(this.formData,"this.formData"); const { data, code, msg, internalMsg } = await requestPost(url, this.formData) if (code === 0) { this.$message({ @@ -553,7 +556,7 @@ if (code === 0) { this.$message({ type: 'success', - // message: '操作成功' + message: '操作成功111' }) } else if (internalMsg !== '') { this.$message.error(internalMsg) diff --git a/src/views/modules/communityParty/activity/initiateActivity.vue b/src/views/modules/communityParty/activity/initiateActivity.vue index fb38a4095..885a1384c 100644 --- a/src/views/modules/communityParty/activity/initiateActivity.vue +++ b/src/views/modules/communityParty/activity/initiateActivity.vue @@ -104,7 +104,7 @@ list-type="picture-card" :limit="3"> 最多三张图片
-
+
@@ -553,6 +553,7 @@ export default { // console.log("data/actual/base/communityActivity/save",this.formData) this.$refs['ref_form'].validate((valid, messageObj) => { this.formData.sendMessage = this.formData.sendMessage ? 1 : 0; + console.log(this.formData,"2234323424") const dateObj = this.formData.startTime.split(' '); const formattedDate = dateObj[0]; // 获取日期部分,即 '2424-10-22' if(this.formData.cutOffTime != '' && formattedDate <= this.formData.cutOffTime){ diff --git a/src/views/modules/communityParty/comPromotion/add.vue b/src/views/modules/communityParty/comPromotion/add.vue index 1c9f057cf..80c492d7a 100644 --- a/src/views/modules/communityParty/comPromotion/add.vue +++ b/src/views/modules/communityParty/comPromotion/add.vue @@ -10,12 +10,12 @@ - + - + @@ -42,7 +42,7 @@ - + @@ -135,6 +135,43 @@ export default { }, methods: { + + // 获取广告标签 + advertisingTag(){ + requestPost('/advertisingTag/list',{customerId:this.customerId}).then(res=>{ + console.log(res,'res'); + + if(res.code==0){ + this.adverTagList=res.data + } + }) + }, + // 获取广告标签 + advertisingTag(){ + }, + async initForm(typeid,row) { + console.log(row,typeid,'row'); + + this.startLoading(); + this.formData = JSON.parse(JSON.stringify(row)); + this.formType=typeid + console.log(this.formData); + // console.log(this.formData,'this.formData'); + // // this.initLoading = true; + // // // console.log('this.formData,',this.formData); + + // // let { latitude, longitude } = this.$store.state.user; + // // console.log("lat" + latitude + ",lon" + longitude); + // // if (this.formData.latitude && this.formData.longitude) { + // // latitude = this.formData.latitude; + // // longitude = this.formData.longitude; + // // } + // // if (!latitude || latitude == "" || latitude == "0") { + // // latitude = 39.9088810666821; + // // longitude = 116.39743841556731; + // // } + this.endLoading(); + }, async advertisingTag () { const url = "/actual/base/advertisingTag/page" let params = { @@ -152,23 +189,21 @@ export default { this.$message.error(msg) } }, - - - - - - ///// - handleOnlineRegistration(value) { // console.log(value) if (value) { - this.formData.top = 1; - } else { this.formData.top = 0; + } else { + this.formData.top = 1; } }, onChangeFileList(e) { + this.fileList = e.length > 0 ? e.map(item => ({ + fileType: '0', + fileUrl: item.response.data.url + })) : []; // 当e为空时清空fileList + console.log(e,'e'); if (e.length > 0) { let item = e[0]; let ob = { @@ -177,7 +212,10 @@ export default { }; this.fileList = [ob]; this.formData.coverPic = ob.fileUrl; - } + }else { + this.formData.coverPic = ''; + } + }, // async initForm(type, activityId) { @@ -224,8 +262,8 @@ export default { }, async addActivity() { if (this.formType === 'edit') { - let url = '/actual/base/communityPublicity/update' + this.formData.sendMsg= this.formData.sendMsg? 1:0 const { data, code, msg } = await requestPost(url, this.formData) if (code === 0) { this.$message({ @@ -240,9 +278,11 @@ export default { this.$message.error(msg) } }else{ - console.log("this.formData",this.formData) + console.log("this.formData",this.formData) let url = '/actual/base/communityPublicity/save' - console.log(url); + console.log(this.formData,"formData"); + this.formData.sendMsg= this.formData.sendMsg? 1:0 + console.log(this.formData); const { data, code, msg } = await requestPost(url, this.formData) if (code === 0) { this.$message({ diff --git a/src/views/modules/communityParty/comPromotion/index.vue b/src/views/modules/communityParty/comPromotion/index.vue index 6cdc5b2e7..87cf54560 100644 --- a/src/views/modules/communityParty/comPromotion/index.vue +++ b/src/views/modules/communityParty/comPromotion/index.vue @@ -42,7 +42,7 @@ - + @@ -190,6 +190,13 @@ this.total = data.total this.tableData = data.list // console.log( "啊大苏打撒旦",this.tableData ) + this.tableData.forEach((item=>{ + this.adverTagList.forEach((item1)=>{ + if(item.tagId==item1.id){ + item.tagName=item1.tagName + } + }) + })) } else { this.$message.error(msg) } @@ -234,6 +241,7 @@ }) }, handleEdit (row) { + console.log(row); this.formTitle = '修改' this.formShow = true this.$nextTick(() => {