群发居民群
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<div><span class="color_red">*</span><span class="title">发送范围</span></div>
|
||||
<div @click="toSleectScoped">
|
||||
<span>
|
||||
<span class="color_gray" v-if="!form.sendScope || sum==0">请选择</span>
|
||||
<span class="color_gray" v-if="!form.wxGroups || sum==0">请选择</span>
|
||||
<span v-if="type=='ResidentsGroup' && form.wxGroups.length">预计送达{{ form.wxGroups.length }}名成员</span>
|
||||
<span v-if="type!='ResidentsGroup' && sum != 0">预计送达{{ sum }}名成员</span>
|
||||
<u-icon name="arrow-right" color="#CCD0D3"></u-icon>
|
||||
@@ -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')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user