金林湾(指挥中心):bim接入修复
This commit is contained in:
parent
115b926135
commit
a6239989e2
@ -77,7 +77,7 @@ if (process.env.NODE_ENV == 'development') {
|
|||||||
} else if (process.env.NODE_ENV == 'production') {
|
} else if (process.env.NODE_ENV == 'production') {
|
||||||
let host = window.location.host
|
let host = window.location.host
|
||||||
axios.defaults.baseURL = window.location.protocol + '//' + host + '/'
|
axios.defaults.baseURL = window.location.protocol + '//' + host + '/'
|
||||||
// axios.defaults.baseURL ='http://192.168.34.125:6023/'
|
// axios.defaults.baseURL ='http://192.168.34.216:6023/'
|
||||||
// axios.defaults.baseURL = window.location.protocol + "//" + host.split(":")[0] + ":6023" + "/"
|
// axios.defaults.baseURL = window.location.protocol + "//" + host.split(":")[0] + ":6023" + "/"
|
||||||
// axios.defaults.baseURL = 'http://zhgd.loganwy.com/'
|
// axios.defaults.baseURL = 'http://zhgd.loganwy.com/'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,9 +21,9 @@
|
|||||||
>入场码:{{$store.state.currentProDetail.placeCode}}</p>
|
>入场码:{{$store.state.currentProDetail.placeCode}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex2" style="margin-top:20px">
|
<!-- <div class="flex2" style="margin-top:20px">
|
||||||
客服电话:{{$store.state.userInfo.customerServicePhone}}
|
客服电话:{{$store.state.userInfo.customerServicePhone}}
|
||||||
</div>
|
</div> -->
|
||||||
<div class="flex2 wrap" v-if="$store.state.userInfo.accountType != 1">
|
<div class="flex2 wrap" v-if="$store.state.userInfo.accountType != 1">
|
||||||
<!-- <div class="width_100">
|
<!-- <div class="width_100">
|
||||||
<img src="@/assets/images/sjzx.png" width="15px" height="15px" />
|
<img src="@/assets/images/sjzx.png" width="15px" height="15px" />
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bim">
|
<div class="bim">
|
||||||
<iframe src="/bim.html" frameborder="0" width="100%" height="100%" id="iframe" @load="load"></iframe>
|
<iframe :src="url" frameborder="0" width="100%" height="100%" id="iframe" @load="load"></iframe>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="leftBox">
|
<!-- <div class="leftBox">
|
||||||
<div class="leftTop">
|
<div class="leftTop">
|
||||||
@ -56,13 +56,15 @@ export default {
|
|||||||
Model
|
Model
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.url = window.location.origin + '/bim.html',
|
||||||
this.iframe = document.getElementById('iframe')
|
this.iframe = document.getElementById('iframe')
|
||||||
window.addEventListener('message', this.getIframeMessage)
|
window.addEventListener('message', this.getIframeMessage)
|
||||||
this.getModelList()
|
this.getModelList()
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
iframe: null
|
iframe: null,
|
||||||
|
url:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
BIN
src/views/projectAdmin/zjsj/assets/images/common/bgc_bim.png
Normal file
BIN
src/views/projectAdmin/zjsj/assets/images/common/bgc_bim.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 567 KiB |
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="monitor">
|
<div class="monitor">
|
||||||
<div class="video" v-for="i in 12" :key="i"></div>
|
<!-- <div class="video" v-for="i in 12" :key="i"></div> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -12,8 +12,8 @@ export default {}
|
|||||||
.monitor {
|
.monitor {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
// background: url(../assets/temp/8.png) no-repeat;
|
background: url(../assets/temp/8.png) no-repeat;
|
||||||
// background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<Card title="数字质控">
|
<Card title="数字质控">
|
||||||
<div class="bim">
|
<div class="bim">
|
||||||
<iframe src="/bim.html" frameborder="0" width="100%" height="100%" id="iframe"></iframe>
|
<!-- <iframe src="/bim.html" frameborder="0" width="100%" height="100%" id="iframe"></iframe> -->
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</template>
|
</template>
|
||||||
@ -47,5 +47,8 @@ export default {
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
background-image: url(../assets/images/common/bgc_bim.png);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: 110%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,30 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="fullHeight">
|
<div class="fullHeight">
|
||||||
<iframe src="/bim.html" frameborder="0" width="100%" height="100%" id="iframe" @load="load"></iframe>
|
<iframe :src="url" frameborder="0" width="100%" height="100%" id="iframe" @load="load"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getJlwTokenApi } from "@/assets/js/api/project";
|
import { getJlwTokenApi,projectJlwBimListApi } from "@/assets/js/api/project";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
token: "",
|
token: "",
|
||||||
model:1,
|
model:1,
|
||||||
|
url:'',
|
||||||
|
iframe:null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
fileId: {
|
fileId: {
|
||||||
default: ""
|
default: "10000757034823"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.url = window.location.origin + '/bim.html',
|
||||||
this.iframe = document.getElementById('iframe')
|
this.iframe = document.getElementById('iframe')
|
||||||
window.addEventListener('message', this.getIframeMessage)
|
window.addEventListener('message', this.getIframeMessage)
|
||||||
this.getToken()
|
this.getModelList()
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
fileId: {
|
fileId: {
|
||||||
@ -37,8 +40,7 @@ export default {
|
|||||||
// this.iframe = document.getElementById('iframe')
|
// this.iframe = document.getElementById('iframe')
|
||||||
this.load()
|
this.load()
|
||||||
window.addEventListener('message', this.getIframeMessage)
|
window.addEventListener('message', this.getIframeMessage)
|
||||||
this.getToken();
|
this.getModelList();
|
||||||
this.reload();
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -52,21 +54,37 @@ export default {
|
|||||||
getIframeMessage(e) {
|
getIframeMessage(e) {
|
||||||
// console.log('Message from iframe:', e.data)
|
// console.log('Message from iframe:', e.data)
|
||||||
},
|
},
|
||||||
getToken() {
|
getModelList() {
|
||||||
let data = {};
|
projectJlwBimListApi({ projectSn: this.$store.state.projectSn }).then(res => {
|
||||||
data.fileId = this.fileId;
|
this.buildList = res.result.page.records
|
||||||
console.log('----看一下这个id',this.fileId)
|
res.result.page.records.forEach(item => {
|
||||||
|
if (item.isEnable) {
|
||||||
data.projectSn = this.$store.state.projectSn;
|
this.getToken(item.fileId)
|
||||||
getJlwTokenApi(data).then(res => {
|
}
|
||||||
if (res.code == 200) {
|
})
|
||||||
console.log("token", res);
|
})
|
||||||
let token = res.result;
|
|
||||||
let modelId = this.fileId
|
|
||||||
this.iframe.contentWindow.postMessage({ token , modelId})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
getToken(fileId) {
|
||||||
|
getJlwTokenApi({ fileId, projectSn: this.$store.state.projectSn }).then(res => {
|
||||||
|
const token = res.result
|
||||||
|
this.iframe.contentWindow.postMessage({ token })
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// getToken() {
|
||||||
|
// let data = {};
|
||||||
|
// data.fileId = this.fileId;
|
||||||
|
// console.log('----看一下这个id',this.fileId)
|
||||||
|
|
||||||
|
// data.projectSn = this.$store.state.projectSn;
|
||||||
|
// getJlwTokenApi(data).then(res => {
|
||||||
|
// if (res.code == 200) {
|
||||||
|
// console.log("token", res);
|
||||||
|
// let token = res.result;
|
||||||
|
// let modelId = this.fileId
|
||||||
|
// this.iframe.contentWindow.postMessage({ token , modelId})
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// },
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user