|
@@ -149,7 +149,7 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import DeviceEcharts from '../comment/DeviceEcharts.vue';
|
|
|
- import { unref, onBeforeMount, ref, onMounted, onUnmounted, reactive, toRaw, nextTick, inject } from 'vue';
|
|
|
+ import { unref, onBeforeMount, ref, onMounted, onUnmounted, reactive, toRaw, nextTick, inject, shallowRef } from 'vue';
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
import MonitorTable from '../comment/MonitorTable.vue';
|
|
|
import ModalTable from './components/modalTable.vue';
|
|
@@ -183,7 +183,7 @@
|
|
|
const { currentRoute } = useRouter();
|
|
|
const modelRef = ref();
|
|
|
/** 模型对应的组件,根据实际情况分为二维三维 */
|
|
|
- let modelComponent = getModelComponent(true, sysOrgCode);
|
|
|
+ let modelComponent = shallowRef(getModelComponent(globalConfig.is2DModel));
|
|
|
|
|
|
const MonitorDataTable = ref();
|
|
|
const scroll = reactive({
|
|
@@ -385,7 +385,7 @@
|
|
|
const selectedData = toRaw(dataSource.value[selectRowIndex.value]);
|
|
|
Object.assign(selectData, selectedData);
|
|
|
addMonitorText(selectData);
|
|
|
- palyAnimation(selectedData);
|
|
|
+ if (selectedData) palyAnimation(selectedData);
|
|
|
}
|
|
|
}
|
|
|
let deviceRunState = '',
|
|
@@ -723,7 +723,7 @@
|
|
|
* 模型对应的组件,根据实际情况分为二维三维
|
|
|
* 这里传入类型type而不是sysOrgCode进行判断展示哪个装置
|
|
|
* */
|
|
|
- modelComponent = getModelComponent(true, type);
|
|
|
+ if (globalConfig.is2DModel) await setSVGModelType(type);
|
|
|
await setModelType(type);
|
|
|
loading.value = false;
|
|
|
deviceRunState = '';
|
|
@@ -731,7 +731,11 @@
|
|
|
await getCamera(selectRow.deviceID, playerRef.value);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ // 设置模型类型
|
|
|
+ function setSVGModelType(type) {
|
|
|
+ modelComponent.value = getModelComponent(globalConfig.is2DModel, type);
|
|
|
+ return nextTick();
|
|
|
+ }
|
|
|
/* 一键测风 */
|
|
|
function handleOk() {
|
|
|
modalType.value = 'multiple';
|