Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

searchTab.vue 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <!-- eslint-disable max-len -->
  3. <div class="box-collapse">
  4. <div class="title-box-d">
  5. <h3 class="title-d" style="text-align:left">Search</h3>
  6. </div>
  7. <span class="close-box-collapse right-boxed ion-ios-close"></span>
  8. <div class="box-collapse-wrap">
  9. <form class="form-a">
  10. <div class="row">
  11. <div class="col-md-12 mb-2">
  12. <div class="form-group" style="text-align:left">
  13. <label for="Type">Keyword</label>
  14. <input
  15. type="text"
  16. class="form-control form-control-lg form-control-a"
  17. placeholder="Keyword"
  18. v-model="keyword"
  19. />
  20. </div>
  21. </div>
  22. <div class="col-md-12">
  23. <ul class="nav nav-pills-a nav-pills mb-3 section-t3" id="pills-tab" role="tablist">
  24. <li class="nav-item">
  25. <a
  26. class="nav-link active"
  27. id="pills-video-tab"
  28. data-toggle="pill"
  29. href="#pills-video"
  30. role="tab"
  31. aria-controls="pills-video"
  32. aria-selected="true"
  33. v-on:click="updateType('Timeshare')"
  34. >Timeshare</a>
  35. </li>
  36. <li class="nav-item">
  37. <a
  38. class="nav-link"
  39. id="pills-plans-tab"
  40. data-toggle="pill"
  41. href="#pills-plans"
  42. role="tab"
  43. aria-controls="pills-plans"
  44. aria-selected="false"
  45. v-on:click="updateType('Residential')"
  46. >Residential</a>
  47. </li>
  48. <li class="nav-item">
  49. <a
  50. class="nav-link"
  51. id="pills-map-tab"
  52. data-toggle="pill"
  53. href="#pills-map"
  54. role="tab"
  55. aria-controls="pills-map"
  56. aria-selected="false"
  57. v-on:click="updateType('Commercial')"
  58. >Commercial</a>
  59. </li>
  60. </ul>
  61. <div class="tab-content" id="pills-tabContent">
  62. <div
  63. class="tab-pane fade show active"
  64. id="pills-video"
  65. role="tabpanel"
  66. aria-labelledby="pills-video-tab"
  67. >
  68. <timeshareSearch />
  69. </div>
  70. <div
  71. class="tab-pane fade"
  72. id="pills-plans"
  73. role="tabpanel"
  74. aria-labelledby="pills-plans-tab"
  75. >
  76. <propertySearch propertyType="Residential" @updateSearch="updateSearch" />
  77. </div>
  78. <div
  79. class="tab-pane fade"
  80. id="pills-map"
  81. role="tabpanel"
  82. aria-labelledby="pills-map-tab"
  83. >
  84. <propertySearch propertyType="Commercial" />
  85. </div>
  86. </div>
  87. </div>
  88. <div class="col-md-12">
  89. <button type="submit" class="btn btn-b-n" @click="Search">Search</button>
  90. </div>
  91. </div>
  92. </form>
  93. </div>
  94. </div>
  95. </template>
  96. <script>
  97. import { mapState, mapActions } from 'vuex';
  98. import propertySearch from '../property/propertySearchFields.vue';
  99. import timeshareSearch from '../timeshare/searchTimeshare.vue';
  100. export default {
  101. components: {
  102. propertySearch,
  103. timeshareSearch,
  104. },
  105. data() {
  106. return {
  107. selectedPropertyType: 'timeshare',
  108. keyword: '',
  109. propertySearch: {
  110. userID: 0,
  111. keyword: '',
  112. salesType: 'Sale',
  113. propertyUsageType: 'All',
  114. propertyType: 'All',
  115. province: 'All',
  116. city: 'All',
  117. suburb: 'All',
  118. },
  119. };
  120. },
  121. computed: {},
  122. methods: {
  123. updateType(item) {
  124. this.selectedPropertyType = item;
  125. },
  126. updateSearch(item) {
  127. this.propertySearch = item;
  128. this.propertySearch.propertyUsageType = this.selectedPropertyType;
  129. this.propertySearch.keyword = this.keyword;
  130. },
  131. Search() {
  132. if (this.selectedPropertyType === 'timeshare') {
  133. this.$router.push('/timeshare/search/');
  134. } else {
  135. this.$router.push({
  136. path: '/property/search',
  137. query: this.propertySearch,
  138. });
  139. // this.$router.push('/property/search');
  140. }
  141. },
  142. },
  143. };
  144. </script>