|
@@ -1,17 +1,17 @@
|
|
|
<template>
|
|
|
<div class="scene-box">
|
|
|
- <template v-if="isShow && routerParam !== 'timesolution' && routerParam !== 'home' && routerParam !== 'model3D' && routerParam !== 'none'">
|
|
|
+ <template v-if="isShow && routerParam !== 'timesolution' && routerParam !== 'home' && routerParam !== 'model3D'">
|
|
|
<!-- <Emergency ref="NetworkRef" v-if="deviceKind === 'emergency'" :pageResult="pageResult" @changePageType="changePageType" />
|
|
|
<DeviceVue ref="DeviceRef" v-else :pageData="pageData" /> -->
|
|
|
<DeviceVue ref="DeviceRef" :pageData="pageData" />
|
|
|
</template>
|
|
|
<Network ref="NetworkRef" v-if="routerParam === 'timesolution'" :pageResult="pageResult" @changePageType="changePageType" />
|
|
|
+ <VentModal style="width: 100%; height: 100%; position: absolute" />
|
|
|
</div>
|
|
|
- <VentModal style="width: 100%; height: 100%; position: absolute" />
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts" name="device-monitor">
|
|
|
- import { ref, onMounted, watch } from 'vue';
|
|
|
+<script setup lang="ts">
|
|
|
+ import { ref, onMounted, watch, onUnmounted } from 'vue';
|
|
|
import DeviceVue from './components/device/index.vue';
|
|
|
import Network from './components/network/index.vue';
|
|
|
import Emergency from './components/emergency/index.vue';
|
|
@@ -19,7 +19,7 @@
|
|
|
import { useRoute } from 'vue-router';
|
|
|
import { onBeforeUnmount } from 'vue';
|
|
|
import VentModal from '/@/components/vent/micro/ventModal.vue';
|
|
|
- import { nextTick } from 'vue';
|
|
|
+ import { unmountMicroApps } from '/@/qiankun';
|
|
|
|
|
|
const route = useRoute();
|
|
|
const actions = getActions();
|
|
@@ -32,39 +32,29 @@
|
|
|
const pageData = ref({});
|
|
|
const pageResult = ref({});
|
|
|
|
|
|
+ // actions.setGlobalState({ url: { path: '/micro-vent-3dModal/dashboard/analysis', query: { type, deviceType } } });
|
|
|
+
|
|
|
const changePageType = (pageType) => {
|
|
|
+ console.log('页面类型', pageType);
|
|
|
routerParam.value = pageType;
|
|
|
actions.setGlobalState({ pageObj: { pageType: pageType } });
|
|
|
};
|
|
|
|
|
|
watch(
|
|
|
() => route.fullPath,
|
|
|
- () => {
|
|
|
- const { type, deviceType, deviceid } = route.query;
|
|
|
- if (type === 'tunMonitor') {
|
|
|
- setTimeout(
|
|
|
- () => {
|
|
|
- routerParam.value = 'tunMonitor';
|
|
|
- pageData.value = { pageType: deviceType, deviceid };
|
|
|
- },
|
|
|
- routerParam.value == 'home' ? 2000 : 0
|
|
|
- );
|
|
|
- } else if (type === 'network') {
|
|
|
- routerParam.value = 'network';
|
|
|
- pageData.value = {};
|
|
|
- } else if (!type) {
|
|
|
- routerParam.value = 'home';
|
|
|
- pageData.value = {};
|
|
|
- } else {
|
|
|
- setTimeout(() => {
|
|
|
- routerParam.value = 'none';
|
|
|
- pageData.value = {};
|
|
|
- }, 3000);
|
|
|
- }
|
|
|
+ (fullPath) => {
|
|
|
+ debugger;
|
|
|
+ // const { type, deviceType } = routeVal.query
|
|
|
+ // if (type === 'tunMonitor') {
|
|
|
+ // pageData.value = { pageType: deviceType }
|
|
|
+ // actions.setGlobalState({ pageObj: { pageType: deviceType } });
|
|
|
+ // }
|
|
|
+ console.log('fullPath------------------->', fullPath);
|
|
|
}
|
|
|
);
|
|
|
|
|
|
onMounted(() => {
|
|
|
+ debugger;
|
|
|
const { type, deviceType, topage } = route.query;
|
|
|
deviceKind.value = deviceType as string;
|
|
|
if (!topage) {
|
|
@@ -113,6 +103,9 @@
|
|
|
onBeforeUnmount(async () => {
|
|
|
//
|
|
|
});
|
|
|
+ onUnmounted(() => {
|
|
|
+ // unmountMicroApps(['/micro-vent-3dModal']);
|
|
|
+ });
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped>
|