// 解散按钮
dissolutionGroup(){
if(this.checkChoose()){
for(let i=0;i<this.chooseSelection.length;i++){
if(this.chooseSelection[i].crowdStatus == '1'){
this.$message.warning('选项中包含已解散的群!请重新选择!')
return
}else if(this.chooseSelection[i].crowdStatus == '3'){
this.$message.warning('选项中包含已升级为圈的群!请重新选择!')
return
}
}
let str = ''
let arr = []
for(let i=0,len=this.chooseSelection.length;i<len;i++){
arr.push(this.chooseSelection[i].crowdName)
}
str = arr.join(',')
str = '您确定要解散'+ str + '吗?'
arr = null
let jsonData = {}
// TODO
jsonData.userId = '123456'
jsonData.crowdList = this.chooseSelection
this.$confirm(str,'解散群',{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 点击确定
dissolution(jsonData).then(res => {
if(res.data == true && res.status == '200'){
this.$message.success('解散成功!')
this.search()
}else if(res.status == 500){
let errorMsg = res.errorMsg
this.$message.warning(errorMsg)
}
//console.log(res)
})
}).catch(() => {
// 点击取消
})
}
},
dissolutionGroup(){
if(this.checkChoose()){
for(let i=0;i<this.chooseSelection.length;i++){
if(this.chooseSelection[i].crowdStatus == '1'){
this.$message.warning('选项中包含已解散的群!请重新选择!')
return
}else if(this.chooseSelection[i].crowdStatus == '3'){
this.$message.warning('选项中包含已升级为圈的群!请重新选择!')
return
}
}
let str = ''
let arr = []
for(let i=0,len=this.chooseSelection.length;i<len;i++){
arr.push(this.chooseSelection[i].crowdName)
}
str = arr.join(',')
str = '您确定要解散'+ str + '吗?'
arr = null
let jsonData = {}
// TODO
jsonData.userId = '123456'
jsonData.crowdList = this.chooseSelection
this.$confirm(str,'解散群',{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// 点击确定
dissolution(jsonData).then(res => {
if(res.data == true && res.status == '200'){
this.$message.success('解散成功!')
this.search()
}else if(res.status == 500){
let errorMsg = res.errorMsg
this.$message.warning(errorMsg)
}
//console.log(res)
})
}).catch(() => {
// 点击取消
})
}
},