Browse Source

1. 主风机添加了保德、锦界、补连塔风机曲线
2. 测风模型加载优化
3. 风门新增带风窗的模型

hongrunxia 10 tháng trước cách đây
mục cha
commit
4b9b9cb18b
37 tập tin đã thay đổi với 1236 bổ sung410 xóa
  1. BIN
      public/model/glft/workFace/workFace1_2024-12-06.glb
  2. 1 1
      src/api/sys/user.ts
  3. 5 3
      src/layouts/default/header/components/user-dropdown/index.vue
  4. 1 0
      src/utils/threejs/main.worker.ts
  5. 1 0
      src/views/vent/comment/threejs/Smoke.ts
  6. 6 25
      src/views/vent/gas/gasAssessment/threejs/gasAssessmen.threejs.base.ts
  7. 10 10
      src/views/vent/gas/gasAssessment/threejs/gasAssessmen.threejs.ts
  8. 2 2
      src/views/vent/home/clique/index.vue
  9. 18 0
      src/views/vent/home/configurable/configurable.api.ts
  10. 4 4
      src/views/vent/monitorManager/alarmMonitor/common.api.ts
  11. 1 1
      src/views/vent/monitorManager/camera/index.vue
  12. 1 1
      src/views/vent/monitorManager/deviceMonitor/components/device/device.data.ts
  13. 1 1
      src/views/vent/monitorManager/deviceMonitor/components/device/index.vue
  14. 12 1
      src/views/vent/monitorManager/fanLocalMonitor/fanLocal.three.ts
  15. 17 10
      src/views/vent/monitorManager/fanLocalMonitor/index.vue
  16. 0 68
      src/views/vent/monitorManager/gateMonitor/gate.threejs.qd.ts
  17. 513 0
      src/views/vent/monitorManager/gateMonitor/gate.threejs.three.tl.ts
  18. 137 25
      src/views/vent/monitorManager/gateMonitor/gate.threejs.ts
  19. 78 24
      src/views/vent/monitorManager/gateMonitor/gate.threejs.window.ts
  20. 19 4
      src/views/vent/monitorManager/gateMonitor/index.vue
  21. 1 1
      src/views/vent/monitorManager/gateMonitor/modal.vue
  22. 21 11
      src/views/vent/monitorManager/mainFanMonitor/components/conditionAssistance.vue
  23. 6 5
      src/views/vent/monitorManager/mainFanMonitor/index.vue
  24. 234 87
      src/views/vent/monitorManager/mainFanMonitor/main.data.ts
  25. 4 2
      src/views/vent/monitorManager/mainFanMonitor/main.threejs.ts
  26. 4 0
      src/views/vent/monitorManager/mainFanMonitor/mainWind.threejs.ts
  27. 17 19
      src/views/vent/monitorManager/windowMonitor/index.vue
  28. 3 3
      src/views/vent/monitorManager/windowMonitor/modal.vue
  29. 19 15
      src/views/vent/monitorManager/windowMonitor/shuangdaoFc.threejs.ts
  30. 19 15
      src/views/vent/monitorManager/windowMonitor/shuangdaoFcBlt.threejs.ts
  31. 20 15
      src/views/vent/monitorManager/windowMonitor/shuangdaoFcSw.threejs.ts
  32. 19 15
      src/views/vent/monitorManager/windowMonitor/shuangdaoFcYjl.threejs.ts
  33. 1 1
      src/views/vent/monitorManager/windowMonitor/window.threejs.ts
  34. 14 9
      src/views/vent/monitorManager/windrectMonitor/dantou.threejs.ts
  35. 14 9
      src/views/vent/monitorManager/windrectMonitor/duishe.threejs.ts
  36. 12 7
      src/views/vent/monitorManager/windrectMonitor/duisheFixed.threejs.ts
  37. 1 16
      src/views/vent/monitorManager/windrectMonitor/windrect.threejs.ts

BIN
public/model/glft/workFace/workFace1_2024-12-06.glb


+ 1 - 1
src/api/sys/user.ts

@@ -102,7 +102,7 @@ export function tokenLogin(params: TokenInfo, mode: ErrorMessageMode = 'modal')
     {
       url: Api.tokenLogin,
       headers: {
-        token: params.token,
+        token: decodeURIComponent(params.token),
       },
     },
     {

+ 5 - 3
src/layouts/default/header/components/user-dropdown/index.vue

@@ -17,8 +17,8 @@
         <MenuItem key="password" :text="t('layout.header.dropdownItemSwitchPassword')" icon="ant-design:edit-outlined" />
         <MenuItem key="depart" :text="t('layout.header.dropdownItemSwitchDepart')" icon="ant-design:cluster-outlined" />
         <MenuItem key="cache" :text="t('layout.header.dropdownItemRefreshCache')" icon="ion:sync-outline" />
-        <MenuItem key="modalCache" :text="t('layout.header.dropdownItemSwitchModal')" icon="ion:sync-outline" />
-        <MenuItem key="switchTheme" :text="t('layout.header.dropdownItemSwitchTheme')" icon="ion:color-palette" />
+        <MenuItem v-if="sysOrgCode != 'sdmtjtgsd'" key="modalCache" :text="t('layout.header.dropdownItemSwitchModal')" icon="ion:sync-outline" />
+        <MenuItem v-if="sysOrgCode != 'sdmtjtgsd'" key="switchTheme" :text="t('layout.header.dropdownItemSwitchTheme')" icon="ion:color-palette" />
         <!-- <MenuItem
             v-if="getUseLockPage"
             key="lock"
@@ -52,7 +52,7 @@
   import headerImg from '/@/assets/images/header.jpg';
   import { propTypes } from '/@/utils/propTypes';
   import { openWindow } from '/@/utils';
-
+  import { useGlobSetting } from '/@/hooks/setting';
   import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
 
   import { refreshCache, queryAllDictItems, refreshRedis } from '/@/views/system/dict/dict.api';
@@ -79,6 +79,7 @@
       theme: propTypes.oneOf(['dark', 'light']),
     },
     setup() {
+      const { sysOrgCode } = useGlobSetting();
       const { prefixCls } = useDesign('header-user-dropdown');
       const { t } = useI18n();
       const { getShowDoc, getUseLockPage } = useHeaderSetting();
@@ -214,6 +215,7 @@
         updatePasswordRef,
         passwordVisible,
         lockActionVisible,
+        sysOrgCode,
       };
     },
   });

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

@@ -76,6 +76,7 @@ export function initModalWorker() {
     'workFace/workFace1-1_2024-04-09.glb',
     'workFace/workFace2-1_2024-04-09.glb',
     'workFace/workFace_2024-09-20.glb',
+    'workFace/workFace1_2024-12-06.glb',
   ];
 
   const db: any = new Dexie('DB');

+ 1 - 0
src/views/vent/comment/threejs/Smoke.ts

