Commit c1916355 by wangzhihui

修复群名R:重复问题

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