<template>
    <div class="modal" >
      <section v-show="type === 1">
        <dyzxh @handleClickHouse="handleClickHouse"/>
      </section>
      <section v-show="type === 2">
        <ryxx :houseId="houseId" :houseName="houseName" @handelClose="handelClose"/>
      </section>
      <section v-show="type === 3">
        <dyxx/>
      </section>
    </div>
  </template>
  
  <script>
import dyzxh from "./dyzxh.vue"
import ryxx from "./ryxx.vue"
import dyxx from "./dyxx.vue"

  export default {
    name: '',
    data () {
      return {
        type:1,
        houseId:null,
        houseName:null
      }
    },
    computed: {
    },
    components: {dyzxh,ryxx,dyxx},
    mounted () {
    },
    created () {
      this.type = Number(this.$route.query.type)
    },
    methods: {
      handelClose(){
        this.type = 1;
      },
      handleClickHouse(item){
        this.type = 2;
        this.houseId = item.houseId;
        this.houseName = item.houseName;
      },
    }
  }
  </script>
  
  <style lang="scss" scoped>
  .modal{
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    background-color: #5d0000;
  }
  </style>
  