Browse Source

居民查看/房屋copy

V1.0
mk 3 years ago
parent
commit
9c7e667958
  1. 496
      src/views/components/resiInfo.vue
  2. 5
      src/views/components/resiSearch.vue
  3. 883
      src/views/modules/base/community/community copy.vue
  4. 23
      src/views/modules/base/resi.vue

496
src/views/components/resiInfo.vue

@ -97,7 +97,7 @@
</el-row>
<div class=" title-small title_postion f-top40 f-bot24" >其他信息 </div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="教育">
<el-tab-pane label="教育" >
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">文化程度:</div>
<span class="f-left8 f-font-color">{{educationText}}</span>
@ -107,7 +107,7 @@
<span class="f-left8 f-font-color">{{eduInfoDto.eduRemark?eduInfoDto.eduRemark:'--'}}</span>
</div>
</el-tab-pane>
<el-tab-pane label="兴趣爱好">
<el-tab-pane label="兴趣爱好" >
<section class="f-flex f-flex1" style="flex: 1;flex-wrap: wrap;">
<div class="f-labels f-top24">兴趣分类 :</div>
<div v-for="(item,index) in hobbyCodeArr" :key="index" class="f-top24">
@ -131,7 +131,7 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="宗教信仰">
<el-tab-pane label="宗教信仰" >
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">宗教:</div>
<span class="f-left8 f-font-color">{{residentReligionObj.religion?residentReligionObj.religion:'--'}}</span>
@ -141,7 +141,7 @@
<span class="f-left8 f-font-color">{{residentReligionObj.religionRemark?residentReligionObj.religionRemark:'--'}}</span>
</div>
</el-tab-pane>
<el-tab-pane label="健康">
<el-tab-pane label="健康" >
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
@ -268,7 +268,7 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="工作">
<el-tab-pane label="工作" >
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
@ -350,7 +350,7 @@
</el-row>
</el-tab-pane>
<el-tab-pane label="家庭">
<el-tab-pane label="家庭" >
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
@ -407,7 +407,168 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="党员">
<el-tab-pane label="出生信息" >
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">出生地 :</div>
<span class="f-left8 f-font-color">{{residentBirthRecordObj?residentBirthRecordObj.birthplace?residentBirthRecordObj.birthplace:'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">父亲姓名 :</div>
<span class="f-left8 f-font-color">{{residentBirthRecordObj?residentBirthRecordObj.father ?residentBirthRecordObj.father :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">母亲姓名 :</div>
<span class="f-left8 f-font-color">{{residentBirthRecordObj?residentBirthRecordObj.mother?residentBirthRecordObj.mother:'--':'--'}}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">胎次 :</div>
<span class="f-left8 f-font-color">{{residentBirthRecordObj?residentBirthRecordObj.count?residentBirthRecordObj.count:'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">申报日期 :</div>
<span class="f-left8 f-font-color">{{residentBirthRecordObj?residentBirthRecordObj.reportDate ?residentBirthRecordObj.reportDate :'--':'--'}}</span>
</div>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="死亡人员" >
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">死亡时间 :</div>
<span class="f-left8 f-font-color">{{residentDeathRecordObj?residentDeathRecordObj.deathDate?residentDeathRecordObj.deathDate.substr(0,10):'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">加入原因 :</div>
<span class="f-left8 f-font-color">{{residentDeathRecordObj?residentDeathRecordObj.deathReason ?residentDeathRecordObj.deathReason :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">移除时间 :</div>
<span class="f-left8 f-font-color">{{residentDeathRecordObj?residentDeathRecordObj.removeDate ?residentDeathRecordObj.removeDate.substr(0,10) :'--':'--'}}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">移除原因 :</div>
<span class="f-left8 f-font-color">{{residentDeathRecordObj?residentDeathRecordObj.removeReason?residentDeathRecordObj.removeReason:'--':'--'}}</span>
</div>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="迁出" >
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">迁出日期 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.outOfTime?residentMoveOutRecordObj.outOfTime.substr(0,10):'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">迁出类型 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.type ?residentMoveOutRecordObj.type :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">迁出原因 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.reason ?residentMoveOutRecordObj.reason:'--':'--'}}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">迁出至组织 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.deptId?residentMoveOutRecordObj.deptId:'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">小区 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.villageName ?residentMoveOutRecordObj.villageName :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">楼号 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.buildName ?residentMoveOutRecordObj.buildName:'--':'--'}}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">单元 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.unitName ?residentMoveOutRecordObj.unitName :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">房屋 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.homeName ?residentMoveOutRecordObj.homeName :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">外迁地址 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.address ?residentMoveOutRecordObj.address:'--':'--'}}</span>
</div>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="更新记录">
<el-table
class="m-table-item"
:data="tableData"
border
style="width: 100%"
>
<el-table-column
label="序号"
type="index"
fixed="left"
align="left"
width="50"
>
</el-table-column>
<el-table-column
v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
align="left"
:show-overflow-tooltip="true"
:width="item.width || ''"
>
<template slot-scope="scope">
<span >{{ handleFilterSpan(scope.row, item) }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="党员" v-if="dyShowStatus">
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
@ -464,7 +625,7 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="保障房">
<el-tab-pane label="保障房" v-if="bzfShowStatus">
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
@ -501,7 +662,7 @@
</el-row>
</el-tab-pane>
<el-tab-pane label="失业">
<el-tab-pane label="失业" v-if="syShowStatus">
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
@ -563,7 +724,7 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="退役军人">
<el-tab-pane label="退役军人" v-if="tyjrShowStatus">
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
@ -634,7 +795,7 @@
</el-row>
</el-tab-pane>
<el-tab-pane label="统战人员">
<el-tab-pane label="统战人员" v-if="tzryShowStatus">
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
@ -650,7 +811,7 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="志愿者">
<el-tab-pane label="志愿者" v-if="zyzShowStatus">
<section class="f-flex f-flex1" style="flex: 1;flex-wrap: wrap;">
<div class="f-labels f-top24">志愿者类别 :</div>
<div v-for="(item,index) in volunteerCategoryArr" :key="index" class="f-top24">
@ -672,7 +833,7 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="老年人">
<el-tab-pane label="老年人" v-if="lnrShowStatus">
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
@ -682,7 +843,7 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="特殊人群">
<el-tab-pane label="特殊人群" v-if="tsrqShowStatus">
<section class="f-flex f-flex1" style="flex: 1;flex-wrap: wrap;">
<div class="f-labels f-top24">特殊人群类别 :</div>
<div v-for="(item,index) in specialDtoArrText" :key="index" class="f-top24">
@ -696,167 +857,6 @@
</span>
</section>
</el-tab-pane>
<el-tab-pane label="出生信息">
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">出生地 :</div>
<span class="f-left8 f-font-color">{{residentBirthRecordObj?residentBirthRecordObj.birthplace?residentBirthRecordObj.birthplace:'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">父亲姓名 :</div>
<span class="f-left8 f-font-color">{{residentBirthRecordObj?residentBirthRecordObj.father ?residentBirthRecordObj.father :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">母亲姓名 :</div>
<span class="f-left8 f-font-color">{{residentBirthRecordObj?residentBirthRecordObj.mother?residentBirthRecordObj.mother:'--':'--'}}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">胎次 :</div>
<span class="f-left8 f-font-color">{{residentBirthRecordObj?residentBirthRecordObj.count?residentBirthRecordObj.count:'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">申报日期 :</div>
<span class="f-left8 f-font-color">{{residentBirthRecordObj?residentBirthRecordObj.reportDate ?residentBirthRecordObj.reportDate :'--':'--'}}</span>
</div>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="死亡人员">
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">死亡时间 :</div>
<span class="f-left8 f-font-color">{{residentDeathRecordObj?residentDeathRecordObj.deathDate?residentDeathRecordObj.deathDate.substr(0,10):'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">加入原因 :</div>
<span class="f-left8 f-font-color">{{residentDeathRecordObj?residentDeathRecordObj.deathReason ?residentDeathRecordObj.deathReason :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">移除时间 :</div>
<span class="f-left8 f-font-color">{{residentDeathRecordObj?residentDeathRecordObj.removeDate ?residentDeathRecordObj.removeDate.substr(0,10) :'--':'--'}}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">移除原因 :</div>
<span class="f-left8 f-font-color">{{residentDeathRecordObj?residentDeathRecordObj.removeReason?residentDeathRecordObj.removeReason:'--':'--'}}</span>
</div>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="迁出">
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">迁出日期 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.outOfTime?residentMoveOutRecordObj.outOfTime.substr(0,10):'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">迁出类型 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.type ?residentMoveOutRecordObj.type :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">迁出原因 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.reason ?residentMoveOutRecordObj.reason:'--':'--'}}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">迁出至组织 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.deptId?residentMoveOutRecordObj.deptId:'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">小区 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.villageName ?residentMoveOutRecordObj.villageName :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">楼号 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.buildName ?residentMoveOutRecordObj.buildName:'--':'--'}}</span>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">单元 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.unitName ?residentMoveOutRecordObj.unitName :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">房屋 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.homeName ?residentMoveOutRecordObj.homeName :'--':'--'}}</span>
</div>
</el-col>
<el-col :span="8">
<div class="f-flex f-bto16 f-top24">
<div class="f-labels">外迁地址 :</div>
<span class="f-left8 f-font-color">{{residentMoveOutRecordObj?residentMoveOutRecordObj.address ?residentMoveOutRecordObj.address:'--':'--'}}</span>
</div>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="更新记录">
<el-table
class="m-table-item"
:data="tableData"
border
style="width: 100%"
>
<el-table-column
label="序号"
type="index"
fixed="left"
align="left"
width="50"
>
</el-table-column>
<el-table-column
v-for="item in tableHeader"
:key="item.columnName"
:prop="item.columnName"
:label="item.label"
align="left"
:show-overflow-tooltip="true"
:width="item.width || ''"
>
<template slot-scope="scope">
<span >{{ handleFilterSpan(scope.row, item) }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</div>
@ -865,6 +865,7 @@
<script>
import { requestPost, requestGet } from '@/js/dai/request'
import { nextTick } from 'vue'
export default {
name: 'resiForm',
props: {
@ -1127,6 +1128,110 @@ export default {
}
return temp
},
dyShowStatus(){
let flag = false
if(this.resiDetailObj.categoryInfo){
if(this.resiDetailObj.categoryInfo.partyFlag==1){
flag = true
}else{
flag = false
}
}else{
flag = false
}
return flag
},
bzfShowStatus(){
let flag = false
if(this.resiDetailObj.categoryInfo){
if(this.resiDetailObj.categoryInfo.ensureHouseFlag==1){
flag = true
}else{
flag = false
}
}else{
flag = false
}
return flag
},
syShowStatus(){
let flag = false
if(this.resiDetailObj.categoryInfo){
if(this.resiDetailObj.categoryInfo.unemployedFlag==1){
flag = true
}else{
flag = false
}
}else{
flag = false
}
return flag
},
tyjrShowStatus(){
let flag = false
if(this.resiDetailObj.categoryInfo){
if(this.resiDetailObj.categoryInfo.veteranFlag==1){
flag = true
}else{
flag = false
}
}else{
flag = false
}
return flag
},
tzryShowStatus(){
let flag = false
if(this.resiDetailObj.categoryInfo){
if(this.resiDetailObj.categoryInfo.unitedFrontFlag==1){
flag = true
}else{
flag = false
}
}else{
flag = false
}
return flag
},
zyzShowStatus(){
let flag = false
if(this.resiDetailObj.categoryInfo){
if(this.resiDetailObj.categoryInfo.volunteerFlag==1){
flag = true
}else{
flag = false
}
}else{
flag = false
}
return flag
},
lnrShowStatus(){
let flag = false
if(this.resiDetailObj.categoryInfo){
if(this.resiDetailObj.categoryInfo.oldPeopleFlag==1){
flag = true
}else{
flag = false
}
}else{
flag = false
}
return flag
},
tsrqShowStatus(){
let flag = false
if(this.resiDetailObj.categoryInfo){
if(this.resiDetailObj.categoryInfo.specialCrowdFlag==1){
flag = true
}else{
flag = false
}
}else{
flag = false
}
return flag
}
},
watch: {
@ -1158,59 +1263,58 @@ export default {
return _val || row[item.columnName];
},
handleClick(tab){
if(tab.index==0){
if(tab._props.label=="教育"){
this.getEducation()
this.getEduInfoDtoObj()
}else if(tab.index == 1){
}else if(tab._props.label == "兴趣爱好"){
this.getResidentHobbyInfoObj()
}
else if(tab.index == 2){
else if(tab._props.label == "宗教信仰"){
this.getResidentReligionObj()
}else if(tab.index == 3){
}else if(tab._props.label == "健康"){
this.getdisabilityNation()
this.getillnessNation()
this.getchronicNation()
this.getHealthInfoDetailById()
}else if (tab.index == 4){
}else if (tab._props.label == "工作"){
this.getResidentWorkInfoObj()
}else if (tab.index == 5){
}else if (tab._props.label == "经济状况"){
this.getEconomyDetailById()
}else if (tab.index == 6){
}else if (tab._props.label == "居住"){
this.getHouseholdNation()
this.getResideInfoDetailById()
}else if(tab.index == 7){
}else if(tab._props.label == "家庭"){
this.getrelationshipArr()
this.getSpouse()
this.getMarriageNation()
this.getResideNation()
this.getFamilyInfoDetailById()
}else if(tab.index == 8){
}else if(tab._props.label == "党员"){
this.getResidentPartyMemberInfo()
}else if(tab.index == 9){
}else if(tab._props.label == "保障房"){
this.getHousing()
this.getResidentEnsureHouse()
}else if(tab.index == 10){
}else if(tab._props.label == "失业"){
this.getUnemployment()
this.getResidentUnemployed()
}else if (tab.index == 11){
}else if (tab._props.label == "退役军人"){
this.getVeteranDetailById()
}else if(tab.index == 12){
}else if(tab._props.label == "统战人员"){
this.getResidentUnitedFront()
}else if(tab.index == 13){
}else if(tab._props.label == "志愿者"){
this.getVolunteerDetailById()
}else if(tab.index == 14){
}else if(tab._props.label == "老年人"){
this.getOldPeopleDetailById()
}else if(tab.index == 15){
console.log(1);
}else if(tab._props.label == "特殊人群"){
this.getResidentNation()
this.getresidentSpecial()
}else if(tab.index == 16){
}else if(tab._props.label == "出生信息"){
this.getResidentBirthRecord()
}else if(tab.index == 17){
}else if(tab._props.label == "死亡人员"){
this.getResidentDeathRecord()
}else if (tab.index == 18){
}else if (tab._props.label == "迁出"){
this.getResidentMoveOutRecord()
}else if (tab.index == 19){
}else if (tab._props.label == "更新记录"){
this.getChangeRecordDetailById()
}
},

5
src/views/components/resiSearch.vue

@ -178,11 +178,6 @@ export default {
data() {
let initForm = (arr, columnName) => {
let _form = {}
// console.log('formInfo', obj)
// if (Object.keys(obj).length > 0) {
// _form = { ...obj }
// return _form
// }
arr.forEach((item) => {
if (item.itemType == 'checkbox') _form[item.columnName] = []
else if (item.queryType == 'resi_category' && columnName) {

883
src/views/modules/base/community/community copy.vue

@ -0,0 +1,883 @@
<template>
<div class="div_main">
<div :style="{height:rowHeight}"
class="div_tree">
<el-input placeholder="输入关键字进行过滤"
v-model="filterText">
</el-input>
<el-scrollbar :style="{height:treeHeight}"
class="scrollar">
<el-tree ref="ref_tree"
v-loading="treeLoading"
class="filter_tree"
:data="treeData"
:props="defaultProps"
:highlight-current="true"
node-key="id"
:default-expanded-keys="openNodes"
:expand-on-click-node="false"
:filter-node-method="filterNode"
@node-click="handleNodeClick">
<span slot-scope="{ node, data }"
class="custom-tree-node">
<span :id="data.id">{{ data.showName }}</span>
</span>
</el-tree>
</el-scrollbar>
</div>
<div :style="{height:rowHeight}"
class=div_left>
<div class="div_search">
<el-form :inline="true"
ref="ref_searchform"
:label-width="'100px'">
<el-form-item label="房主姓名"
prop="ownerName">
<el-input v-model="ownerName"
class="item_width_normal"
size="small"
clearable
placeholder="请输入内容">
</el-input>
</el-form-item>
<el-form-item label="联系方式"
prop="ownerPhone">
<el-input v-model="ownerPhone"
class="item_width_normal"
size="small"
clearable
placeholder="请输入手机">
</el-input>
</el-form-item>
<el-form-item label="房屋状态"
prop="rentFlag">
<el-select class="item_width_normal"
v-model="rentFlag"
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in rentList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="房屋用途"
prop="purpose">
<el-select v-model="purpose"
class="item_width_normal"
placeholder="请选择"
size="small"
clearable>
<el-option v-for="item in purposeArr"
:key="item.dictValue"
:label="item.dictName"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="备注"
prop="remark">
<el-input v-model="remark"
class="item_width_normal"
size="small"
clearable
placeholder="请输入备注">
</el-input>
</el-form-item>
<el-form-item label="更新时间"
prop="updateStartDate">
<el-date-picker v-model="updateStartDate"
:picker-options="startPickerOptions"
class="item_width_daterange"
size="small"
type="date"
value-format="yyyyMMdd"
value="yyyy-MM-dd"
placeholder="开始时间">
</el-date-picker>
<span class="data-tag"></span>
<el-date-picker v-model="updateEndDate"
:picker-options="endPickerOptions"
class="item_width_daterange data-tag"
size="small"
type="date"
value-format="yyyyMMdd"
value="yyyy-MM-dd"
placeholder="结束时间">
</el-date-picker>
</el-form-item>
<span class="div_search_label">所属房屋</span>
<!-- <el-form-item label="所属房屋"> -->
<el-form-item prop="neighborHoodId">
<el-select v-model.trim="neighborHoodId"
:disabled="vDisabled"
placeholder="小区"
size="small"
clearable
class="item_width_buildcascader"
@change="handleChangeV">
<el-option v-for="item in optionsV"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="buildingId">
<el-select v-model.trim="buildingId"
placeholder="楼号"
:disabled="!neighborHoodId || bDisabled"
size="small"
clearable
class="item_width_buildcascader"
@change="handleChangeB">
<el-option v-for="item in optionsB"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="buildingUnitId">
<el-select v-model.trim="buildingUnitId"
placeholder="单元"
size="small"
:disabled="!buildingId"
clearable
class="item_width_buildcascader"
@change="handleChangeD">
<el-option v-for="item in optionsD"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="houseId">
<el-select v-model.trim="houseId"
placeholder="房号"
:disabled="!buildingUnitId"
size="small"
clearable
class="item_width_buildcascader">
<el-option v-for="item in optionsH"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<!-- </el-form-item> -->
<div class="div_search_btn">
<el-button style="margin-left:30px"
size="small"
class="diy-button--blue"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--gray"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table">
<build-table v-if="selTreeObj.level==='neighborHood'&&!showRoomTable"
ref="ref_neighTable"
:staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn"
:ownerName="ownerName"
:ownerPhone="ownerPhone"
:rentFlag="rentFlag"
:purpose="purpose"
:remark="remark"
:updateStartDate="updateStartDate"
:updateEndDate="updateEndDate"
@toNextLevel="toNextLevel"
@refreshTree="refreshTree"></build-table>
<room-table v-if="showRoomTable||selTreeObj.level==='building'"
:staffAgencyId="staffAgencyId"
:showImportBtn="showImportBtn"
:ownerName="ownerName"
:ownerPhone="ownerPhone"
:rentFlag="rentFlag"
:purpose="purpose"
:neighborHoodId="neighborHoodId"
:buildingId="buildingId"
:buildingUnitId="buildingUnitId"
:houseId="houseId"
:remark="remark"
:updateStartDate="updateStartDate"
:updateEndDate="updateEndDate"
ref="ref_buildingTable"
@refreshTree="refreshTree"></room-table>
<community-table v-if="selTreeObj.level!=='building'&&selTreeObj.level!=='neighborHood'&&!showRoomTable"
@toNextLevel="toNextLevel"
:staffAgencyId="staffAgencyId"
:ownerName="ownerName"
:ownerPhone="ownerPhone"
:rentFlag="rentFlag"
:purpose="purpose"
:remark="remark"
:updateStartDate="updateStartDate"
:updateEndDate="updateEndDate"
ref="ref_communityTable"
@refreshTree="refreshTree"></community-table>
</div>
</div>
</div>
</template>
<script>
import CDialog from '@c/CDialog'
import communityTable from './communityTable'
import buildTable from './buildTable'
import roomTable from './roomTable'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
import nextTick from 'dai-js/tools/nextTick'
let loading //
export default {
data () {
let endDisabledDate = (time) => {//datareturn
let nowData = Date.now()
if (this.updateStartDate) {
let startTime = new Date(this.updateStartDate)
return time.getTime() > nowData || time.getTime() < startTime || time.getTime() === startTime
} else {
return time.getTime() > nowData
}
}
let startDisabledDate = (time) => {//datareturn
let nowData = Date.now()
return time.getTime() > nowData
}
return {
filterText: '',
treeLoading: true,
treeData: [],
openNodes: [],
defaultProps: {
children: 'children',
label: 'showName'
},
selTreeObj: {},
centerPoint: [],
staffAgencyId: localStorage.getItem("agencyId"),
showImportBtn: false,
rentList: [
{
value: '1',
label: '出租'
},
{
value: '2',
label: '闲置'
},
{
value: '0',
label: '自住'
},
{
value: '3',
label: '未出售'
},
],
ownerName: '',
ownerPhone: '',
rentFlag: '',
purpose: '',
remark: '',
updateStartDate: '',
updateEndDate: '',
showRoomTable: false,
selObj: {},
purposeArr: [
{ dictValue: '1', dictName: '住宅' },
{ dictValue: '2', dictName: '商业' },
{ dictValue: '3', dictName: '办公' },
{ dictValue: '4', dictName: '工业' },
{ dictValue: '5', dictName: '仓储' },
{ dictValue: '6', dictName: '商住混用' },
{ dictValue: '7', dictName: '其他' }
],
endPickerOptions: {
disabledDate: endDisabledDate
},
startPickerOptions: {
disabledDate: startDisabledDate
},
optionsV: [],
optionsB: [],
optionsH: [],
optionsD: [],
neighborHoodId: "",
buildingId: "",
buildingUnitId: "",
houseId: "",
selGridId: '',
selAgencyId: '',
vDisabled: false,
bDisabled: false,
}
},
components: {
CDialog
},
async mounted () {
this.treeLoading = true
await this.loadOrgData()
await this.loadTree()
// await this.loadOpenNode()
this.getValiheList('', '')
await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj)
if (this.treeData.length > 0) {
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.treeData[0].id);
});
}
this.treeLoading = false
},
computed: {
rowHeight () {
return this.$store.state.inIframe ? this.clientHeight - 160 + this.iframeHeight + 'px' : this.clientHeight - 160 + 'px'
},
treeHeight () {
return this.$store.state.inIframe ? this.clientHeight - 215 + this.iframeHeight + 'px' : this.clientHeight - 215 + 'px'
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
methods: {
handleChangeV (val) {
this.buildingId = "";
this.buildingUnitId = "";
this.houseId = "";
this.getBuildList();
// this.getUniList();
// this.getHouseList();
},
handleChangeB (val) {
this.buildingUnitId = "";
this.houseId = "";
this.getUniList();
// this.getHouseList();
},
handleChangeD () {
this.houseId = "";
this.getHouseList();
},
async getValiheList () {
const { user } = this.$store.state;
if (!this.selGridId) {
this.selAgencyId = this.selAgencyId ? this.selAgencyId : user.agencyId
}
const url = "/gov/org/icneighborhood/neighborhood-options";
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = {
gridId: this.selGridId,
agencyId: this.selAgencyId,
isPage: false
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.optionsV = data;
this.neighborHoodId = ""
this.buildingId = "";
this.buildingUnitId = "";
this.houseId = "";
} else {
this.$message.error(msg);
}
},
async getBuildList () {
const url = "/gov/org/icbuilding/buildingoption";
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = {
neighborHoodId: this.neighborHoodId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.optionsB = data;
this.buildingId = "";
this.buildingUnitId = "";
this.houseId = "";
} else {
this.$message.error(msg);
}
},
async getUniList () {
const url = "/gov/org/icbuildingunit/unitoption";
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/epidemicPrevention/page"
let params = {
buildingId: this.buildingId,
};
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.optionsD = data;
this.buildingUnitId = "";
this.houseId = "";
} else {
this.$message.error(msg);
}
},
getHouseList () {
this.$http
.post("/gov/org/ichouse/houseoption", { unitId: this.buildingUnitId })
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.optionsH = res.data;
this.houseId = "";
}
})
.catch(() => {
return this.$message.error("网络错误");
});
},
handleSearch () {
// if (this.ownerName || this.ownerPhone || this.rentFlag || this.purpose || this.remark) {
this.showRoomTable = true
this.$nextTick(() => {
this.$refs['ref_buildingTable'].loadTable('search', this.selTreeObj)
})
// } else {
// this.$message.warning('')
// }
},
//
resetSearch () {
this.ownerName = ''
this.ownerPhone = ''
this.rentFlag = ''
this.purpose = ''
this.remark = ''
this.updateStartDate = ''
this.updateEndDate = ''
this.neighborHoodId = ''
this.buildingId = ''
this.buildingUnitId = ''
this.houseId = ''
this.pageSize = 10
this.pageNo = 1
// this.handleNodeClick(this.selObj)
// this.loadTable()
},
async loadOpenNode () {
const url = "/gov/org/building/tree-ids"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.openNodes = data
} else {
this.$message.error(msg)
}
},
async loadTree (isRefresh) {
const url = "/gov/org/building/treelist"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.openNodes = []
this.openNodes.push(data[0].id)
this.treeData = data
if (!isRefresh && data.length > 0) {
this.selTreeObj = data[0]
if (!this.selTreeObj.latitude) {
this.selTreeObj.latitude = this.centerPoint[0]
}
if (!this.selTreeObj.longitude) {
this.selTreeObj.longitude = this.centerPoint[1]
}
}
} else {
this.$message.error(msg)
}
},
//
async loadOrgData () {
const url = "/gov/org/agency/maporg"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/org/agency/maporg"
let params = {}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.centerPoint = []
this.centerPoint.push(data.latitude)
this.centerPoint.push(data.longitude)
} else {
this.$message.error(msg)
}
},
async handleNodeClick (obj) {
this.ownerName = ''
this.ownerPhone = ''
this.rentFlag = ''
this.purpose = ''
this.remark = ''
this.updateStartDate = ''
this.updateEndDate = ''
this.showRoomTable = false
this.selObj = JSON.parse(JSON.stringify(obj))
this.getTreeObj(obj)
await nextTick(1000)
this.vDisabled = false
this.bDisabled = false
if (obj.level === 'building') {//
this.$refs['ref_buildingTable'].loadTable('tree', this.selTreeObj)
this.selAgencyId = ''
this.selGridId = ''
await this.getValiheList()
this.neighborHoodId = this.selTreeObj.pid
await this.getBuildList()
this.buildingId = this.selTreeObj.id
await this.getUniList()
this.vDisabled = true
this.bDisabled = true
} else if (obj.level === 'neighborHood') {//
this.$refs['ref_neighTable'].loadTable(true, this.selTreeObj)
this.selAgencyId = ''
this.selGridId = ''
await this.getValiheList()
this.neighborHoodId = this.selTreeObj.id
await this.getBuildList()
this.vDisabled = true
} else {
this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj)
if (obj.level === 'grid') {
this.selAgencyId = ''
this.selGridId = this.selTreeObj.id
} else {
this.selAgencyId = this.selTreeObj.id
this.selGridId = ''
}
this.getValiheList('', '')
}
},
//
async refreshTree () {
this.treeLoading = true
await this.loadTree(this.selTreeObj.id)
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id);
});
this.treeLoading = false
},
//
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
}
this.handleNodeClick(this.selTreeObj)
this.$nextTick(() => {
// ref_tree ref value node-key
this.$refs.ref_tree.setCurrentKey(this.selTreeObj.id);
});
const node = document.getElementById(this.selTreeObj.id) // Iddom
setTimeout(() => {
if (node) {
this.$nextTick(() => {
node.scrollIntoView({ block: 'center' }) // scrollIntoViewdom block: 'center'
})
}
}, 100)
},
//
getTreeObj (obj) {
//
// idtype
// idtypeidid
// idtypeid
if (obj.level === 'building') {//
let neighborHoodNode = this.$refs.ref_tree.getNode(obj.pid)//
let gridNode = this.$refs.ref_tree.getNode(neighborHoodNode.data.pid)//
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)//
obj.agencyId = agencyNode.data.id
obj.agencyName = agencyNode.data.label
obj.gridId = gridNode.data.id
obj.gridName = gridNode.data.label
obj.neighborHoodId = neighborHoodNode.data.id
obj.neighborHoodName = neighborHoodNode.data.label
if (obj.agencyId === this.staffAgencyId) {
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else if (obj.level === 'neighborHood') {//
let gridNode = this.$refs.ref_tree.getNode(obj.pid)
let agencyNode = this.$refs.ref_tree.getNode(gridNode.data.pid)
obj.gridId = gridNode.data.id
obj.gridName = gridNode.data.label
obj.agencyId = agencyNode.data.id
obj.agencyName = agencyNode.data.label
if (obj.agencyId === this.staffAgencyId) {
this.showImportBtn = true
} else {
this.showImportBtn = false
}
} else {
}
if (!obj.latitude) {
obj.latitude = this.centerPoint[0]
}
if (!obj.longitude) {
obj.longitude = this.centerPoint[1]
}
this.selTreeObj = obj
console.log('selTreeObj', this.selTreeObj)
},
filterNode (value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
watch: {
filterText (val) {
this.$refs.ref_tree.filter(val);
}
},
components: {
communityTable, buildTable, roomTable
}
}
</script>
<style>
/* .aui-content > .el-tabs > .el-tabs__content {
padding: 0px;
} */
.el-tree-node:focus > .el-tree-node__content {
/* background-color: #ccc !important; */
color: #2195fe;
}
</style>
<style lang="scss" scoped >
@import "@/assets/scss/modules/visual/communityManage.scss";
@import "@/assets/scss/modules/management/list-main.scss";
</style>
<style lang="scss" scoped >
.div_main {
display: flex;
}
.scrollar {
margin-top: 10px;
/deep/
.el-tree--highlight-current
.el-tree-node.is-current
> .el-tree-node__content {
background-color: #e1ecff;
border-radius: 3px;
}
/deep/ .el-tree-node:focus > .el-tree-node__content {
color: #0043c8;
// background-color: #fff;
}
/deep/ .el-tree-node__expand-icon {
color: #0043c8;
border: 1px solid #e1ecff;
background-color: #e1ecff;
padding: 0px;
margin-right: 8px;
font-size: 9px;
}
/deep/.el-tree {
flex: 1;
.el-tree-node {
margin-left: 2px;
}
//
.el-icon svg {
display: none;
height: 0;
width: 0;
}
//
.el-tree-node__expand-icon {
// position: absolute;
// left: 2px;
// 90
.expanded {
transform: rotate(90deg);
}
//
&:before {
// content: "\008B";
// content: "\008B";
font-size: 12px;
color: #0043c8;
}
}
//
.is-leaf.el-tree-node__expand-icon::before {
// display: none;
// background: none !important;
// border: 0px;
// content: "";
// width: 18px;
// height: 18px;
}
}
}
.div_tree {
margin: 7px 8px 7px 7px;
/deep/ .el-scrollbar__wrap {
overflow-x: hidden !important;
}
//
/deep/ .el-input--medium .el-input__inner {
height: 27px;
border-radius: 0;
}
flex: 0 0 280px;
background-color: #f6f6f6;
border: 1px solid #d3dce6;
// border-radius: 5px;
padding: 19px 15px;
overflow-y: hidden;
}
.filter_tree {
overflow-x: auto;
background-color: #f6f6f6;
margin-top: 5px;
}
.div_left {
// flex: 1;
width: calc(100% - 300px);
}
</style>

23
src/views/modules/base/resi.vue

@ -661,6 +661,7 @@ export default {
obj.agencyId = "";
}
this.currentPage = 1
console.log(obj);
this.getTableData(obj)
},
@ -1033,17 +1034,17 @@ export default {
await this.residentBaseInfo();
},
//
residentBaseInfo () {
this.$http.post(`/actual/base/residentBaseInfo/detail/${this.editUserId}`).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.$refs.baseForm.old_from(res.data);
}
}).catch((err) => {
return this.$message.error("网络错误");
});
},
// residentBaseInfo () {
// this.$http.post(`/actual/base/residentBaseInfo/detail/${this.editUserId}`).then(({ data: res }) => {
// if (res.code !== 0) {
// return this.$message.error(res.msg);
// } else {
// this.$refs.baseForm.old_from(res.data);
// }
// }).catch((err) => {
// return this.$message.error("");
// });
// },
handlerReset() {
this.$refs.baseForm.resetForm();
},

Loading…
Cancel
Save