<template>
|
<div class="box-a">
|
<div class="nav">
|
<span>小区详情</span>
|
<el-button type="primary" size="medium" @click="$router.go(-1)"
|
>返回</el-button
|
>
|
</div>
|
<div class="row">
|
<div class="col">街路巷:{{ formData.alley }}</div>
|
<div class="col">号:{{ formData.houseNum }}</div>
|
<div class="col">
|
类型:{{ ["", "城镇", "农村", "未知"][formData.type] }}
|
</div>
|
<div class="col">小区/组:{{ formData.groupAt }}</div>
|
<div class="col">详细地址:{{ formData.address }}</div>
|
</div>
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tab-pane label="小区房屋" name="house"><house></house></el-tab-pane>
|
<el-tab-pane label="小区人口" name="user"
|
><user ref="userChild"></user
|
></el-tab-pane>
|
<el-tab-pane label="小区车辆" name="vehicle"
|
><vehicle></vehicle
|
></el-tab-pane>
|
</el-tabs>
|
</div>
|
</template>
|
<script>
|
import house from "./house";
|
import user from "./user";
|
import vehicle from './vehicle'
|
export default {
|
components: {house,user,vehicle},
|
data() {
|
return {
|
activeName: 'house',
|
formData:{}
|
}
|
},
|
created() {
|
this.init(this.$route.query.id)
|
},
|
mounted() {
|
|
},
|
methods: {
|
init(id){
|
this.$api.post('villagemanager/getVillage?villageId='+id,'',e=>{
|
this.formData = e
|
})
|
},
|
handleClick(tab, event) {
|
switch(tab.name){
|
case 'user':{
|
this.$refs.userChild.newMounted();
|
break
|
}
|
default:{
|
this.$refs.userChild.newDestroyed();
|
break
|
}
|
}
|
}
|
},
|
watch: {},
|
computed: {}
|
}
|
|
</script>
|
<style scoped lang="less">
|
.box-a {
|
overflow: scroll;
|
}
|
.h1 {
|
font-size: 18px;
|
height: 40px;
|
line-height: 40px;
|
font-weight: 700;
|
}
|
.nav {
|
padding: 20px 0;
|
span {
|
font-size: 18px;
|
height: 40px;
|
line-height: 40px;
|
font-weight: 700;
|
margin-right: 30px;
|
}
|
}
|
|
.row {
|
box-sizing: border-box;
|
width: 100%;
|
display: flex;
|
flex-wrap: wrap;
|
}
|
.col {
|
margin: 10px;
|
min-width: 200px;
|
}
|
</style>
|