|
|
@@ -2,7 +2,10 @@
|
|
|
<div class="bg"
|
|
|
style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
|
|
|
<a-spin :spinning="loading" />
|
|
|
- <div id="grout3D" v-show="!loading" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
|
|
|
+ <!-- 二维 SVG 模型(制浆工艺流程图:管路流动箭头 + 脉冲元素) -->
|
|
|
+ <component v-if="globalConfig?.is2DModel" :is="modelComponent" style="z-index: 2" />
|
|
|
+ <!-- 三维模型容器(由 groutHome*.vue 的 mountedThree 初始化) -->
|
|
|
+ <div v-else id="grout3D" v-show="!loading" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
|
|
|
<!-- <div id="damper3DCSS" v-show="!loading" style="width: 100%; height: 100%; top:0; left: 0; position: absolute; overflow: hidden;">
|
|
|
<div>
|
|
|
<div ref="elementContent" class="elementContent">
|
|
|
@@ -35,15 +38,20 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import customHeader from '/@/components/vent/customHeader.vue';
|
|
|
-import { ref, onMounted, onUnmounted, reactive, toRaw } from 'vue';
|
|
|
+import { ref, onMounted, onUnmounted, reactive, toRaw, inject, shallowRef } from 'vue';
|
|
|
import { systemList, getTableList } from './grout.api';
|
|
|
import BottomMenu from '/@/views/vent/comment/components/bottomMenu.vue';
|
|
|
-import {getMonitorComponent} from './grout.data'
|
|
|
+import { getMonitorComponent, getModelComponent } from './grout.data'
|
|
|
import groutHistory from './components/groutHistory.vue';
|
|
|
import groutHandleHistoryVue from './components/groutHandleHistory.vue';
|
|
|
import groutAlarmHistory from './components/groutAlarmHistory.vue';
|
|
|
import { useRouter } from 'vue-router';
|
|
|
|
|
|
+/** 全局配置(is2DModel 决定二维 / 三维模型) */
|
|
|
+const globalConfig: any = inject('globalConfig');
|
|
|
+/** 模型对应的组件,根据配置分为二维三维;三维由 groutHome*.vue 的 mountedThree 负责,此处仅二维有值 */
|
|
|
+const modelComponent = shallowRef(getModelComponent(globalConfig?.is2DModel, 'sys_pulping'));
|
|
|
+
|
|
|
const groutHome = getMonitorComponent()
|
|
|
type DeviceType = { deviceType: string, deviceName: string, datalist: any[] };
|
|
|
const activeKey = ref('monitor');
|