Przeglądaj źródła

添加智能选址周边配套条件

tml 6 miesięcy temu
rodzic
commit
341b0781ca

+ 3 - 3
nngkxxdp/src/main/resources/static/naxsb/znxz.html

@@ -264,11 +264,11 @@
                                 <li><span>所属园区:</span><span>{{item.parkData?item.parkData.title:''}}</span></li>
                                 <li><span>联系地址:</span><span>{{item.addr?item.addr:'-'}}</span></li>
                                 <li><span>联系电话:</span><span>{{item.contactPhone?item.contactPhone:'-'}}</span></li>
-                                <!-- <li style="display: flex;">
+                                <li style="display: flex;">
                                     <div class="iconzb"
-                                        v-for="(item,index) in (item.complement?item.complement.split(','):[])">
+                                        v-for="(item,index) in (item.complementName?item.complementName.split(',').slice(0,3):[])">
                                         {{item}}</div>
-                                </li> -->
+                                </li>
                             </ul>
                             <div class="num">
                                 <div class="tjzb">

+ 68 - 2
nngkxxdp/src/main/resources/static/naxsb/znxzchoice.html

@@ -144,6 +144,14 @@
                         </div>
                     </div>
                     <div v-show="currtype==3">
+                        <div class="typetitle">3.请选择您的周边配套</div>
+                        <div class="fwhy" id="zbpt">
+                            <div class="list" :class="getClasszbpt(item)" :key="index" v-for="(item,index) in zbptList"
+                                :data-tab-target="item">{{item}}</div>
+                            <div class="list zbptbx" data-tab-target="不限">不限</div>
+                        </div>
+                    </div>
+                    <div v-show="currtype==4">
                         <div class="typetitle">3.请选择您的租赁情况</div>
                         <div class="fwhy" id="zlqk">
                             <div class="list" :class="getClasszlqk(item.name)" :key="index"
@@ -151,7 +159,7 @@
                             <div class="list zlqkbx" data-tab-target="不限">不限</div>
                         </div>
                     </div>
-                    <div v-show="currtype==4">
+                    <div v-show="currtype==5">
                         <div class="typetitle">4.请选择您的所属园区</div>
                         <div class="fwhy" id="ssyq">
                             <div class="list" :class="getClassssyq(item.title)" :key="index"
@@ -198,6 +206,7 @@
                 currtype: 1,
                 currfwhy: '',
                 currztlx: '',
+                currzbpt: '',
                 currzlqk: '',
                 currssyq: '',
                 currssyqtitle: '',
@@ -248,12 +257,14 @@
                 ],
                 titleList: [
                 ],
+                zbptList: []
             }
         },
         computed: {
             getClasses() {
                 return this.getClassfwhy();
                 return this.getClassztlx();
+                return this.getClasszbpt();
                 return this.getClasszlqk();
                 return this.getClassssyq();
             }
@@ -283,10 +294,11 @@
                     "application": this.currztlx,
                     "rent": this.currzlqk,
                     "belong": this.currssyq,
+                    "complementName": this.currzbpt,
                     "currentPage": 1,
                     "pageSize": 100000
                 }
