jiangyy 3 years ago
parent
commit
851c737deb
  1. 50
      src/views/modules/communityParty/orgActivity/activivityList/addActivity.vue
  2. 25
      src/views/modules/communityParty/orgActivity/activivityList/addRule.vue

50
src/views/modules/communityParty/orgActivity/activivityList/addActivity.vue

@ -311,6 +311,8 @@ export default {
handleChangeJoinOrg (value) {
console.log('value', value)
console.log('joinIdArray', this.formData.joinIdArray)
this.formData.joinIdArray = []
this.formData.joinIdArray = value
this.formData.joinOrgList = []
let selArray = this.$refs["myCascader_join"].getCheckedNodes()
@ -395,6 +397,14 @@ export default {
this.formData.publichIdArray = []
if (data.publishOrgPathShow) {
this.formData.publichIdArray = data.publishOrgPathShow.split(':')
} else {
let array = data.publishOrgPath.split(':')
array.forEach(element => {
if (this.isInTree(element)) {
this.formData.publichIdArray.push(element)
}
});
}
this.formData.joinIdArray = []
@ -402,12 +412,25 @@ export default {
data.joinOrgList.forEach(element => {
if (element.joinOrgPathShow) {
this.formData.joinIdArray.push(element.joinOrgPathShow.split(':'))
} else {
let array = element.joinOrgPath.split(':')
let joinIdTemp = []
array.forEach(element => {
if (this.isInTree(element)) {
joinIdTemp.push(element)
}
});
this.formData.joinIdArray.push(joinIdTemp)
}
this.formData.joinNames = this.formData.joinNames + element.joinOrgName + ','
});
console.log('info-joinIdArray', this.formData.joinIdArray)
if (this.formData.joinNames) {
this.formData.joinNames = this.formData.joinNames.substring(0, this.formData.joinNames.length - 1)
}
@ -420,6 +443,33 @@ export default {
}
},
//id
isInTree (id) {
let inTree = false
const fn = (obj) => {
if (Array.isArray(obj)) {
obj.forEach((item) => {
//
if (item.id === id) {
inTree = true
} else {
}
fn(item.children);
});
}
};
fn(this.publishOptions);
return inTree
},
//
async getCategrayList () {
const url = "/resi/partymember/icPartyAct/acttypelist"

25
src/views/modules/communityParty/orgActivity/activivityList/addRule.vue

@ -299,6 +299,21 @@ export default {
handleChangeScope (index) {
let obj = this.$refs["myCascader" + index].getCheckedNodes()[0].data
// if (obj) {
// this.tableData[index].publishPartyOrgId = obj.id//id
// this.tableData[index].publishPartyOrgName = obj.partyOrgName//
// this.tableData[index].publishOrgPid = obj.pid//ID
// this.tableData[index].publishOrgType = obj.partyOrgType// 0,1,2,3,4,56
// this.tableData[index].publishOrgPathShow = value.join(':')//PUBLISH_PARTY_ORG_ID便
// } else {
// this.tableData[index].publishPartyOrgId = ''
// this.tableData[index].publishPartyOrgName = ''
// this.tableData[index].publishOrgPid = ''
// this.tableData[index].publishOrgType = ''
// this.tableData[index].publishOrgPathShow = ''
// }
},
handleChangeJoinOrg (value, index) {
@ -426,6 +441,16 @@ export default {
disposeParty () {
this.tableData.forEach((tableItem, index) => {
let obj = this.$refs["myCascader" + index].getCheckedNodes()[0]
//
tableItem.publishPartyOrgId = obj.data.id//id
tableItem.publishPartyOrgName = obj.data.partyOrgName//
tableItem.publishOrgPid = obj.data.pid//ID
tableItem.publishOrgType = obj.data.partyOrgType// 0,1,2,3,4,56
tableItem.publishOrgPathShow = obj.path.join(':')//PUBLISH_PARTY_ORG_ID便
//
tableItem.joinOrgList = []
let selJoinArray = this.$refs["myCascader_join" + index].getCheckedNodes()

Loading…
Cancel
Save