diff --git a/src/apps/AppDataScreening/AppDataScreening.vue b/src/apps/AppDataScreening/AppDataScreening.vue
index e52716c6..eaa70cea 100644
--- a/src/apps/AppDataScreening/AppDataScreening.vue
+++ b/src/apps/AppDataScreening/AppDataScreening.vue
@@ -20,6 +20,7 @@
+
diff --git a/src/apps/AppDataScreening/userDetail.vue b/src/apps/AppDataScreening/userDetail.vue
index 43873978..7ef3f8ed 100644
--- a/src/apps/AppDataScreening/userDetail.vue
+++ b/src/apps/AppDataScreening/userDetail.vue
@@ -23,6 +23,7 @@
+
diff --git a/src/apps/AppMessageNotification/AppMessageNotification.vue b/src/apps/AppMessageNotification/AppMessageNotification.vue
index e66833fb..cbffa7a9 100644
--- a/src/apps/AppMessageNotification/AppMessageNotification.vue
+++ b/src/apps/AppMessageNotification/AppMessageNotification.vue
@@ -137,25 +137,32 @@ export default {
}
},
confirm() {
- // if(!this.areaIdList.length) {
- // return this.$u.toast('请选择用户')
- // }
this.$loading()
- if(this.form.sendType == 1 && !this.form.sendTime) {
- return this.$u.toast('请选择群发时间')
+ if(!this.deptUserTagList.length) {
+ return this.$u.toast('请选择部门')
}
if(!this.form.content) {
return this.$u.toast('请输入文本内容')
}
- if(this.form.contentType == 'image' && !this.formData.fileList.length) {
- return this.$u.toast('请上传图片')
- }
- if(this.form.contentType == 'video' && !this.formData.fileList.length) {
- return this.$u.toast('请上传视频')
- }
- if(this.form.contentType == 'file' && !this.formData.fileList.length) {
- return this.$u.toast('请上传文件')
- }
+
+ let result = {}, tags = {}
+ this.deptUserTagList.map(e => {
+ let {kind, id, tagIdList} = e
+ result[e.corpId] = [result[e.corpId], {kind, id}].flat()
+ if (tagIdList) {
+ tags[e.corpId] = [tags[e.corpId], {tagIdList}].flat()
+ }
+ })
+
+ console.log(result, tags)
+ var deptList = Object.keys(result).map(corpId => ({
+ corpId,
+ objList: result[corpId],
+ tagId: tags[corpId]?.tagIdList
+ }))
+
+ console.log(deptList)
+
this.formData.fileList = []
var contentFile = {
content: this.form.content,
@@ -195,20 +202,15 @@ export default {
...this.form,
...this.formData,
areaId: this.areaIdList.join(','),
- tag: this.tagIdList.join(','),
+ deptList: deptList,
+ messageSource: this.sendType == 1 ? '1' : '2'
}
this.$http.post("/app/pushmessage/addOrUpdate", params).then(res => {
if (res?.code == 0) {
this.$u.toast('发送成功')
- this.form = {
- content: '',
- contentType: 'text',
- sendType: '0',
- sendTime: ''
- }
- this.areaIdList = []
- this.tagIdList = []
- this.formDataInit()
+ setTimeout(() => {
+ uni.navigateBack()
+ }, 500)
}else {
this.$u.toast(res.msg)
}
@@ -216,14 +218,6 @@ export default {
this.$u.toast(err)
})
},
- formDataInit() {
- for(let key in this.formData) {
- this.formData[key] = ''
- }
- this.formData.fileListImg = []
- this.formData.fileListVideo = []
- this.formData.fileListFile = []
- },
back() {
uni.navigateBack()
}
diff --git a/src/apps/AppMessageNotification/selectDeptUser.vue b/src/apps/AppMessageNotification/selectDeptUser.vue
index b381c50e..6a39c6a5 100644
--- a/src/apps/AppMessageNotification/selectDeptUser.vue
+++ b/src/apps/AppMessageNotification/selectDeptUser.vue
@@ -75,18 +75,18 @@ export default {
this.treeList = this.allData.filter(e => !e.parentid)
this.selectDeptPath = [{name: "可选范围", id: ''}]
},
- itemClick({id, name}) {
- let index = this.selectDeptPath.findIndex(e => e.id == id)
+ itemClick({id, name, corpId}) {
+ let index = this.selectDeptPath.findIndex(e => e.id == id && e.corpId == corpId)
if (index == -1) {
- this.selectDeptPath.push({name, id})
- this.getDeptsAndUsersByParent(id)
+ this.selectDeptPath.push({name, id, corpId})
+ this.getDeptsAndUsersByParent(id, corpId)
}
},
- getDeptsAndUsersByParent(departmentId) {
- this.treeList = this.allData.filter(e => e.parentid == departmentId)
+ getDeptsAndUsersByParent(departmentId, corpId) {
+ this.treeList = this.allData.filter(e => e.parentid == departmentId && e.corpId == corpId)
this.userList = []
this.$http.post(`/app/wxcp/wxuser/listByDeptId`, null, {
- params: {departmentId, status: 1}
+ params: {departmentId, status: 1, cid: corpId}
}).then(res => {
if (res?.data) {
this.userList = res.data.map(e => ({...e, isChecked: this.isSelected(e.id)}))
diff --git a/src/apps/AppMessageNotification/selectTag.vue b/src/apps/AppMessageNotification/selectTag.vue
index 253f09ae..19a1505f 100644
--- a/src/apps/AppMessageNotification/selectTag.vue
+++ b/src/apps/AppMessageNotification/selectTag.vue
@@ -1,8 +1,8 @@
- 已选择部门
+ 已选择组织
-
+
{{ item.name }}
添加标签
@@ -32,6 +32,7 @@
+
@@ -46,7 +47,7 @@ export default {
deptList: [],
userList: [],
showTagList: false,
- sendType: '', //0居民群 1居民
+ sendType: '', //0居民 1居民群
tagList: [],
deptIndex: 0
}
@@ -55,17 +56,7 @@ export default {
methods: {
chooseTag(index) {
this.deptIndex = index
- this.getTagList(this.deptList[index].id)
- // if(this.deptList[index].tagIdList) {
- // this.tagList.map((item) => {
- // item.tagList.map((items) => {
- // if(this.deptList[index].tagIdList.includes(items.id)) {
- // items.isCheck = true
- // }
- // })
- // })
- // }
- // this.showTagList = true
+ this.getTagList(this.deptList[index].corpId)
},
typeClick(index, indexs) {
this.tagList[index].tagList[indexs].isCheck = !this.tagList[index].tagList[indexs].isCheck
@@ -92,7 +83,7 @@ export default {
this.showTagList=false
},
getTagList(id) {
- var url = this.sendType == 1 ? `/app/wxcp/wxgroupchattag/listAllByCorp?dvcpId=${id}` : '/wxcp/wxgroupchattag/listAllTag?size=100'
+ var url = this.sendType == 1 ? `/app/wxcp/wxcorptag/listAllByCorp?dvcpCorpId=${id}` : `/app/wxcp/wxgroupchattag/listAllByCorp?dvcpCorpId=${id}`
this.$http.post(url).then(res => {
if (res?.code == 0) {
res.data.records.map((item) => {
@@ -101,11 +92,23 @@ export default {
})
})
this.tagList = res.data.records
+ if(this.deptList[this.deptIndex].tagIdList) {
+ this.tagList.map((item) => {
+ item.tagList.map((items) => {
+ if(this.deptList[this.deptIndex].tagIdList.includes(items.id)) {
+ items.isCheck = true
+ }
+ })
+ })
+ }
+ this.showTagList = true
}
})
},
confirm() {
- uni.setStorageSync('selectDeptUser', [this.deptList, ...this.userList])
+ console.log([...this.deptList, ...this.userList])
+ uni.setStorageSync('selectDeptUser', [...this.deptList, ...this.userList])
+
uni.navigateBack({ delta: 2 })
},
back() {
@@ -119,6 +122,7 @@ export default {
onLoad() {
var list = uni.getStorageSync('selectDeptUser')
this.sendType = uni.getStorageSync('sendType')
+ console.log(list)
list.map((item) => {
if(item.kind == 'dept') {
this.deptList.push(item)