|
|
|
@ -12,7 +12,7 @@ |
|
|
|
}, |
|
|
|
]" /> |
|
|
|
</div> |
|
|
|
<div class="top-nav-list"> |
|
|
|
<div class="top-nav-list" v-if="$route.query.typeB !== building"> |
|
|
|
<div v-for="item in buildingList" :key="item.id" :class="[item.ifActive ? 'top-nav-itemAC' : 'top-nav-item']" @click="chooseNav(item)">{{ item.buildingName }}{{ item.unitName }}</div> |
|
|
|
</div> |
|
|
|
<el-row :gutter="48"> |
|
|
|
@ -48,9 +48,9 @@ |
|
|
|
<el-table :data="list" v-loading="loading" height="500" element-loading-text="加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 21, 64, 0.3)"> |
|
|
|
<el-table-column label="序号" type="index" width="80" /> |
|
|
|
<el-table-column prop="doorName" label="门牌号" /> |
|
|
|
<el-table-column prop="fullName" label="所属小区" /> |
|
|
|
<el-table-column prop="buildingId" label="所属楼栋" /> |
|
|
|
<el-table-column prop="houseName" label="所属单元" /> |
|
|
|
<el-table-column prop="fullName" show-overflow-tooltip label="所属小区" /> |
|
|
|
<el-table-column prop="buildingId" show-overflow-tooltip label="所属楼栋" /> |
|
|
|
<el-table-column prop="houseName" show-overflow-tooltip label="所属单元" /> |
|
|
|
<el-table-column prop="houseCode" label="房屋编码" /> |
|
|
|
<el-table-column prop="rentFlag" label="房屋状态"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
@ -72,7 +72,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="90" align="center"> |
|
|
|
<template slot-scope="{ row }"> |
|
|
|
<el-button type="text" @click="$router.push('/dataBoard/overview/familyPortrait/?name=' + row.doorName + '&houseId=' + row.id + '&id=' + $route.query.id + '&name2=' + (homeText ? homeText : ''))">查看</el-button> |
|
|
|
<el-button type="text" @click="$router.push(`/dataBoard/overview/familyPortrait/?name=${row.doorName}&houseId=${row.id}&id=${row.buildingId}&buId=${row.buildingUnitId}&type=${$route.query.typeB}&name2=${row.houseName}`)">查看</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -112,12 +112,27 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
"$route.query.id"() { |
|
|
|
this.getList(); |
|
|
|
}, |
|
|
|
// "$route.query.buIding": { |
|
|
|
// handler(val) { |
|
|
|
// if (val) { |
|
|
|
// this.getList(val); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// immediate: true, |
|
|
|
// }, |
|
|
|
// "$route.query.typeB": { |
|
|
|
// handler(val) { |
|
|
|
// console.log("jhjkbhkjhkjhkjhkjhkj"); |
|
|
|
// if (val) { |
|
|
|
// this.getList(); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
// immediate: true, |
|
|
|
// }, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.getList(); |
|
|
|
const buId = this.$route.query.buId || null; |
|
|
|
this.getList(buId); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getDoorNameList(list) { |
|
|
|
@ -151,52 +166,65 @@ export default { |
|
|
|
return doorNameList; |
|
|
|
}, |
|
|
|
|
|
|
|
getList() { |
|
|
|
getUnitList(id) { |
|
|
|
this.$http.get(`/actual/base/streetOverview/getUnitHouseList?unitId=` + id).then((res) => { |
|
|
|
const { |
|
|
|
code, |
|
|
|
data: { houseList, unitInfo }, |
|
|
|
} = res.data; |
|
|
|
if (code === 0) { |
|
|
|
let unitInfos = unitInfo || {}; |
|
|
|
this.list = houseList; |
|
|
|
this.homeMsg = unitInfos; |
|
|
|
this.homeText = (unitInfos.quartersName ? unitInfos.quartersName : "") + (unitInfos.buildingName ? unitInfos.buildingName : "") + (unitInfos.unitNum ? unitInfos.unitNum + "单元" : ""); |
|
|
|
this.houseMountArr = this.getDoorNameList(this.list); |
|
|
|
if (this.houseMountArr.length > 0) { |
|
|
|
this.flexWidth = this.houseMountArr[0].length * 58; |
|
|
|
} |
|
|
|
this.loading = false; |
|
|
|
} else { |
|
|
|
this.loading = false; |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
getList(buid) { |
|
|
|
this.loading = true; |
|
|
|
const homeType = this.$route.query.type; |
|
|
|
const homeType = this.$route.query.typeB; |
|
|
|
if (homeType === "building") { |
|
|
|
this.$http.get(`/actual/base/streetOverview/getUnitListByBuilding?buildingId=` + "1514914015259979777").then((res) => { |
|
|
|
const { code, data } = res.data; |
|
|
|
if (code === 0) { |
|
|
|
this.buildingList = data; |
|
|
|
this.homeText = this.buildingList[0].buildingName + this.buildingList[0].unitName; |
|
|
|
this.buildingList.forEach((item, i) => { |
|
|
|
if (i === 0) { |
|
|
|
item.ifActive = true; |
|
|
|
} else { |
|
|
|
item.ifActive = false; |
|
|
|
} |
|
|
|
}); |
|
|
|
this.loading = false; |
|
|
|
} else { |
|
|
|
this.loading = false; |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.$http.get(`/actual/base/streetOverview/getUnitHouseList?unitId=` + this.$route.query.id).then((res) => { |
|
|
|
const { |
|
|
|
code, |
|
|
|
data: { houseList, unitInfo }, |
|
|
|
} = res.data; |
|
|
|
if (code === 0) { |
|
|
|
let unitInfos = unitInfo || {}; |
|
|
|
this.list = houseList; |
|
|
|
this.homeMsg = unitInfos; |
|
|
|
this.homeText = (unitInfos.quartersName ? unitInfos.quartersName : "") + (unitInfos.buildingName ? unitInfos.buildingName : "") + (unitInfos.unitNum ? unitInfos.unitNum + "单元" : ""); |
|
|
|
console.log(this.homeText, " this.homeText"); |
|
|
|
this.houseMountArr = this.getDoorNameList(this.list); |
|
|
|
// this.houseMountArr = [ |
|
|
|
// [{ doorName: 101 }, { doorName: 102 }, { doorName: 103 }, { doorName: 104 }, { doorName: 105 }, { doorName: 106 }, { doorName: 107 }, { doorName: 108 }, { doorName: 109 }], |
|
|
|
// [{ doorName: 201 }, { doorName: 202 }, { doorName: 203 }, { doorName: 204 }, { doorName: 205 }, { doorName: 206 }, { doorName: 207 }, { doorName: 208 }, { doorName: 209 }], |
|
|
|
// ]; |
|
|
|
if (this.houseMountArr.length > 0) { |
|
|
|
this.flexWidth = this.houseMountArr[0].length * 58; |
|
|
|
if (buid) { |
|
|
|
this.buildingList.forEach((item, i) => { |
|
|
|
console.log(item); |
|
|
|
if (item.id === buid) { |
|
|
|
item.ifActive = true; |
|
|
|
this.getUnitList(item.id); |
|
|
|
} else { |
|
|
|
item.ifActive = false; |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.buildingList.forEach((item, i) => { |
|
|
|
if (i === 0) { |
|
|
|
item.ifActive = true; |
|
|
|
this.getUnitList(item.id); |
|
|
|
} else { |
|
|
|
item.ifActive = false; |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
this.loading = false; |
|
|
|
} else { |
|
|
|
this.loading = false; |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.getUnitList(this.$route.query.id); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -225,6 +253,7 @@ export default { |
|
|
|
buildList.forEach((d) => { |
|
|
|
if (item.id === d.id) { |
|
|
|
d.ifActive = true; |
|
|
|
this.getUnitList(item.id); |
|
|
|
} else { |
|
|
|
d.ifActive = false; |
|
|
|
} |
|
|
|
|