中建四局(质量管理):完成数字质控布局

This commit is contained in:
Jack 2022-08-27 15:11:53 +08:00
parent 2f803d09b5
commit 4826f79bd7

View File

@ -1,14 +1,51 @@
<template>
<Card title="数字质控">
数字质控
<div class="bim">
<iframe src="/bim.html" frameborder="0" width="100%" height="100%" id="iframe"></iframe>
</div>
</Card>
</template>
<script>
import { projectJlwBimListApi, getJlwTokenApi } from '@/assets/js/api/project'
import Card from '../components/Card.vue'
export default {
components: { Card }
components: { Card },
mounted() {
this.iframe = document.getElementById('iframe')
this.getModelList()
},
data() {
return {
iframe: null
}
},
methods: {
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 })
})
}
}
}
</script>
<style></style>
<style lang="less" scoped>
.bim {
box-sizing: border-box;
padding: 10px;
width: 100%;
height: 100%;
}
</style>