浏览代码

业务数据大屏退出显示调整

qymljy 2 周之前
父节点
当前提交
89d8010d1e
共有 1 个文件被更改,包括 11 次插入3 次删除
  1. 11 3
      src/HManagement/serviceDataScreen/index.vue

+ 11 - 3
src/HManagement/serviceDataScreen/index.vue

@@ -26,7 +26,7 @@
             <span>{{nowTime}}</span>
           </div>
           <div>
-            <el-button size="small" class="button" type="primary" icon="el-icon-s-home" style="background-color: #144894"  @click="$router.push('/message')">{{$t(`返回首页`)}}</el-button>
+            <el-button size="small" class="button" type="primary" icon="el-icon-s-home" style="background-color: #144894"  @click="homeBack">{{$t(`返回首页`)}}</el-button>
           </div>
         </div>
       </div>
@@ -125,7 +125,8 @@ export default {
       windowWidth: document.documentElement.clientWidth,  //实时屏幕宽度
       windowHeight: document.documentElement.clientHeight,
       dialogVisible:false,
-      dialogPaw:false
+      dialogPaw:false,
+      activePath:JSON.parse(sessionStorage.getItem('activeApp')).path
     }
   },
   mounted() {
@@ -190,7 +191,7 @@ export default {
       }, 1000); // 每隔一秒更新时间
     },
     backFull(){
-      this.$router.push('/message')
+      this.homeBack()
       if (JSON.parse(sessionStorage.getItem('active_password')) == '1' && JSON.parse(sessionStorage.getItem('password')) != '1' && JSON.parse(sessionStorage.getItem('active_account')).usertype != 0 && JSON.parse(sessionStorage.getItem('active_account')).usertype != 1){
         this.dialogPaw = true
       }
@@ -524,6 +525,13 @@ export default {
       console.log('退出全屏刷新页面******')
       sessionStorage.setItem('isFull','0')
       this.$refs.fullRef.backFullscreen()
+    },
+    homeBack(){
+      if (this.activePath){
+        this.$router.push(this.activePath)
+      }else {
+        this.$router.push('/message')
+      }
     }
   },
   created() {