Browse Source

瓦斯抽采泵、注氮

hongrunxia 1 năm trước cách đây
mục cha
commit
6c714a0c6d
23 tập tin đã thay đổi với 220 bổ sung624 xóa
  1. BIN
      public/model/glft/fm/Fm-door_2023-11-28.glb
  2. 0 0
      public/model/glft/fm/Fm-wall-qd_2023-11-28.glb
  3. 0 0
      public/model/glft/fm/Fm-wire-qd_2023-11-28.glb
  4. BIN
      public/video/wind.mp4
  5. 3 1
      src/utils/threejs/main.worker.ts
  6. 3 0
      src/views/vent/deviceManager/comment/NormalTable.vue
  7. 1 1
      src/views/vent/deviceManager/pointTabel/point.api.ts
  8. 7 5
      src/views/vent/home/colliery/components/main-monitor.vue
  9. 2 2
      src/views/vent/home/colliery/components/work-monitor.vue
  10. 2 2
      src/views/vent/home/colliery/index.vue
  11. 15 3
      src/views/vent/monitorManager/comment/HistoryTable.vue
  12. 14 10
      src/views/vent/monitorManager/compressor/components/nitrogenHome1.vue
  13. 4 6
      src/views/vent/monitorManager/compressor/nitrogen.dishang.threejs.ts
  14. 2 4
      src/views/vent/monitorManager/compressor/nitrogen.dixia.threejs.ts
  15. 9 6
      src/views/vent/monitorManager/fanLocalMonitor/index.vue
  16. 45 6
      src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHome.vue
  17. 44 1
      src/views/vent/monitorManager/gasPumpMonitor/gasPump.data.ts
  18. 2 2
      src/views/vent/monitorManager/gasPumpMonitor/gasPump.threejs.ts
  19. 2 2
      src/views/vent/monitorManager/gasPumpMonitor/gasPump.threejs.under.ts
  20. 60 6
      src/views/vent/monitorManager/gateMonitor/gate.threejs.ts
  21. 0 564
      src/views/vent/monitorManager/gateMonitor/gate.threejs.two.ts
  22. 4 2
      src/views/vent/monitorManager/gateMonitor/index.vue
  23. 1 1
      src/views/vent/monitorManager/windrectMonitor/windrect.api.ts

BIN
public/model/glft/fm/Fm-door_2023-11-28.glb


+ 0 - 0
public/model/glft/fm/Fm-wall_2023-11-28.glb → public/model/glft/fm/Fm-wall-qd_2023-11-28.glb


+ 0 - 0
public/model/glft/fm/Fm-wire_2023-11-28.glb → public/model/glft/fm/Fm-wire-qd_2023-11-28.glb


BIN
public/video/wind.mp4


+ 3 - 1
src/utils/threejs/main.worker.ts

