Browse Source

bug

shibei_master
zhaoyongnian 3 years ago
parent
commit
7c96a8692c
  1. 20
      src/views/modules/partymember/icpartyorg-add-or-update.vue
  2. 10
      src/views/modules/partymember/icpartyorgtree.vue
  3. 53
      src/views/modules/partymember/lookMember.vue

20
src/views/modules/partymember/icpartyorg-add-or-update.vue

@ -160,8 +160,8 @@
this.getInfo()
} else {
this.initMap()
if(this.dataForm.orgPids) {
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(':')
if(this.dataForm.id) {
this.dataForm.mySelectOrg = this.dataForm.id
} else {
this.dataForm.mySelectOrg = ''
}
@ -221,7 +221,7 @@
}
this.$http.get('/gov/org/customeragency/getOrgTreeByUserAndType', {params: {agencyId: this.agencyId, orgType:value}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.agencyOrgList = this.removeEmptyChildren(res.data)
}).catch(() => {})
@ -230,8 +230,8 @@
getOrgList() {
return this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: {agencyId: this.agencyId}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.orgList = this.removeEmptyChildren(res.data)
this.orgList.unshift({
partyOrgName: '一级组织',
@ -269,14 +269,16 @@
getInfo() {
this.$http.get(`/resi/partymember/icPartyOrg/${this.dataForm.id}`).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.dataForm = {
...this.dataForm,
...res.data
}
//
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(':')
this.dataForm.mySelectOrg = this.dataForm.id
// this.dataForm.mySelectOrg.push(this.dataForm.id)
console.log(JSON.stringify(this.dataForm.mySelectOrg))
//
this.dataForm.agencyId = this.dataForm.agencyId
this.initMap()
@ -293,7 +295,7 @@
orgType:this.dataForm.partyOrgType}
}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.agencyOrgList = res.data
}).catch(() => {
@ -426,7 +428,7 @@
}
this.$http[!this.dataForm.id ? 'post' : 'put']('/resi/partymember/icPartyOrg/', this.dataForm).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.$message({
message: this.$t('prompt.success'),

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

@ -19,7 +19,7 @@
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button v-if="scope.row.agencyId == agencyId || scope.row.agencyPids.includes(agencyId)"
@click="handleLook(scope.row.agencyId)"
@click="handleLook(scope.row.agencyPids, scope.row.id, scope.row)"
type="text"
size="small"
class="div-table-button--detail">{{'查看党员'}}</el-button>
@ -98,7 +98,7 @@
}
await this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: this.dataForm}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
} else {
this.tableData = res.data
}
@ -125,7 +125,7 @@
}).then(() => {
this.$http.delete('/resi/partymember/icPartyOrg/delete', {'data': [id]}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
this.$message({
message: this.$t('prompt.success'),
@ -139,10 +139,10 @@
}).catch(() => {})
},
//
handleLook(agencyId) {
handleLook(agencyPids, id, row) {
this.lookMemberShow = true
this.$nextTick(() => {
this.$refs.ref_table_Member.initForm(agencyId)
this.$refs.ref_table_Member.initForm(agencyPids.split(':')[agencyPids.split(':').length - 1], id)
})
},
lookMemberClose () {

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

@ -21,6 +21,25 @@
label="身份证号">
</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
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
>
</el-pagination>
</div>
</div>
</div>
@ -41,7 +60,11 @@ export default {
//
tableData: [],
tableLoading: false,
orgPids: ''
agencyId: '',
partyOrgId: '',
pageNo: 1,
pageSize: 20,
total: 1,
}
},
props: {
@ -54,8 +77,9 @@ export default {
},
components: {},
methods: {
initForm (agencyId) {
this.orgPids = agencyId
initForm (agencyId, id) {
this.agencyId = agencyId
this.partyOrgId = id
this.tableLoading = true
this.loadTable()
},
@ -66,17 +90,32 @@ export default {
//
async loadTable () {
let params = {
partyOrgId: this.orgPids,
pageNo: 1,
pageSize: 10000000
agencyId: this.agencyId,
partyOrgId: this.partyOrgId,
pageNo: this.pageNo,
pageSize: this.pageSize
}
const url = `/resi/partymember/icPartyMember/page`
const { data, code, msg } = await requestPost(url, params)
this.tableLoading = false
if (res.code !== 0) {
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败')
}
if (code === 0) {
this.tableData = data.list ? data.list : []
this.total = data.total || 0;
}
}
},
handleSizeChange (val) {
console.log(`每页 ${val}`)
this.pageSize = val
this.loadTable()
},
handleCurrentChange (val) {
console.log(`当前页: ${val}`);
this.pageNo = val;
this.loadTable();
},
},
}
</script>

Loading…
Cancel
Save