Browse Source

设置阅览室温度感应器是否可以弹出

master
z_yu 3 years ago
parent
commit
7ae230bfbc
  1. 68
      src/views/storeManage/warehouse3D/readRoom/index.vue

68
src/views/storeManage/warehouse3D/readRoom/index.vue

@ -3,15 +3,7 @@
<!-- <h1>全景图</h1> -->
<div class="warehouse-left">
<div class="left-3d">
<iframe
id="myIframe"
ref="myIframe"
name="iframeMap"
class="iframe_box"
src="/webC/index.html"
frameborder="0"
scrolling="no"
/>
<iframe id="myIframe" ref="myIframe" name="iframeMap" class="iframe_box" src="/webC/index.html" frameborder="0" scrolling="no" />
</div>
</div>
<warehouse-warning :height="'calc(100vh - 235px)'" />
@ -20,32 +12,54 @@
<script>
import WarehouseWarning from '@/views/components/WarehouseWarning'
import storeroomApi from '@/api/storeManage/deviceManage/storeroom'
import displayConfigApi from '@/api/storeManage/displayConfig'
export default {
name: 'ReadRoom',
components: { WarehouseWarning },
data() {
return {
tableData: []
tableData: [],
roomId: '',
displayConfigData: []
}
},
created() {
async created() {
window.getIframeLoading = this.getIframeLoading // vuewindow
const roomsData = await storeroomApi.getRooms()
this.roomId = roomsData[0].children.find((x) => { return x.name === '阅览室' }).id
if (this.roomId) {
this.displayConfigData = await displayConfigApi.list({ storeroomId: this.roomId })
}
},
mounted() {
const _this = this
// const _this = this
this.iframeWin = this.$refs.myIframe.contentWindow
// inframe
document.getElementById('myIframe').onload = function() {
_this.deviceState()
}
// document.getElementById('myIframe').onload = function() {
// _this.deviceState()
// }
// window.addEventListener('message', this.handleMessageDevice)
},
methods: {
//
getIframeLoading(value) {
// console.log(`iframe${value}`)
// if (value === 'false') {
// this.handleHide(element.divPosition)
// }
// this.deviceState()
if (value === 'false') {
this.handleHide('YLS_MO_OAO_001')
console.log(this.displayConfigData)
this.displayConfigData.forEach(element => {
if (element.divPosition.includes('OAO')) {
if (element.isDisplay) {
console.log(element.divPosition)
} else {
this.handleHide(element.divPosition)
}
}
})
}
},
// data / iframe
@ -78,16 +92,16 @@ export default {
</script>
<style lang="scss" scoped>
@import '~@/assets/styles/lend-manage.scss';
.warehouse-left{
position: relative;
h2{
position: absolute;
left: 50%;
top: 0;
transform: translateX(-50%);
color: #fff;
font-size: 16px;
}
@import "~@/assets/styles/lend-manage.scss";
.warehouse-left {
position: relative;
h2 {
position: absolute;
left: 50%;
top: 0;
transform: translateX(-50%);
color: #fff;
font-size: 16px;
}
}
</style>
Loading…
Cancel
Save