From db6b7389d524163745fb70edc6815dabd17f069e Mon Sep 17 00:00:00 2001 From: jiangyy Date: Fri, 1 Jul 2022 15:38:57 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E7=88=B1=E5=BF=83=E4=BA=92=E5=8A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../communityParty/heart/heartAudit.vue | 101 ++++-------- .../communityParty/heart/heartFinish.vue | 78 +++++----- .../communityParty/heart/heartForm.vue | 146 +++++++++++++++--- .../communityParty/heart/heartList.vue | 49 ++++-- .../communityParty/heart/heartPerson.vue | 108 ++----------- .../communityParty/heart/heartReview.vue | 104 +++++-------- 6 files changed, 275 insertions(+), 311 deletions(-) diff --git a/src/views/modules/communityParty/heart/heartAudit.vue b/src/views/modules/communityParty/heart/heartAudit.vue index 656ea08c..c8260e08 100644 --- a/src/views/modules/communityParty/heart/heartAudit.vue +++ b/src/views/modules/communityParty/heart/heartAudit.vue @@ -6,7 +6,7 @@ @click="handleReject">审核拒绝 审核通过 + @click="handleAudit('passed')">审核通过 + :show-overflow-tooltip="true" + width="150"> + min-width="120"> @@ -53,6 +54,7 @@ header-align="center" align="center" label="昵称" + :show-overflow-tooltip="true" width="120"> @@ -67,21 +69,21 @@ header-align="center" align="center" label="实际参加活动个数" - width="120"> + width="140"> + width="140"> + width="180"> { + let obj = { + type: type, + actUserRelationId: item.actUserRelationId, + rejectReason: this.cancelReason + } + + this.auditList.push(obj) + }); const url = "/heart/work/actuser/audit-user" // const url = "http://yapi.elinkservice.cn/mock/245/heart/work/actuser/audit-user" - let params = { - actId: this.actId, - type: type, - rejectReason: this.cancelReason, - actUserRelationIdList: this.actUserRelationIdList - } + let params = [...this.auditList] + + console.log(params) const { data, code, msg } = await requestPost(url, params) @@ -308,7 +279,8 @@ export default { type: "success", message: "操作成功" }); - + this.cancelReason = '' + this.cancleShow = false this.loadTable() } else { this.$message.error(msg) @@ -354,11 +326,6 @@ export default { }, props: { - - resultList: { - type: Array, - default: [] - } } } diff --git a/src/views/modules/communityParty/heart/heartFinish.vue b/src/views/modules/communityParty/heart/heartFinish.vue index 8567a5bd..0c7fc05f 100644 --- a/src/views/modules/communityParty/heart/heartFinish.vue +++ b/src/views/modules/communityParty/heart/heartFinish.vue @@ -52,7 +52,7 @@ header-align="center" align="center" label="姓名" - width="150"> + width="120"> @@ -67,7 +67,7 @@ header-align="center" align="center" label="报名时间" - width="150"> + width="180"> 0) { - data.list.forEach(item => { - if (item.signInFlag) { + arr = data.list.filter(item => item.status === 'passed') + arr.forEach(item => { + if (item.signInFlag === 'signed_in') { item.signInFlagShow = '是' item.grantPointShow = '1' item.grantPoint = true @@ -225,7 +199,7 @@ export default { }); - this.tableData = [...data.list] + this.tableData = [...arr] } else { this.tableData = [] } @@ -243,6 +217,21 @@ export default { }); return false } + let errBeforeSubmit = '' + if ( + new Date(this.formData.actualEndTime).getTime() <= + new Date(this.formData.actualStartTime).getTime() + ) { + errBeforeSubmit = "活动实际开始时间应早于活动实际结束时间"; + } + + if (errBeforeSubmit) { + this.$message({ + type: 'info', + message: errBeforeSubmit + }) + return false + } let userList = [] @@ -250,7 +239,7 @@ export default { // actUserRelationId grantPoint true:给分;false:不给分 denyRewardReason 拒绝理由 this.tableData.forEach(item => { let obj = {} - obj.actUserRelationId = item.userId + obj.actUserRelationId = item.actUserRelationId obj.denyRewardReason = item.denyRewardReason if (item.grantPointShow === '1') { @@ -272,7 +261,7 @@ export default { }); return false } else { - console.log(userList) + this.finishAct(userList) } @@ -282,15 +271,14 @@ export default { }, async finishAct (userList) { - // let url = "/heart/work/act/finish" - let url = "http://yapi.elinkservice.cn/mock/245/heart/work/act/finish" - + let url = "/heart/work/act/finish" + // let url = "http://yapi.elinkservice.cn/mock/245/heart/work/act/finish" let params = { userList: userList, ...this.formData } - + console.log(params) const { data, code, msg } = await requestPost(url, params) @@ -299,6 +287,8 @@ export default { type: "success", message: '操作成功' }); + this.$emit('finishDiaOk') + } else { this.$message.error(msg) @@ -347,6 +337,10 @@ export default { props: { + reward: { + type: Number, + default: undefined + }, actStartTime: { type: String, default: '' diff --git a/src/views/modules/communityParty/heart/heartForm.vue b/src/views/modules/communityParty/heart/heartForm.vue index edcb283a..39194f0f 100644 --- a/src/views/modules/communityParty/heart/heartForm.vue +++ b/src/views/modules/communityParty/heart/heartForm.vue @@ -14,13 +14,18 @@ - + - + (选中后报名参加活动人员可以直接审核通过) @@ -262,19 +267,53 @@ - - -

