Browse Source

党组织查看党员页面

shibei_master
zhaoyongnian 3 years ago
parent
commit
8e534dff19
  1. 173
      src/views/modules/partymember/icpartyorgtree.vue
  2. 97
      src/views/modules/partymember/lookMember.vue

173
src/views/modules/partymember/icpartyorgtree.vue

@ -12,13 +12,14 @@
:data="tableData" :data="tableData"
:default-expand-all="true" :default-expand-all="true"
row-key="id" row-key="id"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"> :header-cell-style="{background:'#2195FE',color:'#FFFFFF'}">
<el-table-column prop="partyOrgName" label="党组织名称"></el-table-column> <el-table-column prop="partyOrgName" label="党组织名称"></el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)" <el-button v-if="scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)"
@click="handleLook(scope.row)" @click="handleLook(scope.row.orgPids)"
type="text" type="text"
size="small" size="small"
class="div-table-button--detail">{{'查看党员'}}</el-button> class="div-table-button--detail">{{'查看党员'}}</el-button>
@ -41,91 +42,119 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getTableData"></add-or-update> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getTableData"></add-or-update>
<!-- 查看党员 -->
<el-dialog :visible.sync="lookMemberShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="memberTitle"
width="850px"
top="5vh"
class="dialog-h"
@closed="lookMemberClose">
<look-Member ref="ref_table_Member"
@lookMemberCancle="lookMemberCancle"
@lookMemberOk="lookMemberOk"></look-Member>
</el-dialog>
</el-card> </el-card>
</template> </template>
<script> <script>
import AddOrUpdate from './icpartyorg-add-or-update' import AddOrUpdate from './icpartyorg-add-or-update'
import TableTreeColumn from '@/components/table-tree-column' import TableTreeColumn from '@/components/table-tree-column'
import lookMember from './lookMember'
export default { export default {
data () { data () {
return { return {
dataForm: { dataForm: {
id: '', id: '',
customerId: '', customerId: '',
orgPids: '' orgPids: ''
}, },
tableLoading: false, tableLoading: false,
tableData: [], tableData: [],
agencyId: '', agencyId: '',
addOrUpdateVisible: false addOrUpdateVisible: false,
} lookMemberShow: false,
}, memberTitle: '查看党员'
components: {
AddOrUpdate,
TableTreeColumn
},
async created () {
this.agencyId = localStorage.getItem('agencyId')
this.dataForm.customerId = localStorage.getItem('customerId')
this.getTableData()
// this.pageLoading = true
},
methods:{
//
async getTableData () {
this.tableLoading = true
let params = {
customerId: localStorage.getItem('customerId')
} }
await this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: this.dataForm}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
} else {
this.tableData = res.data
}
}).catch(() => {})
this.tableLoading = false
}, },
// / components: {
addOrUpdateHandle (id, orgPids) { AddOrUpdate,
this.addOrUpdateVisible = true TableTreeColumn,
this.$nextTick(() => { lookMember
this.$refs.addOrUpdate.dataForm.id = id
//
this.$refs.addOrUpdate.dataForm.orgPids = orgPids //
this.$refs.addOrUpdate.init()
})
}, },
// async created () {
deleteAgency (id) { this.agencyId = localStorage.getItem('agencyId')
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('delete') }), this.$t('prompt.title'), { this.dataForm.customerId = localStorage.getItem('customerId')
confirmButtonText: this.$t('confirm'), this.getTableData()
cancelButtonText: this.$t('cancel'), // this.pageLoading = true
type: 'warning' },
}).then(() => { methods:{
this.$http.delete('/resi/partymember/icPartyOrg/delete', {'data': [id]}).then(({ data: res }) => { //
if (res.code !== 0) { async getTableData () {
return this.$message.error(res.msg) this.tableLoading = true
let params = {
customerId: localStorage.getItem('customerId')
} }
this.$message({ await this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: this.dataForm}).then(({ data: res }) => {
message: this.$t('prompt.success'), if (res.code !== 0) {
type: 'success', return this.$message.error(res.msg)
duration: 500, } else {
onClose: () => { this.tableData = res.data
this.getTableData()
} }
}).catch(() => {})
this.tableLoading = false
},
// /
addOrUpdateHandle (id, orgPids) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.dataForm.id = id
//
this.$refs.addOrUpdate.dataForm.orgPids = orgPids //
this.$refs.addOrUpdate.init()
}) })
}).catch(() => {}) },
}).catch(() => {}) //
}, deleteAgency (id) {
// this.$confirm(this.$t('prompt.info', { 'handle': this.$t('delete') }), this.$t('prompt.title'), {
handleLook(row) { confirmButtonText: this.$t('confirm'),
console.log('这里是查看党员', row) cancelButtonText: this.$t('cancel'),
type: 'warning'
}).then(() => {
this.$http.delete('/resi/partymember/icPartyOrg/delete', {'data': [id]}).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.getTableData()
}
})
}).catch(() => {})
}).catch(() => {})
},
//
handleLook(orgPids) {
this.lookMemberShow = true
this.$nextTick(() => {
this.$refs.ref_table_Member.initForm(orgPids)
})
},
lookMemberClose () {
this.lookMemberShow = false
},
lookMemberCancle () {
this.lookMemberShow = false
},
lookMemberOk () {
this.lookMemberShow = false
}
} }
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

97
src/views/modules/partymember/lookMember.vue

@ -0,0 +1,97 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<div>
<div class="div_table">
<el-table ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%"
highlight-current-row>
<el-table-column prop="name"
label="姓名">
</el-table-column>
<el-table-column prop="mobile"
label="联系方式">
</el-table-column>
<el-table-column prop="idCard"
label="身份证号">
</el-table-column>
</el-table>
</div>
</div>
</div>
<div class="div_btn">
<el-button size="small"
@click="handleCancle"> </el-button>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex'
import { requestPost } from "@/js/dai/request";
export default {
data () {
return {
btnDisable: false,
//
tableData: [],
tableLoading: false,
orgPids: ''
}
},
props: {
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 410 + this.iframeHeight : this.clientHeight - 410
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
components: {},
methods: {
initForm (orgPids) {
if (orgPids.split(',').length > 0) {
this.orgPids = orgPids.split(',')[orgPids.split(',').length - 1]
}
this.tableLoading = true
this.loadTable()
},
//
handleCancle () {
this.$emit('lookMemberCancle')
},
//
async loadTable () {
let params = {
partyOrgId: this.orgPids,
pageNo: 1,
pageSize: 10000000
}
const url = `/resi/partymember/icPartyMember/page`
const { data, code, msg } = await requestPost(url, params)
this.tableLoading = false
if (code === 0) {
this.tableData = data.list ? data.list : []
}
}
},
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss";
</style>
<style lang="scss" scoped>
.div_btn{
display: flex;
align-items: center;
justify-content: center;
}
</style>
Loading…
Cancel
Save