From aebd7cdecc28da78b38faac9c92eca922eb9b2f3 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Thu, 05 Jan 2023 17:26:06 +0800
Subject: [PATCH] 社区感知数据对接和停车场等点击跳转

---
 src/styles/media/index.scss  |    4 +
 public/img/icon/comeOut.png  |    0 
 src/api/dept/index.js        |   19 ++++++
 public/img/icon/park.png     |    0 
 public/img/icon/business.png |    0 
 src/views/house/index.vue    |  152 +++++++++++++++++++++++++++++++++++++++++++++-----
 6 files changed, 159 insertions(+), 16 deletions(-)

diff --git a/public/img/icon/business.png b/public/img/icon/business.png
new file mode 100644
index 0000000..4532817
--- /dev/null
+++ b/public/img/icon/business.png
Binary files differ
diff --git a/public/img/icon/comeOut.png b/public/img/icon/comeOut.png
new file mode 100644
index 0000000..9c9619b
--- /dev/null
+++ b/public/img/icon/comeOut.png
Binary files differ
diff --git a/public/img/icon/park.png b/public/img/icon/park.png
new file mode 100644
index 0000000..732f997
--- /dev/null
+++ b/public/img/icon/park.png
Binary files differ
diff --git a/src/api/dept/index.js b/src/api/dept/index.js
index 224595f..ae52282 100644
--- a/src/api/dept/index.js
+++ b/src/api/dept/index.js
@@ -128,3 +128,22 @@
         }
     })
 }
+
+/**
+ * 大搜-搜索停车场、出入口、商场
+ * @param {*} adcode
+ * @returns
+ */
+export const getSearchExtensivelyBgAoiDeepdata = (ak, region, ids, infos) => {
+    return request({
+        url: '/zhs/bs/search',
+        method: 'get',
+        requestBaseUrl: 'fengtDS',
+        params: {
+            ak,
+            region,
+            ids,
+            infos,
+        }
+    })
+}
\ No newline at end of file
diff --git a/src/styles/media/index.scss b/src/styles/media/index.scss
index 9aaca2e..8cb8d91 100644
--- a/src/styles/media/index.scss
+++ b/src/styles/media/index.scss
@@ -720,6 +720,8 @@
                                     &>.come-out-content,
                                     &>.park-content,
                                     &>.business-content {
+                                        height: countSizeVh(380);
+                                        
                                         .el-table__header-wrapper {
                                             height: countSizeVh(48);
 
@@ -753,6 +755,8 @@
                                         .el-table__empty-text {
                                             font-size: countSizeVh(16);
                                         }
+
+                                        
                                     }
                                 }
 
diff --git a/src/views/house/index.vue b/src/views/house/index.vue
index 66e2e87..d0e4590 100644
--- a/src/views/house/index.vue
+++ b/src/views/house/index.vue
@@ -358,43 +358,64 @@
                             </div>
                         </div>
                     </div>
+
                     <div class="come-out-content" v-show="subNavType == 2">
                         <el-table
-                            :data="comeoutArr"
+                            :data="comeOutData"
                             style="width: 100%"
                             :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                             :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                             :row-class-name="tableRowClassName"
+                            @row-click="(row) => deepDataRowClick('comeOut', row)"
                         >
-                            <el-table-column prop="name" label="名称" width="130"></el-table-column>
-                            <el-table-column prop="position" label="位置" width="150"></el-table-column>
-                            <el-table-column prop="type" label="类别" width="120"></el-table-column>
+                            <el-table-column
+                                prop="name"
+                                label="名称"
+                                width="180"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                            <el-table-column prop="x" label="经度" width="100"></el-table-column>
+                            <el-table-column prop="y" label="纬度" width="100"></el-table-column>
                         </el-table>
                     </div>
+
                     <div class="park-content" v-show="subNavType == 3">
                         <el-table
-                            :data="parkArr"
+                            :data="parkingLotData"
                             style="width: 100%"
                             :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                             :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                             :row-class-name="tableRowClassName"
+                            @row-click="(row) => deepDataRowClick('park', row)"
                         >
