|
|
|
@ -57,8 +57,8 @@ |
|
|
|
<el-date-picker v-model="scope.row.holdTime" |
|
|
|
style="width: 175px" |
|
|
|
size="small" |
|
|
|
format="yyyy-MM-dd hh:mm" |
|
|
|
value-format="yyyy-MM-dd hh:mm" |
|
|
|
format="yyyy-MM-dd hh:mm:ss" |
|
|
|
value-format="yyyy-MM-dd hh:mm:ss" |
|
|
|
type="datetime" |
|
|
|
placeholder="选择日期"> |
|
|
|
</el-date-picker> |
|
|
|
@ -87,7 +87,7 @@ |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="活动主题" |
|
|
|
width="220"> |
|
|
|
min-width="220"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
<el-input v-model="scope.row.topic" |
|
|
|
@ -219,8 +219,11 @@ |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="div_btn"> |
|
|
|
<el-button @click="handleCancle">取 消</el-button> |
|
|
|
<el-button @click="handleComfirm">确定</el-button> |
|
|
|
<el-button size="small" |
|
|
|
@click="handleCancle">取 消</el-button> |
|
|
|
<el-button size="small" |
|
|
|
type="primary" |
|
|
|
@click="handleComfirm">确定</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -293,47 +296,11 @@ export default { |
|
|
|
methods: { |
|
|
|
|
|
|
|
handleChangeScope (index) { |
|
|
|
let onePublish = this.publishOptions[index] |
|
|
|
|
|
|
|
let obj = this.$refs["myCascader" + index].getCheckedNodes()[0].data |
|
|
|
console.log('obj', obj) |
|
|
|
if (obj) { |
|
|
|
onePublish.publishPartyOrgId = obj.id//发布活动党组织id |
|
|
|
onePublish.publishPartyOrgName = obj.partyOrgName//发布活动党组织名称 |
|
|
|
onePublish.publishOrgPid = obj.pid//发布活动党组织ID的上级节点 |
|
|
|
onePublish.publishOrgType = obj.partyOrgType//党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部;6党小组 |
|
|
|
onePublish.publishOrgPath = onePublish.publichIdArray.join(':')//PUBLISH_PARTY_ORG_ID的全路径,包含自身。方便前端回显 |
|
|
|
} else { |
|
|
|
onePublish.publishPartyOrgId = '' |
|
|
|
onePublish.publishPartyOrgName = '' |
|
|
|
onePublish.publishOrgPid = '' |
|
|
|
onePublish.publishOrgType = '' |
|
|
|
onePublish.publishOrgPath = '' |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
handleChangeJoinOrg (value, index) { |
|
|
|
|
|
|
|
this.tableData[index].joinOrgList = [] |
|
|
|
|
|
|
|
let selArray = this.$refs["myCascader_join" + index].getCheckedNodes() |
|
|
|
|
|
|
|
console.log('value', value) |
|
|
|
console.log('index', index) |
|
|
|
console.log('selArray', selArray) |
|
|
|
|
|
|
|
selArray.forEach(element => { |
|
|
|
|
|
|
|
let obj = { |
|
|
|
joinOrgId: element.data.id, |
|
|
|
orgType: element.data.partyOrgType, |
|
|
|
pid: element.data.pid, |
|
|
|
joinOrgName: element.data.partyOrgName, |
|
|
|
joinOrgPath: element.path.join(':'), |
|
|
|
} |
|
|
|
this.tableData[index].joinOrgList.push(obj) |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
async handleClickActType (index) { |
|
|
|
@ -342,6 +309,7 @@ export default { |
|
|
|
//首先获取当前年份对应活动类型是否有活动 |
|
|
|
await this.getTableData() |
|
|
|
//如果没有活动,根据字典数据,初始化 |
|
|
|
|
|
|
|
if (this.tableData.length === 0) { |
|
|
|
for (let i = 0; i < this.selActType.yearCount; i++) { |
|
|
|
this.handleAdd() |
|
|
|
@ -365,11 +333,19 @@ export default { |
|
|
|
let tempArray = [] |
|
|
|
|
|
|
|
data.forEach(item => { |
|
|
|
|
|
|
|
if (item.type === this.actType) { |
|
|
|
tempArray = [] |
|
|
|
|
|
|
|
item.activityList.forEach(actItem => { |
|
|
|
actItem.joinOrgsShow = actItem.joinOrgs.join(',') |
|
|
|
actItem.publichIdArray = actItem.publishOrgPath.split(':') |
|
|
|
|
|
|
|
actItem.joinIdArray = [] |
|
|
|
actItem.joinOrgList.forEach(element => { |
|
|
|
actItem.joinIdArray.push(element.joinOrgPath.split(':')) |
|
|
|
}); |
|
|
|
|
|
|
|
item.isAutoInform = item.isAutoInform == '1' |
|
|
|
|
|
|
|
tempArray.push(actItem) |
|
|
|
}); |
|
|
|
@ -378,7 +354,10 @@ export default { |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.tableData = tempArray |
|
|
|
console.log(' this.tableData', this.tableData) |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
@ -387,6 +366,8 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async handleComfirm () { |
|
|
|
this.disposeParty() |
|
|
|
|
|
|
|
let valiMsg = this.validata() |
|
|
|
if (valiMsg) { |
|
|
|
this.$message({ |
|
|
|
@ -396,25 +377,22 @@ export default { |
|
|
|
return false |
|
|
|
} |
|
|
|
console.log(this.tableData) |
|
|
|
// this.addReview(row, tableIndex) |
|
|
|
this.addPlan() |
|
|
|
|
|
|
|
}, |
|
|
|
async addReview (row, tableIndex) { |
|
|
|
|
|
|
|
|
|
|
|
let url = "/gov/org/placepatrolreviewrecord/add" |
|
|
|
|
|
|
|
async addPlan () { |
|
|
|
|
|
|
|
let params = JSON.parse(JSON.stringify(row)) |
|
|
|
let url = "/resi/partymember/icPartyAct/batch-add" |
|
|
|
|
|
|
|
let params = { |
|
|
|
delActIds: [], |
|
|
|
actList: this.tableData |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
let array = data.reviewTime.split(' ') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.$emit('handleOk') |
|
|
|
} else { |
|
|
|
|
|
|
|
this.$message.error(msg) |
|
|
|
@ -422,6 +400,28 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
disposeParty () { |
|
|
|
this.tableData.forEach((tableItem, index) => { |
|
|
|
//参会党组织 |
|
|
|
tableItem.joinOrgList = [] |
|
|
|
let selJoinArray = this.$refs["myCascader_join" + index].getCheckedNodes() |
|
|
|
console.log('selJoinArray', selJoinArray) |
|
|
|
|
|
|
|
selJoinArray.forEach(joinItem => { |
|
|
|
|
|
|
|
let obj = { |
|
|
|
joinOrgId: joinItem.data.id, |
|
|
|
orgType: joinItem.data.partyOrgType, |
|
|
|
pid: joinItem.data.pid, |
|
|
|
joinOrgName: joinItem.data.partyOrgName, |
|
|
|
joinOrgPath: joinItem.path.join(':'), |
|
|
|
} |
|
|
|
tableItem.joinOrgList.push(obj) |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
validata () { |
|
|
|
let message = '' |
|
|
|
console.log(this.tableData) |
|
|
|
@ -436,8 +436,8 @@ export default { |
|
|
|
|
|
|
|
oneData.isAutoInform = oneData.isAutoInformShow ? '1' : '0' |
|
|
|
|
|
|
|
if (oneData.actType === '' || oneData.holdTime || oneData.topic || oneData.address || oneData.publishPartyOrgId |
|
|
|
|| oneData.joinUserType || oneData.joinIdArray.length === 0) { |
|
|
|
if (oneData.actType === '' || oneData.holdTime === '' || oneData.topic === '' || oneData.address === '' || oneData.publishPartyOrgId === '' |
|
|
|
|| oneData.joinUserType === '' || oneData.joinIdArray.length === 0) { |
|
|
|
message = '第' + (i + 1) + "行填写不完整,请先填写完整!" |
|
|
|
break; |
|
|
|
} |
|
|
|
@ -448,15 +448,18 @@ export default { |
|
|
|
|
|
|
|
async handleDelete (row, tableIndex) { |
|
|
|
|
|
|
|
this.$confirm("确认删除?", "提示", { |
|
|
|
this.$confirm("活动删除后不可恢复,您确定要删除吗?", "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
|
|
|
|
if (row.icPartyActId) { |
|
|
|
this.icPartyActId = row.icPartyActId |
|
|
|
this.delPlan(tableIndex) |
|
|
|
} else { |
|
|
|
this.tableData.splice(tableIndex, 1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
@ -467,8 +470,28 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
async delPlan (tableIndex) { |
|
|
|
|
|
|
|
const url = "/resi/partymember/icPartyAct/del"; |
|
|
|
// const url = "http://yapi.elinkservice.cn/mock/245/resi/partymember/icPartyAct/del"; |
|
|
|
let params = [] |
|
|
|
params.push(this.icPartyActId) |
|
|
|
|
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.$message.success("删除成功!"); |
|
|
|
this.tableData.splice(tableIndex, 1); |
|
|
|
// this.getTableData(); |
|
|
|
} else { |
|
|
|
this.$message.error("操作失败!"); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
handleCancle () { |
|
|
|
this.$emit('dialogCancle') |
|
|
|
this.$emit('handleClose') |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
@ -502,8 +525,8 @@ export default { |
|
|
|
introduce: '',// 活动介绍 |
|
|
|
joinOrgList: [], |
|
|
|
|
|
|
|
// publichIdArray: this.defaultPublishParty.defaultPartyOrgPath.split(':'), |
|
|
|
publichIdArray: ['1536584227130798081'], |
|
|
|
publichIdArray: this.defaultPublishParty.defaultPartyOrgPath.split(':'), |
|
|
|
// publichIdArray: ['1536584227130798081'], |
|
|
|
joinIdArray: [], |
|
|
|
isAutoInformShow: true |
|
|
|
|
|
|
|
|