Commit 5d80911e authored by 高超凡's avatar 高超凡

提交

parent cfcf85b5
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<div v-show="transformationSta==1"> <div v-show="transformationSta==1">
<el-row style="padding-bottom:15px;height:780px;background:#fff;" :span="24"> <el-row style="padding-bottom:15px;height:780px;background:#fff;" :span="24">
<el-col class="resource-container" :style="obj" ref="drag"> <el-col class="resource-container" :style="obj" ref="drag">
<div id="map" class="map" ref='map' style="width: 100%;height: 720px;position:relative;" ></div> <div id="map" class="map" ref='map' style="width: 100%;height: 720px;position:relative;" @click='closeDetails'></div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
//- </div> //- </div>
</el-card> </el-card>
</el-main> </el-main>
<query-detail v-if='queryDetailVisible' ref='queryDetail' @closeQ="closeQueryDetailVisible" @click.stop></query-detail> <query-detail v-if='queryDetailVisible' ref='queryDetail' @closeQ="closeQueryDetailVisible"></query-detail>
</el-container> </el-container>
</div> </div>
...@@ -172,7 +172,8 @@ export default { ...@@ -172,7 +172,8 @@ export default {
vectorLayer: [], vectorLayer: [],
lineVectorLayer: [], lineVectorLayer: [],
resolutions: [], resolutions: [],
code: '' code: '',
times: 1,
} }
}, },
components: { components: {
...@@ -187,11 +188,16 @@ export default { ...@@ -187,11 +188,16 @@ export default {
that = this that = this
this.initTreeStationMap() this.initTreeStationMap()
this.initResourceTypeDicList() this.initResourceTypeDicList()
},
mounted(){
}, },
methods: { methods: {
// 点击空白位置关闭详情框
closeDetails(){
if(this.queryDetailVisible && this.times > 1){
this.queryDetailVisible = false
this.times = 0
}
this.times++
},
// 初始化地图 // 初始化地图
initMap(url) { initMap(url) {
this.resolutions = [] this.resolutions = []
...@@ -386,14 +392,12 @@ export default { ...@@ -386,14 +392,12 @@ export default {
text: new Text({ text: new Text({
text: name, // 添加文字描述 text: name, // 添加文字描述
font: 'bold 14px font-size', // 设置字体大小 font: 'bold 14px font-size', // 设置字体大小
// padding: 'left', stroke: new Stroke({ color: 'white', width: 5 }), //设置文字背景
fill: new Fill({ fill: new Fill({
// 设置字体颜色 // 设置字体颜色
color: 'black', color: 'blue'
// font:'normal bold 18px sans-serif'
}), }),
offsetY: 30, // 设置文字偏移量 offsetY: 30 // 设置文字偏移量
// offsetX: 10 // 设置文字偏移量
}) })
}) })
return style return style
...@@ -955,10 +959,6 @@ export default { ...@@ -955,10 +959,6 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.queryDetail.init(id, this.checkedData.sId) this.$refs.queryDetail.init(id, this.checkedData.sId)
}) })
document.querySelector('canvas').addEventListener('click',()=>{
console.log('触发');
this.queryDetailVisible = false;
},false);
}, },
closeQueryDetailVisible() { closeQueryDetailVisible() {
......
<template lang="pug"> <template lang="pug">
.animation(close-on-click-modal) .animation
.info-title .info-title
| {{ dataForm.name }} | {{ dataForm.name }}
//- | 空调 //- | 空调
......
...@@ -489,10 +489,11 @@ export default { ...@@ -489,10 +489,11 @@ export default {
}), }),
text: new Text({ text: new Text({
text: name, // 添加文字描述 text: name, // 添加文字描述
font: '14px font-size', // 设置字体大小 font: 'bold 14px font-size', // 设置字体大小
stroke: new Stroke({ color: 'white', width: 5 }), //设置文字背景
fill: new Fill({ fill: new Fill({
// 设置字体颜色 // 设置字体颜色
color: 'black' color: 'blue'
}), }),
offsetY: 30 // 设置文字偏移量 offsetY: 30 // 设置文字偏移量
}) })
......
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