dai 3 years ago
parent
commit
fa38c00a19
  1. 74
      src/views/components/resiForm.vue
  2. 35
      src/views/modules/base/community/community.vue

74
src/views/components/resiForm.vue

@ -415,15 +415,7 @@ export default {
itemType:"checkbox", itemType:"checkbox",
formName:"hobbyCode", formName:"hobbyCode",
opction:[ opction:[
{label:'治安巡逻',formName:'hobbyCode1'},
{label:'人民调解',formName:'hobbyCode2'},
{label:'民情采集',formName:'hobbyCode3'},
{label:'问题辅导',formName:'hobbyCode4'},
{label:'结对帮扶',formName:'hobbyCode5'},
{label:'应急处理',formName:'hobbyCode6'},
{label:'义务理发',formName:'hobbyCode7'},
{label:'家电维修',formName:'hobbyCode8'},
{label:'其他',formName:'9'},
]}, ]},
{ {
label:'兴趣', label:'兴趣',
@ -968,14 +960,6 @@ export default {
itemType:"checkbox", itemType:"checkbox",
formName:"volunteerCategory", formName:"volunteerCategory",
opction:[ opction:[
{label:'文化队伍',formName:'hobbyCode1'},
{label:'楼委会',formName:'hobbyCode2'},
{label:'能人达人',formName:'hobbyCode3'},
{label:'老友俱乐部',formName:'hobbyCode4'},
{label:'代办员',formName:'hobbyCode5'},
{label:'调解员',formName:'hobbyCode6'},
{label:'采集员',formName:'hobbyCode7'},
{label:'治安巡逻员',formName:'9'},
]}, ]},
{ {
label:'备注', label:'备注',
@ -1282,6 +1266,8 @@ export default {
this.getPartyNation() this.getPartyNation()
this.getResidentNation() this.getResidentNation()
this.getHousing() this.getHousing()
this.getVolunteerNation()
this.gethobbyNation()
}, },
getGridList () { getGridList () {
const { user } = this.$store.state const { user } = this.$store.state
@ -1325,6 +1311,38 @@ export default {
console.log(error,'获取残疾字典'); console.log(error,'获取残疾字典');
} }
},
async getVolunteerNation(){
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', {'dictType':'VOLUNTEER_CATEGORY'})
this.footerInputList.forEach(c => {
for(let i of c.children){
if(i.formName == 'volunteerCategory'){
i.opction = data.data
}
}
})
} catch (error) {
console.log(error,'获取志愿者字典');
}
},
async gethobbyNation(){
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', {'dictType':'SPECIAL_SKILL'})
this.footerInputList.forEach(c => {
for(let i of c.children){
if(i.formName == 'hobbyCode'){
i.opction = data.data
}
}
})
} catch (error) {
console.log(error,'获取兴趣爱好字典');
}
}, },
async getdisabilityNationClass(){ async getdisabilityNationClass(){
try { try {
@ -1436,6 +1454,7 @@ export default {
async getResidentNation(){ async getResidentNation(){
try { try {
const { data } = await this.$http.post('sys/dict/data/dictlist', {'dictType':'special_resident_category'}) const { data } = await this.$http.post('sys/dict/data/dictlist', {'dictType':'special_resident_category'})
console.log(data.data,'see');
this.footerInputList.forEach(c => { this.footerInputList.forEach(c => {
for(let i of c.children){ for(let i of c.children){
if(i.formName == 'specialCategoryCode'){ if(i.formName == 'specialCategoryCode'){
@ -1627,6 +1646,9 @@ export default {
// console.log(tab); // console.log(tab);
// console.log(event); // console.log(event);
// console.log(tab._props.label ); // console.log(tab._props.label );
if (tab._props.label == '教育') { if (tab._props.label == '教育') {
if (!this.form.resiId) { if (!this.form.resiId) {
this.newForm.eduInfoDto = this.form.eduInfoDto this.newForm.eduInfoDto = this.form.eduInfoDto
@ -1971,6 +1993,7 @@ export default {
}, },
// //
residentEduInfo(id) { residentEduInfo(id) {
if(this.newForm.eduInfoDto) return
this.$http.get(`/actual/base/residentEduInfo/detail/${id}`).then(({ data: res }) => { this.$http.get(`/actual/base/residentEduInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -1985,6 +2008,7 @@ export default {
}, },
// //
residentHobbyInfo(id) { residentHobbyInfo(id) {
if(this.newForm.hobbyInfoDto) return
this.$http.get(`/actual/base/residentHobbyInfo/detail/${id}`).then(({ data: res }) => { this.$http.get(`/actual/base/residentHobbyInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2003,6 +2027,7 @@ export default {
}, },
// //
residentReligion(id) { residentReligion(id) {
if(this.newForm.religionDto) return
this.$http.get(`/actual/base/residentReligion/detail/${id}`).then(({ data: res }) => { this.$http.get(`/actual/base/residentReligion/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2018,6 +2043,7 @@ export default {
}, },
// //
getHealthInfoDetailById(id) { getHealthInfoDetailById(id) {
if(this.newForm.healthDto) return
this.$http.post(`/actual/base/residentHealthInfo/getHealthInfoDetailById/${id}`).then(({ data: res }) => { this.$http.post(`/actual/base/residentHealthInfo/getHealthInfoDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2049,6 +2075,7 @@ export default {
}, },
// //
residentWorkInfo(id) { residentWorkInfo(id) {
if(this.newForm.healthDto) return
this.$http.get(`/actual/base/residentWorkInfo/detail/${id}`).then(({ data: res }) => { this.$http.get(`/actual/base/residentWorkInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2066,6 +2093,7 @@ export default {
}, },
// //
getEconomyDetailById(id) { getEconomyDetailById(id) {
if(this.newForm.economyDto) return
this.$http.post(`/actual/base/residentEconomy/getEconomyDetailById/${id}`).then(({ data: res }) => { this.$http.post(`/actual/base/residentEconomy/getEconomyDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2080,6 +2108,7 @@ export default {
}, },
// //
getResideInfoDetailById(id) { getResideInfoDetailById(id) {
if(this.newForm.resideInfoDto) return
this.$http.post(`/actual/base/residentResideInfo/getResideInfoDetailById/${id}`).then(({ data: res }) => { this.$http.post(`/actual/base/residentResideInfo/getResideInfoDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2097,6 +2126,7 @@ export default {
}, },
// //
getFamilyInfoDetailById(id) { getFamilyInfoDetailById(id) {
if(this.newForm.familyInfoDto) return
this.$http.post(`/actual/base/residentFamilyInfo/getFamilyInfoDetailById/${id}`).then(({ data: res }) => { this.$http.post(`/actual/base/residentFamilyInfo/getFamilyInfoDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2117,6 +2147,7 @@ export default {
}, },
// //
residentBirthRecord(id) { residentBirthRecord(id) {
if(this.newForm.birthRecordDTO) return
this.$http.post(`/actual/base/residentBirthRecord/detail/${id}`).then(({ data: res }) => { this.$http.post(`/actual/base/residentBirthRecord/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2134,6 +2165,7 @@ export default {
}, },
// //
residentPartyMemberInfo(id) { residentPartyMemberInfo(id) {
if(this.newForm.parymemberInfoDto) return
this.$http.get(`/actual/base/residentPartyMemberInfo/detail/${id}`).then(({ data: res }) => { this.$http.get(`/actual/base/residentPartyMemberInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2157,6 +2189,7 @@ export default {
}, },
// //
residentEnsureHouse(id) { residentEnsureHouse(id) {
if(this.newForm.ensureHouseDto) return
this.$http.get(`/actual/base/residentEnsureHouse/detail/${id}`).then(({ data: res }) => { this.$http.get(`/actual/base/residentEnsureHouse/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2174,6 +2207,7 @@ export default {
}, },
// //
residentUnemployed(id) { residentUnemployed(id) {
if(this.newForm.unemployedDto) return
this.$http.get(`/actual/base/residentUnemployed/detail/${id}`).then(({ data: res }) => { this.$http.get(`/actual/base/residentUnemployed/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2194,6 +2228,7 @@ export default {
}, },
// 退 // 退
getVeteranDetailById(id) { getVeteranDetailById(id) {
if(this.newForm.veteranDto) return
this.$http.post(`/actual/base/residentVeteran/getVeteranDetailById/${id}`).then(({ data: res }) => { this.$http.post(`/actual/base/residentVeteran/getVeteranDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2216,6 +2251,7 @@ export default {
}, },
// //
residentUnitedFront(id) { residentUnitedFront(id) {
if(this.newForm.unitedFrontDto) return
this.$http.get(`/actual/base/residentUnitedFront/detail/${id}`).then(({ data: res }) => { this.$http.get(`/actual/base/residentUnitedFront/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2230,6 +2266,7 @@ export default {
}, },
// //
getVolunteerDetailById(id) { getVolunteerDetailById(id) {
if(this.newForm.volunteerDto) return
this.$http.post(`/actual/base/residentVolunteer/getVolunteerDetailById/${id}`).then(({ data: res }) => { this.$http.post(`/actual/base/residentVolunteer/getVolunteerDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2248,6 +2285,7 @@ export default {
}, },
// //
getOldPeopleDetailById(id) { getOldPeopleDetailById(id) {
if(this.newForm.oldPeopleDto) return
this.$http.post(`/actual/base/residentOldPeople/getOldPeopleDetailById/${id}`).then(({ data: res }) => { this.$http.post(`/actual/base/residentOldPeople/getOldPeopleDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2262,6 +2300,7 @@ export default {
}, },
// //
residentSpecial(id) { residentSpecial(id) {
if(this.newForm.specialDto) return
this.$http.get(`/actual/base/residentSpecial/detail/${id}`).then(({ data: res }) => { this.$http.get(`/actual/base/residentSpecial/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg);
@ -2322,7 +2361,6 @@ export default {
} }
this.newForm.eduInfoDto = this.form.eduInfoDto this.newForm.eduInfoDto = this.form.eduInfoDto
this.newForm.specialDto = this.form.specialDto
console.log(this.newForm.specialDto); console.log(this.newForm.specialDto);
}, },
setJSON() { setJSON() {

35
src/views/modules/base/community/community.vue

@ -19,7 +19,9 @@
:filter-node-method="filterNode" :filter-node-method="filterNode"
@node-click="handleNodeClick" @node-click="handleNodeClick"
lazy lazy
auto-expand-parent
:default-expanded-keys="autoOpenArr" :default-expanded-keys="autoOpenArr"
:load="lazyLoadTree"> :load="lazyLoadTree">
<span slot-scope="{ node, data }" <span slot-scope="{ node, data }"
@ -664,6 +666,7 @@ export default {
async loadTree (isRefresh) { async loadTree (isRefresh) {
const url = "/actual/base/communityBuilding/tree/initTree" const url = "/actual/base/communityBuilding/tree/initTree"
const { data, code, msg } = await requestGet(url) const { data, code, msg } = await requestGet(url)
this.handleNodeClick(data)
if (code === 0) { if (code === 0) {
this.treeData = [] this.treeData = []
this.treeData.push(data) this.treeData.push(data)
@ -739,7 +742,9 @@ export default {
this.vDisabled = false this.vDisabled = false
this.bDisabled = false this.bDisabled = false
if (obj.level === 'building') {// if (obj.level === 'building') {//
this.$refs['ref_buildingTable'].loadTable('tree', this.selTreeObj) setTimeout(()=>{
this.$refs['ref_buildingTable'].loadTable('tree', this.selTreeObj)
},100)
this.selAgencyId = '' this.selAgencyId = ''
this.selGridId = '' this.selGridId = ''
await this.getValiheList() await this.getValiheList()
@ -786,16 +791,26 @@ export default {
}, },
// //
toNextLevel (row, level) { async toNextLevel (row, level) {
console.log(row,'row');
if (level === 'community') { console.log(level,'level');
this.selTreeObj = this.$refs.ref_tree.getNode(row.neighborHoodId).data this.autoOpenArr = []
this.openNodes.push(this.selTreeObj.id) // console.log(this.$refs.ref_tree);
} else { const { agencyId,gridId,neighborHoodId,propertyId} = row
this.selTreeObj = this.$refs.ref_tree.getNode(row.buildingId).data let arr = [agencyId,gridId,neighborHoodId,propertyId]
} this.autoOpenArr = arr
console.log(this.autoOpenArr,'默认展开数组');
// if (level === 'community') {
// setTimeout(()=>{
// nextTick(1000)
// this.selTreeObj = this.$refs.ref_tree.getNode(row.neighborHoodId).data || {}
// },50)
// this.autoOpenArr.push(this.selTreeObj.id)
// } else {
// this.selTreeObj = this.$refs.ref_tree.getNode(row.buildingId).data
// }
console.log(this.selTreeObj,'123123123');
this.handleNodeClick(this.selTreeObj) this.handleNodeClick(this.selTreeObj)
this.$nextTick(() => { this.$nextTick(() => {
// ref_tree ref value node-key // ref_tree ref value node-key

Loading…
Cancel
Save