|
@ -58,11 +58,11 @@ |
|
|
</li> |
|
|
</li> |
|
|
</ul> |
|
|
</ul> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<div class="warehouse-right"> |
|
|
<div class="warehouse-right"> |
|
|
<!-- 报警记录 --> |
|
|
<!-- 报警记录 --> |
|
|
<div class="container-wrap" style="margin-bottom:20px"> |
|
|
|
|
|
|
|
|
<warehouse-warning :height="'calc(100% - 40px)'" /> |
|
|
|
|
|
<!-- <div class="container-wrap" style="margin-bottom:20px"> |
|
|
<span class="right-top-line" /> |
|
|
<span class="right-top-line" /> |
|
|
<span class="left-bottom-line" /> |
|
|
<span class="left-bottom-line" /> |
|
|
<h3 class="table-title"> |
|
|
<h3 class="table-title"> |
|
@ -80,7 +80,7 @@ |
|
|
<el-table-column prop="warehouse" label="库房" align="center" min-width="60" /> |
|
|
<el-table-column prop="warehouse" label="库房" align="center" min-width="60" /> |
|
|
<el-table-column prop="warning" label="警情" align="center" :show-overflow-tooltip="true" min-width="85" /> |
|
|
<el-table-column prop="warning" label="警情" align="center" :show-overflow-tooltip="true" min-width="85" /> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> --> |
|
|
<!-- 门禁记录 --> |
|
|
<!-- 门禁记录 --> |
|
|
<div class="container-wrap"> |
|
|
<div class="container-wrap"> |
|
|
<span class="right-top-line" /> |
|
|
<span class="right-top-line" /> |
|
@ -107,8 +107,10 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import data1 from '../data1.json' |
|
|
import data1 from '../data1.json' |
|
|
|
|
|
import WarehouseWarning from '@/views/components/WarehouseWarning' |
|
|
export default { |
|
|
export default { |
|
|
name: 'FullView', |
|
|
name: 'FullView', |
|
|
|
|
|
components: { WarehouseWarning }, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
tableData: [], |
|
|
tableData: [], |
|
@ -117,9 +119,6 @@ export default { |
|
|
isScroll: false // 是否滚动 |
|
|
isScroll: false // 是否滚动 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
|
|
|
this.getData() |
|
|
|
|
|
}, |
|
|
|
|
|
mounted() { |
|
|
mounted() { |
|
|
const _this = this |
|
|
const _this = this |
|
|
this.iframeWin = this.$refs.myIframe.contentWindow |
|
|
this.iframeWin = this.$refs.myIframe.contentWindow |
|
@ -128,9 +127,9 @@ export default { |
|
|
_this.deviceState() |
|
|
_this.deviceState() |
|
|
} |
|
|
} |
|
|
window.addEventListener('message', this.handleMessageDevice) |
|
|
window.addEventListener('message', this.handleMessageDevice) |
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.tableRefScroll() |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// this.$nextTick(() => { |
|
|
|
|
|
// this.tableRefScroll() |
|
|
|
|
|
// }) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 传入设备状态data / 给iframe传初始值 |
|
|
// 传入设备状态data / 给iframe传初始值 |
|
@ -194,44 +193,44 @@ export default { |
|
|
} else { |
|
|
} else { |
|
|
return '' |
|
|
return '' |
|
|
} |
|
|
} |
|
|
}, |
|
|
|
|
|
// table滚动 |
|
|
|
|
|
tableRefScroll() { |
|
|
|
|
|
clearInterval(this.timer) // 清除定时器 |
|
|
|
|
|
const table = this.$refs.table // 获取DOM元素 |
|
|
|
|
|
const bodyWrapper = table.bodyWrapper // 获取表格中承载数据的div元素 |
|
|
|
|
|
this.addTableRefScroll(bodyWrapper) |
|
|
|
|
|
// 鼠标移入 |
|
|
|
|
|
bodyWrapper.onmouseover = () => { |
|
|
|
|
|
clearInterval(this.timer) |
|
|
|
|
|
} |
|
|
|
|
|
// 鼠标移出 |
|
|
|
|
|
bodyWrapper.onmouseout = () => { |
|
|
|
|
|
this.addTableRefScroll(bodyWrapper) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
addTableRefScroll(bodyWrapper) { |
|
|
|
|
|
let scrollTop = bodyWrapper.scrollTop |
|
|
|
|
|
this.timer = setInterval(() => { |
|
|
|
|
|
scrollTop = bodyWrapper.scrollTop |
|
|
|
|
|
bodyWrapper.scrollTop += 5 |
|
|
|
|
|
if (scrollTop === bodyWrapper.scrollTop) { |
|
|
|
|
|
if (this.isScroll) { |
|
|
|
|
|
scrollTop = 0 |
|
|
|
|
|
bodyWrapper.scrollTop = 0 |
|
|
|
|
|
} else { |
|
|
|
|
|
if (this.flag === 1) { |
|
|
|
|
|
this.currentPage++ |
|
|
|
|
|
this.handleSearch() // 函数中需要清楚定时器 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, 100) |
|
|
|
|
|
}, |
|
|
|
|
|
handleSearch() { |
|
|
|
|
|
// 清楚定时器 |
|
|
|
|
|
clearInterval(this.timer) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
// table滚动 |
|
|
|
|
|
// tableRefScroll() { |
|
|
|
|
|
// clearInterval(this.timer) // 清除定时器 |
|
|
|
|
|
// const table = this.$refs.table // 获取DOM元素 |
|
|
|
|
|
// const bodyWrapper = table.bodyWrapper // 获取表格中承载数据的div元素 |
|
|
|
|
|
// this.addTableRefScroll(bodyWrapper) |
|
|
|
|
|
// // 鼠标移入 |
|
|
|
|
|
// bodyWrapper.onmouseover = () => { |
|
|
|
|
|
// clearInterval(this.timer) |
|
|
|
|
|
// } |
|
|
|
|
|
// // 鼠标移出 |
|
|
|
|
|
// bodyWrapper.onmouseout = () => { |
|
|
|
|
|
// this.addTableRefScroll(bodyWrapper) |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
// addTableRefScroll(bodyWrapper) { |
|
|
|
|
|
// let scrollTop = bodyWrapper.scrollTop |
|
|
|
|
|
// this.timer = setInterval(() => { |
|
|
|
|
|
// scrollTop = bodyWrapper.scrollTop |
|
|
|
|
|
// bodyWrapper.scrollTop += 5 |
|
|
|
|
|
// if (scrollTop === bodyWrapper.scrollTop) { |
|
|
|
|
|
// if (this.isScroll) { |
|
|
|
|
|
// scrollTop = 0 |
|
|
|
|
|
// bodyWrapper.scrollTop = 0 |
|
|
|
|
|
// } else { |
|
|
|
|
|
// if (this.flag === 1) { |
|
|
|
|
|
// this.currentPage++ |
|
|
|
|
|
// this.handleSearch() // 函数中需要清楚定时器 |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// }, 100) |
|
|
|
|
|
// }, |
|
|
|
|
|
// handleSearch() { |
|
|
|
|
|
// // 清楚定时器 |
|
|
|
|
|
// clearInterval(this.timer) |
|
|
|
|
|
// } |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
@ -246,5 +245,7 @@ export default { |
|
|
height: calc(100%/2 - 10px); |
|
|
height: calc(100%/2 - 10px); |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.container-wrap{ |
|
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |