Commit c1916355 by wangzhihui

修复群名R:重复问题

1 parent f58ea694
...@@ -403,18 +403,31 @@ export default { ...@@ -403,18 +403,31 @@ export default {
let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType)?.attr let groupHideAttr = this.groupToType.find(k => k.type == item.actionReportType)?.attr
if (!groupHideAttr) return if (!groupHideAttr) return
if (item.groupId) { if (item.groupId) {
if (item.groupId.split('_R:')[1] && item.groupId.split('_R:')[1] == item.groupName) { const separatorIndex = item.groupId.indexOf('_R:')
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName }) if (separatorIndex !== -1) {
this.idBefEncryption = item.groupId.split('_R:')[0] const cloudId = item.groupId.substring(0, separatorIndex)
} else if (item.groupName) { const groupNameFromId = item.groupId.substring(separatorIndex + 3) // 3 是 "_R:" 的长度
groupHideAttr && if (groupNameFromId && groupNameFromId === item.groupName) {
this.groupCofList[groupHideAttr].push({ groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName })
groupId: item.groupId, this.idBefEncryption = cloudId
roomName: item.groupName } else if (item.groupName) {
}) groupHideAttr &&
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
} else {
this.idBefEncryption = cloudId
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' })
}
} else { } else {
this.idBefEncryption = item.groupId.split('_R:')[0] if (item.groupName) {
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' }) groupHideAttr &&
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
}
} }
} }
}) })
...@@ -426,6 +439,7 @@ export default { ...@@ -426,6 +439,7 @@ export default {
this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryption }).then(res => { this.$apis.battle.activityreportWorktool({ cloudId: this.idBefEncryption }).then(res => {
this.selectGroupName = res.data.result || [] this.selectGroupName = res.data.result || []
}) })
console.log(this.groupCofListInput, this.selectGroupName)
this.getGroupList(this.wechat.staffId) this.getGroupList(this.wechat.staffId)
this.getDepartmentTree() this.getDepartmentTree()
} else { } else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!