管道基础大数据平台系统开发-【前端】-新系統界面
surprise
2024-02-05 c215c89ecda16e4d32593f3e942fe871898071e9
src/views/PackageTwo/WareInspection.vue
@@ -56,8 +56,6 @@
    },
    showChangeIfream(res) {
      //
      console.log(res)
      if (this.$store.state.themeflag == true) {
        if (res.indexOf('theme=white') != -1) {
          res = res.replace('theme=white', 'theme=dark');
@@ -77,11 +75,12 @@
          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();
      }
@@ -91,6 +90,7 @@
      this.url = res
      // sessionStorage.setItem('routerName', this.reportUrl)
      console.log("2", this.reportUrl)
      // window.addEventListener("message", this.handleMessage, false);
    },
    setLiClick(res, index) {
@@ -119,20 +119,27 @@
        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'))