diff --git a/src/project/huizhili/AppCooperationPropaganda/addPropaganda.vue b/src/project/huizhili/AppCooperationPropaganda/addPropaganda.vue index 8940e5e2..1bf4f115 100644 --- a/src/project/huizhili/AppCooperationPropaganda/addPropaganda.vue +++ b/src/project/huizhili/AppCooperationPropaganda/addPropaganda.vue @@ -9,7 +9,7 @@
*发送范围
- 请选择 + 请选择 预计送达{{ form.wxGroups.length }}名成员 预计送达{{ sum }}名成员 @@ -192,7 +192,11 @@ export default { sendScope: '', // 0:全部居民群、1:按部门选择、2:按网格选择 sendType: '0', // 0:立即发送、1:定时发送 gender: '', // 性别:0-女、1-男、2-全部 - filterCriteria: '' + filterCriteria: '', + filterTags: [], //过滤标签id集合 + excludeFilterTags: [], // 剔除标签集合 + addFromTime: '', + addEndTime: '', }, enableExamine: false, isTimedTask: false, @@ -255,8 +259,15 @@ export default { upload: [], midiaIds: [], sum: '', - girdListIds: [], - deptListIds: [], + // 筛选条件 + girdListIds: [], // 网格id集合 + deptListIds: [], // 部门id集合 + ResidentTags: [], // 居民包含 + ResidentTagsRemove: [], // 居民剔除 + circleTags: [], // 朋友圈包含 + circleTagsRemove: [], // 朋友圈剔除 + startTime: '', + endTime: '', } }, methods: { @@ -469,14 +480,11 @@ export default { if(this.type=='Residents') { url = `/app/whchatmomentstask/addOrUpdate` this.forms.filterCriteria = this.girdListIds.toString() || this.deptListIds.toString() || '' - this.forms.filterTags = '' - this.forms.excludeFilterTags = '剔除标签' - formData = this.forms - } else if(this.type=='CircleOfFriends') { - url = `/app/whchatmomentstask/addOrUpdate` - this.forms.filterCriteria = this.girdListIds.toString() || this.deptListIds.toString() || '' - this.forms.filterTags = '过滤标签' - this.forms.excludeFilterTags = '剔除标签' + this.forms.filterTags = this.ResidentTags.toString() || this.circleTags.toString() || '' + this.forms.excludeFilterTags = this.ResidentTagsRemove.toString() || this.circleTagsRemove.toString() || '' + this.forms.gender = this.sex + this.forms.addFromTime = this.startTime + this.forms.addEndTime = this.endTime formData = this.forms } else if(this.type=='ResidentsGroup') { url = `/app/appmasssendingtask/addOrUpdate` @@ -488,7 +496,7 @@ export default { this.flag = false this.$u.toast("新增成功") setTimeout(() => { - navigateBack() + uni.navigateBack() }, 600) } }).catch((err)=>{ @@ -549,6 +557,19 @@ export default { if(deptArr.length) { this.deptListIds = deptArr.map(v=>v.id) } + // 性别 + this.sex = uni.getStorageSync('gender') + // 标签 + 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') } } diff --git a/src/project/huizhili/AppCooperationPropaganda/sendScoped.vue b/src/project/huizhili/AppCooperationPropaganda/sendScoped.vue index 12b29bac..95f5a0b4 100644 --- a/src/project/huizhili/AppCooperationPropaganda/sendScoped.vue +++ b/src/project/huizhili/AppCooperationPropaganda/sendScoped.vue @@ -56,19 +56,14 @@ export default { }, submit() { if(this.sendType == 'ResidentsGroup') { - this.getWxGroups().then(()=>{ - setTimeout(() => { - uni.navigateBack() - }, 600) - }) + this.getWxGroups() } else if(this.sendType == 'Residents' || this.sendType == 'CircleOfFriends') { - this.getSendScope().then(()=>{ - setTimeout(() => { - uni.navigateBack() - }, 600) - }) + this.getSendScope() } uni.setStorageSync('sendScope', this.sendScope) + setTimeout(() => { + uni.navigateBack() + }, 600) }, // 群发居民群 getWxGroups() { @@ -120,6 +115,7 @@ export default { }, onShow() { this.sendScope = uni.getStorageSync('sendScope') || '' + // 部门、网格 const girdArr = uni.getStorageSync('girdSelect') if(girdArr.length) { this.girdListIds = girdArr.map(e=>e.id) @@ -128,6 +124,7 @@ export default { if(deptArr.length) { this.deptListIds = deptArr.map(v=>v.id) } + // 性别 this.sex = uni.getStorageSync('gender') // 标签 if(this.sendType == 'Residents') {