123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <template>
- <div class="company-home">
- <!-- 如果是有 deviceType、type 等 query,认为是详情页,不需要展示普通模块,只需要模型 -->
- <template v-if="!route.query.deviceType">
- <div v-if="!route.query.embed" class="top-bg">
- <greenNav :Title="mainTitle" :activeIndex="activeIndex" @menuToggle="menuToggle" />
- </div>
- <div class="main-container">
- <component :is="currentComponent" />
- </div>
- </template>
- </div>
- </template>
- <script lang="ts" setup>
- import { onMounted, onUnmounted, ref } from 'vue';
- import { useInitPage } from './hooks/useInit';
- import fireGreen from './fire-green.vue';
- import dustGreen from './dust-green.vue';
- import commonGreen from './common-green.vue';
- import greenNav from './components/green-nav.vue';
- import { useRoute } from 'vue-router';
- import { useGlobSetting } from '/@/hooks/setting';
- //当前激活menu索引
- let activeIndex = ref(0);
- //当前加载menu组件
- let currentComponent = ref<any>(commonGreen);
- const { title = '智能通风管控系统' } = useGlobSetting();
- const route = useRoute();
- const { mainTitle } = useInitPage(title);
- //menu切换,界面跳转
- function menuToggle(item, index) {
- activeIndex.value = index;
- switch (item.name) {
- case '灾害预警':
- currentComponent.value = commonGreen;
- break;
- case '火灾监控':
- currentComponent.value = fireGreen;
- break;
- case '粉尘监控':
- currentComponent.value = dustGreen;
- break;
- }
- }
- onMounted(() => {});
- onUnmounted(() => {});
- </script>
- <style lang="less" scoped>
- @import '/@/design/theme.less';
- @font-face {
- font-family: 'douyuFont';
- src: url('/@/assets/font/douyuFont.otf');
- }
- @{theme-deepblue} {
- .company-home {
- --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
- }
- }
- .company-home {
- --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
- --image-monitor-realtime: url('/@/assets/images/company/monitor-realtime.png');
- --image-monitor-doc: url('/@/assets/images/company/monitor-doc.png');
- --image-monitor-goto: url('/@/assets/images/company/monitor-goto.png');
- width: 100%;
- height: 100%;
- color: @white;
- position: relative;
- background: #181b24;
- .top-bg {
- width: 100%;
- height: 96px;
- // background: var(--image-modal-top) no-repeat center;
- position: absolute;
- z-index: 1;
- }
- .main-container {
- position: absolute;
- top: 96px;
- width: calc(100% - 30px);
- height: calc(100% - 96px);
- margin: 0px 15px;
- box-sizing: border-box;
- }
- .module-dropdown {
- padding: 5px;
- background-image: @vent-configurable-dropdown;
- border-bottom: 2px solid @vent-configurable-home-light-border;
- color: @vent-font-color;
- position: absolute;
- top: 60px;
- right: 480px;
- }
- .module-dropdown-original {
- padding: 10px;
- background-image: @vent-configurable-dropdown;
- border-bottom: 2px solid @vent-configurable-home-light-border;
- color: @vent-font-color;
- position: absolute;
- top: 70px;
- right: 460px;
- }
- .module-trigger-button {
- color: @vent-font-color;
- background-image: @vent-configurable-dropdown;
- border: none;
- border-bottom: 2px solid @vent-configurable-home-light-border;
- }
- .realtime-mode {
- background-image: var(--image-monitor-realtime);
- }
- .module-monitor-bar {
- position: absolute;
- top: 100px;
- width: 1000px;
- height: 200px;
- left: calc(50% - 500px);
- }
- }
- :deep(.loading-box) {
- position: unset;
- }
- </style>
|