@@ -59,10 +72,14 @@ export default {
showCalendar: false,
startTime: '',
endTime: '',
- sex: "0",
+ sex: 0, // 性别:0-女、1-男、2-全部
userList: [],
deptListArr: [],
- selectedUser: []
+ selectedUser: [],
+ circleTags: [], // 朋友圈包含标签
+ circleTagsRemove: [], // 朋友圈剔除标签
+ ResidentTags: [], // 居民包含标签
+ ResidentTagsRemove: [], // 居民剔除标签
}
},
methods: {
@@ -92,22 +109,20 @@ export default {
})
},
+ // 选择包含、剔除的标签 0包含 1剔除
toTagsList(e) {
- uni.navigateTo({url: `./tagsList?type=${e}`})
+ uni.navigateTo({url: `./tagsList?type=${e}&sendType=${this.sendType}`})
},
- // 选包含标签
- // selectTags() {},
-
- // 选剔除标签
- // deleteTags() {},
-
// 选时间范围
selectDate(e) {
this.startTime = e.startDate
this.endTime = e.endDate
},
submit() {
+ uni.setStorageSync('gender',this.sex)
+ uni.setStorageSync('startTime', this.startTime)
+ uni.setStorageSync('endTime', this.endTime)
uni.setStorageSync('deptList',this.deptListArr)
uni.navigateBack()
}
@@ -118,8 +133,22 @@ export default {
document.title = this.type == 1? '按部门选择':'按网格选择'
},
onShow() {
+ // 网格或者部门
this.selectedUser = uni.getStorageSync('girdSelect')
this.deptListArr = uni.getStorageSync('deptList')
+ // 添加时间
+ this.startTime = uni.getStorageSync('startTime')
+ this.endTime = uni.getStorageSync('endTime')
+ // 标签
+ 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.sex = uni.getStorageSync('gender')
}
}
diff --git a/src/apps/AppCooperationPropaganda/sendScoped.vue b/src/apps/AppCooperationPropaganda/sendScoped.vue
index 2490ce15..e11ea756 100644
--- a/src/apps/AppCooperationPropaganda/sendScoped.vue
+++ b/src/apps/AppCooperationPropaganda/sendScoped.vue
@@ -3,14 +3,14 @@
-
+
已选择{{ deptSelect.length }}个部门
已选择{{ girdSelect.length }}个网格
-
+
@@ -39,21 +39,41 @@ export default {
sendScope: '0',
girdListIds: [],
deptListIds: [],
- wxGroups: [],
- groupNames: [],
+ wxGroups: [], // 居民群,居民,朋友圈
+ sex: '',
+ // groupList: [], // 居民
+ // executorList: [], // 朋友圈
+ ResidentTags: [],
+ ResidentTagsRemove: [],
+ startTime: '',
+ endTime: '',
}
},
methods: {
checkBtn(e) {
- this.checkList.forEach(v=> v.checked = false)
- e.checked = true
+ // this.checkList.forEach(v=> v.checked = false)
+ // e.checked = true
+
if(e.value == '1' || e.value == '2') {
uni.navigateTo({url: `./scopedSelect?type=${e.value}&sendType=${this.sendType}`})
+
}
- this.sendScope = e.value
+ this.sendScope = e.value;
+ uni.setStorageSync('sendScope', this.sendScope)
+ // uni.clearStorageSync('ResidentTags')
+ // uni.clearStorageSync('ResidentTagsRemove')
+ // uni.clearStorageSync('circleTags')
+ // uni.clearStorageSync('circleTagsRemove')
},
submit() {
- this.getWxGroups()
+ if(this.sendType == 'ResidentsGroup') {
+ this.getWxGroups()
+ } else if(this.sendType == 'Residents') {
+ this.getResidents()
+ } else if(this.sendType == 'CircleOfFriends') {
+ this.getCircleOfFriends()
+ }
+
uni.setStorageSync('sendScope', this.sendScope)
setTimeout(() => {
uni.navigateBack({
@@ -64,6 +84,7 @@ export default {
}, 4000)
},
+ // 群发居民群
getWxGroups() {
this.$http.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.sendScope}`,
{
@@ -72,26 +93,68 @@ export default {
if (res.code === 0) {
this.wxGroups = res.data
uni.setStorageSync('wxGroupsUser', this.wxGroups)
- console.log(this.wxGroups,res.data);
}
})
},
+ // 群发居民
+ 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)
+ }
+ })
+ },
+ // 群发朋友圈
+ getCircleOfFriends() {
+ this.$http.post(`/app/whchatmomentstask/getExecutors?sendScope=${this.sendScope}`,
+ {
+ filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',')
+ }).then(res => {
+ if (res.code === 0) {
+ // this.executorList = res.data
+ // uni.setStorageSync('executorList', this.executorList)
+ this.wxGroups = res.data
+ uni.setStorageSync('wxGroupsUser', this.wxGroups)
+ }
+ })
+ }
},
onLoad(o) {
this.sendType = o.type;
document.title = "选择发送范围"
- // this.checkList.forEach(i=> {
- // return {
- // name: i.name,
- // value: i.value,
- // checked: this.sendScope.find(v=>(i.value==v))
- // }
- // })
},
onShow() {
this.sendScope = uni.getStorageSync('sendScope') || ''
- this.girdListIds = uni.getStorageSync('girdSelect').map(e=>e.id) || []
- this.deptListIds = uni.getStorageSync('deptList').map(v=>v.id) || []
+ const girdArr = uni.getStorageSync('girdSelect')
+ if(girdArr.length) {
+ this.girdListIds = girdArr.map(e=>e.id)
+ }
+ const deptArr = uni.getStorageSync('deptList')
+ 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') // 居民剔除
+ }
+ // 时间
+ this.startTime = uni.getStorageSync('startTime')
+ // console.log(this.startTime, '哈哈哈哈');
+ this.endTime = uni.getStorageSync('endTime')
+ // else if(this.sendType == 'CircleOfFriends') {
+ // this.circleTags = uni.getStorageSync('circleTags') // 朋友圈包含
+ // this.circleTagsRemove = uni.getStorageSync('circleTagsRemove') // 朋友圈剔除
+ // }
}
}
diff --git a/src/apps/AppCooperationPropaganda/tagsList.vue b/src/apps/AppCooperationPropaganda/tagsList.vue
index 4a1d4d8d..2537f795 100644
--- a/src/apps/AppCooperationPropaganda/tagsList.vue
+++ b/src/apps/AppCooperationPropaganda/tagsList.vue
@@ -23,67 +23,17 @@ export default {
name: "tagsList",
data() {
return {
- subTags: [
- {
- id: "1",
- name: "第一组",
- tagList: [
- {
- id: "1.1",
- name: "介绍的",
- },
- {
- id: "1.2",
- name: "介绍的啊塑胶地板",
- },
- {
- id: "1.3",
- name: "介绍的",
- },
- {
- id: "1.4",
- name: "介绍的啊啊啊啊啊啊啊啊",
- },
- {
- id: "1.5",
- name: "介绍的啊啊啊",
- },
- {
- id: "1.6",
- name: "介绍的红红火火恍恍惚惚或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或",
- },
- {
- id: "1.7",
- name: "介绍的红红火火恍恍惚惚或或或或或或或或或或或或红红火火恍恍惚惚或或或或或或或",
- },
- ]
- },
- {
- id: "2",
- name: "第二组",
- tagList: [
- {
- id: "2.2",
- name: "的范德萨发",
- }
- ]
- }
- ],
+ sendType: '',
+ subTags: [],
checked: [],
- list: []
+ type: '',
}
},
methods: {
getTags() {
- this.$http.post(`/app/wxcp/wxcorptag/listAll`).then(res => {
+ this.$http.post(`/app/wxcp/wxcorptag/listAll?current=1&size=3000`).then(res => {
if (res?.data) {
- console.log(res);
- // this.subTags = res.data.map(item => {
- // return {
- // dictName: item.name,
- // dictValue: item.id
- // }
- // })
+ this.subTags = res.data.records
}
})
},
@@ -101,20 +51,47 @@ export default {
return this.$u.toast('请选择标签')
}
- const list = this.list.filter(v => {
- return this.checked.includes(v.id)
- })
-
- uni.$emit('onChecked', list)
+ // const list = this.subTags.filter(v => {
+ // return this.checked.includes(v.id)
+ // })
+ if(this.sendType == 'Residents') {
+ if(this.type == '0') { // 居民包含
+ uni.setStorageSync('ResidentTags', this.checked)
+ } else if(this.type == '1') { // 居民剔除
+ uni.setStorageSync('ResidentTagsRemove', this.checked)
+ }
+ } else if(this.sendType == 'CircleOfFriends') {
+ if(this.type == '0') { // 朋友圈包含
+ uni.setStorageSync('circleTags', this.checked)
+ } else if(this.type == '1') { // 朋友圈剔除
+ uni.setStorageSync('circleTagsRemove', this.checked)
+ }
+ }
uni.navigateBack()
}
},
onShow() {
this.getTags()
+ this.checked = []
+ if(this.sendType == 'Residents') {
+ if(this.type == 0) { // 居民包含
+ this.checked = uni.getStorageSync('ResidentTags') || []
+ } else { // 居民剔除
+ this.checked = uni.getStorageSync('ResidentTagsRemove') || []
+ }
+ } else if(this.sendType == 'CircleOfFriends') {
+ if(this.type == 0) { // 朋友圈包含
+ this.checked = uni.getStorageSync('circleTags') || []
+ } else { // 朋友圈剔除
+ this.checked = uni.getStorageSync('circleTagsRemove') || []
+ }
+ }
},
onLoad(o) {
document.title = o.type ==0? '包含标签': '剔除标签'
+ this.sendType = o.sendType
+ this.type = o.type
}
}