标签问题

This commit is contained in:
shijingjing
2023-03-02 17:10:18 +08:00
parent d4edd7d0aa
commit 06db47cb0f
4 changed files with 53 additions and 45 deletions

View File

@@ -40,10 +40,10 @@ export default {
deptListIds: [],
wxGroups: [], // 居民群,居民,朋友圈
sex: '',
circleTags: '',
ResidentTags: '',
ResidentTagsRemove: '',
circleTagsRemove: '',
ResidentTags: [],
ResidentTagsRemove: [],
circleTags: [],
circleTagsRemove: [],
startTime: '',
endTime: '',
}
@@ -95,11 +95,22 @@ export default {
taskType: this.sendType == 'Residents'? 1:0,
}
} else if(this.sendScope == 1 || this.sendScope == 2) {
let resTags='', cirTags='', resRemove='', cirRemove=''
if(this.ResidentTags.length) {
resTags = this.ResidentTags?.map(e=> e.id).toString()
} else if(this.circleTags.length) {
cirTags = this.circleTags?.map(e=> e.id).toString()
} else if(this.ResidentTagsRemove.length) {
resRemove = this.ResidentTagsRemove?.map(e=> e.id).toString() || ''
} else if(this.circleTagsRemove.length) {
cirRemove = this.circleTagsRemove?.map(e=> e.id).toString() || ''
}
formData = {
filterCriteria: this.girdListIds.toString() || this.deptListIds.toString() || '',
sendScope: this.sendScope,
tags: this.ResidentTags || this.circleTags || '',
excludeTags: this.ResidentTagsRemov || this.circleTagsRemove || '',
tags: resTags || cirTags,
excludeTags: resRemove || cirRemove,
addFromTime: this.startTime,
addEndTime: this.endTime,
gender: this.sex,
@@ -142,11 +153,11 @@ export default {
this.sex = uni.getStorageSync('gender')
// 标签
if(this.sendType == 'Residents') {
this.ResidentTags = uni.getStorageSync('ResidentTags').toString() // 居民包含
this.ResidentTagsRemove = uni.getStorageSync('ResidentTagsRemove').toString() // 居民剔除
this.ResidentTags = uni.getStorageSync('ResidentTags') // 居民包含
this.ResidentTagsRemove = uni.getStorageSync('ResidentTagsRemove') // 居民剔除
} else if(this.sendType == 'CircleOfFriends') {
this.circleTags = uni.getStorageSync('circleTags').toString() // 朋友圈包含
this.circleTagsRemove = uni.getStorageSync('circleTagsRemove').toString() // 朋友圈剔除
this.circleTags = uni.getStorageSync('circleTags') // 朋友圈包含
this.circleTagsRemove = uni.getStorageSync('circleTagsRemove') // 朋友圈剔除
}
// 时间
this.startTime = uni.getStorageSync('startTime')