Browse Source

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

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

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

@ -3,15 +3,7 @@
<!-- <h1>全景图</h1> --> <!-- <h1>全景图</h1> -->
<div class="warehouse-left"> <div class="warehouse-left">
<div class="left-3d"> <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>
</div> </div>
<warehouse-warning :height="'calc(100vh - 235px)'" /> <warehouse-warning :height="'calc(100vh - 235px)'" />
@ -20,32 +12,54 @@
<script> <script>
import WarehouseWarning from '@/views/components/WarehouseWarning' import WarehouseWarning from '@/views/components/WarehouseWarning'
import storeroomApi from '@/api/storeManage/deviceManage/storeroom'
import displayConfigApi from '@/api/storeManage/displayConfig'
export default { export default {
name: 'ReadRoom', name: 'ReadRoom',
components: { WarehouseWarning }, components: { WarehouseWarning },
data() { data() {
return { return {
tableData: []
tableData: [],
roomId: '',
displayConfigData: []
} }
}, },
created() {
async created() {
window.getIframeLoading = this.getIframeLoading // vuewindow 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() { mounted() {
const _this = this
// const _this = this
this.iframeWin = this.$refs.myIframe.contentWindow this.iframeWin = this.$refs.myIframe.contentWindow
// inframe // inframe
document.getElementById('myIframe').onload = function() {
_this.deviceState()
}
// document.getElementById('myIframe').onload = function() {
// _this.deviceState()
// }
// window.addEventListener('message', this.handleMessageDevice) // window.addEventListener('message', this.handleMessageDevice)
}, },
methods: { methods: {
// //
getIframeLoading(value) { getIframeLoading(value) {
// console.log(`iframe${value}`) // console.log(`iframe${value}`)
// if (value === 'false') {
// this.handleHide(element.divPosition)
// }
// this.deviceState()
if (value === 'false') { 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 // data / iframe
@ -78,10 +92,10 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import '~@/assets/styles/lend-manage.scss';
.warehouse-left{
@import "~@/assets/styles/lend-manage.scss";
.warehouse-left {
position: relative; position: relative;
h2{
h2 {
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 0; top: 0;
@ -89,5 +103,5 @@ export default {
color: #fff; color: #fff;
font-size: 16px; font-size: 16px;
} }
}
}
</style> </style>
Loading…
Cancel
Save