Browse Source

Merge branch 'dev-heart0629' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev-heart0629

master
dai 3 years ago
parent
commit
fd9595ae6b
  1. 101
      src/views/modules/communityParty/heart/heartAudit.vue
  2. 78
      src/views/modules/communityParty/heart/heartFinish.vue
  3. 155
      src/views/modules/communityParty/heart/heartForm.vue
  4. 54
      src/views/modules/communityParty/heart/heartList.vue
  5. 143
      src/views/modules/communityParty/heart/heartPerson.vue
  6. 104
      src/views/modules/communityParty/heart/heartReview.vue

101
src/views/modules/communityParty/heart/heartAudit.vue

@ -6,7 +6,7 @@
@click="handleReject">审核拒绝</el-button> @click="handleReject">审核拒绝</el-button>
<el-button size="small" <el-button size="small"
class="diy-button--add" class="diy-button--add"
@click="handleAudit('pass')">审核通过</el-button> @click="handleAudit('passed')">审核通过</el-button>
<el-table class="table" <el-table class="table"
:data="tableData" :data="tableData"
@ -31,14 +31,15 @@
header-align="center" header-align="center"
align="center" align="center"
label="姓名" label="姓名"
width="250"> :show-overflow-tooltip="true"
width="150">
</el-table-column> </el-table-column>
<el-table-column prop="mobile" <el-table-column prop="mobile"
header-align="center" header-align="center"
align="center" align="center"
label="手机" label="手机"
width="100"> min-width="120">
</el-table-column> </el-table-column>
@ -53,6 +54,7 @@
header-align="center" header-align="center"
align="center" align="center"
label="昵称" label="昵称"
:show-overflow-tooltip="true"
width="120"> width="120">
</el-table-column> </el-table-column>
@ -67,21 +69,21 @@
header-align="center" header-align="center"
align="center" align="center"
label="实际参加活动个数" label="实际参加活动个数"
width="120"> width="140">
</el-table-column> </el-table-column>
<el-table-column prop="obtainPointsActNum" <el-table-column prop="obtainPointsActNum"
header-align="center" header-align="center"
align="center" align="center"
label="获得积分活动个数" label="获得积分活动个数"
width="120"> width="140">
</el-table-column> </el-table-column>
<el-table-column prop="signUpTime" <el-table-column prop="signUpTime"
header-align="center" header-align="center"
align="center" align="center"
label="报名时间" label="报名时间"
width="120"> width="180">
</el-table-column> </el-table-column>
<el-table-column prop="statusShow" <el-table-column prop="statusShow"
@ -147,6 +149,8 @@ export default {
tableData: [], tableData: [],
actUserRelationIdList: [], actUserRelationIdList: [],
auditList: [],
cancelReason: '', cancelReason: '',
cancleShow: false,// cancleShow: false,//
@ -185,8 +189,8 @@ export default {
//form //form
async loadTable () { async loadTable () {
this.tableLoading = true this.tableLoading = true
// const url = '/heart/work/act/userlist' const url = '/heart/work/actuser/userlist'
const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/act/userlist' // const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/actuser/userlist'
let params = { let params = {
actId: this.actId actId: this.actId
} }
@ -223,55 +227,14 @@ export default {
}, },
handleReject () { handleReject () {
// if (this.actUserRelationIdList.length === 0) { if (this.actUserRelationIdList.length === 0) {
// this.$message({
// type: "info",
// message: ""
// });
// return false
// }
this.cancleShow = true
},
async handleComfirm (row, tableIndex) {
let valiMsg = this.validata(row)
if (valiMsg) {
this.$message({ this.$message({
type: 'warning', type: "info",
message: valiMsg message: "请选择人员"
}) });
return false return false
} }
this.cancleShow = true
this.addReview(row, tableIndex)
},
async addReview (row, tableIndex) {
let url = "/gov/org/placepatrolreviewrecord/add"
if (row.placePatrolReviewRecordId) {
url = "/gov/org/placepatrolreviewrecord/edit"
}
let params = JSON.parse(JSON.stringify(row))
params.inspectors = params.inspectorArray.join(',')
params.reviewTime = params.reviewTime + ' 00:00:00'
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let array = data.reviewTime.split(' ')
data.reviewTime = array[0]
data.isEdit = false
data.isNew = false
this.$set(this.tableData, tableIndex, data)
} else {
this.$message.error(msg)
}
}, },
@ -283,22 +246,30 @@ export default {
}); });
return false return false
} }
if (type = 'refused' && !this.cancelReason) { if (type === 'refused' && !this.cancelReason) {
this.$message({ this.$message({
type: "info", type: "info",
message: "请填写拒绝理由" message: "请填写拒绝理由"
}); });
return false return false
} }
this.auditList = []
this.actUserRelationIdList.forEach(item => {
let obj = {
type: type,
actUserRelationId: item.actUserRelationId,
rejectReason: this.cancelReason
}
this.auditList.push(obj)
});
const url = "/heart/work/actuser/audit-user" const url = "/heart/work/actuser/audit-user"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/work/actuser/audit-user" // const url = "http://yapi.elinkservice.cn/mock/245/heart/work/actuser/audit-user"
let params = { let params = [...this.auditList]
actId: this.actId,
type: type, console.log(params)
rejectReason: this.cancelReason,
actUserRelationIdList: this.actUserRelationIdList
}
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
@ -308,7 +279,8 @@ export default {
type: "success", type: "success",
message: "操作成功" message: "操作成功"
}); });
this.cancelReason = ''
this.cancleShow = false
this.loadTable() this.loadTable()
} else { } else {
this.$message.error(msg) this.$message.error(msg)
@ -354,11 +326,6 @@ export default {
}, },
props: { props: {
resultList: {
type: Array,
default: []
}
} }
} }
</script> </script>

