| | |
| | | |
| | | }, |
| | | showChangeIfream(res) { |
| | | // |
| | | console.log(res) |
| | | if (this.$store.state.themeflag == true) { |
| | | if (res.indexOf('theme=white') != -1) { |
| | | res = res.replace('theme=white', 'theme=dark'); |
| | |
| | | res = res.replace('lang=zh', 'lang=en'); |
| | | } |
| | | } |
| | | |
| | | if (res.indexOf('{fmeHost}') != -1) { |
| | | |
| | | res = res.replace('{fmeHost}', fmeHost) |
| | | } |
| | | |
| | | console.log("2", this.reportUrl) |
| | | if (res.indexOf('token=') != -1) { |
| | | res = res + getToken(); |
| | | } |
| | |
| | | this.url = res |
| | | // sessionStorage.setItem('routerName', this.reportUrl) |
| | | console.log("2", this.reportUrl) |
| | | // window.addEventListener("message", this.handleMessage, false); |
| | | }, |
| | | |
| | | setLiClick(res, index) { |
| | |
| | | Vue.set(this.listMenu, index, newItem); |
| | | } |
| | | }, |
| | | getFunc() { |
| | | console.log("closeMenuSecond") |
| | | this.$bus.$emit('closeMenuSecond', false) |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | // var iframe = document.getElementById('iframeContainer'); |
| | | // iframe.onload = function (res) { |
| | | |
| | | // const iframe = document.querySelector('#iframeContainer') |
| | | // // 处理兼容行问题 |
| | | // if (iframe.attachEvent) { |
| | | // iframe.attachEvent('onload', () => { |
| | | // // iframe加载完毕以后执行操作 |
| | | // this.getFunc() |
| | | // }) |
| | | // } else { |
| | | // iframe.onload = () => { |
| | | // // iframe加载完毕以后执行操作 |
| | | // this.getFunc() |
| | | // } |
| | | // } |
| | | |
| | | // $('#iframeContainer').click = function () { |
| | | // console.log('点击了iframe页面') |
| | | // // if (window.sessionStorage.getItem('xxxLastTime') !== null) { |
| | | // // window.sessionStorage.setItem('xxxLastTime', new Date().getTime()) |
| | | // // } |
| | | // }; |
| | | if (sessionStorage.getItem('routerName') === '/WareInspection') { |
| | | |
| | | this.showChangeIfream(sessionStorage.getItem('iframehttpurl')) |