housedetails.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. <template>
  2. <div class="housedetails" style="padding-bottom: 500rpx">
  3. <div class="content" v-if="planPictureList.length != 0">
  4. <uni-swiper-dot
  5. class="uni-swiper-dot-box"
  6. @clickItem="clickItem"
  7. :info="info"
  8. :current="current"
  9. :mode="mode"
  10. :dots-styles="dotsStyles"
  11. field="content"
  12. >
  13. <swiper class="swiper-box" @change="change" :current="swiperDotIndex">
  14. <swiper-item v-for="(item, index) in planPictureList" :key="index">
  15. <view class="swiper-item" :class="'swiper-item' + index">
  16. <img :src="item.url" alt="" style="width: 100%; height: 100%" />
  17. </view>
  18. </swiper-item>
  19. </swiper>
  20. </uni-swiper-dot>
  21. </div>
  22. <div class="list-row">
  23. <div class="cell_1">
  24. <div class="width100 mb8rpx">
  25. <div class="first_title">
  26. {{
  27. form.groupName + form.floorDiscName + form.buildName + form.roomNo
  28. }}
  29. </div>
  30. </div>
  31. <div class="width100 mb8rpx height50rpx chuzuborder">
  32. <div class="float_left chuzu_label">出租指导价(元/㎡/月):</div>
  33. <div class="float_left chuzu_vlaue">
  34. {{ form.guidePrice ? form.guidePrice : "未知" }}
  35. </div>
  36. </div>
  37. <div class="width100 pdt32 pdb32 chuzuborder">
  38. <van-row>
  39. <van-col :span="6">
  40. <div class="yongtu_first_title">
  41. {{
  42. form.roomUse ? getDicType("roomUse", form.roomUse) : "暂无"
  43. }}
  44. </div>
  45. <div class="yongtu_second_title">用途</div>
  46. </van-col>
  47. <van-col :span="6">
  48. <div class="yongtu_first_title over_hidden textflow">
  49. {{
  50. !form.decorationSituation ||
  51. form.decorationSituation != "null"
  52. ? "暂无"
  53. : form.decorationSituation
  54. }}
  55. <!-- decorationSituation-->
  56. </div>
  57. <div class="yongtu_second_title">装修情况</div>
  58. </van-col>
  59. <van-col :span="6">
  60. <div class="yongtu_first_title">
  61. {{ form.direction ? form.direction : "暂无" }}
  62. </div>
  63. <div class="yongtu_second_title">朝向</div>
  64. </van-col>
  65. <van-col :span="6">
  66. <div class="yongtu_first_title">
  67. {{ form.size ? form.size : "暂无" }}
  68. </div>
  69. <div class="yongtu_second_title">面积(m²)</div>
  70. </van-col>
  71. </van-row>
  72. </div>
  73. <div class="width100 pdt32 height50rpx pdb32 chuzuborder">
  74. <div class="roomstatus" v-if="form.propertyNature">
  75. {{ getDicType("zaiti", form.propertyNature) }}
  76. </div>
  77. <div class="roomstatus" v-if="form.currentState == '1'">空置</div>
  78. <div class="roomstatus" v-if="form.currentState == '2'">锁定</div>
  79. <div class="roomstatus" v-if="form.currentState == '3'">预约</div>
  80. <div class="roomstatus" v-if="form.currentState == '4'">临期</div>
  81. <div class="roomstatus" v-if="form.currentState == '5'">已租</div>
  82. <div class="roomstatus" v-if="form.currentState == '6'">到期</div>
  83. </div>
  84. <div class="width100 pdt32 pdb32 chuzuborder">
  85. <van-row>
  86. <van-col :span="4">
  87. <div style="white-space: nowrap">说明</div>
  88. </van-col>
  89. <van-col :span="20">
  90. <span>{{ form.remark ? form.remark : "暂无" }}</span>
  91. </van-col>
  92. </van-row>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="project-column pdt32 pdl32 pdr32">
  97. <div class="pdb16 chuzuborder">关联项目</div>
  98. </div>
  99. <div class="list-row" v-for="item in list">
  100. <div class="cell_1">
  101. <div class="width100 height44rpx mb8rpx">
  102. <div class="first_title float_left chaochuyincang" style="width: 80%">
  103. {{ item.projectName }}
  104. </div>
  105. <div class="width20 float_left">
  106. <div
  107. class="button_primary float_right"
  108. v-if="item.reservationStatus == '1'"
  109. >
  110. 空置
  111. </div>
  112. <div
  113. class="button_primary float_right"
  114. v-if="item.reservationStatus == '2'"
  115. >
  116. 锁定
  117. </div>
  118. <div
  119. class="button_primary float_right"
  120. v-if="item.reservationStatus == '3'"
  121. >
  122. 预约
  123. </div>
  124. <div
  125. class="button_primary float_right"
  126. v-if="item.reservationStatus == '4'"
  127. >
  128. 临期
  129. </div>
  130. <div
  131. class="button_primary float_right"
  132. v-if="item.reservationStatus == '5'"
  133. >
  134. 已租
  135. </div>
  136. <div
  137. class="button_primary float_right"
  138. v-if="item.reservationStatus == '6'"
  139. >
  140. 到期
  141. </div>
  142. </div>
  143. </div>
  144. <div class="width100 height44rpx mb8rpx">
  145. <div class="second_title width100">
  146. 企业名称:{{
  147. !item.companyId || item.companyId == null
  148. ? "未知"
  149. : item.companyId
  150. }}
  151. </div>
  152. </div>
  153. <div class="width100 height44rpx mb8rpx">
  154. <div class="second_title width100">
  155. 招商联系人:{{ item.projectManager }}
  156. </div>
  157. </div>
  158. <div class="width100 height44rpx mb8rpx">
  159. <div class="second_title width100">
  160. 联系电话:{{ item.managerPhone }}
  161. </div>
  162. </div>
  163. <div class="width100 height44rpx mb8rpx">
  164. <div class="second_title width100">
  165. 项目介绍:{{ item.projectInfo }}…
  166. </div>
  167. </div>
  168. </div>
  169. </div>
  170. <view class="btn-view">
  171. <button
  172. class="btn"
  173. @click="jumpCreatedProject()"
  174. style="margin-left: 10rpx"
  175. >
  176. 创建项目
  177. </button>
  178. </view>
  179. </div>
  180. </template>
  181. <script>
  182. import { getByCodes, getRoomInfo, listByModel } from "@/js_sdk/http";
  183. export default {
  184. components: {},
  185. data() {
  186. return {
  187. dic_key: ["PROPERTY_NATURE", "HOUSE_USAGE"],
  188. dic_SelectList: {},
  189. search: {
  190. pageSize: 10,
  191. pageNum: 1,
  192. },
  193. form: {
  194. id: "",
  195. },
  196. list: [],
  197. info: [
  198. {
  199. colorClass: "uni-bg-red",
  200. url: "https://web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg",
  201. content: "内容 A",
  202. },
  203. {
  204. colorClass: "uni-bg-green",
  205. url: "https://web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg",
  206. content: "内容 B",
  207. },
  208. {
  209. colorClass: "uni-bg-blue",
  210. url: "https://web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg",
  211. content: "内容 C",
  212. },
  213. ],
  214. dotStyle: [
  215. {
  216. backgroundColor: "rgba(0, 0, 0, .3)",
  217. border: "1px rgba(0, 0, 0, .3) solid",
  218. color: "#fff",
  219. selectedBackgroundColor: "rgba(0, 0, 0, .9)",
  220. selectedBorder: "1px rgba(0, 0, 0, .9) solid",
  221. },
  222. {
  223. backgroundColor: "rgba(255, 90, 95,0.3)",
  224. border: "1px rgba(255, 90, 95,0.3) solid",
  225. color: "#fff",
  226. selectedBackgroundColor: "rgba(255, 90, 95,0.9)",
  227. selectedBorder: "1px rgba(255, 90, 95,0.9) solid",
  228. },
  229. {
  230. backgroundColor: "rgba(83, 200, 249,0.3)",
  231. border: "1px rgba(83, 200, 249,0.3) solid",
  232. color: "#fff",
  233. selectedBackgroundColor: "rgba(83, 200, 249,0.9)",
  234. selectedBorder: "1px rgba(83, 200, 249,0.9) solid",
  235. },
  236. ],
  237. modeIndex: -1,
  238. styleIndex: -1,
  239. current: 0,
  240. mode: "default",
  241. dotsStyles: {},
  242. planPictureList: [],
  243. swiperDotIndex: 0,
  244. };
  245. },
  246. onLoad(options) {
  247. this.getByCodes();
  248. this.form.id = options.id;
  249. getRoomInfo(options.id).then((e) => {
  250. this.form = e;
  251. this.form.currentState = options.currentState;
  252. console.log(e.planPicture.split(","));
  253. if (e.planPicture.length != 0) {
  254. this.planPictureList = e.planPicture.split(",").map((e) => {
  255. return {
  256. url: this.$constant.BASE_URI + "/FileController/download/" + e,
  257. };
  258. });
  259. } else {
  260. this.planPictureList = [];
  261. }
  262. });
  263. //
  264. console.log({ id: this.form.id, ...this.search });
  265. listByModel({ id: options.id, ...this.search }).then((e) => {
  266. this.list = e.rows;
  267. });
  268. },
  269. methods: {
  270. jumpCreatedProject() {
  271. uni.navigateTo({
  272. url: "/pages/subPackages/addintention/addintention?ids=" + this.form.id,
  273. });
  274. },
  275. getDicType(type, value) {
  276. if (type == "zaiti" && this.dic_SelectList.PROPERTY_NATURE) {
  277. let PROPERTY_NATURE = this.dic_SelectList.PROPERTY_NATURE;
  278. let index = PROPERTY_NATURE.findIndex((e) => e.value == value);
  279. return PROPERTY_NATURE[index].label;
  280. }
  281. if (type == "roomUse" && this.dic_SelectList.HOUSE_USAGE) {
  282. let HOUSE_USAGE = this.dic_SelectList.HOUSE_USAGE;
  283. let index = HOUSE_USAGE.findIndex((e) => e.value == value);
  284. return HOUSE_USAGE[index].label;
  285. }
  286. },
  287. async getByCodes() {
  288. let data = await getByCodes(JSON.stringify(this.dic_key));
  289. this.dic_SelectList = this.$common.handleDicList(data);
  290. },
  291. getMoreListByModel() {
  292. listByModel({ id: this.form.id, ...this.search }).then((e) => {
  293. this.list.push(...e.rows);
  294. });
  295. },
  296. onReachBottom() {
  297. this.search.pageNum += 1;
  298. this.getMoreListByModel();
  299. console.log("滑动到距离底部100px的时候触发,可以放 。。业务逻辑");
  300. }, //下拉执行的时候触发 (下拉刷新)
  301. change(e) {
  302. this.current = e.detail.current;
  303. },
  304. selectStyle(index) {
  305. this.dotsStyles = this.dotStyle[index];
  306. this.styleIndex = index;
  307. },
  308. selectMode(mode, index) {
  309. this.mode = mode;
  310. this.modeIndex = index;
  311. this.styleIndex = -1;
  312. this.dotsStyles = this.dotStyle[0];
  313. },
  314. clickItem(e) {
  315. this.swiperDotIndex = e;
  316. },
  317. onBanner(index) {
  318. console.log(22222, index);
  319. },
  320. },
  321. };
  322. </script>
  323. <style lang="scss">
  324. .chaochuyincang {
  325. white-space: nowrap;
  326. overflow: hidden;
  327. text-overflow: ellipsis;
  328. }
  329. .button_primary {
  330. width: 96rpx;
  331. height: 50rpx;
  332. text-align: center;
  333. line-height: 50rpx;
  334. color: #1d18bc;
  335. font-weight: 500;
  336. background: rgba(29, 24, 188, 0.05);
  337. border-radius: 8rpx 8rpx 8rpx 8rpx;
  338. }
  339. .housedetails {
  340. .btn-view {
  341. width: 100%;
  342. height: 100rpx;
  343. padding: 20rpx 10%;
  344. background-color: #ffffff;
  345. position: fixed;
  346. bottom: 0;
  347. left: 0;
  348. }
  349. .btn {
  350. width: 75%;
  351. height: 90rpx;
  352. border-radius: 8rpx 8rpx 8rpx 8rpx;
  353. background: #1d18bc;
  354. line-height: 90rpx;
  355. color: white;
  356. float: left;
  357. }
  358. .over_hidden {
  359. overflow: hidden;
  360. }
  361. .textflow {
  362. text-overflow: ellipsis;
  363. white-space: nowrap;
  364. }
  365. .cell_1 {
  366. float: left;
  367. width: 100%;
  368. }
  369. .project-column {
  370. border-radius: 8rpx 8rpx 0rpx 0rpx;
  371. //height: 44rpx;
  372. font-size: 32rpx;
  373. font-family: PingFang SC-Medium, PingFang SC;
  374. font-weight: 500;
  375. color: #333333;
  376. background: #ffffff;
  377. }
  378. .shuomingflex {
  379. display: flex;
  380. min-height: 110rpx;
  381. }
  382. .roomstatus {
  383. height: 50rpx;
  384. line-height: 50rpx;
  385. font-size: 24rpx;
  386. padding: 0rpx 16rpx;
  387. float: left;
  388. border-radius: 8rpx 8rpx 8rpx 8rpx;
  389. font-family: PingFang SC-Medium, PingFang SC;
  390. font-weight: 500;
  391. color: #1d18bc;
  392. border: 2rpx solid #1d18bc;
  393. margin-left: 16rpx;
  394. }
  395. .roomstatus:first-child {
  396. margin-left: 0 !important;
  397. }
  398. .height50rpx {
  399. height: 50rpx;
  400. }
  401. .pd32 {
  402. padding: 32rpx;
  403. }
  404. .cell_1 {
  405. float: left;
  406. width: 100%;
  407. }
  408. .float_left {
  409. float: left;
  410. }
  411. .chuzu_label {
  412. width: 312rpx;
  413. height: 36rpx;
  414. font-size: 26rpx;
  415. font-family: PingFang SC-Medium, PingFang SC;
  416. font-weight: 500;
  417. color: #333333;
  418. line-height: 36rpx;
  419. }
  420. .chuzuborder {
  421. border-bottom: 2px solid #cccccc;
  422. }
  423. .chuzu_vlaue {
  424. width: 86rpx;
  425. font-size: 32rpx;
  426. font-family: PingFang SC-Bold, PingFang SC;
  427. font-weight: bold;
  428. color: #ec7359;
  429. line-height: 38rpx;
  430. }
  431. .list-row {
  432. width: calc(100% - 64rpx);
  433. padding: 16rpx 32rpx 18rpx 32rpx;
  434. background: #ffffff;
  435. margin-bottom: 16rpx;
  436. display: flex;
  437. //height: 278rpx;
  438. border-radius: 8rpx 8rpx 8rpx 8rpx;
  439. }
  440. .mb8rpx {
  441. margin-bottom: 8rpx;
  442. }
  443. padding: 32rpx;
  444. .swiper-box {
  445. height: 200px;
  446. }
  447. .content {
  448. margin-bottom: 32rpx;
  449. }
  450. .swiper-item {
  451. /* #ifndef APP-NVUE */
  452. display: flex;
  453. /* #endif */
  454. flex-direction: column;
  455. justify-content: center;
  456. align-items: center;
  457. height: 200px;
  458. color: #fff;
  459. }
  460. .swiper-item0 {
  461. background-color: #cee1fd;
  462. }
  463. .swiper-item1 {
  464. background-color: #b2cef7;
  465. }
  466. .swiper-item2 {
  467. background-color: #cee1fd;
  468. }
  469. .image {
  470. width: 750rpx;
  471. }
  472. .uni-bg-red {
  473. background-color: #ff5a5f;
  474. }
  475. .uni-bg-green {
  476. background-color: #09bb07;
  477. }
  478. .uni-bg-blue {
  479. background-color: #007aff;
  480. }
  481. .active {
  482. border-style: solid;
  483. border-color: #007aff;
  484. border-width: 1px;
  485. }
  486. }
  487. </style>