|
|
|
|
@ -48,15 +48,30 @@
|
|
|
|
|
</el-scrollbar>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="$route.path === '/bookmanage'">
|
|
|
|
|
<div style="width: 100%; height: 100%;padding-top: 50px;overflow-x: hidden;">
|
|
|
|
|
<iframe
|
|
|
|
|
ref="bookIframe"
|
|
|
|
|
style="width: calc(100% + 12px); height: 100%;"
|
|
|
|
|
:src="bookUrl"
|
|
|
|
|
<div
|
|
|
|
|
style="width: 100%; height: 100%; padding-top: 50px; overflow-x: hidden"
|
|
|
|
|
>
|
|
|
|
|
<iframe ref="bookIframe" :src="bookUrl"
|
|
|
|
|
>你的浏览器不支持该iframe</iframe
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="$route.path === '/gdzc'">
|
|
|
|
|
<div
|
|
|
|
|
style="width: 100%; height: 100%; padding-top: 50px; overflow-x: hidden"
|
|
|
|
|
>
|
|
|
|
|
<iframe ref="gdzcIframe" :src="gdzcUrl"
|
|
|
|
|
>你的浏览器不支持该iframe</iframe
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else-if="$route.path === '/old'">
|
|
|
|
|
<div
|
|
|
|
|
style="width: 100%; height: 100%; padding-top: 50px; overflow-x: hidden"
|
|
|
|
|
>
|
|
|
|
|
<iframe ref="oldIframe">你的浏览器不支持该iframe</iframe>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
<sidebar class="sidebar-container" />
|
|
|
|
|
<div class="main-container">
|
|
|
|
|
@ -76,6 +91,7 @@ import { ossLogin } from "@/api/system/ossLogin";
|
|
|
|
|
import { Navbar, Sidebar, AppMain } from "./components";
|
|
|
|
|
import ResizeMixin from "./mixin/ResizeHandler";
|
|
|
|
|
import worker from "./components/worker/index.vue";
|
|
|
|
|
import axios from "axios";
|
|
|
|
|
export default {
|
|
|
|
|
name: "Layout",
|
|
|
|
|
components: {
|
|
|
|
|
@ -88,7 +104,9 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
active: 0,
|
|
|
|
|
bookUrl:process.env.VUE_APP_OUT_Book
|
|
|
|
|
bookUrl: process.env.VUE_APP_OUT_Book,
|
|
|
|
|
gdzcUrl: `${process.env.VUE_APP_OUT_GDZC}?id=${this.$store.state.user.userId}&username=${this.$store.state.user.username}`,
|
|
|
|
|
oldUrl: ``,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
@ -130,20 +148,34 @@ export default {
|
|
|
|
|
"$route.path": {
|
|
|
|
|
handler: function (url) {
|
|
|
|
|
if (url === "/bookmanage") {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.$refs["bookIframe"].contentWindow.postMessage(
|
|
|
|
|
{
|
|
|
|
|
key: "login",
|
|
|
|
|
data: {
|
|
|
|
|
id:this.$store.state.user.userId,
|
|
|
|
|
username:this.$store.state.user.username
|
|
|
|
|
},
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.$refs["bookIframe"].contentWindow.postMessage(
|
|
|
|
|
{
|
|
|
|
|
key: "login",
|
|
|
|
|
data: {
|
|
|
|
|
id: this.$store.state.user.userId,
|
|
|
|
|
username: this.$store.state.user.username,
|
|
|
|
|
},
|
|
|
|
|
"*"
|
|
|
|
|
);
|
|
|
|
|
},500)
|
|
|
|
|
},
|
|
|
|
|
"*"
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (url === "/old") {
|
|
|
|
|
axios
|
|
|
|
|
.get('/old', {
|
|
|
|
|
url:'/index.php',
|
|
|
|
|
params: {
|
|
|
|
|
s: "/login/oss_login",
|
|
|
|
|
id: this.$store.state.user.userId,
|
|
|
|
|
username: this.$store.state.user.username,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
.then((res) => {
|
|
|
|
|
this.oldUrl = `${process.env.VUE_APP_OUT_OLD}${res.data.data}`
|
|
|
|
|
this.$refs['oldIframe'].src = this.oldUrl
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
immediate: true,
|
|
|
|
|
@ -316,4 +348,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
iframe {
|
|
|
|
|
width: calc(100% + 12px);
|
|
|
|
|
height: 100%;
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|