-                            <el-table-column prop="name" label="名称" width="130"></el-table-column>
-                            <el-table-column prop="position" label="位置" width="150"></el-table-column>
-                            <el-table-column prop="type" label="类别" width="120"></el-table-column>
+                            <el-table-column
+                                prop="name"
+                                label="名称"
+                                width="180"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                            <el-table-column prop="x" label="经度" width="100"></el-table-column>
+                            <el-table-column prop="y" label="纬度" width="100"></el-table-column>
                         </el-table>
                     </div>
+
                     <div class="business-content" v-show="subNavType == 4">
                         <el-table
-                            :data="businessArr"
+                            :data="businessData"
                             style="width: 100%"
                             :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                             :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                             :row-class-name="tableRowClassName"
+                            @row-click="(row) => deepDataRowClick('business', row)"
                         >
-                            <el-table-column prop="name" label="名称" width="130"></el-table-column>
-                            <el-table-column prop="position" label="位置" width="150"></el-table-column>
-                            <el-table-column prop="type" label="类别" width="120"></el-table-column>
+                            <el-table-column
+                                prop="name"
+                                label="名称"
+                                width="180"
+                                :show-overflow-tooltip="true"
+                            ></el-table-column>
+                            <el-table-column prop="x" label="经度" width="100"></el-table-column>
+                            <el-table-column prop="y" label="纬度" width="100"></el-table-column>
                         </el-table>
                     </div>
                 </div>
@@ -539,7 +560,7 @@
 <script>
 import { listQuery, accurateSearch } from "@/utils/search.js"
 import housingData from '@/assets/data/housingData.js'
