Browse Source

Merge branch 'dev_1010' of http://121.42.41.42:7070/r/esua-epdc-admin into dev_1010

master
qushutong 6 years ago
parent
commit
893c4797e2
  1. 2
      src/views/modules/events/item-deal-detail.vue
  2. 118
      src/views/modules/group/group-approve.vue
  3. 78
      src/views/modules/group/group.vue

2
src/views/modules/events/item-deal-detail.vue

@ -46,7 +46,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="流转对象:" prop="deptResultDTOS" v-if="deptResultDTOSVisible">
<el-form-item label="流转对象:" prop="deptResultDTOS" v-if="deptResultDTOSVisible">
<el-checkbox-group v-model="postDataForm.deptResultDTOS">
<el-checkbox v-for="deptResultDTO in dataForm.deptResultDTOS" :label="deptResultDTO" :key="deptResultDTO.deptName">{{deptResultDTO.deptName}}</el-checkbox>
</el-checkbox-group>

118
src/views/modules/group/group-approve.vue

@ -0,0 +1,118 @@
<template>
<el-dialog :visible.sync="visible" :title="$t('verify')" :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>{{dataForm.groupName}}</div>
</el-form-item>
<el-form-item label="群主:">
<div>{{dataForm.nickname}}</div>
</el-form-item>
<el-form-item label="创建时间:">
<div>{{dataForm.createdTime}}</div>
</el-form-item>
<el-form-item label="群介绍:">
<div>{{dataForm.groupIntroduction}}</div>
</el-form-item>
<el-form-item label="处理:" prop="state">
<el-select v-model="dataForm.state" placeholder="请选择">
<el-option
v-for="option in options"
:key="option.value"
:label="option.label"
:value="option.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="处理意见:" prop="processingOpinions" v-if="adviceVisible">
<el-input v-model="dataForm.processingOpinions" type="textarea" placeholder="不超过500字"></el-input>
</el-form-item>
</el-form>
<template slot="footer">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog>
</template>
<script>
import debounce from 'lodash/debounce'
export default {
data () {
return {
visible: false,
adviceVisible: false,
dataForm: {
id: '',
groupName: '',
createdTime: '',
groupIntroduction: '',
nickname: '',
state: '5',
processingOpinions: ''
},
options: [{
value: '5',
label: '审核通过'
}, {
value: '10',
label: '审核拒绝'
}]
}
},
watch: {
'dataForm.state': function (val) {
if (val === '5') {
this.adviceVisible = false
} else {
this.adviceVisible = true
}
}
},
methods: {
init () {
this.visible = true
this.$nextTick(() => {
if (this.dataForm.id) {
this.getInfo()
}
})
},
getInfo () {
this.$http.get(`/group/group/detail/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = {
...this.dataForm,
...res.data
}
}).catch(() => {})
},
dataFormSubmitHandle: debounce(function () {
if (this.adviceVisible) {
if (this.dataForm.processingOpinions === '') {
return this.$message.error('处理意见不能为空')
}
if (this.dataForm.processingOpinions > 500) {
return this.$message.error('处理意见不能超过500字')
}
}
this.$http['post'](
'/group/group/operate', this.dataForm).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.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
}, 1000, { 'leading': true, 'trailing': false })
}
}
</script>

78
src/views/modules/group/group.vue

@ -78,6 +78,7 @@
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<group-detail v-if="groupDetailVisible" ref="groupDetail" @refreshDataList="getDataList"></group-detail>
<group-approve v-if="groupApproveVisible" ref="groupApprove" @refreshDataList="getDataList"></group-approve>
</div>
</el-card>
</template>
@ -85,17 +86,17 @@
<script>
import mixinViewModule from '@/mixins/view-module'
import GroupDetail from './group-detail'
import GroupApprove from './group-approve'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/group/group/page',
getDataListIsPage: true,
deleteURL: '/news/group',
deleteIsBatch: true
getDataListIsPage: true
},
groupDetailVisible: false,
groupApproveVisible: false,
dataForm: {
id: '',
streetId: '',
@ -103,6 +104,10 @@ export default {
gridId: '',
state: '0'
},
postForm: {
id: '',
state: 0
},
streetOptions: [],
communityOptions: [],
gridOptions: [],
@ -125,7 +130,8 @@ export default {
}
},
components: {
GroupDetail
GroupDetail,
GroupApprove
},
created: function () {
this.getStreetList()
@ -151,6 +157,63 @@ export default {
formatGroupCategory: function (row, column) {
return row.groupCategory === '0' ? '党员群' : row.groupCategory === '1' ? '自建群' : '未知'
},
ban (id) {
this.postForm.state = 15
this.postForm.id = id
this.$http['post'](
'/group/group/operate', this.postForm).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.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
},
liftTheBan (id) {
this.postForm.state = 10
this.postForm.id = id
this.$http['post'](
'/group/group/operate', this.postForm).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.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
},
disband (id) {
this.postForm.state = 20
this.postForm.id = id
this.$http['post'](
'/group/group/operate', this.postForm).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.visible = false
this.$emit('refreshDataList')
}
})
}).catch(() => {})
},
look (id) {
this.groupDetailVisible = true
this.$nextTick(() => {
@ -158,6 +221,13 @@ export default {
this.$refs.groupDetail.init()
})
},
verify (id) {
this.groupApproveVisible = true
this.$nextTick(() => {
this.$refs.groupApprove.dataForm.id = id
this.$refs.groupApprove.init()
})
},
getStreetList () {
this.$http.get(`/sys/dept/sublist/` + (localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))).then(({ data: res }) => {
if (res.code !== 0) {

Loading…
Cancel
Save