Commit c1916355 by wangzhihui

修复群名R:重复问题

1 parent f58ea694
...@@ -403,9 +403,13 @@ export default { ...@@ -403,9 +403,13 @@ 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:')
if (separatorIndex !== -1) {
const cloudId = item.groupId.substring(0, separatorIndex)
const groupNameFromId = item.groupId.substring(separatorIndex + 3) // 3 是 "_R:" 的长度
if (groupNameFromId && groupNameFromId === item.groupName) {
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName }) groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: item.groupName })
this.idBefEncryption = item.groupId.split('_R:')[0] this.idBefEncryption = cloudId
} else if (item.groupName) { } else if (item.groupName) {
groupHideAttr && groupHideAttr &&
this.groupCofList[groupHideAttr].push({ this.groupCofList[groupHideAttr].push({
...@@ -413,9 +417,18 @@ export default { ...@@ -413,9 +417,18 @@ export default {
roomName: item.groupName roomName: item.groupName
}) })
} else { } else {
this.idBefEncryption = item.groupId.split('_R:')[0] this.idBefEncryption = cloudId
groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' }) groupHideAttr && this.groupCofListInput[groupHideAttr + 'Value'].push({ name: '' })
} }
} else {
if (item.groupName) {
groupHideAttr &&
this.groupCofList[groupHideAttr].push({
groupId: item.groupId,
roomName: item.groupName
})
}
}
} }
}) })
for (let k in this.groupCofListInput) { for (let k in this.groupCofListInput) {
...@@ -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!