diff --git a/src/project/saas/AppCooperationPropaganda/scopedSelect.vue b/src/project/saas/AppCooperationPropaganda/scopedSelect.vue index 89abffeb..104213e7 100644 --- a/src/project/saas/AppCooperationPropaganda/scopedSelect.vue +++ b/src/project/saas/AppCooperationPropaganda/scopedSelect.vue @@ -125,6 +125,8 @@ export default { uni.$on("pagePicker:custom", res => { this.selectedUser = res }) + this.selectedUser = uni.getStorageSync('girdList') + this.deptListArr = uni.getStorageSync('deptList') }, } diff --git a/src/project/saas/AppCooperationPropaganda/selectGridMember.vue b/src/project/saas/AppCooperationPropaganda/selectGridMember.vue index 641fd88b..f3f181ff 100644 --- a/src/project/saas/AppCooperationPropaganda/selectGridMember.vue +++ b/src/project/saas/AppCooperationPropaganda/selectGridMember.vue @@ -48,7 +48,7 @@ export default { onLoad() { this.selected.id = this.$route.query.id this.getAllGrids() - this.selected = uni.getStorageSync('userSelect') || [] + this.selected = uni.getStorageSync('girdSelect') || [] }, onShow() { document.title = '选择人员' @@ -73,7 +73,8 @@ export default { }, getGridsAndUsersByParent(id) { - this.treeList = this.allData.filter(e => (e.parentGirdId == id)) + this.treeList = this.allData.filter(e => (e.parentGirdId == id)).map(v=> ({...v,isChecked:this.selected.find(i=>i.id == v.id)})) + this.treeList this.$forceUpdate() }, girdNameClick(row, index) { @@ -94,6 +95,7 @@ export default { let index=this.selected.findIndex(item=>row.id===item.id) index >= 0 && this.selected.splice(index, 1) } + uni.setStorageSync('girdSelect', this.selected) this.$forceUpdate() }, diff --git a/src/project/saas/AppCooperationPropaganda/sendScoped.vue b/src/project/saas/AppCooperationPropaganda/sendScoped.vue index 131c4789..d0eda8fd 100644 --- a/src/project/saas/AppCooperationPropaganda/sendScoped.vue +++ b/src/project/saas/AppCooperationPropaganda/sendScoped.vue @@ -7,9 +7,9 @@
{{ item.name }}
-
-
已选择{{ 1 }}名成员
-
已选择{{ 2 }}名成员
+
+
已选择{{ deptSelect.length }}个部门
+
已选择{{ girdSelect.length }}个网格
@@ -30,7 +30,7 @@ export default { return { value: '', checkList: [ - { name: '全部居民群', checked: false, value: '0'}, + { name: '全部居民群', checked: true, value: '0'}, { name: '按部门选择', checked: false, value: '1'}, { name: '按网格选择', checked: false, value: '2' } ], @@ -58,43 +58,49 @@ export default { this.getWxGroups() uni.setStorageSync('sendScope', this.sendScope) uni.navigateBack({ - success: () => { - uni.$emit("checkedScope",{ sendScope: this.sendScope }); - } + // success: () => { + // uni.$emit("checkedScope",{ sendScope: this.sendScope }); + // } }) }, getWxGroups() { this.$http.post(`/app/appmasssendingtask/queryWxGroups?sendScope=${this.sendScope}`, - // null, - // { - // data: { - // filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',') - // }, - // headers: {'Content-Type': 'application/json;charset=utf-8'}, - // transformRequest: [function(data) { - // console.log(data); - // return data.filterCriteria - // }] - // }).then(res => { - // if (res.code === 0) { - // this.wxGroups = res.data - // } - // }) + null, { - filterCriteria: '' - + data: { + filterCriteria: this.girdListIds.join(',') || this.deptListIds.join(',') + }, + headers: {'Content-Type': 'application'}, + transformRequest: [function(data) { + return data.filterCriteria + }] }).then(res => { if (res.code === 0) { 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.map(i=> i.value ==this.sendScope) + this.sendScope = uni.getStorageSync('sendScope') || '' + this.checkList.forEach(i=> { + return { + name: i.name, + value: i.value, + // checked: this.sendScope.find(v=>(i.value==v)) + } + }) }, onShow() { diff --git a/src/project/saas/AppCooperationPropaganda/tagsList.vue b/src/project/saas/AppCooperationPropaganda/tagsList.vue index 43ce8345..4a1d4d8d 100644 --- a/src/project/saas/AppCooperationPropaganda/tagsList.vue +++ b/src/project/saas/AppCooperationPropaganda/tagsList.vue @@ -3,7 +3,6 @@
{{ items.name }}
-