From 904dfa5cc8cc1106d596f39f40a3d9e1903fbe09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Thu, 11 Jul 2024 16:53:12 +0800 Subject: [PATCH] bug --- .../communityParty/activity/eventDetails.vue | 10 ++- .../modules/communityParty/activity/index.vue | 3 +- .../activity/initiateActivity.vue | 61 +++++++++++++------ .../communityParty/comPromotion/event.vue | 2 +- .../communityParty/comPromotion/index.vue | 2 +- .../shequzhili/eventOld/cpts/event-info.vue | 5 -- .../shequzhili/eventOld/cpts/process-form.vue | 5 -- .../modules/shequzhili/eventOld/eventList.vue | 17 +++++- 8 files changed, 69 insertions(+), 36 deletions(-) diff --git a/src/views/modules/communityParty/activity/eventDetails.vue b/src/views/modules/communityParty/activity/eventDetails.vue index 2f192552d..977d2aed7 100644 --- a/src/views/modules/communityParty/activity/eventDetails.vue +++ b/src/views/modules/communityParty/activity/eventDetails.vue @@ -68,6 +68,14 @@ {{ formData.points || "--" }} + +
+
+ 活动人数: +   + {{ formData.participants || "--" }} +
+
活动总结: @@ -84,7 +92,7 @@
-
+
报名名单
diff --git a/src/views/modules/communityParty/activity/index.vue b/src/views/modules/communityParty/activity/index.vue index 594abf225..6ad4cfce5 100644 --- a/src/views/modules/communityParty/activity/index.vue +++ b/src/views/modules/communityParty/activity/index.vue @@ -111,7 +111,7 @@ - 活动总结 { diff --git a/src/views/modules/communityParty/activity/initiateActivity.vue b/src/views/modules/communityParty/activity/initiateActivity.vue index 88a98cd44..5bf0c1b0b 100644 --- a/src/views/modules/communityParty/activity/initiateActivity.vue +++ b/src/views/modules/communityParty/activity/initiateActivity.vue @@ -53,7 +53,7 @@
+ placeholder="请输入活动内容" /> + placeholder="请输入活动总结" @input="validateContent"/>
@@ -153,8 +153,8 @@
取 消 确 - 定 + @click="handleComfirm">确 定 +
@@ -233,7 +233,9 @@ export default { customerId: localStorage.getItem('customerId'), } + }, + components: { Tinymce, UploadImage }, mounted() { this.activityType() @@ -241,6 +243,20 @@ export default { }, methods: { + validateContent() { + console.log("dfs g"); + // 使用正则表达式去除HTML标签后检查内容 + const textContent = this.stripHtml(this.formData.sumUp); + if (textContent.trim() === '') { + this.formData.sumUp = null; + } + }, + stripHtml(html) { + const div = document.createElement('div'); + div.innerHTML = html; + return div.textContent || div.innerText || ''; + }, + // 上传成功 handleImgSuccess(res, file, fileList) { if (res.code === 0 && res.msg === 'success') { @@ -335,6 +351,16 @@ export default { } else { this.$message.error(msg) } + this.$nextTick(() => { + if (!map) { + this.initMap(this.formData.latitude, this.formData.longitude); + console.log("map", map,this.formData.latitude, this.formData.longitude) + } else { + map.setCenter(this.formData.latitude, this.formData.longitude); + map.setMarker(this.formData.latitude, this.formData.longitude); + console.log("mapmapmap", map) + } + }) }, handleOnlineRegistration(value) { @@ -414,8 +440,8 @@ export default { console.log(startTimeArray); const endTimeArray = util.dateFormatter(time[1], 'time').split('-') console.log(endTimeArray); - this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + ' 00:00:00' - this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] + ' 23:59:59' + this.formData.startTime = startTimeArray[0] + '-' + startTimeArray[1] + '-' + startTimeArray[2] + this.formData.endTime = endTimeArray[0] + '-' + endTimeArray[1] + '-' + endTimeArray[2] // this.startTimeShow = startTimeArray[0] + '年' + startTimeArray[1] + '月' + startTimeArray[2] + '日' // this.endTimeShow = endTimeArray[0] + '年' + endTimeArray[1] + '月' + endTimeArray[2] + '日' } else { @@ -427,16 +453,7 @@ export default { async initForm(type, activityId) { this.startLoading() console.log("啊实打实的", type, activityId) - this.$nextTick(() => { - if (!map) { - this.initMap(this.formData.latitude, this.formData.longitude); - console.log("map", map) - } else { - map.setCenter(this.formData.latitude, this.formData.longitude); - map.setMarker(this.formData.latitude, this.formData.longitude); - console.log("mapmapmap", map) - } - }) + console.log(map); this.formType = type if (type === 'edit') { if (activityId.activityImgs || activityId.sumUp) { @@ -479,6 +496,7 @@ export default { if (res.code !== 0) { return this.$message.error(res.msg); } else { + console.log(res.data); this.demandOptions = this.getFlagData( this.getTreeData(res.data), "usableFlag" @@ -566,8 +584,9 @@ export default { 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' + const dateObj = this.formData.startTime; + console.log(dateObj); + const formattedDate = dateObj; // 获取日期部分,即 '2424-10-22' if (this.formData.cutOffTime != '' && formattedDate <= this.formData.cutOffTime) { this.$message.error('报名截止时间要小于活动开始时间') } else if (!valid) { @@ -623,7 +642,7 @@ export default { // 地图初始化函数,本例取名为init,开发者可根据实际情况定义 initMap(latitude, longitude) { - + console.log(latitude, longitude,"564564568"); map = new daiMap( document.getElementById("app_activity"), { latitude, longitude }, @@ -632,7 +651,7 @@ export default { pitch: 43.5, // 设置俯仰角 rotation: 45, // 设置地图旋转角度 } - ); + ); // 监听地图平移结束 /* map.on("dragend", (e) => { @@ -742,6 +761,8 @@ export default { // longitude: null, //经度 // latitude: null//纬度 } + map="" + }, // 开启加载动画 diff --git a/src/views/modules/communityParty/comPromotion/event.vue b/src/views/modules/communityParty/comPromotion/event.vue index 1cf3ed53e..b1fff7124 100644 --- a/src/views/modules/communityParty/comPromotion/event.vue +++ b/src/views/modules/communityParty/comPromotion/event.vue @@ -41,7 +41,7 @@
是否置顶:   - +
diff --git a/src/views/modules/communityParty/comPromotion/index.vue b/src/views/modules/communityParty/comPromotion/index.vue index 8b0f55ab4..898067d08 100644 --- a/src/views/modules/communityParty/comPromotion/index.vue +++ b/src/views/modules/communityParty/comPromotion/index.vue @@ -59,7 +59,7 @@ diff --git a/src/views/modules/shequzhili/eventOld/cpts/event-info.vue b/src/views/modules/shequzhili/eventOld/cpts/event-info.vue index c7ac8c95a..06d5258d2 100644 --- a/src/views/modules/shequzhili/eventOld/cpts/event-info.vue +++ b/src/views/modules/shequzhili/eventOld/cpts/event-info.vue @@ -529,11 +529,7 @@ export default { }, async handelDispose() { - console.log(this.formData.operationType); - console.log(this.formData.openFlag); this.$refs.ref_processinfo_dispose.getProcessInfo(); - console.log(this.$refs.ref_processinfo_dispose.formData.openFlag,"sdf dsf sf sdf "); - this.openFlag=this.$refs.ref_processinfo_dispose.formData.openFlag; if (this.$refs.ref_processinfo_dispose.okflag) { this.formData.operationType = this.$refs.ref_processinfo_dispose.operationType; if (this.formData.operationType === "0" || this.formData.operationType === '5' @@ -591,7 +587,6 @@ export default { } }, async submitDispose(url, params) { - params.openFlag=this.openFlag=this.$refs.ref_processinfo_dispose.formData.openFlag?1:0; console.log(params); const { data, code, msg } = await requestPost(url, { ...params, diff --git a/src/views/modules/shequzhili/eventOld/cpts/process-form.vue b/src/views/modules/shequzhili/eventOld/cpts/process-form.vue index 4908faff1..634d43b39 100644 --- a/src/views/modules/shequzhili/eventOld/cpts/process-form.vue +++ b/src/views/modules/shequzhili/eventOld/cpts/process-form.vue @@ -11,13 +11,8 @@ 指派 完成并回复 转服务 - 公开讨论 - - -
- + @@ -638,7 +640,18 @@ export default { this.handleClose(); this.getTableData(); }, - + async handleVote(row){ + const url = "/governance/icEventOld/reply"; + let params = { + conten:row.eventContent, + icEventId:row.icEventId, + openFlag:row.openFlag==1?0:1, + operationType:"operationType" + } + + const { data, code, msg } = await requestPost(url, params); + console.log(data); + }, async handleDel(rowData) { let message = "确认删除?"; this.$confirm(message, "提示", {