群发居民群

This commit is contained in:
shijingjing
2022-09-08 16:05:19 +08:00
parent cd3d85fe12
commit 8960553ceb
5 changed files with 109 additions and 83 deletions

View File

@@ -15,8 +15,6 @@
</div>
</div>
<AiConsole />
<div class="btn">
<div class="submitBtn" @click="submit">确定</div>
</div>
@@ -57,59 +55,43 @@ export default {
submit() {
this.getWxGroups()
uni.setStorageSync('sendScope', this.sendScope)
uni.navigateBack({
// success: () => {
// uni.$emit("checkedScope",{ sendScope: this.sendScope });
// }
})
setTimeout(() => {
uni.navigateBack({
success: () => {
uni.$emit('predictUser', this.wxGroups)
}
})
}, 4000)
},
getWxGroups() {
this.$http.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.sendScope}`,
null,
{
data: {
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',')
},
headers: {'Content-Type': 'application'},
transformRequest: [function(data) {
return data.filterCriteria
}]
filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',')
}).then(res => {
if (res.code === 0) {
this.wxGroups = res.data
uni.setStorageSync('wxGroupsUser', this.wxGroups)
console.log(this.wxGroups,res.data);
}
})
// {
// filterCriteria: ''
// }).then(res => {
// if (res.code === 0) {
// this.wxGroups = res.data
// }
// })
},
},
onLoad(o) {
this.sendType = o.type;
document.title = "选择发送范围"
this.sendScope = uni.getStorageSync('sendScope') || ''
this.checkList.forEach(i=> {
return {
name: i.name,
value: i.value,
// this.checkList.forEach(i=> {
// return {
// name: i.name,
// value: i.value,
// checked: this.sendScope.find(v=>(i.value==v))
}
})
// }
// })
},
onShow() {
uni.$on("girdList",res => {
this.girdListIds = res.map(e=>e.id)
})
uni.$on("deptList",res => {
this.deptListIds = res.map(e=>e.id)
})
this.sendScope = uni.getStorageSync('sendScope') || ''
this.girdListIds = uni.getStorageSync('girdSelect').map(e=>e.id) || []
this.deptListIds = uni.getStorageSync('deptList').map(v=>v.id) || []
}
}
</script>