@@ -100,6 +100,7 @@ export default class Smoke {
   }
 
   startSmoke(duration = 15) {
+    debugger;
     if (!this.pathArr && this.frameId && !this.points && !this.points.geometry) {
       return;
     }

+ 6 - 25
src/views/vent/gas/gasAssessment/threejs/gasAssessmen.threejs.base.ts

@@ -166,36 +166,17 @@ class GasAssessmen {
     //
   }
 
-  setModalType(modalType) {
-    const workFace2 = this.group.getObjectByName('workFace2-1');
-    const workFace1 = this.group.getObjectByName('workFace1-1');
-    if (workFace2 && workFace1) {
-      if (modalType === 'workFace1') {
-        // 单进单回
-        workFace2.visible = false;
-        // workFace3.visible = false;
-        workFace1.visible = true;
-        workFace1.add(this.planeGroup);
-        this.planeGroup.visible = false;
-        this.planeGroup.position.set(-0.35, 0.14, -0.21);
-      } else if (modalType === 'workFace3') {
-        // 双进单回
-        workFace1.visible = false;
-        // workFace3.visible = false;
-        workFace2.visible = true;
-        workFace2.add(this.planeGroup);
-        this.planeGroup.visible = false;
-        this.planeGroup.position.set(-0.35, 0.14, -0.21);
-      }
-      setModalCenter(this.group);
-    }
+  setModalType() {
+    this.group.add(this.planeGroup);
+    this.planeGroup.visible = false;
+    this.planeGroup.position.set(-0.35, 0.14, -0.21);
   }
 
   mountedThree() {
     return new Promise(async (resolve) => {
       this.model.renderer.sortObjects = true;
       this.model.orbitControls.update();
-      this.model.setGLTFModel(['workFace2-1', 'workFace1-1'], this.group).then(async () => {
+      this.model.setGLTFModel(['workFace1'], this.group).then(async () => {
         this.group.children.forEach((object: THREE.Object3D) => {
           if (object.name.startsWith('workFace')) {
             setModalCenter(object);
@@ -203,7 +184,7 @@ class GasAssessmen {
         });
         this.group.name = this.modelName;
         this.group.scale.set(2.5, 2.5, 2.5);
-
+        console.log(this.group);
         this.getPositions(this.glob.N);
         this.addLight();
 

+ 10 - 10
src/views/vent/gas/gasAssessment/threejs/gasAssessmen.threejs.ts

@@ -16,10 +16,10 @@ const { mouseDownFn, mousemoveFn, mouseUpFn } = useEvent();
 const mouseEvent = (event) => {
   if (event.button == 0 && group) {
     model.canvasContainer?.addEventListener('mousemove', mousemove);
-    const groud = group.getObjectByName('groud');
-    const intakewind = group.getObjectByName('workFace-jin');
-    const returnwind = group.getObjectByName('workFace-hui');
-    mouseDownFn(model, [groud, intakewind, returnwind], event);
+    // const groud = group.getObjectByName('groud');
+    // const intakewind = group.getObjectByName('workFace-jin');
+    // const returnwind = group.getObjectByName('workFace-hui');
+    // mouseDownFn(model, [groud, intakewind, returnwind], event);
     console.log('摄像头控制信息', model.orbitControls, model.camera);
   }
 };
@@ -67,13 +67,13 @@ export const setModelType = (type, n = Math.ceil(Math.random() * 4), isShowPlane
       workFaceObj.clearPlanes();
       group = workFaceObj.group;
 
-      workFaceObj.setModalType(type);
       workFaceObj?.setPlanes(n);
-      showOrHideGasPlane(isShowPlane);
-      const oldControlsPosition = { x: -0.022168, y: 0.074739, z: 0.009219 };
-      const oldCameraPosition = { x: 0.02608027449507061, y: 10.420592466573055, z: 9.726605606617316 };
-      const newCameraPosition = { x: -0.33026163847606776, y: 1.1838248418373518, z: 2.110543112500774 };
-      const newControlsPosition = { x: -0.340818043813578, y: 0.08681864035231544, z: -0.015240539361923166 };
+      showOrHideGasPlane(true);
+      workFaceObj.setModalType();
+      const oldControlsPosition = { x: -0.086221, y: -0.612538, z: 0.33468 };
+      const oldCameraPosition = { x: 19.589025920044726, y: 7.437905524957071, z: 23.032636074396976 };
+      const newCameraPosition = { x: -0.04091497261004392, y: 6.00285177785006, z: 13.133761362574692 };
+      const newControlsPosition = { x: -0.08622121639058732, y: -0.6125377446115873, z: 0.3346804214903462 };
 
       if (model.scene.getObjectByName('workFace')) {
         model.camera.position.set(oldCameraPosition.x, oldCameraPosition.y, oldCameraPosition.z + 20);

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

@@ -125,11 +125,11 @@
           jf: el.sys_data.zongjinfeng,
           xf: el.sys_data.xufengliang,
           hf: el.sys_data.zonghuifeng,
-          isWarning: el.sys_data.zongjinfeng < el.sys_data.xufengliang,
+          isWarning: Number(el.sys_data.zongjinfeng) < Number(el.sys_data.xufengliang),
         });
 
         //临时添加,前端判断,后期后端加上预警再处理
-        if (el.sys_data.zongjinfeng < el.sys_data.xufengliang) {
+        if (Number(el.sys_data.zongjinfeng) < Number(el.sys_data.xufengliang)) {
           warningListTemp.push({ orgcode: el.orgcode, isWarning: true });
         } else {
           warningListTemp.push({ orgcode: el.orgcode, isWarning: false });

+ 18 - 0
src/views/vent/home/configurable/configurable.api.ts

@@ -188,6 +188,24 @@ export const getDisHome = (params) => {
             };
           }),
         },
+        {
+          objType: '压差',
+          arrayDev: res.obfObj.arrayDev.map((e) => {
+            return {
+              strinstallpos: e.strinstallpos,
+              val: e.dpVal || 0,
+            };
+          }),
+        },
+        {
+          objType: '温度',
+          arrayDev: res.obfObj.arrayDev.map((e) => {
+            return {
+              strinstallpos: e.strinstallpos,
+              val: e.tempVal || 0,
+            };
+          }),
+        },
       ];
     }
     return res;

+ 4 - 4
src/views/vent/monitorManager/alarmMonitor/common.api.ts

@@ -3,7 +3,7 @@ import { defHttp } from '/@/utils/http/axios';
 enum Api {
   sysTypeWarnList = '/ventanaly-device/safety/ventanalyAlarmLog/sysTypeWarn',
   sysWarn = '/ventanaly-device/safety/ventanalyAlarmLog/sysWarn',
-  getDevice='/ventanaly-device/monitor/device',
+  getDevice = '/ventanaly-device/monitor/device',
 }
 
 /**
@@ -16,10 +16,10 @@ export const sysTypeWarnList = (params) => defHttp.post({ url: Api.sysTypeWarnLi
  *预警详情弹窗右侧
  * @param params
  */
- export const sysWarn = (params) => defHttp.post({ url: Api.sysWarn, params });
+export const sysWarn = (params) => defHttp.post({ url: Api.sysWarn, params });
 
- /**
+/**
  * 列表接口
  * @param params
  */
-export const getDevice = (params) => defHttp.post({ url: Api.getDevice, params });
+export const getDevice = (params) => defHttp.post({ url: Api.getDevice, params });

+ 1 - 1
src/views/vent/monitorManager/camera/index.vue

@@ -512,7 +512,7 @@ onUnmounted(() => {
       .player-name {
         font-size: 14px;
         position: absolute;
-        top: 15px;
+        top: 35px;
         right: 15px;
         color: #fff;
         background-color: hsla(0, 0%, 50%, .5);

+ 1 - 1
src/views/vent/monitorManager/deviceMonitor/components/device/device.data.ts

@@ -392,7 +392,7 @@ export const haveDetailArr = [
   'fiber',
   'bundletube',
   'gaspatrol',
-  'dusting',
+  // 'dusting', // 保德要求去掉
   // 'ballvalve',
   'pump',
   'safetymonitor',

+ 1 - 1
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -219,7 +219,7 @@
                     " />
                 </template>
                 <template #filterCell="{ column, record }">
-                  <template v-if="deviceType.startsWith('gate')">
+                  <template v-if="deviceType.startsWith('gate') || deviceType.startsWith('door')">
                     <a-tag v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == '0' && record.frontGateClose == '0'" color="red"
                       >正在运行</a-tag
                     >

+ 12 - 1
src/views/vent/monitorManager/fanLocalMonitor/fanLocal.three.ts

@@ -317,6 +317,17 @@ export const addCssText = () => {
       group.add(fanLocalCSS3D);
     }
   }
+  if (!group.getObjectByName('text7')) {
+    const element = document.getElementById('inputBox0') as HTMLElement;
+    if (element) {
+      const fanLocalCSS3D = new CSS3DObject(element);
+      fanLocalCSS3D.name = 'text7';
+      fanLocalCSS3D.scale.set(0.04, 0.04, 0.04);
+      fanLocalCSS3D.rotation.y = -Math.PI / 2;
+      fanLocalCSS3D.position.set(-84.23, 4.97, -18.92);
+      group.add(fanLocalCSS3D);
+    }
+  }
   if (!group.getObjectByName('text6')) {
     const element = document.getElementById('inputBox1') as HTMLElement;
     if (element) {
@@ -324,7 +335,7 @@ export const addCssText = () => {
       fanLocalCSS3D.name = 'text6';
       fanLocalCSS3D.scale.set(0.04, 0.04, 0.04);
       fanLocalCSS3D.rotation.y = -Math.PI / 2;
-      fanLocalCSS3D.position.set(-84.23, 4.97, -18.92);
+      fanLocalCSS3D.position.set(-84.23, 6.89, -4.2);
       group.add(fanLocalCSS3D);
     }
   }

+ 17 - 10
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -4,16 +4,10 @@
     <div id="fanLocal3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
     <div id="fanLocal3DCSS" class="threejs-Object-CSS" style="width: 100%; height: 100%; position: absolute; overflow: hidden; pointer-events: none">
       <div style="z-index: -1; position: relative" v-if="hasPermission('show:sensorMonitor')">
-        <div class="elementTag" id="inputBox1">
-          <div class="elementContent" v-if="selectData.windSpeed1 || selectData.gas3 || selectData.windSpeed_merge">
-            <p v-if="selectData.windSpeed1 || selectData.windSpeed_merge"
-              >风筒入口风速:<span class="value">{{
-                selectData.windSpeed1 ? selectData.windSpeed1 : selectData.windSpeed_merge ? selectData.windSpeed_merge : '-'
-              }}</span>
-              <span class="unit"> m/s</span></p
-            >
+        <div class="elementTag" id="inputBox0">
+          <div class="elementContent" v-if="selectData.windInputSpeed1 || selectData.windInputSpeed_merge">
             <p v-if="selectData.windInputSpeed1 || selectData.windInputSpeed_merge"
-              >风筒入口风速:<span class="value">{{
+              >局扇工作面风速:<span class="value">{{
                 selectData.windInputSpeed1 ? selectData.windInputSpeed1 : selectData.windInputSpeed_merge ? selectData.windInputSpeed_merge : '-'
               }}</span>
               <span class="unit"> m/s</span></p
@@ -24,6 +18,19 @@
               }}</span>
               <span class="unit"> m³/min</span></p
             >
+          </div>
+        </div>
+        <div class="elementTag" id="inputBox1">
+          <div class="elementContent" v-if="selectData.windSpeed1 || selectData.gas3 || selectData.windQuantity1 || selectData.inletAirVolume_merge">
+            <p v-if="selectData.windSpeed1"
+              >风筒入口风速:<span class="value">{{ selectData.windSpeed1 ? selectData.windSpeed1 : '-' }}</span> <span class="unit"> m/s</span></p
+            >
+            <p v-if="selectData.windQuantity1 || selectData.inletAirVolume_merge"
+              >风筒入口风量:<span class="value">{{
+                selectData.windQuantity1 ? selectData.windQuantity1 : selectData.inletAirVolume_merge ? selectData.inletAirVolume_merge : '-'
+              }}</span>
+              <span class="unit"> m³/min</span></p
+            >
             <p v-if="selectData.gas3"
               >风筒入口瓦斯浓度: <span class="value">{{ selectData.gas3 ? selectData.gas3 : '-' }}</span> <span class="unit"> %</span></p
             >
@@ -189,7 +196,7 @@
       </div>
       <div>
         <div class="data-item" v-if="rightColumns.length > 0">
-          <div class="item-header">设备监测/设备报警</div>
+          <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)"

+ 0 - 68
src/views/vent/monitorManager/gateMonitor/gate.threejs.qd.ts

@@ -340,74 +340,6 @@ class Fm3 {
     }
   }
 
-  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;

+ 513 - 0
src/views/vent/monitorManager/gateMonitor/gate.threejs.three.tl.ts

@@ -0,0 +1,513 @@
+import * as THREE from 'three';
+import { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer.js';
+import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
+import { drawHot } from '/@/utils/threejs/util';
+
+// import * as dat from 'dat.gui';
+// const gui = new dat.GUI();
+// gui.domElement.style = 'position:absolute;top:10px;right:10px;z-index:99999999999999';
+
+class FmThreeTl {
+  modelName = 'fm2';
+  model; //
+  group;
+  isLRAnimation = true; // 是否开启左右摇摆动画
+  direction = 1; // 摇摆方向
+  animationTimer: NodeJS.Timeout | null = null; // 摇摆开启定时器
+  deviceDetailCSS3D;
+  playerStartClickTime1 = new Date().getTime();
+  playerStartClickTime2 = new Date().getTime();
+
+  fmClock = new THREE.Clock();
+  mixers: THREE.AnimationMixer | undefined;
+
+  clipActionArr = {
+    frontDoor: null as unknown as THREE.AnimationAction,
+    centerDoor: null as unknown as THREE.AnimationAction,
+    backDoor: null as unknown as THREE.AnimationAction,
+  };
+
+  backDamperOpenMesh;
+  backDamperClosedMesh;
+  frontDamperOpenMesh;
+  frontDamperClosedMesh;
+  centerDamperOpenMesh;
+  centerDamperClosedMesh;
+
+  constructor(model) {
+    this.model = model;
+  }
+
+  addLight() {
+    const directionalLight = new THREE.DirectionalLight(0xffffff, 1);
+    directionalLight.position.set(-0.8, 23, 3.9);
+    this.group?.add(directionalLight);
+    directionalLight.target = this.group as THREE.Object3D;
+
+    // const pointLight2 = new THREE.PointLight(0xffeeee, 1, 310);
+    // pointLight2.position.set(-1.5, 2, -0.9);
+    // pointLight2.shadow.bias = 0.05;
+    // this.group?.add(pointLight2);
+
+    // const pointLight3 = new THREE.PointLight(0xffeeee, 1, 310);
+    // pointLight3.position.set(1.3, 2, -0.9);
+    // 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);
+  }
+  // 重置摄像头
+  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 screenDownText = VENT_PARAM['modalText']
+      ? VENT_PARAM['modalText']
+      : History_Type['type'] == 'remote'
+      ? `国能神东煤炭集团监制`
+      : '煤炭科学技术研究院有限公司研制';
+
+    const screenDownTextX = 80 - (screenDownText.length - 11) * 6;
+    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: screenDownText,
+        font: 'normal 28px Arial',
+        color: '#00FF00',
+        strokeStyle: '#007400',
+        x: screenDownTextX,
+        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(6.645, 0.09, -0.39);
+        this.group.add(planeMesh);
+      }
+    });
+  }
+
+  /** 添加热点 */
+  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.3, 0.3, 0.3);
+      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;
+      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-three-tl');
+    if (fmGroup) {
+      const tracks = fmGroup.animations[0].tracks;
+      const fontTracks: any[] = [],
+        centerTracks: any[] = [],
+        backTracks: any[] = [];
+      console.log('风门帧', tracks);
+      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') && !track.name.includes('_3')) {
+          centerTracks.push(track);
+        } else {
+          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;
+
+      const centerDoor = new THREE.AnimationClip('centerDoor', 4, centerTracks);
+      const centerClipAction = this.mixers.clipAction(centerDoor, fmGroup);
+      centerClipAction.clampWhenFinished = true;
+      centerClipAction.loop = THREE.LoopOnce;
+      this.clipActionArr.centerDoor = centerClipAction;
+    }
+  }
+
+  deviceDetailCard(position = { x: 0, y: 0, z: 0 }) {
+    const element = document.getElementById('deviceCard') as HTMLElement;
+    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) {
+    if (this.clipActionArr.frontDoor && this.clipActionArr.backDoor) {
+      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 8: // 打开后中间门
+          handler = () => {
+            this.clipActionArr.centerDoor.paused = true;
+            this.clipActionArr.centerDoor.reset();
+            this.clipActionArr.centerDoor.time = 1.2;
+            this.clipActionArr.centerDoor.timeScale = timeScale;
+            this.clipActionArr.centerDoor.clampWhenFinished = true;
+            this.clipActionArr.centerDoor.play();
+            this.fmClock.start();
+            if (this.centerDamperOpenMesh) this.centerDamperOpenMesh.visible = true;
+            if (this.centerDamperClosedMesh) this.centerDamperClosedMesh.visible = false;
+          };
+          break;
+        case 9: // 关闭中间门
+          handler = () => {
+            this.clipActionArr.centerDoor.paused = true;
+            this.clipActionArr.centerDoor.reset();
+            this.clipActionArr.centerDoor.time = 4;
+            this.clipActionArr.centerDoor.timeScale = -timeScale;
+            this.clipActionArr.centerDoor.clampWhenFinished = true;
+            this.clipActionArr.centerDoor.play();
+            this.fmClock.start();
+            if (this.centerDamperOpenMesh) this.centerDamperOpenMesh.visible = false;
+            if (this.centerDamperClosedMesh) this.centerDamperClosedMesh.visible = true;
+          };
+          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;
+    let monitorPlane: THREE.Mesh | null = null;
+    const canvas = await getTextCanvas(320, 180, '', 'noSinge.png');
+    const textMap = new THREE.CanvasTexture(canvas); // 关键一步
+    const textMaterial = new THREE.MeshBasicMaterial({
+      map: textMap, // 设置纹理贴图
+      transparent: true,
+      side: THREE.DoubleSide, // 这里是双面渲染的意思
+    });
+    textMaterial.blending = THREE.CustomBlending;
+    monitorPlane = this.group?.getObjectByName('noPlayer');
+    if (monitorPlane) {
+      monitorPlane.material = textMaterial;
+    } else {
+      const planeGeometry = new THREE.PlaneGeometry(100, 100); // 平面3维几何体PlaneGeometry
+      monitorPlane = new THREE.Mesh(planeGeometry, textMaterial);
+      textMaterial.dispose();
+      planeGeometry.dispose();
+    }
+    const videoPlayer = this.group.getObjectByName('player1');
+    if (videoPlayer) {
+      this.model.clearMesh(videoPlayer);
+      this.group.remove(videoPlayer);
+    }
+    const noPlayer1 = this.group.getObjectByName('noPlayer1');
+    if (noPlayer1) {
+      this.model.clearMesh(noPlayer1);
+      this.group.remove(noPlayer1);
+    }
+    if (!videoPlayer1 && videoPlayer1 === null) {
+      monitorPlane.name = 'noPlayer1';
+      monitorPlane.scale.set(0.0085, 0.0056, 0.012);
+      monitorPlane.position.set(-4.23, 0.02, -0.39);
+      this.group?.add(monitorPlane);
+    } else if (videoPlayer1) {
+      const mesh = renderVideo(this.group, videoPlayer1, 'player1');
+      if (mesh) {
+        mesh?.scale.set(-0.028, 0.0285, 1);
+        mesh?.position.set(-4.238, 0.02, -0.4);
+        mesh.rotation.y = -Math.PI;
+        this.group.add(mesh);
+      }
+    }
+  }
+  resetModal() {
+    const fmThreeBase = this.group.getObjectByName('fmThreeBase');
+    if (fmThreeBase) {
+      const screenObj1 = fmThreeBase.getObjectByName('对象192');
+      const screenObj2 = fmThreeBase.getObjectByName('对象231');
+      if (screenObj1) screenObj1.visible = false;
+      if (screenObj2) screenObj2.visible = false;
+    }
+  }
+
+  mountedThree(playerDom) {
+    this.group = new THREE.Object3D();
+    this.group.name = this.modelName;
+    return new Promise((resolve) => {
+      this.model.setGLTFModel(['fm-three-tl'], this.group).then(() => {
+        this.group.name = 'fm2';
+        this.setModalPosition();
+        this.resetModal();
+        // 初始化左右摇摆动画;
+        this.initAnimation();
+        // this.drawHots();
+        this.addLight();
+        // this.deviceDetailCard();
+        this.model.animate();
+
+        this.backDamperOpenMesh = this.group.getObjectByName('Dampler_open_2_3');
+        if (this.backDamperOpenMesh) this.backDamperOpenMesh.visible = false;
+        this.backDamperClosedMesh = this.group.getObjectByName('Damper_Closed_3_3');
+        if (this.backDamperClosedMesh) this.backDamperClosedMesh.visible = true;
+
+        this.centerDamperOpenMesh = this.group.getObjectByName('Dampler_open_1');
+        if (this.centerDamperOpenMesh) this.centerDamperOpenMesh.visible = false;
+        this.centerDamperClosedMesh = this.group.getObjectByName('Damper_Closed_1');
+        if (this.centerDamperClosedMesh) this.centerDamperClosedMesh.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(null);
+        // this.initCamera(playerDom);
+      });
+    });
+  }
+
+  destroy() {
+    if (this.model) {
+      if (this.mixers) {
+        const fmGroup = this.group?.getObjectByName('fmThree');
+        this.mixers.uncacheClip(this.clipActionArr.frontDoor.getClip());
+        this.mixers.uncacheClip(this.clipActionArr.backDoor.getClip());
+        this.mixers.uncacheAction(this.clipActionArr.frontDoor.getClip(), fmGroup);
+        this.mixers.uncacheAction(this.clipActionArr.backDoor.getClip(), fmGroup);
+        this.mixers.uncacheRoot(fmGroup);
+
+        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;
+    }
+  }
+}
+export default FmThreeTl;

+ 137 - 25
src/views/vent/monitorManager/gateMonitor/gate.threejs.ts

@@ -12,19 +12,25 @@ import { useGlobSetting } from '/@/hooks/setting';
 // 模型对象、 文字对象
 let model,
   fm1, //液压风门
-  fm2, //三道风门
+  fm2, //三道风门收缩
   fm3, //气动风门
   fmXr: FmXR, //行人风门
   fmTwoSs, //
+  fmThreeTl, // 三道推拉
+  fmWindow, // 带风窗
   group: THREE.Object3D,
   fmType = '',
   windowType = 'singleWindow';
 
 const rotationParam = {
-  frontDeg0: 0, // 前门初始
-  frontDeg1: 0, // 前门目标
-  backDeg0: 0, // 后门初始
-  backDeg1: 0, // 后门目标
+  frontLeftDeg0: 0, // 前门初始
+  frontLeftDeg1: 0, // 前门目标
+  backLeftDeg0: 0, // 后门初始
+  backLeftDeg1: 0, // 后门目标
+  frontRightDeg0: 0, // 前门初始
+  frontRightDeg1: 0, // 前门目标
+  backRightDeg0: 0, // 后门初始
+  backRightDeg1: 0, // 后门目标
 };
 
 const { mouseDownFn } = useEvent();
@@ -40,12 +46,16 @@ const startAnimation = () => {
       fm1?.mouseUpModel.call(fm1);
     } else if (fmType === 'fm2') {
       fm2?.mouseUpModel.call(fm2);
+    } else if (fmType === 'fmThreeTl') {
+      fmThreeTl?.mouseUpModel.call(fmThreeTl);
     } else if (fmType === 'fm3') {
       fm3?.mouseUpModel.call(fm3);
     } else if (fmType === 'fmXr') {
       fmXr?.mouseUpModel.call(fmXr);
     } else if (fmType === 'fmTwoSs') {
       fmTwoSs?.mouseUpModel.call(fmTwoSs);
+    } else if (fmType === 'fmWindow') {
+      fmWindow.mouseUpModel.call(fmWindow);
     }
   });
 };
@@ -64,9 +74,13 @@ const mouseEvent = (event) => {
         fmXr?.mousedownModel.call(fmXr, intersects);
       } else if (fmType === 'fmTwoSs' && fmTwoSs) {
         fmTwoSs?.mousedownModel.call(fmTwoSs, intersects);
+      } else if (fmType === 'fmThreeTl') {
+        fmThreeTl?.mousedownModel.call(fmThreeTl, intersects);
+      } else if (fmType === 'fmWindow' && fmWindow) {
+        fmWindow.mousedownModel.call(fmWindow, intersects);
       }
     });
-    // console.log('摄像头控制信息', model.orbitControls, model.camera);
+    console.log('摄像头控制信息', model.orbitControls, model.camera);
   }
 };
 
