|
@@ -1,12 +1,12 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
- <tencent-map id="amapcontainer" :height="900" :enable-click="false" :enable-bounds-changed="true" @boundsChanged="boundsChanged" />
|
|
|
|
|
|
|
+ <tencent-map id="amapcontainer" :height="900" :enable-click="false" :enable-bounds-changed="true" @boundsChanged="boundsChanged"/>
|
|
|
<div class="category">
|
|
<div class="category">
|
|
|
<el-card>
|
|
<el-card>
|
|
|
- <a v-for="d in listData" :key="d.dataType.name" href="javascript:;" @click="changeDataType(d.dataType.name)">
|
|
|
|
|
|
|
+ <a v-for="d in listData" :key="d.category.id" href="javascript:;" @click="changeDataType(d.category.id)">
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="18">
|
|
<el-col :span="18">
|
|
|
- {{ d.dataType.text }}
|
|
|
|
|
|
|
+ {{ d.category.name }}
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
{{ d.num }}
|
|
{{ d.num }}
|
|
@@ -33,7 +33,7 @@
|
|
|
</style>
|
|
</style>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { findByGroupByDataType, findByMapBounds } from '@/api/bz/base/baseInfo'
|
|
|
|
|
|
|
+import { findByGroupByDataType, findByMapBounds } from '@/api/place/base_info'
|
|
|
import TencentMap from '@/components/TencentMap'
|
|
import TencentMap from '@/components/TencentMap'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
listData: [],
|
|
listData: [],
|
|
|
- dataType: null,
|
|
|
|
|
|
|
+ categoryId: null,
|
|
|
northEast: null,
|
|
northEast: null,
|
|
|
southWest: null,
|
|
southWest: null,
|
|
|
markerLayer: null
|
|
markerLayer: null
|
|
@@ -51,12 +51,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
findByGroupByDataType().then(v => {
|
|
findByGroupByDataType().then(v => {
|
|
|
|
|
+ console.log(v)
|
|
|
this.listData = v
|
|
this.listData = v
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- changeDataType: function(dataTypeName) {
|
|
|
|
|
- this.dataType = dataTypeName
|
|
|
|
|
|
|
+ changeDataType: function(categoryId) {
|
|
|
|
|
+ this.categoryId = categoryId
|
|
|
this.findData()
|
|
this.findData()
|
|
|
},
|
|
},
|
|
|
boundsChanged: function(northEast, southWest, markerLayer) {
|
|
boundsChanged: function(northEast, southWest, markerLayer) {
|
|
@@ -67,7 +68,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
findData() {
|
|
findData() {
|
|
|
const _this = this
|
|
const _this = this
|
|
|
- findByMapBounds(_this.northEast.lng, _this.northEast.lat, _this.southWest.lng, _this.southWest.lat, _this.dataType)
|
|
|
|
|
|
|
+ findByMapBounds(_this.northEast.lng, _this.northEast.lat, _this.southWest.lng, _this.southWest.lat, _this.categoryId)
|
|
|
.then((res) => _this.setMarker(res))
|
|
.then((res) => _this.setMarker(res))
|
|
|
.finally(() => (_this.isloading = false))
|
|
.finally(() => (_this.isloading = false))
|
|
|
},
|
|
},
|
|
@@ -75,7 +76,6 @@ export default {
|
|
|
const listGeometries = []
|
|
const listGeometries = []
|
|
|
res.forEach((o) => {
|
|
res.forEach((o) => {
|
|
|
let infoContent = '<div style="text-align: left">'
|
|
let infoContent = '<div style="text-align: left">'
|
|
|
- infoContent += '<p>类型:' + (o.dataType.text ?? '-') + '</p>'
|
|
|
|
|
infoContent += '<p>名称:' + (o.name ?? '-') + '</p>'
|
|
infoContent += '<p>名称:' + (o.name ?? '-') + '</p>'
|
|
|
infoContent += '<p>联系人:' + (o.contacts ?? '-') + '</p>'
|
|
infoContent += '<p>联系人:' + (o.contacts ?? '-') + '</p>'
|
|
|
infoContent += '<p>电话:' + (o.contactNumber ?? '-') + '</p>'
|
|
infoContent += '<p>电话:' + (o.contactNumber ?? '-') + '</p>'
|