|
|
@ -1,5 +1,8 @@ |
|
|
|
<template> |
|
|
|
<el-dialog :visible.sync="visible" :title="$t('look')" :close-on-click-modal="false" :close-on-press-escape="false"> |
|
|
|
<el-dialog :visible.sync="visible" |
|
|
|
:title="$t('look')" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:close-on-press-escape="false"> |
|
|
|
<el-form :label-width="$i18n.locale === 'en-US' ? '100px' : '80px'"> |
|
|
|
<el-form-item label="群介绍:"> |
|
|
|
<div>{{responseForm.groupIntroduction}}</div> |
|
|
@ -11,36 +14,81 @@ |
|
|
|
<div v-if="responseForm.state === 15">禁言</div> |
|
|
|
<div v-if="responseForm.state === 20">已解散</div> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="备注:" v-if="responseForm.state === 5 || responseForm.state === 20"> |
|
|
|
<el-form-item label="备注:" |
|
|
|
v-if="responseForm.state === 5 || responseForm.state === 20"> |
|
|
|
<div>{{responseForm.processingOpinions}}</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" :model="dataForm" ref="dataForm"> |
|
|
|
<el-form :inline="true" |
|
|
|
:model="dataForm" |
|
|
|
ref="dataForm"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="dataForm.nickname" placeholder="姓名" clearable></el-input> |
|
|
|
<el-input v-model="dataForm.nickname" |
|
|
|
placeholder="姓名" |
|
|
|
clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="dataForm.mobile" placeholder="电话" clearable></el-input> |
|
|
|
<el-input v-model="dataForm.mobile" |
|
|
|
placeholder="电话" |
|
|
|
clearable></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="状态"> |
|
|
|
<el-select v-model="dataForm.state" |
|
|
|
clearable |
|
|
|
placeholder="请选择"> |
|
|
|
<el-option v-for="item in stateOptions" |
|
|
|
:key="item.id" |
|
|
|
:label="item.name" |
|
|
|
:value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-button @click="getDataList()">{{ $t('query') }}</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;"> |
|
|
|
<el-table-column type="index" width="50" label="序号"></el-table-column> |
|
|
|
<el-table-column prop="nickname" label="成员名称" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table-column prop="lordFlag" label="群主标识" header-align="center" align="center" :formatter="formatterLoadFlag"></el-table-column> |
|
|
|
<el-table-column prop="mobile" label="联系电话" header-align="center" align="center"></el-table-column> |
|
|
|
<el-table v-loading="dataListLoading" |
|
|
|
:data="dataList" |
|
|
|
border |
|
|
|
@selection-change="dataListSelectionChangeHandle" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column type="index" |
|
|
|
width="50" |
|
|
|
label="序号"></el-table-column> |
|
|
|
<el-table-column prop="nickname" |
|
|
|
label="成员名称" |
|
|
|
header-align="center" |
|
|
|
align="center"></el-table-column> |
|
|
|
<el-table-column prop="lordFlag" |
|
|
|
label="群主标识" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
:formatter="formatterLoadFlag"></el-table-column> |
|
|
|
<el-table-column prop="mobile" |
|
|
|
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 v-if="(scope.row.state == 10||scope.row.state == 0)&&scope.row.lordFlag==0" |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
@click="toBecomeAdmin(scope.rowd)">指定群主</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<el-pagination |
|
|
|
:current-page="page" |
|
|
|
:page-sizes="[10, 20, 50, 100]" |
|
|
|
:page-size="limit" |
|
|
|
:total="total" |
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
@size-change="pageSizeChangeHandle" |
|
|
|
@current-change="pageCurrentChangeHandle"> |
|
|
|
</el-pagination> |
|
|
|
<el-pagination :current-page="page" |
|
|
|
:page-sizes="[10, 20, 50, 100]" |
|
|
|
:page-size="limit" |
|
|
|
:total="total" |
|
|
|
layout="total, sizes, prev, pager, next, jumper" |
|
|
|
@size-change="pageSizeChangeHandle" |
|
|
|
@current-change="pageCurrentChangeHandle"> |
|
|
|
</el-pagination> |
|
|
|
<template slot="footer"> |
|
|
|
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> |
|
|
|
</template> |
|
|
@ -54,20 +102,40 @@ export default { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
mixinViewModuleOptions: { |
|
|
|
getDataListURL: '/group/usergroup/page', |
|
|
|
getDataListURL: '/property/usergroup/page', |
|
|
|
getDataListIsPage: true |
|
|
|
}, |
|
|
|
visible: false, |
|
|
|
dataForm: { |
|
|
|
groupId: '', |
|
|
|
nickname: '', |
|
|
|
mobile: '' |
|
|
|
state: '10' |
|
|
|
}, |
|
|
|
responseForm: { |
|
|
|
id: '', |
|
|
|
groupIntroduction: '', |
|
|
|
state: '', |
|
|
|
processingOpinions: '' |
|
|
|
}, |
|
|
|
stateOptions: [{ |
|
|
|
id: '0', |
|
|
|
name: '待审核' |
|
|
|
}, { |
|
|
|
id: '5', |
|
|
|
name: '审核不通过' |
|
|
|
}, { |
|
|
|
id: '10', |
|
|
|
name: '审核通过' |
|
|
|
}, { |
|
|
|
id: '15', |
|
|
|
name: '已退群' |
|
|
|
}, { |
|
|
|
id: '20', |
|
|
|
name: '已移除' |
|
|
|
}], |
|
|
|
checkDto: { |
|
|
|
id: '', |
|
|
|
groupId: '' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -84,7 +152,7 @@ export default { |
|
|
|
}, |
|
|
|
// 获取信息 |
|
|
|
getInfo () { |
|
|
|
this.$http.get(`/group/group/${this.dataForm.groupId}`).then(({ data: res }) => { |
|
|
|
this.$http.get(`/property/group/${this.dataForm.groupId}`).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
@ -92,7 +160,7 @@ export default { |
|
|
|
...this.responseForm, |
|
|
|
...res.data |
|
|
|
} |
|
|
|
}).catch(() => {}) |
|
|
|
}).catch(() => { }) |
|
|
|
}, |
|
|
|
// 群主标识 0:否,1:是 |
|
|
|
formatterLoadFlag: function (row, column) { |
|
|
@ -102,6 +170,46 @@ export default { |
|
|
|
} else if (lordFlag === '1') { |
|
|
|
return '是' |
|
|
|
} |
|
|
|
}, |
|
|
|
toBecomeAdmin (row) { |
|
|
|
this.checkDto.id = row.id |
|
|
|
this.checkDto.groupId = row.groupId |
|
|
|
this.$http.post(`/property/group/checkGroupOwner`, this.checkDto).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
if (res.data.resultCode == 1) { |
|
|
|
this.$confirm(res.data.resultMessage, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.$http['post']('/property/group/toBecomeGroupOwner', this.postForm).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.getDataList() |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500 |
|
|
|
}) |
|
|
|
}).catch(() => { }) |
|
|
|
}).catch(() => { }) |
|
|
|
} else { |
|
|
|
this.$http['post']('/property/group/toBecomeGroupOwner', this.postForm).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.getDataList() |
|
|
|
this.$message({ |
|
|
|
message: this.$t('prompt.success'), |
|
|
|
type: 'success', |
|
|
|
duration: 500 |
|
|
|
}) |
|
|
|
}).catch(() => { }) |
|
|
|
} |
|
|
|
}).catch(() => { }) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|