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",
formName:"hobbyCode",
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:'兴趣',
@ -968,14 +960,6 @@ export default {
itemType:"checkbox",
formName:"volunteerCategory",
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:'备注',
@ -1282,6 +1266,8 @@ export default {
this.getPartyNation()
this.getResidentNation()
this.getHousing()
this.getVolunteerNation()
this.gethobbyNation()
},
getGridList () {
const { user } = this.$store.state
@ -1325,6 +1311,38 @@ export default {
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(){
try {
@ -1436,6 +1454,7 @@ export default {
async getResidentNation(){
try {
const { data } = await this.$http.post('sys/dict/data/dictlist', {'dictType':'special_resident_category'})
console.log(data.data,'see');
this.footerInputList.forEach(c => {
for(let i of c.children){
if(i.formName == 'specialCategoryCode'){
@ -1627,6 +1646,9 @@ export default {
// console.log(tab);
// console.log(event);
// console.log(tab._props.label );
if (tab._props.label == '教育') {
if (!this.form.resiId) {
this.newForm.eduInfoDto = this.form.eduInfoDto
@ -1971,6 +1993,7 @@ export default {
},
//
residentEduInfo(id) {
if(this.newForm.eduInfoDto) return
this.$http.get(`/actual/base/residentEduInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -1985,6 +2008,7 @@ export default {
},
//
residentHobbyInfo(id) {
if(this.newForm.hobbyInfoDto) return
this.$http.get(`/actual/base/residentHobbyInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2003,6 +2027,7 @@ export default {
},
//
residentReligion(id) {
if(this.newForm.religionDto) return
this.$http.get(`/actual/base/residentReligion/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2018,6 +2043,7 @@ export default {
},
//
getHealthInfoDetailById(id) {
if(this.newForm.healthDto) return
this.$http.post(`/actual/base/residentHealthInfo/getHealthInfoDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2049,6 +2075,7 @@ export default {
},
//
residentWorkInfo(id) {
if(this.newForm.healthDto) return
this.$http.get(`/actual/base/residentWorkInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2066,6 +2093,7 @@ export default {
},
//
getEconomyDetailById(id) {
if(this.newForm.economyDto) return
this.$http.post(`/actual/base/residentEconomy/getEconomyDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2080,6 +2108,7 @@ export default {
},
//
getResideInfoDetailById(id) {
if(this.newForm.resideInfoDto) return
this.$http.post(`/actual/base/residentResideInfo/getResideInfoDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2097,6 +2126,7 @@ export default {
},
//
getFamilyInfoDetailById(id) {
if(this.newForm.familyInfoDto) return
this.$http.post(`/actual/base/residentFamilyInfo/getFamilyInfoDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2117,6 +2147,7 @@ export default {
},
//
residentBirthRecord(id) {
if(this.newForm.birthRecordDTO) return
this.$http.post(`/actual/base/residentBirthRecord/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2134,6 +2165,7 @@ export default {
},
//
residentPartyMemberInfo(id) {
if(this.newForm.parymemberInfoDto) return
this.$http.get(`/actual/base/residentPartyMemberInfo/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2157,6 +2189,7 @@ export default {
},
//
residentEnsureHouse(id) {
if(this.newForm.ensureHouseDto) return
this.$http.get(`/actual/base/residentEnsureHouse/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2174,6 +2207,7 @@ export default {
},
//
residentUnemployed(id) {
if(this.newForm.unemployedDto) return
this.$http.get(`/actual/base/residentUnemployed/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2194,6 +2228,7 @@ export default {
},
// 退
getVeteranDetailById(id) {
if(this.newForm.veteranDto) return
this.$http.post(`/actual/base/residentVeteran/getVeteranDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2216,6 +2251,7 @@ export default {
},
//
residentUnitedFront(id) {
if(this.newForm.unitedFrontDto) return
this.$http.get(`/actual/base/residentUnitedFront/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2230,6 +2266,7 @@ export default {
},
//
getVolunteerDetailById(id) {
if(this.newForm.volunteerDto) return
this.$http.post(`/actual/base/residentVolunteer/getVolunteerDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2248,6 +2285,7 @@ export default {
},
//
getOldPeopleDetailById(id) {
if(this.newForm.oldPeopleDto) return
this.$http.post(`/actual/base/residentOldPeople/getOldPeopleDetailById/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2262,6 +2300,7 @@ export default {
},
//
residentSpecial(id) {
if(this.newForm.specialDto) return
this.$http.get(`/actual/base/residentSpecial/detail/${id}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
@ -2322,7 +2361,6 @@ export default {
}
this.newForm.eduInfoDto = this.form.eduInfoDto
this.newForm.specialDto = this.form.specialDto
console.log(this.newForm.specialDto);
},
setJSON() {

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

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

Loading…
Cancel
Save