|
@ -40,6 +40,7 @@ |
|
|
<el-button type="text" size="small" @click="banned(scope.row.id)">禁言</el-button> |
|
|
<el-button type="text" size="small" @click="banned(scope.row.id)">禁言</el-button> |
|
|
<el-button type="text" v-if="scope.row.identityFlag === '2' || scope.row.identityFlag === '1'" size="small" @click="setGroupManager(scope.row.id)">设置群主</el-button> |
|
|
<el-button type="text" v-if="scope.row.identityFlag === '2' || scope.row.identityFlag === '1'" size="small" @click="setGroupManager(scope.row.id)">设置群主</el-button> |
|
|
<el-button type="text" v-if="scope.row.identityFlag === '2' || scope.row.identityFlag === '0'" size="small" @click="set2GroupManager(scope.row.id)">设置副群主</el-button> |
|
|
<el-button type="text" v-if="scope.row.identityFlag === '2' || scope.row.identityFlag === '0'" size="small" @click="set2GroupManager(scope.row.id)">设置副群主</el-button> |
|
|
|
|
|
<el-button type="text" v-if="scope.row.identityFlag === '1' || scope.row.identityFlag === '0'" size="small" @click="setGroupUser(scope.row.id)">设置群成员</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
@ -147,7 +148,31 @@ export default { |
|
|
setGroupManager (id) { |
|
|
setGroupManager (id) { |
|
|
this.managerFrom.groupUserId = id |
|
|
this.managerFrom.groupUserId = id |
|
|
this.managerFrom.identityFlag = '0' |
|
|
this.managerFrom.identityFlag = '0' |
|
|
this.$confirm('确定设为群主?', '提示', { |
|
|
this.$confirm('设置该成员为群主后会将原群主设置为副群主,确定设为群主?', '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.$http['post']('/partyGroup/partyusergroup/setGroupManager', this.managerFrom).then(({ data: res }) => { |
|
|
|
|
|
if (res.code !== 0) { |
|
|
|
|
|
return this.$message.error(res.msg) |
|
|
|
|
|
} |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: this.$t('prompt.success'), |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 500, |
|
|
|
|
|
onClose: () => { |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}).catch(() => {}) |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
setGroupManager (id) { |
|
|
|
|
|
this.managerFrom.groupUserId = id |
|
|
|
|
|
this.managerFrom.identityFlag = '0' |
|
|
|
|
|
this.$confirm('确定设为群成员?', '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
cancelButtonText: '取消', |
|
|
cancelButtonText: '取消', |
|
|
type: 'warning' |
|
|
type: 'warning' |
|
|