2019-02-25 15:58:05 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
|
|
|
|
<iframe :id="id" :src="url" frameborder="0" width="100%" height="800px" scrolling="auto"></iframe>
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import PageLayout from '../page/PageLayout'
|
|
|
|
|
import RouteView from './RouteView'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "IframePageContent",
|
2019-10-18 18:37:41 +08:00
|
|
|
|
inject:['closeCurrent'],
|
2019-02-25 15:58:05 +08:00
|
|
|
|
data () {
|
|
|
|
|
return {
|
|
|
|
|
url: "",
|
|
|
|
|
id:""
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created () {
|
|
|
|
|
this.goUrl()
|
|
|
|
|
},
|
|
|
|
|
updated () {
|
|
|
|
|
this.goUrl()
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
$route(to, from) {
|
|
|
|
|
this.goUrl();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
goUrl () {
|
|
|
|
|
let url = this.$route.meta.url
|
|
|
|
|
let id = this.$route.path
|
|
|
|
|
this.id = id
|
|
|
|
|
//url = "http://www.baidu.com"
|
|
|
|
|
console.log("------url------"+url)
|
|
|
|
|
if (url !== null && url !== undefined) {
|
|
|
|
|
this.url = url;
|
2019-10-18 18:37:41 +08:00
|
|
|
|
/*update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
|
|
|
|
|
if(this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal==true){
|
|
|
|
|
this.closeCurrent();
|
|
|
|
|
window.open(this.url);
|
|
|
|
|
}
|
|
|
|
|
/*update_end author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
|
|
|
|
|
|
2019-02-25 15:58:05 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
</style>
|