@@ -81,6 +95,10 @@ export const addMonitorText = (selectData) => {
     return fmXr?.addMonitorText.call(fmXr, selectData);
   } else if (fmType === 'fmTwoSs' && fmTwoSs) {
     return fmTwoSs?.addMonitorText.call(fmTwoSs, selectData);
+  } else if (fmType === 'fmThreeTl') {
+    fmThreeTl?.addMonitorText.call(fmThreeTl, selectData);
+  } else if (fmType === 'fmWindow' && fmWindow) {
+    fmWindow.addMonitorText.call(fmWindow, selectData);
   }
 };
 
@@ -101,43 +119,57 @@ 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 === 'fmWindow' && fmWindow) {
+    return fmWindow.play.call(fmWindow, handlerState, flag);
   } else if (fmType === 'fm3' && fm3) {
     return fm3.play.call(fm3, handlerState, flag);
   } else if (fmType === 'fmXr' && fmXr) {
     return fmXr.play.call(fmXr, handlerState, flag);
   } else if (fmType === 'fmTwoSs' && fmTwoSs) {
     return fmTwoSs.play.call(fmTwoSs, handlerState, flag);
+  } else if (fmType === 'fmThreeTl') {
+    fmThreeTl?.play.call(fmThreeTl, handlerState, flag);
   }
 };
 
 export const playWindow = (rotationParam, flag) => {
-  if (fmType === 'fm3' && fm3) {
-    return fm3.playWindow.call(fm3, rotationParam, flag);
+  if (fmType === 'fmWindow' && fmWindow) {
+    return fmWindow.playWindow.call(fmWindow, rotationParam, flag);
   }
 };
 
 export function computePlay(data, maxarea, isFirst = false) {
+  // 前门后窗  rearPresentValue1
+  // 前门前窗 frontPresentValue1
+  // 后门后窗 rearPresentValue2
+  // 后门前窗 frontPresentValue2
   debugger;
-  if (data.OpenDegree1 || data.OpenDegree2) {
+  // if (data.OpenDegree1 || data.OpenDegree2) {
+  //   maxarea = 90;
+  //   rotationParam.frontDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.OpenDegree1);
+  //   rotationParam.backDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.OpenDegree2);
+  //   rotationParam.frontDeg1 = (90 / maxarea) * Number(data.OpenDegree1) || 0;
+  //   rotationParam.backDeg1 = (90 / maxarea) * Number(data.OpenDegree2) || 0;
+  //   fm2.playWindow.call(fm3, rotationParam, 1);
+  //   fm2.playWindow.call(fm3, rotationParam, 2);
+  // }
+  if (data.rearPresentValue1 || data.frontPresentValue1 || data.rearPresentValue2 || data.frontPresentValue2) {
     maxarea = 90;
-    rotationParam.frontDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.OpenDegree1);
-    rotationParam.backDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.OpenDegree2);
-    rotationParam.frontDeg1 = (90 / maxarea) * Number(data.OpenDegree1) || 0;
-    rotationParam.backDeg1 = (90 / maxarea) * Number(data.OpenDegree2) || 0;
-
-    // if (!rotationParam.frontDeg1 && !rotationParam.backDeg1) {
-    //   // 当返回值有误时默认关闭
-    //   fm3.playWindow.call(fm3, rotationParam, 1);
-    //   fm3.playWindow.call(fm3, rotationParam, 2);
-    // }
-    fm3.playWindow.call(fm3, rotationParam, 1);
-    fm3.playWindow.call(fm3, rotationParam, 2);
+    rotationParam.frontLeftDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.frontPresentValue1);
+    rotationParam.frontRightDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.rearPresentValue1);
+    rotationParam.frontLeftDeg1 = (90 / maxarea) * Number(data.frontPresentValue1) || 0;
+    rotationParam.frontRightDeg1 = (90 / maxarea) * Number(data.rearPresentValue1) || 0;
+    rotationParam.backLeftDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.frontPresentValue2);
+    rotationParam.backRightDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.rearPresentValue2);
+    rotationParam.backLeftDeg1 = (90 / maxarea) * Number(data.frontPresentValue2) || 0;
+    rotationParam.backRightDeg1 = (90 / maxarea) * Number(data.rearPresentValue2) || 0;
+    fm2.playWindow.call(fm3, rotationParam, 1);
+    fm2.playWindow.call(fm3, rotationParam, 2);
   }
 }
 
 // 切换风门类型
 export const setModelType = (type) => {
-  debugger;
   fmType = type;
   return new Promise((resolve) => {
     // 暂停风门1动画
@@ -184,7 +216,6 @@ export const setModelType = (type) => {
 
         fm2.clipActionArr.frontDoor.stop();
         fm2.clipActionArr.backDoor.stop();
-
         fm2.clipActionArr.centerDoor.stop();
       }
 
@@ -197,6 +228,7 @@ export const setModelType = (type) => {
         resolve(null);
         model.scene.add(fm2.group);
         const position = { x: -2.28, y: -0.91, z: -5.68 };
+
         await animateCamera(
           oldCameraPosition,
           { x: -2.27, y: -0.91, z: -5.67 },
@@ -206,6 +238,74 @@ export const setModelType = (type) => {
           0.6
         );
       }, 300);
+    } else if (fmType === 'fmWindow' && fmWindow && fmWindow.group) {
+      if (fmWindow.clipActionArr.frontDoor && fmWindow.clipActionArr.backDoor) {
+        fmWindow.clipActionArr.frontDoor.reset();
+        fmWindow.clipActionArr.frontDoor.time = 0.5;
+        fmWindow.clipActionArr.backDoor.reset();
+        fmWindow.clipActionArr.backDoor.time = 0.5;
+
+        fmWindow.clipActionArr.frontDoor.stop();
+        fmWindow.clipActionArr.backDoor.stop();
+      }
+
+      model.startAnimation = fmWindow.render.bind(fmWindow);
+      model.scene.remove(group);
+      group = fmWindow.group;
+      const oldCameraPosition = { x: -761, y: 569, z: 871 };
+      setTimeout(async () => {
+        resolve(null);
+        model.scene.add(fmWindow.group);
+        const position = { x: -2.28, y: -0.91, z: -5.68 };
+
+        await animateCamera(
+          oldCameraPosition,
+          { x: -2.27, y: -0.91, z: -5.67 },
+          { x: 66.257, y: 57.539, z: 94.313 },
+          { x: position.x, y: position.y, z: position.z },
+          model,
+          0.6
+        );
+      }, 300);
+    } else if (fmType === 'fmThreeTl' && fmThreeTl && fmThreeTl.group) {
+      if (fmThreeTl.clipActionArr.frontDoor && fmThreeTl.clipActionArr.backDoor && fmThreeTl.clipActionArr.centerDoor) {
+        fmThreeTl.clipActionArr.frontDoor.reset();
+        fmThreeTl.clipActionArr.frontDoor.time = 0.5;
+        fmThreeTl.clipActionArr.backDoor.reset();
+        fmThreeTl.clipActionArr.backDoor.time = 0.5;
+        fmThreeTl.clipActionArr.centerDoor.reset();
+        fmThreeTl.clipActionArr.centerDoor.time = 0.5;
+
+        fmThreeTl.clipActionArr.frontDoor.stop();
+        fmThreeTl.clipActionArr.backDoor.stop();
+        fmThreeTl.clipActionArr.centerDoor.stop();
+      }
+      if (fmThreeTl.frontDamperOpenMesh) fmThreeTl.frontDamperOpenMesh.visible = false;
+      if (fmThreeTl.frontDamperClosedMesh) fmThreeTl.frontDamperClosedMesh.visible = true;
+      if (fmThreeTl.centerDamperOpenMesh) fmThreeTl.centerDamperOpenMesh.visible = false;
+      if (fmThreeTl.centerDamperClosedMesh) fmThreeTl.centerDamperClosedMesh.visible = true;
+      if (fmThreeTl.backDamperOpenMesh) fmThreeTl.backDamperOpenMesh.visible = false;
+      if (fmThreeTl.backDamperClosedMesh) fmThreeTl.backDamperClosedMesh.visible = true;
+
+      // 显示单道风窗
+      model.startAnimation = fmThreeTl.render.bind(fmThreeTl);
+      model.scene.remove(group);
+      group = fmThreeTl.group;
+      const oldCameraPosition = { x: -761, y: 569, z: 871 };
+      setTimeout(async () => {
+        resolve(null);
+        model.scene.add(fmThreeTl.group);
+        const position = { x: 31.873075535732386, y: -3.501715880262631, z: -15.490295891616942 };
+
+        await animateCamera(
+          oldCameraPosition,
+          { x: -2.27, y: -0.91, z: -5.67 },
+          { x: 88.60102093060523, y: 53.89462381404774, z: 109.90762232602137 },
+          { x: position.x, y: position.y, z: position.z },
+          model,
+          0.6
+        );
+      }, 300);
     } else if (fmType === 'fm3' && fm3 && fm3.group) {
       if (fm3.clipActionArr.frontDoor && fm3.clipActionArr.backDoor) {
         fm3.clipActionArr.frontDoor.reset();
@@ -323,6 +423,7 @@ export const initCameraCanvas = async (playerVal1) => {
 export const mountedThree = (playerDom) => {
   const { sysOrgCode } = useGlobSetting();
   // const sysOrgCode = 'gsgszdek';
+
   return new Promise(async (resolve) => {
     model = new UseThree('#damper3D', '', '#deviceDetail');
     model.setEnvMap('test1');
@@ -346,8 +447,17 @@ export const mountedThree = (playerDom) => {
         break;
       case 'gsgszdek':
         const FmDc = await import('./gate.threejs.window');
-        if (FmDc) fm3 = new FmDc.default(model);
-        if (fm3) fm3.mountedThree(playerDom);
+        if (FmDc) fmWindow = new FmDc.default(model);
+        if (fmWindow) fmWindow.mountedThree(playerDom);
+        fm3 = new Fm3(model);
+        fm3.mountedThree(playerDom);
+        break;
+      case 'sdmtjtbltmk':
+        const FmThreeTl = await import('./gate.threejs.three.tl');
+        if (FmThreeTl) fmThreeTl = new FmThreeTl.default(model);
+        if (fmThreeTl) fmThreeTl.mountedThree(playerDom);
+        fm3 = new Fm3(model);
+        fm3.mountedThree(playerDom);
         break;
       default:
         fm3 = new Fm3(model);
@@ -378,10 +488,12 @@ export const destroy = () => {
     if (fm3) fm3.destroy();
     if (fmXr) fmXr.destroy();
     if (fmTwoSs) fmTwoSs.destroy();
+    if (fmWindow) fmWindow.destroy();
     fm1 = null;
     fm2 = null;
     fm3 = null;
     fmXr = null;
+    fmWindow = null;
     fmTwoSs = null;
     group = null;
     model.mixers = [];

+ 78 - 24
src/views/vent/monitorManager/gateMonitor/gate.threejs.window.ts

@@ -26,18 +26,24 @@ class FmDc {
   mixers: THREE.AnimationMixer | undefined;
   appStore = useAppStore();
 
-  backDamperOpenMesh;
-  backDamperClosedMesh;
-  frontDamperOpenMesh;
-  frontDamperClosedMesh;
+  // backLeftDamperOpenMesh;
+  // backLeftDamperClosedMesh;
+  // frontLeftDamperOpenMesh;
+  // frontLeftDamperClosedMesh;
+  // backRightDamperOpenMesh;
+  // backRightDamperClosedMesh;
+  // frontRightDamperOpenMesh;
+  // frontRightDamperClosedMesh;
 
   clipActionArr = {
     frontDoor: null as unknown as THREE.AnimationAction,
     backDoor: null as unknown as THREE.AnimationAction,
   };
   windowsActionArr = {
-    frontWindow: <THREE.Mesh[]>[],
-    backWindow: <THREE.Mesh[]>[],
+    frontLeftWindow: <THREE.Mesh[]>[],
+    backLeftWindow: <THREE.Mesh[]>[],
+    frontRightWindow: <THREE.Mesh[]>[],
+    backRightWindow: <THREE.Mesh[]>[],
   };
 
   constructor(model) {
@@ -254,30 +260,49 @@ class FmDc {
   }
   /* 提取风门序列帧,初始化前后门动画 */
   initWindowAnimation() {
-    const meshArr01: THREE.Object3D[] = [];
-    const meshArr02: THREE.Object3D[] = [];
+    const meshArr01: THREE.Object3D[] = []; //front left
+    const meshArr02: THREE.Object3D[] = []; //front right
+    const meshArr03: THREE.Object3D[] = []; //back left
+    const meshArr04: THREE.Object3D[] = []; //back right
     const windowGroup = new THREE.Group();
     windowGroup.name = 'hiddenGroup';
     const fmGroup = this.group?.getObjectByName('fm-window');
     const parentGroup = fmGroup.getObjectByName('MeiCangLianLuoHangFengMen');
     const frontGroup = parentGroup.getObjectByName('FengMen2');
     const backGroup = parentGroup.getObjectByName('FengMen');
-
-    frontGroup.traverse((obj) => {
+    const frontLeftObj = frontGroup.getObjectByName('FengMen_L_1');
+    const frontRightObj = frontGroup.getObjectByName('FengMen_R_1');
+    const backLeftObj = backGroup.getObjectByName('FengMen_L');
+    const backRightObj = backGroup.getObjectByName('FengMen_R');
+    frontLeftObj.traverse((obj) => {
       if (obj.type === 'Mesh' && obj.name && obj.name.startsWith('shanye')) {
         obj.rotateOnAxis(new THREE.Vector3(0, 0, 1), 0);
         meshArr01.push(obj);
       }
     });
-    backGroup.traverse((obj) => {
+    frontRightObj.traverse((obj) => {
       if (obj.type === 'Mesh' && obj.name && obj.name.startsWith('shanye')) {
         obj.rotateOnAxis(new THREE.Vector3(0, 0, 1), 0);
         meshArr02.push(obj);
       }
     });
+    backLeftObj.traverse((obj) => {
+      if (obj.type === 'Mesh' && obj.name && obj.name.startsWith('shanye')) {
+        obj.rotateOnAxis(new THREE.Vector3(0, 0, 1), 0);
+        meshArr03.push(obj);
+      }
+    });
+    backRightObj.traverse((obj) => {
+      if (obj.type === 'Mesh' && obj.name && obj.name.startsWith('shanye')) {
+        obj.rotateOnAxis(new THREE.Vector3(0, 0, 1), 0);
+        meshArr04.push(obj);
+      }
+    });
 
-    this.windowsActionArr.frontWindow = meshArr01;
-    this.windowsActionArr.backWindow = meshArr02;
+    this.windowsActionArr.frontLeftWindow = meshArr01;
+    this.windowsActionArr.frontRightWindow = meshArr02;
+    this.windowsActionArr.backLeftWindow = meshArr03;
+    this.windowsActionArr.backRightWindow = meshArr04;
     this.group?.add(windowGroup);
   }
 
@@ -362,30 +387,59 @@ class FmDc {
   }
 
   playWindow(rotationParam, flag) {
-    if (this.windowsActionArr.frontWindow.length <= 0 || this.windowsActionArr.backWindow.length <= 0) {
+    if (
+      this.windowsActionArr.frontLeftWindow.length <= 0 ||
+      this.windowsActionArr.frontRightWindow.length <= 0 ||
+      this.windowsActionArr.backLeftWindow.length <= 0 ||
+      this.windowsActionArr.backRightWindow.length <= 0
+    ) {
       return;
     }
-    debugger;
     if (flag === 1) {
-      // 前风窗动画
-      this.windowsActionArr.frontWindow.forEach((mesh) => {
+      // 前门左风窗动画
+      this.windowsActionArr.frontLeftWindow.forEach((mesh) => {
         gsap.to(mesh.rotation, {
-          z: THREE.MathUtils.degToRad(rotationParam.frontDeg1),
-          duration: (1 / 9) * Math.abs(rotationParam.frontDeg1 - mesh.rotation.z),
+          z: THREE.MathUtils.degToRad(rotationParam.frontLeftDeg1),
+          duration: (1 / 9) * Math.abs(rotationParam.frontLeftDeg1 - mesh.rotation.z),
           overwrite: true,
         });
       });
     } else if (flag === 2) {
-      // 后风窗动画
-      this.windowsActionArr.backWindow.forEach((mesh) => {
+      // 后门左风窗动画
+      this.windowsActionArr.backLeftWindow.forEach((mesh) => {
+        gsap.to(mesh.rotation, {
+          z: THREE.MathUtils.degToRad(rotationParam.backLeftDeg1),
+          duration: (1 / 9) * Math.abs(rotationParam.backLeftDeg1 - mesh.rotation.z),
+          overwrite: true,
+        });
+      });
+    } else if (flag === 3) {
+      // 前门右风窗动画
+      this.windowsActionArr.frontRightWindow.forEach((mesh) => {
+        gsap.to(mesh.rotation, {
+          z: THREE.MathUtils.degToRad(rotationParam.frontRightDeg1),
+          duration: (1 / 9) * Math.abs(rotationParam.frontRightDeg1 - mesh.rotation.z),
+          overwrite: true,
+        });
+      });
+    } else if (flag === 4) {
+      // 后门右风窗动画
+      this.windowsActionArr.backRightWindow.forEach((mesh) => {
         gsap.to(mesh.rotation, {
-          z: THREE.MathUtils.degToRad(rotationParam.backDeg1),
-          duration: (1 / 9) * Math.abs(rotationParam.backDeg1 - mesh.rotation.z),
+          z: THREE.MathUtils.degToRad(rotationParam.backRightDeg1),
+          duration: (1 / 9) * Math.abs(rotationParam.backRightDeg1 - mesh.rotation.z),
           overwrite: true,
         });
       });
     } else if (flag === 0) {
-      ([...this.windowsActionArr.frontWindow, ...this.windowsActionArr.backWindow] as THREE.Mesh[]).forEach((mesh) => {
+      (
+        [
+          ...this.windowsActionArr.frontLeftWindow,
+          ...this.windowsActionArr.frontRightWindow,
+          ...this.windowsActionArr.backLeftWindow,
+          ...this.windowsActionArr.backRightWindow,
+        ] as THREE.Mesh[]
+      ).forEach((mesh) => {
         gsap.to(mesh.rotation, {
           z: 0,
           overwrite: true,

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

@@ -25,8 +25,18 @@
       <div class="top-center row">
         <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(1)">打开前门</div>
         <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(2)">关闭前门</div>
-        <div v-if="hasPermission('btn:control') && selectData.deviceType == 'gate_ss'" class="button-box" @click="playAnimation(8)">打开中间门</div>
-        <div v-if="hasPermission('btn:control') && selectData.deviceType == 'gate_ss'" class="button-box" @click="playAnimation(9)">关闭中间门</div>
+        <div
+          v-if="hasPermission('btn:control') && (selectData.deviceType == 'gate_ss' || selectData.deviceType == 'gate_nomal3')"
+          class="button-box"
+          @click="playAnimation(8)"
+          >打开中间门</div
+        >
+        <div
+          v-if="hasPermission('btn:control') && (selectData.deviceType == 'gate_ss' || selectData.deviceType == 'gate_nomal3')"
+          class="button-box"
+          @click="playAnimation(9)"
+          >关闭中间门</div
+        >
         <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(3)">打开后门</div>
         <div v-if="hasPermission('btn:control')" class="button-box" @click="playAnimation(4)">关闭后门</div>
         <div v-if="!hasPermission('btn:controlWindow') && selectData.deviceType != 'gate_ss'" class="button-box" @click="playAnimation(5)"
@@ -35,8 +45,8 @@
         <div v-if="!hasPermission('btn:controlWindow') && selectData.deviceType != 'gate_ss'" class="button-box" @click="playAnimation(6)"
           >同时关闭</div
         >
-        <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(10)">A风窗控制</div>
-        <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(11)">B风窗控制</div>
+        <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(10)">前门前窗控制</div>
+        <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(11)">前门后窗控制</div>
       </div>
       <!-- 控制模式 -->
       <div class="top-right row" v-if="hasPermission('btn:remote')">
@@ -461,10 +471,15 @@
     } else {
       if (selectData.deviceType == 'gate_ss') {
         type = 'fm2';
+        // type = 'fmWindow';
       } else if (selectData.deviceType == 'gate_qd' || selectData.deviceType == 'gate_normal') {
         type = 'fm3';
       } else if (selectData.deviceType == 'gate_ss_two' || selectData.deviceType == 'gate_ss_two1') {
         type = 'fmTwoSs';
+      } else if (selectData.deviceType == 'gate_nomal3') {
+        type = 'fmThreeTl';
+      } else if (selectData.deviceType == 'gate_tj') {
+        type = 'fmWindow';
       } else {
         type = 'fm1'; // 液压
       }

+ 1 - 1
src/views/vent/monitorManager/gateMonitor/modal.vue

@@ -8,7 +8,7 @@
       <div v-if="type == '10'">
         <div class="vent-flex-row input-box">
           <div class="label">风窗开启角度:</div>
-          <a-input-number size="small" placeholder="0" :min="0" :max="90" v-model:value="frontSetValue" />
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="frontSetValue" />
         </div>
       </div>
       <div class="vent-flex-row input-box">

+ 21 - 11
src/views/vent/monitorManager/mainFanMonitor/components/conditionAssistance.vue

@@ -117,7 +117,8 @@
     max: number;
   };
   const columns = ref([]);
-  const isMock = true;
+  const showFre = ref(true); // 是否显示频率曲线, 是显示,不是显示角度
+  const isMock = false;
   let option = reactive({});
   // 注册 modal
   const [register, { closeModal }] = useModalInner(() => {
@@ -194,15 +195,15 @@
         return item.min;
       })
     );
-    xDataMin = Number((xDataMin - xDataMin / 10).toFixed(0));
-    let xDataMax =
-      Math.max.apply(
-        Math,
-        assistanceDataList.map((item) => {
-          return item.max;
-        })
-      ) + 10;
-    xDataMax = Number(xDataMax.toFixed(0));
+
+    let xDataMax = Math.max.apply(
+      Math,
+      assistanceDataList.map((item) => {
+        return item.max;
+      })
+    );
+    xDataMin = Number((xDataMin - (xDataMax - xDataMin) / 10).toFixed(0));
+    xDataMax = Number((xDataMax + (xDataMax - xDataMin) / 10).toFixed(0));
 
     fanInfoData.flfw = `${xDataMin}~${xDataMax}`;
     const computeItem = (item: AssistanceItemType) => {
@@ -498,10 +499,19 @@
         lineColumns = getTableHeaderColumns(props.deviceType.split('_')[0] + '_input') as [];
       }
       if (lineColumns.length > 0) {
-        lineColumns = lineColumns.filter((item) => item['dataIndex'] && item['dataIndex'].includes('_line_'));
+        lineColumns = lineColumns.filter((item) => item['dataIndex'] && (item['dataIndex'] as string).endsWith('_mainFanInfo'));
         columns.value = lineColumns;
       }
     }
+    if (!columns.value || columns.value.length == 0) {
+      columns.value = fanInfo;
+    } else {
+      const flag = columns.value.findIndex((item) => item['dataIndex'] && (item['dataIndex'] as string) === 'angleAdjustableRange_mainFanInfo');
+      if (flag > -1) {
+        // 说明是角度了调节
+        showFre.value = false;
+      }
+    }
   }
   watch(
     () => props.deviceType,

+ 6 - 5
src/views/vent/monitorManager/mainFanMonitor/index.vue

@@ -167,7 +167,7 @@
         </div>
       </div>
       <div class="data-item" style="margin-top: 8px">
-        <div class="item-header">设备警</div>
+        <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)"
@@ -422,12 +422,12 @@
               </div>
             </div>
           </a-tab-pane>
-          <a-tab-pane key="6" tab="操作历史">
-            <div v-if="hasPermission('show:handlerHistory') && activeKey == '6'" class="tab-item">
+          <a-tab-pane key="6" tab="操作历史" v-if="hasPermission('show:handlerHistory')">
+            <div v-if="activeKey == '6' && deviceType" class="tab-item">
               <HandlerHistoryTable
                 columns-type="operator_history"
-                device-type="fanmain"
-                :device-list-api="baseList"
+                :device-type="deviceType"
+                :device-list-api="baseList.bind(null, { devicekind: deviceType })"
                 designScope="alarm-history"
                 :scroll="scroll"
               />
@@ -654,6 +654,7 @@
   const faultData = ref<PointMonitorType[]>([]); // 存放故障点位监测数据(查的点表)
   const explosionDoorData = ref<PointMonitorType[]>([]); // 存放防爆门点位监测数据(查的点表)
   const faultShow = ref(false);
+
   let headElHeight = ref(0);
 
   // 监测数据

+ 234 - 87
src/views/vent/monitorManager/mainFanMonitor/main.data.ts

@@ -811,10 +811,9 @@ export const assistanceData = {
 };
 
 export const setOption = (deviceType?) => {
-  debugger;
   let yMax = 4500;
   const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtdltmk';
+  // const sysOrgCode = 'sdmtjtjjmk';
   if (sysOrgCode == 'sdmtjtdltmk') {
     // 这里判断白家渠还是五当沟
     if (deviceType == 'fanmain_bjq') {
@@ -822,6 +821,20 @@ export const setOption = (deviceType?) => {
     } else if (deviceType == 'fanmain_wdg') {
       yMax = 1200;
     }
+  } else if (sysOrgCode == 'sdmtjtswmk') {
+    if (deviceType == 'fanmain_bfj') {
+      yMax = 5000;
+    } else if (deviceType == 'fanmain_nfj') {
+      yMax = 4500;
+    }
+  } else if (sysOrgCode == 'sdmtjtbdmk') {
+    if (deviceType == 'fanmain_ljy') {
+      yMax = 5000;
+    } else if (deviceType == 'fanmain_zl') {
+      yMax = 6000;
+    }
+  } else if (sysOrgCode == 'sdmtjtjjmk') {
+    yMax = 6000;
   } else {
     yMax = 4500;
   }
@@ -895,76 +908,6 @@ export const setOption = (deviceType?) => {
     series: [],
   });
 };
-// export const option = reactive<EChartsOption>({
-//   title: {
-//     text: '风机运行工况辅助曲线图',
-//     textStyle: {
-//       color: '#BF954D',
-//     },
-//     left: 'center',
-//     top: 0,
-//   },
-//   // backgroundColor: '#39deff',
-//   tooltip: {
-//     trigger: 'axis',
-//     axisPointer: {
-//       type: 'cross',
-//       label: {
-//         backgroundColor: '#6a7985',
-//       },
-//     },
-//   },
-//   toolbox: {
-//     show: true,
-//   },
-//   grid: {
-//     left: 8,
-//     right: 50,
-//     bottom: 0,
-//     containLabel: true,
-//   },
-//   xAxis: {
-//     type: 'category',
-//     name: 'm³/s',
-//     nameTextStyle: {
-//       fontWeight: 600,
-//       fontSize: 13,
-//     },
-//     splitLine: { show: true, lineStyle: { color: 'rgba(21,80,126,.5)' } },
-//     axisLabel: {
-//       margin: 20,
-//       fontSize: 14,
-//       color: '#f1f1f199',
-//     },
-//     boundaryGap: false,
-//     data: [],
-//   },
-//   yAxis: {
-//     type: 'value',
-//     axisLine: {
-//       show: true,
-//       lineStyle: {
-//         color: '#006c9d',
-//       },
-//     },
-//     splitLine: { show: true, lineStyle: { color: 'rgba(21,80,126,.5)' } },
-//     axisLabel: {
-//       show: true,
-//       fontSize: 14,
-//       formatter: '{value}',
-//       color: '#0071A5',
-//     },
-//     min: 0,
-//     // max: 5500, //白家渠
-//     max: 1200, //武当沟
-//     name: 'Pa',
-//     nameTextStyle: {
-//       fontWeight: 600,
-//       fontSize: 13,
-//     },
-//   },
-//   series: [],
-// });
 
 export const initData1 = () => {
   const assistanceData = {
@@ -1203,10 +1146,17 @@ export const initData1 = () => {
 // 大柳塔武当沟
 export const initData = (deviceType?) => {
   const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtdltmk';
+  // const sysOrgCode = 'sdmtjtjjmk';
   if (sysOrgCode == 'sdmtjtdltmk') {
-    // 这里判断白家渠还是五当沟
     return initDataDlt(deviceType);
+  } else if (sysOrgCode == 'sdmtjtswmk') {
+    return initDataSw(deviceType);
+  } else if (sysOrgCode == 'sdmtjtbltmk') {
+    return initDataBlt('fanmain_bfj');
+  } else if (sysOrgCode == 'sdmtjtbdmk') {
+    return initDataBd(deviceType);
+  } else if (sysOrgCode == 'sdmtjtjjmk') {
+    return initDataJj();
   } else {
     return initData1();
   }
@@ -1273,6 +1223,203 @@ export const initDataDlt = (deviceType?) => {
   }
 };
 
+export const initDataSw = (deviceType?) => {
+  if (deviceType == 'fanmain_bfj') {
+    // 北风井
+    const num = 2;
+    const obj = {
+      angle: 0,
+      Hz: 0,
+      a: -0.2486,
+      b: 14.998999006593294,
+      c: 3672.488224167444,
+      min: 300,
+      max: 1100.0,
+    };
+    const a = -0.2486,
+      m = 14.998999006593294,
+      n = 3672.488224167444;
+
+    const maxList = [115.67, 130.67, 146.67, 165.67, 185.67];
+    const minList = [50, 60, 70, 85, 100];
+    const data = [];
+    for (let i = -2; i <= num; i++) {
+      const item = cloneDeep(obj);
+      item['Hz'] = 0 + i * 3;
+      item['c'] = n + 5 * i;
+      item['b'] = m + i * 8;
+      item['max'] = maxList[i + 2];
+      item['min'] = minList[i + 2];
+      data.push(item);
+    }
+    return data;
+  } else if (deviceType == 'fanmain_nfj') {
+    // 南风井
+    const num = 2;
+    const obj = {
+      angle: 0,
+      Hz: -0,
+      a: -0.0445,
+      b: 15.46559392987956,
+      c: 2607.959183673496,
+      min: 300,
+      max: 1100.0,
+    };
+    const a = -0.0455,
+      m = 15.46559392987956,
+      n = 2607.959183673496;
+
+    const maxList = [315, 345, 375, 410, 450, 500];
+    const minList = [90, 105, 120, 145, 170, 185];
+    const data = [];
+    for (let i = -3; i <= num; i++) {
+      const item = cloneDeep(obj);
+      item['Hz'] = 0 + i * 3;
+      item['a'] = Math.round((a - 0.003 * (num - i)) * 10000) / 10000;
+      item['c'] = n + 10 * i;
+      item['b'] = m + i * 1.2;
+      item['max'] = maxList[i + 3];
+      item['min'] = minList[i + 3];
+      data.push(item);
+    }
+    return data;
+  }
+};
+
+const initDataBd = (deviceType?) => {
+  if (deviceType == 'fanmain_ljy') {
+    // 刘家宴
+    const num = 2;
+    const obj = {
+      angle: 0,
+      Hz: 0,
+      a: -0.02674,
+      b: 10.070078367532346,
+      c: 3048.210229423783,
+      min: 300,
+      max: 1100.0,
+    };
+    const a = -0.02774,
+      m = 10.090078367532346,
+      n = 3988.210229423783;
+
+    const maxList = [370, 410, 450, 500, 560, 624];
+    const minList = [70, 80, 100, 130, 160, 210];
+    const data = [];
+    let index = 0;
+    for (let i = -3; i <= num; i++) {
+      ++index;
+      const item = cloneDeep(obj);
+      item['a'] = Math.round((a - 0.002 * (6 - index)) * 10000) / 10000;
+      item['Hz'] = 0 + i * 3;
+      item['c'] = n + 10 * i;
+      item['b'] = m + i * 1.3;
+      item['max'] = maxList[i + 3];
+      item['min'] = minList[i + 3];
+      data.push(item);
+    }
+    return data;
+  } else if (deviceType == 'fanmain_zl') {
+    // 枣庄
+    const num = 2;
+    const obj = {
+      angle: 0,
+      Hz: 0,
+      a: -0.02674,
+      b: 10.070078367532346,
+      c: 3048.210229423783,
+      min: 300,
+      max: 1100.0,
+    };
+    const a = -0.05874,
+      m = 17.090078367532346,
+      n = 3588.210229423783;
+
+    const maxList = [315, 344, 379, 415, 454];
+    const minList = [160, 170, 180, 190, 200, 210];
+    const data = [];
+    let index = 0;
+    for (let i = -2; i <= num; i++) {
+      ++index;
+      const item = cloneDeep(obj);
+      item['a'] = Math.round((a - 0.003 * (6 - index)) * 10000) / 10000;
+      item['Hz'] = 0 + i * 3;
+      item['c'] = n + 6 * i;
+      item['b'] = m + i * 1.9;
+      item['max'] = maxList[i + 2];
+      item['min'] = minList[i + 2];
+      data.push(item);
+    }
+    return data;
+  }
+};
+
+const initDataBlt = (deviceType?) => {
+  const num = 2;
+  const obj = {
+    angle: 0,
+    Hz: 0,
+    a: -0.02674,
+    b: 10.070078367532346,
+    c: 3048.210229423783,
+    min: 300,
+    max: 1100.0,
+  };
+  const a = -0.02874,
+    m = 10.070078367532346,
+    n = 3048.210229423783;
+
+  const maxList = [370, 400, 440, 480, 525, 580];
+  const minList = [70, 80, 100, 130, 160, 210];
+  const data = [];
+  let index = 0;
+  for (let i = -3; i <= num; i++) {
+    ++index;
+    const item = cloneDeep(obj);
+    item['a'] = Math.round((a - 0.002 * (6 - index)) * 10000) / 10000;
+    item['Hz'] = 0 + i * 3;
+    item['c'] = n + 10 * i;
+    item['b'] = m + i * 1;
+    item['max'] = maxList[i + 3];
+    item['min'] = minList[i + 3];
+    data.push(item);
+  }
+  return data;
+};
+
+const initDataJj = (deviceType?) => {
+  const num = 2;
+  const obj = {
+    angle: 0,
+    Hz: 0,
+    a: -0.02674,
+    b: 10.070078367532346,
+    c: 3048.210229423783,
+    min: 300,
+    max: 1100.0,
+  };
+  const a = -0.09874,
+    m = 21.090078367532346,
+    n = 3588.210229423783;
+
+  const maxList = [239, 264, 292, 322, 354];
+  const minList = [60, 70, 80, 90, 100, 110];
+  const data = [];
+  let index = 0;
+  for (let i = -2; i <= num; i++) {
+    ++index;
+    const item = cloneDeep(obj);
+    item['a'] = Math.round((a - 0.003 * (6 - index)) * 10000) / 10000;
+    item['Hz'] = 0 + i * 3;
+    item['c'] = n + 10 * i;
+    item['b'] = m + i * 3;
+    item['max'] = maxList[i + 2];
+    item['min'] = minList[i + 2];
+    data.push(item);
+  }
+  return data;
+};
+
 export const fanInfoData = reactive({
   fj: '一号回风井',
   xh: 'FBCDZ No.29',
@@ -1292,67 +1439,67 @@ export const fanInfoData = reactive({
 export const fanInfo = [
   {
     title: '风井',
-    code: 'fj',
+    code: 'windWell_mainFanInfo',
     value: '一号回风井',
   },
   {
     title: '型号',
-    code: 'xh',
+    code: 'modelType_mainFanInfo',
     value: 'FBCDZ No.29',
   },
   {
     title: '功率(kW)',
-    code: 'gl',
+    code: 'powerRating_mainFanInfo',
     value: '2×500',
   },
   {
     title: '额定转速(r/min)',
-    code: 'edgl',
+    code: 'ratedSpeed_mainFanInfo',
     value: '740',
   },
   {
     title: '额定电压(V)',
-    code: 'eddy',
+    code: 'ratedVoltage_mainFanInfo',
     value: '10000',
   },
   {
     title: '额定电流(A)',
-    code: 'eddl',
+    code: 'ratedCurrent_mainFanInfo',
     value: '38.4',
   },
   {
     title: '风量范围(m³/s)',
-    code: 'flfw',
+    code: 'airflowRange_mainFanInfo',
     value: '110~260',
   },
   {
     title: '风压范围(Pa)',
-    code: 'fyfw',
+    code: 'pressureRange_mainFanInfo',
     value: '200~4100',
   },
   {
     title: '防爆等级',
-    code: 'fbdj',
+    code: 'explosionProofRating_mainFanInfo',
     value: 'ExdI',
   },
   {
     title: '出厂日期',
-    code: 'ccrq',
+    code: 'manufactureDate_mainFanInfo',
     value: '2010.07',
   },
   {
     title: '生产厂家',
-    code: 'sccj',
+    code: 'manufacturer_mainFanInfo',
     value: '南阳防爆',
   },
   {
     title: '调节方式',
-    code: 'tjfs',
+    code: 'adjustmentMethod_mainFanInfo',
     value: '变频调节',
   },
   {
     title: '频率可调范围(Hz)',
-    code: 'plfw',
+    code: 'angleAdjustableRange_mainFanInfo',
     value: '30~50',
   },
 ];

+ 4 - 2
src/views/vent/monitorManager/mainFanMonitor/main.threejs.ts

@@ -210,6 +210,8 @@ export const playAnimate1 = async (selectData, duration?) => {
 };
 
 export const playAnimate = async (selectData, duration?) => {
+  // if (Number(selectData.Fan1FreqHz) < 0) selectData.Fan1FreqHz = Math.abs(Number(selectData.Fan1FreqHz));
+  // if (Number(selectData.Fan2FreqHz) < 0) selectData.Fan2FreqHz = Math.abs(Number(selectData.Fan2FreqHz));
   if (!mainWindObj) return;
 
   let mainObj: mainWindRect | mainXjWindRect | undefined;
@@ -225,8 +227,8 @@ export const playAnimate = async (selectData, duration?) => {
   if (selectData && mainObj) {
     if (selectData['Fan1FreqHz'] == undefined || selectData['Fan1FreqHz'] == null || selectData['Fan1FreqHz'] == '') selectData['Fan1FreqHz'] = 50;
     if (selectData['Fan2FreqHz'] == undefined || selectData['Fan2FreqHz'] == null || selectData['Fan2FreqHz'] == '') selectData['Fan2FreqHz'] = 50;
-    mainObj.resetSmokeParam('front', selectData.Fan1FreqHz, duration);
-    mainObj.resetSmokeParam('back', selectData.Fan2FreqHz, duration);
+    mainObj.resetSmokeParam('front', selectData.Fan2FreqHz, duration);
+    mainObj.resetSmokeParam('back', selectData.Fan1FreqHz, duration);
     if (selectData.Fan2StartStatus == 1) {
       // 主风机开启
       mainObj?.lookMotor('front', 'open', duration);

+ 4 - 0
src/views/vent/monitorManager/mainFanMonitor/mainWind.threejs.ts

@@ -169,6 +169,7 @@ class mainWindRect {
   mouseUpModel() {}
 
   async setDeviceFrequency(deviceType, state, frequencyVal?) {
+    debugger;
     // 调节频率
     if (frequencyVal) {
       this.resetSmokeParam(deviceType, frequencyVal, 0);
@@ -199,6 +200,7 @@ class mainWindRect {
       await this.lookMotor(deviceType, 'open', duration);
       await this.openOrCloseValve(deviceType, 'open', duration);
       this.startGearAnimation(deviceType, 'open', smokeDirection, frequencyVal, duration);
+      debugger;
       smoke.startSmoke(duration);
     }
   }
@@ -349,6 +351,7 @@ class mainWindRect {
    * @param state // 打开、关闭状态
    */
   async playSmoke(controlType, deviceType, frequencyVal, state, smokeDirection) {
+    debugger;
     if (frequencyVal) {
       this.resetSmokeParam(deviceType, frequencyVal);
     }
@@ -371,6 +374,7 @@ class mainWindRect {
       if (smoke && smoke.frameId) {
         await smoke.stopSmoke();
         await this.setSmokeDirection(deviceType, smokeDirection);
+        debugger;
         smoke.startSmoke();
       }
     } else if (controlType === 'frequency') {

+ 17 - 19
src/views/vent/monitorManager/windowMonitor/index.vue

@@ -19,8 +19,8 @@
     <div class="top-box">
       <div class="top-center" style="display: flex">
         <div class="row" v-if="Number(selectData.nwindownum) > 1">
-          <div v-if="hasPermission('window:control')" class="button-box" @click="setArea(1)">设定前窗面积</div>
-          <div v-if="hasPermission('window:control')" class="button-box" @click="setArea(2)">设定后窗面积</div>
+          <div v-if="hasPermission('window:AreaControl')" class="button-box" @click="setArea(1)">设定前窗面积</div>
+          <div v-if="hasPermission('window:AreaControl')" class="button-box" @click="setArea(2)">设定后窗面积</div>
           <div v-if="hasPermission('window:gateControl')" class="button-box" @click="playAnimation(1)">打开前门</div>
           <div v-if="hasPermission('window:gateControl')" class="button-box" @click="playAnimation(2)">关闭前门</div>
           <div v-if="hasPermission('window:fltk')" class="button-box" @click="setArea(7)">前窗自主调控</div>
@@ -30,31 +30,29 @@
           <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(4)">自主联动控制停止</div> -->
         </div>
         <div class="row" v-if="Number(selectData.nwindownum) == 1">
-          <div v-if="hasPermission('window:control')" class="button-box" @click="setArea(1)">设定风窗面积</div>
+          <div v-if="hasPermission('window:AreaControl')" class="button-box" @click="setArea(1)">设定风窗面积</div>
           <div v-if="hasPermission('window:fltk')" class="button-box" @click="setArea(7)">风窗自主调控</div>
 
           <!-- 展会功能 -->
           <!-- <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制开启</div>
           <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(4)">自主联动控制停止</div> -->
         </div>
-        <template v-if="hasPermission('window:showAngle')">
-          <div class="row" v-if="Number(selectData.nwindownum) > 1">
-            <div v-if="hasPermission('window:control')" class="button-box" @click="setAngle(1)">设定前窗角度</div>
-            <div v-if="hasPermission('window:control')" class="button-box" @click="setAngle(2)">设定后窗角度</div>
-            <div v-if="hasPermission('window:fltk')" class="button-box" @click="setArea(7)">前窗自主调控</div>
-            <div v-if="hasPermission('window:fltk')" class="button-box" @click="setArea(8)">后窗自主调控</div>
-            <!-- 展会功能 -->
-            <!-- <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制开启</div>
+        <div class="row" v-if="Number(selectData.nwindownum) > 1">
+          <div v-if="hasPermission('window:showAngle')" class="button-box" @click="setAngle(1)">设定前窗角度</div>
+          <div v-if="hasPermission('window:showAngle')" class="button-box" @click="setAngle(2)">设定后窗角度</div>
+          <div v-if="hasPermission('window:fltk')" class="button-box" @click="setArea(7)">前窗自主调控</div>
+          <div v-if="hasPermission('window:fltk')" class="button-box" @click="setArea(8)">后窗自主调控</div>
+          <!-- 展会功能 -->
+          <!-- <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制开启</div>
             <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(4)">自主联动控制停止</div> -->
-          </div>
-          <div class="row" v-if="Number(selectData.nwindownum) == 1">
-            <div v-if="hasPermission('window:control')" class="button-box" @click="setAngle(1)">设定风窗角度</div>
-            <div v-if="hasPermission('window:fltk')" class="button-box" @click="setArea(7)">风窗自主调控</div>
-            <!-- 展会功能 -->
-            <!-- <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制开启</div>
+        </div>
+        <div class="row" v-if="Number(selectData.nwindownum) == 1">
+          <div v-if="hasPermission('window:showAngle')" class="button-box" @click="setAngle(1)">设定风窗角度</div>
+          <div v-if="hasPermission('window:fltk')" class="button-box" @click="setArea(7)">风窗自主调控</div>
+          <!-- 展会功能 -->
+          <!-- <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制开启</div>
             <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(4)">自主联动控制停止</div> -->
-          </div>
-        </template>
+        </div>
       </div>
       <div class="top-right row">
         <div v-if="hasPermission('window:controlFull')" class="button-box" @click="setArea(5)">一键全开</div>

+ 3 - 3
src/views/vent/monitorManager/windowMonitor/modal.vue

@@ -8,19 +8,19 @@
       <template v-if="type == '1' || type == '2'">
         <div class="vent-flex-row input-box">
           <div class="label">{{ title.includes('角度') ? '风窗角度:' : '风窗面积:' }}</div>
-          <a-input-number size="small" placeholder="0" :min="0" :max="90" v-model:value="area" />
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="area" />
         </div>
       </template>
       <template v-if="type == '7'">
         <div class="vent-flex-row input-box">
           <div class="label">前窗目标风量:</div>
-          <a-input-number size="small" placeholder="0" :min="0" :max="90" v-model:value="frontW" />
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="frontW" />
         </div>
       </template>
       <template v-if="type == '8'">
         <div class="vent-flex-row input-box">
           <div class="label">后窗目标风量:</div>
-          <a-input-number size="small" placeholder="0" :min="0" :max="90" v-model:value="rearW" />
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="rearW" />
         </div>
       </template>
       <div v-if="!globalConfig?.simulatedPassword" class="vent-flex-row input-box">

+ 19 - 15
src/views/vent/monitorManager/windowMonitor/shuangdaoFc.threejs.ts

@@ -71,7 +71,7 @@ class doubleWindow {
         y: 97,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        text: `${selectData.OpenDegree1 ? '前窗开度值(%)' : selectData.forntArea ? '前窗过风面积(㎡)' : '前窗过风面积(㎡)'}:`,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -79,8 +79,8 @@ class doubleWindow {
         y: 150,
       },
       {
-        text: selectData.OpenDegree
-          ? Number(`${selectData.OpenDegree}`).toFixed(2)
+        text: selectData.OpenDegree1
+          ? Number(`${selectData.OpenDegree1}`).toFixed(2)
           : selectData.forntArea
           ? Number(`${selectData.forntArea}`).toFixed(2)
           : '-',
@@ -91,7 +91,7 @@ class doubleWindow {
         y: 150,
       },
       {
-        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速' : '通信状态'}:`,
+        text: `${selectData.OpenDegree2 ? '后窗开度值(%)' : selectData.forntArea ? '后窗过风面积(㎡)' : '后窗过风面积(㎡)'}:`,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -99,15 +99,11 @@ class doubleWindow {
         y: 210,
       },
       {
-        text: `${
-          selectData.frontRearDP
-            ? selectData.frontRearDP
-            : selectData.windSpeed
-            ? selectData.windSpeed
-            : selectData.netStatus == '0'
-            ? '断开'
-            : '连接'
-        }`,
+        text: selectData.OpenDegree2
+          ? Number(`${selectData.OpenDegree2}`).toFixed(2)
+          : selectData.backArea
+          ? Number(`${selectData.backArea}`).toFixed(2)
+          : '-',
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -115,7 +111,7 @@ class doubleWindow {
         y: 210,
       },
       {
-        text: `${selectData.fWindowM3 ? '过风量(m³/min)' : '风窗道数'}: `,
+        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态'}:`,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -123,7 +119,15 @@ class doubleWindow {
         y: 266,
       },
       {
-        text: `${selectData.fWindowM3 ? selectData.fWindowM3 : selectData.nwindownum}`,
+        text: `${
+          selectData.frontRearDP
+            ? selectData.frontRearDP
+            : selectData.windSpeed
+            ? selectData.windSpeed
+            : selectData.netStatus == '0'
+            ? '断开'
+            : '连接'
+        }`,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',

+ 19 - 15
src/views/vent/monitorManager/windowMonitor/shuangdaoFcBlt.threejs.ts

@@ -54,7 +54,7 @@ class doubleWindow {
         y: 90,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        text: `${selectData.OpenDegree1 ? '前窗开度值(%)' : selectData.forntArea ? '前窗过风面积(㎡)' : '前窗过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -62,8 +62,8 @@ class doubleWindow {
         y: 145,
       },
       {
-        text: selectData.OpenDegree
-          ? Number(`${selectData.OpenDegree}`).toFixed(2)
+        text: selectData.OpenDegree1
+          ? Number(`${selectData.OpenDegree1}`).toFixed(2)
           : selectData.forntArea
           ? Number(`${selectData.forntArea}`).toFixed(2)
           : '-',
@@ -74,7 +74,7 @@ class doubleWindow {
         y: 145,
       },
       {
-        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态'}:`,
+        text: `${selectData.OpenDegree2 ? '后窗开度值(%)' : selectData.forntArea ? '后窗过风面积(㎡)' : '后窗过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -82,15 +82,11 @@ class doubleWindow {
         y: 200,
       },
       {
-        text: `${
-          selectData.frontRearDP
-            ? selectData.frontRearDP
-            : selectData.windSpeed
-            ? selectData.windSpeed
-            : selectData.netStatus == '0'
-            ? '断开'
-            : '连接'
-        }`,
+        text: selectData.OpenDegree2
+          ? Number(`${selectData.OpenDegree2}`).toFixed(2)
+          : selectData.backArea
+          ? Number(`${selectData.backArea}`).toFixed(2)
+          : '-',
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -98,7 +94,7 @@ class doubleWindow {
         y: 200,
       },
       {
-        text: `${selectData.fWindowM3 ? '过风量(m³/min)' : '风窗道数'}: `,
+        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -106,7 +102,15 @@ class doubleWindow {
         y: 256,
       },
       {
-        text: `${selectData.fWindowM3 ? selectData.fWindowM3 : selectData.nwindownum}`,
+        text: `${
+          selectData.frontRearDP
+            ? selectData.frontRearDP
+            : selectData.windSpeed
+            ? selectData.windSpeed
+            : selectData.netStatus == '0'
+            ? '断开'
+            : '连接'
+        }`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',

+ 20 - 15
src/views/vent/monitorManager/windowMonitor/shuangdaoFcSw.threejs.ts

@@ -76,7 +76,7 @@ class doubleWindow {
         y: 90,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        text: `${selectData.OpenDegree1 ? '前窗开度值(%)' : selectData.forntArea ? '前窗过风面积(㎡)' : '前窗过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -84,8 +84,8 @@ class doubleWindow {
         y: 145,
       },
       {
-        text: selectData.OpenDegree
-          ? Number(`${selectData.OpenDegree}`).toFixed(2)
+        text: selectData.OpenDegree1
+          ? Number(`${selectData.OpenDegree1}`).toFixed(2)
           : selectData.forntArea
           ? Number(`${selectData.forntArea}`).toFixed(2)
           : '-',
@@ -95,8 +95,9 @@ class doubleWindow {
         x: 330,
         y: 145,
       },
+
       {
-        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态'}:`,
+        text: `${selectData.OpenDegree2 ? '后窗开度值(%)' : selectData.forntArea ? '后窗过风面积(㎡)' : '后窗过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -104,15 +105,11 @@ class doubleWindow {
         y: 200,
       },
       {
-        text: `${
-          selectData.frontRearDP
-            ? selectData.frontRearDP
-            : selectData.windSpeed
-            ? selectData.windSpeed
-            : selectData.netStatus == '0'
-            ? '断开'
-            : '连接'
-        }`,
+        text: selectData.OpenDegree2
+          ? Number(`${selectData.OpenDegree2}`).toFixed(2)
+          : selectData.backArea
+          ? Number(`${selectData.backArea}`).toFixed(2)
+          : '-',
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -120,7 +117,7 @@ class doubleWindow {
         y: 200,
       },
       {
-        text: `${selectData.fWindowM3 ? '过风量(m³/min)' : '风窗道数'}: `,
+        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -128,7 +125,15 @@ class doubleWindow {
         y: 256,
       },
       {
-        text: `${selectData.fWindowM3 ? selectData.fWindowM3 : selectData.nwindownum}`,
+        text: `${
+          selectData.frontRearDP
+            ? selectData.frontRearDP
+            : selectData.windSpeed
+            ? selectData.windSpeed
+            : selectData.netStatus == '0'
+            ? '断开'
+            : '连接'
+        }`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',

+ 19 - 15
src/views/vent/monitorManager/windowMonitor/shuangdaoFcYjl.threejs.ts

@@ -56,7 +56,7 @@ class doubleWindowYjl {
         y: 97,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        text: `${selectData.OpenDegree1 ? '前窗开度值(%)' : selectData.forntArea ? '前窗过风面积(㎡)' : '前窗过风面积(㎡)'}:`,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -64,8 +64,8 @@ class doubleWindowYjl {
         y: 150,
       },
       {
-        text: selectData.OpenDegree
-          ? Number(`${selectData.OpenDegree}`).toFixed(2)
+        text: selectData.OpenDegree1
+          ? Number(`${selectData.OpenDegree1}`).toFixed(2)
           : selectData.forntArea
           ? Number(`${selectData.forntArea}`).toFixed(2)
           : '-',
@@ -76,7 +76,7 @@ class doubleWindowYjl {
         y: 150,
       },
       {
-        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速' : '通信状态'}:`,
+        text: `${selectData.OpenDegree2 ? '后窗开度值(%)' : selectData.forntArea ? '后窗过风面积(㎡)' : '后窗过风面积(㎡)'}:`,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -84,15 +84,11 @@ class doubleWindowYjl {
         y: 210,
       },
       {
-        text: `${
-          selectData.frontRearDP
-            ? selectData.frontRearDP
-            : selectData.windSpeed
-            ? selectData.windSpeed
-            : selectData.netStatus == '0'
-            ? '断开'
-            : '连接'
-        }`,
+        text: selectData.OpenDegree2
+          ? Number(`${selectData.OpenDegree2}`).toFixed(2)
+          : selectData.backArea
+          ? Number(`${selectData.backArea}`).toFixed(2)
+          : '-',
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -100,7 +96,7 @@ class doubleWindowYjl {
         y: 210,
       },
       {
-        text: `${selectData.fWindowM3 ? '过风量(m³/min)' : '风窗道数'}: `,
+        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态'}:`,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -108,7 +104,15 @@ class doubleWindowYjl {
         y: 266,
       },
       {
-        text: `${selectData.fWindowM3 ? selectData.fWindowM3 : selectData.nwindownum}`,
+        text: `${
+          selectData.frontRearDP
+            ? selectData.frontRearDP
+            : selectData.windSpeed
+            ? selectData.windSpeed
+            : selectData.netStatus == '0'
+            ? '断开'
+            : '连接'
+        }`,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',

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

@@ -226,7 +226,7 @@ export const setModelType = (type) => {
 
 export const mountedThree = (playerDom) => {
   const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtbltmk';
+  // const sysOrgCode = 'sdmtjtswmk';
   return new Promise(async (resolve) => {
     model = new UseThree('#window3D');
     if (!model || !model.renderer || !model.camera) return;

+ 14 - 9
src/views/vent/monitorManager/windrectMonitor/dantou.threejs.ts

@@ -194,22 +194,27 @@ class ddWindRect {
     const ddcfObj = this.group.getObjectByName(this.modelName);
     if (ddcfObj) {
       if (flag === 'sensor') {
-        ddcfObj.getObjectByName('ChuanGanQi').visible = true;
-        ddcfObj.getObjectByName('SheBei_1').visible = false;
+        if (ddcfObj.getObjectByName('ChuanGanQi')) ddcfObj.getObjectByName('ChuanGanQi').visible = true;
+        if (ddcfObj.getObjectByName('SheBei_1')) ddcfObj.getObjectByName('SheBei_1').visible = false;
       } else {
-        ddcfObj.getObjectByName('ChuanGanQi').visible = false;
-        ddcfObj.getObjectByName('SheBei_1').visible = true;
+        if (ddcfObj.getObjectByName('ChuanGanQi')) ddcfObj.getObjectByName('ChuanGanQi').visible = false;
+        if (ddcfObj.getObjectByName('SheBei_1')) ddcfObj.getObjectByName('SheBei_1').visible = true;
       }
     }
   }
 
   mountedThree() {
     return new Promise((resolve) => {
-      this.model.setGLTFModel([this.modelName], this.group).then(() => {
-        this.setModalPosition();
-        this.addLight();
-        resolve(null);
-      });
+      this.model
+        .setGLTFModel([this.modelName], this.group)
+        .then(() => {
+          this.setModalPosition();
+          this.addLight();
+          resolve(null);
+        })
+        .catch(() => {
+          resolve(null);
+        });
     });
   }
 

+ 14 - 9
src/views/vent/monitorManager/windrectMonitor/duishe.threejs.ts

@@ -395,15 +395,20 @@ class dsWindRect {
 
   mountedThree() {
     return new Promise((resolve) => {
-      this.model.setGLTFModel([this.modelName, 'dsgd', 'dsmove'], this.group).then((object) => {
-        // this.group.name = this.modelName;
-        this.resetModal();
-        this.setModalPosition();
-        this.initAnimation();
-        this.addLight();
-        if (this.deviceType) this.setModelType(this.deviceType);
-        resolve(null);
-      });
+      this.model
+        .setGLTFModel([this.modelName, 'dsgd', 'dsmove'], this.group)
+        .then((object) => {
+          // this.group.name = this.modelName;
+          this.resetModal();
+          this.setModalPosition();
+          this.initAnimation();
+          this.addLight();
+          if (this.deviceType) this.setModelType(this.deviceType);
+          resolve(null);
+        })
+        .catch(() => {
+          resolve(null);
+        });
     });
   }
 

+ 12 - 7
src/views/vent/monitorManager/windrectMonitor/duisheFixed.threejs.ts

@@ -278,13 +278,18 @@ class fixedWindRect {
 
   mountedThree(playerDom) {
     return new Promise((resolve) => {
-      this.model.setGLTFModel([this.modelName], this.group).then(() => {
-        this.setModalPosition();
-        this.addLight();
-        this.initAnimation();
-        // this.initCamera(playerDom);
-        resolve(null);
-      });
+      this.model
+        .setGLTFModel([this.modelName], this.group)
+        .then(() => {
+          this.setModalPosition();
+          this.addLight();
+          this.initAnimation();
+          // this.initCamera(playerDom);
+          resolve(null);
+        })
+        .catch(() => {
+          resolve(null);
+        });
     });
   }
 

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

@@ -287,24 +287,9 @@ export const setModelType = (type) => {
         // lmWindRectSideObj.playCamera(true);
       }, 300);
     } else if (windRectType.startsWith('ddWindSide') && ddWindRectObj && ddWindRectObj.group) {
+      model.scene.remove(group);
       model.startAnimation = ddWindRectObj.render.bind(ddWindRectObj);
       group = ddWindRectObj.group;
-
-      if (model.scene?.getObjectByName('lmcf')) {
-        model.scene.remove(lmWindRectObj.group);
-      }
-      if (model.scene?.getObjectByName('zdcf')) {
-        model.scene.remove(zdWindRectObj.group);
-      }
-      if (model.scene?.getObjectByName('lmcfSide')) {
-        model.scene.remove(lmWindRectSideObj.group);
-      }
-      if (model.scene?.getObjectByName('dscf')) {
-        model.scene.remove(dsWindRectObj.group);
-      }
-      if (model.scene?.getObjectByName('fixedCf')) {
-        model.scene.remove(fixedWindRectObj.group);
-      }
       model.scene?.add(ddWindRectObj.group);
       if (windRectType == 'ddWindSide_sensor') {
         // 显示传感器头