diff --git a/src/i18n/zh-CN.js b/src/i18n/zh-CN.js index c488a33c..f7b4d0d8 100644 --- a/src/i18n/zh-CN.js +++ b/src/i18n/zh-CN.js @@ -21,6 +21,9 @@ t.verify = '审核' t.verifyLabel = '议题审核' t.deal = '处理' t.look = '查看' +t.ban = '禁言' +t.liftTheBan = '解禁' +t.disband = '解散' t.prompt = {} t.prompt.title = '提示' diff --git a/src/views/modules/group/group.vue b/src/views/modules/group/group.vue index bc202036..7d6fc3b7 100644 --- a/src/views/modules/group/group.vue +++ b/src/views/modules/group/group.vue @@ -2,46 +2,68 @@
- - + + + + + - - {{ $t('query') }} + + + + + - - {{ $t('add') }} + + + + + + + + + + + - {{ $t('deleteBatch') }} + {{ $t('query') }} - + - - - - - - - - - - - - - - - - + - - + @@ -68,18 +90,105 @@ export default { data () { return { mixinViewModuleOptions: { - getDataListURL: '/news/group/page', + getDataListURL: '/group/group/page', getDataListIsPage: true, deleteURL: '/news/group', deleteIsBatch: true }, dataForm: { - id: '' - } + id: '', + streetId: '', + communityId: '', + gridId: '', + state: '0' + }, + streetOptions: [], + communityOptions: [], + gridOptions: [], + stateOptions: [{ + id: '0', + name: '待审核' + }, { + id: '5', + name: '审核不通过' + }, { + id: '10', + name: '审核通过' + }, { + id: '15', + name: '禁言' + }, { + id: '20', + name: '已解散' + }] } }, components: { AddOrUpdate + }, + created: function () { + this.getStreetList() + }, + methods: { + formatState: function (row, column) { + if (row.state === 0) { + return '待审核' + } + if (row.state === 5) { + return '审核不通过' + } + if (row.state === 10) { + return '审核通过' + } + if (row.state === 15) { + return '禁言' + } + if (row.state === 20) { + return '已解散' + } + }, + formatGroupCategory: function (row, column) { + return row.groupCategory === '0' ? '党员群' : row.groupCategory === '1' ? '自建群' : '未知' + }, + getStreetList () { + this.$http.get(`/sys/dept/sublist/` + (localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.streetOptions = res.data + }).catch(() => { }) + }, + getCommunityList () { + if (this.dataForm.streetId === '') { + this.communityOptions = [] + this.gridOptions = [] + this.dataForm.communityId = '' + this.dataForm.gridId = '' + return + } + this.dataForm.communityId = '' + this.dataForm.gridId = '' + this.$http.get(`/sys/dept/sublist/` + this.dataForm.streetId).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.communityOptions = res.data + }).catch(() => { }) + }, + getGridList () { + if (this.dataForm.communityId === '') { + this.gridOptions = [] + this.dataForm.gridId = '' + return + } + this.dataForm.gridId = '' + this.$http.get(`/sys/dept/sublist/` + this.dataForm.communityId).then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.gridOptions = res.data + }).catch(() => { }) + } } }