You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
3.8 KiB
106 lines
3.8 KiB
<template>
|
|
<el-card shadow="never" class="aui-card--fill">
|
|
<div class="mod-news__group}">
|
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataListSearch()">
|
|
<el-form-item label="网格">
|
|
<el-input v-model="dataForm.grid" @keyup.native="btKeyUpGrid" placeholder="请输入网格名称" clearable></el-input>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button type="success" @click="getDataListSearch()">{{ $t('query') }}</el-button>
|
|
<el-button @click="createPartys()" type="primary">批量生成党员群</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="district" label="市区" header-align="center" align="center"></el-table-column>
|
|
<el-table-column prop="street" label="街道" header-align="center" align="center"></el-table-column>
|
|
<el-table-column prop="community" label="社区" header-align="center" align="center"></el-table-column>
|
|
<el-table-column prop="grid" 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="createParty(scope.row)">生成党员群</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>
|
|
</div>
|
|
</el-card>
|
|
</template>
|
|
|
|
<script>
|
|
import mixinViewModule from '@/mixins/view-module'
|
|
export default {
|
|
mixins: [mixinViewModule],
|
|
data () {
|
|
return {
|
|
mixinViewModuleOptions: {
|
|
getDataListURL: '/sys/dept/queryCompleteDept',
|
|
getDataListIsPage: true
|
|
},
|
|
dataForm: {
|
|
district: '',
|
|
districtId: '',
|
|
street: '',
|
|
streetId: '',
|
|
community: '',
|
|
communityId: '',
|
|
grid: '',
|
|
gridId: ''
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
createParty (row) {
|
|
var postForm = [{
|
|
district: row.district,
|
|
districtId: row.districtId,
|
|
street: row.street,
|
|
streetId: row.streetId,
|
|
community: row.community,
|
|
communityId: row.communityId,
|
|
grid: row.grid,
|
|
gridId: row.gridId
|
|
}]
|
|
this.$http['post']('/group/epdc-app/group/createPartys', postForm).then(({ data: res }) => {
|
|
if (res.code !== 0) {
|
|
return this.$message.error(res.msg)
|
|
}
|
|
this.processingOpinionsVisible = false
|
|
this.getDataList()
|
|
this.$message({
|
|
message: this.$t('prompt.success'),
|
|
type: 'success',
|
|
duration: 500
|
|
})
|
|
}).catch(() => { })
|
|
},
|
|
btKeyUpGrid (e) {
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】、;‘’,。、\s+]/g, '')
|
|
this.dataForm.grid = e.target.value
|
|
},
|
|
createPartys () {
|
|
var postForm = this.dataList
|
|
this.$http['post']('/group/epdc-app/group/createPartys', postForm).then(({ data: res }) => {
|
|
if (res.code !== 0) {
|
|
return this.$message.error(res.msg)
|
|
}
|
|
this.processingOpinionsVisible = false
|
|
this.getDataList()
|
|
this.$message({
|
|
message: this.$t('prompt.success'),
|
|
type: 'success',
|
|
duration: 500
|
|
})
|
|
}).catch(() => { })
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|