Commit c3630f53 authored by 赵啸非's avatar 赵啸非

地图详细显示

parent 2c8afda2
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<template> <template>
<div class="my-map"> <div class="my-map">
<el-amap <el-amap
ref="map" ref="map"
vid="amapDemo" vid="amapDemo"
...@@ -12,6 +13,8 @@ ...@@ -12,6 +13,8 @@
:events="events" :events="events"
class="amap-demo" class="amap-demo"
> >
<div class="tuli" ><slot name="leftTop"></slot></div>
<!-- <el-amap-search-box :on-search-result="onSearchResult" :events='searchEvents'/> --> <!-- <el-amap-search-box :on-search-result="onSearchResult" :events='searchEvents'/> -->
<!--marker --> <!--marker -->
...@@ -290,14 +293,14 @@ export default { ...@@ -290,14 +293,14 @@ export default {
// }, // },
// 一些工具插件 // 一些工具插件
plugin: [ plugin: [
{ // {
pName: "Geocoder", // pName: "Geocoder",
events: { // events: {
init(o) { // init(o) {
//console.log("一些工具插件--地址"+o.getAddress()) // //console.log("一些工具插件--地址"+o.getAddress())
}, // },
}, // },
}, // },
{ {
// 定位 // 定位
pName: "Geolocation", pName: "Geolocation",
...@@ -322,24 +325,24 @@ export default { ...@@ -322,24 +325,24 @@ export default {
}, },
}, },
}, },
{ // {
// 工具栏 // // 工具栏
pName: "ToolBar", // pName: "ToolBar",
events: { // events: {
init(instance) { // init(instance) {
//console.log("工具栏:"+instance); // //console.log("工具栏:"+instance);
}, // },
}, // },
}, // },
{ // {
// 鹰眼 // // 鹰眼
pName: "OverView", // pName: "OverView",
events: { // events: {
init(instance) { // init(instance) {
//console.log("鹰眼:"+instance); // //console.log("鹰眼:"+instance);
}, // },
}, // },
}, // },
{ {
// 地图类型 // 地图类型
pName: "MapType", pName: "MapType",
...@@ -366,6 +369,14 @@ export default { ...@@ -366,6 +369,14 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.tuli{
width: 300px;
top: 20px;
left: 34px;
position: absolute;
float: left;
background-color:rgba(255, 255, 255, 0.7);
}
.amap-info-content { .amap-info-content {
position: relative; position: relative;
background: #fff; background: #fff;
......
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
<el-col :span="6" :xs="12" class="mytree"> <el-col :span="6" :xs="12" class="mytree">
<el-card> <el-card>
<div slot="header"> <div slot="header">
<span style="font-size: 13px">站点分布</span> <span
><b class="cardTitle">站点分布</b></span
>
<el-button <el-button
style="float: right; padding: 3px 0" style="float: right; "
@click="switchStat" @click="switchStat"
type="text" type="text"
>切换为地图模式</el-button >切换为地图模式</el-button
...@@ -143,7 +145,7 @@ export default { ...@@ -143,7 +145,7 @@ export default {
if (node.id.search(",")) { if (node.id.search(",")) {
//this.query = { siteId: node.id.split(",")[0] ,siteIdList:node.id.split(",")}; //this.query = { siteId: node.id.split(",")[0] ,siteIdList:node.id.split(",")};
this.query = {siteIdList:node.id.split(",")}; this.query = { siteIdList: node.id.split(",") };
} else { } else {
this.query = { siteId: node.id }; this.query = { siteId: node.id };
} }
...@@ -224,6 +226,13 @@ export default { ...@@ -224,6 +226,13 @@ export default {
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.cardTitle {
font-size: 16px;
color: rgb(20, 134, 248);
list-style-type: none;
border-bottom: 3px solid rgb(20, 134, 248);
padding-bottom: 2px;
}
.mytree ::v-deep { .mytree ::v-deep {
.el-tree--highlight-current .el-tree--highlight-current
::v-deep ::v-deep
......
<template> <template>
<div class="page"> <div class="page">
<el-row :gutter="20">
<el-col :span="6" :xs="12" class="mytree">
<Map ref="map" :markersData="originData" @choose="getDetailData" > <el-row :gutter="20" slot="leftTop">
<el-card> <el-card>
<div slot="header"> <div slot="header">
<span style="font-size: 13px">站点分布</span> <span><b class="cardTitle">站点分布</b></span>
<el-button <el-button
style="float: right; padding: 3px 0" style="float: right;"
@click="switchStat" @click="switchStat"
type="text" type="text"
>切换为列表模式</el-button >切换为列表模式</el-button
...@@ -32,12 +35,8 @@ ...@@ -32,12 +35,8 @@
</el-tree> </el-tree>
</el-scrollbar> </el-scrollbar>
</el-card> </el-card>
</el-col>
<el-col :span="18" :xs="12"> </el-row></Map>
<Map ref="map" :markersData="originData" @choose="getDetailData" />
</el-col>
</el-row>
<dialog-show ref="dialogform" @ok="getData" /> <dialog-show ref="dialogform" @ok="getData" />
</div> </div>
...@@ -236,6 +235,13 @@ export default { ...@@ -236,6 +235,13 @@ export default {
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
.cardTitle {
font-size: 16px;
color: rgb(20, 134, 248);
list-style-type: none;
border-bottom: 3px solid rgb(20, 134, 248);
padding-bottom: 2px;
}
.mytree ::v-deep { .mytree ::v-deep {
.el-tree--highlight-current .el-tree--highlight-current
::v-deep ::v-deep
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment