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..967072c6 100644
--- a/src/views/modules/communityParty/heart/heartForm.vue
+++ b/src/views/modules/communityParty/heart/heartForm.vue
@@ -14,13 +14,18 @@
-
+
-
+
(选中后报名参加活动人员可以直接审核通过)
@@ -262,19 +267,57 @@
-
-
-
-
+ label-width="150px"
+ style="display: block">
+
+
+
+
+
{{item.content}}
+
![]()
+
+
+
+
+
+
+
+
+
+
{{item.content}}
+
![]()
+
+
+
@@ -366,7 +409,8 @@ export default {
actQuota: undefined,
actStartTime: "",
actType: "heart",
- auditSwitch: false,
+ noauditSwitch: false,
+ auditSwitch: true,
coverPic: "",
coverPicAuditStatus: "",
customerId: "",
@@ -406,6 +450,7 @@ export default {
actQuota: 50,
actStartTime: "2022-07-15 00:00",
actType: "heart",
+ noauditSwitch: false,
auditSwitch: true,
coverPic: "",
coverPicAuditStatus: "",
@@ -466,8 +511,8 @@ export default {
components: { Tinymce },
mounted () {
this.customerId = localStorage.getItem('customerId')
- this.initMap()
this.loadSponsorlist()
+ this.initMap()
@@ -479,9 +524,6 @@ 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) {
this.startLoading()
@@ -490,6 +532,11 @@ export default {
await this.loadFormData()
this.endLoading()
+ } else {
+ this.actId = ''
+ this.formData.actId = ''
+ // this.formData = JSON.parse(JSON.stringify(this.formDataTemp));
+ // this.agencyIdArray = this.formData.sponsorPath.split(',')
}
},
@@ -518,8 +565,9 @@ export default {
handleChangeAgency (val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) {
+
this.formData.sponsorId = obj.gridId
- this.formData.sponsorName = obj.agencyName
+ this.formData.sponsorName = obj.agencyGridName
this.formData.sponsorPath = this.agencyIdArray.join(',')
@@ -551,10 +599,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.noauditSwitch = !this.formData.auditSwitch
+
if (this.formData.coverPic) {
let obj = {
@@ -589,6 +644,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 +681,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 +694,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 +921,10 @@ export default {
},
resetData () {
+ this.actId = ''
+ this.replayImgList = []
+ this.agencyIdArray = []
+ this.hideUploadBtn = false
this.formData = {
actAddress: "",
actContentHtml: "",
@@ -853,7 +937,8 @@ export default {
actQuota: undefined,
actStartTime: "",
actType: "heart",
- auditSwitch: false,
+ noauditSwitch: false,
+ auditSwitch: true,
coverPic: "",
coverPicAuditStatus: "",
customerId: "",
@@ -966,6 +1051,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;
+}