Browse Source

添加热力图

MS-FUUVYHVOEAYJ\Administrator 6 months ago
parent
commit
a0f4712a09

+ 6 - 4
nngkxxdp/src/main/resources/static/naxsb/floorone.html

@@ -432,7 +432,7 @@
             </div>
             <div v-show="popupType == '2'">
                 <div class="search"><input type="text" placeholder="请输入关键字" v-model="inputValue">
-                    <div class="btn" @click="searchData"><img src="images/flsearch.png" alt=""></div>
+                    <div class="btn" @click="searchData(1)"><img src="images/flsearch.png" alt=""></div>
                 </div>
                 <div class="top">
                     <div style="font-weight: bold;font-size: 1.625rem;white-space: nowrap;">{{btnName}}您可以办理:</div>
@@ -673,7 +673,7 @@
             handleCurrentChange(val) {
                 this.currentPage = val;
                 if(this.inputValue){
-                    this.searchData();
+                    this.searchData(val);
                 }else{
                 this.getItemList(val, this.btnid)
                 }
@@ -681,15 +681,16 @@
             handleClick(tab, event) {
                 console.log(tab, event);
             },
-            searchData() {
+            searchData(val) {
                 var that = this;
+                this.currentPage = val;
                 $.ajax({
                     url: conpath + "/handleBusiness/search",
                     type: "post",
                     contentType: 'application/json',
                     data: JSON.stringify({
                         "keyword": that.inputValue,
-                        "currentPage": that.currentPage,
+                        "currentPage": val,
                         "pageSize": 7,
                         "businessId":that.btnid
                     }),
@@ -818,6 +819,7 @@
             that.nowDiv.activeNametwo = "sxqd";
             that.nowDiv.inputValue = '';
             var id = element.getAttribute('data-id');
+            that.nowDiv.currentPage = 1;
             if (id && id != 12) {
                 $('#tab-rzbm').css('display', 'inline-block')
                 $('.popuppage').css('display', 'block')

File diff suppressed because it is too large
+ 21 - 0
nngkxxdp/src/main/resources/static/naxsb/js/bmap.min.js


File diff suppressed because it is too large
+ 0 - 0
nngkxxdp/src/main/resources/static/naxsb/json/hangzhou-tracks.json


+ 1 - 1
nngkxxdp/src/main/resources/static/naxsb/rcfw.html

@@ -102,7 +102,7 @@
             font-weight: normal;
             font-size: 26px;
             color: #FEFEFE;
-            line-height: 60px;
+            line-height: 70px;
             text-align: center;
         }
 

+ 63 - 18
nngkxxdp/src/main/resources/static/naxsb/syyggyy.html

@@ -17,6 +17,8 @@
     <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=7XivTux4H2e1ifKLjvEhxfuayDYxAluq">
     </script>
     <script src="js/urljson.js"></script>
+    <script src="js/echarts.min.js"></script>
+    <script src="js/bmap.min.js"></script>
     <style>
         .toplogo img {
             margin-bottom: 17px;
@@ -57,10 +59,10 @@
         .btnrlt {
             background-image: url(images/btn-cyrlt.png);
             background-size: 100% 100%;
-            width: 230px;
-            height: 90px;
+            width: 195px;
+            height: 71px;
             font-weight: bold;
-            font-size: 30px;
+            font-size: 26px;
             color: #FFFFFF;
             text-shadow: 3px 5px 7px rgba(11, 58, 165, 0.43);
             position: absolute;
@@ -68,7 +70,7 @@
             right: 10px;
             z-index: 100;
             text-align: center;
-            line-height: 80px;
+            line-height: 58px;
             cursor: pointer;
         }
 
@@ -96,7 +98,8 @@
 
 <body>
     <div id="ggyq" style="position: relative;">
-        <div class="btnrlt">产业热力图</div>
+        <div class="btnrlt" @click="currentmap=1" v-show="currentmap==2">产业地图</div>
+        <div class="btnrlt" @click="currentmap=2" v-show="currentmap==1">产业热力图</div>
         <div class="top">
             <div class="toplogo">
                 <img src="images/gyylogo.png" alt="">
@@ -157,7 +160,7 @@
                     <div class="list" @click="goToLink('rcfw.html')"><img src="images/tsfw6.png" alt="">
                         <span>人才服务</span>
                     </div>
-                    <div class="list" @click="goToLink('znxz.html')"><img src="images/tsfw2.png" alt="">
+                    <div class="list" @click="goToLink('znxzchoice.html')"><img src="images/tsfw2.png" alt="">
                         <span>智能选址</span>
                     </div>
                     <div class="list" @click="goToLink('wybdb.html')"><img src="images/tsfw7.png" alt="">
@@ -355,7 +358,9 @@ border: 1px solid #4B98F6;color: #4B98F6;" @click="goToLink('qysmzq.html')">
                     </ul>
                 </div>
             </div>
-            <div class="contentright" id="mapcontainer">
+            <div class="contentright" id="mapcontainerdt" v-show="currentmap==1">
+            </div>
+            <div class="contentright" id="mapcontainerrlt" v-show="currentmap==2">
             </div>
         </div>
     </div>
@@ -368,6 +373,7 @@ border: 1px solid #4B98F6;color: #4B98F6;" @click="goToLink('qysmzq.html')">
             return {
                 pageSize: 20,
                 jbqk: {},
+                currentmap: 1,
                 qwysList: [],
                 yqhdList: [],
                 mxqyList: [],
@@ -435,7 +441,7 @@ border: 1px solid #4B98F6;color: #4B98F6;" @click="goToLink('qysmzq.html')">
                 })
             },
             loadMap(points) {
-                let map = new BMap.Map("mapcontainer");
+                let map = new BMap.Map("mapcontainerdt");
                 map.enableScrollWheelZoom();// 启用滚轮缩放
                 map.enableDragging(); // 启用拖拽功能
                 const addr = new URL(window.location.href);
@@ -635,18 +641,57 @@ border: 1px solid #4B98F6;color: #4B98F6;" @click="goToLink('qysmzq.html')">
     });
 </script>
 <script>
-    // const scrollContent = document.querySelector('.scrollContent');
+    var app = {};
+
+    var chartDom = document.getElementById('mapcontainerrlt');
+    var myChart = echarts.init(chartDom);
+    var option;
 
-    // function generateContent() {
-    //     const content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit...';
-    //     let generatedContent = '';
-    //     for (let i = 0; i < 5; i++) { // 生成5次以创建循环效果
-    //         generatedContent += content;
-    //     }
-    //     scrollContent.innerHTML = generatedContent;
-    // }
+    $.get('json/hangzhou-tracks.json', function (data) {
+        var points = [].concat.apply(
+            [],
+            data.map(function (track) {
+                return track.map(function (seg) {
+                    return seg.coord.concat([1]);
+                });
+            })
+        );
+        myChart.setOption(
+            (option = {
+                animation: false,
+                bmap: {
+                    center: [120.13066322374, 30.240018034923],
+                    zoom: 14,
+                    roam: true
+                },
+                visualMap: {
+                    show: false,
+                    top: 'top',
+                    min: 0,
+                    max: 5,
+                    seriesIndex: 0,
+                    calculable: true,
+                    inRange: {
+                        color: ['blue', 'blue', 'green', 'yellow', 'red']
+                    }
+                },
+                series: [
+                    {
+                        type: 'heatmap',
+                        coordinateSystem: 'bmap',
+                        data: points,
+                        pointSize: 5,
+                        blurSize: 6
+                    }
+                ]
+            })
+        );
+        // 添加百度地图插件
+        var bmap = myChart.getModel().getComponent('bmap').getBMap();
+        bmap.addControl(new BMap.MapTypeControl());
+    });
 
-    // generateContent();
+    option && myChart.setOption(option);
 </script>
 
 </html>

+ 7 - 11
nngkxxdp/src/main/resources/static/naxsb/znxzchoice.html

@@ -124,7 +124,7 @@
                         </div>
                     </div>
                     <div v-show="currtype==2">
-                        <div class="typetitle">1.请选择您的载体类型</div>
+                        <div class="typetitle">2.请选择您的载体类型</div>
                         <div class="fwhy" id="ztlx">
                             <div class="list" :key="index" v-for="(item,index) in ztlxList"
                                 :data-tab-target="item.name">{{item.name}}</div>
@@ -132,7 +132,7 @@
                         </div>
                     </div>
                     <div v-show="currtype==3">
-                        <div class="typetitle">1.请选择您的租赁情况</div>
+                        <div class="typetitle">3.请选择您的租赁情况</div>
                         <div class="fwhy" id="zlqk">
                             <div class="list" :key="index" v-for="(item,index) in zlqklist"
                                 :data-tab-target="item.name">{{item.name}}</div>
@@ -140,7 +140,7 @@
                         </div>
                     </div>
                     <div v-show="currtype==4">
-                        <div class="typetitle">1.请选择您的所属园区</div>
+                        <div class="typetitle">4.请选择您的所属园区</div>
                         <div class="fwhy" id="ssyq">
                             <div class="list" :key="index" v-for="(item,index) in titleList" :data-tab-target="item.id"
                                 :data-title="item.title">
@@ -240,10 +240,6 @@
                     {
                         id: 7,
                         name: "宿舍"
-                    },
-                    {
-                        id: 9,
-                        name: "不限"
                     }
                 ],
                 zlqklist: [
@@ -290,16 +286,16 @@
                         "pageSize": 100000
                     }
                     var selectTabs = '';
-                    if (this.currfwhy) {
+                    if (this.currfwhy&&this.currfwhy!="不限") {
                         selectTabs = this.currfwhy
                     }
-                    if (this.currztlx) {
+                    if (this.currztlx&&this.currztlx!="不限") {
                         selectTabs = selectTabs + ',' + this.currztlx
                     }
-                    if (this.currzlqk) {
+                    if (this.currzlqk&&this.currzlqk!="不限") {
                         selectTabs = selectTabs + ',' + this.currzlqk
                     }
-                    if (this.currssyq) {
+                    if (this.currssyq&&this.currssyq!="不限") {
                         selectTabs = selectTabs + ',' + this.currssyqtitle
                     }
                     const znxzString = JSON.stringify(znxz);

Some files were not shown because too many files changed in this diff