- + label-width="150px" + style="display: block"> + +
+ +

+
+
+
+
{{item.content}}
+ +
+
+
+ + +
+ +

+
+
+
+
{{item.content}}
+ +
+
@@ -366,7 +405,8 @@ export default { actQuota: undefined, actStartTime: "", actType: "heart", - auditSwitch: false, + noauditSwitch: false, + auditSwitch: true, coverPic: "", coverPicAuditStatus: "", customerId: "", @@ -406,6 +446,7 @@ export default { actQuota: 50, actStartTime: "2022-07-15 00:00", actType: "heart", + noauditSwitch: false, auditSwitch: true, coverPic: "", coverPicAuditStatus: "", @@ -466,8 +507,8 @@ export default { components: { Tinymce }, mounted () { this.customerId = localStorage.getItem('customerId') - this.initMap() this.loadSponsorlist() + this.initMap() @@ -479,8 +520,9 @@ export default { async initForm (type, actId) { this.$refs.ref_form.resetFields(); - this.formData = JSON.parse(JSON.stringify(this.formDataTemp)); - this.agencyIdArray = this.formData.sponsorPath.split(',') + + + this.formType = type if (actId) { @@ -490,6 +532,9 @@ export default { await this.loadFormData() this.endLoading() + } else { + this.formData = JSON.parse(JSON.stringify(this.formDataTemp)); + this.agencyIdArray = this.formData.sponsorPath.split(',') } }, @@ -551,10 +596,17 @@ export default { if (code === 0) { this.formData = JSON.parse(JSON.stringify(data)); - this.agencyIdArray = this.formData.sponsorPath.split(',') - if (this.formData.actContent && this.formData.actContent.length > 0) { - this.formData.actContentHtml = this.formData.actContent[0].content + if (this.formData.richTextFlag) { + this.agencyIdArray = this.formData.sponsorPath.split(',') + if (this.formData.actContent && this.formData.actContent.length > 0) { + this.formData.actContentHtml = this.formData.actContent[0].content + } + if (this.formData.summaryContent && this.formData.summaryContent.length > 0) { + this.formData.summaryContentHtml = this.formData.summaryContent[0].content + } } + this.formData.auditSwitch = !this.formData.noauditSwitch + if (this.formData.coverPic) { let obj = { @@ -589,6 +641,28 @@ export default { app.util.validateRule(messageObj) this.btnDisable = false } else { + let errBeforeSubmit = '' + + if ( + new Date(this.formData.actEndTime).getTime() <= + new Date(this.formData.actStartTime).getTime() + ) { + errBeforeSubmit = "活动预计开始时间应早于活动预计结束时间"; + } else if ( + new Date(this.formData.signInEndTime).getTime() <= + new Date(this.formData.signInStartTime).getTime() + ) { + errBeforeSubmit = "签到开始时间应早于签到结束时间"; + } + + if (errBeforeSubmit) { + this.$message({ + type: 'info', + message: errBeforeSubmit + }) + return false + } + this.addHeartAct() } @@ -604,9 +678,12 @@ export default { this.formData.actContent.push(obj) this.formData.customerId = this.customerId + this.formData.noticePassedPeople = false + this.formData.auditSwitch = !this.formData.noauditSwitch let url = "/heart/work/act/publishV2" if (this.actId) { + this.formData.actId = this.actId url = '/heart/work/act/republishV2' } else { url = "/heart/work/act/publishV2" @@ -614,9 +691,9 @@ export default { // let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add" - + this.startLoading() const { data, code, msg } = await requestPost(url, this.formData) - + this.endLoading() if (code === 0) { this.$message({ type: 'success', @@ -841,6 +918,8 @@ export default { }, resetData () { + this.replayImgList = [] + this.hideUploadBtn = false this.formData = { actAddress: "", actContentHtml: "", @@ -853,7 +932,8 @@ export default { actQuota: undefined, actStartTime: "", actType: "heart", - auditSwitch: false, + noauditSwitch: false, + auditSwitch: true, coverPic: "", coverPicAuditStatus: "", customerId: "", @@ -966,6 +1046,22 @@ export default { margin-left: 10px; color: red; } + +.text_p { + margin: 0 0; + border: 3px; + + > p { + margin: 0 0; + } +} +.div_content { + width: 1000px; +} +.img_icon { + width: 200px; + height: 200px; +}