detail.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <div class="hui-detail">
  3. <div class="hui-detail-title">基础信息</div>
  4. <div class="hui-detail-content">
  5. <div class="hui-detail-item">
  6. <div class="hui-detail-label">楼宇名称</div>
  7. <div class="hui-detail-value">{{detail.projectItemName}}</div>
  8. </div>
  9. <div class="hui-detail-item">
  10. <div class="hui-detail-label">楼层名称</div>
  11. <div class="hui-detail-value">{{detail.projectItemTargetName}}</div>
  12. </div>
  13. <div class="hui-detail-item">
  14. <div class="hui-detail-label">推广名称</div>
  15. <div class="hui-detail-value">{{detail.name}}</div>
  16. </div>
  17. <div class="hui-detail-item">
  18. <div class="hui-detail-label">房间号</div>
  19. <div class="hui-detail-value">{{detail.roomNumber}}</div>
  20. </div>
  21. <div class="hui-detail-item">
  22. <div class="hui-detail-label">房源类型</div>
  23. <div class="hui-detail-value">{{$field.findTypeName('houseType',detail.roomTypeId)}}</div>
  24. </div>
  25. <div class="hui-detail-item">
  26. <div class="hui-detail-label">房源单价</div>
  27. <div class="hui-detail-value">{{detail.price}}</div>
  28. </div>
  29. <div class="hui-detail-item">
  30. <div class="hui-detail-label">付款类型</div>
  31. <div class="hui-detail-value">{{detail.payType === 0 ? '按月' : '按年'}}</div>
  32. </div>
  33. <div class="hui-detail-item">
  34. <div class="hui-detail-label">房源面积</div>
  35. <div class="hui-detail-value">{{detail.area}}</div>
  36. </div>
  37. <div class="hui-detail-item">
  38. <div class="hui-detail-label">付款方式</div>
  39. <div class="hui-detail-value">{{$field.findTypeName('payWay',detail.payWay)}}</div>
  40. </div>
  41. <div class="hui-detail-item">
  42. <div class="hui-detail-label">产权证书</div>
  43. <div class="hui-detail-value">{{detail.propertyCertificateNumber}}</div>
  44. </div>
  45. <div class="hui-detail-item">
  46. <div class="hui-detail-label">启用日期</div>
  47. <div class="hui-detail-value">{{detail.invocationDate}}</div>
  48. </div>
  49. <div class="hui-detail-item">
  50. <div class="hui-detail-label">是否装修</div>
  51. <div class="hui-detail-value">{{detail.decoration === 1 ? '已装修':'未装修'}}</div>
  52. </div>
  53. <div class="hui-detail-item">
  54. <div class="hui-detail-label">公开房源</div>
  55. <div class="hui-detail-value">{{detail.openState === 1 ? '公开':'不公开'}}</div>
  56. </div>
  57. <div class="hui-detail-item">
  58. <div class="hui-detail-label">招商状态</div>
  59. <div class="hui-detail-value">{{detail.investmentState === 1 ? '已招商':'未招商'}}</div>
  60. </div>
  61. </div>
  62. <div v-if="detail.data && detail.data != '[]'">
  63. <div class="hui-detail-title">自定义信息</div>
  64. <div class="hui-detail-content">
  65. <div class="hui-detail-item" v-for="(item,index) in JSON.parse(detail.data)">
  66. <div class="hui-detail-label">{{item.keyName}}</div>
  67. <div class="hui-detail-value">{{item.value}}</div>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="hui-detail-title">房源标签</div>
  72. <div class="hui-detail-content hui-detail-image">
  73. <tag ref="tag" type="look" :tagType="3" :tagActive="detail.tagIds ? detail.tagIds.split(',') : []">
  74. </tag>
  75. </div>
  76. <div class="hui-detail-title">列表展示照片</div>
  77. <div class="hui-detail-content hui-detail-image">
  78. <upload :list="detail.showPicture ? JSON.parse(detail.showPicture) : []" type="preview">
  79. </upload>
  80. </div>
  81. <div class="hui-detail-title">房源图片</div>
  82. <div class="hui-detail-content hui-detail-image">
  83. <upload :list="detail.picture ? JSON.parse(detail.picture) : []" type="preview">
  84. </upload>
  85. </div>
  86. <div class="hui-detail-title">房源视频</div>
  87. <div class="hui-detail-content hui-detail-image">
  88. <upload :list="detail.video ? JSON.parse(detail.video) : []" type="preview">
  89. </upload>
  90. </div>
  91. </div>
  92. </template>
  93. <script>
  94. import {
  95. getHouseDetailById
  96. } from '@/httpApi/space'
  97. import upload from '@/components/common/upload'
  98. import tag from '@/components/common/tag'
  99. export default {
  100. props: ['detailId'],
  101. data() {
  102. return {
  103. detail: {
  104. name: '', //房源名称
  105. roomNumber: '',
  106. roomState: '', //房源状态
  107. roomType: '', //房源类型
  108. area: '',
  109. price: '',
  110. payWay: 0,
  111. decoration: 0,
  112. investmentState: 0,
  113. invocationDate: '',
  114. openState: 0,
  115. propertyCertificateNumber: '',
  116. picture: '',
  117. tagIds: '',
  118. data: '',
  119. projectId: '',
  120. projectItemId: '',
  121. projectItemTargetId: ''
  122. },
  123. customData: []
  124. }
  125. },
  126. created() {
  127. if (this.detailId) this.init();
  128. },
  129. components: {
  130. upload,
  131. tag
  132. },
  133. methods: {
  134. init() {
  135. getHouseDetailById(this.detailId).then(res => {
  136. if (res.state) {
  137. this.detail = res.data;
  138. if (this.detail.data) {
  139. this.customData = JSON.parse(this.detail.data);
  140. }
  141. }
  142. })
  143. }
  144. },
  145. }
  146. </script>
  147. <style lang="scss">
  148. </style>