|
@@ -8,7 +8,7 @@
|
|
id="main3DCSS"
|
|
id="main3DCSS"
|
|
class="threejs-Object-CSS"
|
|
class="threejs-Object-CSS"
|
|
v-show="!loading"
|
|
v-show="!loading"
|
|
- style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 1"
|
|
|
|
|
|
+ style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 1; top: 0"
|
|
>
|
|
>
|
|
<div style="position: relative">
|
|
<div style="position: relative">
|
|
<div class="elementTag" id="inputBox">
|
|
<div class="elementTag" id="inputBox">
|
|
@@ -28,7 +28,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="scene-box" style="z-index: 999">
|
|
<div class="scene-box" style="z-index: 999">
|
|
- <div class="title-text">{{ selectData.strName }}</div>
|
|
|
|
|
|
+ <div class="title-text" style="position: absolute; z-index: 9999; width: 100%; text-align: center">{{ selectData.strname }}</div>
|
|
<div class="top-box control-group">
|
|
<div class="top-box control-group">
|
|
<div class="button-box" v-for="(item, index) in modalTypeArr.centerBtnArr" :key="index" @click="showModal(item)">{{ item.value }}</div>
|
|
<div class="button-box" v-for="(item, index) in modalTypeArr.centerBtnArr" :key="index" @click="showModal(item)">{{ item.value }}</div>
|
|
</div>
|
|
</div>
|
|
@@ -108,7 +108,8 @@
|
|
<div class="bottom-tabs-box">
|
|
<div class="bottom-tabs-box">
|
|
<a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
|
|
<a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
|
|
<a-tab-pane key="1" tab="实时监测">
|
|
<a-tab-pane key="1" tab="实时监测">
|
|
- <a-radio-group v-model:value="selectRowIndex" style="width: 100%">
|
|
|
|
|
|
+ <GroupMonitorTable :dataSource="dataSource" columnsType="fanmain_monitor" @selectRow="getSelectRow" />
|
|
|
|
+ <!-- <a-radio-group v-model:value="selectRowIndex" style="width: 100%">
|
|
<a-table :columns="tableColumns" :pagination="false" :data-source="dataSource" bordered style="margin-top: 5px">
|
|
<a-table :columns="tableColumns" :pagination="false" :data-source="dataSource" bordered style="margin-top: 5px">
|
|
<template #bodyCell="{ column, record, index }">
|
|
<template #bodyCell="{ column, record, index }">
|
|
<template v-if="column.dataIndex === 'isCheck'">
|
|
<template v-if="column.dataIndex === 'isCheck'">
|
|
@@ -116,7 +117,7 @@
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</a-table>
|
|
</a-table>
|
|
- </a-radio-group>
|
|
|
|
|
|
+ </a-radio-group> -->
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
<!-- <a-tab-pane key="2" tab="实时曲线图" force-render>
|
|
<!-- <a-tab-pane key="2" tab="实时曲线图" force-render>
|
|
<div class="tab-item" v-if="activeKey === '2'">
|
|
<div class="tab-item" v-if="activeKey === '2'">
|
|
@@ -176,7 +177,7 @@
|
|
import { ExclamationCircleFilled } from '@ant-design/icons-vue';
|
|
import { ExclamationCircleFilled } from '@ant-design/icons-vue';
|
|
import FanEchrats from '/@/views/vent/monitorManager/mainFanMonitor/fanEchrats.vue';
|
|
import FanEchrats from '/@/views/vent/monitorManager/mainFanMonitor/fanEchrats.vue';
|
|
import { onBeforeMount, computed, ComputedRef, ref, onMounted, nextTick, onUnmounted, reactive, toRaw, toRef, toRefs } from 'vue';
|
|
import { onBeforeMount, computed, ComputedRef, ref, onMounted, nextTick, onUnmounted, reactive, toRaw, toRef, toRefs } from 'vue';
|
|
- import MonitorTable from '../comment/MonitorTable.vue';
|
|
|
|
|
|
+ import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
|
|
import { BasicTable, useTable } from '/@/components/Table';
|
|
import { BasicTable, useTable } from '/@/components/Table';
|
|
import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
|
|
import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
|
|
import { tableColumns, dataColumns, stateColumns, getData, getMonitorData } from './main.data';
|
|
import { tableColumns, dataColumns, stateColumns, getData, getMonitorData } from './main.data';
|
|
@@ -185,6 +186,7 @@
|
|
import LivePlayer from '@liveqing/liveplayer-v3';
|
|
import LivePlayer from '@liveqing/liveplayer-v3';
|
|
import { SvgIcon } from '/@/components/Icon';
|
|
import { SvgIcon } from '/@/components/Icon';
|
|
import { list, pathList, deviceList, testWind } from './main.api';
|
|
import { list, pathList, deviceList, testWind } from './main.api';
|
|
|
|
+ import { getTableList } from '/@/views/vent/monitorManager/fanLocalMonitor/fanLocal.api';
|
|
const modalTypeArr = reactive({
|
|
const modalTypeArr = reactive({
|
|
centerBtnArr: [
|
|
centerBtnArr: [
|
|
{
|
|
{
|
|
@@ -259,60 +261,86 @@
|
|
// 设备数据
|
|
// 设备数据
|
|
const controlType = ref(1);
|
|
const controlType = ref(1);
|
|
|
|
|
|
|
|
+ const getDataSource = async () => {
|
|
|
|
+ const res = await list({ devicetype: 'fan', pagetype: 'normal' });
|
|
|
|
+ const dataArr = res.msgTxt[0].datalist || [];
|
|
|
|
+ dataSource.value = [];
|
|
|
|
+ dataArr.forEach((data) => {
|
|
|
|
+ if (data.deviceType?.startsWith('fanmain')) {
|
|
|
|
+ const readData = data.readData;
|
|
|
|
+ data = Object.assign(data, readData);
|
|
|
|
+ dataSource.value.push(data);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ // // dataSource.value = res.msgTxt[0].datalist || [];
|
|
|
|
+ // dataSource.value.forEach((data: any) => {
|
|
|
|
+ // const readData = data.readData;
|
|
|
|
+ // data = Object.assign(data, readData);
|
|
|
|
+ // });
|
|
|
|
+ const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
|
|
|
|
+ return data;
|
|
|
|
+ };
|
|
// https获取监测数据
|
|
// https获取监测数据
|
|
let timer: null | NodeJS.Timeout = null;
|
|
let timer: null | NodeJS.Timeout = null;
|
|
- const getMonitor1 = () => {
|
|
|
|
- if (Object.prototype.toString.call(timer) === '[object Null]') {
|
|
|
|
- timer = setTimeout(() => {
|
|
|
|
- list({ devicetype: 'windrect', pagetype: 'normal' }).then((res) => {
|
|
|
|
- dataSource.value = res.msgTxt[0].datalist || [];
|
|
|
|
- dataSource.value.forEach((data: any) => {
|
|
|
|
- const readData = data.readData;
|
|
|
|
- data = Object.assign(data, readData);
|
|
|
|
- });
|
|
|
|
- const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
|
|
|
|
- Object.assign(selectData, data);
|
|
|
|
- // addFmText(selectData);
|
|
|
|
- // 根据3个点位分别执行动画
|
|
|
|
-
|
|
|
|
- if (timer) {
|
|
|
|
- timer = null;
|
|
|
|
- }
|
|
|
|
- getMonitor();
|
|
|
|
- });
|
|
|
|
- }, 1000);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
const getMonitor = () => {
|
|
const getMonitor = () => {
|
|
if (Object.prototype.toString.call(timer) === '[object Null]') {
|
|
if (Object.prototype.toString.call(timer) === '[object Null]') {
|
|
- timer = setTimeout(() => {
|
|
|
|
|
|
+ timer = setTimeout(async () => {
|
|
|
|
+ await getDataSource();
|
|
|
|
+ Object.assign(selectData, deviceBaseList.value, dataSource.value[selectRowIndex.value]);
|
|
|
|
+ addText(selectData);
|
|
|
|
+ // playAnimation(data, selectData.maxarea);
|
|
if (timer) {
|
|
if (timer) {
|
|
timer = null;
|
|
timer = null;
|
|
}
|
|
}
|
|
- dataSource.value = getData();
|
|
|
|
- // 默认前两行(主、备)是正在监测的主通风机, 实际中需要手动选中
|
|
|
|
- const monitorData = getMonitorData();
|
|
|
|
- Object.assign(dataSource.value[selectRowIndex.value], monitorData);
|
|
|
|
- const data: any = toRaw(dataSource.value[selectRowIndex.value]);
|
|
|
|
- Object.assign(selectData, data);
|
|
|
|
- resetEcharts('mainWindRect');
|
|
|
|
getMonitor();
|
|
getMonitor();
|
|
}, 1000);
|
|
}, 1000);
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ // const getMonitor = () => {
|
|
|
|
+ // if (Object.prototype.toString.call(timer) === '[object Null]') {
|
|
|
|
+ // timer = setTimeout(() => {
|
|
|
|
+ // if (timer) {
|
|
|
|
+ // timer = null;
|
|
|
|
+ // }
|
|
|
|
+ // dataSource.value = getData();
|
|
|
|
+ // // 默认前两行(主、备)是正在监测的主通风机, 实际中需要手动选中
|
|
|
|
+ // const monitorData = getMonitorData();
|
|
|
|
+ // Object.assign(dataSource.value[selectRowIndex.value], monitorData);
|
|
|
|
+ // const data: any = toRaw(dataSource.value[selectRowIndex.value]);
|
|
|
|
+ // Object.assign(selectData, data);
|
|
|
|
+ // resetEcharts('mainWindRect');
|
|
|
|
+ // getMonitor();
|
|
|
|
+ // }, 1000);
|
|
|
|
+ // }
|
|
|
|
+ // };
|
|
|
|
+
|
|
|
|
+ const deviceBaseList = ref([]);
|
|
|
|
+ const getDeviceBaseList = () => {
|
|
|
|
+ getTableList({ pageSize: 1000 }).then((res) => {
|
|
|
|
+ deviceBaseList.value = res.records;
|
|
|
|
+ });
|
|
|
|
+ };
|
|
// 切换检测数据
|
|
// 切换检测数据
|
|
- const getSelectRow = (selectRow, index) => {
|
|
|
|
- selectRowIndex.value = index;
|
|
|
|
|
|
+ const getSelectRow = (id) => {
|
|
|
|
+ if (!id) return;
|
|
loading.value = true;
|
|
loading.value = true;
|
|
- Object.assign(selectData, selectRow);
|
|
|
|
|
|
+ const baseDataIndex: any = dataSource.value.findIndex((baseData: any) => baseData.deviceID === id);
|
|
|
|
+ selectRowIndex.value = baseDataIndex;
|
|
const type = 'mainWindRect';
|
|
const type = 'mainWindRect';
|
|
- loading.value = false;
|
|
|
|
- // setModelType(type).then(() => {
|
|
|
|
- // // addFmText(selectData);
|
|
|
|
- // loading.value = false;
|
|
|
|
- // });
|
|
|
|
|
|
+ // const type = baseDataIndex > 0 ? 'fm' : 'fc';
|
|
|
|
+ setModelType(type).then(() => {
|
|
|
|
+ loading.value = false;
|
|
|
|
+ });
|
|
|
|
+ const data = dataSource.value[baseDataIndex];
|
|
|
|
+ mainWindIsShow1.value = 'stop';
|
|
|
|
+ mainWindIsShow2.value = 'stop';
|
|
|
|
+ if (data['fanStart1'] == 1) {
|
|
|
|
+ mainWindIsShow1.value = 'open';
|
|
|
|
+ } else if (data['fanStart2'] == 1) {
|
|
|
|
+ mainWindIsShow2.value = 'open';
|
|
|
|
+ }
|
|
|
|
+ return;
|
|
};
|
|
};
|
|
|
|
|
|
const start = (flag) => {
|
|
const start = (flag) => {
|
|
@@ -328,14 +356,6 @@
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
- const addPlayVideo = (event) => {
|
|
|
|
- event.preventDefault();
|
|
|
|
- if (player1.value && player1.value.play) {
|
|
|
|
- player1.value.play();
|
|
|
|
- document.body.removeEventListener('mousedown', addPlayVideo);
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
// 切换左右两边1#、2#风机的监测数据
|
|
// 切换左右两边1#、2#风机的监测数据
|
|
const selectDevice = (key, val) => {
|
|
const selectDevice = (key, val) => {
|
|
if (key === 'dataMonitorRowIndex') {
|
|
if (key === 'dataMonitorRowIndex') {
|
|
@@ -420,6 +440,7 @@
|
|
|
|
|
|
onBeforeMount(() => {
|
|
onBeforeMount(() => {
|
|
// document.body.addEventListener('mousedown', addPlayVideo, true);
|
|
// document.body.addEventListener('mousedown', addPlayVideo, true);
|
|
|
|
+ getDeviceBaseList();
|
|
});
|
|
});
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
@@ -514,7 +535,7 @@
|
|
}
|
|
}
|
|
.data-show-box {
|
|
.data-show-box {
|
|
position: relative;
|
|
position: relative;
|
|
- top: -30px;
|
|
|
|
|
|
+
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|