消息推送

This commit is contained in:
liuye
2022-06-24 23:10:12 +08:00
parent f766e65cd5
commit 2948b35a13
3 changed files with 23 additions and 7 deletions

View File

@@ -87,7 +87,7 @@ export default {
form: {
content: '',
contentType: 'text',
sendType: '1',
sendType: '0',
},
formData: {
fileListImg: [],
@@ -122,6 +122,8 @@ export default {
radioGroupChange(e) {
this.form.sendType = e
uni.setStorageSync('sendType', e)
this.deptUserTagList = []
this.deptUserList = []
},
toSelect() {
uni.navigateTo({url: `./SelectUser?tagIdList=${this.tagIdList}&areaList=${this.areaIdList}`})
@@ -148,6 +150,7 @@ export default {
let result = {}, tags = {}
this.deptUserTagList.map(e => {
let {kind, id, tagIdList} = e
console.log([result[e.corpId], {kind, id}].flat())
result[e.corpId] = [result[e.corpId], {kind, id}].flat()
if (tagIdList) {
tags[e.corpId] = [tags[e.corpId], {tagIdList}].flat()
@@ -155,11 +158,20 @@ export default {
})
console.log(result, tags)
var deptList = Object.keys(result).map(corpId => ({
corpId,
objList: result[corpId],
tagId: tags[corpId]?.tagIdList
}))
var deptList = Object.keys(result).map(corpId => {
let res
if (result[corpId]) {
res = {
corpId,
objList: result[corpId]
}
if (tags[corpId]?.tagIdList) {
res.tagId = tags[corpId]?.tagIdList
}
}
return res
}).filter(e => !!e)
console.log(deptList)