Commit c7596845 authored by co_dengxiongwen's avatar co_dengxiongwen

tj

parent ea6a6ff1
...@@ -13,6 +13,3 @@ CONFIG.requestPath = 'http://59.110.43.122:8046' ...@@ -13,6 +13,3 @@ CONFIG.requestPath = 'http://59.110.43.122:8046'
// 文件上传 // 文件上传
// CONFIG.urlPath = 'http://10.20.72.33/' // CONFIG.urlPath = 'http://10.20.72.33/'
CONFIG.urlPath = 'http://59.110.43.122/' CONFIG.urlPath = 'http://59.110.43.122/'
// BIM
CONFIG.bimPath = 'http://10.20.2.98:8066/'
...@@ -151,7 +151,6 @@ export default { ...@@ -151,7 +151,6 @@ export default {
urlPath: window.CONFIG.urlPath, urlPath: window.CONFIG.urlPath,
tipList: [], tipList: [],
showList: [], showList: [],
src: window.CONFIG.bimPath,
takeoverInfo: '' takeoverInfo: ''
} }
}, },
......
<template>
<div v-if='isShow' class="map_right">
<iframe :src="src" ref="iframe"></iframe>
</div>
</template>
<script>
import { mapState, mapGetters, mapActions } from 'vuex'
export default {
data() {
return {
code:'',
src: window.CONFIG.bimPath,
}
},
computed: {
...mapState('d2admin/bjCode', ['resourceCode']),
...mapState('d2admin/bim', ['isShow'])
},
watch: {
resourceCode(val) {
console.log('resourceCode:', val)
if (this.transformationSta == 2) {
this.sendBjMessage(val.substring(0, val.indexOf('+')))
}
}
},
mounted() {
this.code = this.resourceCode
console.log(this.isShow,'111111111111')
// this.sendMessage()
},
methods: {
sendMessage(code) {
console.log(111)
setTimeout(() => {
if (!this.$refs.iframe) {
return
}
this.$refs.iframe.contentWindow.postMessage(
{
func: 'locateByCode',
data: {
code: code
}
},
this.src
)
}, 1000)
},
sendBjMessage(code) {
console.log('********' + code)
setTimeout(() => {
if (!this.$refs.iframe) {
return
}
this.$refs.iframe.contentWindow.postMessage({
func: 'alarm',
data: {
code: code
}
}, this.src)
}, 1000)
},
},
}
</script>
<style lang="scss" scoped>
iframe {
width: 1580px;
height: 770px;
position:absolute;
top:50px;
right:0;
z-index:99;
}
</style>
\ No newline at end of file
...@@ -164,7 +164,6 @@ export default { ...@@ -164,7 +164,6 @@ export default {
editable: false, editable: false,
activeName: '1', activeName: '1',
searchInput: '', searchInput: '',
src: window.CONFIG.bimPath,
regionMouse: { regionMouse: {
x: 0, x: 0,
y: 0, y: 0,
...@@ -281,12 +280,13 @@ export default { ...@@ -281,12 +280,13 @@ export default {
//点击事件 //点击事件
this.changeVectorLayer(this.list) this.changeVectorLayer(this.list)
this.map.on('click', function(evt) { this.map.on('click', function (evt) {
let feature = evt.map.forEachFeatureAtPixel(evt.pixel, function( let feature = evt.map.forEachFeatureAtPixel(
feature evt.pixel,
) { function (feature) {
return feature return feature
}) }
)
if (feature) { if (feature) {
for (let i in that.list) { for (let i in that.list) {
let style = that.getPointStyle( let style = that.getPointStyle(
......
...@@ -163,7 +163,6 @@ export default { ...@@ -163,7 +163,6 @@ export default {
editable: false, editable: false,
activeName: '1', activeName: '1',
searchInput: '', searchInput: '',
src: window.CONFIG.bimPath,
regionMouse: { regionMouse: {
x: 0, x: 0,
y: 0, y: 0,
...@@ -280,12 +279,13 @@ export default { ...@@ -280,12 +279,13 @@ export default {
//点击事件 //点击事件
this.changeVectorLayer(this.list) this.changeVectorLayer(this.list)
this.map.on('click', function(evt) { this.map.on('click', function (evt) {
let feature = evt.map.forEachFeatureAtPixel(evt.pixel, function( let feature = evt.map.forEachFeatureAtPixel(
feature evt.pixel,
) { function (feature) {
return feature return feature
}) }
)
if (feature) { if (feature) {
for (let i in that.list) { for (let i in that.list) {
let style = that.getPointStyle( let style = that.getPointStyle(
......
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