-                if (this.currtype == 4) {
+                if (this.currtype == 5) {
                     var selectTabs = '';
                     if (this.currfwhy && this.currfwhy != "不限") {
                         selectTabs = this.currfwhy
@@ -298,6 +310,13 @@
                             selectTabs = this.currztlx;
                         }
                     }
+                    if (this.currzbpt && this.currzbpt != "不限") {
+                        if (selectTabs) {
+                            selectTabs = selectTabs + ',' + this.currzbpt
+                        } else {
+                            selectTabs = this.currzbpt;
+                        }
+                    }
                     if (this.currzlqk && this.currzlqk != "不限") {
                         if (selectTabs) {
                             selectTabs = selectTabs + ',' + this.currzlqk
@@ -321,6 +340,7 @@
                         "productModule": this.currfwhy,
                         "application": this.currztlx,
                         "rent": this.currzlqk,
+                        "complementName": this.currzbpt,
                         "belong": this.currssyq
                     }
                     this.getListData(znxz);
@@ -339,7 +359,9 @@
                     dataType: "json",
                     async: false,
                     success: function (data) {
+                        console.log(data)
                         that.ztlxList = data.data.applications;
+                        that.zbptList = data.data.complementName;
                         var alltitle = that.titleList;
                         var parkdata = data.data.parkId;
                         var nowtitle = [];
@@ -379,6 +401,19 @@
                 }
                 return flag ? 'active' : '';
             },
+            getClasszbpt() {
+                var flag = false;
+                if (this.currzbpt) {
+                    var currzbpt = this.currzbpt.split(',');
+                    for (var i = 0; i < currzbpt; i++) {
+                        if (currzbpt[i] == name) {
+                            flag = true;
+                        }
+                    }
+                }
+                return flag ? 'active' : '';
+
+            },
             getClassssyq(name) {
                 var flag = false;
                 if (this.currssyqtitle) {
@@ -490,6 +525,37 @@
             }
         });
 
+        //获取周边配套tab
+        var tabsContainerzbpt = document.getElementById('zbpt');
+        var zbptselectedTabs = [];
+        tabsContainerzbpt.addEventListener('click', function (event) {
+            if (event.target.matches('.list')) {
+                var tabTarget = event.target.getAttribute('data-tab-target');
+                if (zbptselectedTabs.includes(tabTarget) && tabTarget != "不限") {
+                    zbptselectedTabs = zbptselectedTabs.filter(function (selectedTab) {
+                        return selectedTab !== tabTarget;
+                    });
+                    event.target.classList.remove('active');
+                } else {
+                    zbptselectedTabs.push(tabTarget);
+                    if (tabTarget != "不限") {
+                        event.target.classList.add('active');
+                        $('#zbpt .zbptbx').removeClass('active');
+                    } else {
+                        $('#zbpt .list').removeClass('active')
+                        event.target.classList.add('active');
+                        zbptselectedTabs = ['不限']
+                    }
+                }
+                if (zbptselectedTabs[0] == "不限") {
+                    zbptselectedTabs = [];
+                    that.nowDiv.currzbpt = '';
+                } else {
+                    that.nowDiv.currzbpt = zbptselectedTabs.join(',');
+                }
+            }
+        });
+
         //获取租赁类型tab
         var tabsContainerzlqk = document.getElementById('zlqk');
         var zlqkselectedTabs = [];

+ 6 - 5
nngkxxdp/src/main/resources/static/naxsb/ztcrlist.html

@@ -105,6 +105,7 @@
             display: flex;
             flex-direction: column;
             padding: 0;
+            width: 100%;
         }
 
         .contentleft .content ul li {
@@ -189,7 +190,7 @@
             font-size: 20px;
             color: #4BB664;
             text-align: center;
-            margin-right: 9px;
+            /* margin-right: 9px; */
         }
     </style>
 </head>
@@ -256,11 +257,11 @@
                         </div>
                         <div class="right">
                             <ul class="item">
-                                <!-- <li style="display: flex;">
+                                <li style="display: flex;justify-content: space-around;">
                                     <div class="iconzb"
-                                        v-for="(iteml,indexl) in (item.complement?item.complement.split(','):[])">
+                                        v-for="(iteml,indexl) in (item.complementName?item.complementName.split(',').slice(0,3):[])">
                                         {{iteml}}</div>
-                                </li> -->
+                                </li>
                                 <li><span>载体名称:</span><span>{{item.carrierName}}</span></li>
                                 <li><span>可用面积:</span><span>{{item.area}}㎡</span></li>
                                 <li><span>所属园区:</span><span>{{item.parkData?item.parkData.title:''}}</span></li>
@@ -539,7 +540,7 @@
                     dataType: "json",
                     success: function (data) {
                         let dataList = data.list;
-
+                        
                         that.contentList = dataList;
                         that.pointList = [];
                         dataList.forEach(function (d) {