You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
LiaoNingDangAn/src/views/productsMsg/components/productInfo.vue

55 lines
1.7 KiB

2 years ago
<template>
<div class="ifram-view" :style="iframViewStyle">
<!-- <span>!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</span> -->
2 years ago
<!-- <iframe src="https://dev-mssm-liaoning.imian.org.cn/ggfw/#/firmContent/drugInfo" frameborder="0" style="width: 100%;height: 100%;"></iframe> -->
2 years ago
<iframe
2 years ago
:src="url"
2 years ago
frameborder="0"
style="width: 100%; height: 100%"
ref="iframes"
2 years ago
></iframe>
2 years ago
</div>
</template>
<script>
export default {
data() {
return {
2 years ago
iframViewStyle: {
height: "",
},
2 years ago
url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation?type=${
2 years ago
this.$route.query.type
}&flag=${this.$route.query.flag}&data=${
this.$route.query.data
2 years ago
}&token=${localStorage.getItem("MSSM-LIAONING__TOKEN")}`,
// url: `https://dev-mssm-liaoning.imian.org.cn/ggfw-iframe/#/productinformation`
// url: `http://localhost:81?type=${this.$route.query.type}&flag=${
// this.$route.query.flagyppzwh
// }&data=${this.$route.query.data}&token=${localStorage.getItem(
// "MSSM-LIAONING__TOKEN"
// )}`,
2 years ago
};
2 years ago
},
2 years ago
methods: {},
2 years ago
created() {
2 years ago
this.$nextTick(() => {});
2 years ago
},
methods: {},
2 years ago
mounted() {
2 years ago
this.$nextTick(() => {
let dom = document.getElementsByClassName("ifram-view");
2 years ago
let height = dom[0].getBoundingClientRect();
// let windowWidth = window.innerWidth;
let windowHeight = window.innerHeight;
2 years ago
let relativeHeight = windowHeight - height.top;
this.iframViewStyle.height = relativeHeight + "px";
});
2 years ago
},
2 years ago
};
2 years ago
</script>
<style lang="scss" scoped>
.ifram-view {
background-color: #fff;
}
</style>