|
@@ -1,20 +1,19 @@
|
|
|
<script lang="ts" setup>
|
|
|
-import { AppMain, Navbar } from '@/layout/components/index.js'
|
|
|
+import {AppMain, Navbar} from '@/layout/components/index.js'
|
|
|
import AntvMap from '@/components/AntvMap/index.vue'
|
|
|
import UePlayer from '@/components/UePlayer.vue'
|
|
|
-import { useAppStore } from '@/stores/app'
|
|
|
-import { computed, onMounted, reactive, ref, watch } from 'vue'
|
|
|
-import { useRoute } from 'vue-router'
|
|
|
-import { useStationStore } from '@/stores/station'
|
|
|
+import {useAppStore} from '@/stores/app'
|
|
|
+import {computed, onMounted, reactive, ref, watch} from 'vue'
|
|
|
+import {useRoute} from 'vue-router'
|
|
|
+import {useStationStore} from '@/stores/station'
|
|
|
import bus from '@/utils/bus'
|
|
|
-import { getStation } from '@/utils/station'
|
|
|
-import { getAlarmData } from '@/api/rolldata'
|
|
|
-import { jumpPage } from '@/utils'
|
|
|
+import {getStation} from '@/utils/station'
|
|
|
+import {getAlarmData} from '@/api/rolldata'
|
|
|
+import {jumpPage} from '@/utils'
|
|
|
import CrossSection from '@/components/CrossSection.vue'
|
|
|
-import { Vue3Marquee } from 'vue3-marquee'
|
|
|
+import {Vue3Marquee} from 'vue3-marquee'
|
|
|
import X2js from 'x2js'
|
|
|
import OpeningAnimation from '@/components/OpeningAnimation.vue'
|
|
|
-import { postUserInfo } from '@/api/lantaiLogin'
|
|
|
|
|
|
const appStore = useAppStore()
|
|
|
const stationStore = useStationStore()
|
|
@@ -25,7 +24,7 @@ const showOpeningAnimation = computed(() => route.path.indexOf('/index') > -1)
|
|
|
const showOpeningAnimation2 = ref(true)
|
|
|
let navbarHeight = '12vh'
|
|
|
let theme = ''
|
|
|
-let navbarStyle = { height: navbarHeight }
|
|
|
+let navbarStyle = {height: navbarHeight}
|
|
|
const dialog = reactive({
|
|
|
visible: false,
|
|
|
title: '断面',
|
|
@@ -33,13 +32,8 @@ const dialog = reactive({
|
|
|
params: {}
|
|
|
})
|
|
|
// 告警信息
|
|
|
-// const alarmInfo = ref('水位:太湖3.24,杭长桥 3.22,琳桥 3.45,常州(三) 3.50,无锡(大) 3.49,苏州(枫桥) 3.26,张桥 3.46,湘城 3.24,平望 2.98,嘉兴 2.92,陈墓(锦溪) 2.95。')
|
|
|
const alarmInfo = ref('')
|
|
|
|
|
|
-const yztSrc = ref(new URL('@/assets/images/yzt.png', import.meta.url).href)
|
|
|
-const detailSrc = ref(new URL('@/assets/images/detail.png', import.meta.url).href)
|
|
|
-const sthouseSrc = ref(new URL('@/assets/images/sthouse.jpg', import.meta.url).href)
|
|
|
-
|
|
|
// 底板回调监听
|
|
|
bus.on('handle_ue_response', (data) => {
|
|
|
if (data.Category && data.Category === 'ClickMesh') {
|
|
@@ -88,30 +82,22 @@ async function getAlarmInfo() {
|
|
|
|
|
|
onMounted(() => {
|
|
|
getAlarmInfo()
|
|
|
- postUserInfo('jssytsq', 'Jshui@2024')
|
|
|
})
|
|
|
|
|
|
// 路由监听
|
|
|
watch(() => route.path, path => {
|
|
|
// 首页展示动画
|
|
|
showOpeningAnimation2.value = path.indexOf('/index') > -1
|
|
|
-}, { deep: true })
|
|
|
+}, {deep: true})
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<div :style="{ '--current-color': theme }" class="app-wrapper">
|
|
|
|
|
|
+ <!-- 开场动画 -->
|
|
|
<opening-animation v-if="showOpeningAnimation" v-show="showOpeningAnimation2"
|
|
|
- @close="showOpeningAnimation2 = false"></opening-animation>
|
|
|
-
|
|
|
- <!-- <div v-show="appStore.floorType === 'img'" class="floor-container"><img :src="yztSrc"></div>-->
|
|
|
- <!-- <div v-show="appStore.floorType === 'detail'" class="floor-container"><img :src="detailSrc"-->
|
|
|
- <!-- style="width: 100%;height: 100%;"></div>-->
|
|
|
- <!-- <div v-show="appStore.floorType === 'sthouse'" class="floor-container"><img :src="sthouseSrc"-->
|
|
|
- <!-- style="width: 100%;height: 100%;"></div>-->
|
|
|
- <div v-show="appStore.floorType === 'ss_sw'" class="floor-container">
|
|
|
- <!-- <img :src="swSrc" style="width: 100%;height: 100%;">-->
|
|
|
- </div>
|
|
|
+ @close="showOpeningAnimation2 = false"/>
|
|
|
+
|
|
|
<antv-map v-if="appStore.floorType === 'map'" class="floor-container"></antv-map>
|
|
|
<ue-player v-if="appStore.floorType === 'ue'" class="floor-container"></ue-player>
|
|
|
|
|
@@ -130,9 +116,9 @@ watch(() => route.path, path => {
|
|
|
<div class="alarm-info" v-html="alarmInfo"></div>
|
|
|
</Vue3Marquee>
|
|
|
<!-- 顶部 -->
|
|
|
- <navbar :style="navbarStyle" />
|
|
|
+ <navbar :style="navbarStyle"/>
|
|
|
<!-- 展示页 -->
|
|
|
- <app-main />
|
|
|
+ <app-main/>
|
|
|
|
|
|
<el-dialog v-model="dialog.visible" :modal="false" :title="dialog.title" align-center draggable>
|
|
|
<cross-section v-if="dialog.visible"></cross-section>
|