From 4745b682956116fa09d812c59b485395f45c2e87 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期五, 10 二月 2023 15:38:39 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.20.39:8989/r/LFWEB_NEW

---
 src/views/PackageTwo/WareInspection.vue |   52 +++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 47 insertions(+), 5 deletions(-)

diff --git a/src/views/PackageTwo/WareInspection.vue b/src/views/PackageTwo/WareInspection.vue
index 3cad44b..69c06cc 100644
--- a/src/views/PackageTwo/WareInspection.vue
+++ b/src/views/PackageTwo/WareInspection.vue
@@ -49,6 +49,8 @@
     
     },
     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');
@@ -80,15 +82,55 @@
       this.$store.state.reporturl = res;
       this.reportUrl = res;
       this.url = res
+      // sessionStorage.setItem('routerName', this.reportUrl)
       console.log("2", this.reportUrl)
-    }
+    },
+
+    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');
+          // if (location.href.indexOf('/WareInspection') == -1) {
+          //   this.$store.reporturl = res.url;
+          //   this.$router.push('/WareInspection');
+          // } else {
+          //   this.$bus.$emit('changeNaveUrl', res.url);
+          // }
+        }
+        this.setShowFalseDiv(false)
+      }, 100)
+      clearTimeout(timer)
+    },
+    setShowFalseDiv(bolean) {
+      var index = this.showFlag;
+      if (index != null) {
+        let newItem = this.listMenu[index];
+
+        newItem.show = bolean;
+        Vue.set(this.listMenu, index, newItem);
+      }
+    },
   },
   mounted() {
-    this.showChangeIfream(this.$store.reporturl)
+    // console.log(sessionStorage.getItem('iframehttpurl'))
+    // debugger
+    if (sessionStorage.getItem('routerName') === '/WareInspection') {
+      
+      this.showChangeIfream(sessionStorage.getItem('iframehttpurl'))
+      this.setLiClick(sessionStorage.getItem('iframehttpurl'))
 
-    this.$bus.$on('changeNaveUrl', (res) => {
-      this.showChangeIfream(res)
-    });
+      this.$bus.$on('changeNaveUrl', (res) => {
+        this.showChangeIfream(res)
+      });
+    } else {
+      this.showChangeIfream(this.$store.reporturl)
+
+      this.$bus.$on('changeNaveUrl', (res) => {
+        this.showChangeIfream(res)
+      });
+    }
   }
 
 }

--
Gitblit v1.9.3