您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

propertyPage.vue 13KB

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