Prechádzať zdrojové kódy

业务数据大屏显示优化

qymljy 9 mesiacov pred
rodič
commit
913cbc4e17

+ 9 - 0
src/HManagement/serviceDataScreen/index.vue

@@ -512,10 +512,19 @@ export default {
     },
     detailClick(){
       this.dialogVisible = true
+    },
+    handleBeforeunload(){
+      setTimeout(()=>{
+        console.log('退出全屏刷新页面******')
+        this.$refs.fullRef.backFullscreen()
+        // this.$router.push('/message')
+      },1000)
+
     }
   },
   created() {
     this.getTime()
+    window.addEventListener('beforeunload',this.handleBeforeunload)
   },
   beforeDestroy() {
     if (this.timer) {

+ 6 - 1
src/store/index.js

@@ -103,7 +103,12 @@ export default new Vuex.Store({
       state.sys_modules = data
     },
     setAppMenu (state,data) {
-      state.menuApp = data
+      if (window.location.hash.substring(1) === '/serviceDataScreen'){
+        router.push('/message')
+      }else {
+        state.menuApp = data
+      }
+
     },
     changeDetailDrawer (state,bool) {
       state.closeDrawerTemp = bool