InfoWindowExample.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <div>
  3. <InfoWindow :info-window-no="infoWindowNo" :multiple="true" :is-search-widget="true" :is-new-similar-assets="true" @get-select-model-data="getSelectModelData" />
  4. </div>
  5. </template>
  6. <script>
  7. import InfoWindow from '@/info/index.js';
  8. export default {
  9. components: {
  10. InfoWindow,
  11. },
  12. props: {
  13. },
  14. data: function () {
  15. return {
  16. 'infoWindowNo': null,
  17. };
  18. },
  19. watch: {
  20. '$route': function (to, from) {
  21. this.getInfoWindowNo();
  22. },
  23. },
  24. mounted: function () {
  25. this.getInfoWindowNo();
  26. },
  27. methods: {
  28. /**
  29. * 获取查询窗口的编号
  30. */
  31. getInfoWindowNo: function () {
  32. if (this.$route.params != undefined) {
  33. var routeInfoWindowNo = this.$route.params.infoWindowNo;
  34. if(this.infoWindowNo != routeInfoWindowNo){
  35. this.infoWindowNo = routeInfoWindowNo;
  36. console.log('open info window: ' + routeInfoWindowNo);
  37. }
  38. }
  39. },
  40. getSelectModelData: function (selected) {
  41. console.log(selected,'同类资产数据---');
  42. },
  43. },
  44. };
  45. </script>