From c215c89ecda16e4d32593f3e942fe871898071e9 Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期一, 05 二月 2024 17:51:53 +0800
Subject: [PATCH] 代码提交

---
 src/views/PackageTwo/WareInspection.vue |   54 +++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 39 insertions(+), 15 deletions(-)

diff --git a/src/views/PackageTwo/WareInspection.vue b/src/views/PackageTwo/WareInspection.vue
index 69c06cc..e9904e4 100644
--- a/src/views/PackageTwo/WareInspection.vue
+++ b/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,19 +42,20 @@
     }
   },
   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) {
-      // debugger
-      console.log(res)
       if (this.$store.state.themeflag == true) {
         if (res.indexOf('theme=white') != -1) {
           res = res.replace('theme=white', 'theme=dark');
@@ -70,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();
       }
@@ -84,14 +90,15 @@
       this.url = res
       // sessionStorage.setItem('routerName', this.reportUrl)
       console.log("2", this.reportUrl)
+      // window.addEventListener("message", this.handleMessage, false);
     },
 
     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');
@@ -112,12 +119,29 @@
         Vue.set(this.listMenu, index, newItem);
       }
     },
+    getFunc() {
+      console.log("closeMenuSecond")
+      this.$bus.$emit('closeMenuSecond', false)
+    }
   },
   mounted() {
-    // console.log(sessionStorage.getItem('iframehttpurl'))
-    // debugger
+
+    // const iframe = document.querySelector('#iframeContainer')
+    // // 澶勭悊鍏煎琛岄棶棰�
+    // if (iframe.attachEvent) {
+    //   iframe.attachEvent('onload', () => {
+    //     // iframe鍔犺浇瀹屾瘯浠ュ悗鎵ц鎿嶄綔
+    //     this.getFunc()
+    //   })
+    // } else {
+    //   iframe.onload = () => {
+    //     // iframe鍔犺浇瀹屾瘯浠ュ悗鎵ц鎿嶄綔
+    //     this.getFunc()
+    //   }
+    // }
+
     if (sessionStorage.getItem('routerName') === '/WareInspection') {
-      
+
       this.showChangeIfream(sessionStorage.getItem('iframehttpurl'))
       this.setLiClick(sessionStorage.getItem('iframehttpurl'))
 

--
Gitblit v1.9.3