|
|
@ -133,14 +133,10 @@ |
|
|
|
</div> |
|
|
|
<div class="content"> |
|
|
|
<div :class="['info-item', item.type === 'divider' ? 'divider' : '']" v-for="(item, index) in infoList" :key="index"> |
|
|
|
<div class="info-container" v-if="item.type === 'info'"> |
|
|
|
<div class="info-container" v-if="item.type!='divider'"> |
|
|
|
<div class="point"></div> |
|
|
|
<div class="info">{{ item.label }}:{{ loopGetLabel(item.optionsList, item.value) }}</div> |
|
|
|
</div> |
|
|
|
<div class="info-container" v-else-if="item.type === 'self'"> |
|
|
|
<div class="point"></div> |
|
|
|
<div class="info">{{ item.label }}:{{ item.value || '-' }}</div> |
|
|
|
</div> |
|
|
|
<div class="divider" v-else></div> |
|
|
|
</div> |
|
|
|
<div class="divider info-item"></div> |
|
|
@ -191,7 +187,11 @@ import { mapGetters, mapActions } from 'vuex' |
|
|
|
import { |
|
|
|
getResidentBasicInfo, |
|
|
|
getResidentRelationshipInfo, |
|
|
|
getResidentMoreInfo |
|
|
|
getrowInfo, |
|
|
|
getNeighborhoodoption, |
|
|
|
getBuildingoption, |
|
|
|
getUnitoption, |
|
|
|
getHouseoption |
|
|
|
} from 'api/screen-content-right' |
|
|
|
import Bus from 'utils/eventBus' |
|
|
|
import moreInfo from './info.json' |
|
|
@ -210,7 +210,7 @@ export default { |
|
|
|
{ label: '工作单位', icon: require('@/assets/next-images/resident-info/work-position.png'), left: '110px', top: '250px', visible: false, value: [] }, |
|
|
|
{ label: '志愿者类别', icon: require('@/assets/next-images/resident-info/volunteer-type.png'), left: '550px', top: '250px', visible: false, value: [] } |
|
|
|
], |
|
|
|
|
|
|
|
resiInfo:{}, |
|
|
|
relationship: { |
|
|
|
owner: '-', |
|
|
|
firstRel: '-', |
|
|
@ -229,11 +229,12 @@ export default { |
|
|
|
{ label: '核酸信息', value: '' }, { label: '行程信息', value: '' }, { label: '疫苗信息', value: '' } |
|
|
|
], |
|
|
|
|
|
|
|
residentId: '' |
|
|
|
residentId: '', |
|
|
|
gridName:null |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters(['residentInfoVisible']), |
|
|
|
...mapGetters(['residentInfoVisible','communityId']), |
|
|
|
tabInfoList () { |
|
|
|
let list = [] |
|
|
|
try { |
|
|
@ -252,7 +253,24 @@ export default { |
|
|
|
Bus.$off('emitResidentInfoData', this.emitResidentInfoData.bind(this)) |
|
|
|
Bus.$on('emitResidentInfoData', this.emitResidentInfoData.bind(this)) |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
'resiInfo':{ |
|
|
|
handler(newVal){ |
|
|
|
this.getResidentMoreInfo() |
|
|
|
}, |
|
|
|
deep:true |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
getrowInfo(){ |
|
|
|
let params = { |
|
|
|
icResiUserId: this.residentId |
|
|
|
} |
|
|
|
getrowInfo(params).then(({ data: res }) => { |
|
|
|
this.resiInfo = res.ic_resi_user[0] |
|
|
|
}) |
|
|
|
}, |
|
|
|
emitResidentInfoData ({ residentId }) { |
|
|
|
this.residentId = residentId || '' |
|
|
|
if (this.residentId) { |
|
|
@ -287,7 +305,7 @@ export default { |
|
|
|
getResidentDetail () { |
|
|
|
this.getResidentBasicInfo() |
|
|
|
this.getResidentRelationshipInfo() |
|
|
|
this.getResidentMoreInfo() |
|
|
|
this.getrowInfo() |
|
|
|
}, |
|
|
|
// 获取左上个人基本情况 |
|
|
|
getResidentBasicInfo () { |
|
|
@ -298,6 +316,7 @@ export default { |
|
|
|
console.log('获取左上个人基本情况', res) |
|
|
|
const { name, gridName, financialSituation, personCategory, houseInfo, workUnit, volunteerCategory } = res |
|
|
|
this.userName = name |
|
|
|
this.gridName = gridName |
|
|
|
const { monthlyIncome, retirementAmount } = financialSituation |
|
|
|
this.peopleSituationList = [ |
|
|
|
{ label: '所属网格', icon: require('@/assets/next-images/resident-info/belong-grid.png'), left: '160px', top: '0px', visible: false, value: [gridName || '-'] }, |
|
|
@ -333,31 +352,78 @@ export default { |
|
|
|
console.error('获取左下家庭关系情况', err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取更多信息 |
|
|
|
getResidentMoreInfoBk () { |
|
|
|
const params = { |
|
|
|
icResiUserId: this.residentId |
|
|
|
|
|
|
|
getNeighborhoodoption(){ |
|
|
|
let params = { |
|
|
|
agencyId: this.communityId, |
|
|
|
gridId:this.resiInfo.GRID_ID |
|
|
|
} |
|
|
|
getResidentMoreInfo(params).then(() => { |
|
|
|
console.log('获取更多信息', moreInfo) |
|
|
|
}).catch(err => { |
|
|
|
console.error('获取更多信息', err) |
|
|
|
getNeighborhoodoption(params).then(({ data: res }) => { |
|
|
|
let str =res.filter(item=>item.value == this.resiInfo.VILLAGE_ID)[0].label |
|
|
|
this.infoList.forEach(item=>{ |
|
|
|
if(item.type === 'neighborhood'){ |
|
|
|
item.value = str |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getBuildingoption() |
|
|
|
}) |
|
|
|
}, |
|
|
|
getBuildingoption(){ |
|
|
|
let params = { |
|
|
|
neighborHoodId: this.resiInfo.VILLAGE_ID |
|
|
|
} |
|
|
|
getBuildingoption(params).then(({ data: res }) => { |
|
|
|
let str =res.filter(item=>item.value == this.resiInfo.BUILD_ID)[0].label |
|
|
|
this.infoList.forEach(item=>{ |
|
|
|
if(item.type === 'building'){ |
|
|
|
item.value = str |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getUnitoption() |
|
|
|
}) |
|
|
|
}, |
|
|
|
getUnitoption(){ |
|
|
|
let params = { |
|
|
|
buildingId: this.resiInfo.BUILD_ID |
|
|
|
} |
|
|
|
getUnitoption(params).then(({ data: res }) => { |
|
|
|
let str =res.filter(item=>item.value == this.resiInfo.UNIT_ID)[0].label |
|
|
|
this.infoList.forEach(item=>{ |
|
|
|
if(item.type === 'unit'){ |
|
|
|
item.value = str |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getHouseoption() |
|
|
|
}) |
|
|
|
}, |
|
|
|
getHouseoption(){ |
|
|
|
let params = { |
|
|
|
unitId: this.resiInfo.UNIT_ID |
|
|
|
} |
|
|
|
getHouseoption(params).then(({ data: res }) => { |
|
|
|
let str =res.filter(item=>item.value == this.resiInfo.HOME_ID)[0].label |
|
|
|
this.infoList.forEach(item=>{ |
|
|
|
if(item.type === 'house'){ |
|
|
|
item.value = str |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取更多信息 |
|
|
|
getResidentMoreInfo () { |
|
|
|
console.log('获取居民详情', moreInfo) |
|
|
|
const { itemList, groupList } = moreInfo.data |
|
|
|
this.infoList = [ |
|
|
|
{ label: '所属网格', value: '', optionsList: [], type: 'self' }, |
|
|
|
{ label: '所属小区', value: '', optionsList: [], type: 'self' }, |
|
|
|
{ label: '所属楼栋', value: '', optionsList: [], type: 'self' }, |
|
|
|
{ label: '所属楼栋', value: '', optionsList: [], type: 'self' } |
|
|
|
{ label: '所属网格', value: this.gridName, optionsList: [], type: 'grid' }, |
|
|
|
{ label: '所属小区', value: '', optionsList: [], type: 'neighborhood' }, |
|
|
|
{ label: '所属楼栋', value: '', optionsList: [], type: 'building' }, |
|
|
|
{ label: '所属单元', value: '', optionsList: [], type: 'unit' }, |
|
|
|
{ label: '所属房屋', value: '', optionsList: [], type: 'house' } |
|
|
|
] |
|
|
|
this.getNeighborhoodoption() |
|
|
|
itemList.forEach(item => { |
|
|
|
this.infoList.push({ |
|
|
|
label: item.label, |
|
|
|
value: item.defaultValue, |
|
|
|
value:this.resiInfo[item.columnName]|| item.defaultValue, |
|
|
|
optionsList: item.options, |
|
|
|
type: item.label === '分割线' ? 'divider' : 'info' |
|
|
|
}) |
|
|
|