Explorar o código

Merge branch 'master' of http://182.92.126.35:3000/hrx/mky-vent-base

lxh hai 3 semanas
pai
achega
65f315f81e

+ 4 - 4
.env.development

@@ -6,8 +6,8 @@ VITE_PUBLIC_PATH = /
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
 #VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
-# VITE_PROXY = [["/jeecgsystem","http://182.92.126.35:9999"],["/upload","http://182.92.126.35:9999/upload"],["/documents", "http://182.92.126.35:9050"],["/modelreq", "http://182.92.126.35:9999"],["/webRtc", "http://182.92.126.35:8051"]]
-VITE_PROXY = [["/jeecgsystem","http://192.168.183.88:9999"],["/upload","http://192.168.183.88:9999/upload"],["/documents", "http://192.168.183.88:9050"],["/modelreq", "http://192.168.183.88:9999"],["/webRtc", "http://192.168.183.88:8051"]]
+VITE_PROXY = [["/jeecgsystem","http://182.92.126.35:9999"],["/upload","http://182.92.126.35:9999/upload"],["/documents", "http://182.92.126.35:9050"],["/modelreq", "http://182.92.126.35:9999"],["/webRtc", "http://182.92.126.35:8051"]]
+# VITE_PROXY = [["/jeecgsystem","http://192.168.183.88:9999"],["/upload","http://192.168.183.88:9999/upload"],["/documents", "http://192.168.183.88:9050"],["/modelreq", "http://192.168.183.88:9999"],["/webRtc", "http://192.168.183.88:8051"]]
 # VITE_PROXY = [["/jeecgsystem","http://10.10.150.72:9999"],["/upload","http://localhost:3300/upload"],["/documents", "http://10.10.150.72:9050"],["/modelreq", "http://10.10.150.72:9999"],["/webRtc", "http://192.168.183.216:8051"]]
 #VITE_PROXY = [["/jeecgsystem","http://192.168.1.8:9999"],["/upload","http://localhost:3300/upload"]]
 
@@ -29,7 +29,7 @@ VITE_GLOB_API_URL_PREFIX=
 
 #微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
 #VITE_APP_SUB_APP = [["micro-need-air", "//10.10.150.72:8099/"], ["micro-vent-3dModal", "//localhost:8091/"], ["micro-fire-front", "//localhost:8090/"]]
-VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.88:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
-# VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.154:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
+# VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.88:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
+VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.154:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
 # VITE_APP_SUB_APP = [["micro-vent-3dModal", "//182.92.126.35:8091/", "micro-vent-3dModal"], ["micro-need-air", "//182.92.126.35:8099/", "micro-need-air"], ["micro-fire-front", "//182.92.126.35:8097/", "fire-Micro"]]
 # VITE_APP_SUB_APP = [["micro-vent-3dModal", "//localhost:8091/"], ["micro-need-air", "//localhost:8099/"], ["micro-fire-front", "//localhost:8090/"]]

+ 8 - 7
src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHomeCC.vue

@@ -238,7 +238,7 @@
   const modelMonitorTags = getModelMonitorTags();
 
   // 监测数据
-  const selectData = reactive({});
+  const selectData = ref({});
 
   const { getCamera, removeCamera } = useCamera();
 
