列表
This commit is contained in:
@@ -65,27 +65,25 @@ export default {
|
||||
submit() {
|
||||
if(this.sendType == 'ResidentsGroup') {
|
||||
this.getWxGroups()
|
||||
} else if(this.sendType == 'Residents') {
|
||||
this.getResidents()
|
||||
} else if(this.sendType == 'CircleOfFriends') {
|
||||
this.getCircleOfFriends()
|
||||
} else if(this.sendType == 'Residents' || this.sendType == 'CircleOfFriends') {
|
||||
this.getSendScope()
|
||||
}
|
||||
|
||||
uni.setStorageSync('sendScope', this.sendScope)
|
||||
setTimeout(() => {
|
||||
// setTimeout(() => {
|
||||
uni.navigateBack({
|
||||
success: () => {
|
||||
uni.$emit('predictUser', this.wxGroups)
|
||||
}
|
||||
// success: () => {
|
||||
// uni.$emit('predictUser', this.wxGroups)
|
||||
// }
|
||||
})
|
||||
}, 1000)
|
||||
// }, 1000)
|
||||
|
||||
},
|
||||
// 群发居民群
|
||||
getWxGroups() {
|
||||
this.$http.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.sendScope}`,
|
||||
{
|
||||
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',')
|
||||
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',') || ''
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.wxGroups = res.data
|
||||
@@ -93,37 +91,33 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 群发居民
|
||||
getResidents() {
|
||||
const tags = this.ResidentTags.join(',')
|
||||
const removeTags = this.ResidentTagsRemove.join(',')
|
||||
this.$http.post(`/app/whchatmomentstask/getCustomerGroups?sendScope=${this.sendScope}&addFromTime=${this.startTime}&addEndTime=${this.endTime}&gender=${this.sex}&filteTags=${tags}&excludeFilterTags=${removeTags}`,
|
||||
{
|
||||
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(','),
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
// this.groupList = res.data
|
||||
// uni.setStorageSync('groupList', this.groupList)
|
||||
this.wxGroups = res.data
|
||||
uni.setStorageSync('wxGroupsUser', this.wxGroups)
|
||||
// 群发朋友圈、居民
|
||||
getSendScope() {
|
||||
let formData = {}
|
||||
if(this.sendScope == 0) {
|
||||
formData = {
|
||||
sendScope: this.sendScope,
|
||||
taskType: this.sendType == 'Residents'? 1:0,
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// const array1 = [{name:'zs',num: 1},{name:'zls',num: 5},{name:'azs',num: 4}]
|
||||
// const sum = array1.reduce((pre, cur) => pre + cur.num, 0)
|
||||
// console.log(sum)
|
||||
|
||||
// 群发朋友圈
|
||||
getCircleOfFriends() {
|
||||
this.$http.post(`/app/whchatmomentstask/getExecutors?sendScope=${this.sendScope}`,
|
||||
{
|
||||
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',')
|
||||
}).then(res => {
|
||||
} else if(this.sendScope == 1 || this.sendScope == 2) {
|
||||
formData = {
|
||||
filterCriteria: this.girdListIds.toString() || this.deptListIds.toString() || '',
|
||||
sendScope: this.sendScope,
|
||||
tags: this.ResidentTags.toString() || this.circleTags.toString() || '',
|
||||
excludeTags: this.ResidentTagsRemove.toString() || this.circleTagsRemove.toString() || '',
|
||||
addFromTime: this.startTime,
|
||||
addEndTime: this.endTime,
|
||||
gender: this.sex,
|
||||
taskType: this.sendType == 'Residents'? 1:0,
|
||||
}
|
||||
}
|
||||
this.$http.post(`/app/whchatmomentstask/getSendScope`,{...formData}).then(res => {
|
||||
if (res.code === 0) {
|
||||
// this.executorList = res.data
|
||||
// uni.setStorageSync('executorList', this.executorList)
|
||||
this.wxGroups = res.data
|
||||
if(this.sendType == 'Residents') {
|
||||
this.wxGroups = res.data
|
||||
} else if(this.sendType == 'CircleOfFriends') {
|
||||
this.wxGroups = res.data
|
||||
}
|
||||
uni.setStorageSync('wxGroupsUser', this.wxGroups)
|
||||
}
|
||||
})
|
||||
@@ -148,14 +142,14 @@ export default {
|
||||
if(this.sendType == 'Residents') {
|
||||
this.ResidentTags = uni.getStorageSync('ResidentTags') // 居民包含
|
||||
this.ResidentTagsRemove = uni.getStorageSync('ResidentTagsRemove') // 居民剔除
|
||||
}
|
||||
} else if(this.sendType == 'CircleOfFriends') {
|
||||
this.circleTags = uni.getStorageSync('circleTags') // 朋友圈包含
|
||||
this.circleTagsRemove = uni.getStorageSync('circleTagsRemove') // 朋友圈剔除
|
||||
}
|
||||
// 时间
|
||||
this.startTime = uni.getStorageSync('startTime')
|
||||
this.endTime = uni.getStorageSync('endTime')
|
||||
// else if(this.sendType == 'CircleOfFriends') {
|
||||
// this.circleTags = uni.getStorageSync('circleTags') // 朋友圈包含
|
||||
// this.circleTagsRemove = uni.getStorageSync('circleTagsRemove') // 朋友圈剔除
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user