-import { getResidentialQuartersList, getResidentialQuartersInfo, getSearchExtensively, getAoiByPt, getUnitbuild, getHouses } from '@/api/dept/index.js'
+import { getResidentialQuartersList, getResidentialQuartersInfo, getSearchExtensively, getAoiByPt, getUnitbuild, getHouses, getSearchExtensivelyBgAoiDeepdata } from '@/api/dept/index.js'
 
 export default {
     data () {
@@ -650,7 +671,13 @@
                             name: "二级 1-1",
                             children: [
                                 {
-                                    name: "三级 1-1-1",
+                                    name: "万达华府",
+                                },
+                                {
+                                    name: "万达晶座",
+                                },
+                                {
+                                    name: "万达广场",
                                 },
                             ],
                         },
@@ -714,6 +741,9 @@
             searchExtensivelyArray: [],
             searchExtensivelyValue: '',
             isShowClearBtn: false,
+            parkingLotData: [],
+            comeOutData: [],
+            businessData: [],
         }
     },
     watch: {
@@ -725,6 +755,7 @@
     created () {
         // this.getResidentialQuartersList('361102')
         this.getResidentialQuartersInfo('6E5271B45D1611EAB6183C15FB00027B', '361102')
+        this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', '62556EAF4B731B9DE0530EF4520A0CFC', '1|3')
         // this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', '万达')
         // this.getAoiByPt('117.9471794', '28.4474852', '361100', '0', '361102', '10')
         // this.getUnitbuild('6E513C5E5D1611EAB6183C15FB00027B', '361102')
@@ -768,6 +799,7 @@
         getResidentialQuartersInfo (areaId, adcode) {
             getResidentialQuartersInfo(areaId, adcode).then(res => {
                 this.housingData.name = res.data.data.aoi_name
+                this.buildingList = []
                 res.data.data.build.forEach(item => {
                     let position = JSON.parse(item.center).coordinates
                     this.buildingList.push({ name: `${item.build_name}`, siteJd: `${position[0]}`, siteWd: `${position[1]}`, siteGd: 360, build_id: `${item.build_id}` })
@@ -782,6 +814,26 @@
         getSearchExtensively (ak, region, query) {
             getSearchExtensively(ak, region, query).then(res => {
                 this.searchExtensivelyArray = res.data.result
+            })
+        },
+
+        // 大搜之搜索面详细数据
+        getSearchExtensivelyBgAoiDeepdata (ak, region, ids, infos) {
+            getSearchExtensivelyBgAoiDeepdata(ak, region, ids, infos).then(res => {
+                let deepData = res.data.result[0].deep_infos.deep_info
+                this.parkingLotData = []
+                this.comeOutData = []
+                this.businessData = []
+                deepData.forEach(item => {
+                    if (item.pc_type == 1) {
+                        this.comeOutData.push(item)
+                    } else if (item.pc_type == 2) {
+                        this.parkingLotData.push(item)
+                    } else if (item.pc_type == 4) {
+                        this.businessData.push(item)
+                    }
+                })
+                console.log(232323, this.parkingLotData, this.comeOutData, this.businessData)
             })
         },
 
@@ -951,14 +1003,26 @@
 
         //对树节点进行筛选时执行的方法
         filterNode (value, data) {
-            console.log(value, data)
+            // console.log(value, data)
             if (!value) return true
             return data.name.indexOf(value) !== -1
         },
 
         // 点击选中
         currentChangeHandle (current, currentNode) {
-            console.log(current, currentNode)
+            console.log(123, current, currentNode)
+            this.filterText = ''
+            this.prop = current.name
+            if (current.name == '万达华府') {
+                this.getResidentialQuartersInfo('6E5271B45D1611EAB6183C15FB00027B', '361102')
+                this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', '644A2C4049024A3C8C76D96EEE4366FD', '1|3')
+            } else if (current.name == '万达晶座') {
+                this.getResidentialQuartersInfo('A425AEC8D3FE4C85937FE36B4F996437', '361102')
+                this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', 'aba5227bc3c16d3fec0f0b1e87f25bbb', '1|3')
+            } else if (current.name == '万达广场') {
+                this.getResidentialQuartersInfo('6E513C5E5D1611EAB6183C15FB00027B', '361102')
+                this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', '62556EAF4B731B9DE0530EF4520A0CFC', '1|3')
+            }
             this.$refs[`popover`].doClose()
         },
 
@@ -1048,6 +1112,47 @@
             this.searchExtensivelyValue = ''
             this.searchExtensivelyChange()
         },
+
+        deepDataRowClick (param1, row) {
+            console.log(111222, param1, row)
+            let url = ''
+            if (param1 == 'comeOut') {
+                url = '/img/icon/comeOut.png'
+            } else if (param1 == 'park') {
+                url = '/img/icon/park.png'
+            } else if (param1 == 'business') {
+                url = '/img/icon/business.png'
+            }
+            this.$EventBus.$emit('mapClearLayer', {
+                layerName: 'deepDataLayer',
+                type: 'VectorLayer'
+            })
+            this.$EventBus.$emit('toPosition', {
+                siteJd: `${row.x}`,
+                siteWd: `${row.y}`,
+                siteGd: 1000,
+            })
+            this.$EventBus.$emit('layerPointAdd', {
+                layerName: 'deepDataLayer',
+                type: 'label',
+                params: {
+                    lng: `${row.x}`,
+                    lat: `${row.y}`,
+                    alt: 0,
+                    text: row.name
+                }
+            })
+            this.$EventBus.$emit('layerPointAdd', {
+                layerName: 'deepDataLayer',
+                type: "billboard",
+                params: {
+                    lng: `${row.x}`,
+                    lat: `${row.y}`,
+                    alt: 0,
+                    url: url
+                },
+            })
+        },
     },
 
     destroyed () {
@@ -1059,6 +1164,10 @@
         this.$EventBus.$emit('mapClearLayer', {
             layerName: 'searchLayer',
             type: 'label'
+        })
+        this.$EventBus.$emit('mapClearLayer', {
+            layerName: 'deepDataLayer',
+            type: 'VectorLayer'
         })
     }
 }
@@ -1610,6 +1719,17 @@
                         }
                     }
                 }
+
+                .come-out-content,
+                .park-content,
+                .business-content {
+                    height: 380px;
+                }
+                :deep(.el-table td.el-table__cell div) {
+                    overflow: hidden;
+                    white-space: nowrap;
+                    text-overflow: ellipsis;
+                }
             }
 
             .police-info {

--
Gitblit v1.9.3