|
|
|
@ -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" |
|
|
|
|