2022-08-08 19:02:56 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<!-- CIM -->
|
|
|
|
|
|
<div class="container">
|
2022-08-22 15:49:34 +08:00
|
|
|
|
<div class="charts">
|
|
|
|
|
|
<BimCoordination />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="bim">
|
|
|
|
|
|
<iframe src="/bim.html" frameborder="0" width="100%" height="100%" id="iframe" @load="load"></iframe>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- <div class="leftBox">
|
2022-08-08 19:02:56 +08:00
|
|
|
|
<div class="leftTop">
|
|
|
|
|
|
<leftTop title="模型" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="leftCenter">
|
|
|
|
|
|
<leftCenter title="模型审报" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="centerBox">
|
2022-08-17 11:14:38 +08:00
|
|
|
|
<iframe src="/bim.html" frameborder="0" width="100%" height="100%" id="iframe" @load="load"></iframe>
|
2022-08-08 19:02:56 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="rightBox">
|
|
|
|
|
|
<div class="rightTop">
|
|
|
|
|
|
<rightTop title="BIM预留接口" />
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="rightCenter">
|
|
|
|
|
|
<rightCenter title="设计变更" />
|
|
|
|
|
|
</div>
|
2022-08-22 15:49:34 +08:00
|
|
|
|
</div> -->
|
2022-08-08 19:02:56 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2022-08-22 15:49:34 +08:00
|
|
|
|
// import leftTop from './leftTop'
|
|
|
|
|
|
// import leftCenter from './leftCenter'
|
|
|
|
|
|
// import rightTop from './rightTop'
|
|
|
|
|
|
// import rightCenter from './rightCenter'
|
|
|
|
|
|
import BimCoordination from './BimCoordination'
|
2022-08-16 18:50:58 +08:00
|
|
|
|
|
2022-08-17 15:04:33 +08:00
|
|
|
|
import { projectJlwBimListApi, getJlwTokenApi } from '@/assets/js/api/project'
|
2022-08-08 19:02:56 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
components: {
|
2022-08-22 15:49:34 +08:00
|
|
|
|
// leftTop,
|
|
|
|
|
|
// leftCenter,
|
|
|
|
|
|
// rightTop,
|
|
|
|
|
|
// rightCenter
|
|
|
|
|
|
BimCoordination
|
2022-08-17 11:14:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
this.iframe = document.getElementById('iframe')
|
|
|
|
|
|
window.addEventListener('message', this.getIframeMessage)
|
2022-08-17 15:04:33 +08:00
|
|
|
|
this.getModelList()
|
2022-08-17 11:14:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
iframe: null
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
load() {
|
|
|
|
|
|
this.iframe.contentWindow.postMessage('Message from parent:load complate!')
|
|
|
|
|
|
},
|
|
|
|
|
|
getIframeMessage(e) {
|
2022-08-17 15:04:33 +08:00
|
|
|
|
// console.log('Message from iframe:', e.data)
|
|
|
|
|
|
},
|
|
|
|
|
|
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
|
2022-08-17 15:12:38 +08:00
|
|
|
|
this.iframe.contentWindow.postMessage({ token })
|
2022-08-17 15:04:33 +08:00
|
|
|
|
})
|
2022-08-17 11:14:38 +08:00
|
|
|
|
}
|
2022-08-08 19:02:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
|
.container {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
2022-08-22 15:49:34 +08:00
|
|
|
|
.charts {
|
|
|
|
|
|
width: 420px;
|
2022-08-08 19:02:56 +08:00
|
|
|
|
}
|
2022-08-22 15:49:34 +08:00
|
|
|
|
.bim {
|
|
|
|
|
|
padding: 8px;
|
|
|
|
|
|
width: calc(100% - 440px);
|
|
|
|
|
|
height: 100%;
|
2022-08-08 19:02:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-08-22 15:49:34 +08:00
|
|
|
|
// .container {
|
|
|
|
|
|
// position: relative;
|
|
|
|
|
|
// display: flex;
|
|
|
|
|
|
// justify-content: space-between;
|
|
|
|
|
|
// width: 100%;
|
|
|
|
|
|
// height: 100%;
|
|
|
|
|
|
// background-color: #07162b;
|
|
|
|
|
|
// background-image: url('~@/assets/images/projectImg/Bimbgc.png');
|
|
|
|
|
|
// }
|
|
|
|
|
|
// .topBox {
|
|
|
|
|
|
// height: 20%;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// .leftBox {
|
|
|
|
|
|
// position: relative;
|
|
|
|
|
|
// width: 25%;
|
|
|
|
|
|
// height: 100%;
|
|
|
|
|
|
// margin-right: 15px;
|
|
|
|
|
|
// margin-left: 15px;
|
|
|
|
|
|
// .leftTop {
|
|
|
|
|
|
// height: 33%;
|
|
|
|
|
|
// margin-bottom: 15px;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// .leftCenter {
|
|
|
|
|
|
// height: 33%;
|
|
|
|
|
|
// margin-bottom: 15px;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// .leftBottom {
|
|
|
|
|
|
// height: 33%;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// z-index: 2;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// .centerBox {
|
|
|
|
|
|
// position: absolute;
|
|
|
|
|
|
// margin-right: 15px;
|
|
|
|
|
|
// padding-left: 6px;
|
|
|
|
|
|
// width: 100%;
|
|
|
|
|
|
// height: 100%;
|
|
|
|
|
|
// line-height: 30px;
|
|
|
|
|
|
// font-size: 18px;
|
|
|
|
|
|
// color: #6ee4f0;
|
|
|
|
|
|
// }
|
2022-08-08 19:02:56 +08:00
|
|
|
|
|
2022-08-22 15:49:34 +08:00
|
|
|
|
// .rightBox {
|
|
|
|
|
|
// position: relative;
|
|
|
|
|
|
// width: 25%;
|
|
|
|
|
|
// height: 100%;
|
|
|
|
|
|
// .rightTop {
|
|
|
|
|
|
// height: 33%;
|
|
|
|
|
|
// margin-bottom: 15px;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// .rightCenter {
|
|
|
|
|
|
// height: 33%;
|
|
|
|
|
|
// margin-bottom: 15px;
|
|
|
|
|
|
// }
|
|
|
|
|
|
// z-index: 2;
|
|
|
|
|
|
// }
|
2022-08-08 19:02:56 +08:00
|
|
|
|
</style>
|