|
@@ -91,13 +91,15 @@ export default {
|
|
|
if (code === 0) {
|
|
|
loading.clear()
|
|
|
this.groupList = data?.groupUserArr || []
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ else {
|
|
|
loading.clear()
|
|
|
this.$toast('获取分组列表失败')
|
|
|
}
|
|
|
},
|
|
|
setGroupEvent(data) {
|
|
|
- if (data.name === '默认分组') return
|
|
|
+ if (data.name === '默认分组')
|
|
|
+ return
|
|
|
this.$router.push({
|
|
|
path: '/entgroup/detail',
|
|
|
query: {
|
|
@@ -114,9 +116,10 @@ export default {
|
|
|
if (this.groupingName === '') {
|
|
|
this.errorMessageText = '分组名称不能为空'
|
|
|
this.isConfirmButtonDisabled = true
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ else {
|
|
|
const exists = this.groupList.some(
|
|
|
- (item) => item.name === this.groupingName
|
|
|
+ item => item.name === this.groupingName
|
|
|
)
|
|
|
if (exists) {
|
|
|
this.errorMessageText = '分组名称已存在'
|
|
@@ -133,8 +136,11 @@ export default {
|
|
|
this.$toast('新增分组成功')
|
|
|
this.groupingName = ''
|
|
|
this.showAddGroupingDialog = false
|
|
|
- this.getMyFollowList()
|
|
|
- } else {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.getMyFollowList()
|
|
|
+ }, 1500)
|
|
|
+ }
|
|
|
+ else {
|
|
|
this.$toast('新增分组失败')
|
|
|
}
|
|
|
},
|