智慧园区前端大屏
shuishen
2024-12-18 9a37c5e1b2190c3f6ec71483923922189091dd52
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-11-08 11:00:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-11-08 12:07:12
 * @FilePath: \bigScreen\src\views\companyInfo\components\centerContainer.vue
 * @Description: 
 * 
 * Copyright (c) 2024 by shuishen, All Rights Reserved. 
-->
<script setup>
import EventBus from 'utils/bus'
import { getAssetsFile } from 'utils/utils'
const loginOutBg = getAssetsFile('back.png', '/images')
 
import { useRouter, useRoute } from 'vue-router'
let router = useRouter()
import { useRouterStore } from 'store/router'
const store = useRouterStore()
let data = reactive({
  companyInfo: {}
})
 
let { buttonIndex } = defineProps({
  buttonIndex: Number
})
 
onMounted(() => {
  data.companyInfo = JSON.parse(localStorage.getItem('companyInfo'))
})
// 父级方法
const emit = defineEmits(['childEvent'])
// 回调父级方法
const handleClick = (index) => {
  emit('childEvent', index)
}
// 返回首页
const goHome = () => {
  store.setLoadSub(false)
  EventBus.emit('flyToyqfw', 'flyToyqfw')
  router.push({
    path: '/layout'
  })
}
</script>
 
<template>
  <div class="title">{{ data.companyInfo.name }}</div>
  <!-- <div class="menu-box">
    <div :class="{ on: buttonIndex == 1 }" class="sub-menu" @click="handleClick(1)"> 基本信息 </div>
    <div :class="{ on: buttonIndex == 2 }" class="sub-menu" @click="handleClick(2)"> 应急物质 </div>
    <div :class="{ on: buttonIndex == 3 }" class="sub-menu" @click="handleClick(3)"> 救援队伍 </div>
  </div> -->
  <div class="back-hoem">
    <!-- <div class="center-info cursor-p" @click="goHome()">返回</div> -->
    <div class="center-info cursor-p" @click="goHome()">
      <img :src="loginOutBg" class="img" />
      <span>返回</span>
    </div>
  </div>
</template>
 
<style lang="scss" scoped>
.title {
  position: absolute;
  bottom: 2px;
  left: 74px;
 
  font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
  font-weight: 400;
  font-size: 24px;
  color: #FFFFFF;
  line-height: 38px;
  letter-spacing: 3px;
  text-shadow: 2px 3px 0px rgba(17, 20, 22, 0.2196);
  text-align: left;
  font-style: normal;
  text-transform: none;
}
 
.menu-box {
  position: absolute;
  bottom: 0px;
  left: 592px;
 
  display: flex;
 
  &>div {
    width: 146px;
    height: 36px;
    line-height: 48px;
 
    cursor: pointer;
 
    font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
    font-weight: 400;
    font-size: 20px;
    color: #BFD3E5;
    text-align: center;
    font-style: normal;
    text-transform: none;
  }
 
  &>div.on {
    color: #F6FCFF;
    background: url(/images/mode-tab-ac.png) no-repeat center / 100% 100%;
  }
}
 
.back-hoem {
  position: absolute;
  bottom: 2px;
  right: 30px;
 
  .center-info {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
  }
 
  .center-info span {
    margin-right: 10px;
  }
 
  .img {
    width: 36px;
    height: 36px;
    // margin-right: 5px;
  }
 
  .center-info:hover {
    background-color: #3c5e8f;
    border-radius: 20px;
  }
}
</style>