78
src/views/modules/communityParty/heart/heartFinish.vue

@ -52,7 +52,7 @@
header-align="center" header-align="center"
align="center" align="center"
label="姓名" label="姓名"
width="150"> width="120">
</el-table-column> </el-table-column>
@ -67,7 +67,7 @@
header-align="center" header-align="center"
align="center" align="center"
label="报名时间" label="报名时间"
width="150"> width="180">
</el-table-column> </el-table-column>
<el-table-column prop="signInFlagShow" <el-table-column prop="signInFlagShow"
@ -160,46 +160,18 @@ export default {
this.formData.actId = actId this.formData.actId = actId
this.formData.actualStartTime = this.actStartTime this.formData.actualStartTime = this.actStartTime
this.formData.actualEndTime = this.actEndTime this.formData.actualEndTime = this.actEndTime
this.formData.reward = this.reward
await this.loadTable() await this.loadTable()
}, },
//
async hancleChangeTeam (row, index, tableIndex) {
this.tableData[tableIndex].inspectorArray = [...[]]
let teamId = this.teamsList[index].teamId
await this.loadInspectors(teamId, tableIndex)
},
//
async loadInspectors (teamId, tableIndex) {
const url = '/gov/org/placepatrolteamstaff/getlist'
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolteamstaff/getlist'
let params = {
teamId: teamId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// let obj = this.tableData[tableIndex]
this.tableData[tableIndex].inspectorsList = [...data]
// this.tableData[tableIndex]=
// obj.inspectorsList = data
// this.$set(this.tableData, tableIndex, obj)
console.log(this.tableData)
} else {
this.$message.error(msg)
}
},
//form //form
async loadTable () { async loadTable () {
this.tableLoading = true this.tableLoading = true
// const url = '/heart/work/act/userlist' const url = '/heart/work/actuser/userlist'
const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/act/userlist' // const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/actuser/userlist'
let params = { let params = {
actId: this.actId actId: this.actId
} }
@ -207,10 +179,12 @@ export default {
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
this.tableLoading = false this.tableLoading = false
if (code === 0) { if (code === 0) {
let arr = []
if (data.list && data.list.length > 0) { if (data.list && data.list.length > 0) {
data.list.forEach(item => { arr = data.list.filter(item => item.status === 'passed')
if (item.signInFlag) { arr.forEach(item => {
if (item.signInFlag === 'signed_in') {
item.signInFlagShow = '是' item.signInFlagShow = '是'
item.grantPointShow = '1' item.grantPointShow = '1'
item.grantPoint = true item.grantPoint = true
@ -225,7 +199,7 @@ export default {
}); });
this.tableData = [...data.list] this.tableData = [...arr]
} else { } else {
this.tableData = [] this.tableData = []
} }
@ -243,6 +217,21 @@ export default {
}); });
return false 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 = [] let userList = []
@ -250,7 +239,7 @@ export default {
// actUserRelationId grantPoint true:false denyRewardReason // actUserRelationId grantPoint true:false denyRewardReason
this.tableData.forEach(item => { this.tableData.forEach(item => {
let obj = {} let obj = {}
obj.actUserRelationId = item.userId obj.actUserRelationId = item.actUserRelationId
obj.denyRewardReason = item.denyRewardReason obj.denyRewardReason = item.denyRewardReason
if (item.grantPointShow === '1') { if (item.grantPointShow === '1') {
@ -272,7 +261,7 @@ export default {
}); });
return false return false
} else { } else {
console.log(userList)
this.finishAct(userList) this.finishAct(userList)
} }
@ -282,15 +271,14 @@ export default {
}, },
async finishAct (userList) { async finishAct (userList) {
// let url = "/heart/work/act/finish" let url = "/heart/work/act/finish"
let url = "http://yapi.elinkservice.cn/mock/245/heart/work/act/finish" // let url = "http://yapi.elinkservice.cn/mock/245/heart/work/act/finish"
let params = { let params = {
userList: userList, userList: userList,
...this.formData ...this.formData
} }
console.log(params)
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
@ -299,6 +287,8 @@ export default {
type: "success", type: "success",
message: '操作成功' message: '操作成功'
}); });
this.$emit('finishDiaOk')
} else { } else {
this.$message.error(msg) this.$message.error(msg)
@ -347,6 +337,10 @@ export default {
props: { props: {
reward: {
type: Number,
default: undefined
},
actStartTime: { actStartTime: {
type: String, type: String,
default: '' default: ''

155
src/views/modules/communityParty/heart/heartForm.vue

@ -14,13 +14,18 @@
<el-form-item label="主办方" <el-form-item label="主办方"
prop="sponsorId" prop="sponsorId"
label-width="150px"> label-width="150px">
<el-cascader class="item_width_6"
<el-cascader v-if="formData.richTextFlag||formType==='add'"
class="item_width_6"
ref="myCascader" ref="myCascader"
v-model="agencyIdArray" v-model="agencyIdArray"
:options="orgOptions" :options="orgOptions"
:props="orgOptionProps" :props="orgOptionProps"
:show-all-levels="false" :show-all-levels="false"
@change="handleChangeAgency"></el-cascader> @change="handleChangeAgency"></el-cascader>
<el-input v-else
class="item_width_6"
v-model="formData.sponsorName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动标题" <el-form-item label="活动标题"
@ -127,7 +132,7 @@
prop="auditSwitch" prop="auditSwitch"
label-width="150px" label-width="150px"
style="display: block"> style="display: block">
<el-checkbox v-model="formData.auditSwitch"></el-checkbox> <el-checkbox v-model="formData.noauditSwitch"></el-checkbox>
<span class="div-tooltip">选中后报名参加活动人员可以直接审核通过</span> <span class="div-tooltip">选中后报名参加活动人员可以直接审核通过</span>
</el-form-item> </el-form-item>
@ -262,19 +267,57 @@
</div> </div>
<el-form-item label="活动详情" <el-form-item label="活动详情"
prop="actContentHtml" prop="actContentHtml"
label-width="150px"> label-width="150px"
<!-- <div style="width:400px"> --> style="display: block">
<Tinymce class="tinymce_view"
v-if="formType!='detail'" <div v-if="formData.richTextFlag||formType === 'add'">
v-model="formData.actContentHtml" <Tinymce class="tinymce_view"
:height="250" v-if="formType!='detail'"
style="width:1000px" v-model="formData.actContentHtml"
:customerId="customerId" :height="250"
placeholder="在这里输入文字" /> style="width:1000px"
<p v-else :customerId="customerId"
class="text_p" placeholder="在这里输入文字" />
v-html="formData.actContentHtml"></p> <p v-else
<!-- </div> --> class="text_p"
v-html="formData.actContentHtml"></p>
</div>
<div class="div_content"
v-else>
<div v-for="(item,index) in formData.actContent"
:key="index">
<div v-if="item.contentType==='text'">{{item.content}}</div>
<img v-if="item.contentType==='img'"
class="img_icon"
:src="item.content">
</div>
</div>
</el-form-item>
<el-form-item v-if="formData.summaryFlag"
label="活动回顾"
prop="summaryContentHtml"
label-width="150px"
style="display: block">
<div v-if="formData.richTextFlag">
<p class="text_p"
v-html="formData.summaryContentHtml"></p>
</div>
<div class="div_content"
v-else>
<div v-for="(item,index) in formData.summaryContent"
:key="index">
<div v-if="item.contentType==='text'">{{item.content}}</div>
<img v-if="item.contentType==='img'"
class="img_icon"
:src="item.content">
<p v-if="item.contentType==='rich_text'"
class="text_p"
v-html="item.content"></p>
</div>
</div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -366,7 +409,8 @@ export default {
actQuota: undefined, actQuota: undefined,
actStartTime: "", actStartTime: "",
actType: "heart", actType: "heart",
auditSwitch: false, noauditSwitch: false,
auditSwitch: true,
coverPic: "", coverPic: "",
coverPicAuditStatus: "", coverPicAuditStatus: "",
customerId: "", customerId: "",
@ -406,6 +450,7 @@ export default {
actQuota: 50, actQuota: 50,
actStartTime: "2022-07-15 00:00", actStartTime: "2022-07-15 00:00",
actType: "heart", actType: "heart",
noauditSwitch: false,
auditSwitch: true, auditSwitch: true,
coverPic: "", coverPic: "",
coverPicAuditStatus: "", coverPicAuditStatus: "",
@ -466,8 +511,8 @@ export default {
components: { Tinymce }, components: { Tinymce },
mounted () { mounted () {
this.customerId = localStorage.getItem('customerId') this.customerId = localStorage.getItem('customerId')
this.initMap()
this.loadSponsorlist() this.loadSponsorlist()
this.initMap()
@ -479,9 +524,6 @@ export default {
async initForm (type, actId) { async initForm (type, actId) {
this.$refs.ref_form.resetFields(); this.$refs.ref_form.resetFields();
this.formData = JSON.parse(JSON.stringify(this.formDataTemp));
this.agencyIdArray = this.formData.sponsorPath.split(',')
this.formType = type this.formType = type
if (actId) { if (actId) {
this.startLoading() this.startLoading()
@ -490,6 +532,11 @@ export default {
await this.loadFormData() await this.loadFormData()
this.endLoading() 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) { handleChangeAgency (val) {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
if (obj) { if (obj) {
this.formData.sponsorId = obj.gridId this.formData.sponsorId = obj.gridId
this.formData.sponsorName = obj.agencyName this.formData.sponsorName = obj.agencyGridName
this.formData.sponsorPath = this.agencyIdArray.join(',') this.formData.sponsorPath = this.agencyIdArray.join(',')
@ -551,10 +599,17 @@ export default {
if (code === 0) { if (code === 0) {
this.formData = JSON.parse(JSON.stringify(data)); this.formData = JSON.parse(JSON.stringify(data));
this.agencyIdArray = this.formData.sponsorPath.split(',') if (this.formData.richTextFlag) {
if (this.formData.actContent && this.formData.actContent.length > 0) { this.agencyIdArray = this.formData.sponsorPath.split(',')
this.formData.actContentHtml = this.formData.actContent[0].content 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) { if (this.formData.coverPic) {
let obj = { let obj = {
@ -589,6 +644,28 @@ export default {
app.util.validateRule(messageObj) app.util.validateRule(messageObj)
this.btnDisable = false this.btnDisable = false
} else { } 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() this.addHeartAct()
} }
@ -604,9 +681,12 @@ export default {
this.formData.actContent.push(obj) this.formData.actContent.push(obj)
this.formData.customerId = this.customerId this.formData.customerId = this.customerId
this.formData.noticePassedPeople = false
this.formData.auditSwitch = !this.formData.noauditSwitch
let url = "/heart/work/act/publishV2" let url = "/heart/work/act/publishV2"
if (this.actId) { if (this.actId) {
this.formData.actId = this.actId
url = '/heart/work/act/republishV2' url = '/heart/work/act/republishV2'
} else { } else {
url = "/heart/work/act/publishV2" url = "/heart/work/act/publishV2"
@ -614,9 +694,9 @@ export default {
// let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add" // let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add"
this.startLoading()
const { data, code, msg } = await requestPost(url, this.formData) const { data, code, msg } = await requestPost(url, this.formData)
this.endLoading()
if (code === 0) { if (code === 0) {
this.$message({ this.$message({
type: 'success', type: 'success',
@ -841,6 +921,10 @@ export default {
}, },
resetData () { resetData () {
this.actId = ''
this.replayImgList = []
this.agencyIdArray = []
this.hideUploadBtn = false
this.formData = { this.formData = {
actAddress: "", actAddress: "",
actContentHtml: "", actContentHtml: "",
@ -853,7 +937,8 @@ export default {
actQuota: undefined, actQuota: undefined,
actStartTime: "", actStartTime: "",
actType: "heart", actType: "heart",
auditSwitch: false, noauditSwitch: false,
auditSwitch: true,
coverPic: "", coverPic: "",
coverPicAuditStatus: "", coverPicAuditStatus: "",
customerId: "", customerId: "",
@ -966,6 +1051,22 @@ export default {
margin-left: 10px; margin-left: 10px;
color: red; color: red;
} }
.text_p {
margin: 0 0;
border: 3px;
> p {
margin: 0 0;
}
}
.div_content {
width: 1000px;
}
.img_icon {
width: 200px;
height: 200px;
}
</style> </style>
<style lang="scss"> <style lang="scss">

54
src/views/modules/communityParty/heart/heartList.vue

@ -144,31 +144,31 @@
size="small" size="small"
@click="handleEdit(scope.row)">修改</el-button> @click="handleEdit(scope.row)">修改</el-button>
<el-button v-if="scope.row.isMyPublish&&scope.row.status==='signing_up' || scope.row.status==='end_sign_up' || scope.row.status==='enough'" <el-button v-if="scope.row.isMyPublish&&(scope.row.status==='signing_up' || scope.row.status==='end_sign_up' || scope.row.status==='enough')&& scope.row.auditSwitch"
type="text" type="text"
class="div-table-button--edit" class="div-table-button--edit"
size="small" size="small"
@click="handleAudit(scope.row)">报名审核</el-button> @click="handleAudit(scope.row)">报名审核</el-button>
<el-button v-if="scope.row.isMyPublish&&scope.row.status==='signing_up' || scope.row.status==='end_sign_up' || scope.row.status==='enough'" <el-button v-if="scope.row.isMyPublish&&((scope.row.status==='in_progress' || scope.row.status==='finished')||!scope.row.auditSwitch)"
type="text" type="text"
class="div-table-button--edit" class="div-table-button--edit"
size="small" size="small"
@click="handleCancleAct(scope.row)">取消活动</el-button> @click="handlePerson(scope.row)">查看人员</el-button>
<el-button v-if="scope.row.isMyPublish&&scope.row.status==='in_progress' || scope.row.status==='finished'" <el-button v-if="scope.row.isMyPublish&&(scope.row.status==='signing_up' || scope.row.status==='end_sign_up' || scope.row.status==='enough')"
type="text" type="text"
class="div-table-button--edit" class="div-table-button--delete"
size="small" size="small"
@click="handlePerson(scope.row)">查看人员</el-button> @click="handleCancleAct(scope.row)">取消活动</el-button>
<el-button v-if="scope.row.isMyPublish&&scope.row.status==='in_progress'" <el-button v-if="scope.row.isMyPublish&&scope.row.status==='in_progress'"
type="text" type="text"
class="div-table-button--edit" class="div-table-button--delete"
size="small" size="small"
@click="handleFinishAct(scope.row)">结束活动</el-button> @click="handleFinishAct(scope.row)">结束活动</el-button>
<el-button v-if="scope.row.isMyPublish&&scope.row.status==='finished' && !scope.row.summaryFlag" <el-button v-if="scope.row.isMyPublish&&(scope.row.status==='finished' && !scope.row.summaryFlag)"
type="text" type="text"
class="div-table-button--edit" class="div-table-button--edit"
size="small" size="small"
@ -266,7 +266,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="'报名审核'" :title="'报名审核'"
width="80%" width="1450px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="auditDiaClose"> @closed="auditDiaClose">
@ -278,11 +278,12 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="'查看人员'" :title="'查看人员'"
width="80%" width="1550px"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="personDiaClose"> @closed="personDiaClose">
<heart-person ref="ref_person"></heart-person> <heart-person ref="ref_person"
:status="status"></heart-person>
</el-dialog> </el-dialog>
<!-- 活动结束弹出框 --> <!-- 活动结束弹出框 -->
@ -297,7 +298,9 @@
<heart-finish ref="ref_finish" <heart-finish ref="ref_finish"
:actStartTime="actStartTime" :actStartTime="actStartTime"
:actEndTime="actEndTime" :actEndTime="actEndTime"
@finishDiaClose="finishDiaClose"></heart-finish> :reward="reward"
@finishDiaClose="finishDiaClose"
@finishDiaOk="finishDiaOk"></heart-finish>
</el-dialog> </el-dialog>
<!-- 活动回顾弹出框 --> <!-- 活动回顾弹出框 -->
@ -310,7 +313,8 @@
class="dialog-h" class="dialog-h"
@closed="reviewDiaClose"> @closed="reviewDiaClose">
<heart-review ref="ref_review" <heart-review ref="ref_review"
@reviewDiaClose="reviewDiaClose"></heart-review> @reviewDiaClose="reviewDiaClose"
@reviewDiaOk="reviewDiaOk"></heart-review>
</el-dialog> </el-dialog>
</div> </div>
@ -390,6 +394,8 @@ export default {
actId: '', actId: '',
actStartTime: '', actStartTime: '',
actEndTime: '', actEndTime: '',
reward: null,
status: '',
cancelReason: '', cancelReason: '',
cancleShow: false,// cancleShow: false,//
@ -510,6 +516,7 @@ export default {
}) })
}, },
handlePerson (row) { handlePerson (row) {
this.status = row.status
this.personShow = true this.personShow = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_person.initTable(row.actId) this.$refs.ref_person.initTable(row.actId)
@ -517,14 +524,17 @@ export default {
}, },
handleReview (row) { handleReview (row) {
this.reviewShow = true this.reviewShow = true
this.$nextTick(() => {
this.$refs.ref_review.initForm(row.actId)
})
}, },
handleFinishAct (row) { handleFinishAct (row) {
this.finishShow = true this.finishShow = true
// this.actStartTime = row.actStartTime this.actStartTime = row.actStartTime
// this.actEndTime = row.actEndTime this.actEndTime = row.actEndTime
this.actStartTime = '2022-06-30 10:00:00' this.reward = row.reward
this.actEndTime = '2022-06-30 10:00:00'
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_finish.initTable(row.actId) this.$refs.ref_finish.initTable(row.actId)
}) })
@ -580,6 +590,16 @@ export default {
this.finishShow = false// this.finishShow = false//
}, },
finishDiaOk () {
this.finishShow = false//
this.loadTable()
},
reviewDiaOk () {
this.reviewShow = false//
this.loadTable()
},
cancleDiaClose () { cancleDiaClose () {
this.cancelReason = '' this.cancelReason = ''
this.cancleShow = false// this.cancleShow = false//

143
src/views/modules/communityParty/heart/heartPerson.vue

@ -21,14 +21,15 @@
header-align="center" header-align="center"
align="center" align="center"
label="姓名" label="姓名"
width="250"> :show-overflow-tooltip="true"
width="150">
</el-table-column> </el-table-column>
<el-table-column prop="mobile" <el-table-column prop="mobile"
header-align="center" header-align="center"
align="center" align="center"
label="手机" label="手机"
width="100"> min-width="120">
</el-table-column> </el-table-column>
@ -43,6 +44,7 @@
header-align="center" header-align="center"
align="center" align="center"
label="昵称" label="昵称"
:show-overflow-tooltip="true"
width="120"> width="120">
</el-table-column> </el-table-column>
@ -57,21 +59,38 @@
header-align="center" header-align="center"
align="center" align="center"
label="实际参加活动个数" label="实际参加活动个数"
width="120"> width="140">
</el-table-column> </el-table-column>
<el-table-column prop="obtainPointsActNum" <el-table-column prop="obtainPointsActNum"
header-align="center" header-align="center"
align="center" align="center"
label="获得积分活动个数" label="获得积分活动个数"
width="120"> width="140">
</el-table-column> </el-table-column>
<el-table-column prop="signUpTime" <el-table-column prop="signUpTime"
header-align="center" header-align="center"
align="center" align="center"
label="报名时间" label="报名时间"
width="120"> width="180">
</el-table-column>
<el-table-column v-if="status==='finished'"
prop="signInFlagShow"
header-align="center"
align="center"
label="是否签到"
width="100">
</el-table-column>
<el-table-column v-if="status==='finished'"
prop="rewardFlagShow"
header-align="center"
align="center"
label="是否给分"
width="100">
</el-table-column> </el-table-column>
<el-table-column prop="statusShow" <el-table-column prop="statusShow"
@ -141,8 +160,8 @@ export default {
//form //form
async loadTable () { async loadTable () {
this.tableLoading = true this.tableLoading = true
// const url = '/heart/work/act/userlist' const url = '/heart/work/actuser/userlist'
const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/act/userlist' // const url = 'http://yapi.elinkservice.cn/mock/245/heart/work/actuser/userlist'
let params = { let params = {
actId: this.actId actId: this.actId
} }
@ -166,6 +185,18 @@ export default {
item.statusShow = '' item.statusShow = ''
} }
if (item.rewardFlag === 'agree') {
item.rewardFlagShow = '已发放'
} else {
item.rewardFlagShow = '未发放'
}
if (item.signInFlag === 'signed_in') {
item.signInFlagShow = '是'
} else {
item.signInFlagShow = '否'
}
}); });
this.tableData = [...data.list] this.tableData = [...data.list]
@ -190,98 +221,6 @@ export default {
}, },
async handleComfirm (row, tableIndex) {
let valiMsg = this.validata(row)
if (valiMsg) {
this.$message({
type: 'warning',
message: valiMsg
})
return false
}
this.addReview(row, tableIndex)
},
async addReview (row, tableIndex) {
let url = "/gov/org/placepatrolreviewrecord/add"
if (row.placePatrolReviewRecordId) {
url = "/gov/org/placepatrolreviewrecord/edit"
}
let params = JSON.parse(JSON.stringify(row))
params.inspectors = params.inspectorArray.join(',')
params.reviewTime = params.reviewTime + ' 00:00:00'
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
let array = data.reviewTime.split(' ')
data.reviewTime = array[0]
data.isEdit = false
data.isNew = false
this.$set(this.tableData, tableIndex, data)
} else {
this.$message.error(msg)
}
},
async handleAudit (type) {
if (this.actUserRelationIdList.length === 0) {
this.$message({
type: "info",
message: "请选择人员"
});
return false
}
if (type = 'refused' && !this.cancelReason) {
this.$message({
type: "info",
message: "请填写拒绝理由"
});
return false
}
const url = "/heart/work/act/audit-user"
// const url = "http://yapi.elinkservice.cn/mock/245/heart/work/act/audit-user"
let params = {
actId: this.actId,
type: type,
rejectReason: this.cancelReason,
actUserRelationIdList: this.actUserRelationIdList
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "操作成功"
});
this.loadTable()
} else {
this.$message.error(msg)
}
},
cancleDiaClose () {
this.cancelReason = ''
this.cancleShow = false//
},
handleCancle () {
this.$emit('dialogCancle')
},
// //
startLoading () { startLoading () {
loading = Loading.service({ loading = Loading.service({
@ -310,6 +249,12 @@ export default {
}, },
props: { props: {
status: {
type: String,
default: ''
},
} }
} }
</script> </script>

104
src/views/modules/communityParty/heart/heartReview.vue

@ -2,35 +2,21 @@
<div> <div>
<div class="dialog-h-content scroll-h"> <div class="dialog-h-content scroll-h">
<el-form ref="ref_form" <div class="div_tinymce">
:inline="true" <Tinymce class="tinymce_view"
:model="formData" v-model="actContent"
class="div_form "> :height="450"
style="width:1000px"
<el-form-item label="活动回顾" :customerId="customerId"
prop="actContent" placeholder="在这里输入文字" />
label-width="150px">
<!-- <div style="width:400px"> --> </div>
<Tinymce class="tinymce_view"
v-if="formType!='detail'"
v-model="formData.actContent"
:height="450"
style="width:1000px"
:customerId="customerId"
placeholder="在这里输入文字" />
<p v-else
class="text_p"
v-html="formData.actContent"></p>
<!-- </div> -->
</el-form-item>
</el-form>
</div> </div>
<div class="div_btn"> <div class="div_btn">
<el-button size="small" <el-button size="small"
@click="handleCancle"> </el-button> @click="handleCancle"> </el-button>
<el-button size="small" <el-button size="small"
v-if="formType != 'detail'"
type="primary" type="primary"
:disabled="btnDisable" :disabled="btnDisable"
@click="handleComfirm"> </el-button> @click="handleComfirm"> </el-button>
@ -56,11 +42,8 @@ export default {
btnDisable: false, btnDisable: false,
customerId: '', customerId: '',
actId: '', actId: '',
actSummary: [],
formData: { actContent: '',
actContent: '',
},
@ -74,15 +57,13 @@ export default {
methods: { methods: {
async initForm (type, actId) { async initForm (actId) {
this.$refs.ref_form.resetFields();
this.startLoading() this.startLoading()
this.formType = type
if (actId) { if (actId) {
this.actId = actId this.actId = actId
this.formData.actId = actId
} }
this.endLoading() this.endLoading()
@ -90,43 +71,40 @@ export default {
async handleComfirm () { async handleComfirm () {
console.log(this.formData) if (!this.actContent) {
// this.btnDisable = true this.$message({
// setTimeout(() => { type: 'info',
// this.btnDisable = false message: '活动回顾不能为空'
// }, 10000) })
// this.$refs['ref_form'].validate((valid, messageObj) => { return false
// if (!valid) { }
// app.util.validateRule(messageObj) this.actSummary = [{
// this.btnDisable = false contentType: 'rich_text',
// } else { content: this.dormatHtml(this.actContent)
// this.addRecord() }]
// }
// })
},
async addRecord () {
this.formData.actContent = this.dormatHtml(this.formData.actContent)
let url = "/gov/org/placepatrolrecord/add" let url = "/heart/work/act/summaryact"
// let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add" // let url = "http://yapi.elinkservice.cn/mock/245/gov/org/placepatrolrecord/add"
this.formData.inspectors = this.formData.inspectorArray.join(',') let params = {
actId: this.actId,
actSummary: this.actSummary
}
console.log(params)
const { data, code, msg } = await requestPost(url, this.formData) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '操作成功' message: '操作成功'
}) })
this.resetData() this.actContent = ''
this.$emit('dialogOk') this.$emit('reviewDiaOk')
this.btnDisable = false
} else { } else {
this.btnDisable = false
this.$message.error(msg) this.$message.error(msg)
} }
@ -145,9 +123,7 @@ export default {
handleCancle () { handleCancle () {
this.$emit('reviewDiaClose')
this.resetData()
this.$emit('dialogCancle')
}, },
@ -215,6 +191,10 @@ export default {
<style lang="scss" scoped > <style lang="scss" scoped >
@import "@/assets/scss/modules/management/form-main.scss"; @import "@/assets/scss/modules/management/form-main.scss";
.div_tinymce {
display: flex;
justify-content: center;
}
.avatar-uploader { .avatar-uploader {
margin: 0 0 0 20px; margin: 0 0 0 20px;
} }

Loading…
Cancel
Save