@@ -251,7 +251,7 @@
           async () => {
             if (props.deviceId) {
               const data = await getDataSource(props.deviceId);
-              Object.assign(selectData, data);
+              selectData.value = data;
             }
             if (timer) {
               timer = null;
@@ -505,14 +505,14 @@
   function handler(passWord, paramcode) {
     let value = '';
     if (paramcode == 'ykjdqh') {
-      value = selectData['paramcode'] == '1' ? '2' : '1';
+      value = selectData.value['paramcode'] == '1' ? '2' : '1';
     }
     if (paramcode == 'jxmsqh') {
-      value = selectData['jxmsqh'] == '1' ? '2' : '1';
+      value = selectData.value['jxmsqh'] == '1' ? '2' : '1';
     }
     const data = {
-      deviceid: selectData['deviceID'],
-      devicetype: selectData['deviceType'],
+      deviceid: selectData.value['deviceID'],
+      devicetype: selectData.value['deviceType'],
       paramcode: paramcode,
       password: passWord,
       value: value,
@@ -567,7 +567,7 @@
   onMounted(async () => {
     timer = null;
     await getMonitor(true);
-    if (selectData && selectData['deviceID']) await getCamera(selectData['deviceID'], playerRef.value);
+    if (selectData.value && selectData.value['deviceID']) await getCamera(selectData.value['deviceID'], playerRef.value);
   });
 
   onBeforeUnmount(() => {
@@ -702,6 +702,7 @@
     display: flex;
     align-items: end;
     bottom: 80px;
+    right: 330px;
     :deep(#LivePlayerBox) {
       display: flex;
       justify-content: end;

+ 79 - 80
src/views/vent/monitorManager/gasPumpMonitor/gasPump.dataCc2_1.ts

@@ -7,73 +7,63 @@ export const leftMonitor = [
       {
         title: '',
         childTitle: ['1#瓦斯泵', '2#瓦斯泵'],
-        key: ['CentrifugalPump1_MOT_', 'CentrifugalPump2_MOT_'],
+        key: ['CentrifugalPump1_', 'CentrifugalPump2_'],
         list: [
           {
-            title: '上位启动',
-            code: 'HMIStart',
-            type: 'sign',
-          },
-          {
-            title: '联动启动',
-            code: 'InterlockStart',
+            title: '阀门开限位',
+            code: 'GVL1_OpenLimit',
             type: 'warning',
           },
           {
-            title: '联动停止',
-            code: 'InterlockStop',
+            title: '阀门关限位',
+            code: 'GVL1_CloseLimit',
             type: 'sign',
           },
           {
             title: '健康信号',
-            code: 'Healthy',
+            code: 'PU_Healthy',
             type: 'sign',
           },
           {
             title: '平均电压(V)',
-            code: 'AvgVoltage',
+            code: 'MOT_AvgVoltage',
             type: '',
           },
           {
             title: 'A相电流(A)',
-            code: 'Ia',
+            code: 'MOT_Ia',
             type: '',
           },
           {
             title: 'B相电流(A)',
-            code: 'Ib',
+            code: 'MOT_Ib',
             type: '',
           },
           {
             title: 'C相电流(A)',
-            code: 'Ic',
+            code: 'MOT_Ic',
             type: '',
           },
-          // {
-          //   title: 'A相绕组温度(℃)',
-          //   code: 'PhaseATemp',
-          //   type: '',
-          // },
-          // {
-          //   title: 'B相绕组温度(℃)',
-          //   code: 'PhaseBTemp',
-          //   type: '',
-          // },
-          // {
-          //   title: 'C相绕组温度(℃)',
-          //   code: 'PhaseCTemp',
-          //   type: '',
-          // },
           {
             title: '前轴温度(℃)',
-            code: 'FrontAxleTemp',
+            code: 'MOT_FrontAxleTemp',
             type: '',
           },
           {
             title: '后轴温度(℃)',
-            code: 'BackAxleTemp',
+            code: 'MOT_BackAxleTemp',
             type: '',
           },
+          {
+            title: '前轴超温报警',
+            code: 'MOT_FrontAxleOverTempAlarm',
+            type: 'sign',
+          },
+          {
+            title: '后轴超温报警',
+            code: 'MOT_BackAxleOverTempAlarm',
+            type: 'sign',
+          },
         ],
       },
     ],
@@ -182,46 +172,46 @@ export const rightMonitor = [
   //     },
   //   ],
   // },
-  {
-    type: 'table',
-    title: '阀门运行状态',
-    stateHeader: ['设备名称', '开启', '停止', '健康', '模式'],
-    children: [
-      {
-        title: '抽气阀',
-        key: ['CentrifugalPump1_GVL1_', 'CentrifugalPump1_GVL2_'],
-        childTitle: ['1#注水阀', '2#注水阀'],
-      },
-      {
-        title: '排气阀',
-        key: ['CentrifugalPump2_GVL1_', 'CentrifugalPump2_GVL2_'],
-        childTitle: ['1#排气阀', '2#排气阀'],
-      },
-    ],
-    list: [
-      {
-        title: '开启',
-        type: '',
-        code: 'OpenLimit',
-      },
-      {
-        title: '停止',
-        type: '',
-        code: 'CloseLimit',
-      },
-      {
-        title: '健康',
-        type: '',
-        code: 'Healthy',
-      },
-      {
-        title: '模式',
-        type: '',
-        code: 'CtrlMode',
-        dict: { '1': '控制', '0': '就地' },
-      },
-    ],
-  },
+  // {
+  //   type: 'table',
+  //   title: '阀门运行状态',
+  //   stateHeader: ['设备名称', '开启', '停止', '健康', '模式'],
+  //   children: [
+  //     {
+  //       title: '抽气阀',
+  //       key: ['CentrifugalPump1_GVL1_', 'CentrifugalPump1_GVL2_'],
+  //       childTitle: ['1#注水阀', '2#注水阀'],
+  //     },
+  //     {
+  //       title: '排气阀',
+  //       key: ['CentrifugalPump2_GVL1_', 'CentrifugalPump2_GVL2_'],
+  //       childTitle: ['1#排气阀', '2#排气阀'],
+  //     },
+  //   ],
+  //   list: [
+  //     {
+  //       title: '开启',
+  //       type: '',
+  //       code: 'OpenLimit',
+  //     },
+  //     {
+  //       title: '停止',
+  //       type: '',
+  //       code: 'CloseLimit',
+  //     },
+  //     {
+  //       title: '健康',
+  //       type: '',
+  //       code: 'Healthy',
+  //     },
+  //     {
+  //       title: '模式',
+  //       type: '',
+  //       code: 'CtrlMode',
+  //       dict: { '1': '控制', '0': '就地' },
+  //     },
+  //   ],
+  // },
   {
     type: 'list',
     title: '瓦斯泵预警监测',
@@ -232,11 +222,11 @@ export const rightMonitor = [
         childTitle: ['1#瓦斯泵', '2#瓦斯泵'],
         key: ['CentrifugalPump1_MOT_', 'CentrifugalPump2_MOT_'],
         list: [
-          {
-            title: 'A相超温报警',
-            code: 'PhaseATempAlarm',
-            type: 'warning',
-          },
+          // {
+          //   title: 'A相超温报警',
+          //   code: 'PhaseATempAlarm',
+          //   type: 'warning',
+          // },
           {
             title: 'B相超温报警',
             code: 'PhaseBTempAlarm',
@@ -379,12 +369,21 @@ export const detailCtrl = [
 
 export const modelMonitor = [
   {
+    title: '负压(KPa)',
+    code: 'FanPre',
+  },
+  {
     title: '泵站内温度(℃)',
     code: 'TemperatureSensor_Temp',
   },
   {
     title: '水仓液位(m)',
-    code: 'LiquidLevelSensor_Level',
+    code: 'VSL_LiquidLevelSensor_Level',
+  },
+  {
+    title: '双瓦斯泵停泵报警',
+    code: 'PumpStopAlarm1',
+    type: 'warning',
   },
   {
     title: '泵站温度低报警',
@@ -398,12 +397,12 @@ export const modelMonitor = [
   },
   {
     title: '水仓液位低报警',
-    code: 'LiquidLevelSensor_LowWaterAlarm',
+    code: 'VSL_LiquidLevelSensor_LowWaterAlarm',
     type: 'warning',
   },
   {
     title: '水仓液位高报警',
-    code: 'LiquidLevelSensor_HighWaterAlarm',
+    code: 'VSL_LiquidLevelSensor_HighWaterAlarm',
     type: 'warning',
   },
 ];

+ 110 - 114
src/views/vent/monitorManager/gasPumpMonitor/gasPump.dataCc2_2.ts

@@ -10,18 +10,23 @@ export const leftMonitor = [
         key: ['CentrifugalPump1_', 'CentrifugalPump2_'],
         list: [
           {
-            title: '淡水流量(mg/㎡)',
-            code: 'FlowSensor1_InputFlux',
+            title: '变频器电流(A)',
+            code: 'VFD_Current',
             type: '',
           },
           {
-            title: '浓水流量2(mg/㎡)',
-            code: 'FlowSensor2_InputFlux',
+            title: '变频器频率(Hz)',
+            code: 'VFD_Frequency',
             type: '',
           },
           {
-            title: '除尘喷雾流量(mg/㎡)',
-            code: 'FlowSensor3_InputFlux',
+            title: '变频器电压(V)',
+            code: 'VFD_DCBusVoltage',
+            type: '',
+          },
+          {
+            title: '泵轴温(℃)',
+            code: 'MOT_FrontAxleTemp',
             type: '',
           },
           {
@@ -39,37 +44,6 @@ export const leftMonitor = [
             code: 'LiquidLevelSensor3_Level',
             type: '',
           },
-          {
-            title: '变频器状态',
-            code: 'VFD_Status',
-            type: '',
-            dict: { '1': '开启', '0': '停止' },
-          },
-          {
-            title: '泵轴温(℃)',
-            code: 'PU_Temp',
-            type: '',
-          },
-          {
-            title: '减速机轴温(℃)',
-            code: 'GEA_Temp',
-            type: '',
-          },
-          {
-            title: 'A相绕组温度(℃)',
-            code: 'MOT_PhaseATemp',
-            type: '',
-          },
-          {
-            title: 'B相绕组温度(℃)',
-            code: 'MOT_PhaseBTemp',
-            type: '',
-          },
-          {
-            title: 'C相绕组温度(℃)',
-            code: 'MOT_PhaseCTemp',
-            type: '',
-          },
         ],
       },
     ],
@@ -127,11 +101,21 @@ export const rightMonitor = [
             type: '',
           },
           {
+            title: '高压泵入口压力(Pa)',
+            code: 'PressureSensor3_InletPressure',
+            type: '',
+          },
+          {
             title: '膜前入口压力(Pa)',
             code: 'PressureSensor1_InletPressure',
             type: '',
           },
           {
+            title: '膜间压力(Pa)',
+            code: 'PressureSensor1_Pressure',
+            type: '',
+          },
+          {
             title: '淡水流量(mg/㎡)',
             code: 'FlowSensor1_InputFlux',
             type: '',
@@ -148,49 +132,49 @@ export const rightMonitor = [
 ];
 
 export const detailCtrl = [
-  // {
-  //   title: '回路控制',
-  //   type: [
-  //     {
-  //       title: '1回路',
-  //       childTitle: ['1回路'],
-  //       key: ['PD13_SG1_Loop1'],
-  //     },
-  //     {
-  //       title: '2回路',
-  //       childTitle: ['2回路'],
-  //       key: ['PD13_SG1_Loop2'],
-  //     },
-  //     {
-  //       title: '3回路',
-  //       childTitle: ['3回路'],
-  //       key: ['PD13_SG1_Loop3'],
-  //     },
-  //     {
-  //       title: '4回路',
-  //       childTitle: ['4回路'],
-  //       key: ['PD13_SG1_Loop4'],
-  //     },
-  //   ],
-  //   items: [
-  //     {
-  //       title: '分闸运行',
-  //       code: '_HMISwitchOff',
-  //     },
-  //     {
-  //       title: '合闸运行',
-  //       code: '_HMISwitchOn',
-  //     },
-  //     {
-  //       title: '远程短路试验',
-  //       code: '_HMIShortTest',
-  //     },
-  //     {
-  //       title: '远程漏电试验',
-  //       code: '_HMILeakageTest',
-  //     },
-  //   ],
-  // },
+  {
+    title: '回路控制',
+    type: [
+      {
+        title: '1回路',
+        childTitle: ['1回路'],
+        key: ['PD13_SG1_Loop1'],
+      },
+      {
+        title: '2回路',
+        childTitle: ['2回路'],
+        key: ['PD13_SG1_Loop2'],
+      },
+      {
+        title: '3回路',
+        childTitle: ['3回路'],
+        key: ['PD13_SG1_Loop3'],
+      },
+      {
+        title: '4回路',
+        childTitle: ['4回路'],
+        key: ['PD13_SG1_Loop4'],
+      },
+    ],
+    items: [
+      {
+        title: '分闸运行',
+        code: '_HMISwitchOff',
+      },
+      {
+        title: '合闸运行',
+        code: '_HMISwitchOn',
+      },
+      {
+        title: '远程短路试验',
+        code: '_HMIShortTest',
+      },
+      {
+        title: '远程漏电试验',
+        code: '_HMILeakageTest',
+      },
+    ],
+  },
   {
     title: '泵站控制',
     type: [
@@ -225,44 +209,56 @@ export const detailCtrl = [
       },
     ],
   },
-  // {
-  //   title: '阀门控制',
-  //   type: [
-  //     {
-  //       title: '注水阀',
-  //       childTitle: ['1#注水阀', '2#注水阀'],
-  //       key: ['PD13_SG1', 'PD13_SG2'],
-  //     },
-  //     {
-  //       title: '抽气阀',
-  //       childTitle: ['1#抽气阀', '2#抽气阀'],
-  //       key: ['PD13_SG4', 'PD13_SG6'],
-  //     },
-  //     {
-  //       title: '排气阀',
-  //       childTitle: ['1#排气阀', '2#排气阀'],
-  //       key: ['PD13_SG3', 'PD13_SG5'],
-  //     },
-  //   ],
-  //   items: [
-  //     {
-  //       title: '开启',
-  //       code: '_HMIOpen',
-  //     },
-  //     {
-  //       title: '关闭',
-  //       code: '_HMIClose',
-  //     },
-  //     {
-  //       title: '停止',
-  //       code: '_HMIStop',
-  //     },
-  //   ],
-  // },
+  {
+    title: '阀门控制',
+    type: [
+      {
+        title: '注水阀',
+        childTitle: ['1#注水阀', '2#注水阀'],
+        key: ['PD13_SG1', 'PD13_SG2'],
+      },
+      {
+        title: '抽气阀',
+        childTitle: ['1#抽气阀', '2#抽气阀'],
+        key: ['PD13_SG4', 'PD13_SG6'],
+      },
+      {
+        title: '排气阀',
+        childTitle: ['1#排气阀', '2#排气阀'],
+        key: ['PD13_SG3', 'PD13_SG5'],
+      },
+    ],
+    items: [
+      {
+        title: '开启',
+        code: '_HMIOpen',
+      },
+      {
+        title: '关闭',
+        code: '_HMIClose',
+      },
+      {
+        title: '停止',
+        code: '_HMIStop',
+      },
+    ],
+  },
 ];
 
 export const modelMonitor = [
   {
+    title: '管道流量(m³/min)',
+    code: 'FlowSensor_InputFlux',
+  },
+  {
+    title: '泵站标况年混量(m³)',
+    code: 'totalGasDrainage',
+  },
+  {
+    title: '抽放管道内CO含量(ppm)',
+    code: 'coVal',
+  },
+  {
     title: '抽放管道甲烷正压侧1(%)',
     code: 'gas1',
   },

+ 323 - 0
src/views/vent/monitorManager/windowMonitor/dandaoFcBd3.threejs.ts

@@ -0,0 +1,323 @@
+import * as THREE from 'three';
+
+import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
+import gsap from 'gsap';
+
+class ddFc_7 {
+  model;
+  modelName = 'ddFcGroup';
+  group: THREE.Object3D = new THREE.Object3D();
+  animationTimer;
+  isLRAnimation = true;
+  direction = 1;
+  windowsActionArr = {
+    frontWindow: [],
+    backWindow: [],
+  };
+  player1;
+  player2;
+  playerStartClickTime1 = new Date().getTime();
+  mixers: THREE.AnimationMixer | undefined;
+  frontClipAction;
+  constructor(model) {
+    this.model = model;
+    this.group.name = 'ddFcGroup';
+  }
+  addLight = () => {
+    if (!this.group || !this.group) return;
+
+    const directionalLight = new THREE.DirectionalLight(0xffffff, 2);
+    directionalLight.position.set(-437, 61, 559);
+    this.group.add(directionalLight);
+
+    const pointLight2 = new THREE.PointLight(0xffffff, 1, 150);
+    pointLight2.position.set(-101, 34, 16);
+    pointLight2.shadow.bias = 0.05;
+    this.group.add(pointLight2);
+
+    const pointLight3 = new THREE.PointLight(0xffffff, 1, 150);
+    pointLight3.position.set(19, 25, -7);
+    pointLight3.shadow.bias = 0.05;
+    this.group.add(pointLight3);
+
+    const pointLight6 = new THREE.PointLight(0xffffff, 1, 300);
+    pointLight6.position.set(51, 51, 9);
+    pointLight6.shadow.bias = 0.05;
+    this.group.add(pointLight6);
+  };
+
+  // 设置模型位置
+  setModalPosition() {
+    this.group?.scale.set(22, 22, 22);
+    this.group?.position.set(-35, 25, 15);
+  }
+
+  addMonitorText(selectData) {
+    if (!this.group) {
+      return;
+    }
+    const screenDownText = VENT_PARAM['modalText']
+      ? VENT_PARAM['modalText']
+      : History_Type['type'] == 'remote'
+      ? `国能神东煤炭集团监制`
+      : '煤炭科学技术研究院有限公司研制';
+
+    const screenDownTextX = 90 - (screenDownText.length - 10) * 6;
+    const textArr = [
+      {
+        text: `远程定量调节自动风窗`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 100,
+        y: 95,
+      },
+      {
+        text: `${selectData.OpenDegree ? '开度值(°)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 145,
+      },
+      {
+        text: selectData.OpenDegree
+          ? Number(`${selectData.OpenDegree}`).toFixed(2)
+          : selectData.forntArea
+          ? Number(`${selectData.forntArea}`).toFixed(2)
+          : '-',
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 145,
+      },
+      {
+        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态:'}:`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 200,
+      },
+      {
+        text: `${
+          selectData.frontRearDP
+            ? selectData.frontRearDP
+            : selectData.windSpeed
+            ? selectData.windSpeed
+            : selectData.netStatus == '0'
+            ? '断开'
+            : '连接'
+        }`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 200,
+      },
+      {
+        text: `${selectData.fWindowM3 ? '过风量(m³/min)' : '风窗道数'}: `,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 250,
+      },
+      {
+        text: `${selectData.fWindowM3 ? selectData.fWindowM3 : selectData.nwindownum}`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 250,
+      },
+      {
+        text: screenDownText,
+        font: 'normal 28px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: screenDownTextX,
+        y: 300,
+      },
+    ];
+    getTextCanvas(750, 546, textArr, '').then((canvas: HTMLCanvasElement) => {
+      const textMap = new THREE.CanvasTexture(canvas); // 关键一步
+      const textMaterial = new THREE.MeshBasicMaterial({
+        // 关于材质并未讲解 实操即可熟悉                 这里是漫反射类似纸张的材质,对应的就有高光类似金属的材质.
+        map: textMap, // 设置纹理贴图
+        transparent: true,
+        side: THREE.DoubleSide, // 这里是双面渲染的意思
+      });
+      textMap.dispose();
+      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.003, 0.0034, 0.004);
+        planeMesh.position.set(4.25, 0.44, -0.27);
+        this.group?.add(planeMesh);
+      }
+    });
+  }
+
+  /* 提取风门序列帧,初始化前后门动画 */
+  initAnimation() {
+    debugger;
+    const modalGroup = this.group?.getObjectByName('ddFc-bd3');
+    // 初始化窗得动画
+    const meshArr01: THREE.Object3D[] = [];
+    const meshArr02: THREE.Object3D[] = [];
+    const fmGroup = modalGroup?.getObjectByName('FengMen_ShouDong_1')?.getObjectByName('FengMen_1');
+    const fcGroup1 = fmGroup?.getObjectByName('Men_1');
+    const fcGroup2 = fmGroup?.getObjectByName('Men_2');
+    if (fcGroup1 && fcGroup2) {
+      fcGroup1.getObjectByName('shanye_1')?.children.filter((obj) => {
+        if (obj.name.includes('shanye_1')) {
+          obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 0);
+          meshArr01.push(obj);
+        }
+      });
+      fcGroup1.getObjectByName('shanye_2')?.children.filter((obj) => {
+        if (obj.name.includes('shanye_2')) {
+          obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 0);
+          meshArr01.push(obj);
+        }
+      });
+      fcGroup2.children.filter((obj) => {
+        if (obj.name.includes('shanye_3')) {
+          obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 0);
+          meshArr02.push(obj);
+        }
+      });
+      fcGroup2.getObjectByName('shanye_4')?.children.filter((obj) => {
+        if (obj.name.includes('shanye_4')) {
+          obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 0);
+          meshArr02.push(obj);
+        }
+      });
+      this.windowsActionArr.frontWindow = [...meshArr01];
+      this.windowsActionArr.backWindow = [...meshArr02];
+    }
+    // 初始化门的动画
+    if (modalGroup && fmGroup) {
+      const tracks = modalGroup.animations[0].tracks;
+      const fontTracks: any[] = [];
+      for (let i = 0; i < tracks.length; i++) {
+        const track = tracks[i];
+        if (track.name.startsWith('Men')) {
+          fontTracks.push(track);
+        }
+      }
+      this.mixers = new THREE.AnimationMixer(fmGroup);
+      const frontDoor = new THREE.AnimationClip('frontDoor', 15, fontTracks);
+      this.frontClipAction = this.mixers.clipAction(frontDoor, fmGroup);
+      this.frontClipAction.clampWhenFinished = true;
+      this.frontClipAction.reset();
+      this.frontClipAction.time = 0;
+      this.frontClipAction.timeScale = 1;
+      this.frontClipAction.clampWhenFinished = true;
+      this.frontClipAction.loop = THREE.LoopOnce;
+      this.frontClipAction.play();
+    }
+  }
+
+  play(rotationParam, flag) {
+    if (!this.windowsActionArr.frontWindow) {
+      return;
+    }
+    if (flag === 1) {
+      // 前风窗动画
+      this.windowsActionArr.frontWindow.forEach((mesh: THREE.Mesh) => {
+        gsap.to(mesh.rotation, {
+          z: THREE.MathUtils.degToRad(rotationParam.frontDeg1),
+          duration: (1 / 9) * Math.abs(rotationParam.frontDeg1 - mesh.rotation.z),
+          overwrite: true,
+        });
+      });
+    } else if (flag === 2) {
+      // 后风窗动画
+      this.windowsActionArr.backWindow.forEach((mesh: THREE.Mesh) => {
+        gsap.to(mesh.rotation, {
+          z: THREE.MathUtils.degToRad(rotationParam.backDeg1),
+          duration: (1 / 9) * Math.abs(rotationParam.backDeg1 - mesh.rotation.z),
+          overwrite: true,
+        });
+      });
+    } else if (flag === 0) {
+      ([...this.windowsActionArr.frontWindow] as THREE.Mesh[]).forEach((mesh) => {
+        gsap.to(mesh.rotation, {
+          z: THREE.MathUtils.degToRad(90),
+          overwrite: true,
+        });
+      });
+    }
+  }
+
+  /* 点击风窗,风窗全屏 */
+  mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
+    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.requestFullscreen();
+          }
+        }
+        this.playerStartClickTime1 = new Date().getTime();
+        return true;
+      }
+      return false;
+    });
+  }
+
+  mouseUpModel() {}
+
+  /* 风门动画 */
+  render() {
+    if (!this.model) {
+      return;
+    }
+    if (this.mixers) {
+      this.mixers.update(2);
+    }
+  }
+
+  mountedThree() {
+    return new Promise((resolve) => {
+      this.model.setGLTFModel(['ddFc-bd3'], this.group).then(() => {
+        console.log(this.group);
+        this.setModalPosition();
+        this.initAnimation();
+        resolve(null);
+      });
+    });
+  }
+
+  destroy() {
+    if (this.mixers) {
+      const modalGroup = this.group?.getObjectByName('ddFc-bd3');
+      const fmGroup = modalGroup?.getObjectByName('FengMen_ShouDong_1')?.getObjectByName('FengMen_1');
+      this.mixers.uncacheClip(this.frontClipAction.getClip());
+      this.mixers.uncacheAction(this.frontClipAction.getClip(), fmGroup);
+      if (fmGroup) this.mixers.uncacheRoot(fmGroup);
+      if (this.model.animations[0]) this.model.animations[0].tracks = [];
+    }
+    this.model.clearGroup(this.group);
+    this.windowsActionArr.frontWindow = undefined;
+    this.windowsActionArr.backWindow = undefined;
+    this.model = null;
+    this.group = null;
+  }
+}
+export default ddFc_7;

+ 22 - 0
src/views/vent/monitorManager/windowMonitor/window.threejs.ts

@@ -11,6 +11,7 @@ import sdFc_5 from './shuangdaoFcYjl.threejs'; // sdFc_5 双道-小门(侧边下
 import ddFc_4 from './dandaoFcBd1.threejs'; // ddFc_2 单道-一个小窗两列扇叶
 import ddFc_2 from './dandaoFcBd2.threejs'; // ddFc_2 单道-一个小窗两列扇叶
 import ddFc_6 from './dandaoFcHjt.threejs'; // ddFc_6 单道-大窗1列扇叶(活鸡兔)
+import ddFc_7 from './dandaoFcBd3.threejs'; // ddFc_6 单道-大窗1列扇叶(活鸡兔)
 import { animateCamera } from '/@/utils/threejs/util';
 import useEvent from '../../../../utils/threejs/useEvent';
 import { getDictItemsByCode } from '/@/utils/dict';
@@ -31,6 +32,7 @@ let model: UseThree,
   ddFc2: ddFc_2,
   ddFc4: ddFc_4,
   ddFc6: ddFc_6,
+  ddFc7: ddFc_7,
   singleWindowXkObj: singleWindowXk,
   group: THREE.Object3D,
   windowType = 'ddFc1';
@@ -61,6 +63,8 @@ const startAnimation = () => {
       ddFc4.mouseUpModel.call(ddFc4);
     } else if (windowType === 'ddFc6' && ddFc6) {
       ddFc6.mouseUpModel.call(ddFc6);
+    } else if (windowType === 'ddFc7' && ddFc7) {
+      ddFc7.mouseUpModel.call(ddFc7);
     } else if (windowType === 'sdFc1' && sdFc1) {
       sdFc1.mouseUpModel.call(sdFc1);
     } else if (windowType === 'sdFc3' && sdFc3) {
@@ -91,6 +95,8 @@ const mouseEvent = (event) => {
         ddFc4.mousedownModel.call(ddFc4, intersects);
       } else if (windowType === 'ddFc6' && ddFc6) {
         ddFc6.mousedownModel.call(ddFc6, intersects);
+      } else if (windowType === 'ddFc7' && ddFc7) {
+        ddFc7.mousedownModel.call(ddFc7, intersects);
       } else if (windowType === 'sdFc1' && sdFc1) {
         sdFc1.mousedownModel.call(sdFc1, intersects);
       } else if (windowType === 'sdFc3' && sdFc3) {
@@ -120,6 +126,8 @@ export const addMonitorText = (selectData) => {
     return ddFc4.addMonitorText.call(ddFc4, selectData);
   } else if (windowType === 'ddFc6' && ddFc6) {
     return ddFc6.addMonitorText.call(ddFc6, selectData);
+  } else if (windowType === 'ddFc7' && ddFc7) {
+    return ddFc7.addMonitorText.call(ddFc7, selectData);
   } else if (windowType === 'sdFc1' && sdFc1) {
     return sdFc1.addMonitorText.call(sdFc1, selectData);
   } else if (windowType === 'sdFc3' && sdFc3) {
@@ -220,6 +228,8 @@ export const play = (rotationParam, flag) => {
     return ddFc4.play.call(ddFc4, rotationParam, flag);
   } else if (windowType === 'ddFc6' && ddFc6) {
     return ddFc6.play.call(ddFc6, rotationParam, flag);
+  } else if (windowType === 'ddFc7' && ddFc7) {
+    return ddFc7.play.call(ddFc7, rotationParam, flag);
   } else if (windowType === 'sdFc1' && sdFc1) {
     return sdFc1.play.call(sdFc1, rotationParam, flag);
   } else if (windowType === 'sdFc3' && sdFc3) {
@@ -258,6 +268,12 @@ export const setModelType = (type) => {
       newP: { x: 66.257, y: 57.539, z: 94.313 },
       newT: { x: 0, y: 0, z: 0 },
     },
+    ddFc7: {
+      render: ddFc7 ? () => ddFc7.render() : null,
+      group: ddFc7 ? ddFc7.group : null,
+      newP: { x: 66.257, y: 57.539, z: 94.313 },
+      newT: { x: 0, y: 0, z: 0 },
+    },
     ddFc1: {
       render: ddFc1 ? () => ddFc1.render() : null,
       group: ddFc1 ? ddFc1.group : null,
@@ -368,6 +384,10 @@ export const mountedThree = () => {
           ddFc6 = new ddFc_6(model);
           await ddFc6.mountedThree();
           break;
+        case 'ddFc7':
+          ddFc7 = new ddFc_7(model);
+          await ddFc7.mountedThree();
+          break;
         case 'sdFc3':
           sdFc3 = new sdFc_3(model);
           await sdFc3.mountedThree();
@@ -405,6 +425,7 @@ export const destroy = () => {
     if (ddFc2) ddFc2.destroy();
     if (ddFc4) ddFc4.destroy();
     if (ddFc6) ddFc6.destroy();
+    if (ddFc7) ddFc7.destroy();
     if (sdFc1) sdFc1.destroy();
     if (sdFc3) sdFc3.destroy();
     if (sdFc4) sdFc4.destroy();
@@ -421,6 +442,7 @@ export const destroy = () => {
     ddFc2 = null;
     ddFc4 = null;
     ddFc6 = null;
+    ddFc7 = null;
     sdFc1 = null;
     sdFc3 = null;
     sdFc4 = null;