Browse Source

Merge branch 'feature/dev_party_mange' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into feature/dev_party_mange

shibei_master
13176889840 3 years ago
parent
commit
d9d54f99f0
  1. 47
      src/views/modules/partymember/icpartymemberpayrecorddetail.vue
  2. 5
      src/views/modules/partymember/icpartymemberpoint.vue
  3. 42
      src/views/modules/partymember/icpartyorg-add-or-update.vue
  4. 6
      src/views/modules/partymember/icpartyorgtree.vue
  5. 6
      src/views/modules/partymember/lookMember.vue

47
src/views/modules/partymember/icpartymemberpayrecorddetail.vue

@ -3,6 +3,15 @@
<div class="mod-rent__rentDeath} resi-container"> <div class="mod-rent__rentDeath} resi-container">
<el-card ref="searchCard" class="search-card"> <el-card ref="searchCard" class="search-card">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item prop="mySelectOrg" label="所属党组织">
<el-cascader
v-model="mySelectOrg"
:options="orgList"
placeholder="请选择党组织"
:props="{ label: 'partyOrgName', value: 'id' }"
@change="handleChangeOrg"
clearable />
</el-form-item>
<el-form-item label="姓名" <el-form-item label="姓名"
prop="name"> prop="name">
<el-input v-model="dataForm.name" <el-input v-model="dataForm.name"
@ -121,7 +130,8 @@
idCard: '', idCard: '',
mobile: '', mobile: '',
year: '', year: '',
month: '' month: '',
orgId: ''
}, },
monthArr: [ monthArr: [
{ dictValue: '01', dictName: '一月' }, { dictValue: '01', dictName: '一月' },
@ -136,18 +146,24 @@
{ dictValue: '10', dictName: '十月' }, { dictValue: '10', dictName: '十月' },
{ dictValue: '11', dictName: '十一月' }, { dictValue: '11', dictName: '十一月' },
{ dictValue: '12', dictName: '十二月' } { dictValue: '12', dictName: '十二月' }
] ],
mySelectOrg: '',
orgList: [],
} }
}, },
components: { components: {
AddOrUpdate AddOrUpdate
}, },
created() {
this.getOrgList()
},
methods: { methods: {
resetForm(formName) { resetForm(formName) {
for(const n in this.dataForm) { for(const n in this.dataForm) {
this.dataForm[n] = '' this.dataForm[n] = ''
} }
this.getDataList() this.getDataList()
this.mySelectOrg = ''
}, },
yearChangeHandler(){ yearChangeHandler(){
if(this.dataForm.year === '' || this.dataForm.year === null){ if(this.dataForm.year === '' || this.dataForm.year === null){
@ -164,6 +180,33 @@
this.currentPage = val this.currentPage = val
this.getDataList() this.getDataList()
}, },
//
getOrgList() {
return this.$http.get('/resi/partymember/icPartyOrg/getTreelist', {params: {agencyId: localStorage.getItem('agencyId')}}).then(({data: res}) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.orgList = this.deepArrTOnull(res.data)
}).catch(() => {})
},
//
handleChangeOrg(e) {
if (this.mySelectOrg.length > 0 && this.mySelectOrg) {
this.dataForm.orgId = this.mySelectOrg[this.mySelectOrg.length - 1]
} else {
this.dataForm.orgId = ''
}
},
deepArrTOnull(arr) {
let a = []
a = arr.map(item => {
return {
...item,
children: (item.children.length > 0 && this.deepArrTOnull(item.children) )|| null
}
})
return a
}
} }
} }
</script> </script>

5
src/views/modules/partymember/icpartymemberpoint.vue

