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.

propertyPage.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <template>
  2. <!-- eslint-disable max-len -->
  3. <div v-if="property">
  4. <div class="container">
  5. <br />
  6. <div class="row">
  7. <div class="col-md-12 col-lg-8">
  8. <div class="title-box-d">
  9. <h1 class="title-d" style="text-align:left; font-size: 250%">
  10. {{ property.shortDescription }}
  11. </h1>
  12. </div>
  13. </div>
  14. </div>
  15. </div>
  16. <!--/ Intro Single End /-->
  17. <!--/ property Single Star /-->
  18. <section class="property-single nav-arrow-b">
  19. <div class="container">
  20. <div class="row">
  21. <div id="app" class="scrolling-wrapper">
  22. <div class="card">
  23. <img
  24. class="image"
  25. v-for="(image, i) in propertyImages"
  26. :src="image"
  27. @click="index = i"
  28. :key="i"
  29. />
  30. </div>
  31. <gallery :images="propertyImages" :index="index" @close="index = null"></gallery>
  32. </div>
  33. </div>
  34. <br />
  35. <div class="row">
  36. <div class="col-sm-12">
  37. <div class="row justify-content-between">
  38. <div class="col-md-7 col-lg-7 section-md-t3">
  39. <div class="row">
  40. <div class="col-sm-12">
  41. <div class="title-box-d">
  42. <h3 class="title-d" style="text-align:left">Property Description</h3>
  43. </div>
  44. </div>
  45. </div>
  46. <div
  47. class="property-description"
  48. style="text-align:left"
  49. v-html="property.description"
  50. />
  51. <div v-for="display in property.displayData" :key="display.id">
  52. <div class="row section-t3" style="text-align:left">
  53. <div class="col-sm-12">
  54. <div class="title-box-d">
  55. <h3 class="title-d">{{ display.groupName }}</h3>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="summary-list">
  60. <ul class="list" v-for="item in display.values" :key="item.id">
  61. <li class="d-flex justify-content-between">
  62. <strong>{{ item.name }}:</strong>
  63. <span v-html="item.value"></span>
  64. </li>
  65. </ul>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="col-md-5 col-lg-4">
  70. <div class="property-price d-flex justify-content-center foo">
  71. <!-- <div class="card-header-c d-flex"> -->
  72. <div style="width: 300px; height: 80px; border-style: solid; color: #60CBEB;">
  73. <!-- <span class="ion-money">R</span> -->
  74. <div class="card-title-c align-self-center">
  75. <h5 class="title-c">R{{ formatPrice(property.price) }}</h5>
  76. <h6 v-if="property.pricePer">Per {{ property.pricePer }}</h6>
  77. </div>
  78. </div>
  79. <!-- </div> -->
  80. </div>
  81. <div class="property-summary">
  82. <div class="row">
  83. <div class="col-sm-12">
  84. <div class="title-box-d section-t4">
  85. <h3 class="title-d" style="text-align:left">Summary</h3>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="summary-list">
  90. <ul class="list">
  91. <li class="d-flex justify-content-between">
  92. <strong>Property ID:</strong>
  93. <span>{{ property.id }}</span>
  94. </li>
  95. <li class="d-flex justify-content-between">
  96. <strong>Status:</strong>
  97. <span v-if="property.status"
  98. >{{ property.status.code }} - {{ property.status.description }}</span
  99. >
  100. </li>
  101. <li class="d-flex justify-content-between">
  102. <strong>Address:</strong>
  103. <span
  104. style="text-align:right"
  105. v-if="property"
  106. v-html="
  107. formatAddress(property.addressLine1) +
  108. formatAddress(property.addressLine2) +
  109. formatAddress(property.addressLine3) +
  110. formatAddress(property.suburb ? property.suburb.description : '') +
  111. formatAddress(property.city ? property.city.description : '') +
  112. formatAddress(property.province ? property.province.description : '')
  113. "
  114. ></span>
  115. </li>
  116. </ul>
  117. </div>
  118. </div>
  119. <div class="col-md-12">
  120. <button
  121. type="button"
  122. class="btn btn-b-n"
  123. data-toggle="modal"
  124. data-target="#myModal"
  125. >
  126. Make an Offer
  127. </button>
  128. <div id="myModal" class="modal fade" role="dialog">
  129. <div class="modal-dialog modal-lg">
  130. <!-- Modal content-->
  131. <div class="modal-content">
  132. <div class="modal-header">
  133. <button type="button" class="close" data-dismiss="modal">&times;</button>
  134. </div>
  135. <div padding-left="20px">
  136. <makeOffer
  137. name="MakeOffer"
  138. :isMakeOffer="true"
  139. :isProperty="true"
  140. :item="{
  141. id: property.id,
  142. shortDescription: property.shortDescription,
  143. description: property.description,
  144. sellPrice: property.price
  145. }"
  146. />
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. <div class="col-md-12">
  153. <div class="row section-t3">
  154. <div class="col-sm-12">
  155. <div class="title-box-d">
  156. <h3 class="title-d" style="text-align:left">Contact Agent</h3>
  157. </div>
  158. </div>
  159. </div>
  160. <div class="row">
  161. <div class="col-md-12">
  162. <div class="property-contact">
  163. <form class="form-a">
  164. <div class="row">
  165. <div class="col-md-12 mb-1">
  166. <div class="form-group">
  167. <input
  168. type="text"
  169. class="form-control form-control-lg form-control-a"
  170. id="inputName"
  171. placeholder="Name *"
  172. required
  173. />
  174. </div>
  175. </div>
  176. <div class="col-md-12 mb-1">
  177. <div class="form-group">
  178. <input
  179. type="email"
  180. class="form-control form-control-lg form-control-a"
  181. id="inputEmail1"
  182. placeholder="Email *"
  183. required
  184. />
  185. </div>
  186. </div>
  187. <div class="col-md-12 mb-1">
  188. <div class="form-group">
  189. <textarea
  190. id="textMessage"
  191. class="form-control"
  192. placeholder="Comment *"
  193. name="message"
  194. cols="45"
  195. rows="8"
  196. required
  197. ></textarea>
  198. </div>
  199. </div>
  200. <div class="col-md-12">
  201. <button type="submit" class="btn btn-b-n">Send Message</button>
  202. </div>
  203. </div>
  204. </form>
  205. <br />
  206. </div>
  207. </div>
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. </div>
  213. </div>
  214. <!-- Tab Control -->
  215. <div class="row">
  216. <div class="col-sm-12">
  217. <div v-if="property.virtualTour" class="row justify-content-between">
  218. <div class="col-md-7 col-lg-7 section-md-t3">
  219. <div class="row">
  220. <div class="col-sm-12">
  221. <div class="title-box-d">
  222. <h3 class="title-d" style="text-align:left">Virtual Tour</h3>
  223. </div>
  224. </div>
  225. </div>
  226. <iframe
  227. :src="property.virtualTour"
  228. width="100%"
  229. height="500"
  230. frameborder="0"
  231. webkitallowfullscreen
  232. mozallowfullscreen
  233. allowfullscreen
  234. ></iframe>
  235. </div>
  236. </div>
  237. <div class="row">
  238. <br />
  239. </div>
  240. <div v-if="property.video" class="row justify-content-between">
  241. <div class="col-md-7 col-lg-7 section-md-t3">
  242. <div class="row">
  243. <div class="col-sm-12">
  244. <div class="title-box-d">
  245. <h3 class="title-d" style="text-align:left">Video</h3>
  246. </div>
  247. </div>
  248. </div>
  249. <iframe
  250. :src="`https://www.youtube.com/embed/${property.video}`"
  251. width="100%"
  252. height="500"
  253. frameborder="0"
  254. style="border:0"
  255. allowfullscreen
  256. ></iframe>
  257. </div>
  258. </div>
  259. </div>
  260. <!-- End Tab Control -->
  261. </div>
  262. </div>
  263. </section>
  264. </div>
  265. </template>
  266. <script>
  267. import { mapState, mapActions } from 'vuex';
  268. import makeOffer from '../processFlow/makeOffer.vue';
  269. import gallery from '../shared/gallerySlideShow.vue';
  270. export default {
  271. name: 'property',
  272. components: {
  273. makeOffer,
  274. gallery,
  275. },
  276. data() {
  277. return {
  278. index: null,
  279. };
  280. },
  281. mounted() {
  282. this.getProperty(this.$route.params.id);
  283. this.getPropertyImages(this.$route.params.id);
  284. },
  285. computed: {
  286. ...mapState('property', ['property', 'propertyImages']),
  287. },
  288. methods: {
  289. ...mapActions('property', ['getProperty', 'getPropertyImages', 'clearPropertyImages']),
  290. formatPrice(value) {
  291. const val = (value / 1).toFixed(2);
  292. return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
  293. },
  294. formatAddress(value) {
  295. if (value !== '') {
  296. return `${value}<br/>`;
  297. }
  298. return '';
  299. },
  300. },
  301. beforeDestroy() {
  302. this.clearPropertyImages();
  303. },
  304. };
  305. </script>
  306. <style lang="scss">
  307. .image {
  308. width: 150px;
  309. height: 150px;
  310. background-size: cover;
  311. cursor: pointer;
  312. margin: 5px;
  313. border-radius: 3px;
  314. border: 1px solid lightgray;
  315. object-fit: contain;
  316. }
  317. .scrolling-wrapper {
  318. overflow-x: scroll;
  319. overflow-y: hidden;
  320. white-space: nowrap;
  321. .card {
  322. display: inline-block;
  323. }
  324. }
  325. </style>