管道基础大数据平台系统开发-【前端】-新系統界面
王旭
2023-05-10 7a0c7de021aebbef3ec137f2f94ff73ab41014d7
src/views/PackageTwo/WareInspection.vue
@@ -1,8 +1,11 @@
<!--入库质检--->
<template>
  <div class="wareBox">
  <div
    class="wareBox"
    id="wareBox"
  >
    <iframe
      id="ifream"
      id="iframeContainer"
      style="border:none"
      width="100%"
      height="100%"
@@ -10,7 +13,8 @@
    ></iframe>
  </div>
</template>
<script>
import { getToken } from "@/utils/auth";
export default {
@@ -38,15 +42,18 @@
    }
  },
  methods: {
    closeNaveMenu() {
      this.$bus.$emit('closeNaveMenu', true)
    },
    langreash(res) {
       this.$router.push('/QualityInspection')
      this.$router.push('/QualityInspection')
    },
    refreash(res) {
     this.$router.push('/QualityInspection')
      this.$router.push('/QualityInspection')
    },
    showChangeIfream(res) {
      // 
@@ -89,9 +96,9 @@
    setLiClick(res, index) {
      var timer = setTimeout(function () {
        if (res.indexOf('http') != -1) {
            this.$store.reporturl = res;
            // sessionStorage.setItem('iframehttpurl', this.$store.reporturl)
            this.$router.push('/QualityInspection');
          this.$store.reporturl = res;
          // sessionStorage.setItem('iframehttpurl', this.$store.reporturl)
          this.$router.push('/QualityInspection');
          // if (location.href.indexOf('/WareInspection') == -1) {
          //   this.$store.reporturl = res.url;
          //   this.$router.push('/WareInspection');
@@ -114,10 +121,20 @@
    },
  },
  mounted() {
    // console.log(sessionStorage.getItem('iframehttpurl'))
    //
    // var iframe = document.getElementById('iframeContainer');
    // iframe.onload = function (res) {
    // }
    // $('#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'))
      this.setLiClick(sessionStorage.getItem('iframehttpurl'))