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

提交

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