|
|
|
@ -220,7 +220,7 @@ export default { |
|
|
|
actType: '',// 活动类型,来源于活动类型接口value |
|
|
|
holdYearId: '',//活动开始时间所属年份:yyyy |
|
|
|
holdMonthId: '',//活动开始时间所属月份:yyyyMM |
|
|
|
holdTime: new Date(),//活动开始时间:yyyy-MM-dd HH:mm:ss |
|
|
|
holdTime: this.getFormatDate(),//活动开始时间:yyyy-MM-dd HH:mm:ss |
|
|
|
topic: '',// 活动主题 |
|
|
|
address: '',// 活动地址 |
|
|
|
latitude: '',//活动地点纬度 |
|
|
|
@ -288,7 +288,20 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
|
|
getFormatDate() { |
|
|
|
var date = new Date(); |
|
|
|
var month = date.getMonth() + 1; |
|
|
|
var strDate = date.getDate(); |
|
|
|
if (month >= 1 && month <= 9) { |
|
|
|
month = "0" + month; |
|
|
|
} |
|
|
|
if (strDate >= 0 && strDate <= 9) { |
|
|
|
strDate = "0" + strDate; |
|
|
|
} |
|
|
|
var currentDate = date.getFullYear() + "-" + month + "-" + strDate |
|
|
|
+ " " + '09:00:00'; |
|
|
|
return currentDate; |
|
|
|
}, |
|
|
|
handleChangeScope (value) { |
|
|
|
|
|
|
|
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data |
|
|
|
@ -311,6 +324,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() |
|
|
|
|
|
|
|
@ -358,7 +373,9 @@ export default { |
|
|
|
this.formData.isAutoInform = '0' |
|
|
|
} |
|
|
|
this.formData.attachmentList = [...this.fileList] |
|
|
|
|
|
|
|
let array = this.formData.holdTime.split('-') |
|
|
|
this.formData.holdYearId = array[0] |
|
|
|
this.formData.holdMonthId = array[0] + array[1] |
|
|
|
|
|
|
|
if (this.formType === 'add') { |
|
|
|
this.formData.icPartyActId = '' |
|
|
|
@ -395,6 +412,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 +427,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 +458,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" |
|
|
|
|