123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787 |
- <template>
- <div class="housemange">
- <div class="form">
- <div
- class="closIcon"
- @click="searchStatus = false"
- v-if="searchStatus == true"
- >
- <van-icon name="arrow-up" />
- </div>
- <div
- class="openIcon"
- @click="searchStatus = true"
- v-if="searchStatus == false"
- >
- <van-icon name="arrow-down" />
- </div>
- <!-- <van-row>
- <van-col :span="4">
- <div class="yuanqu_label">园区</div>
- </van-col>
- <van-col :span="20" class="labelcolmt26">
- <uni-data-checkbox
- v-model="form.groupIds"
- mode="tag"
- :localdata="yuanqu_loacldata"
- selectedTextColor="#1D18BC"
- selectedColor="rgba(29,24,188,0.05);"
- @change="getSelectedYuanqu"
- >
- </uni-data-checkbox>
- </van-col>
- </van-row> -->
- <van-row v-if="form.groupIds != null">
- <van-col :span="4">
- <div>楼盘</div>
- </van-col>
- <van-col class="labelcolmt26" :span="20">
- <uni-data-checkbox
- v-model="form.parkFloorDiscIds"
- mode="tag"
- :localdata="loupan_loacldata"
- selectedTextColor="#1D18BC"
- selectedColor="rgba(29,24,188,0.05);"
- @change="getSelectedLoupan"
- >
- </uni-data-checkbox>
- </van-col>
- </van-row>
- <van-row>
- <van-col class="labelcolmt26" :span="4">
- <div style="height: 37rpx; line-height: 37rpx">状态</div>
- </van-col>
- <van-col class="labelcolmt26 status" :span="20">
- <uni-data-checkbox
- :map="{ text: 'label', value: 'value' }"
- v-model="form.statusArray"
- :localdata="dic_SelectList.INVESTMENT_STATUS"
- :multiple="true"
- selectedTextColor="#1D18BC"
- selectedColor="#1D18BC"
- @change="getSelectedStatus"
- >
- </uni-data-checkbox>
- </van-col>
- </van-row>
- <van-row v-if="searchStatus">
- <van-col class="labelcolmt26" :span="4">
- <div class="yuanqu_label" style="height: 37rpx; line-height: 37rpx">
- 朝向
- </div>
- </van-col>
- <van-col class="labelcolmt26 status" :span="20">
- <uni-data-checkbox
- v-model="form.chaoxiangArray"
- :localdata="fangxiangList"
- :multiple="true"
- selectedTextColor="#1D18BC"
- selectedColor="#1D18BC"
- @change="getChaoxiang"
- >
- </uni-data-checkbox>
- </van-col>
- </van-row>
- <van-row v-if="searchStatus">
- <van-col class="labelcolmt26" :span="4">
- <div class="yuanqu_label">性质</div>
- </van-col>
- <van-col class="labelcolmt26" :span="16">
- <uni-data-checkbox
- v-model="form.zaitiTypeArray"
- mode="tag"
- :localdata="xinzhiList"
- selectedTextColor="#1D18BC"
- selectedColor="rgba(29,24,188,0.05);"
- @change="getSelectedXingZhi"
- >
- </uni-data-checkbox>
- </van-col>
- </van-row>
- <van-row v-if="searchStatus">
- <van-col class="labelcolmt26" :span="4">
- <div class="yuanqu_label">指导价</div>
- </van-col>
- <van-col class="labelcolmt26" :span="9">
- <input
- v-model="form.guidePrice1"
- type="number"
- placeholder="元/㎡/月"
- />
- </van-col>
- <van-col :span="1">
- <div class="width100 txt_center">-</div>
- </van-col>
- <van-col class="labelcolmt26" :span="9">
- <input
- v-model="form.guidePrice2"
- type="number"
- placeholder="元/㎡/月"
- />
- </van-col>
- </van-row>
- <van-row v-if="searchStatus">
- <van-col class="labelcolmt26" :span="4">
- <div class="yuanqu_label">面积</div>
- </van-col>
- <van-col class="labelcolmt26" :span="9">
- <input v-model="form.roomSize1" type="number" placeholder="㎡" />
- </van-col>
- <van-col :span="1">
- <div class="width100 txt_center">-</div>
- </van-col>
- <van-col class="labelcolmt26" :span="9">
- <input v-model="form.roomSize2" type="number" placeholder="㎡" />
- </van-col>
- </van-row>
- <div style="margin-top: 16rpx">
- <van-row>
- <van-col class="labelcolmt26" :span="6">
- <van-button
- color="#F1F2F9"
- custom-class="reset_btn"
- @click="reast()"
- >重置</van-button
- >
- </van-col>
- <van-col class="labelcolmt26" :span="18">
- <van-button
- style="margin-top: 16rpx"
- color="#2527AA"
- custom-class="search_btn"
- @click="search()"
- >
- <van-icon name="search" />
- 搜索
- </van-button>
- </van-col>
- </van-row>
- </div>
- </div>
- <div class="list">
- <div v-if="vamTabStatus">
- <van-tabs
- id="resizeID"
- ref="vantTabs"
- :active="form.mnpBuildingIds"
- @change="getSelectedLoudong"
- line-width="80rpx"
- title-active-color="#1D18BC"
- >
- <van-tab
- v-for="(item, index) in loudongList"
- :title="item.ldmc"
- :name="item.id"
- :key="index"
- >
- </van-tab>
- </van-tabs>
- </div>
- <div class="total" v-if="roomList.length != 0">
- 共
- <span style="color: #1d18bc">{{ form.total }}</span>
- 间
- </div>
- <div
- class="list-row"
- v-if="roomList.length != 0"
- v-for="(item, index) in roomList"
- :key="index"
- @click="jumpPage(item.id, item.currentState)"
- >
- <div class="statusTag">
- <div class="tagText">
- {{ getCurrentState(item.currentState) }}
- </div>
- </div>
- <div class="cell_1">
- <div class="width100 height44rpx mb8rpx">
- <div class="first_title">
- {{
- item.yuanquName + item.quyuName + item.loudongName + item.roomNo
- }}
- </div>
- </div>
- <div class="width100 height40rpx mb8rpx">
- <div class="second_title">
- 用途:{{
- getDicType("roomUse", item.roomUse) == undefined
- ? "未知"
- : getDicType("roomUse", item.roomUse)
- }}
- </div>
- <div class="second_title_1 width50 chaochuyincang">
- 装修情况:
- {{
- !item.decorationSituation && item.decorationSituation != "暂无"
- ? "未知"
- : dic_SelectList.DECORATION_SITUATION[
- item.decorationSituation - 1
- ].label
- }}
- </div>
- </div>
- <div class="width100 height36rpx mb14rpx">
- <div class="third_title" v-if="item.roomSize">
- 面积(㎡):{{ item.roomSize }}平米
- </div>
- <div class="third_title" v-if="!item.roomSize">面积(㎡):未知</div>
- <div class="third_title_1">
- 朝向:{{ item.roomDirection ? item.roomDirection : "未知" }}
- </div>
- </div>
- <div class="width100 height36rpx">
- <div class="float_left chuzu_label">出租指导价(元/㎡/月):</div>
- <span class="float_left chuzu_vlaue">{{
- !item.guidePrice ? "未知" : item.guidePrice
- }}</span>
- </div>
- </div>
- <div class="cell_2" findDeptList>
- <img src="../../../../static/mine/youjiantou.png" alt="" />
- </div>
- </div>
- <div class="list-row" v-if="roomList.length == 0">
- <van-empty
- class="disblock marginauto"
- style="background: white"
- description="暂无数据"
- />
- </div>
- </div>
- </div>
- </template>
- <script>
- import vanTab from "../../../../wxcomponents/weapp/dist/tab/index";
- import vanTabs from "../../../../wxcomponents/weapp/dist/tabs/index";
- import common from "../../../utils/common";
- import vanEmpty from "../../../../wxcomponents/weapp/dist/empty/index";
- import {
- findYuanQuList,
- findLongPanList,
- findLouDongList,
- findRoomByCondition,
- getByCodes,
- } from "@/js_sdk/http.js";
- const form = {
- status: [],
- chaoxiang: [],
- statusArray: ["1"],
- chaoxiangArray: [],
- zaitiTypeArray: [],
- zaitiType: "",
- roomSize1: "",
- roomSize2: "",
- guidePrice1: "",
- guidePrice2: "",
- parkFloorDiscIds: null,
- groupIds: null,
- pageNum: 1,
- pageSize: 10,
- total: 0,
- currentState: "1",
- mnpBuildingIds: "",
- };
- export default {
- components: {
- vanTab,
- vanTabs,
- vanEmpty,
- },
- name: "housemanger.vue",
- data() {
- return {
- searchStatus: false,
- tabsStatus: true,
- dic_key: [
- "PROPERTY_NATURE",
- "HOUSE_USAGE",
- "project_status",
- "INVESTMENT_STATUS",
- "DECORATION_SITUATION",
- ],
- dic_SelectList: {},
- loudongList: [],
- activezhaoshang: "0",
- form: {
- ...form,
- },
- active: 0,
- formData: {},
- value: 0,
- vamTabStatus: false,
- yuanqu_loacldata: [],
- loupan_loacldata: [],
- range: [
- {
- value: 0,
- text: "科教产业园",
- },
- {
- value: 1,
- text: "红沙湾",
- },
- {
- value: 2,
- text: "胡埭",
- },
- ],
- loupanList: [
- {
- value: 0,
- text: "一期",
- },
- {
- value: 1,
- text: "二期",
- },
- {
- value: 2,
- text: "三期",
- },
- {
- value: 3,
- text: "四期",
- },
- {
- value: 4,
- text: "五期",
- },
- {
- value: 5,
- text: "六期",
- },
- {
- value: 6,
- text: "七期",
- },
- {
- value: 7,
- text: "八期",
- },
- {
- value: 8,
- text: "九期",
- },
- ],
- statusList: [
- {
- value: 1,
- text: "空置",
- },
- {
- value: 2,
- text: "预约",
- },
- // {
- // value: 3,
- // text: "预约",
- // },
- {
- value: 4,
- text: "临期",
- },
- {
- value: 5,
- text: "已租",
- },
- {
- value: 6,
- text: "到期",
- },
- ],
- roomList: [],
- fangxiangList: [
- {
- value: "朝东",
- text: "东",
- },
- {
- value: "朝南",
- text: "南",
- },
- {
- value: "朝西",
- text: "西",
- },
- {
- value: "朝北",
- text: "北",
- },
- ],
- xinzhiList: [
- {
- value: 1,
- text: "自有物业",
- },
- {
- value: 2,
- text: "社会物业",
- },
- ],
- };
- },
- mounted() {
- this.findYuanQuList();
- this.getByCodes1();
- },
- methods: {
- getCurrentState(currentState) {
- if (
- this.dic_SelectList.INVESTMENT_STATUS &&
- this.dic_SelectList.INVESTMENT_STATUS.length > 0
- ) {
- let data = this.dic_SelectList.INVESTMENT_STATUS.find(
- (e) => e.value == currentState
- );
- // console.log("datadatadatadatadatadata", data);
- return data.label;
- }
- },
- reast() {
- this.loudongList = [];
- this.roomList = [];
- this.form = { ...form };
- this.findYuanQuList();
- this.getByCodes1();
- },
- async search() {
- if (!this.form.groupIds && !this.form.parkFloorDiscIds) {
- return this.$showToast("请选择园区和楼盘后重试");
- }
- if (!this.form.groupIds) {
- return this.$showToast("请选择园区后重试");
- }
- if (!this.form.parkFloorDiscIds) {
- return this.$showToast("请选择楼盘后重试");
- }
- this.form.pageNum = 1;
- this.form.pageSize = 10;
- this.form.total = 0;
- let data = await findRoomByCondition(this.form);
- this.roomList = data.rows;
- this.form.total = data.total;
- },
- onReachBottom() {
- console.log("滑动到距离底部100px的时候触发,可以放 。。业务逻辑");
- }, //下拉执行的时候触发 (下拉刷新)
- getDicType(type, value) {
- if (!value) return;
- if (type == "zaiti") {
- 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") {
- let HOUSE_USAGE = this.dic_SelectList.HOUSE_USAGE;
- let index = HOUSE_USAGE.findIndex((e) => e.value == value);
- return HOUSE_USAGE[index].label;
- }
- },
- async getByCodes1() {
- let data = await getByCodes(
- JSON.stringify([
- "PROPERTY_NATURE",
- "HOUSE_USAGE",
- "project_status",
- "INVESTMENT_STATUS",
- "DECORATION_SITUATION",
- ])
- );
- console.log("1111111111111111", data);
- this.dic_SelectList = this.$common.handleDicList(data);
- console.log("this.dic_SelectList", this.dic_SelectList);
- },
- async getSelectedLoudong(event) {
- console.log(event);
- this.form.mnpBuildingIds =
- event.detail.title == "全部" ? "" : event.detail.name;
- let data = await findRoomByCondition(this.form);
- console.log(data);
- this.roomList = data.rows;
- this.form.total = data.total;
- },
- async getSelectedYuanqu() {
- let data = await findLongPanList(this.form.groupIds);
- this.roomList = [];
- this.loudongList = [];
- if (data.length > 0) {
- this.loupan_loacldata = data.map((e) => {
- return {
- value: e.id,
- text: e.name,
- };
- });
- this.form.parkFloorDiscIds = this.loupan_loacldata[0].value;
- } else {
- this.loupan_loacldata = [{ value: null, text: "暂无" }];
- }
- this.getSelectedLoupan();
- },
- async getSelectedLoupan() {
- try {
- let data = await findLouDongList(this.form.parkFloorDiscIds);
- this.vamTabStatus = false;
- console.log(data);
- if (data.length == 0) {
- this.loudongList = [];
- this.roomList = [];
- this.tabsStatus = !this.tabsStatus;
- return;
- } else {
- this.loudongList = [{ ldmc: "全部", id: "" }, ...data];
- this.roomList = [];
- this.form.mnpBuildingIds = "";
- }
- let row = await findRoomByCondition(this.form);
- console.log("我是row", row);
- this.roomList = row.rows;
- this.form.total = row.total;
- this.vamTabStatus = true;
- console.log(row);
- } catch (e) {
- console.log("e这天真热", e);
- }
- },
- findYuanQuList() {
- findYuanQuList().then((data) => {
- let yuanqu_list = [...data];
- let yuanqu_loacldata = yuanqu_list.map((e) => {
- return {
- value: e.id,
- text: e.groupName,
- };
- });
- this.yuanqu_loacldata = yuanqu_loacldata;
- this.form.groupIds = this.yuanqu_loacldata[0].value;
- this.getSelectedYuanqu();
- });
- // console.log(yuanqu_loacldata)
- },
- jumpPage(id, currentState) {
- console.log(id);
- uni.navigateTo({
- url:
- "/pages/subPackages/housedetails/housedetails?id=" +
- id +
- "¤tState=" +
- currentState,
- });
- },
- onLoadMore() {},
- getChaoxiang() {
- this.form.roomDirection = this.form.chaoxiangArray.join(",");
- },
- getSelectedStatus(e) {
- console.log(this.form.statusArray.join(","));
- this.form.currentState = this.form.statusArray.join(",");
- },
- getSelectedXingZhi() {
- console.log(this.form.zaitiTypeArray);
- this.form.zaitiType = this.form.zaitiTypeArray;
- },
- onChange() {},
- getMoreList() {
- let that = this;
- that.form.pageNum += 1;
- findRoomByCondition(that.form).then((e) => {
- console.log(that.roomList);
- if (that.roomList.length == e.total) {
- this.$showToast("没有更多数据");
- }
- that.roomList = [...that.roomList, ...e.rows];
- console.log(that.roomList);
- that.$forceUpdate();
- });
- },
- },
- onPullDownRefresh: function () {
- // 加载数据
- },
- onReachBottom() {
- console.log("滑动到距离底部100px的时候触发,可以放 。。业务逻辑");
- }, //下拉执行的时候触发 (下拉刷新)
- };
- </script>
- <style lang="scss">
- .chaochuyincang {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .statusTag {
- position: absolute;
- background: #2527aa;
- text-align: center;
- color: white;
- // clip-path: polygon(100% 100%, 100% 0%, 0% 0%);
- // height: 100rpx;
- right: 0rpx;
- font-size: 20rpx;
- top: 0rpx;
- padding: 5rpx 20rpx;
- .tagText {
- // transform: rotate(38deg);
- // position: absolute;
- // right: 10rpx;
- // top: 25rpx;
- font-size: 24rpx;
- }
- }
- .closIcon {
- width: 40px;
- height: 40px;
- background: white;
- position: absolute;
- bottom: -40rpx;
- z-index: 100;
- right: 0;
- left: 0;
- margin: auto;
- border-radius: 50%;
- text-align: center;
- line-height: 40px;
- }
- .openIcon {
- width: 40px;
- height: 40px;
- background: white;
- position: absolute;
- bottom: -40rpx;
- z-index: 100;
- right: 0;
- left: 0;
- margin: auto;
- border-radius: 50%;
- text-align: center;
- line-height: 40px;
- }
- /deep/.van-cell {
- padding: 0 0 0 28rpx !important;
- }
- .inputClass {
- padding: 0 0 0 28rpx !important;
- }
- .yuanqu_label {
- height: 55rpx;
- line-height: 55rpx;
- }
- .loupan_label {
- padding: 0rpx 10rpx;
- }
- .housemange {
- /deep/.checklist-box {
- margin: 0 !important;
- margin-right: 16rpx !important;
- }
- .search_btn {
- margin-left: 18rpx;
- width: calc(100% - 18rpx);
- height: 60rpx;
- }
- .reset_btn {
- color: #2628a9 !important;
- width: 100%;
- height: 60rpx;
- }
- .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;
- align-items: center;
- position: relative;
- }
- .second_title {
- float: left;
- width: 50%;
- font-size: 28rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 500;
- color: #777777;
- }
- .cell_1 {
- float: left;
- width: 90%;
- }
- .cell_2 {
- float: left;
- width: 10%;
- img {
- height: 60rpx;
- width: 60rpx;
- float: right;
- margin: 0;
- }
- }
- .list {
- width: calc(100% - 64rpx);
- margin: 32rpx;
- }
- .form {
- width: calc(100% - 128rpx);
- margin: 32rpx;
- background: #ffffff;
- padding: 32rpx;
- position: relative;
- .label {
- height: 53rpx;
- line-height: 53rpx;
- }
- }
- .labelcolmt26 {
- input {
- font-size: 24rpx;
- border-radius: 8rpx 8rpx 8rpx 8rpx;
- border: 2rpx solid #cccccc;
- text-align: center;
- }
- .van-col {
- margin-top: 26rpx !important;
- }
- label {
- color: #333333;
- font-size: 30rpx;
- margin: 0;
- margin-top: 0 !important;
- }
- .uni-data-checklist {
- margin-top: -10rpx !important;
- }
- }
- .status {
- .uni-data-checklist {
- margin-top: 0rpx !important;
- }
- label {
- color: #333333;
- font-size: 30rpx;
- padding-right: 0rpx !important;
- }
- }
- }
- </style>
|