@ -3,12 +3,12 @@
<div class="mod-rent__rentDeath} resi-container"> <div class="mod-rent__rentDeath} resi-container">
<el-card ref="searchCard" class="search-card"> <el-card ref="searchCard" class="search-card">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item prop="mySelectOrg" label="上级组织"> <el-form-item prop="mySelectOrg" label="所属党组织">
<el-cascader <el-cascader
style="width:300px" style="width:300px"
v-model="mySelectOrg" v-model="mySelectOrg"
:options="orgList" :options="orgList"
placeholder="请选择上级组织" placeholder="请选择组织"
:props="{ checkStrictly: true, label: 'partyOrgName', value: 'id', children: 'children' }" :props="{ checkStrictly: true, label: 'partyOrgName', value: 'id', children: 'children' }"
@change="handleChangeOrg" @change="handleChangeOrg"
clearable /> clearable />
@ -122,6 +122,7 @@
this.dataForm[n] = '' this.dataForm[n] = ''
} }
this.getDataList() this.getDataList()
this.mySelectOrg = ''
}, },
handleSizeChange (val) { handleSizeChange (val) {
console.log(`每页 ${val}`) console.log(`每页 ${val}`)

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

@ -1,10 +1,10 @@
<template> <template>
<el-dialog :visible.sync="visible" :title="!dataForm.id ? '新增党组织' : '更新党组织'" :close-on-click-modal="false" <el-dialog :visible.sync="visible" :title="!dataForm.id ? '新增党组织' : '更新党组织'" :close-on-click-modal="false"
:close-on-press-escape="false"> :close-on-press-escape="false">
<el-form class="form" <el-form class="form"
:model="dataForm" :model="dataForm"
:rules="dataRule" :rules="dataRule"
ref="dataForm" ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()" @keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '100px'"> :label-width="$i18n.locale === 'en-US' ? '120px' : '100px'">
<el-form-item prop="partyOrgType" label="组织类型"> <el-form-item prop="partyOrgType" label="组织类型">
@ -127,13 +127,7 @@
customerId: '', customerId: '',
staffId:'', staffId:'',
orgPidName: '', orgPidName: '',
agencyName:'', agencyName:''
delFlag: '',
revision: '',
createdBy: '',
createdTime: '',
updatedBy: '',
updatedTime: '',
}, },
orgListVisible: false, orgListVisible: false,
agencyListVisible:false, agencyListVisible:false,
@ -146,7 +140,7 @@
mounted () { mounted () {
setTimeout(() => { setTimeout(() => {
this.initMap() this.initMap()
}, 500); }, 800);
}, },
methods: { methods: {
init() { init() {
@ -163,11 +157,11 @@
this.getInfo() this.getInfo()
} else { } else {
if(this.dataForm.orgPids) { if(this.dataForm.orgPids) {
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(',') this.dataForm.mySelectOrg = this.dataForm.orgPids.split(':')
} else { } else {
this.dataForm.mySelectOrg = '' this.dataForm.mySelectOrg = ''
} }
this.orgListTreeSetDefaultHandle() this.orgListTreeSetDefaultHandle()
} }
}) })
@ -236,6 +230,10 @@
return this.$message.error(res.msg) return this.$message.error(res.msg)
} }
this.orgList = res.data this.orgList = res.data
this.orgList.unshift({
partyOrgName: '一级组织',
id: '0'
});
}).catch(() => { }).catch(() => {
}) })
}, },
@ -245,7 +243,7 @@
this.dataForm.orgPid = this.dataForm.mySelectOrg[this.dataForm.mySelectOrg.length - 1] this.dataForm.orgPid = this.dataForm.mySelectOrg[this.dataForm.mySelectOrg.length - 1]
this.dataForm.orgPids = '' this.dataForm.orgPids = ''
this.dataForm.mySelectOrg.forEach(element => { this.dataForm.mySelectOrg.forEach(element => {
this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ',' + element : element this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ':' + element : element
}); });
} else { } else {
this.dataForm.orgPid = '' this.dataForm.orgPid = ''
@ -259,7 +257,7 @@
this.dataForm.agencyId = this.dataForm.maSelectAgency[this.dataForm.maSelectAgency.length - 1] this.dataForm.agencyId = this.dataForm.maSelectAgency[this.dataForm.maSelectAgency.length - 1]
this.dataForm.agencyPids = '' this.dataForm.agencyPids = ''
this.dataForm.maSelectAgency.forEach(element => { this.dataForm.maSelectAgency.forEach(element => {
this.dataForm.agencyPids = this.dataForm.agencyPids ? this.dataForm.agencyPids + ',' + element : element this.dataForm.agencyPids = this.dataForm.agencyPids ? this.dataForm.agencyPids + ':' + element : element
}); });
} else { } else {
this.dataForm.agencyId = '' this.dataForm.agencyId = ''
@ -277,12 +275,10 @@
...res.data ...res.data
} }
// //
this.dataForm.mySelectOrg = this.dataForm.orgPids.split(',') this.dataForm.mySelectOrg = this.dataForm.orgPids
console.log(this.dataForm.orgPids.split(','))
// //
this.dataForm.maSelectAgency = this.dataForm.agencyPids.split(',') this.dataForm.maSelectAgency = this.dataForm.agencyId
console.log(this.dataForm.agencyPids.split(','))
}).catch(() => { }).catch(() => {
}) })
@ -313,7 +309,7 @@
document.getElementById('mapSeach_id').style.display = "block" document.getElementById('mapSeach_id').style.display = "block"
document.getElementById('lon_lat_id').style.display = "block" document.getElementById('lon_lat_id').style.display = "block"
} }
// //
var center = new window.TMap.LatLng(36.0722275, 120.38945519) var center = new window.TMap.LatLng(36.0722275, 120.38945519)
// map TMap.Map() // map TMap.Map()
@ -392,7 +388,7 @@
convert (lat, lng) { convert (lat, lng) {
markers.setGeometries([]); markers.setGeometries([]);
// var input = document.getElementById('location').value.split(','); // var input = document.getElementById('location').value.split(':');
let location let location
if (lat && lng) { if (lat && lng) {
location = new TMap.LatLng(lat, lng); location = new TMap.LatLng(lat, lng);

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

@ -19,7 +19,7 @@
<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.orgPids)" @click="handleLook(scope.row.agencyId)"
type="text" type="text"
size="small" size="small"
class="div-table-button--detail">{{'查看党员'}}</el-button> class="div-table-button--detail">{{'查看党员'}}</el-button>
@ -139,10 +139,10 @@
}).catch(() => {}) }).catch(() => {})
}, },
// //
handleLook(orgPids) { handleLook(agencyId) {
this.lookMemberShow = true this.lookMemberShow = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ref_table_Member.initForm(orgPids) this.$refs.ref_table_Member.initForm(agencyId)
}) })
}, },
lookMemberClose () { lookMemberClose () {

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

@ -54,10 +54,8 @@ export default {
}, },
components: {}, components: {},
methods: { methods: {
initForm (orgPids) { initForm (agencyId) {
if (orgPids.split(',').length > 0) { this.orgPids = agencyId
this.orgPids = orgPids.split(',')[orgPids.split(',').length - 1]
}
this.tableLoading = true this.tableLoading = true
this.loadTable() this.loadTable()
}, },

Loading…
Cancel
Save