pk-info.vue 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. <template>
  2. <view class="pk-info">
  3. <scroll-view scroll-y="true" scroll-x="true" class="pk-scroll-w">
  4. <view class="pk-scroll-w-box">
  5. <view class="pk-header u-flex-col u-col-center">
  6. <view class="pk-left-w">
  7. <view class="pk-left">
  8. <image src="../../static/images/pk.png" mode="aspectFit"></image>
  9. </view>
  10. </view>
  11. <view class="pk-item" v-for="(item,index) in list" :key="index">
  12. <image :src="item.logo" class="pk-item-img" mode=""></image>
  13. <view class="pk-item-box">
  14. <view class="item-name u-line-2">
  15. {{item.name}}
  16. </view>
  17. <view class="label-box u-flex">
  18. <text v-for="(a,b) in item.trait" :key="b" v-if="b < 2">{{a}}</text>
  19. </view>
  20. <view class="price-box u-flex">
  21. <text>参考均价</text>
  22. <text>{{item.avg_price}}/㎡</text>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="pk-title u-flex">
  28. <text>基本情况</text>
  29. </view>
  30. <view class="pk-table">
  31. <view class="pk-table-row u-flex" v-for="(item,index) in jibenlist" :key="index">
  32. <view class="row-left u-flex">
  33. <text>{{item.title}}</text>
  34. </view>
  35. <text class="row-text" v-for="(a,b) in list" :key="b" :style="{width:b == 0 ? '276rpx' : '264rpx'}">{{list[b][item.value]}}</text>
  36. </view>
  37. </view>
  38. <view class="pk-title u-flex">
  39. <text>总体情况</text>
  40. </view>
  41. <view class="pk-table">
  42. <view class="pk-table-row u-flex" v-for="(item,index) in zongtilist" :key="index">
  43. <view class="row-left u-flex">
  44. <text>{{item.title}}</text>
  45. </view>
  46. <text class="row-text" v-for="(a,b) in list" :key="b" :style="{width:b == 0 ? '276rpx' : '264rpx'}">{{list[b][item.value]}}</text>
  47. </view>
  48. </view>
  49. <view class="pk-title u-flex">
  50. <text>项目介绍</text>
  51. </view>
  52. <view class="pk-table">
  53. <view class="pk-table-row u-flex">
  54. <view class="row-left u-flex">
  55. <text>项目简介</text>
  56. </view>
  57. <text class="row-text" v-for="(a,b) in list" :key="b" :style="{width:b == 0 ? '276rpx' : '264rpx'}">{{a.project_synopsis}}</text>
  58. </view>
  59. </view>
  60. </view>
  61. </scroll-view>
  62. </view>
  63. </template>
  64. <script>
  65. export default {
  66. data() {
  67. return {
  68. list: [],
  69. jibenlist: [{
  70. title: '备案名',
  71. value: 'record_name'
  72. },
  73. {
  74. title: '销售状态',
  75. value: 'sale_state'
  76. },
  77. {
  78. title: '开盘时间',
  79. value: 'sale_time'
  80. },
  81. {
  82. title: '物业类别',
  83. value: 'property_class'
  84. },
  85. {
  86. title: '产权年限',
  87. value: 'property_deadline'
  88. },
  89. {
  90. title: '装修状况',
  91. value: 'fitment_state'
  92. },
  93. {
  94. title: '物业公司',
  95. value: 'property_company'
  96. },
  97. {
  98. title: '交房时间',
  99. value: 'delivery_time'
  100. },
  101. {
  102. title: '项目地址',
  103. value: 'project_address'
  104. }
  105. ],
  106. zongtilist: [{
  107. title: '占地面积(㎡)',
  108. value: 'floor_area'
  109. },
  110. {
  111. title: '总占地面积(㎡)',
  112. value: 'covered_area'
  113. },
  114. {
  115. title: '容积率',
  116. value: 'plot_ratio'
  117. },
  118. {
  119. title: '绿化率(%)',
  120. value: 'greening_rate'
  121. },
  122. {
  123. title: '总栋数',
  124. value: 'tower_num'
  125. },
  126. {
  127. title: '总户数',
  128. value: 'resident_num'
  129. },
  130. {
  131. title: '层高',
  132. value: 'floor_height'
  133. },
  134. {
  135. title: '户型面积',
  136. value: 'house_type_area'
  137. },
  138. {
  139. title: '总车位数',
  140. value: 'stall_num'
  141. },
  142. {
  143. title: '车位配比',
  144. value: 'stall_ratio'
  145. },
  146. {
  147. title: '人车分流',
  148. value: 'car_shunt'
  149. },
  150. {
  151. title: '物业费用',
  152. value: 'property_cost'
  153. },
  154. {
  155. title: '学校',
  156. value: 'school'
  157. },
  158. {
  159. title: '小区内配套',
  160. value: 'plot_mating'
  161. },
  162. {
  163. title: '外立面',
  164. value: 'external_wall'
  165. },
  166. {
  167. title: '楼层状况',
  168. value: 'floor_case'
  169. },
  170. {
  171. title: '预售许可证',
  172. value: 'permit_presale'
  173. },
  174. {
  175. title: '开发商',
  176. value: 'developers'
  177. },
  178. {
  179. title: '售楼中心地址',
  180. value: 'sales_office'
  181. }
  182. ],
  183. ids: []
  184. }
  185. },
  186. onLoad(option) {
  187. this.ids = JSON.parse(option.ids)
  188. this.getdata()
  189. },
  190. methods: {
  191. getdata() {
  192. this.$u.post('/api/Property/property_comparison',{
  193. id_info:this.ids.join(",")
  194. }).then(res => {
  195. this.list = res.data
  196. })
  197. }
  198. }
  199. }
  200. </script>
  201. <style lang="scss">
  202. .pk-info {
  203. .pk-scroll-w {
  204. width: 750rpx;
  205. height: 100vh;
  206. .pk-scroll-w-box {
  207. padding: 0 24rpx 24rpx 0;
  208. .pk-table {
  209. margin-bottom: 24rpx;
  210. .pk-table-row {
  211. align-items: stretch;
  212. white-space: nowrap;
  213. .row-text {
  214. min-height: 82rpx;
  215. padding: 24rpx 40rpx;
  216. width: 264rpx;
  217. border-left: 2rpx solid #fff;
  218. border-bottom: 2rpx solid #fff;
  219. background-color: #F5F5F5;
  220. font-size: 24rpx;
  221. font-family: PingFangSC-Regular, PingFang SC;
  222. font-weight: 400;
  223. color: #333333;
  224. display: inline-block;
  225. flex-shrink: 0;
  226. white-space: pre-wrap;
  227. }
  228. .row-left {
  229. padding-left: 24rpx;
  230. background-color: #fff;
  231. border-bottom: 2rpx solid #fff;
  232. min-height: 82rpx;
  233. display: inline-flex;
  234. flex-shrink: 0;
  235. position: sticky;
  236. left: 0;
  237. text {
  238. width: 124rpx;
  239. background: #CCCCCC;
  240. padding: 24rpx 14rpx;
  241. height: 100%;
  242. font-size: 24rpx;
  243. font-family: PingFangSC-Regular, PingFang SC;
  244. font-weight: 400;
  245. color: #333333;
  246. text-align: center;
  247. white-space: pre-wrap;
  248. }
  249. }
  250. }
  251. }
  252. .pk-title {
  253. padding: 0 0 20rpx 0;
  254. font-size: 28rpx;
  255. font-family: PingFangSC-Medium, PingFang SC;
  256. font-weight: 500;
  257. color: #333333;
  258. text {
  259. padding: 0 24rpx;
  260. position: sticky;
  261. left: 0;
  262. }
  263. }
  264. .pk-header {
  265. white-space: nowrap;
  266. position: sticky;
  267. top: 0;
  268. z-index: 100;
  269. background-color: #fff;
  270. // padding: 24rpx 0 24rpx 24rpx;
  271. writing-mode: vertical-lr;
  272. .pk-item {
  273. display: inline-block;
  274. width: 240rpx;
  275. height: 320rpx;
  276. background: #FFFFFF;
  277. box-shadow: 0px 4rpx 8rpx 0px rgba(0, 0, 0, 0.1);
  278. border-radius: 8rpx;
  279. margin-left: 24rpx;
  280. flex-shrink: 0;
  281. writing-mode: horizontal-tb;
  282. .pk-item-img {
  283. width: 240rpx;
  284. height: 160rpx;
  285. }
  286. .pk-item-box {
  287. padding: 0 12rpx;
  288. .price-box {
  289. margin-bottom: 8rpx;
  290. text:first-child {
  291. font-size: 18rpx;
  292. font-family: PingFangSC-Regular, PingFang SC;
  293. font-weight: 400;
  294. color: #999999;
  295. margin-right: 8rpx;
  296. }
  297. text:last-child {
  298. font-size: 18rpx;
  299. font-family: DINAlternate-Bold, DINAlternate;
  300. font-weight: bold;
  301. color: #FF3B30;
  302. }
  303. }
  304. .label-box {
  305. margin-bottom: 8rpx;
  306. text {
  307. line-height: 32rpx;
  308. background: #F5F5F5;
  309. border-radius: 8rpx;
  310. padding: 0 12rpx;
  311. font-size: 18rpx;
  312. font-family: PingFangSC-Regular, PingFang SC;
  313. font-weight: 400;
  314. color: #999999;
  315. margin-right: 10rpx;
  316. max-width: 50%;
  317. overflow: hidden;
  318. text-overflow:ellipsis;
  319. white-space: nowrap;
  320. }
  321. }
  322. .item-name {
  323. height: 68rpx;
  324. font-size: 24rpx;
  325. font-family: PingFangSC-Regular, PingFang SC;
  326. font-weight: 400;
  327. color: #131415;
  328. margin-bottom: 8rpx;
  329. white-space: pre-wrap;
  330. }
  331. }
  332. }
  333. .pk-left-w {
  334. position: sticky;
  335. left: 0;
  336. background-color: #fff;
  337. padding: 24rpx 0 24rpx 24rpx;
  338. width: 124rpx;
  339. box-sizing: content-box;
  340. .pk-left {
  341. width: 124rpx;
  342. height: 320rpx;
  343. background: linear-gradient(132deg, #FFDD7B 0%, #FFA120 100%);
  344. box-shadow: 0px 4rpx 8rpx 0rpx rgba(0, 0, 0, 0.1);
  345. border-radius: 8px;
  346. display: inline-block;
  347. image {
  348. width: 124rpx;
  349. height: 320rpx;
  350. }
  351. }
  352. }
  353. }
  354. .u-flex-stretch {
  355. align-items: stretch;
  356. }
  357. .pk-scroll-w-left {
  358. width: 124rpx;
  359. height: 100%;
  360. background-color: red;
  361. }
  362. }
  363. }
  364. }
  365. </style>