消息推送

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 => ({
var deptList = Object.keys(result).map(corpId => {
let res
if (result[corpId]) {
res = {
corpId,
objList: result[corpId],
tagId: tags[corpId]?.tagIdList
}))
objList: result[corpId]
}
if (tags[corpId]?.tagIdList) {
res.tagId = tags[corpId]?.tagIdList
}
}
return res
}).filter(e => !!e)
console.log(deptList)

View File

@@ -121,6 +121,9 @@ export default {
// })
// uni.$emit("selectDept", [this.selected].flat())
console.log([this.selected].flat())
if(![this.selected].flat().length) {
return this.$u.toast('请选择部门或人员')
}
uni.$emit("pagePicker:custom", [this.selected].flat())
uni.setStorageSync('selectDeptUser', [this.selected].flat())
uni.navigateTo({url: `./selectTag`})

View File

@@ -85,7 +85,7 @@ export default {
this.showTagList=false
},
getTagList(id) {
var url = this.sendType == 1 ? `/app/wxcp/wxcorptag/listAllByCorp?dvcpCorpId=${id}` : `/app/wxcp/wxgroupchattag/listAllByCorp?dvcpCorpId=${id}`
var url = this.sendType == 1 ? `/app/wxcp/wxcorptag/listAllByCorp?dvcpCorpId=${id}&size=1000` : `/app/wxcp/wxgroupchattag/listAllByCorp?dvcpCorpId=${id}&size=1000`
this.$http.post(url).then(res => {
if (res?.code == 0) {
res.data.records.map((item) => {
@@ -125,6 +125,7 @@ export default {
var list = uni.getStorageSync('selectDeptUser')
this.sendType = uni.getStorageSync('sendType')
list.map((item) => {
item.tagIdList = []
if(item.kind == 'dept') {
this.deptList.push(item)
}else {