<template>
  <div>
    <InfoWindow :info-window-no="infoWindowNo" :multiple="true" :is-search-widget="false" />
  </div>
</template>
<script>

import InfoWindow from '@/info/index.js';

export default {
  components: {
    InfoWindow,
  },

  props: {
    
  },

  data: function () {
    return {
      'infoWindowNo': null,
    };
  },

  watch: {
    '$route': function (to, from) {
      this.getInfoWindowNo();
    },
  },

  mounted: function () {
    this.getInfoWindowNo();
  },

  methods: {    
    /**
     * 获取查询窗口的编号
     */
    getInfoWindowNo: function () {
      if (this.$route.params != undefined) {
        var routeInfoWindowNo = this.$route.params.infoWindowNo;
        if(this.infoWindowNo != routeInfoWindowNo){
          this.infoWindowNo = routeInfoWindowNo;
          console.log('open info window: ' + routeInfoWindowNo);
        }
      }
    },
  },
};

</script>