Browse Source

党群管理bug

feature/syp_points
songyunpeng 5 years ago
parent
commit
c02426d494
  1. 1
      src/views/modules/partygroup/partygroupofficials.vue
  2. 27
      src/views/modules/partygroup/partyusergroup-list.vue

1
src/views/modules/partygroup/partygroupofficials.vue

@ -35,6 +35,7 @@
<el-table-column prop="partyGroupName" label="所属党群" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
</template>
</el-table-column>

27
src/views/modules/partygroup/partyusergroup-list.vue

@ -40,6 +40,7 @@
<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 === '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>
</el-table-column>
</el-table>
@ -147,7 +148,31 @@ export default {
setGroupManager (id) {
this.managerFrom.groupUserId = id
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: '确定',
cancelButtonText: '取消',
type: 'warning'

Loading…
Cancel
Save