@@ -14,7 +14,9 @@ export function initModalWorker() {
     'fm/fm_2023-06-02.glb',
     'fm/Fm-door_2023-11-29.glb',
     'fm/Fm-wire_2023-11-29.glb',
+    'fm/Fm-wire-qd_2023-11-28.glb',
     'fm/Fm-wall_2023-11-29.glb',
+    'fm/Fm-wall-qd_2023-11-28.glb',
     'fm/fmThree_2023-07-25.glb',
     'fm/fmThreeBase_2023-07-25.glb',
 
@@ -53,7 +55,7 @@ export function initModalWorker() {
     'fire/nitrogen_2023-06-02.glb',
     'fire/nitrogenUnderground_2023-09-15.glb',
     'fire/grout_2023-06-02.glb',
-    'fire/Bertai_2023-11-29.glb',//lxh
+    'fire/Bertai_2023-11-29.glb', //lxh
     'fire/balancePress_2023-07-20.glb',
     'yafeng/compressor_2023-07-10.glb',
     'gas/gasPump_2023-08-18.glb',

+ 3 - 0
src/views/vent/deviceManager/comment/NormalTable.vue

@@ -188,7 +188,10 @@ const saveOrUpdateHandler = async (params) => {
   try {
     await props.saveOrUpdate(params, isUpdate.value);
     !props.showTab ? closeModal() : '';
+    debugger
     await doRequest(props.list, { confirm: false });
+    debugger
+    reload()
     emit('submitSuccess', params)
   } catch (error) {
     message.error('保存失败,请联系管理员');

+ 1 - 1
src/views/vent/deviceManager/pointTabel/point.api.ts

@@ -34,7 +34,7 @@ export const queryDeviceList = (params) => defHttp.get({ url: Api.queryDevice, p
  * @param params
  */
 export const list = (params) => {
-  if (params['devicetype']) params['devicetype'] = params['devicetype'] + '*';
+  if (params && params['devicetype']) params['devicetype'] = params['devicetype'] + '*';
   return defHttp.get({ url: Api.list, params });
 };
 

+ 7 - 5
src/views/vent/home/colliery/components/main-monitor.vue

@@ -58,14 +58,16 @@ function changeSelect(val) {
   const selectData = mainList.find((item) => item['deviceID'] == val)
   if(selectData){
     objParam = {
-      dataQ: selectData.readData.Fan1m3 || selectData.readData.Fan2m3 || selectData.readData.m3,
-      dataH: Math.abs(Number(selectData.readData.Fan1FanPre || selectData.readData.Fan2FanPre || selectData.readData.DataPa || 0)),
+      // dataQ: selectData.readData.Fan1m3 || selectData.readData.Fan2m3 || selectData.readData.m3,
+      // dataH: Math.abs(Number(selectData.readData.Fan1FanPre || selectData.readData.Fan2FanPre || selectData.readData.DataPa || 0)),
+      dataQ: 8529,
+      dataH: 686,
     }
     objParam1 = {
       dataha0: -0.056,
-      dataha1: 3.6491,
-      dataha2: 434.4,
-      dataha3: 100,
+      dataha1: 1.0491, // 3.6491
+      dataha2: 304.4, // 404.4
+      dataha3: 155, // 100
       dataha4: -1000,
     }
     setChart(objParam, objParam1);

+ 2 - 2
src/views/vent/home/colliery/components/work-monitor.vue

@@ -156,11 +156,11 @@ function getOption() {
 
       yAxis: [
         {
-          name: 'm³/s',
+          name: 'm³/min',
           nameTextStyle: {
             color: '#b3b8cc',
             fontSize: 12,
-            padding: -10,
+            padding: -5,
           },
           min: 0,
           splitNumber: 3,

+ 2 - 2
src/views/vent/home/colliery/index.vue

@@ -199,8 +199,8 @@ function getList() {
           drag_1: 380,
           drag_2: 167,
           drag_3: 333,
-          drag_total: 680 + (Math.random() * 2 - 1 * 5),
-          m3_total: 8138 + (Math.random() * 2 - 1 * 20)
+          drag_total: Math.abs(Number(res.fanmain[0].readData.Fan1FanPre || res.fanmain[0].readData.Fan2FanPre || res.fanmain[0].readData.DataPa ||  680 + (Math.random() * 2 - 1 * 5))),
+          m3_total: Number(res.fanmain[0].readData.Fan1m3 || res.fanmain[0].readData.Fan2m3 || res.fanmain[0].readData.m3 || 8138 + (Math.random() * 2 - 1 * 20))
         }
       })
       lineList.value = paramArr

+ 15 - 3
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -230,17 +230,29 @@ import { onMounted } from 'vue';
                     value: '2',
                   },
                   {
-                    label: '1分钟',
+                    label: '30秒',
                     value: '3',
                   },
                   {
-                    label: '5分钟',
+                    label: '1分钟',
                     value: '4',
                   },
                   {
-                    label: '10分钟',
+                    label: '5分钟',
                     value: '5',
                   },
+                  {
+                    label: '10分钟',
+                    value: '6',
+                  },
+                  {
+                    label: '30分钟',
+                    value: '7',
+                  },
+                  {
+                    label: '1小时',
+                    value: '8',
+                  },
                 ],
               },
               colProps: {

+ 14 - 10
src/views/vent/monitorManager/compressor/components/nitrogenHome1.vue

@@ -1,14 +1,16 @@
 <template>
+  <div>{{ Math.random() }}</div>
+  <div id="nitrogen3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"></div>
   <div id="nitrogenCss3D" class="threejs-Object-CSS"
     style="width: 100%; height: 100%; position: absolute; pointer-events: none; overflow: hidden; z-index: 2; top: 0px; left: 0px">
     <a-spin :spinning="loading" />
     <template>
-      <div v-for="groupNum in monitorDataGroupNum" :key="groupNum" class="modal-monitor">
+      <div v-for="groupNum in 2" :key="groupNum" class="modal-monitor" >
         <fourBorderBg :class="`kyj${groupNum}`" :id="`nitrogenMonitor${groupNum}`">
           <div class="title">{{ monitorData[groupNum - 1]['strname'] }} </div>
           <div class="monitor-item">
             <span class="monitor-title">排气压力:</span>
-            <span class="monitor-val"><span class="val">{{
+            <span class="monitor-val" v-if="!refresh"><span class="val">{{
               monitorData[groupNum - 1]['AirCompressor_ExhaustPre'] ? monitorData[groupNum -
               1]['AirCompressor_ExhaustPre'] : '-'
             }}</span>
@@ -16,23 +18,23 @@
           </div>
           <div class="monitor-item">
             <span class="monitor-title">累计流量:</span>
-            <span class="monitor-val"><span class="val">{{ monitorData[groupNum - 1]['FluxTotal1'] ? parseFloat(monitorData[groupNum - 1]['FluxTotal1']).toFixed(2) : '-'}}</span><span class="unit">m³/h</span></span>
+            <span class="monitor-val" v-if="!refresh"><span class="val">{{ monitorData[groupNum - 1]['FluxTotal1'] ? parseFloat(monitorData[groupNum - 1]['FluxTotal1']).toFixed(2) : '-' }}</span><span class="unit">m³/h</span></span>
           </div>
           <div class="monitor-item">
             <span class="monitor-title">氮气纯度:</span>
-            <span class="monitor-val"><span class="val">{{ monitorData[groupNum - 1]['NitrogenPurity'] ? parseFloat(monitorData[groupNum -1]['NitrogenPurity']).toFixed(2) : '-' }}</span>
+            <span class="monitor-val" v-if="!refresh"><span class="val">{{ monitorData[groupNum - 1]['NitrogenPurity'] ? parseFloat(monitorData[groupNum - 1]['NitrogenPurity']).toFixed(2) : '-' }}</span>
             <span class="unit">%</span></span>
           </div>
           <div class="monitor-item">
             <span class="monitor-title">运行时间:</span>
-            <span class="monitor-val"><span class="val">{{
+            <span class="monitor-val" v-if="!refresh"><span class="val">{{
               monitorData[groupNum - 1]['AirCompressor_RunTime'] ? monitorData[groupNum - 1]['AirCompressor_RunTime'] :
               '-'
             }}</span><span class="unit">h</span></span>
           </div>
           <div class="monitor-item">
             <span class="monitor-title">加载时间:</span>
-            <span class="monitor-val"><span class="val">{{
+            <span class="monitor-val" v-if="!refresh"><span class="val">{{
               monitorData[groupNum - 1]['AirCompressor_LoadTime'] ? monitorData[groupNum - 1]['AirCompressor_LoadTime']
               : '-'
             }}</span><span class="unit">h</span></span>
@@ -41,7 +43,6 @@
       </div>
     </template>
   </div>
-  <div id="nitrogen3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"></div>
   <div class="nitrogen-home">
     <div class="nitrogen-container">
       <div class="top-box">
@@ -172,11 +173,10 @@
 import { onMounted, onUnmounted, ref, watch, reactive, defineProps, nextTick, inject, computed } from 'vue';
 import ventBox1 from '/@/components/vent/ventBox1.vue';
 import fourBorderBg from '../../../comment/components/fourBorderBg.vue';
-import { mountedThree, destroy, setModelType } from '../nitrogen.threejs';
+import { mountedThree, destroy, setModelType, addText } from '../nitrogen.threejs';
 import { getDevice } from '../nitrogen.api';
 import { SvgIcon } from '/@/components/Icon';
 import BarAndLine from '/@/components/chart/BarAndLine.vue';
-import { zhudanOption } from '../nitrogen.data.ts';
 import HandleModal from './modal.vue';
 import { deviceControlApi } from '/@/api/vent/index';
 import { message } from 'ant-design-vue';
@@ -193,6 +193,7 @@ const props = defineProps({
     require: true,
   },
 });
+const refresh = ref(false)
 const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
 const modalType = ref(''); // 模态框内容显示类型,设备操作类型
 const modalIsShow = ref<boolean>(false); // 是否显示模态框
@@ -203,7 +204,6 @@ let kzParam = reactive<any>({
 });
 
 // const kyjs = ['1号空压机', '1号空压机', '1号空压机', '1号空压机'];
-
 const flvURL1 = () => {
   // return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
   return '';
@@ -547,6 +547,10 @@ async function getDataSource(systemID) {
       }
     });
     monitorDataGroupNum.value = monitorData.value.length;
+    refresh.value = true
+    nextTick(() => {
+      refresh.value = false
+    })
   }
 
 

+ 4 - 6
src/views/vent/monitorManager/compressor/nitrogen.dishang.threejs.ts

@@ -124,17 +124,15 @@ class NitrogenOverground {
   };
 
   addCssText = () => {
+    debugger;
     if (this.nitrogenNum > 0) {
       for (let i = 0; i < this.nitrogenNum; i++) {
         const nitrogenModal = this.group.getObjectByName('nitrogenModal' + i) as THREE.Object3D;
         if (nitrogenModal && !nitrogenModal.getObjectByName('monitorNitrogenText')) {
           const element = document.getElementById('nitrogenMonitor' + (i + 1)) as HTMLElement;
           if (element) {
-            const elementCopy = element.cloneNode(true) as HTMLElement;
-            elementCopy.style.top = '0px';
-            elementCopy.style.left = '0px';
-            const nitrogenMonitorCSS3D = new CSS3DSprite(elementCopy);
-            nitrogenMonitorCSS3D.name = 'monitorNitrogenText';
+            const nitrogenMonitorCSS3D = new CSS3DSprite(element);
+            nitrogenMonitorCSS3D.name = 'monitorNitrogenText' + i;
             nitrogenMonitorCSS3D.scale.set(0.003, 0.003, 0.003);
             if (i == 0) nitrogenMonitorCSS3D.position.set(-0.89, 0.31, 0);
             if (i == 1) nitrogenMonitorCSS3D.position.set(-0.89, 0.31, 0.04);
@@ -157,7 +155,7 @@ class NitrogenOverground {
       }
     }
   };
-  
+
   /**
    * 处理杯子的纹理和杯子外层透明壳子
    */

+ 2 - 4
src/views/vent/monitorManager/compressor/nitrogen.dixia.threejs.ts

@@ -191,10 +191,7 @@ class NitrogenUnderground {
         if (this.group && !this.group.getObjectByName('monitorNitrogenText' + i)) {
           const element = document.getElementById('nitrogenMonitor' + (i + 1)) as HTMLElement;
           if (element) {
-            const elementCopy = element.cloneNode(true) as HTMLElement;
-            elementCopy.style.top = '0px';
-            elementCopy.style.left = '0px';
-            const nitrogenMonitorCSS3D = new CSS3DSprite(elementCopy);
+            const nitrogenMonitorCSS3D = new CSS3DSprite(element);
             nitrogenMonitorCSS3D.name = 'monitorNitrogenText' + i;
             nitrogenMonitorCSS3D.scale.set(0.0045, 0.0045, 0.0045);
             if (i == 0) nitrogenMonitorCSS3D.position.set(-0.89, 0.31, 0);
@@ -202,6 +199,7 @@ class NitrogenUnderground {
             // if (i == 2) nitrogenMonitorCSS3D.position.set(-0.89, 0.31, 0.08);
             // if (i == 3) nitrogenMonitorCSS3D.position.set(-0.89, 0.31, 0.12);
             this.group.add(nitrogenMonitorCSS3D);
+          } else {
           }
         }
       }

+ 9 - 6
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -588,7 +588,6 @@
             MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID'])
           }
         }
-        selectData = Object.assign(deviceBaseList.value, lodash.cloneDeep(initData)) 
     
         if(dataSource.value.length > 0 && dataSource.value[selectRowIndex.value] ){
           Object.assign(selectData, dataSource.value[selectRowIndex.value])
@@ -597,7 +596,6 @@
           // playAnimation(data, selectData.maxarea);
           playSmoke(selectData)
         }else{
-          // lodash.omit(selectData, lodash.keys(selectData))
           Object.assign(selectData, initData)
           deviceType.value = ''
         }
@@ -624,14 +622,19 @@
 
     if (!id) return;
     loading.value = true;
-    const baseDataIndex: any = dataSource.value.findIndex((baseData: any) => baseData.deviceID == id);
-    selectRowIndex.value = baseDataIndex;
-    modalType.value = baseDataIndex > 0 ? 'fm' : 'fc';
+    const selectIndex: any = dataSource.value.findIndex((baseData: any) => baseData.deviceID == id);
+    selectRowIndex.value = selectIndex;
+    modalType.value = selectIndex > 0 ? 'fm' : 'fc';
+
+    const baseData = deviceBaseList.value.find(item => item['id'] == id) || {}
+    selectData = Object.assign({}, lodash.cloneDeep(initData), baseData)
+
     nextTick(() => {
       setModelType(modalType.value).then(() => {
         loading.value = false;
       });
-      const data = dataSource.value[baseDataIndex];
+      
+      const data = dataSource.value[selectIndex];
       if (data['Fan1StartStatus'] == 1) {
         mainWindIsShow1.value = 'open';
         mainWindIsShow2.value = 'stop';

+ 45 - 6
src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHome.vue

@@ -1,9 +1,21 @@
 <template>
-  <!-- <div id="FlowSensor" class="FlowSensor-box" style="position: absolute;" v-if="selectData.FlowSensor_InputFlux">
+  <div id="FlowSensor" class="FlowSensor-box" style="position: absolute;" v-if="selectData.FlowSensor_InputFlux">
     <div class="elementContent" >
-      <p style="color: #50c8fc;"><span class="data-title">抽采泵流量(m³):</span>{{ formatNum(selectData.FlowSensor_InputFlux) }}</p>
+      <fourBorderBg >
+        <template v-for="(item, index) in modelMonitor" :key="index">
+          <!-- <div v-if="selectData[item.code] != undefined" class="gas-monitor-row">
+          <div class="title">{{ item.title }}</div>
+          <div class="value">{{ selectData[item.code] ? selectData[item.code] : '-' }}</div>
+        </div> -->
+          <div class="gas-monitor-row">
+            <div class="title">{{ item.title }}</div>
+            <div class="value">{{ selectData[item.code] ? selectData[item.code] : '-' }}</div>
+          </div>
+        </template>
+      </fourBorderBg>
+      <!-- <p style="color: #50c8fc;"><span class="data-title">抽采泵流量(m³):</span>{{ formatNum(selectData.FlowSensor_InputFlux) }}</p> -->
     </div>
-  </div> -->
+  </div>
   <div class="monitor-container">
     <div class="lr left-box">
       <div class="left-container">
@@ -158,7 +170,7 @@
 import { onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps, watch, inject } from 'vue';
 import ventBox1 from '/@/components/vent/ventBox1.vue'
 import { setModelType } from '../gasPump.threejs';
-import { stateHeader, valveState, pumpMonitorData, waterPumpData, dewateringPumpData, pumpCtrlType, valveCtrlType, valveCtrl, PumpCtrlItems, pumpCtrl } from '../gasPump.data'
+import { stateHeader, valveState, pumpMonitorData, waterPumpData, dewateringPumpData, modelMonitor, valveCtrlType, valveCtrl, PumpCtrlItems, pumpCtrl } from '../gasPump.data'
 import { list } from '../gasPump.api';
 import { SvgIcon } from '/@/components/Icon'
 import { formatNum } from '/@/utils/ventutil'
@@ -167,6 +179,8 @@ import { useModal } from '/@/components/Modal';
 import { deviceControlApi } from '/@/api/vent/index';
 import PasswordModal from '../../comment/components/PasswordModal.vue'
 import { message } from 'ant-design-vue';
+import fourBorderBg from '/@/components/vent/fourBorderBg.vue'
+
 const globalConfig = inject('globalConfig');
 
 const props = defineProps({
@@ -338,6 +352,33 @@ onUnmounted(() => {
 @import '/@/design/vent/modal.less';
 @import '../../comment/less/workFace.less';
 @ventSpace: zxm;
+.elementContent{
+  :deep(.main-container){
+    display: flex;
+    flex-wrap: wrap;
+    width: 690px;
+    padding: 10px 12px;
+    .gas-monitor-row{
+      display: flex;
+      flex-direction: row;
+      flex-wrap: wrap;
+      color: #fff;
+      line-height: 32px;
+      .title{
+        width: 250px;
+        color: #b5e9ff;
+      }
+      .value{
+        width: 80px;
+        color: #EFAE05;
+      }
+    }
+  }
+  
+  
+}
+
+
 .lr{
   margin-top: 0 !important;
 }
@@ -390,7 +431,6 @@ onUnmounted(() => {
     }
   }
 }
-
 .control-group{
   display: flex;
   // justify-content: space-around;
@@ -439,7 +479,6 @@ onUnmounted(() => {
   }
 
 }
-
 .input-box{
   width: calc(100%);
   display: flex;

+ 44 - 1
src/views/vent/monitorManager/gasPumpMonitor/gasPump.data.ts

@@ -184,10 +184,53 @@ export const PumpCtrlItems = [
     code: '_HMILeakageTest',
   },
 ];
+export const stateHeader = ['设备名称', '是否健康', '开失败', '关失败', '控制方式'];
 
+export const modelMonitor = [
+  {
+    title: '泵站输入管道内工混流量(m³/min)',
+    code: 'mixedTraffic',
+  },
+  {
+    title: '泵站内瓦斯(%CH₄)',
+    code: 'gas2',
+  },
+  {
+    title: '泵站输入管道内标况流量(m³/min)',
+    code: 'standardTraffic',
+  },
+  {
+    title: '泵站输入管道内瓦斯(%CH₄)',
+    code: 'gas3',
+  },
+  {
+    title: '泵站输入管道内工混累计(m³)',
+    code: 'totalGasDrainage',
+  },
 
-export const stateHeader = ['设备名称', '是否健康', '开失败', '关失败', '控制方式'];
+  {
+    title: '泵站管道输出瓦斯(%CH₄)',
+    code: 'gas4',
+  },
+  {
+    title: '泵站输入管道内一氧化碳(ppm)',
+    code: 'coVal',
+  },
+
+  {
+    title: '泵站管路出口30米处瓦斯(%CH₄)',
+    code: 'gas1',
+  },
+  {
+    title: '泵站内温度(℃)',
+    code: 'temp',
+  },
 
+  {
+    title: '泵站输入管道内温度(℃)',
+    code: 'pipeTemp',
+  },
+];
 
 
 

+ 2 - 2
src/views/vent/monitorManager/gasPumpMonitor/gasPump.threejs.ts

@@ -82,8 +82,8 @@ export const setModelType = (type) => {
         await animateCamera(
           oldCameraPosition,
           { x: 0.544, y: 0.3335, z: 0.29222 },
-          { x: 3.3224253129798633, y: 2.3189559678790963, z: 5.1822770949018695 },
-          { x: 0.7866051731597254, y: -0.21180783848684975, z: 0.20318654152228077 },
+          { x: 2.251260457704923, y: 2.249230134562109, z: 5.528231094367331 },
+          { x: 0.750543563879473, y: 0.33743172913019404, z: -0.10376343561678486 },
           model,
           0.6
         );

+ 2 - 2
src/views/vent/monitorManager/gasPumpMonitor/gasPump.threejs.under.ts

@@ -43,8 +43,8 @@ class gasPumpUnder {
         parentElement.appendChild(element);
         const fanLocalCSS3D = new CSS3DObject(element);
         fanLocalCSS3D.name = 'text1';
-        fanLocalCSS3D.scale.set(0.015, 0.015, 0.015);
-        fanLocalCSS3D.position.set(0, 0.92, 0);
+        fanLocalCSS3D.scale.set(0.007, 0.007, 0.007);
+        fanLocalCSS3D.position.set(0, 1.6, 0);
         this.group.add(fanLocalCSS3D);
       }
     }

+ 60 - 6
src/views/vent/monitorManager/gateMonitor/gate.threejs.ts

@@ -1,6 +1,7 @@
 import * as THREE from 'three';
 import UseThree from '../../../../utils/threejs/useThree';
-import Fm1 from './gate.threejs.two';
+import Fm1 from './gate.threejs.yy';
+import Fm3 from './gate.threejs.qd';
 import Fm2 from './gate.threejs.three';
 import { animateCamera } from '/@/utils/threejs/util';
 import useEvent from '../../../../utils/threejs/useEvent';
@@ -9,6 +10,7 @@ import useEvent from '../../../../utils/threejs/useEvent';
 let model,
   fm1: Fm1,
   fm2: Fm2,
+  fm3: Fm3,
   group: THREE.Object3D,
   fmType = '';
 
@@ -25,6 +27,8 @@ const startAnimation = () => {
       fm1.mouseUpModel.call(fm1);
     } else if (fmType === 'fm2') {
       fm2.mouseUpModel.call(fm2);
+    } else if (fmType === 'fm3') {
+      fm3.mouseUpModel.call(fm3);
     }
   });
 };
@@ -37,6 +41,8 @@ const mouseEvent = (event) => {
         fm1.mousedownModel.call(fm1, intersects);
       } else if (fmType === 'fm2' && fm2) {
         fm2.mousedownModel.call(fm2, intersects);
+      } else if (fmType === 'fm3' && fm3) {
+        fm3.mousedownModel.call(fm3, intersects);
       }
     });
     // console.log('摄像头控制信息', model.orbitControls, model.camera);
@@ -48,12 +54,16 @@ export const addMonitorText = (selectData) => {
     return fm1.addMonitorText.call(fm1, selectData);
   } else if (fmType === 'fm2' && fm2) {
     return fm2.addMonitorText.call(fm2, selectData);
+  } else if (fmType === 'fm3' && fm3) {
+    return fm3.addMonitorText.call(fm3, selectData);
   }
 };
 
 export const deviceDetailCard = () => {
   if (fmType === 'fm1') {
     return fm1.deviceDetailCard.call(fm1);
+  } else if (fmType === 'fm3') {
+    return fm3.deviceDetailCard.call(fm3);
   } else {
     // return fm2.addMonitorText.call(fm2);
   }
@@ -64,6 +74,8 @@ export const play = (handlerState, flag?) => {
     return fm1.play.call(fm1, handlerState, flag);
   } else if (fmType === 'fm2' && fm2) {
     return fm2.play.call(fm2, handlerState, flag);
+  } else if (fmType === 'fm3' && fm3) {
+    return fm3.play.call(fm3, handlerState, flag);
   }
 };
 
@@ -72,7 +84,6 @@ export const setModelType = (type) => {
   fmType = type;
   return new Promise((resolve) => {
     // 暂停风门1动画
-
     if (fmType === 'fm1' && fm1 && fm1.group) {
       fm1.clipActionArr.frontDoor.reset();
       fm1.clipActionArr.frontDoor.time = 0.5;
@@ -92,6 +103,9 @@ export const setModelType = (type) => {
       if (model.scene.getObjectByName('fm2')) {
         model.scene.remove(fm2.group);
       }
+      if (model.scene.getObjectByName('fm3')) {
+        model.scene.remove(fm3.group);
+      }
       const oldCameraPosition = { x: -1000, y: 100, z: 500 };
       setTimeout(async () => {
         resolve(null);
@@ -122,6 +136,9 @@ export const setModelType = (type) => {
       if (model.scene.getObjectByName('fm1')) {
         model.scene.remove(fm1.group);
       }
+      if (model.scene.getObjectByName('fm3')) {
+        model.scene.remove(fm3.group);
+      }
       const oldCameraPosition = { x: -761, y: 569, z: 871 };
       setTimeout(async () => {
         resolve(null);
@@ -136,6 +153,41 @@ export const setModelType = (type) => {
           0.6
         );
       }, 300);
+    } else if (fmType === 'fm3' && fm3 && fm3.group) {
+      fm3.clipActionArr.frontDoor.reset();
+      fm3.clipActionArr.frontDoor.time = 0.5;
+      fm3.clipActionArr.backDoor.reset();
+      fm3.clipActionArr.backDoor.time = 0.5;
+      fm3.clipActionArr.frontDoor.stop();
+      fm3.clipActionArr.backDoor.stop();
+
+      if (fm3.frontDamperOpenMesh) fm3.frontDamperOpenMesh.visible = false;
+      if (fm3.frontDamperClosedMesh) fm3.frontDamperClosedMesh.visible = true;
+      if (fm3.backDamperOpenMesh) fm3.backDamperOpenMesh.visible = false;
+      if (fm3.backDamperClosedMesh) fm3.backDamperClosedMesh.visible = true;
+
+      model.startAnimation = fm3.render.bind(fm3);
+      group = fm3.group;
+      group.rotation.y = 0;
+      if (model.scene.getObjectByName('fm2')) {
+        model.scene.remove(fm2.group);
+      }
+      if (model.scene.getObjectByName('fm1')) {
+        model.scene.remove(fm1.group);
+      }
+      const oldCameraPosition = { x: -1000, y: 100, z: 500 };
+      setTimeout(async () => {
+        resolve(null);
+        model.scene.add(fm3.group);
+        await animateCamera(
+          oldCameraPosition,
+          { x: 0, y: 0, z: 0 },
+          { x: 50.99, y: 69.32, z: 93.61 },
+          { x: -10.04, y: -14.38, z: -31.4 },
+          model,
+          0.8
+        );
+      }, 300);
     }
   });
 };
@@ -145,8 +197,9 @@ export const initCameraCanvas = async (playerVal1) => {
   if (fmType === 'fm1' && fm1) {
     return await fm1.initCamera.call(fm1, playerVal1);
   } else if (fmType === 'fm2' && fm2) {
-    console.log('fm2-------', playerVal1);
     return fm2.initCamera.call(fm2, playerVal1);
+  } else if (fmType === 'fm3' && fm3) {
+    return fm3.initCamera.call(fm3, playerVal1);
   }
 };
 
@@ -161,7 +214,8 @@ export const mountedThree = (playerDom) => {
     await fm1.mountedThree(playerDom);
     fm2 = new Fm2(model);
     await fm2.mountedThree(playerDom);
-
+    fm3 = new Fm3(model);
+    await fm3.mountedThree(playerDom);
     model.animate();
     resolve(null);
     startAnimation();
@@ -171,12 +225,12 @@ export const mountedThree = (playerDom) => {
 export const destroy = () => {
   if (model) {
     model.isRender = false;
-
-    console.log('场景销毁前信息----------->', model.renderer?.info);
     if (fm1) fm1.destroy();
     if (fm2) fm2.destroy();
+    if (fm3) fm3.destroy();
     fm1 = null;
     fm2 = null;
+    fm3 = null;
     group = null;
     model.mixers = [];
     model.destroy();

+ 0 - 564
src/views/vent/monitorManager/gateMonitor/gate.threejs.two.ts

@@ -1,564 +0,0 @@
-import * as THREE from 'three';
-import { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer.js';
-import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
-import UseThree from '../../../../utils/threejs/useThree';
-import { drawHot } from '/@/utils/threejs/util';
-import { useAppStore } from '/@/store/modules/app';
-
-// import * as dat from 'dat.gui';
-// const gui = new dat.GUI();
-// gui.domElement.style = 'position:absolute;top:100px;left:10px;z-index:99999999999999';
-
-class Fm1 {
-  modelName = 'fm1';
-  model; //
-  group;
-  isLRAnimation = true; // 是否开启左右摇摆动画
-  direction = 1; // 摇摆方向
-  animationTimer: NodeJS.Timeout | null = null; // 摇摆开启定时器
-  player1;
-  player2;
-  deviceDetailCSS3D;
-  playerStartClickTime1 = new Date().getTime();
-  playerStartClickTime2 = new Date().getTime();
-
-  fmClock = new THREE.Clock();
-  mixers: THREE.AnimationMixer | undefined;
-  appStore = useAppStore();
-
-  backDamperOpenMesh;
-  backDamperClosedMesh;
-  frontDamperOpenMesh;
-  frontDamperClosedMesh;
-
-  clipActionArr = {
-    frontDoor: null as unknown as THREE.AnimationAction,
-    backDoor: null as unknown as THREE.AnimationAction,
-  };
-
-  constructor(model) {
-    this.model = model;
-  }
-
-  addLight() {
-    const directionalLight = new THREE.DirectionalLight(0xffffff, 1.5);
-    directionalLight.position.set(344, 690, 344);
-    this.group?.add(directionalLight);
-    directionalLight.target = this.group as THREE.Object3D;
-
-    const pointLight2 = new THREE.PointLight(0xffeeee, 1, 300);
-    pointLight2.position.set(-4, 10, 1.8);
-    pointLight2.shadow.bias = 0.05;
-    this.group?.add(pointLight2);
-
-    const pointLight3 = new THREE.PointLight(0xffeeee, 1, 200);
-    pointLight3.position.set(-0.5, -0.5, 0.75);
-    pointLight3.shadow.bias = 0.05;
-    this.group?.add(pointLight3);
-
-    // const pointLight4 = new THREE.PointLight(0xffeeee, 1, 150);
-    // pointLight4.position.set(4.3, 1, -0.9);
-    // pointLight4.shadow.bias = 0.05;
-    // this.group?.add(pointLight4);
-
-    // const pointLight5 = new THREE.PointLight(0xffeeee, 1, 150);
-    // pointLight5.position.set(4.3, 1, -0.9);
-    // pointLight5.shadow.bias = 0.05;
-    // this.group?.add(pointLight5);
-
-    // const pointLight6 = new THREE.PointLight(0xffeeee, 1, 150);
-    // pointLight6.position.set(-4.4, 1, -0.9);
-    // pointLight6.shadow.bias = 0.05;
-    // this.group?.add(pointLight6);
-
-    // const pointLightHelper2 = new THREE.PointLightHelper(pointLight2, 1);
-    // this.model.scene?.add(pointLightHelper2);
-
-    // gui.add(pointLight2.position, 'x', -300, 300);
-    // gui.add(pointLight2.position, 'y', -300, 300);
-    // gui.add(pointLight2.position, 'z', -300, 300);
-
-    // gui.add(pointLight3.position, 'x', -300, 300);
-    // gui.add(pointLight3.position, 'y', -300, 300);
-    // gui.add(pointLight3.position, 'z', -300, 300);
-  }
-  // 重置摄像头
-  resetCamera() {
-    this.model.camera.far = 274;
-    this.model.orbitControls?.update();
-    this.model.camera.updateProjectionMatrix();
-  }
-  // 设置模型位置
-  setModalPosition() {
-    this.group?.scale.set(22, 22, 22);
-    this.group?.position.set(-20, 20, 9);
-  }
-
-  /* 添加监控数据 */
-  addMonitorText(selectData) {
-    if (!this.group) {
-      return;
-    }
-    const textArr = [
-      {
-        text: `远程控制自动风门`,
-        font: 'normal 30px Arial',
-        color: '#00FF00',
-        strokeStyle: '#007400',
-        x: 120,
-        y: 100,
-      },
-      {
-        text: `巷道径高度(m):`,
-        font: 'normal 30px Arial',
-        color: '#00FF00',
-        strokeStyle: '#007400',
-        x: 0,
-        y: 155,
-      },
-      {
-        text: `${selectData.fclearheight ? selectData.fclearheight : '-'}`,
-        font: 'normal 30px Arial',
-        color: '#00FF00',
-        strokeStyle: '#007400',
-        x: 290,
-        y: 155,
-      },
-      {
-        text: `巷道径宽度(m): `,
-        font: 'normal 30px Arial',
-        color: '#00FF00',
-        strokeStyle: '#007400',
-        x: 0,
-        y: 215,
-      },
-      {
-        text: ` ${selectData.fclearwidth ? selectData.fclearwidth : '-'}`,
-        font: 'normal 30px Arial',
-        color: '#00FF00',
-        strokeStyle: '#007400',
-        x: 280,
-        y: 215,
-      },
-      {
-        text: `故障诊断:`,
-        font: 'normal 30px Arial',
-        color: '#00FF00',
-        strokeStyle: '#007400',
-        x: 0,
-        y: 275,
-      },
-      {
-        text: `${selectData.warnLevel_str ? selectData.warnLevel_str : '-'}`,
-        font: 'normal 30px Arial',
-        color: '#00FF00',
-        strokeStyle: '#007400',
-        x: 280,
-        y: 275,
-      },
-      {
-        text: History_Type['type'] == 'remote' ? `国能神东煤炭集团监制` : '煤炭科学技术研究院有限公司研制',
-        font: 'normal 28px Arial',
-        color: '#00FF00',
-        strokeStyle: '#007400',
-        x: History_Type['type'] == 'remote' ? 80 : 20,
-        y: 325,
-      },
-    ];
-
-    //
-    getTextCanvas(526, 346, textArr, '').then((canvas: HTMLCanvasElement) => {
-      const textMap = new THREE.CanvasTexture(canvas); // 关键一步
-      textMap.colorSpace = THREE.SRGBColorSpace;
-      const textMaterial = new THREE.MeshBasicMaterial({
-        // 关于材质并未讲解 实操即可熟悉                 这里是漫反射类似纸张的材质,对应的就有高光类似金属的材质.
-        map: textMap, // 设置纹理贴图
-        transparent: true,
-        side: THREE.FrontSide, // 这里是双面渲染的意思
-      });
-      textMaterial.blending = THREE.CustomBlending;
-      const monitorPlane = this.group.getObjectByName('monitorText');
-      if (monitorPlane) {
-        monitorPlane.material = textMaterial;
-      } else {
-        const planeGeometry = new THREE.PlaneGeometry(526, 346); // 平面3维几何体PlaneGeometry
-        const planeMesh = new THREE.Mesh(planeGeometry, textMaterial);
-        planeMesh.name = 'monitorText';
-        planeMesh.scale.set(0.002, 0.002, 0.002);
-        planeMesh.position.set(3.685, 0.09, -0.41);
-        this.group.add(planeMesh);
-      }
-      textMap.dispose();
-    });
-  }
-
-  /** 添加热点 */
-  drawHots() {
-    const hotPositions = [
-      { x: -0.37, y: 0.26, z: -0.32 },
-      { x: 0.28, y: -0.2, z: -0.43 },
-      { x: 0.55, y: -0.22, z: -0.38 },
-    ];
-    for (let i = 0; i < 3; i++) {
-      const hotPoint = drawHot(0.1);
-      const position = hotPositions[i];
-      hotPoint.scale.set(0.1, 0.1, 0.1);
-      hotPoint.position.set(position.x, position.y, position.z);
-      hotPoint.name = 'hotPoint' + i;
-      this.group?.add(hotPoint);
-    }
-  }
-
-  /* 风门动画 */
-  render() {
-    if (!this.model) {
-      return;
-    }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
-
-    if (this.mixers && this.fmClock.running) {
-      this.mixers.update(2);
-    }
-  }
-
-  /* 点击风窗,风窗全屏 */
-  mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
-    if (this.animationTimer) {
-      clearTimeout(this.animationTimer);
-      this.animationTimer = null;
-    }
-
-    // 判断是否点击到视频
-    intersects.find((intersect) => {
-      const mesh = intersect.object;
-      // if (mesh.name === 'player1') {
-      //   if (new Date().getTime() - this.playerStartClickTime1 < 400) {
-      //     // 双击,视频放大
-      //     if (this.player1) {
-      //       this.player1.requestPictureInPicture();
-      //     }
-      //   }
-      //   this.playerStartClickTime1 = new Date().getTime();
-      //   return true;
-      // } else if (mesh.name === 'player2') {
-      //   if (new Date().getTime() - this.playerStartClickTime2 < 400) {
-      //     // 双击,视频放大
-      //     if (this.player2) {
-      //       this.player2.requestPictureInPicture();
-      //     }
-      //   }
-      //   this.playerStartClickTime2 = new Date().getTime();
-      //   return true;
-      // } else if (mesh.name.startsWith('hotPoint')) {
-      //   if (this.deviceDetailCSS3D) {
-      //     this.deviceDetailCSS3D.position.set(mesh.position.x + 0.035, mesh.position.y + 0.68, mesh.position.z + 0.02);
-      //     console.log('[ deviceDetailCSS3D.position ] >', this.deviceDetailCSS3D.position);
-      //     this.deviceDetailCSS3D.visible = true;
-      //     return true;
-      //   }
-      // } else {
-      //   if (this.deviceDetailCSS3D) this.deviceDetailCSS3D.visible = false;
-      //   console.log('[ 点击事件 ] >');
-      // }
-      return false;
-    });
-  }
-
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
-
-  /* 提取风门序列帧,初始化前后门动画 */
-  initAnimation() {
-    const fmGroup = this.group?.getObjectByName('Fm-door');
-    if (fmGroup) {
-      const tracks = fmGroup.animations[0].tracks;
-      const fontTracks: any[] = [],
-        backTracks: any[] = [];
-      for (let i = 0; i < tracks.length; i++) {
-        const track = tracks[i];
-        if (track.name.startsWith('qianmen')) {
-          fontTracks.push(track);
-        } else if (track.name.startsWith('houmen')) {
-          backTracks.push(track);
-        }
-      }
-
-      this.mixers = new THREE.AnimationMixer(fmGroup);
-
-      const frontDoor = new THREE.AnimationClip('frontDoor', 4, fontTracks);
-      const frontClipAction = this.mixers.clipAction(frontDoor, fmGroup);
-      frontClipAction.clampWhenFinished = true;
-      frontClipAction.loop = THREE.LoopOnce;
-      this.clipActionArr.frontDoor = frontClipAction;
-
-      const backDoor = new THREE.AnimationClip('backDoor', 4, backTracks);
-      const backClipAction = this.mixers.clipAction(backDoor, fmGroup);
-      backClipAction.clampWhenFinished = true;
-      backClipAction.loop = THREE.LoopOnce;
-      this.clipActionArr.backDoor = backClipAction;
-    }
-  }
-
-  deviceDetailCard(position = { x: 0, y: 0, z: 0 }) {
-    const element = document.getElementById('deviceCard') as HTMLElement;
-    if (element) {
-      this.deviceDetailCSS3D = new CSS2DObject(element);
-      this.deviceDetailCSS3D.name = 'deviceCard';
-      this.deviceDetailCSS3D.position.set(position.x, position.y, position.z);
-      this.deviceDetailCSS3D.visible = false;
-      // this.model.scene.add(this.deviceDetailCSS3D);
-      this.group.add(this.deviceDetailCSS3D);
-    }
-  }
-
-  // 播放动画
-  play(handlerState, timeScale = 0.01) {
-    let handler = () => {};
-    switch (handlerState) {
-      case 1: // 打开前门
-        handler = () => {
-          this.clipActionArr.frontDoor.paused = true;
-          this.clipActionArr.frontDoor.reset();
-          this.clipActionArr.frontDoor.time = 1.2;
-          this.clipActionArr.frontDoor.timeScale = timeScale;
-          // this.clipActionArr.frontDoor.clampWhenFinished = true;
-          this.clipActionArr.frontDoor.play();
-          this.fmClock.start();
-
-          // 显示打开前门文字
-          if (this.frontDamperOpenMesh) this.frontDamperOpenMesh.visible = true;
-          if (this.frontDamperClosedMesh) this.frontDamperClosedMesh.visible = false;
-        };
-        break;
-      case 2: // 关闭前门
-        handler = () => {
-          this.clipActionArr.frontDoor.paused = true;
-          this.clipActionArr.frontDoor.reset(); //
-          this.clipActionArr.frontDoor.time = 4;
-          this.clipActionArr.frontDoor.timeScale = -timeScale;
-          // this.clipActionArr.frontDoor.clampWhenFinished = true;
-          this.clipActionArr.frontDoor.play();
-          this.fmClock.start();
-
-          if (this.frontDamperOpenMesh) this.frontDamperOpenMesh.visible = false;
-          if (this.frontDamperClosedMesh) this.frontDamperClosedMesh.visible = true;
-        };
-        break;
-      case 3: // 打开后门
-        handler = () => {
-          this.clipActionArr.backDoor.paused = true;
-          this.clipActionArr.backDoor.reset();
-          this.clipActionArr.backDoor.time = 1.2;
-          this.clipActionArr.backDoor.timeScale = timeScale;
-          // this.clipActionArr.backDoor.clampWhenFinished = true;
-          this.clipActionArr.backDoor.play();
-          this.fmClock.start();
-
-          if (this.backDamperOpenMesh) this.backDamperOpenMesh.visible = true;
-          if (this.backDamperClosedMesh) this.backDamperClosedMesh.visible = false;
-        };
-        break;
-      case 4: // 关闭后门
-        handler = () => {
-          this.clipActionArr.backDoor.paused = true;
-          this.clipActionArr.backDoor.reset();
-          this.clipActionArr.backDoor.time = 4;
-          this.clipActionArr.backDoor.timeScale = -timeScale;
-          // this.clipActionArr.backDoor.clampWhenFinished = true;
-          this.clipActionArr.backDoor.play();
-          this.fmClock.start();
-
-          if (this.backDamperOpenMesh) this.backDamperOpenMesh.visible = false;
-          if (this.backDamperClosedMesh) this.backDamperClosedMesh.visible = true;
-        };
-        break;
-      // case 5: // 打开前后门
-      //   handler = () => {
-      //     this.clipActionArr.backDoor.paused = true;
-      //     this.clipActionArr.frontDoor.paused = true;
-
-      //     this.clipActionArr.frontDoor.reset();
-      //     this.clipActionArr.frontDoor.time = 0;
-      //     this.clipActionArr.frontDoor.timeScale = 0.01;
-      //     this.clipActionArr.frontDoor.clampWhenFinished = true;
-      //     this.clipActionArr.frontDoor.play();
-
-      //     this.clipActionArr.backDoor.reset();
-      //     this.clipActionArr.backDoor.time = 0;
-      //     this.clipActionArr.backDoor.timeScale = 0.01;
-      //     this.clipActionArr.backDoor.clampWhenFinished = true;
-      //     this.clipActionArr.backDoor.play();
-      //     this.frontClock.start();
-      //     this.backClock.start();
-      //   };
-      //   break;
-      // case 6: // 关闭前后门
-      //   handler = () => {
-      //     debugger;
-      //     this.clipActionArr.backDoor.paused = true;
-      //     this.clipActionArr.frontDoor.paused = true;
-
-      //     this.clipActionArr.frontDoor.reset();
-      //     this.clipActionArr.frontDoor.time = 4;
-      //     this.clipActionArr.frontDoor.timeScale = -0.01;
-      //     this.clipActionArr.frontDoor.clampWhenFinished = true;
-      //     this.clipActionArr.frontDoor.play();
-      //     this.clipActionArr.backDoor.reset();
-      //     this.clipActionArr.backDoor.time = 4;
-      //     this.clipActionArr.backDoor.timeScale = -0.01;
-      //     this.clipActionArr.backDoor.clampWhenFinished = true;
-      //     this.clipActionArr.backDoor.play();
-      //     this.frontClock.start();
-      //     this.backClock.start();
-      //   };
-      //   break;
-      default:
-    }
-
-    handler();
-    // model.clock.start();
-    // const honglvdeng = group.getObjectByName('honglvdeng');
-    // const material = honglvdeng.material;
-    // setTimeout(() => {
-    //   if (handlerState === 2 || handlerState === 4 || handlerState === 6) {
-    //     material.color = new THREE.Color(0x00ff00);
-    //   } else {
-    //     material.color = new THREE.Color(0xff0000);
-    //   }
-    // }, 1000);
-  }
-
-  async initCamera(dom1) {
-    const videoPlayer1 = dom1;
-    this.player1 = dom1;
-    let monitorPlane: THREE.Mesh | null = null;
-    if (!videoPlayer1) {
-      const textArr = [
-        {
-          text: `无信号输入`,
-          font: 'normal 40px Arial',
-          color: '#009900',
-          strokeStyle: '#002200',
-          x: 170,
-          y: 40,
-        },
-      ];
-      const canvas = await getTextCanvas(320, 180, '', 'noSinge.png');
-
-      let textMaterial: THREE.MeshBasicMaterial | null = null;
-      if (canvas) {
-        const textMap = new THREE.CanvasTexture(canvas); // 关键一步
-        textMaterial = new THREE.MeshBasicMaterial({
-          map: textMap, // 设置纹理贴图
-          transparent: true,
-          side: THREE.DoubleSide, // 这里是双面渲染的意思
-        });
-        textMaterial.blending = THREE.CustomBlending;
-
-        const planeGeometry = new THREE.PlaneGeometry(100, 100); // 平面3维几何体PlaneGeometry
-        monitorPlane = new THREE.Mesh(planeGeometry, textMaterial);
-
-        textMaterial.dispose();
-        planeGeometry.dispose();
-        textMap.dispose();
-      }
-    }
-    const player1 = this.group.getObjectByName('player1');
-    if (player1) {
-      this.model.clearMesh(player1);
-      this.group.remove(player1);
-    }
-    const noPlayer1 = this.group.getObjectByName('noPlayer1');
-    if (noPlayer1) {
-      this.model.clearMesh(noPlayer1);
-      this.group.remove(noPlayer1);
-    }
-    if (!videoPlayer1 && videoPlayer1 === null) {
-      if (monitorPlane && !this.group.getObjectByName('noPlayer1')) {
-        const planeMesh = monitorPlane.clone();
-        planeMesh.name = 'noPlayer1';
-        planeMesh.scale.set(0.0085, 0.0055, 0.012);
-        planeMesh.position.set(-3.64, 0.01, -0.41);
-        this.group?.add(planeMesh.clone());
-      }
-    } else if (videoPlayer1) {
-      try {
-        const mesh = renderVideo(this.group, videoPlayer1, 'player1');
-        if (mesh) {
-          mesh?.scale.set(-0.0275, 0.028, 1);
-          mesh?.position.set(-3.643, 0.02, -0.4);
-          mesh.rotation.y = -Math.PI;
-          this.group.add(mesh);
-        }
-      } catch (error) {
-        console.log('视频信号异常');
-      }
-    }
-  }
-
-  mountedThree(playerDom) {
-    this.group = new THREE.Object3D();
-    this.group.name = this.modelName;
-    return new Promise((resolve) => {
-      this.model.setGLTFModel(['Fm-door', 'Fm-wire', 'Fm-wall'], this.group).then(() => {
-        this.setModalPosition();
-        // 初始化左右摇摆动画;
-        this.initAnimation();
-        // this.drawHots();
-        this.addLight();
-        // this.deviceDetailCard();
-        this.model.animate();
-
-        this.backDamperOpenMesh = this.group.getObjectByName('Dampler_open_1');
-        if (this.backDamperOpenMesh) this.backDamperOpenMesh.visible = false;
-        this.backDamperClosedMesh = this.group.getObjectByName('Damper_Closed_1');
-        if (this.backDamperClosedMesh) this.backDamperClosedMesh.visible = true;
-
-        this.frontDamperOpenMesh = this.group.getObjectByName('Damper_Open_2');
-        if (this.frontDamperOpenMesh) this.frontDamperOpenMesh.visible = false;
-        this.frontDamperClosedMesh = this.group.getObjectByName('Damper_Closed_2');
-        if (this.frontDamperClosedMesh) this.frontDamperClosedMesh.visible = true;
-
-        resolve(this.model);
-        this.initCamera(playerDom);
-      });
-    });
-  }
-
-  destroy() {
-    if (this.model) {
-      if (this.mixers) {
-        this.mixers.uncacheClip(this.clipActionArr.frontDoor.getClip());
-        this.mixers.uncacheClip(this.clipActionArr.backDoor.getClip());
-        this.mixers.uncacheAction(this.clipActionArr.frontDoor.getClip(), this.group);
-        this.mixers.uncacheAction(this.clipActionArr.backDoor.getClip(), this.group);
-        this.mixers.uncacheRoot(this.group);
-
-        if (this.model.animations[0]) this.model.animations[0].tracks = [];
-      }
-      this.model.clearGroup(this.group);
-      this.clipActionArr.backDoor = undefined;
-      this.clipActionArr.frontDoor = undefined;
-
-      this.mixers = undefined;
-
-      // document.getElementById('damper3D').parentElement.remove(document.getElementById('damper3D'))
-    }
-  }
-}
-export default Fm1;

+ 4 - 2
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -321,8 +321,10 @@ async function getSelectRow(selectRow, index) {
   let type;
   if (selectData.deviceType == 'gate_ss') {
     type = 'fm2'
-  } else {
-    type = 'fm1'
+  } else if(selectData.deviceType == 'gate_qd') {
+    type = 'fm3'
+  } else{
+    type = 'fm1' // 液压
   }
   setModelType(type).then(async() => {
     addMonitorText(selectData);

+ 1 - 1
src/views/vent/monitorManager/windrectMonitor/windrect.api.ts

@@ -7,7 +7,7 @@ enum Api {
   deviceList = '/safety/ventanalyWind/list',
   resultList = '/safety/testwind/list',
   importExcel = '/sys/user/importExcel',
-  exportXls = 'safety/testwindDetail/exportXls',
+  exportXls = '/safety/testwindDetail/exportXls',
   cameraList = '/safety/ventanalyCamera/list',
   cameraAddrList = '/ventanaly-device/camera/info',
 }