金林湾(指挥中心):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') {
|
||||
let host = window.location.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 = 'http://zhgd.loganwy.com/'
|
||||
}
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
>入场码:{{$store.state.currentProDetail.placeCode}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex2" style="margin-top:20px">
|
||||
<!-- <div class="flex2" style="margin-top:20px">
|
||||
客服电话:{{$store.state.userInfo.customerServicePhone}}
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="flex2 wrap" v-if="$store.state.userInfo.accountType != 1">
|
||||
<!-- <div class="width_100">
|
||||
<img src="@/assets/images/sjzx.png" width="15px" height="15px" />
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<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 class="leftBox">
|
||||
<div class="leftTop">
|
||||
@ -56,13 +56,15 @@ export default {
|
||||
Model
|
||||
},
|
||||
mounted() {
|
||||
this.url = window.location.origin + '/bim.html',
|
||||
this.iframe = document.getElementById('iframe')
|
||||
window.addEventListener('message', this.getIframeMessage)
|
||||
this.getModelList()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
iframe: null
|
||||
iframe: null,
|
||||
url:'',
|
||||
}
|
||||
},
|
||||
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>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
@ -12,8 +12,8 @@ export default {}
|
||||
.monitor {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// background: url(../assets/temp/8.png) no-repeat;
|
||||
// background-size: 100% 100%;
|
||||
background: url(../assets/temp/8.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<Card title="数字质控">
|
||||
<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>
|
||||
</Card>
|
||||
</template>
|
||||
@ -47,5 +47,8 @@ export default {
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-image: url(../assets/images/common/bgc_bim.png);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 110%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,30 +1,33 @@
|
||||
<template>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getJlwTokenApi } from "@/assets/js/api/project";
|
||||
import { getJlwTokenApi,projectJlwBimListApi } from "@/assets/js/api/project";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
token: "",
|
||||
model:1,
|
||||
url:'',
|
||||
iframe:null,
|
||||
};
|
||||
},
|
||||
props: {
|
||||
fileId: {
|
||||
default: ""
|
||||
default: "10000757034823"
|
||||
}
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.url = window.location.origin + '/bim.html',
|
||||
this.iframe = document.getElementById('iframe')
|
||||
window.addEventListener('message', this.getIframeMessage)
|
||||
this.getToken()
|
||||
this.getModelList()
|
||||
},
|
||||
watch: {
|
||||
fileId: {
|
||||
@ -37,8 +40,7 @@ export default {
|
||||
// this.iframe = document.getElementById('iframe')
|
||||
this.load()
|
||||
window.addEventListener('message', this.getIframeMessage)
|
||||
this.getToken();
|
||||
this.reload();
|
||||
this.getModelList();
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -52,21 +54,37 @@ export default {
|
||||
getIframeMessage(e) {
|
||||
// console.log('Message from iframe:', e.data)
|
||||
},
|
||||
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})
|
||||
getModelList() {
|
||||
projectJlwBimListApi({ projectSn: this.$store.state.projectSn }).then(res => {
|
||||
this.buildList = res.result.page.records
|
||||
res.result.page.records.forEach(item => {
|
||||
if (item.isEnable) {
|
||||
this.getToken(item.fileId)
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
},
|
||||
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>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user