123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906 |
- <template>
- <div class="bg" style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
- <a-spin :spinning="loading" />
- <div
- id="main3DCSS"
- class="threejs-Object-CSS"
- v-show="!loading"
- style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 1; top: 0"
- >
- <div style="position: relative">
- <div class="elementTag" id="inputBox">
- <div class="elementContent elementContent-r" v-if="selectData.DataPa && backMonitorIsShow">
- <p><span class="data-title">风机气压(Pa):</span>{{ selectData.DataPa ? selectData.DataPa : '-' }}</p>
- <p><span class="data-title">风机静压(Pa):</span>{{ selectData.Fan2Negative ? selectData.Fan2Negative : '-' }}</p>
- <p><span class="data-title">风机风量(m³/s):</span>{{ selectData.Fan2m3 ? selectData.Fan2m3 : '-' }}</p>
- </div>
- </div>
- <div class="elementTag" id="inputBox1">
- <div class="elementContent elementContent-r" v-if="selectData.DataPa && frontMonitorIsShow">
- <p><span class="data-title">风机全压(Pa):</span>{{ selectData.DataPa ? selectData.DataPa : '-' }}</p>
- <p><span class="data-title">风机静压(Pa):</span>{{ selectData.Fan1Negative ? selectData.Fan1Negative : '-' }}</p>
- <p><span class="data-title">风机风量(m³/s):</span>{{ selectData.Fan1m3 ? selectData.Fan1m3 : '-' }}</p>
- </div>
- </div>
- </div>
- </div>
- <div id="main3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
- <FanEchrats id="fan-echarts" :chartData="selectData" style="position: absolute; z-index: -1" />
- </div>
- <div class="scene-box" style="z-index: 999">
- <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="button-box" v-for="(item, index) in modalTypeArr.centerBtnArr" :key="index" @click="showModal(item)">{{ item.value }}</div>
- </div>
- <div class="data-show-box">
- <div class="data-item">
- <div class="item-header">环境监测</div>
- <div class="item-container">
- <div class="tab">
- <div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 0 }" @click="selectDevice('dataMonitorRowIndex', 0)"
- >1#风机</div
- >
- <div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 1 }" @click="selectDevice('dataMonitorRowIndex', 1)"
- >2#风机</div
- >
- </div>
- <div class="container-group container-group-l">
- <template v-if="deviceType">
- <div class="container-item" v-for="(data, index) in getTableHeaderColumns(deviceType + '_monitor_left')" :key="index">
- <div class="item-icon">
- <SvgIcon class="icon-style" size="18" name="temperature" />
- </div>
- <div class="item-name">{{ data.title }}</div>
- <div v-if="data.dataIndex.startsWith('Fan')">
- <div class="item-value" v-if="dataMonitorRowIndex == 0">{{
- selectData[data.dataIndex.replace('Fan', 'Fan1')] ? selectData[data.dataIndex.replace('Fan', 'Fan1')] : '-'
- }}</div>
- <div class="item-value" v-if="dataMonitorRowIndex == 1">{{
- selectData[data.dataIndex.replace('Fan', 'Fan2')] ? selectData[data.dataIndex.replace('Fan', 'Fan2')] : '-'
- }}</div>
- </div>
- <div v-else>
- <div class="item-value">{{ selectData[data.dataIndex] ? selectData[data.dataIndex] : '-' }}</div>
- </div>
- </div>
- </template>
- </div>
- </div>
- </div>
- <div class="data-item">
- <div class="item-header">设备状态</div>
- <div class="item-container">
- <div class="tab">
- <div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 0 }" @click="selectDevice('warningMonitorRowIndex', 0)"
- >1#风机</div
- >
- <div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 1 }" @click="selectDevice('warningMonitorRowIndex', 1)"
- >2#风机</div
- >
- </div>
- <div class="container-group">
- <div class="warning-header">
- <div class="header-item">
- <div class="header-title">报警总数</div>
- <div class="header-value">0</div>
- </div>
- <div class="header-item">
- <div class="header-title"> 未处理数</div>
- <div class="header-value">0</div>
- </div>
- </div>
- <div class="warning-group">
- <template v-if="deviceType">
- <div class="warning-item" v-for="(state, index) in getTableHeaderColumns(deviceType + '_monitor_right')" :key="index">
- <div class="item-name"><div class="icon"></div> {{ state.title }}</div>
- <div v-if="state.dataIndex.startsWith('Fan')">
- <div class="signal-item" v-if="warningMonitorRowIndex == 0">
- <div
- class="signal-round"
- :class="{
- 'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan1')],
- 'signal-round-warning':
- selectData[state.dataIndex.replace('Fan', 'Fan1')] !== undefined && !selectData[state.dataIndex.replace('Fan', 'Fan1')],
- 'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined,
- }"
- ></div>
- <div>{{
- selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined
- ? '无状态'
- : selectData[state.dataIndex.replace('Fan', 'Fan1')]
- ? '正常'
- : '异常'
- }}</div>
- </div>
- <div class="signal-item" v-if="warningMonitorRowIndex == 1">
- <div
- class="signal-round"
- :class="{
- 'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan2')],
- 'signal-round-warning':
- selectData[state.dataIndex.replace('Fan', 'Fan2')] !== undefined && !selectData[state.dataIndex.replace('Fan', 'Fan2')],
- 'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan2')] === undefined,
- }"
- ></div>
- <div>{{
- selectData[state.dataIndex.replace('Fan', 'Fan2')] === undefined
- ? '无状态'
- : selectData[state.dataIndex.replace('Fan', 'Fan2')]
- ? '正常'
- : '异常'
- }}</div>
- </div>
- </div>
- <div v-else>
- <div class="signal-item" v-if="warningMonitorRowIndex == 0">
- <div
- class="signal-round"
- :class="{
- 'signal-round-run': selectData[state.dataIndex],
- 'signal-round-warning': selectData[state.dataIndex] !== undefined && !selectData[state.dataIndex],
- 'signal-round-gry': selectData[state.dataIndex] === undefined,
- }"
- ></div>
- <div>{{ selectData[state.dataIndex] === undefined ? '无状态' : selectData[state.dataIndex] ? '正常' : '异常' }}</div>
- </div>
- </div>
- </div>
- </template>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="bottom-tabs-box">
- <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
- <a-tab-pane key="1" tab="实时监测">
- <GroupMonitorTable :dataSource="dataSource" columnsType="fanmain_monitor" @selectRow="getSelectRow" />
- </a-tab-pane>
- <!-- <a-tab-pane key="2" tab="实时曲线图" force-render>
- <div class="tab-item" v-if="activeKey === '2'">
- <Bar :chartData="dataSource" xAxisPropType="strname" :propTypeArr="propTypeArr" height="40vh" width="100%" />
- </div>
- </a-tab-pane> -->
- <a-tab-pane key="3" tab="历史数据">
- <div class="tab-item">
- <HistoryTable columns-type="fanmain_history" device-type="fanmain" :device-list-api="baseList" designScope="fanmain-history" />
- </div>
- </a-tab-pane>
- <a-tab-pane key="4" tab="报警历史">
- <div class="tab-item">
- <AlarmHistoryTable columns-type="alarm_history" device-type="fanmain" :device-list-api="baseList" designScope="alarm-history" />
- </div>
- </a-tab-pane>
- <a-tab-pane key="5" tab="操作历史">
- <div class="tab-item">
- <HandlerHistoryTable columns-type="alarm_history" device-type="fanlocal" :device-list-api="baseList" designScope="alarm-history" />
- </div>
- </a-tab-pane>
- </a-tabs>
- </div>
- </div>
- <div style="z-index: -1; position: absolute; top: -100px; right: 10px; width: 300px; height: 280px; margin: auto" class="palyer">
- <!-- <LivePlayer id="main-player1" ref="player1" :videoUrl="flvURL1()" muted live loading controls /> -->
- <LivePlayer id="main-player1" ref="player1" :videoUrl="flvURL1()" muted loop loading controls />
- </div>
- <a-modal v-model:visible="modalIsShow" :title="modalTitle" @ok="handleOk" @cancel="handleCancel">
- <div class="modal-container">
- <div class="vent-flex-row">
- <ExclamationCircleFilled style="color: #ffb700; font-size: 30px" />
- <div class="warning-text">您是否要进行{{ modalTitle }}操作?</div>
- </div>
- <!-- 调频 -->
- <div class="vent-flex-row input-box" v-if="modalType == 'frequency'">
- <div class="label">运行频率(单位):</div>
- <a-input-number v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
- </div>
- <!-- 启动或停止 -->
- <div class="" v-if="modalType == 'startSmoke'">
- <div class="startSmoke-select">
- <div class="label">1#风机:</div>
- <a-radio-group v-model:value="mainWindIsShow1" @change="changeMotor" name="mainWind1">
- <a-radio value="open">开启</a-radio>
- <a-radio value="stop">停止</a-radio>
- </a-radio-group>
- </div>
- <div class="startSmoke-select">
- <div class="label">2#风机:</div>
- <a-radio-group v-model:value="mainWindIsShow2" @change="changeMotor" name="mainWind2">
- <a-radio value="open">开启</a-radio>
- <a-radio value="stop">停止</a-radio>
- </a-radio-group>
- </div>
- </div>
- <div class="vent-flex-row input-box">
- <div class="label">操作密码:</div>
- <a-input size="small" type="password" v-model:value="passWord" />
- </div>
- </div>
- </a-modal>
- </template>
- <script setup lang="ts">
- import { ExclamationCircleFilled } from '@ant-design/icons-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 GroupMonitorTable from '../comment/GroupMonitorTable.vue';
- import HistoryTable from '../comment/HistoryTable.vue';
- import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
- import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
- import { dataColumns, stateColumns, getData, getMonitorData } from './main.data';
- import { deviceControlApi } from '/@/api/vent/index';
- import { mountedThree, destroy, addText, play, setModelType, playAnimate, resetEcharts } from './main.threejs';
- import LivePlayer from '@liveqing/liveplayer-v3';
- import { Icon as SvgIcon } from '/@/components/Icon';
- import { list, pathList, deviceList, testWind } from './main.api';
- import { list as baseList } from '../../deviceManager/fanTabel/fan.api';
- import { getTableList } from '/@/views/vent/monitorManager/fanLocalMonitor/fanLocal.api';
- import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
- const modalTypeArr = reactive({
- centerBtnArr: [
- {
- key: 'startSmoke',
- value: '启动/停止',
- },
- {
- key: 'changeSmoke',
- value: '不停风倒机',
- },
- {
- key: 'changeDirection',
- value: '一键反风',
- },
- {
- key: 'frequency',
- value: '一键调频',
- },
- ],
- });
- const player1 = ref(null);
- const activeKey = ref('1');
- const loading = ref(false);
- const modalIsShow = ref<boolean>(false); // 是否显示模态框
- const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
- const modalType = ref(''); // 模态框内容显示类型,设备操作类型
- const frequencyVal = ref(40); //频率
- const mainWindIsShow1 = ref('stop'); // 1#风机默认启动
- const mainWindIsShow2 = ref('stop'); // 2#风机默认不启动
- const frontMonitorIsShow = ref(false); // 存放1#风机临时状态,保存模态框取消时,还需要返回之前的值
- const backMonitorIsShow = ref(false); // 存放2#风机临时状态,保存模态框取消时,还需要返回之前的值
- const passWord = ref('');
- // 默认初始是第一行 (默认n%2==0时是主机,n%2==1时是备机)
- const selectRowIndex = ref(0);
- // 默认数据左边监测的是1#风机
- const dataMonitorRowIndex = ref(0);
- // 默认数据右边监测的是1#风机
- const warningMonitorRowIndex = ref(0);
- // 监测数据
- const selectData = reactive({
- deviceID: '',
- Fan1Negative: '-', // 静压
- Fan2Negative: '-', // 静压
- DataPa: '-', //全压
- Fan1m3: '-', //电机流量
- Fan2m3: '-', //电机流量
- deviceType: '',
- });
- const deviceType = computed(() => selectData.deviceType);
- const flvURL1 = () => {
- // return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
- return `/video/mainWind.mp4`;
- };
- // const dataSource = computed(() => {
- // const data = [...getRecordList()] || [];
- // Object.assign(selectData, toRaw(data[selectRowIndex.value]));
- // addFmText(selectData);
- // return data;
- // });
- const dataSource = ref([]);
- const propTypeArr = new Map([
- ['incipientWindSpeed1', 'V1风速'],
- ['incipientWindSpeed2', 'V2风速'],
- ['incipientWindSpeed3', 'V3风速'],
- ['sourcePressure', '气源压力'],
- ]);
- const tabChange = (activeKeyVal) => {
- activeKey.value = activeKeyVal;
- };
- // 设备数据
- 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);
- }
- });
- const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
- return data;
- };
- // https获取监测数据
- let timer: null | NodeJS.Timeout = null;
- const getMonitor = () => {
- if (Object.prototype.toString.call(timer) === '[object Null]') {
- timer = setTimeout(async () => {
- await getDataSource();
- Object.assign(selectData, deviceBaseList.value, dataSource.value[selectRowIndex.value]);
- addText(selectData);
- playAnimate(selectData);
- if (timer) {
- timer = null;
- }
- getMonitor();
- }, 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 = (id) => {
- if (!id) return;
- loading.value = true;
- const baseDataIndex: any = dataSource.value.findIndex((baseData: any) => baseData.deviceID === id);
- selectRowIndex.value = baseDataIndex;
- const type = 'mainWindRect';
- // const type = baseDataIndex > 0 ? 'fm' : 'fc';
- setModelType(type).then(() => {
- loading.value = false;
- });
- const data = dataSource.value[baseDataIndex];
- if (data['Fan1StartStatus'] == 1) {
- mainWindIsShow1.value = 'open';
- frontMonitorIsShow.value = true
- }else {
- mainWindIsShow1.value = 'stop';
- frontMonitorIsShow.value = false
- }
- if (data['Fan2StartStatus'] == 1) {
- mainWindIsShow2.value = 'open';
- backMonitorIsShow.value = true
- }else {
- mainWindIsShow2.value = 'stop';
- backMonitorIsShow.value = false
- }
- // play('initiatePlay', 'front', frequencyVal.value, 'open', 'tubPositivePath');
- return;
- };
- const start = (paramcode) => {
- const data = {
- deviceid: selectData.deviceID,
- devicetype: selectData.deviceType,
- paramcode: paramcode,
- };
- deviceControlApi(data).then((res) => {
- if (res.success) {
- //
- console.log('8888888888888888');
- }
- });
- };
- // 切换左右两边1#、2#风机的监测数据
- const selectDevice = (key, val) => {
- if (key === 'dataMonitorRowIndex') {
- dataMonitorRowIndex.value = val;
- } else {
- warningMonitorRowIndex.value = val;
- }
- };
- // 打开并设置modal的标题
- const showModal = (obj) => {
- modalType.value = obj.key;
- modalTitle.value = obj.value;
- modalIsShow.value = true;
- };
- const changeMotor = (e) => {
- const target = e.target;
- if (target.name === 'mainWind1') {
- if (target.value === 'open') {
- mainWindIsShow2.value = 'stop';
- }
- } else if (target.name === 'mainWind2') {
- if (target.value === 'open') {
- mainWindIsShow1.value = 'stop';
- }
- }
- };
- // 根据实时监测的数据执行动画
- const getState = (data) => {
- // 根据监测数据判断哪个风机在运行
- if (data['fanStart1'] == 1) {
- mainWindIsShow1.value = 'open';
- } else if (data['fanStart2'] == 1) {
- mainWindIsShow2.value = 'open';
- }
- }
- // 风机操作
- // const handleOk = (e: MouseEvent) => {
- // if (passWord.value !== '123456') {
- // message.warning('密码不正确,请重新输入');
- // return;
- // }
- // const frequency = frequencyVal.value;
- // if (modalType.value == 'startSmoke') {
- // if (mainWindIsShow1.value === 'open' && mainWindIsShow2.value === 'stop') {
- // frontMonitorIsShow.value = true;
- // backMonitorIsShow.value = false;
- // play('startSmoke', 'front', frequency, 'open', 'tubPositivePath');
- // play('startSmoke', 'back', null, 'close', '');
- // } else if (mainWindIsShow2.value === 'open' && mainWindIsShow1.value === 'stop') {
- // frontMonitorIsShow.value = false;
- // backMonitorIsShow.value = true;
- // play('startSmoke', 'back', frequency, 'open', 'tubPositivePath');
- // play('startSmoke', 'front', null, 'close', '');
- // } else if (mainWindIsShow1.value === 'stop' && mainWindIsShow2.value === 'stop') {
- // frontMonitorIsShow.value = false;
- // backMonitorIsShow.value = false;
- // play('startSmoke', 'back', null, 'stop', '');
- // play('startSmoke', 'front', null, 'close', '');
- // }
- // } else if (modalType.value == 'changeDirection') {
- // if (mainWindIsShow1.value == 'open') {
- // play('changeDirection', 'front', frequency, null, 'tubInversePath');
- // } else if (mainWindIsShow2.value == 'open') {
- // play('changeDirection', 'back', null, null, 'tubInversePath');
- // }
- // } else if (modalType.value == 'changeSmoke') {
- // // 不停风倒机的同时要切换当前监测数据
- // if (mainWindIsShow1.value == 'open') {
- // frontMonitorIsShow.value = false;
- // backMonitorIsShow.value = true;
- // // 切换到后面那台风,并需要设置后面风机的频率
- // // play('changeSmoke', 'back', dataSource.value[selectRowIndex.value + 1]['frequency'], null, 'tubInversePath');
- // play('changeSmoke', 'back', frequency, null, 'tubPositivePath');
- // } else if (mainWindIsShow2.value == 'open') {
- // frontMonitorIsShow.value = true;
- // backMonitorIsShow.value = false;
- // // 切换到前面那台风,并需要设置前面风机的频率
- // play('changeSmoke', 'front', frequency, null, 'tubPositivePath');
- // }
- // } else if (modalType.value == 'frequency') {
- // if (mainWindIsShow1.value == 'open') {
- // play('frequency', 'front', frequency);
- // } else if (mainWindIsShow2.value == 'open') {
- // play('frequency', 'back', frequency);
- // }
- // }
- // modalTitle.value = '';
- // modalIsShow.value = false;
- // };
-
- const handleOk = (e: MouseEvent) => {
- if (modalType.value == 'startSmoke') {
- if (mainWindIsShow1.value === 'open' && mainWindIsShow2.value === 'stop') {
- frontMonitorIsShow.value = true;
- backMonitorIsShow.value = false;
- start('CtrlFan1Start');
- } else if (mainWindIsShow2.value === 'open' && mainWindIsShow1.value === 'stop') {
- frontMonitorIsShow.value = false;
- backMonitorIsShow.value = true;
- start('CtrlFan2Start');
- } else if (mainWindIsShow1.value === 'stop' && mainWindIsShow2.value === 'stop') {
- frontMonitorIsShow.value = false;
- backMonitorIsShow.value = false;
- }
- } else if (modalType.value == 'changeDirection') {
- if (mainWindIsShow1.value == 'open') {
- } else if (mainWindIsShow2.value == 'open') {
- }
- } else if (modalType.value == 'changeSmoke') {
- // 不停风倒机的同时要切换当前监测数据
- if (mainWindIsShow1.value == 'open') {
- frontMonitorIsShow.value = false;
- backMonitorIsShow.value = true;
- // 切换到后面那台风,并需要设置后面风机的频率
- // play('changeSmoke', 'back', dataSource.value[selectRowIndex.value + 1]['frequency'], null, 'tubInversePath');
- } else if (mainWindIsShow2.value == 'open') {
- frontMonitorIsShow.value = true;
- backMonitorIsShow.value = false;
- // 切换到前面那台风,并需要设置前面风机的频率
- }
- } else if (modalType.value == 'frequency') {
- if (mainWindIsShow1.value == 'open') {
- } else if (mainWindIsShow2.value == 'open') {
- }
- }
- modalTitle.value = '';
- modalIsShow.value = false;
- };
- // 取消
- const handleCancel = () => {
- if (modalType.value == 'startSmoke') {
- const data = dataSource.value[selectRowIndex.value];
- mainWindIsShow1.value = 'stop';
- mainWindIsShow2.value = 'stop';
- if (data['fanStart1'] == 1) {
- mainWindIsShow1.value = 'open';
- } else if (data['fanStart2'] == 1) {
- mainWindIsShow2.value = 'open';
- }
- }
- };
- onBeforeMount(() => {
- // document.body.addEventListener('mousedown', addPlayVideo, true);
- getDeviceBaseList();
- });
- onMounted(() => {
- loading.value = true;
- mountedThree(player1.value).then(async () => {
- // await setModelType('mainWindRect');
- getMonitor();
- addText('mainWindRect');
- // play('initiatePlay', 'front', frequencyVal.value, 'open', 'tubPositivePath');
- });
- });
- onUnmounted(() => {
- destroy();
- if (timer) {
- clearTimeout(timer);
- timer = undefined;
- }
- });
- </script>
- <style scoped lang="less">
- @import '/@/design/vent/modal.less';
- :deep(.@{ventSpace}-tabs-tabpane-active) {
- overflow: auto;
- }
- .head-line {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- .button-box {
- position: relative;
- padding: 5px;
- border: 1px transparent solid;
- border-radius: 5px;
- margin-left: 8px;
- margin-right: 8px;
- width: auto;
- height: 34px;
- border: 1px solid #65dbea;
- display: flex;
- align-items: center;
- justify-content: center;
- color: #fff;
- padding: 0 15px;
- cursor: pointer;
- &:hover {
- background: linear-gradient(#3eb2ff55, #00c3ff55);
- }
- &::before {
- width: calc(100% - 6px);
- height: 26px;
- content: '';
- position: absolute;
- top: 3px;
- right: 0;
- left: 3px;
- bottom: 0;
- z-index: -1;
- border-radius: inherit; /*important*/
- background: linear-gradient(#014978, #3bf3fc);
- }
- }
- }
- .control-group,
- .top-box {
- display: flex !important;
- align-items: center !important;
- justify-content: center !important;
- position: absolute !important;
- width: 915px !important;
- height: 75px !important;
- left: 50% !important;
- top: 85px !important;
- transform: translateX(-50%) !important;
- background: url('/@/assets/images/vent/tab-group-bg.png') no-repeat !important;
- padding: 0 30px !important;
- .button-box {
- height: 35px !important;
- margin-left: 15px !important;
- margin-right: 15px !important;
- padding: 0 30px !important;
- border: 1px transparent solid;
- border: 1px solid #65dbea;
- &:hover {
- background: linear-gradient(#2cd1ff55, #1eb0ff55) !important;
- }
- &::before {
- height: 27px !important;
- background: linear-gradient(#1fa6cb, #127cb5) !important;
- }
- &::after {
- top: 35px !important;
- }
- }
- }
- .data-show-box {
- position: relative;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- padding: 10px;
- color: #ffffff;
- z-index: 999;
- top: 50px;
- .data-item {
- pointer-events: auto;
- .item-header {
- width: 374px;
- background: url('/@/assets/images/vent/lr-top-bg.png') no-repeat;
- background-size: auto;
- height: 32px;
- text-align: center;
- line-height: 34px;
- font-size: 15px;
- font-weight: 600;
- color: #fafafa;
- }
- .item-container {
- width: 346px;
- margin: 0 14px;
- padding: 10px;
- background: #004aac33;
- backdrop-filter: blur(2px);
- .tab {
- width: 323px;
- background: url('/@/assets/images/vent/lr-tab-bg.png') no-repeat;
- display: flex;
- .tab-item {
- flex: 1;
- text-align: center;
- padding-top: 2px;
- color: #ffffff99;
- cursor: pointer;
- &:hover {
- color: #ffffff;
- }
- }
- .tab-item-active-l {
- color: #ffffff;
- background-image: url('/@/assets/images/vent/l-tab-active.png');
- background-repeat: no-repeat;
- background-size: auto;
- background-position: 6px 3px;
- }
- .tab-item-active-r {
- color: #ffffff;
- background-image: url('/@/assets/images/vent/r-tab-active.png');
- background-repeat: no-repeat;
- background-position: 0 3px;
- }
- }
- .container-group {
- width: 314px;
- margin: 0px 4px;
- padding: 10px 0;
- min-height: 472px;
- background: linear-gradient(to right, #007bff22, #2081ff05);
- max-height: 480px;
- overflow-y: auto;
- }
- .container-group-l {
- .container-item {
- width: 100%;
- height: 63px;
- display: flex;
- padding: 10px 0 0 20px;
- margin-bottom: 5px;
- position: relative;
- background: url('/@/assets/images/vent/plane-bottom.png') no-repeat;
- background-size: auto;
- background-position: bottom;
- &::before {
- content: '';
- display: block;
- width: 100%;
- height: 5px;
- position: absolute;
- top: 62px;
- left: 0;
- background-color: #73f4ff66;
- backdrop-filter: blur(5px);
- }
- .item-icon {
- width: 54px;
- height: 45px;
- background: url('/@/assets/images/vent/plane-icon-bg.png') no-repeat;
- background-size: cover;
- .icon-style {
- margin: 10px 0 0 18px;
- }
- }
- .item-name {
- width: 180px;
- line-height: 60px;
- }
- .item-value {
- position: relative;
- height: 26px;
- line-height: 24px;
- margin: 15px 0;
- text-align: center;
- width: 80px;
- border: 1px solid #00f5fe;
- border-radius: 13px;
- background: linear-gradient(to right, #00f5fe44, #0090ff44);
- &::before {
- width: 6px;
- height: 6px;
- content: '';
- position: absolute;
- left: -3px;
- top: 8px;
- background: #ffa500;
- border-radius: 3px;
- }
- }
- }
- }
- .warning-header {
- display: flex;
- font-size: 14px;
- .header-item {
- flex: 1;
- display: flex;
- flex-direction: column;
- margin: 5px 10px;
- justify-content: center;
- align-items: center;
- .header-title {
- color: #39e7fe;
- }
- .header-value {
- width: 133px;
- height: 56px;
- font-weight: 600;
- font-family: 'douyuFont';
- font-size: 16px;
- color: #ffa500;
- display: flex;
- justify-content: center;
- align-items: center;
- background: url('/@/assets/images/vent/count-header-bg.png') no-repeat;
- }
- }
- }
- .warning-group {
- padding: 0 10px;
- position: relative;
- &::before {
- content: '';
- display: block;
- width: 1px;
- height: 100%;
- position: absolute;
- left: 12px;
- background-color: #00f5fe;
- }
- .warning-item {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- height: 38px;
- .item-name {
- .icon {
- width: 6px;
- height: 6px;
- display: inline-block;
- background-color: #1cd5ff;
- border-radius: 3px;
- position: relative;
- margin-right: 5px;
- &::before {
- content: '';
- width: 10px;
- height: 10px;
- display: block;
- border: 1px solid #34edff99;
- border-radius: 5px;
- position: absolute;
- top: -2px;
- left: -2px;
- }
- }
- }
- }
- }
- }
- }
- }
- .threejs-Object-CSS {
- .elementTag {
- backdrop-filter: blur(2px);
- .elementContent {
- width: 220px;
- background-color: rgba(0, 0, 0, 0.3);
- box-shadow: 0px 0px 40px rgb(0 90 131 / 55%) inset;
- border: 2px solid rgb(153 176 195 / 55%);
- padding: 15px 20px 0px 20px;
- font-size: 15px;
- p {
- color: #f2a500;
- }
- span {
- // color: #74e9fe;
- color: #fff;
- }
- }
- .elementContent-r {
- &::before {
- right: 120px;
- }
- &::after {
- right: 270px;
- border: 4px solid rgb(0, 221, 255); //rgb(0 220 255 / 75%)
- background: #a7a7a766;
- }
- }
- }
- }
- ::v-deep(.@{ventSpace}-table-wrapper) {
- height: 100% !important;
- }
- ::v-deep(.@{ventSpace}-spin-container) {
- height: 100% !important;
- overflow-y: auto;
- }
- .label {
- max-width: 220px;
- }
- .@{ventSpace}-input {
- width: 150px;
- }
- </style>
|