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

propertyPage.vue 9.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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
  95. v-if="property.status"
  96. >{{ property.status.code }} - {{ property.status.description }}</span>
  97. </li>
  98. <li class="d-flex justify-content-between">
  99. <strong>Address:</strong>
  100. <span
  101. style="text-align:right"
  102. v-if="property"
  103. 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 : '') "
  104. ></span>
  105. </li>
  106. </ul>
  107. </div>
  108. </div>
  109. <div class="col-md-12">
  110. <button
  111. type="button"
  112. class="btn btn-b-n"
  113. data-toggle="modal"
  114. data-target="#myModal"
  115. >Make an Offer</button>
  116. <div id="myModal" class="modal fade" role="dialog">
  117. <div class="modal-dialog modal-lg">
  118. <!-- Modal content-->
  119. <div class="modal-content">
  120. <div class="modal-header">
  121. <button type="button" class="close" data-dismiss="modal">&times;</button>
  122. </div>
  123. <div padding-left="20px">
  124. <makeOffer
  125. name="MakeOffer"
  126. :isMakeOffer="true"
  127. :isProperty="true"
  128. :item="{id: property.id, shortDescription: property.shortDescription, description: property.description, price: property.price}"
  129. />
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. <div class="col-md-12">
  136. <div class="row section-t3">
  137. <div class="col-sm-12">
  138. <div class="title-box-d">
  139. <h3 class="title-d" style="text-align:left">Contact Agent</h3>
  140. </div>
  141. </div>
  142. </div>
  143. <div class="row">
  144. <div class="col-md-12">
  145. <div class="property-contact">
  146. <form class="form-a">
  147. <div class="row">
  148. <div class="col-md-12 mb-1">
  149. <div class="form-group">
  150. <input
  151. type="text"
  152. class="form-control form-control-lg form-control-a"
  153. id="inputName"
  154. placeholder="Name *"
  155. required
  156. />
  157. </div>
  158. </div>
  159. <div class="col-md-12 mb-1">
  160. <div class="form-group">
  161. <input
  162. type="email"
  163. class="form-control form-control-lg form-control-a"
  164. id="inputEmail1"
  165. placeholder="Email *"
  166. required
  167. />
  168. </div>
  169. </div>
  170. <div class="col-md-12 mb-1">
  171. <div class="form-group">
  172. <textarea
  173. id="textMessage"
  174. class="form-control"
  175. placeholder="Comment *"
  176. name="message"
  177. cols="45"
  178. rows="8"
  179. required
  180. ></textarea>
  181. </div>
  182. </div>
  183. <div class="col-md-12">
  184. <button type="submit" class="btn btn-b-n">Send Message</button>
  185. </div>
  186. </div>
  187. </form>
  188. <br />
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. </section>
  199. </div>
  200. </template>
  201. <script>
  202. import { mapState, mapActions } from 'vuex';
  203. import lightBox from '../shared/lightBoxGallery.vue';
  204. import makeOffer from '../processFlow/makeOffer.vue';
  205. export default {
  206. name: 'property',
  207. components: {
  208. lightBox,
  209. makeOffer,
  210. },
  211. data() {
  212. return {};
  213. },
  214. mounted() {
  215. this.getProperty(this.$route.params.id);
  216. this.getPropertyImages(this.$route.params.id);
  217. },
  218. computed: {
  219. ...mapState('property', ['property', 'propertyImages']),
  220. },
  221. methods: {
  222. ...mapActions('property', [
  223. 'getProperty',
  224. 'getPropertyImages',
  225. 'clearPropertyImages',
  226. ]),
  227. formatPrice(value) {
  228. const val = (value / 1).toFixed(2);
  229. return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
  230. },
  231. formatAddress(value) {
  232. if (value !== '') {
  233. return `${value}<br/>`;
  234. }
  235. return '';
  236. },
  237. },
  238. beforeDestroy() {
  239. this.clearPropertyImages();
  240. },
  241. };
  242. </script>
  243. <style lang ="scss">
  244. .light-box {
  245. &__thumbnail {
  246. margin: 20px;
  247. width: 200px;
  248. }
  249. }
  250. img {
  251. max-width: 100%;
  252. }
  253. </style>