性别
全部
@@ -54,12 +55,13 @@ export default {
data() {
return {
type: "",
+ sendType: '',
showCalendar: false,
startTime: '',
endTime: '',
sex: "0",
userList: [],
- userListIds: [],
+ deptListArr: [],
selectedUser: []
}
},
@@ -78,12 +80,11 @@ export default {
this.selectEnterpriseContact({
fromDepartmentId: 0,
mode: "multi",
- type: ["user"],
- selectedUserIds: this.userListIds?.map(e => e.id)
+ type: ["department"],
+ selectedUserIds: this.deptListArr?.map(e => e.id)
}).then((res)=>{
if(res?.userList) {
- this.userListIds = res.userList
- console.log(this.userListIds,'userListIds');
+ this.deptListArr = res.userList
}
}
).catch((err) => {
@@ -103,19 +104,28 @@ export default {
// 选时间范围
selectDate(e) {
- console.log(e);
this.startTime = e.startDate
this.endTime = e.endDate
},
- submit() {}
+ submit() {
+ uni.setStorageSync('girdList',this.selectedUser)
+ uni.setStorageSync('deptList',this.deptListArr)
+ uni.navigateBack({
+ success: () => {
+ uni.$emit("girdList", this.selectedUser)
+ uni.$emit("deptList", this.deptListArr)
+ }
+ })
+ }
},
onLoad(o) {
this.type = o.type;
+ this.sendType = o.sendType;
document.title = this.type == 1? '按部门选择':'按网格选择'
uni.$on("pagePicker:custom", res => {
this.selectedUser = res
})
- }
+ },
}
diff --git a/src/project/saas/AppCooperationPropaganda/selectGridMember.vue b/src/project/saas/AppCooperationPropaganda/selectGridMember.vue
index 5b3e75ed..641fd88b 100644
--- a/src/project/saas/AppCooperationPropaganda/selectGridMember.vue
+++ b/src/project/saas/AppCooperationPropaganda/selectGridMember.vue
@@ -67,18 +67,13 @@ export default {
this.treeList = this.allData.filter(e => !e.parentGirdId)
this.selectGridPath = [{girdName: "可选范围", id: ''}]
},
- itemClick({id,girdName,isChecked}) {
+ itemClick({id,girdName}) {
this.selectGridPath.push({girdName,id})
- this.getGridsAndUsersByParent(id,isChecked)
+ this.getGridsAndUsersByParent(id)
},
- getGridsAndUsersByParent(id,checkType) {
- if(checkType) {
- this.selected.push(this.treeList)
- }
- this.treeList = this.allData.filter(e => (e.parentGirdId == id)).map(v=>
- ({...v,isChecked: this.selected.find(i=> i.id==v.id)}))
-
+ getGridsAndUsersByParent(id) {
+ this.treeList = this.allData.filter(e => (e.parentGirdId == id))
this.$forceUpdate()
},
girdNameClick(row, index) {
diff --git a/src/project/saas/AppCooperationPropaganda/sendScoped.vue b/src/project/saas/AppCooperationPropaganda/sendScoped.vue
index 1d55d328..131c4789 100644
--- a/src/project/saas/AppCooperationPropaganda/sendScoped.vue
+++ b/src/project/saas/AppCooperationPropaganda/sendScoped.vue
@@ -30,15 +30,19 @@ export default {
return {
value: '',
checkList: [
- { name: '全部居民群', checked: true, value: '0'},
+ { name: '全部居民群', checked: false, value: '0'},
{ name: '按部门选择', checked: false, value: '1'},
{ name: '按网格选择', checked: false, value: '2' }
],
showContent: false,
- type: '',
+ sendType: '',
deptSelect: [],
girdSelect: [],
sendScope: '0',
+ girdListIds: [],
+ deptListIds: [],
+ wxGroups: [],
+ groupNames: [],
}
},
methods: {
@@ -46,22 +50,61 @@ export default {
this.checkList.forEach(v=> v.checked = false)
e.checked = true
if(e.value == '1' || e.value == '2') {
- uni.navigateTo({url: `./scopedSelect?type=${e.value}`})
+ uni.navigateTo({url: `./scopedSelect?type=${e.value}&sendType=${this.sendType}`})
}
this.sendScope = e.value
},
submit() {
+ this.getWxGroups()
+ uni.setStorageSync('sendScope', this.sendScope)
uni.navigateBack({
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
+ // }
+ // })
+ {
+ filterCriteria: ''
+
+ }).then(res => {
+ if (res.code === 0) {
+ this.wxGroups = res.data
+ }
+ })
+ },
},
onLoad(o) {
- this.type = o.type;
+ this.sendType = o.type;
document.title = "选择发送范围"
+ this.sendScope = uni.getStorageSync('sendScope')
+ // this.checkList.map(i=> i.value ==this.sendScope)
+
},
+ onShow() {
+ uni.$on("girdList",res => {
+ this.girdListIds = res.map(e=>e.id)
+ })
+ uni.$on("deptList",res => {
+ this.deptListIds = res.map(e=>e.id)
+ })
+ }
}