<!--入库质检--->
|
<template>
|
<div class="wareBox">
|
<iframe
|
style="border:none"
|
width="100%"
|
height="100%"
|
v-bind:src="reportUrl"
|
></iframe>
|
</div>
|
</template>
|
|
<script>
|
import { getToken } from "@/utils/auth";
|
export default {
|
data() {
|
return {
|
reportUrl: ''
|
}
|
},
|
methods: {
|
showChangeIfream(res) {
|
|
if (res.indexOf('{host}') != -1) {
|
|
res = res.replace('{host}',ipConfig )
|
}
|
if (res.indexOf('token=') != -1) {
|
res = res + getToken();
|
}
|
|
this.$store.state.reporturl = res;
|
this.reportUrl = res;
|
// console.log("2", this.reportUrl)
|
}
|
},
|
mounted() {
|
this.showChangeIfream(this.$store.reporturl)
|
// console.log("1", this.reportUrl)
|
this.$bus.$on('changeNaveUrl', (res) => {
|
this.showChangeIfream(res)
|
});
|
}
|
|
}
|
</script>
|
|
<style lang="less" scoped>
|
.wareBox {
|
width: 100%;
|
height: 100%;
|
margin: 0;
|
padding: 0;
|
overflow: hidden;
|
background: #303030;
|
}
|
</style>
|