123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500 |
- <template>
- <div class="housedetails" style="padding-bottom: 500rpx">
- <div class="content" v-if="planPictureList.length != 0">
- <uni-swiper-dot
- class="uni-swiper-dot-box"
- @clickItem="clickItem"
- :info="info"
- :current="current"
- :mode="mode"
- :dots-styles="dotsStyles"
- field="content"
- >
- <swiper class="swiper-box" @change="change" :current="swiperDotIndex">
- <swiper-item v-for="(item, index) in planPictureList" :key="index">
- <view class="swiper-item" :class="'swiper-item' + index">
- <img :src="item.url" alt="" style="width: 100%; height: 100%" />
- </view>
- </swiper-item>
- </swiper>
- </uni-swiper-dot>
- </div>
- <div class="list-row">
- <div class="cell_1">
- <div class="width100 mb8rpx">
- <div class="first_title">
- {{
- form.groupName + form.floorDiscName + form.buildName + form.roomNo
- }}
- </div>
- </div>
- <div class="width100 mb8rpx height50rpx chuzuborder">
- <div class="float_left chuzu_label">出租指导价(元/㎡/月):</div>
- <div class="float_left chuzu_vlaue">
- {{ form.guidePrice }}
- </div>
- </div>
- <div class="width100 pdt32 pdb32 chuzuborder">
- <van-row>
- <van-col :span="6">
- <div class="yongtu_first_title">
- {{ getDicType("roomUse", form.roomUse) }}
- </div>
- <div class="yongtu_second_title">用途</div>
- </van-col>
- <van-col :span="6">
- <div class="yongtu_first_title over_hidden textflow">
- {{
- form.decorationSituation ? form.decorationSituation : "暂无"
- }}
- <!-- decorationSituation-->
- </div>
- <div class="yongtu_second_title">装修情况</div>
- </van-col>
- <van-col :span="6">
- <div class="yongtu_first_title">
- {{ form.direction ? form.direction : "暂无" }}
- </div>
- <div class="yongtu_second_title">朝向</div>
- </van-col>
- <van-col :span="6">
- <div class="yongtu_first_title">
- {{ form.size ? form.size : "暂无" }}
- </div>
- <div class="yongtu_second_title">面积(m²)</div>
- </van-col>
- </van-row>
- </div>
- <div class="width100 pdt32 height50rpx pdb32 chuzuborder">
- <div class="roomstatus">
- {{ getDicType("zaiti", form.propertyNature) }}
- </div>
- <div class="roomstatus" v-if="form.currentState == '1'">空置</div>
- <div class="roomstatus" v-if="form.currentState == '2'">锁定</div>
- <div class="roomstatus" v-if="form.currentState == '3'">预约</div>
- <div class="roomstatus" v-if="form.currentState == '4'">临期</div>
- <div class="roomstatus" v-if="form.currentState == '5'">已租</div>
- <div class="roomstatus" v-if="form.currentState == '6'">到期</div>
- </div>
- <div class="width100 pdt32 pdb32 chuzuborder">
- <van-row>
- <van-col :span="4">
- <div style="white-space: nowrap">说明</div>
- </van-col>
- <van-col :span="20">
- <span>{{ form.remark ? form.remark : "暂无" }}</span>
- </van-col>
- </van-row>
- </div>
- </div>
- </div>
- <div class="project-column pdt32 pdl32 pdr32">
- <div class="pdb16 chuzuborder">关联项目</div>
- </div>
- <div class="list-row" v-for="item in list">
- <div class="cell_1">
- <div class="width100 height44rpx mb8rpx">
- <div class="first_title float_left chaochuyincang">
- {{ item.projectName }}
- </div>
- <div class="width20 float_left">
- <div
- class="button_primary float_right"
- v-if="item.reservationStatus == '1'"
- >
- 空置
- </div>
- <div
- class="button_primary float_right"
- v-if="item.reservationStatus == '2'"
- >
- 锁定
- </div>
- <div
- class="button_primary float_right"
- v-if="item.reservationStatus == '3'"
- >
- 预约
- </div>
- <div
- class="button_primary float_right"
- v-if="item.reservationStatus == '4'"
- >
- 临期
- </div>
- <div
- class="button_primary float_right"
- v-if="item.reservationStatus == '5'"
- >
- 已租
- </div>
- <div
- class="button_primary float_right"
- v-if="item.reservationStatus == '6'"
- >
- 到期
- </div>
- </div>
- </div>
- <div class="width100 height44rpx mb8rpx">
- <div class="second_title width100">
- 企业名称:{{
- !item.companyId || item.companyId == null
- ? "未知"
- : item.companyId
- }}
- </div>
- </div>
- <div class="width100 height44rpx mb8rpx">
- <div class="second_title width100">
- 招商联系人:{{ item.projectManager }}
- </div>
- </div>
- <div class="width100 height44rpx mb8rpx">
- <div class="second_title width100">
- 联系电话:{{ item.managerPhone }}
- </div>
- </div>
- <div class="width100 height44rpx mb8rpx">
- <div class="second_title width100">
- 项目介绍:{{ item.projectInfo }}…
- </div>
- </div>
- </div>
- </div>
- <view class="btn-view">
- <button
- class="btn"
- @click="jumpCreatedProject()"
- style="margin-left: 10rpx"
- >
- 创建项目
- </button>
- </view>
- </div>
- </template>
- <script>
- import { getByCodes, getRoomInfo, listByModel } from "@/js_sdk/http";
- export default {
- components: {},
- data() {
- return {
- dic_key: ["PROPERTY_NATURE", "HOUSE_USAGE"],
- dic_SelectList: {},
- search: {
- pageSize: 10,
- pageNum: 1,
- },
- form: {
- id: "",
- },
- list: [],
- info: [
- {
- colorClass: "uni-bg-red",
- url: "https://web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg",
- content: "内容 A",
- },
- {
- colorClass: "uni-bg-green",
- url: "https://web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg",
- content: "内容 B",
- },
- {
- colorClass: "uni-bg-blue",
- url: "https://web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg",
- content: "内容 C",
- },
- ],
- dotStyle: [
- {
- backgroundColor: "rgba(0, 0, 0, .3)",
- border: "1px rgba(0, 0, 0, .3) solid",
- color: "#fff",
- selectedBackgroundColor: "rgba(0, 0, 0, .9)",
- selectedBorder: "1px rgba(0, 0, 0, .9) solid",
- },
- {
- backgroundColor: "rgba(255, 90, 95,0.3)",
- border: "1px rgba(255, 90, 95,0.3) solid",
- color: "#fff",
- selectedBackgroundColor: "rgba(255, 90, 95,0.9)",
- selectedBorder: "1px rgba(255, 90, 95,0.9) solid",
- },
- {
- backgroundColor: "rgba(83, 200, 249,0.3)",
- border: "1px rgba(83, 200, 249,0.3) solid",
- color: "#fff",
- selectedBackgroundColor: "rgba(83, 200, 249,0.9)",
- selectedBorder: "1px rgba(83, 200, 249,0.9) solid",
- },
- ],
- modeIndex: -1,
- styleIndex: -1,
- current: 0,
- mode: "default",
- dotsStyles: {},
- planPictureList: [],
- swiperDotIndex: 0,
- };
- },
- onLoad(options) {
- this.getByCodes();
- this.form.id = options.id;
- getRoomInfo(options.id).then((e) => {
- this.form = e;
- this.form.currentState = options.currentState;
- console.log(e.planPicture.split(","));
- if (e.planPicture.length != 0) {
- this.planPictureList = e.planPicture.split(",").map((e) => {
- return {
- url: this.$constant.BASE_URI + "/FileController/download/" + e,
- };
- });
- } else {
- this.planPictureList = [];
- }
- });
- //
- console.log({ id: this.form.id, ...this.search });
- listByModel({ id: options.id, ...this.search }).then((e) => {
- this.list = e.rows;
- });
- },
- methods: {
- jumpCreatedProject() {
- uni.navigateTo({
- url: "/pages/subPackages/addintention/addintention?ids=" + this.form.id,
- });
- },
- getDicType(type, value) {
- if (type == "zaiti" && this.dic_SelectList.PROPERTY_NATURE) {
- let PROPERTY_NATURE = this.dic_SelectList.PROPERTY_NATURE;
- let index = PROPERTY_NATURE.findIndex((e) => e.value == value);
- return PROPERTY_NATURE[index].label;
- }
- if (type == "roomUse" && this.dic_SelectList.HOUSE_USAGE) {
- let HOUSE_USAGE = this.dic_SelectList.HOUSE_USAGE;
- let index = HOUSE_USAGE.findIndex((e) => e.value == value);
- return HOUSE_USAGE[index].label;
- }
- },
- async getByCodes() {
- let data = await getByCodes(JSON.stringify(this.dic_key));
- this.dic_SelectList = this.$common.handleDicList(data);
- },
- getMoreListByModel() {
- listByModel({ id: this.form.id, ...this.search }).then((e) => {
- this.list.push(...e.rows);
- });
- },
- onReachBottom() {
- this.search.pageNum += 1;
- this.getMoreListByModel();
- console.log("滑动到距离底部100px的时候触发,可以放 。。业务逻辑");
- }, //下拉执行的时候触发 (下拉刷新)
- change(e) {
- this.current = e.detail.current;
- },
- selectStyle(index) {
- this.dotsStyles = this.dotStyle[index];
- this.styleIndex = index;
- },
- selectMode(mode, index) {
- this.mode = mode;
- this.modeIndex = index;
- this.styleIndex = -1;
- this.dotsStyles = this.dotStyle[0];
- },
- clickItem(e) {
- this.swiperDotIndex = e;
- },
- onBanner(index) {
- console.log(22222, index);
- },
- },
- };
- </script>
- <style lang="scss">
- .chaochuyincang {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .button_primary {
- width: 96rpx;
- height: 50rpx;
- text-align: center;
- line-height: 50rpx;
- color: #1d18bc;
- font-weight: 500;
- background: rgba(29, 24, 188, 0.05);
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- }
- .housedetails {
- .btn-view {
- width: 100%;
- height: 100rpx;
- padding: 20rpx 10%;
- background-color: #ffffff;
- position: fixed;
- bottom: 0;
- left: 0;
- }
- .btn {
- width: 75%;
- height: 90rpx;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- background: #1d18bc;
- line-height: 90rpx;
- color: white;
- float: left;
- }
- .over_hidden {
- overflow: hidden;
- }
- .textflow {
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .cell_1 {
- float: left;
- width: 100%;
- }
- .project-column {
- border-radius: 8rpx 8rpx 0rpx 0rpx;
- //height: 44rpx;
- font-size: 32rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- background: #ffffff;
- }
- .shuomingflex {
- display: flex;
- min-height: 110rpx;
- }
- .roomstatus {
- height: 50rpx;
- line-height: 50rpx;
- font-size: 24rpx;
- padding: 0rpx 16rpx;
- float: left;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 500;
- color: #1d18bc;
- border: 2rpx solid #1d18bc;
- margin-left: 16rpx;
- }
- .roomstatus:first-child {
- margin-left: 0 !important;
- }
- .height50rpx {
- height: 50rpx;
- }
- .pd32 {
- padding: 32rpx;
- }
- .cell_1 {
- float: left;
- width: 100%;
- }
- .float_left {
- float: left;
- }
- .chuzu_label {
- width: 312rpx;
- height: 36rpx;
- font-size: 26rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 500;
- color: #333333;
- line-height: 36rpx;
- }
- .chuzuborder {
- border-bottom: 2px solid #cccccc;
- }
- .chuzu_vlaue {
- width: 86rpx;
- font-size: 32rpx;
- font-family: PingFang SC-Bold, PingFang SC;
- font-weight: bold;
- color: #ec7359;
- line-height: 38rpx;
- }
- .list-row {
- width: calc(100% - 64rpx);
- padding: 16rpx 32rpx 18rpx 32rpx;
- background: #ffffff;
- margin-bottom: 16rpx;
- display: flex;
- //height: 278rpx;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- }
- .mb8rpx {
- margin-bottom: 8rpx;
- }
- padding: 32rpx;
- .swiper-box {
- height: 200px;
- }
- .content {
- margin-bottom: 32rpx;
- }
- .swiper-item {
- /* #ifndef APP-NVUE */
- display: flex;
- /* #endif */
- flex-direction: column;
- justify-content: center;
- align-items: center;
- height: 200px;
- color: #fff;
- }
- .swiper-item0 {
- background-color: #cee1fd;
- }
- .swiper-item1 {
- background-color: #b2cef7;
- }
- .swiper-item2 {
- background-color: #cee1fd;
- }
- .image {
- width: 750rpx;
- }
- .uni-bg-red {
- background-color: #ff5a5f;
- }
- .uni-bg-green {
- background-color: #09bb07;
- }
- .uni-bg-blue {
- background-color: #007aff;
- }
- .active {
- border-style: solid;
- border-color: #007aff;
- border-width: 1px;
- }
- }
- </style>
|