|
@@ -0,0 +1,77 @@
|
|
|
+<!--
|
|
|
+ * @Author: zhangyu
|
|
|
+ * @Date: 2019-11-05 15:36:21
|
|
|
+ * @Info:
|
|
|
+ * @LastEditTime: 2019-11-06 19:09:20
|
|
|
+ -->
|
|
|
+<template>
|
|
|
+ <div id="screenBox">
|
|
|
+ <router-view class="screen-router"></router-view>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
+import localStorage from '@/utils/localStorage'
|
|
|
+
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ localStorage.set('screen_data', {})
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ window.addEventListener("storage", event =>{
|
|
|
+ if(event.key == '_sagacloud_admin_store_screen_data'){
|
|
|
+ let data
|
|
|
+ try {
|
|
|
+ data = JSON.parse(event.newValue)
|
|
|
+ } catch (error) {
|
|
|
+ data = event.newValue
|
|
|
+ }
|
|
|
+ this.handleChangeRouter(data)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ destroyed() {
|
|
|
+ window.removeEventListener("storage", event => {})
|
|
|
+ localStorage.remove('screen_data')
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters('layout', ['userInfo', 'projectId', 'projects', 'userId'])
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ handleChangeRouter(data) {
|
|
|
+ console.log(data)
|
|
|
+ if(data.path && data.path == '/ledger/spacelist'){//业务空间台账
|
|
|
+ this.$router.push({
|
|
|
+ path:'/splitScreen/spaceledger',
|
|
|
+ query: data.data
|
|
|
+ })
|
|
|
+ } else if (data.path && data.path == '/point/report') {//系统集成成果管理
|
|
|
+ this.$router.push({
|
|
|
+ path:'/splitScreen/integrateresults',
|
|
|
+ query: data.data
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$router.push({
|
|
|
+ path:'/splitScreen'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+#screenBox{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ .screen-router{
|
|
|
+ margin: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|