Selaa lähdekoodia

1. 布尔台注氮、注浆页、瓦斯抽采泵面修改
2. 局部风机页面调整,新增模型数据监测
3. 新增布尔台单道风窗
4. 设别历史数据分页查询修改

hongrunxia 1 vuosi sitten
vanhempi
commit
0be0a79e99
59 muutettua tiedostoa jossa 770 lisäystä ja 795 poistoa
  1. 4 0
      src/design/vent/modal.less
  2. 4 1
      src/hooks/system/useCamera.ts
  3. 12 0
      src/router/guard/permissionGuard.ts
  4. 1 1
      src/utils/event/index.ts
  5. 4 0
      src/utils/threejs/main.worker.ts
  6. 11 6
      src/utils/ventutil.ts
  7. 3 2
      src/views/vent/comment/threejs/Smoke.ts
  8. 28 32
      src/views/vent/comment/threejs/Smoke1.ts
  9. 17 3
      src/views/vent/comment/threejs/SmokePartical.ts
  10. 19 77
      src/views/vent/comment/threejs/SmokePartical1.ts
  11. 1 2
      src/views/vent/deviceManager/comment/warningTabel/warning.api.ts
  12. 1 1
      src/views/vent/deviceManager/deviceCategory/category.api.ts
  13. 1 0
      src/views/vent/deviceManager/deviceCategory/index.vue
  14. 5 7
      src/views/vent/deviceManager/equipManager/component/normalBtnTable.vue
  15. 4 1
      src/views/vent/deviceManager/fanTabel/fan.api.ts
  16. 1 7
      src/views/vent/monitorManager/alarmMonitor/index1.vue
  17. 24 20
      src/views/vent/monitorManager/balancePressMonitor/components/balancePressAlarmHistory.vue
  18. 24 19
      src/views/vent/monitorManager/balancePressMonitor/components/balancePressHistory.vue
  19. 1 6
      src/views/vent/monitorManager/balancePressMonitor1/index.vue
  20. 1 2
      src/views/vent/monitorManager/camera/index.vue
  21. 1 2
      src/views/vent/monitorManager/chamberMonitor/chamber.api.ts
  22. 38 19
      src/views/vent/monitorManager/chamberMonitor/chamber.threejs.base.ts
  23. 2 10
      src/views/vent/monitorManager/chamberMonitor/chamber.threejs.ts
  24. 0 1
      src/views/vent/monitorManager/chamberMonitor/components/chamberHistory.vue
  25. 40 22
      src/views/vent/monitorManager/comment/HistoryTable.vue
  26. 5 7
      src/views/vent/monitorManager/compressor/components/nitrogenHistory.vue
  27. 23 7
      src/views/vent/monitorManager/compressor/components/nitrogenHome_bet.vue
  28. 14 3
      src/views/vent/monitorManager/compressor/nitrogen.data.ts
  29. 10 132
      src/views/vent/monitorManager/compressor/nitrogen.dixia.threejs.ts
  30. 4 5
      src/views/vent/monitorManager/compressor/nitrogen.threejs.ts
  31. 4 2
      src/views/vent/monitorManager/deviceMonitor/components/device/device.data.ts
  32. 5 3
      src/views/vent/monitorManager/deviceMonitor/components/device/index.vue
  33. 38 21
      src/views/vent/monitorManager/fanLocalMonitor/fanLocal.three.ts
  34. 83 56
      src/views/vent/monitorManager/fanLocalMonitor/index.vue
  35. 1 1
      src/views/vent/monitorManager/fiberMonitor/index.vue
  36. 19 21
      src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHistory.vue
  37. 26 15
      src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHome.vue
  38. 75 15
      src/views/vent/monitorManager/gasPumpMonitor/gasPump.data.ts
  39. 1 1
      src/views/vent/monitorManager/gasPumpMonitor/index.vue
  40. 49 90
      src/views/vent/monitorManager/gateMonitor/gate.threejs.ts
  41. 2 2
      src/views/vent/monitorManager/gateMonitor/index.vue
  42. 16 12
      src/views/vent/monitorManager/groutMonitor/components/groutHandleHistory.vue
  43. 19 20
      src/views/vent/monitorManager/groutMonitor/components/groutHistory.vue
  44. 12 0
      src/views/vent/monitorManager/groutMonitor/components/groutHomeHjt.vue
  45. 23 29
      src/views/vent/monitorManager/groutMonitor/components/runParameter.modal.vue
  46. 23 29
      src/views/vent/monitorManager/groutMonitor/components/warningParameter.modal.vue
  47. 2 4
      src/views/vent/monitorManager/groutMonitor/index.vue
  48. 7 11
      src/views/vent/monitorManager/mainFanMonitor/index.vue
  49. 3 4
      src/views/vent/monitorManager/nitrogen/components/nitrogenHistory.vue
  50. 3 3
      src/views/vent/monitorManager/nitrogen/nitrogen.dataHsw.ts
  51. 3 3
      src/views/vent/monitorManager/nitrogen/nitrogen.dataYJ.ts
  52. 1 1
      src/views/vent/monitorManager/obfurage1Monitor/index.vue
  53. 24 20
      src/views/vent/monitorManager/obfurageMonitor/components/obfurageHistory.vue
  54. 0 1
      src/views/vent/monitorManager/safetyMonitor/index.vue
  55. 8 6
      src/views/vent/monitorManager/windowMonitor/dandaoFc.threejs.ts
  56. 1 1
      src/views/vent/monitorManager/windowMonitor/index.vue
  57. 15 19
      src/views/vent/monitorManager/windowMonitor/window.threejs.ts
  58. 3 9
      src/views/vent/monitorManager/windrectMonitor/index.vue
  59. 1 1
      src/views/vent/monitorManager/windrectMonitor/windrect.data.ts

+ 4 - 0
src/design/vent/modal.less

@@ -18,6 +18,7 @@
   }
   .elementTag{
     pointer-events: none !important;
+    
   }
   .threejs-Object-CSS {
     pointer-events: none;
@@ -84,6 +85,9 @@
         //animation: sign 1s infinite;
       }
     }
+    .value{
+      color: #e90;
+    }
     @keyframes sign {
       0% {
         background: #d35d00;

+ 4 - 1
src/hooks/system/useCamera.ts

@@ -133,7 +133,10 @@ export function useCamera() {
                   videoDom.autoplay = true;
 
                   try {
-                    const server = new window['WebRtcStreamer'](videoDom, location.protocol + VUE_APP_URL.webRtcUrl);
+                    const server = new window['WebRtcStreamer'](
+                      videoDom,
+                      VUE_APP_URL.webRtcUrl.startsWith('/') ? location.protocol + VUE_APP_URL.webRtcUrl : VUE_APP_URL.webRtcUrl
+                    );
                     newWebRtcServer.unshift(server);
                     await server.connect(cameraUrl.addr);
                     videoDom.play();

+ 12 - 0
src/router/guard/permissionGuard.ts

@@ -73,6 +73,7 @@ export function createPermissionGuard(router: Router) {
         try {
           if (!isSessionTimeout) {
             next((to.query?.redirect as string) || '/');
+            document.title = '';
             return;
           }
         } catch {}
@@ -85,12 +86,14 @@ export function createPermissionGuard(router: Router) {
           setAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID, to.query.tenantId);
         }
         next({ path: OAUTH2_LOGIN_PAGE_PATH });
+        document.title = '登录';
         //update-end---author:wangshuai ---date:20230224  for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
         return;
         //update-end---author:wangshuai ---date:20220629  for:[issues/I5BG1I]vue3不支持auth2登录------------
       }
       // mountMicroApp(to.path);
       next();
+      document.title = to.meta.title;
       return;
     }
 
@@ -100,6 +103,7 @@ export function createPermissionGuard(router: Router) {
       if (to.meta.ignoreAuth) {
         // mountMicroApp(to.path);
         next();
+        document.title = to.meta.title;
         return;
       }
 
@@ -109,10 +113,12 @@ export function createPermissionGuard(router: Router) {
         // 在免登录白名单,如果进入的页面是login页面并且当前是OAuth2app环境,就进入OAuth2登录页面
         if (to.path === LOGIN_PATH && isOAuth2AppEnv()) {
           next({ path: OAUTH2_LOGIN_PAGE_PATH });
+          document.title = '登录';
         } else {
           //在免登录白名单,直接进入
           // mountMicroApp(to.path);
           next();
+          document.title = to.meta.title;
         }
       } else {
         //update-begin---author:wangshuai ---date:20230302  for:只有首次登陆并且是企业微信或者钉钉的情况下才会调用------------
@@ -167,12 +173,14 @@ export function createPermissionGuard(router: Router) {
       }
       // mountMicroApp(redirectData.path);
       next(redirectData);
+      document.title = '';
       return;
     }
     //==============================【首次登录并且是企业微信或者钉钉的情况下才会调用】==================
     //判断是免登录页面,如果页面包含/tenantId/,那么就直接前往主页
     if (isOAuth2AppEnv() && to.path.indexOf('/tenantId/') != -1) {
       next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME);
+      document.title = '首页';
       return;
     }
     //==============================【首次登录并且是企业微信或者钉钉的情况下才会调用】==================
@@ -185,6 +193,7 @@ export function createPermissionGuard(router: Router) {
     ) {
       // mountMicroApp(userStore.getUserInfo.homePath || PageEnum.BASE_HOME);
       next(userStore.getUserInfo.homePath || PageEnum.BASE_HOME);
+      document.title = '首页';
       return;
     }
 
@@ -196,11 +205,13 @@ export function createPermissionGuard(router: Router) {
         console.info(err);
         // mountMicroApp(to.path);
         next();
+        document.title = to.meta.title;
       }
     }
     if (permissionStore.getIsDynamicAddedRoute) {
       // mountMicroApp(to.path);
       next();
+      document.title = to.meta.title;
       return;
     }
 
@@ -224,6 +235,7 @@ export function createPermissionGuard(router: Router) {
       const nextData = to.path === redirect ? { ...to, replace: true } : { path: redirect };
       // mountMicroApp(nextData.path);
       next(nextData);
+      document.title = '';
     }
   });
 }

+ 1 - 1
src/utils/event/index.ts

@@ -42,7 +42,7 @@ export function triggerWindowResize() {
 }
 
 export function setDivHeight(e: MouseEvent, minHeight, scroll, scrollClientMaxHeight = 175, scrollClientHeight = 100) {
-  if (e && e.target && e.target['className'].includes('input')) {
+  if (e && e.target && e.target['className'] && e.target['className'].includes('input')) {
     return;
   }
   e.preventDefault();

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

@@ -156,6 +156,10 @@ export function initTHREE() {
 
   if (!window['$orbitControls']) {
     const orbitControls = new OrbitControls(window['$camera'] as THREE.Camera, window['$renderer']?.domElement) as OrbitControls;
+    orbitControls.mouseButtons = {
+      MIDDLE: THREE.MOUSE.PAN,
+      RIGHT: THREE.MOUSE.ROTATE,
+    };
     window['$orbitControls'] = orbitControls;
   }
 }

+ 11 - 6
src/utils/ventutil.ts

@@ -31,18 +31,20 @@ export function toEchartsData(list, option) {
   return option;
 }
 
-export function formatNum(data) {
+export function formatNum(data, len = 2) {
   return new Intl.NumberFormat('ja-JP', {
-    minimumFractionDigits: 2,
-    maximumFractionDigits: 2,
+    minimumFractionDigits: len,
+    maximumFractionDigits: len,
   }).format(data);
 }
 
 export function cameraInit(dom, rtspUrl) {
   let webRtcServer = undefined;
-  const ip = VUE_APP_URL.webRtcUrl;
   // const ip = '//192.168.183.216:8000';
-  webRtcServer = new window['WebRtcStreamer'](dom, location.protocol + ip);
+  webRtcServer = new window['WebRtcStreamer'](
+    dom,
+    VUE_APP_URL.webRtcUrl.startsWith('/') ? location.protocol + VUE_APP_URL.webRtcUrl : VUE_APP_URL.webRtcUrl
+  );
 
   if (webRtcServer) webRtcServer.connect(rtspUrl);
   return { webRtcServer };
@@ -112,7 +114,10 @@ export function deviceCameraInit(cameraAddrs, player: HTMLElement, webRtcServerL
                 videoParentDomList.push(videoParentDom);
 
                 try {
-                  const server = new window['WebRtcStreamer'](videoDom, location.protocol + VUE_APP_URL.webRtcUrl);
+                  const server = new window['WebRtcStreamer'](
+                    videoDom,
+                    VUE_APP_URL.webRtcUrl.startsWith('/') ? location.protocol + VUE_APP_URL.webRtcUrl : VUE_APP_URL.webRtcUrl
+                  );
                   webRtcServer.unshift(server);
                   await server.connect(cameraUrl.addr);
                   videoDom.play();

+ 3 - 2
src/views/vent/comment/threejs/Smoke.ts

@@ -109,7 +109,8 @@ export default class Smoke {
       opacityFactor: this.oldOpacityFactor,
       life: this.oldLife,
       duration: duration,
-      ease: 'easeInQuint',
+      // ease: 'easeInQuint',
+      ease: 'easeOutCirc',
     });
 
     // 创建粒子
@@ -189,7 +190,7 @@ export default class Smoke {
     if (this.frameId) {
       cancelAnimationFrame(this.frameId);
     }
-    
+
     const material = this.points.material;
     for (const key of Object.keys(material)) {
       const value = material[key];

+ 28 - 32
src/views/vent/comment/threejs/Smoke1.ts

@@ -1,5 +1,5 @@
 import * as THREE from 'three';
-import SmokePartical from './SmokePartical';
+import SmokePartical1 from './SmokePartical1';
 
 export default class Smoke {
   smokeTexturePath;
@@ -15,7 +15,7 @@ export default class Smoke {
   updateTimer;
   path;
 
-  constructor(smokeTexturePath, color, range, center, opacityFactor, scaleFactor, life, path = null) {
+  constructor(smokeTexturePath, color, range = 10, center?, opacityFactor?, scaleFactor?, life?) {
     this.smokeTexturePath = smokeTexturePath;
     this.color = color;
     this.opacityFactor = opacityFactor;
@@ -23,7 +23,7 @@ export default class Smoke {
     this.range = range;
     this.center = center;
     this.life = life;
-    this.path = path;
+    // this.path = path;
   }
 
   setPoints() {
@@ -78,50 +78,46 @@ export default class Smoke {
 
   startSmoke() {
     // 创建粒子
-    let particals = [] as SmokePartical[];
-    this.createTimer = setInterval(() => {
-      particals.push(new SmokePartical(this.range, this.center, this.opacityFactor, this.scaleFactor, this.life, this.path));
-    }, 30);
+    let particals: SmokePartical1[] = [];
+    setInterval(() => {
+      particals.push(new SmokePartical1(this.range, { x: 0, y: 100, z: 0 }));
+    }, 100);
 
     // 校验粒子,并更新粒子位置等数据
     this.updateTimer = setInterval(() => {
       particals = particals.filter((partical) => {
-        if (!this.path) {
-          partical.update();
-        } else {
-          partical.updateByPath();
-        }
-
-        if (partical.updateTime - partical.createTime >= partical.life) {
+        partical.update();
+        if (partical.updateTime - partical.createTime > partical.life) {
           return false;
         } else {
           return true;
         }
       });
-
       if (!particals.length) return;
 
       // 遍历粒子,收集属性
-      const positionList = [];
-      const normalList = [];
-      const opacityList = [];
-      const scaleList = [];
-      const sizeList = [];
-
-      particals.forEach((partical: SmokePartical) => {
-        const { x, y, z } = partical.position;
-        positionList.push(x, y, z);
-        opacityList.push(partical.opacity);
-        scaleList.push(partical.scale);
-        sizeList.push(partical.size);
+      const positionList: number[] = [];
+      const opacityList: number[] = [];
+      const scaleList: number[] = [];
+      const sizeList: number[] = [];
+      particals.forEach((partical: SmokePartical1) => {
+        if (partical) {
+          const { x, y, z } = partical.position;
+          positionList.push(x, y, z);
+          opacityList.push(partical.opacity);
+          scaleList.push(partical.scale);
+          sizeList.push(partical.size);
+        }
       });
 
       // 粒子属性写入
-      this.points.geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(positionList), 3));
-      this.points.geometry.setAttribute('a_opacity', new THREE.BufferAttribute(new Float32Array(opacityList), 1));
-      this.points.geometry.setAttribute('a_scale', new THREE.BufferAttribute(new Float32Array(scaleList), 1));
-      this.points.geometry.setAttribute('a_size', new THREE.BufferAttribute(new Float32Array(sizeList), 1));
-    }, 30);
+      if (this.geometry) {
+        this.geometry.setAttribute('position', new THREE.BufferAttribute(new Float32Array(positionList), 3));
+        this.geometry.setAttribute('a_opacity', new THREE.BufferAttribute(new Float32Array(opacityList), 1));
+        this.geometry.setAttribute('a_scale', new THREE.BufferAttribute(new Float32Array(scaleList), 1));
+        this.geometry.setAttribute('a_size', new THREE.BufferAttribute(new Float32Array(sizeList), 1));
+      }
+    }, 20);
   }
   stopSmoke() {
     if (this.createTimer) clearInterval(this.createTimer);

+ 17 - 3
src/views/vent/comment/threejs/SmokePartical.ts

@@ -57,14 +57,16 @@ export default class SmokePartical {
         path1: pathArr[i].path1.clone(),
         isSpread: pathArr[i].isSpread,
         spreadDirection: pathArr[i].spreadDirection, // 1是由小变大,-1是由大变小
+        spreadRang: pathArr[i]['spreadRang'] || 0,
       };
       if (obj.isSpread) {
-        if (obj.spreadDirection == 1) {
+        if (obj.spreadDirection >= 1) {
           let vec;
           if (Math.abs(obj.path0.y - obj.path1.y) > 3) {
+            const len = obj.spreadRang ? obj.spreadRang : 8;
             vec = new THREE.Vector3(
               (Math.random() * 2 - 1) * 3 + obj.path1.x,
-              Math.random() * 8 + obj.path1.y,
+              Math.random() * len + obj.path1.y,
               (Math.random() * 2 - 1) * 3 + obj.path1.z
             );
           } else {
@@ -90,9 +92,21 @@ export default class SmokePartical {
               (Math.random() * 2 - 1) * 3 + obj.path0.z
             );
           }
-
           obj.path0.copy(vec);
         }
+      } else if (obj.spreadDirection != 0) {
+        const vec = new THREE.Vector3(
+          (Math.random() * 2 - 1) * 3 + obj.path0.x,
+          (Math.random() * 2 - 1) * obj.spreadDirection + obj.path0.y,
+          (Math.random() * 2 - 1) * 3 + obj.path0.z
+        );
+        const vec1 = new THREE.Vector3(
+          (Math.random() * 2 - 1) * 3 + obj.path1.x,
+          (Math.random() * 2 - 1) * obj.spreadDirection + obj.path1.y,
+          (Math.random() * 2 - 1) * 3 + obj.path1.z
+        );
+        obj.path0.copy(vec);
+        obj.path1.copy(vec1);
       }
       this.pathArr.push(obj);
       const len = obj.path0.distanceTo(obj.path1);

+ 19 - 77
src/views/vent/comment/threejs/SmokePartical1.ts

@@ -1,7 +1,4 @@
-// 定义Partical类
-import gsap from 'gsap';
-
-export default class SmokePartical {
+export default class SmokePartical1 {
   range; // 粒子的分布半径
   center; // 粒子的分布中心
   life; // 粒子的存活时间,毫秒
@@ -14,59 +11,42 @@ export default class SmokePartical {
   scaleFactor; //粒子放大系数
   position; // 粒子位置
   speed; //粒子扩散速度
-  normal; // 粒子法向
-  path; // 运动路径
-  updateFactor = 5;
-  动画更新系数;
 
-  constructor(range = 10, center = { x: 0, y: 0, z: 0 }, opacityFactor, scaleFactor, life, path = null) {
-    this.range = range;
-    this.center = center;
-    this.life = life;
-    this.path = path;
-    this.createTime = Date.now();
-    this.updateTime = Date.now();
-    this.size = 15;
+  constructor(range = 10, center = { x: 0, y: 0, z: 0 }) {
+    this.range = range; // 粒子的分布半径
+    this.center = center; // 粒子的分布中心
+    this.life = 1000; // 粒子的存活时间,毫秒
+    this.createTime = Date.now(); // 粒子创建时间
+    this.updateTime = Date.now(); // 上次更新时间
+    this.size = 200; // 粒子大小
 
     // 粒子透明度,及系数
-    this.opacityFactor = opacityFactor;
+    this.opacityFactor = 0.4;
     this.opacity = 1 * this.opacityFactor;
 
     // 粒子放大量,及放大系数
-    this.scaleFactor = scaleFactor;
-    this.scale = 0.1 + (this.scaleFactor * (this.updateTime - this.createTime)) / this.life; // 初始1,到达生命周期时为3
+    this.scaleFactor = 2.5;
+    this.scale = (this.scaleFactor * (this.updateTime - this.createTime)) / this.life; // 初始1,到达生命周期时为3
 
     // 粒子位置
-    // this.position = {
-    //   x: Math.random() * 2 * this.range + this.center.x - this.range,
-    //   y: this.center.y,
-    //   z: Math.random() * 2 * this.range + this.center.z - this.range,
-    // }
-
     this.position = {
-      x: 0,
+      x: Math.random() * 2 * this.range + this.center.x - this.range,
       y: this.center.y,
-      z: 0,
+      z: Math.random() * 2 * this.range + this.center.z - this.range,
     };
 
     // 水平方向的扩散
     let speedAround = Math.random() * 10;
     if (speedAround < 5) speedAround -= 5;
-    if (speedAround > 5) speedAround += 2;
+    if (speedAround > 5) speedAround += 1;
 
     // 粒子的扩散速度
-    // this.speed = {
-    //   x: speedAround,
-    //   y: Math.random() * 100 + 80,
-    //   z: speedAround,
-    // }
     this.speed = {
-      x: Math.random() * 5,
-      y: Math.random() * 50 + 50,
-      z: Math.random() * 5,
+      x: speedAround,
+      y: Math.random() * 10 - this.life * 14,
+      z: speedAround,
     };
   }
-
   // 更新粒子
   update() {
     const now = Date.now();
@@ -83,48 +63,10 @@ export default class SmokePartical {
     if (this.opacity < 0) this.opacity = 0;
 
     // 计算放大量
-    this.scale = 1 + (this.scaleFactor * (now - this.createTime)) / this.life;
-    if (this.scale > 1 + this.scaleFactor) this.scale = 1 + this.scaleFactor;
+    this.scale = this.scaleFactor * ((now - this.createTime) / this.life) + 0.01;
+    if (this.scale > 0.01 + this.scaleFactor) this.scale = 0.01 + this.scaleFactor;
 
     // 重置更新时间
     this.updateTime = now;
   }
-
-  controlUpdate() {
-    // gsap.to(this.speed, {
-    //   x: 250,
-    //   duration: 1,
-    //   ease: 'none',
-    //   repeat: -1,
-    // });
-  }
-
-  // 更新粒子
-  updateByPath() {
-    const now = Date.now();
-    const time = now - this.updateTime;
-
-    if (this.path && now - this.createTime <= this.life * this.updateFactor) {
-      const position = this.path.getPointAt((now - this.createTime) / this.life / this.updateFactor);
-      const tangent = this.path.getTangentAt((now - this.createTime) / this.life / this.updateFactor);
-
-      // 更新位置
-      this.position = { x: position.x, y: position.y, z: position.z };
-      this.normal = { x: tangent.x, y: tangent.y, z: tangent.z };
-
-      // 计算粒子透明度
-      this.opacity = 1 - (now - this.createTime) / this.life;
-      this.opacity *= this.opacityFactor;
-      if (this.opacity < 0) this.opacity = 0;
-
-      // 计算放大量
-      this.scale = 1 + (this.scaleFactor * (now - this.createTime)) / this.life;
-      if (this.scale > 1 + this.scaleFactor) this.scale = 1 + this.scaleFactor;
-      this.updateTime = now - (now - this.createTime) * this.updateFactor;
-    } else {
-      this.createTime = Date.now();
-      this.updateTime = Date.now();
-    }
-    // 重置更新时间
-  }
 }

+ 1 - 2
src/views/vent/deviceManager/comment/warningTabel/warning.api.ts

@@ -131,5 +131,4 @@ export const backWindControlDevicePointDelete = (params) => {
 export const warningLogList = (params) => defHttp.get({ url: Api.warningLogList, params });
 export const warningLogAdd = (params) => defHttp.post({ url: Api.warningLogAdd, params });
 export const warningLogEdit = (params) => defHttp.put({ url: Api.warningLogEdit, params });
-export const warningLogDeleteById = (params) => defHttp.delete({ url: Api.warningLogDeleteById, params })
-
+export const warningLogDeleteById = (params) => defHttp.delete({ url: Api.warningLogDeleteById, params });

+ 1 - 1
src/views/vent/deviceManager/deviceCategory/category.api.ts

@@ -58,7 +58,7 @@ export const batchDeleteCategory = (params, handleSuccess) => {
  * @param params
  */
 export const saveOrUpdateDict = (params, isUpdate) => {
-  let url = isUpdate ? Api.edit : Api.save;
+  const url = isUpdate ? Api.edit : Api.save;
   return defHttp.post({ url: url, params });
 };
 /**

+ 1 - 0
src/views/vent/deviceManager/deviceCategory/index.vue

@@ -262,6 +262,7 @@
    * 操作栏
    */
   function getTableAction(record) {
+    debugger;
     return [
       {
         label: '编辑',

+ 5 - 7
src/views/vent/deviceManager/equipManager/component/normalBtnTable.vue

@@ -23,10 +23,7 @@
       <template #action="{ record }">
         <a class="table-action-link" @click="handleEdit(record)">编辑</a>
         <a class="table-action-link" @click="handleAdds(record)">新增下级</a>
-        <a-popconfirm
-          title="确定删除?"
-          @confirm="handleDelete(record)"
-        >
+        <a-popconfirm title="确定删除?" @confirm="handleDelete(record)">
           <a class="table-action-link">删除</a>
         </a-popconfirm>
         <slot name="action" v-bind="{ record }"></slot>
@@ -167,14 +164,15 @@
       delete record[key];
     }
     isUpdate.value = false;
-    openModal(true, {addParent: true});
+    openModal(true, { addParent: true });
   }
   /**
    * 新增下级
    */
   function handleAdds(data) {
-    console.log(data,'添加下级')
-    dictId.value = data.subDictId;
+    debugger;
+    console.log(data, '添加下级');
+    dictId.value = data.subDictId || data.dictId;
     for (let key in record) {
       delete record[key];
     }

+ 4 - 1
src/views/vent/deviceManager/fanTabel/fan.api.ts

@@ -2,7 +2,7 @@ import { defHttp } from '/@/utils/http/axios';
 import { Modal } from 'ant-design-vue';
 
 enum Api {
-  // list = '/safety/ventanalyFan/list',
+  tableList = '/ventanaly-device/monitor/device',
   list = '/safety/ventanalyDeviceInfo/list',
   save = '/safety/ventanalyFan/add',
   edit = '/safety/ventanalyFan/edit',
@@ -10,6 +10,7 @@ enum Api {
   deleteBatch = '/sys/user/deleteBatch',
   importExcel = '/sys/user/importExcel',
   exportXls = '/sys/user/exportXls',
+  systemList = '/ventanaly-device/monitor/device',
 }
 /**
  * 导出api
@@ -26,6 +27,8 @@ export const getImportUrl = Api.importExcel;
  */
 export const list = (params) => defHttp.get({ url: Api.list, params });
 
+export const getTableList = (params) => defHttp.get({ url: Api.systemList, params });
+
 /**
  * 删除用户
  */

+ 1 - 7
src/views/vent/monitorManager/alarmMonitor/index1.vue

@@ -39,13 +39,7 @@
       </a-tab-pane>
       <a-tab-pane key="2" tab="实时报警">
         <div class="tab-item table-box box-bg padding-0">
-          <HistoryTable
-            columns-type="modelsensor"
-            device-type="modelsensor"
-            :device-list-api="baseList"
-            @change="historyDataSourceChange"
-            designScope="modelsensor-history"
-          />
+          <HistoryTable columns-type="modelsensor" device-type="modelsensor" @change="historyDataSourceChange" designScope="modelsensor-history" />
         </div>
         <div class="charts-box box-bg">
           <BarAndLine

+ 24 - 20
src/views/vent/monitorManager/balancePressMonitor/components/balancePressAlarmHistory.vue

@@ -1,30 +1,34 @@
 <template>
   <div class="alarm-history">
-    <AlarmHistoryTable columns-type="alarm" device-type="sys_surface_junya"
+    <AlarmHistoryTable
+      columns-type="alarm"
+      device-type="sys_surface_junya"
       :list="list"
       :sys-id="deviceId"
-      :device-list-api="workFaceDeviceList.bind(null, { id: deviceId })" designScope="alarm-history" />
+      :device-list-api="workFaceDeviceList.bind(null, { id: deviceId })"
+      designScope="alarm-history"
+    />
   </div>
 </template>
 <script setup lang="ts">
-import AlarmHistoryTable from '../../comment/AlarmHistoryTable.vue';
-import { workFaceDeviceList } from '../../../deviceManager/comment/warningTabel/warning.api'
-import { defHttp } from '/@/utils/http/axios';
+  import AlarmHistoryTable from '../../comment/AlarmHistoryTable.vue';
+  import { workFaceDeviceList } from '../../../deviceManager/comment/warningTabel/warning.api';
+  import { defHttp } from '/@/utils/http/axios';
 
-const list = (params) => defHttp.get({ url: '/safety/managesysAutoLog/list', params })
-const props = defineProps({
-  deviceType: {
-    type: String,
-    required: true,
-  },
-  deviceId: {
-    type: String,
-    required: true,
-  }
-})
+  const list = (params) => defHttp.get({ url: '/safety/managesysAutoLog/list', params });
+  const props = defineProps({
+    deviceType: {
+      type: String,
+      required: true,
+    },
+    deviceId: {
+      type: String,
+      required: true,
+    },
+  });
 </script>
 <style lang="less" scoped>
-.alarm-history {
-  pointer-events: auto;
-}
-</style>
+  .alarm-history {
+    pointer-events: auto;
+  }
+</style>

+ 24 - 19
src/views/vent/monitorManager/balancePressMonitor/components/balancePressHistory.vue

@@ -1,27 +1,32 @@
 <template>
   <div class="history-box">
-    <HistoryTable :columns-type="`${deviceType}`" :device-type="deviceType" :sysId="deviceId" designScope="pressurefan_history" :scroll="{ y: 650 }"/>
+    <HistoryTable
+      :columns-type="`${deviceType}`"
+      :device-type="deviceType"
+      :sysId="deviceId"
+      designScope="pressurefan_history"
+      :scroll="{ y: 650 }"
+    />
   </div>
 </template>
 <script setup lang="ts">
-import { ref, defineProps } from 'vue'
-import HistoryTable from '../../comment/HistoryTable.vue';
-// import { getTableList } from '../balancePress.api'
-
-const props = defineProps({
-  deviceType: {
-    type: String,
-    required: true,
-  },
-  deviceId: {
-    type: String,
-    required: true,
-  }
-})
+  import { ref, defineProps } from 'vue';
+  import HistoryTable from '../../comment/HistoryTable.vue';
+  // import { getTableList } from '../balancePress.api'
 
+  const props = defineProps({
+    deviceType: {
+      type: String,
+      required: true,
+    },
+    deviceId: {
+      type: String,
+      required: true,
+    },
+  });
 </script>
 <style lang="less" scoped>
-.history-box {
-  pointer-events: auto;
-}
-</style>
+  .history-box {
+    pointer-events: auto;
+  }
+</style>

+ 1 - 6
src/views/vent/monitorManager/balancePressMonitor1/index.vue

@@ -84,12 +84,7 @@
           </a-tab-pane>
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item" v-if="activeKey === '3'">
-              <HistoryTable
-                columns-type="sys_surface_junya"
-                device-type="sys_surface_junya"
-                :device-list-api="baseList"
-                designScope="sys_surface_junya-history"
-              />
+              <HistoryTable columns-type="sys_surface_junya" device-type="sys_surface_junya" designScope="sys_surface_junya-history" />
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">

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

@@ -143,14 +143,13 @@
   }
 
   function getVideo() {
-    const ip = VUE_APP_URL.webRtcUrl;
     for(let i = 0; i < addrList.value.length; i++){
       const item = addrList.value[i]
       if(item.addr.startsWith('rtsp://')){
         const dom = document.getElementById('video' + i) as HTMLVideoElement
         dom.muted = true;
         dom.volume = 0   
-        const webRtcServer = new window['WebRtcStreamer'](dom, location.protocol + ip)
+        const webRtcServer = new window['WebRtcStreamer'](dom, VUE_APP_URL.webRtcUrl.startsWith('/') ? location.protocol + VUE_APP_URL.webRtcUrl : VUE_APP_URL.webRtcUrl)
         webRtcServerList.push(webRtcServer)
         webRtcServer.connect(item.addr)
       }else{

+ 1 - 2
src/views/vent/monitorManager/chamberMonitor/chamber.api.ts

@@ -3,7 +3,6 @@ import { Modal } from 'ant-design-vue';
 
 enum Api {
   list = '/ventanaly-device/monitor/device',
-  baseList = '/safety/ventanalyMonitorData/list',
 }
 /**
  * 列表接口
@@ -15,4 +14,4 @@ export const list = (params) => defHttp.post({ url: Api.list, params });
  * 保存或者更新用户
  * @param params
  */
-export const getTableList = (params) => defHttp.get({ url: Api.baseList, params });
+export const getTableList = (params) => defHttp.get({ url: Api.list, params });

+ 38 - 19
src/views/vent/monitorManager/chamberMonitor/chamber.threejs.base.ts

@@ -1,4 +1,6 @@
 import * as THREE from 'three';
+import Smoke from '/@/views/vent/comment/threejs/Smoke';
+import Smoke1 from '/@/views/vent/comment/threejs/Smoke1';
 // import * as dat from 'dat.gui';
 // const gui = new dat.GUI();
 // gui.domElement.style = 'position:absolute;top:100px;left:10px;z-index:99999999999999';
@@ -7,6 +9,8 @@ class ChamberBase {
   model;
   modelName = 'chamber';
   group: THREE.Object3D | null = null;
+  smoke: Smoke | undefined;
+  smoke1: Smoke1 | undefined;
 
   constructor(model) {
     this.model = model;
@@ -17,40 +21,55 @@ class ChamberBase {
     directionalLight.position.set(15, 69, -39);
     this.group?.add(directionalLight);
     directionalLight.target = this.group as THREE.Object3D;
+  }
+
+  async initSmoke() {
+    // 喷雾
+    const moveCurve = [
+      {
+        path0: new THREE.Vector3(0, 0, 0),
+        path1: new THREE.Vector3(0, -8, 0),
+        isSpread: true,
+        spreadDirection: 1, // 1是由小变大,-1是由大变小
+        spreadRang: 1,
+      },
+    ];
+    this.smoke = new Smoke('/model/img/texture-smoke.png', '#ffffffaa', 10, 0.9, 0.4, 30);
+    this.smoke.setPath(moveCurve);
+    await this.smoke.setPoints();
+    this.group?.add(this.smoke.points);
+    this.smoke.points.scale.set(55, 100, 55);
+    this.smoke.points.position.set(272.432, 547.837, 1174.679);
+
+    // 喷粉
+    this.smoke1 = new Smoke1('/model/img/texture-smoke.png', '#ffffff', 0.1);
+    await this.smoke1.setPoints();
+    this.group?.add(this.smoke1.points);
+  }
 
-    // gui.add(directionalLight.position, 'x', -100, 100);
-    // gui.add(directionalLight.position, 'y', -100, 100);
-    // gui.add(directionalLight.position, 'z', -100, 100);
-
-    // gui.add(spotLight.position, 'x', -600, 600).onChange(function (value) {
-    //   spotLight.position.x = Number(value);
-    //   _this.render();
-    // });
-    // gui.add(spotLight.position, 'y', -600, 800).onChange(function (value) {
-    //   spotLight.position.y = Number(value);
-    //   _this.render();
-    // });
-    // gui.add(spotLight.position, 'z', -500, 1000).onChange(function (value) {
-    //   spotLight.position.z = Number(value);
-    //   _this.render();
-    // });
+  changeSmoke() {
+    this.smoke?.startSmoke(0);
+    this.smoke1?.startSmoke();
   }
 
   mountedThree() {
     return new Promise((resolve) => {
-      this.model.setGLTFModel([this.modelName]).then((gltf) => {
+      this.model.setGLTFModel([this.modelName]).then(async (gltf) => {
         this.group = gltf[0];
         if (this.group) {
-          this.group?.scale.set(0.1, 0.1, 0.1);
-          this.group.position.y += 40;
+          this.group?.scale.set(0.01, 0.01, 0.01);
+          // this.group.position.y += 40;
           resolve(null);
           this.addLight();
+          // await this.initSmoke();
+          // this.changeSmoke();
         }
       });
     });
   }
 
   destroy() {
+    if (this.smoke) this.smoke.clearSmoke();
     this.model.clearGroup(this.group);
     this.model = null;
     this.group = null;

+ 2 - 10
src/views/vent/monitorManager/chamberMonitor/chamber.threejs.ts

@@ -29,14 +29,6 @@ const addMouseEvent = () => {
   model?.canvasContainer?.addEventListener('mousedown', mouseEvent.bind(null));
 };
 
-const render = () => {
-  if (model && model.isRender) {
-    model.animationId = requestAnimationFrame(render);
-    model.css3dRender?.render(model.scene as THREE.Scene, model.camera as THREE.PerspectiveCamera);
-    model.stats?.update();
-  }
-};
-
 export const addChamberText = (selectData) => {
   if (chamberType === 'chamberBase') {
     // return chamberBaseObj.addChamberText.call(chamberBaseObj, selectData);
@@ -57,8 +49,8 @@ export const setModelType = (type) => {
         await animateCamera(
           oldCameraPosition,
           { x: 0, y: 0, z: 0 },
-          { x: 11.19, y: 400.13, z: 344.2 },
-          { x: 10.446, y: 0.875, z: -0.993 },
+          { x: -0.28961202611251485, y: 22.819043414292214, z: 39.714489786956975 },
+          { x: -0.20046083999927067, y: -1.5966937577391083, z: 1.916332985470078 },
           model,
           0.8
         );

+ 0 - 1
src/views/vent/monitorManager/chamberMonitor/components/chamberHistory.vue

@@ -4,7 +4,6 @@
       :columns-type="`${deviceType}`"
       :device-type="deviceType"
       :sysId="deviceId"
-      :device-list-api="getTableList.bind(null, { strtype: deviceType, sysId: deviceId })"
       designScope="pressurefan_history"
       :scroll="{ y: 650 }"
     />

+ 40 - 22
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -38,9 +38,9 @@
       type: String,
       required: true,
     },
-    deviceListApi: {
-      type: Function,
-    },
+    // deviceListApi: {
+    //   type: Function,
+    // },
     deviceArr: {
       type: Array,
       // required: true,
@@ -52,6 +52,9 @@
     sysId: {
       type: String,
     },
+    deviceId: {
+      type: String,
+    },
     scroll: {
       type: Object,
       default: { y: 0 },
@@ -61,7 +64,7 @@
       default: () => [],
     },
   });
-
+  const deviceListApi = (params) => defHttp.get({ url: '/safety/ventanalyDeviceInfo/list', params });
   const historyTable = ref();
   const loading = ref(false);
   const stationType = ref('plc');
@@ -101,6 +104,7 @@
       if (!newVal) return;
       if (historyTable.value) getForm().resetFields();
       await getDeviceList();
+      dataSource.value = [];
       const column = getTableHeaderColumns(newVal.includes('_history') ? newVal : newVal + '_history');
       if (column && column.length < 1) {
         const arr = newVal.split('_');
@@ -140,20 +144,27 @@
     }
   );
 
-  watch(stationType, (type) => {
-    if (type) {
-      nextTick(() => {
-        getDataSource();
-      });
+  // watch(stationType, (type) => {
+  //   if (type) {
+  //     nextTick(() => {
+  //       getDataSource();
+  //     });
+  //   }
+  // });
+
+  watch(
+    () => props.deviceId,
+    async () => {
+      await getForm().setFieldsValue({});
+      await getDeviceList();
     }
-  });
+  );
 
   async function getDeviceList() {
-    if (props.deviceType.split('_')[1] && props.deviceType.split('_')[1] === 'history') return;
+    // if (props.deviceType.split('_')[1] && props.deviceType.split('_')[1] === 'history') return;
     let result;
-    debugger;
-    if (props.deviceListApi) {
-      const res = await props.deviceListApi();
+    if (!props.sysId) {
+      const res = await deviceListApi({ devicekind: props.deviceType, pageSize: 10000 });
       if (res['records'] && res['records'].length > 0) {
         result = res['records'];
       } else if (res['msgTxt'] && res['msgTxt'][0] && res['msgTxt'][0]['datalist']) {
@@ -186,14 +197,18 @@
         };
       });
     }
-    getForm().setFieldsValue({ gdeviceid: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '' });
+    await getForm().setFieldsValue({ gdeviceid: props.deviceId ? props.deviceId : deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '' });
+    nextTick(async () => {
+      await getDataSource();
+    });
   }
 
   async function getDataSource() {
+    dataSource.value = [];
     setLoading(true);
-    const pagination = getPaginationRef();
     const stationTypeStr = stationType.value;
     const formData = getForm().getFieldsValue();
+    const pagination = getPaginationRef();
     formData['pageNo'] = pagination['current'];
     formData['pageSize'] = pagination['pageSize'];
     formData['column'] = 'createTime';
@@ -318,23 +333,23 @@
                   componentProps: {
                     options: [
                       {
-                        label: '5秒',
+                        label: '1秒',
                         value: '1',
                       },
                       {
-                        label: '10秒',
+                        label: '5秒',
                         value: '2',
                       },
                       {
-                        label: '30秒',
+                        label: '10秒',
                         value: '3',
                       },
                       {
-                        label: '1分钟',
+                        label: '30秒',
                         value: '4',
                       },
                       {
-                        label: '5分钟',
+                        label: '1分钟',
                         value: '5',
                       },
                       {
@@ -405,7 +420,6 @@
   });
 
   onMounted(async () => {
-    debugger;
     await getDeviceList();
     if (deviceOptions.value[0]) {
       stationType.value = deviceOptions.value[0]['stationtype'];
@@ -414,6 +428,10 @@
         getDataSource();
       });
     }
+
+    watch([() => getPaginationRef()['current'], () => getPaginationRef()['pageSize']], () => {
+      getDataSource();
+    });
   });
   defineExpose({ setLoading });
 </script>

+ 5 - 7
src/views/vent/monitorManager/compressor/components/nitrogenHistory.vue

@@ -1,12 +1,10 @@
 <template>
   <div class="nitrogen-history">
-     <HistoryTable columns-type="nitrogen" device-type="nitrogen" :sys-id="deviceId" 
-     designScope="nitrogen_auto_history" :device-list-api="getTableList.bind(null, { strtype: 'nitrogen', sysId: deviceId })" :scroll="{ y: 650 }"/>
+    <HistoryTable columns-type="nitrogen" device-type="nitrogen" :sys-id="deviceId" designScope="nitrogen_auto_history" :scroll="{ y: 650 }" />
   </div>
 </template>
 <script setup lang="ts">
   import HistoryTable from '../../comment/HistoryTable.vue';
-  import { getTableList } from '../nitrogen.api'
   const props = defineProps({
     deviceType: {
       type: String,
@@ -15,12 +13,12 @@
     deviceId: {
       type: String,
       required: true,
-    }
-  })
+    },
+  });
 </script>
 <style lang="less" scoped>
-  .nitrogen-history{
+  .nitrogen-history {
     position: fixed;
     top: 100px;
   }
-</style>
+</style>

+ 23 - 7
src/views/vent/monitorManager/compressor/components/nitrogenHome_bet.vue

@@ -40,6 +40,21 @@
           </div>
         </fourBorderBg>
       </div>
+      <div class="modal-monitor">
+        <fourBorderBg id="downWindMonitor">
+          <div class="title">下风测监测 </div>
+          <div class="monitor-item" v-for="(data, index) in downWindData" :key="index">
+            <span class="monitor-title">{{ data.title}} :</span>
+            <span class="monitor-val" v-if="!refresh"><span class="val">{{
+                        (monitorData.length > 0 && monitorData[0][data.code]) >= 0
+                        ? monitorData[0][data.code] ? parseFloat(monitorData[0][data.code]).toFixed(2) : '-'
+                        : '-'
+                      }}</span>
+            <span class="unit">{{ data.unit }}</span></span>
+          </div>
+        </fourBorderBg>
+      </div>
+
     </template>
   </div>
   <div class="nitrogen-home">
@@ -106,7 +121,7 @@
             </ventBox1>
           </div>
           <div class="item item-l">
-            <ventBox1 class="vent-margin-t-10">
+            <!-- <ventBox1 class="vent-margin-t-10">
               <template #title>
                 <div>下风侧详情</div>
               </template>
@@ -132,7 +147,7 @@
                   </div>
                 </div>
               </template>
-            </ventBox1>
+            </ventBox1> -->
           </div>
         </div>
         <!-- 右边控制状态 -->
@@ -330,7 +345,7 @@ async function getDataSource(systemID) {
           return Object.assign(data, readData);
         });
         monitorNetStatus.value = netStatus
-        console.log(monitorData,'monitorData.value---===')
+        // console.log(monitorData,'monitorData.value---===')
         const airCompressor = { readTime: monitorData.value[0]['readTime'] ? monitorData.value[0]['readTime'].substring(11) : dayjs().format('HH:mm:ss') }
         const dataArr = lodash.cloneDeep(echartData.value)
         //图表数据
@@ -355,10 +370,10 @@ async function getDataSource(systemID) {
 }
 
 function handlerDevice(data, bol) {
-  console.log(bol, 'bol-------')
+  // console.log(bol, 'bol-------')
   kzParam.data = data;
   kzParam.isFw = bol;
-  console.log(kzParam, 'kz--------')
+  // console.log(kzParam, 'kz--------')
   if (bol) {
     modalTitle.value = '一键复位';
     modalType.value = '1';
@@ -372,7 +387,7 @@ function handlerDevice(data, bol) {
   }
 }
 function handleOK(passWord, handlerState) {
-  console.log(kzParam, 'kz----------');
+  // console.log(kzParam, 'kz----------');
   // if (passWord !== '123456') {
   //   message.warning('密码不正确,请重新输入');
   //   return;
@@ -492,10 +507,11 @@ onUnmounted(() => {
     display: flex;
     justify-content: space-between;
     margin-bottom: 100px;
+    position: relative;
     .device-state{
       width: 100%;
       position: absolute;
-      top: 20px;
+      top: 80px;
       color: #e90000;
       display: flex;
       justify-content: center;

+ 14 - 3
src/views/vent/monitorManager/compressor/nitrogen.data.ts

@@ -47,11 +47,22 @@ export const deviceParameterData = [
 ];
 export const downWindData = [
   {
-    o2Val: '下风侧氧气(%)',
-    temperature: '下风侧温度(℃)',
+    title: `下风侧氧气`,
+    code: `o2Val`,
+    unit: '%',
+    child: [],
   },
   {
-    fumes: '下风侧烟雾(­%)',
+    title: `下风侧温度`,
+    code: `temperature`,
+    unit: '℃',
+    child: [],
+  },
+  {
+    title: `下风侧烟雾`,
+    code: `fumes`,
+    unit: '%',
+    child: [],
   },
 ];
 

+ 10 - 132
src/views/vent/monitorManager/compressor/nitrogen.dixia.threejs.ts

@@ -48,138 +48,6 @@ class NitrogenUnderground {
     this.group?.position.set(-10, 25, 20);
   }
 
-  addMonitorText(selectData) {
-    if (!this.group) {
-      return;
-    }
-    const textArr = [
-      {
-        text: `单点式测风装置`,
-        font: 'normal 32px Arial',
-        color: '#009900',
-        strokeStyle: '#002200',
-        x: 140,
-        y: 95,
-      },
-      {
-        text: `风量(m³/min):`,
-        font: 'normal 29px Arial',
-        color: '#009900',
-        strokeStyle: '#002200',
-        x: 30,
-        y: 150,
-      },
-      {
-        text: `${selectData.m3 ? selectData.m3 : '-'}`,
-        font: 'normal 29px Arial',
-        color: '#009900',
-        strokeStyle: '#002200',
-        x: 311,
-        y: 150,
-      },
-      {
-        text: `风速(m/s): `,
-        font: 'normal 29px Arial',
-        color: '#009900',
-        strokeStyle: '#002200',
-        x: 30,
-        y: 202,
-      },
-      {
-        text: `${selectData.va ? selectData.va : '-'}`,
-        font: 'normal 29px Arial',
-        color: '#009900',
-        strokeStyle: '#002200',
-        x: 310,
-        y: 202,
-      },
-      {
-        text: `断面积(㎡):`,
-        font: 'normal 29px Arial',
-        color: '#009900',
-        strokeStyle: '#002200',
-        x: 30,
-        y: 252,
-      },
-      {
-        text: `${selectData.fsectarea ? selectData.fsectarea : '-'}`,
-        font: 'normal 29px Arial',
-        color: '#009900',
-        strokeStyle: '#002200',
-        x: 310,
-        y: 252,
-      },
-      {
-        text: `煤炭科学技术研究院有限公司研制`,
-        font: 'normal 28px Arial',
-        color: '#009900',
-        strokeStyle: '#002200',
-        x: 50,
-        y: 302,
-      },
-    ];
-
-    getTextCanvas(560, 346, textArr, '').then((canvas: HTMLCanvasElement) => {
-      const textMap = new THREE.CanvasTexture(canvas); // 关键一步
-      const textMaterial = new THREE.MeshBasicMaterial({
-        map: textMap, // 设置纹理贴图
-        transparent: true,
-        side: THREE.DoubleSide, // 这里是双面渲染的意思
-      });
-      textMaterial.blending = THREE.CustomBlending;
-      const monitorPlane = this.group?.getObjectByName('monitorText');
-      if (monitorPlane) {
-        monitorPlane.material = textMaterial;
-      } else {
-        const planeGeometry = new THREE.PlaneGeometry(5.6, 3.46); // 平面3维几何体PlaneGeometry
-        const planeMesh = new THREE.Mesh(planeGeometry, textMaterial);
-        planeMesh.name = 'monitorText';
-        planeMesh.scale.set(0.22, 0.22, 0.22);
-        planeMesh.position.set(-1.81, 0.068, -0.4);
-        this.group?.add(planeMesh);
-      }
-    });
-  }
-
-  /* 风门动画 */
-  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;
-      }
-    }
-  }
-
-  /* 点击风窗,风窗全屏 */
-  mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
-    if (this.animationTimer) {
-      clearTimeout(this.animationTimer);
-      this.animationTimer = null;
-    }
-    // 判断是否点击到视频
-    intersects.find((intersect) => {
-      intersect;
-      return false;
-    });
-  }
-
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
-
   resetModel() {
     clearTimeout(this.animationTimer);
     this.isLRAnimation = false;
@@ -204,6 +72,16 @@ class NitrogenUnderground {
         }
       }
     }
+    if (this.group && !this.group.getObjectByName('downWindMonitor')) {
+      const element = document.getElementById('downWindMonitor') as HTMLElement;
+      if (element) {
+        const downWindMonitorCSS3D = new CSS3DSprite(element);
+        downWindMonitorCSS3D.name = 'downWindMonitor';
+        downWindMonitorCSS3D.scale.set(0.0045, 0.0045, 0.0045);
+        downWindMonitorCSS3D.position.set(-2.95, 0.57, 0);
+        this.group.add(downWindMonitorCSS3D);
+      }
+    }
   };
 
   clearCssText = () => {

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

@@ -75,7 +75,7 @@ export const setModelType = (type, nitrogenNum?) => {
           }
         } else if (currentNitrogenNum > nitrogenNum) {
           for (let i = nitrogenNum - 1; i < nitrogenNum; i++) {
-            let nitrogenModal = nitrogenObj.group.getObjectByName('nitrogenModal' + i) as THREE.Object3D;
+            const nitrogenModal = nitrogenObj.group.getObjectByName('nitrogenModal' + i) as THREE.Object3D;
             nitrogenObj.group.remove(nitrogenModal);
           }
         } else {
@@ -115,9 +115,9 @@ export const setModelType = (type, nitrogenNum?) => {
       nitrogenUndergroundObj.addCssText();
       const oldCameraPosition = { x: -1000, y: 100, z: 500 };
       const oldControlsPosition = { x: -10, y: 10, z: 10 };
-      let newCameraPosition = { x: 1.6777090354723727, y: 48.663589082018156, z: 125.11444932459742 },
-        newControlsPosition = { x: 0.445937, y:  8.381546, z: -4.81637 };
-     
+      const newCameraPosition = { x: 20.041424366366176, y: 73.25486610289803, z: 118.22072276980887 },
+        newControlsPosition = { x: -16.17782459332251, y: 11.933306448507814, z: 2.315544702244826 };
+
       setTimeout(async () => {
         model?.scene?.add(group);
         resolve(null);
@@ -147,7 +147,6 @@ export const mountedThree = () => {
 
 export const destroy = () => {
   if (model) {
-    
     model.isRender = false;
     console.log('场景销毁前信息----------->', model.renderer?.info);
     nitrogenObj?.destroy();

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

@@ -63,9 +63,10 @@ export function getMonitorComponent() {
   const BundleModal = defineAsyncComponent(() => import('./modal/bundle.modal.vue'));
   const DustModal = defineAsyncComponent(() => import('./modal/dust.modal.vue'));
   const BallvalveModal = defineAsyncComponent(() => import('./modal/ballvalve.modal.vue'));
-  // const AtomizingModal = defineAsyncComponent(() => import('./modal/atomizing.modal.vue'));
+  const AtomizingModal = defineAsyncComponent(() => import('./modal/atomizing.modal.vue'));
+  const GaspatrolModal = defineAsyncComponent(() => import('./modal/atomizing.modal.vue'));
 
-  return { FiberModal, BundleModal, DustModal, BallvalveModal, /** AtomizingModal */ };
+  return { FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal };
 }
 
 // export const searchFormSchema: FormSchema[] = [
@@ -317,6 +318,7 @@ export const haveDetailArr = [
   'fanmain',
   'fiber',
   'bundletube',
+  'gaspatrol',
   'dusting',
   'ballvalve',
   'pump',

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

@@ -281,7 +281,6 @@
                 :sysId="systemID" 
                 :columns-type="`${deviceType}`"
                 :device-type="deviceType"
-                :device-list-api="list.bind(null, { devicetype: deviceType, sysId: systemID, pageSize: 10000 })"
                 designScope="device-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
@@ -334,7 +333,7 @@ import BarAndLine from '/@/components/chart/BarAndLine.vue';
 import { nextTick } from 'vue';
 // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
 
-const {FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal} = getMonitorComponent()
+const {FiberModal, BundleModal, DustModal, BallvalveModal, AtomizingModal, GaspatrolModal} = getMonitorComponent()
 type DeviceType = { deviceType: string, deviceName: string, datalist: any[] };
 
 const props = defineProps({
@@ -623,7 +622,7 @@ function goDetail(record?) {
     if (deviceType.value.startsWith('fiber')) {
       currentModal.value = FiberModal
       modalVisible.value = true;
-    } else if (deviceType.value.startsWith('dusting')) { //bundletube
+    } else if (deviceType.value.startsWith('dusting')) {
       currentModal.value = DustModal
       modalVisible.value = true;
     } else if (deviceType.value.startsWith('bundletube')) {
@@ -635,6 +634,9 @@ function goDetail(record?) {
     } else if (deviceType.value.startsWith('atomizing')) {
       currentModal.value = AtomizingModal
       modalVisible.value = true;
+    } else if (deviceType.value.startsWith('gaspatrol')) {
+      currentModal.value = GaspatrolModal
+      modalVisible.value = true;
     } else if (deviceType.value.indexOf("gate") != -1) {
       const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')

+ 38 - 21
src/views/vent/monitorManager/fanLocalMonitor/fanLocal.three.ts

@@ -95,20 +95,36 @@ export const setModelType = (type) => {
     // 显示双道风窗
     let childGroup;
     if (fanType === 'fm' && fcFanObj && fcFanObj.group) {
-      if (group.getObjectByName('jbfj-fc')) {
-        group.remove(fcFanObj.group);
+      if (group?.getObjectByName('jbfj-fc')) {
+        group?.remove(fcFanObj.group);
       }
       childGroup = fmFanObj?.group;
-      (group?.getObjectByName('text5')).visible = false;
-      (group?.getObjectByName('text4')).visible = true;
+      if (group && group?.getObjectByName('text5') && group?.getObjectByName('text4')) {
+        group.getObjectByName('text5')['visible'] = false;
+        group.getObjectByName('text4')['visible'] = true;
+      }
     } else if (fanType === 'fc' && fmFanObj && fmFanObj.group) {
       // 显示单道风窗
-      if (group.getObjectByName('jbfj-fm')) {
-        group.remove(fmFanObj.group);
+      if (group?.getObjectByName('jbfj-fm')) {
+        group?.remove(fmFanObj.group);
       }
       childGroup = fcFanObj?.group;
-      (group?.getObjectByName('text5')).visible = true;
-      (group?.getObjectByName('text4')).visible = false;
+      if (group && group?.getObjectByName('text5') && group?.getObjectByName('text4')) {
+        group.getObjectByName('text5')['visible'] = true;
+        group.getObjectByName('text4')['visible'] = false;
+      }
+    } else {
+      if (group?.getObjectByName('jbfj-fc')) {
+        group?.remove(fcFanObj.group);
+      }
+      if (group?.getObjectByName('jbfj-fm')) {
+        group?.remove(fmFanObj.group);
+      }
+      if (group && group?.getObjectByName('text5') && group?.getObjectByName('text4')) {
+        group.getObjectByName('text5')['visible'] = false;
+        group.getObjectByName('text4')['visible'] = false;
+      }
+      childGroup = null;
     }
     setTimeout(async () => {
       if (childGroup) group?.add(childGroup);
@@ -243,7 +259,7 @@ export const addCssText = () => {
       fanLocalCSS3D.name = 'text1';
       fanLocalCSS3D.scale.set(0.04, 0.04, 0.04);
       fanLocalCSS3D.rotation.y = -Math.PI / 2;
-      fanLocalCSS3D.position.set(-85.68, 5.97, -17.74);
+      fanLocalCSS3D.position.set(-85.68, 5.97, -3.39);
       group.add(fanLocalCSS3D);
     }
   }
@@ -263,9 +279,9 @@ export const addCssText = () => {
     if (element) {
       const fanLocalCSS3D = new CSS3DObject(element);
       fanLocalCSS3D.name = 'text3';
-      fanLocalCSS3D.scale.set(0.1, 0.1, 0.1);
+      fanLocalCSS3D.scale.set(0.07, 0.07, 0.07);
       fanLocalCSS3D.rotation.y = -Math.PI / 2;
-      fanLocalCSS3D.position.set(35.28, 10.05, -37.23);
+      fanLocalCSS3D.position.set(-25.97, 9.3, -15.09);
       group.add(fanLocalCSS3D);
     }
   }
@@ -421,25 +437,25 @@ const initFly = async () => {
       path0: new THREE.Vector3(93.164, 0.85, -12.962),
       path1: new THREE.Vector3(86.39, 0.827, -12.962),
       isSpread: false,
-      spreadDirection: 0,
+      spreadDirection: 2,
     },
     {
       path0: new THREE.Vector3(86.39, 0.827, -12.962),
       path1: new THREE.Vector3(83.341, 0.847, -17.658),
       isSpread: false,
-      spreadDirection: 0,
+      spreadDirection: 2,
     },
     {
       path0: new THREE.Vector3(83.341, 0.847, -17.658),
       path1: new THREE.Vector3(-29.077, 0.847, -17.658),
       isSpread: false,
-      spreadDirection: 0,
+      spreadDirection: 2,
     },
     {
       path0: new THREE.Vector3(-29.077, 0.847, -17.658),
       path1: new THREE.Vector3(-29.64, 0.827, -39.047),
       isSpread: false,
-      spreadDirection: 0,
+      spreadDirection: 2,
     },
   ];
 
@@ -457,7 +473,7 @@ const initFly = async () => {
   }
 
   if (!returnSmoke) {
-    returnSmoke = new Smoke('/model/img/texture-smoke.png', '#777777', 0, 0.5, 1.5, 200);
+    returnSmoke = new Smoke('/model/img/texture-smoke.png', '#777777', 0, 0.35, 1.5, 200);
     returnSmoke.setPath(returnCurve);
     await returnSmoke.setPoints();
     group?.add(returnSmoke.points);
@@ -569,7 +585,8 @@ const mousemove = () => {
 export const mountedThree = (playerVal1) => {
   player1 = playerVal1;
   return new Promise((resolve) => {
-    model = VENT_PARAM['simulatedPassword'] ? new UseThree('#fanLocal3D', '#fanLocal3DCSS') : new UseThree('#fanLocal3D');
+    // model = VENT_PARAM['simulatedPassword'] ? new UseThree('#fanLocal3D', '#fanLocal3DCSS') : new UseThree('#fanLocal3D');
+    model = new UseThree('#fanLocal3D', '#fanLocal3DCSS');
     model.setEnvMap('test1');
     model.renderer.toneMappingExposure = 1.0;
     if (model.renderer) {
@@ -597,11 +614,11 @@ export const mountedThree = (playerVal1) => {
       model?.animate();
       addLight(model?.scene);
 
-      // fcFanObj = new fcFan(model);
-      // await fcFanObj.mountedThree();
+      fcFanObj = new fcFan(model);
+      await fcFanObj.mountedThree();
 
-      // fmFanObj = new fmFan(model);
-      // await fmFanObj.mountedThree();
+      fmFanObj = new fmFan(model);
+      await fmFanObj.mountedThree();
 
       startAnimation();
       resolve(model);

+ 83 - 56
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -2,41 +2,61 @@
   <div class="bg" style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
     <a-spin :spinning="loading" />
     <div id="fanLocal3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
-    <div
-      v-if="globalConfig?.simulatedPassword"
-      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">
+    <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="inputBox">
-          <div class="elementContent">
-            <p>风筒入口风速:{{ selectData.windSpeed1 ? selectData.windSpeed1 : '-' }}</p>
-            <p>风筒入口瓦斯浓度 {{ selectData.gas2 ? selectData.gas2 : '-' }}</p>
+          <div class="elementContent" v-if="selectData.windSpeed1 || selectData.gas3">
+            <p v-if="selectData.windSpeed1"
+              >风筒入口风速:<span class="value">{{ selectData.windSpeed1 ? selectData.windSpeed1 : '-' }}</span> <span class="unit"> m/s</span></p
+            >
+            <p v-if="selectData.gas3"
+              >风筒入口瓦斯浓度: <span class="value">{{ selectData.gas3 ? selectData.gas3 : '-' }}</span> <span class="unit"> %</span></p
+            >
           </div>
         </div>
         <div class="elementTag" id="outBox">
-          <div class="elementContent elementContent-r">
-            <p>迎头供风量:{{ selectData.windQuantity1 ? selectData.windQuantity2 : '-' }}</p>
-            <p>迎头瓦斯浓度:{{ selectData.gas1 ? selectData.gas1 : '-' }}</p>
+          <div class="elementContent elementContent-r" v-if="selectData.windQuantity1 || selectData.gas1">
+            <p v-if="selectData.windQuantity1"
+              >迎头供风量:<span class="value">{{ selectData.windQuantity1 ? selectData.windQuantity2 : '-' }}</span>
+              <span class="unit"> m³/min</span></p
+            >
+            <p v-if="selectData.gas1"
+              >迎头瓦斯浓度:<span class="value">{{ selectData.gas1 ? selectData.gas1 : '-' }}</span> <span class="unit"> %</span></p
+            >
           </div>
         </div>
         <div class="elementTag" id="returnBox">
-          <div class="elementContent">
-            <p>回风流瓦斯浓度:{{ selectData.gas3 ? selectData.gas3 : '-' }}</p>
+          <div class="elementContent elementContent-r" v-if="selectData.gas2">
+            <p v-if="selectData.gas2"
+              >回风流瓦斯浓度:<span class="value">{{ selectData.gas2 ? selectData.gas2 : '-' }}</span> <span class="unit"> %</span></p
+            >
           </div>
         </div>
-        <!-- <div class="elementTag" id="gateBox">
+        <div class="elementTag" id="gateBox">
           <div class="elementContent">
             <p>风门状态:关</p>
             <p>风门过风面积:{{ selectData.gas1 ? selectData.gas1 : '-' }}</p>
           </div>
         </div>
-        <div  class="elementTag" id="windownBox">
-          <div class="elementContent">
-            <p>风窗全风压回风流:0</p>
+        <div class="elementTag" id="windownBox">
+          <div class="elementContent" v-if="modalType == 'fc'">
+            <p style="pointer-events: auto"
+              ><a class="action-link" @click="goDetailDevice('window_fWindowM3')">风窗详情</a> <ArrowRightOutlined :style="{ color: '#157DC8' }"
+            /></p>
+            <p v-if="selectData.windSpeed"
+              >风窗风流风速:<span class="value">{{ selectData.windSpeed ? selectData.windSpeed : '-' }}</span> <span class="unit"> m/s</span></p
+            >
+            <p v-if="selectData.fWindowM3"
+              >风窗过风量:<span class="value">{{ selectData.fWindowM3 ? selectData.fWindowM3 : '-' }}</span> <span class="unit"> m³/min</span></p
+            >
+            <p v-if="selectData.OpenDegree"
+              >风窗开度值:<span class="value">{{ selectData.OpenDegree ? selectData.OpenDegree : '-' }}</span> <span class="unit"> %</span></p
+            >
+            <p v-if="selectData.OpenDegree"
+              >风窗过风面积:<span class="value">{{ selectData.forntArea ? selectData.forntArea : '-' }}</span> <span class="unit"> m2</span></p
+            >
           </div>
-        </div> -->
+        </div>
       </div>
     </div>
   </div>
@@ -263,7 +283,6 @@
               <HistoryTable
                 :columns-type="`${selectData.deviceType}`"
                 :device-type="`${devicekide}`"
-                :device-list-api="baseList"
                 designScope="fanlocal-history"
                 :scroll="scroll"
               />
@@ -292,8 +311,8 @@
             </div>
           </a-tab-pane>
         </a-tabs>
-        <!-- <a-button
-          v-if="globalConfig.showReport"
+        <a-button
+          v-if="hasPermission('btn:reportDown')"
           type="primary"
           size="small"
           preIcon="ant-design:download-outlined"
@@ -301,13 +320,10 @@
           @click="reportDown"
         >
           报表导出
-        </a-button> -->
+        </a-button>
       </dv-border-box8>
     </div>
   </div>
-  <!-- <div style="z-index: -1; position: absolute; top: 50px; right: 10px; width: 300px; height: 280px; margin: auto" class="player1">
-    <LivePlayer id="jb-player1" ref="player1" :videoUrl="flvURL1()" muted live loading controls />
-  </div> -->
   <div
     ref="playerRef"
     style="z-index: 999; position: absolute; top: 100px; right: 15px; width: 100%; height: 100%; margin: auto; pointer-events: none"
@@ -319,7 +335,7 @@
         <ExclamationCircleFilled style="color: #ffb700; font-size: 30px" />
         <div class="warning-text">您是否要进行{{ modalTitle }}操作?</div>
       </div>
-      <div class="" v-if="modalType == 'startSmoke'">
+      <div class="" v-if="controlType == 'startSmoke'">
         <div class="startSmoke-select">
           <div class="label">主机:</div>
           <a-radio-group v-model:value="mainWindIsShow1" @change="changeMotor" name="localWind1">
@@ -336,43 +352,43 @@
         </div>
       </div>
       <!-- 调频 -->
-      <div class="vent-flex-row input-box" v-if="modalType == 'Fan1Frequency'">
+      <div class="vent-flex-row input-box" v-if="controlType == 'Fan1Frequency'">
         <div class="label">主风机运行频率(Hz):</div>
         <a-input-number size="small" v-model:value="fan1FrequencyVal" :min="20" :max="50" :step="0.1" />
       </div>
-      <div class="vent-flex-row input-box" v-if="modalType == 'Fan2Frequency'">
+      <div class="vent-flex-row input-box" v-if="controlType == 'Fan2Frequency'">
         <div class="label">备风机运行频率(Hz):</div>
         <a-input-number size="small" v-model:value="fan2FrequencyVal" :min="20" :max="50" :step="0.1" />
       </div>
-      <div class="vent-flex-row input-box" v-if="modalType == 'FanFrequency'">
+      <div class="vent-flex-row input-box" v-if="controlType == 'FanFrequency'">
         <div class="label">风机运行频率(Hz):</div>
         <a-input-number size="small" v-model:value="fan1FrequencyVal" :min="20" :max="50" :step="0.1" />
       </div>
-      <div class="vent-flex-row input-box" v-if="modalType == 'needAir'">
+      <div class="vent-flex-row input-box" v-if="controlType == 'needAir'">
         <div class="label">需风量(单位):</div>
         <a-input-number size="small" v-model:value="frequencyVal" :min="30" :max="50" :step="0.1" />
       </div>
-      <div class="vent-flex-row input-box" v-if="modalType == 'disAirAlarm'">
+      <div class="vent-flex-row input-box" v-if="controlType == 'disAirAlarm'">
         <div class="label">漏风率(%):</div>
         <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
       </div>
-      <div class="vent-flex-row input-box" v-if="modalType == 'diameter'">
+      <div class="vent-flex-row input-box" v-if="controlType == 'diameter'">
         <div class="label">风筒直径(m):</div>
         <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
       </div>
-      <div class="vent-flex-row input-box" v-if="modalType == 'len'">
+      <div class="vent-flex-row input-box" v-if="controlType == 'len'">
         <div class="label">风筒长度(m):</div>
         <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
       </div>
-      <div class="vent-flex-row input-box" v-if="modalType == 'windPowerLimit'">
+      <div class="vent-flex-row input-box" v-if="controlType == 'windPowerLimit'">
         <div class="label">风电闭锁限值(m³/min):</div>
         <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
       </div>
-      <div class="vent-flex-row input-box" v-if="modalType == 'gasPowerLimit'">
+      <div class="vent-flex-row input-box" v-if="controlType == 'gasPowerLimit'">
         <div class="label">瓦斯电闭锁限值(m³/min):</div>
         <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
       </div>
-      <div v-if="modalType == 'gasAlarm'">
+      <div v-if="controlType == 'gasAlarm'">
         <div class="vent-flex-row input-box">
           <div class="label">传感器名称:</div>
           <a-select placeholder="传感器" @change="handleChangeSensor" :options="sensorList" v-model:value="modalSensor" />
@@ -382,7 +398,7 @@
           <a-input-number size="small" v-model:value="frequencyVal" :min="0" :max="50" :step="0.1" />
         </div>
       </div>
-      <div v-if="modalType == 'airVolumeAlarm'">
+      <div v-if="controlType == 'airVolumeAlarm'">
         <div class="vent-flex-row input-box">
           <div class="label">风量上限(m³/min):</div>
           <a-input-number size="small" v-model:value="modalTypeArr.rightBtnArr[3].min" :min="0" :max="50" :step="0.1" />
@@ -393,7 +409,7 @@
         </div>
       </div>
       <!-- 启动或停止 -->
-      <div class="" v-if="modalType == 'startSmoke'"> </div>
+      <div class="" v-if="controlType == 'startSmoke'"> </div>
       <div v-if="!globalConfig?.simulatedPassword" class="vent-flex-row input-box">
         <div class="label">操作密码:</div>
         <a-input size="small" type="password" v-model:value="passWord" />
@@ -405,7 +421,7 @@
 </template>
 
 <script setup lang="ts">
-  import { ExclamationCircleFilled } from '@ant-design/icons-vue';
+  import { ExclamationCircleFilled, ArrowRightOutlined } from '@ant-design/icons-vue';
   import { onBeforeMount, ref, watch, onMounted, nextTick, toRaw, reactive, onUnmounted, inject, unref } from 'vue';
   import BarSingle from '../../../../components/chart/BarSingle.vue';
   import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
@@ -440,6 +456,7 @@
   const [registerModal, { openModal, closeModal }] = useModal();
   const [registerModal1, { openModal: openModal1, closeModal: closeModal1 }] = useModal();
   const { currentRoute } = useRouter();
+  const router = useRouter();
 
   const modalTypeArr = reactive({
     leftBtnArr: [
@@ -578,8 +595,8 @@
 
   const xAxisDataGas = ref([]);
   // 设备数据
-  const controlType = ref(1);
-  const modalType = ref('fm');
+  const controlType = ref('');
+  const modalType = ref('');
   // 监测数据
   const initData = {
     deviceID: '',
@@ -595,6 +612,8 @@
   };
   const frequencyVal = ref(0);
   const dataSource = ref([]);
+  // 关联设备信息
+  const linkDeviceInfo = ref({});
   // 监测数据
   let selectData = reactive(lodash.cloneDeep(initData));
   const rightColumns = ref<BasicColumn[]>([]);
@@ -676,6 +695,15 @@
   function goDetail() {
     openModal();
   }
+
+  function goDetailDevice(linkDeviceCode) {
+    let linkDeviceId = '';
+    if (linkDeviceCode.startsWith('window')) {
+      linkDeviceId = linkDeviceInfo.value[linkDeviceCode] ? linkDeviceInfo.value[linkDeviceCode]['id'] : '';
+      router.push({ path: '/monitorChannel/monitor-window', query: { id: linkDeviceId } });
+    }
+  }
+
   //
   async function getDataSource() {
     if (devicekide.value) {
@@ -732,6 +760,7 @@
             playSmoke(selectData);
             addText(selectData);
           }
+
           if (timer) {
             timer = null;
           }
@@ -758,20 +787,20 @@
     // loading.value = true;
     const selectIndex: any = dataSource.value.findIndex((baseData: any) => baseData.deviceID == id);
     selectRowIndex.value = selectIndex;
-    modalType.value = selectIndex > 0 ? 'fm' : 'fc';
-
     nextTick(() => {
       const headEl = document.querySelector(`.zxm-table-thead`);
       if (headEl) {
         headElHeight.value = headEl.clientHeight;
       }
 
-      setModelType(modalType.value).then(() => {
-        // loading.value = false;
-      });
-
       const data = dataSource.value[selectIndex];
       if (data) {
+        if (selectData['linkInfo']) linkDeviceInfo.value = JSON.parse(selectData['linkInfo']);
+
+        if (linkDeviceInfo.value['window_fWindowM3']) {
+          modalType.value = 'fc';
+        }
+
         if (data['Fan1StartStatus'] == '1') {
           mainWindIsShow1.value = 'open';
           mainWindIsShow2.value = 'stop';
@@ -791,6 +820,7 @@
         }
         xAxisDataGas.value = xAxisDataGasArr;
       }
+      setModelType(modalType.value);
     });
 
     await getCamera(id, playerRef.value);
@@ -800,7 +830,7 @@
   // 打开并设置modal的标题
   function showModal(obj) {
     if (!btnClick.value) return;
-    modalType.value = obj.key;
+    controlType.value = obj.key;
     modalTitle.value = obj.value;
     passWord.value = '';
     modalIsShow.value = true;
@@ -820,7 +850,7 @@
   }
 
   function handleOk(e: MouseEvent) {
-    const handType = modalType.value;
+    const handType = controlType.value;
     const data = {
       deviceid: selectData.deviceID,
       devicetype: selectData.deviceType,
@@ -1092,19 +1122,16 @@
             padding-top: 2px;
             color: #ffffff99;
             cursor: pointer;
-            &:hover {
-              color: #ffffff;
-            }
           }
           .tab-item-active-l {
-            color: #ffffff;
+            color: #00ffea;
             background-image: url('/@/assets/images/vent/l-tab-active.png');
             background-repeat: no-repeat;
             background-size: auto;
             background-position: 6px 3px;
           }
           .tab-item-active-r {
-            color: #ffffff;
+            color: #00ffea;
             background-image: url('/@/assets/images/vent/r-tab-active.png');
             background-repeat: no-repeat;
             background-position: 0 3px;

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

@@ -75,7 +75,7 @@
         </a-tab-pane>
         <a-tab-pane key="3" tab="历史数据">
           <div class="tab-item">
-            <HistoryTable columns-type="fibre" device-type="fiber" :device-list-api="baseList" designScope="fiber-history" />
+            <HistoryTable columns-type="fibre" device-type="fiber" designScope="fiber-history" />
           </div>
         </a-tab-pane>
         <a-tab-pane key="4" tab="报警历史">

+ 19 - 21
src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHistory.vue

@@ -1,29 +1,27 @@
 <template>
   <div class="history-box">
-    <HistoryTable :columns-type="`${deviceType}`" :device-type="deviceType" :sysId="deviceId"
-      :device-list-api="getTableList.bind(null, { strtype: deviceType, sysId: deviceId })" designScope="pressurefan_history" :scroll="{ y: 650 }"/>
+    <HistoryTable :columns-type="`${deviceType}`" device-type="pump" :device-id="deviceId" designScope="pressurefan_history" :scroll="{ y: 650 }" />
   </div>
 </template>
 <script setup lang="ts">
-import { ref, defineProps } from 'vue'
-import HistoryTable from '../../comment/HistoryTable.vue';
-import { getTableList } from '../gasPump.api'
-
-const props = defineProps({
-  deviceType: {
-    type: String,
-    required: true,
-  },
-  deviceId: {
-    type: String,
-  }
-})
+  import { ref, defineProps } from 'vue';
+  import HistoryTable from '../../comment/HistoryTable.vue';
+  import { getTableList } from '../gasPump.api';
 
+  const props = defineProps({
+    deviceType: {
+      type: String,
+      required: true,
+    },
+    deviceId: {
+      type: String,
+    },
+  });
 </script>
 <style lang="less" scoped>
-.history-box {
-  pointer-events: auto;
-  position: absolute;
-  top: 90px;
-}
-</style>
+  .history-box {
+    pointer-events: auto;
+    position: absolute;
+    top: 90px;
+  }
+</style>

+ 26 - 15
src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHome.vue

@@ -19,20 +19,20 @@
         <div class="monitor-box">
           <ventBox1>
             <template #title>
-              <div>抽采泵</div>
+              <div>瓦斯泵</div>
             </template>
             <template #container>
               <div v-for="key in 2" :key="key">
                 <div class="parameter-title group-parameter-title"
-                  ><SvgIcon class="icon" size="14" name="pulp-title" /><span>{{ key }}#抽采泵</span></div
+                  ><SvgIcon class="icon" size="14" name="pulp-title" /><span>{{ key }}#瓦斯泵磁力启动器</span></div
                 >
                 <div class="input-box">
                   <div v-for="(item, index) in pumpMonitorData" class="input-item" :key="index">
                     <div class="title">{{ item.title }}:</div>
-                    <template v-if="item.type !== 'sign'">
+                    <template v-if="item.type !== 'sign' && item.type !== 'warning'">
                       <div class="value">{{
-                        selectData && selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)]
-                          ? formatNum(selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)])
+                        selectData && selectData[item.code.replace('Starter', `Starter${key + 4}`)]
+                          ? formatNum(selectData[item.code.replace('Starter', `Starter${key + 4}`)], 1)
                           : '-'
                       }}</div>
                     </template>
@@ -41,8 +41,9 @@
                         <span
                           :class="{
                             'signal-round': true,
-                            'signal-round-run': selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)] == '1',
-                            'signal-round-gry': selectData[item.code.replace('CentrifugalPump', `CentrifugalPump${key}`)] == '0',
+                            'signal-round-run': item.type === 'sign' && selectData[item.code.replace('Starter', `Starter${key + 4}`)] == '1',
+                            'signal-round-gry': selectData[item.code.replace('Starter', `Starter${key + 4}`)] == '0',
+                            'signal-round-warning': item.type === 'warning' && selectData[item.code.replace('Starter', `Starter${key + 4}`)] == '1',
                           }"
                         ></span>
                       </div>
@@ -67,7 +68,7 @@
                     <template v-if="item.type !== 'sign'">
                       <div class="value">{{
                         selectData && selectData[item.code.replace('WaterfloodPump', `WaterfloodPump${key}`)]
-                          ? formatNum(selectData[item.code.replace('WaterfloodPump', `WaterfloodPump${key}`)])
+                          ? formatNum(selectData[item.code.replace('WaterfloodPump', `WaterfloodPump${key}`)], 1)
                           : '-'
                       }}</div>
                     </template>
@@ -102,7 +103,7 @@
                     <template v-if="item.type !== 'sign'">
                       <div class="value">{{
                         selectData && selectData[item.code.replace('DewateringPump', `DewateringPump${key}`)]
-                          ? formatNum(selectData[item.code.replace('DewateringPump', `DewateringPump${key}`)])
+                          ? formatNum(selectData[item.code.replace('DewateringPump', `DewateringPump${key}`)], 1)
                           : '-'
                       }}</div>
                     </template>
@@ -165,13 +166,13 @@
           </template>
           <template #container>
             <div class="state-header">
-              <div class="header-item" v-for="(header, index) in stateHeader" :key="index">{{ header }}</div>
+              <div class="header-item" v-for="(header, index) in stateWarningHeader" :key="index">{{ header }}</div>
             </div>
             <div class="">
               <div v-for="key in 2" :key="key">
                 <div class="device-row" v-for="(valveType, index) in valveCtrlType" :key="index">
                   <div class="state">#{{ key }}{{ valveType.title }} </div>
-                  <div class="state" v-for="(state, i) in valveState" :key="i">
+                  <div class="state" v-for="(state, i) in valveWarningState" :key="i">
                     <span v-if="state.code == '_CtrlMode'">{{
                       selectData[`CentrifugalPump${key}_${valveType.code}${state.code}`] == '1' ? '控制' : '-'
                     }}</span>
@@ -210,7 +211,15 @@
   import { ref, onMounted, onUnmounted, reactive, defineProps, watch, inject, nextTick, onBeforeUnmount } from 'vue';
   import ventBox1 from '/@/components/vent/ventBox1.vue';
   import { setModelType } from '../gasPump.threejs';
-  import { stateHeader, valveState, pumpMonitorData, waterPumpData, dewateringPumpData, modelMonitor, valveCtrlType } from '../gasPump.data';
+  import {
+    stateWarningHeader,
+    valveWarningState,
+    pumpMonitorData,
+    waterPumpData,
+    dewateringPumpData,
+    modelMonitor,
+    valveCtrlType,
+  } from '../gasPump.data';
   import { list } from '../gasPump.api';
   import { SvgIcon } from '/@/components/Icon';
   import { formatNum } from '/@/utils/ventutil';
@@ -381,7 +390,7 @@
   watch(
     () => props.deviceId,
     async (deviceID) => {
-      debugger;
+      removeCamera();
       if (deviceID) await getCamera(deviceID, playerRef.value);
     }
   );
@@ -454,15 +463,17 @@
     direction: rtl;
     overflow-y: auto;
     overflow-x: hidden;
-    height: calc(100% - 30px);
+    height: calc(100% - 60px);
+    margin-top: 30px !important;
 
     .left-container {
-      margin-top: 30px;
       direction: ltr;
     }
   }
   .right-box {
     width: 350px !important;
+    overflow-y: auto;
+    overflow-x: hidden;
     .environment-monitor {
       .item {
         flex: 1;

+ 75 - 15
src/views/vent/monitorManager/gasPumpMonitor/gasPump.data.ts

@@ -20,37 +20,75 @@ export const warningConfig = reactive({
   align: ['center', 'center', 'center'],
 });
 
+// export const pumpMonitorData = [
+//   {
+//     title: '运行状态',
+//     code: 'CentrifugalPump_PU_CBStatus',
+//     type: 'sign',
+//   },
+//   {
+//     title: '启动准备',
+//     code: 'CentrifugalPump_PU_Ready',
+//     type: 'sign',
+//   },
+//   {
+//     title: '电压(V)',
+//     code: 'CentrifugalPump_PU_SysVoltage',
+//     type: '',
+//   },
+//   {
+//     title: 'A相电流(A)',
+//     code: 'CentrifugalPump_PU_Ia',
+//     type: '',
+//   },
+//   {
+//     title: 'B相电流(A)',
+//     code: 'CentrifugalPump_PU_Ib',
+//     type: '',
+//   },
+//   {
+//     title: 'C相电流(A)',
+//     code: 'CentrifugalPump_PU_Ic',
+//     type: '',
+//   },
+// ];
+
 export const pumpMonitorData = [
   {
-    title: '运行状态',
-    code: 'CentrifugalPump_PU_CBStatus',
-    type: 'sign',
-  },
-  {
-    title: '启动准备',
-    code: 'CentrifugalPump_PU_Ready',
+    title: '断路器状态',
+    code: 'Starter_CBStatus',
     type: 'sign',
   },
   {
-    title: '电压(V)',
-    code: 'CentrifugalPump_PU_SysVoltage',
-    type: '',
+    title: '合闸失败',
+    code: 'Starter_CloseFail',
+    type: 'warning',
   },
   {
     title: 'A相电流(A)',
-    code: 'CentrifugalPump_PU_Ia',
+    code: 'Starter_Ia',
     type: '',
   },
   {
     title: 'B相电流(A)',
-    code: 'CentrifugalPump_PU_Ib',
+    code: 'Starter_Ib',
     type: '',
   },
   {
     title: 'C相电流(A)',
-    code: 'CentrifugalPump_PU_Ic',
+    code: 'Starter_Ic',
     type: '',
   },
+  {
+    title: 'AB电压(V)',
+    code: 'Starter_Uab',
+    type: '',
+  },
+  {
+    title: '健康信号',
+    code: 'Starter_Ready',
+    type: 'sign',
+  },
 ];
 
 export const waterPumpData = [
@@ -126,7 +164,30 @@ export const valveCtrl = [
     code: '_Reset',
   },
 ];
-
+export const stateWarningHeader = ['设备名称', '开限位', '关限位', '开输出', '关输出'];
+export const stateHeader = ['设备名称', '是否健康', '开失败', '关失败', '控制方式'];
+export const valveWarningState = [
+  {
+    title: '开限位',
+    code: '_OpenLimit',
+    defaultValue: '-',
+  },
+  {
+    title: '关限位',
+    code: '_CloseLimit',
+    defaultValue: '-',
+  },
+  {
+    title: '开输出',
+    code: '_OnOutput',
+    defaultValue: '-',
+  },
+  {
+    title: '关输出',
+    code: '_OffOutput',
+    defaultValue: '-',
+  },
+];
 export const valveState = [
   {
     title: '是否健康',
@@ -184,7 +245,6 @@ export const PumpCtrlItems = [
     code: '_HMILeakageTest',
   },
 ];
-export const stateHeader = ['设备名称', '是否健康', '开失败', '关失败', '控制方式'];
 
 export const modelMonitor = [
   {

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

@@ -15,7 +15,7 @@
         <div class="device-button-group" v-if="deviceList.length > 0">
           <div class="device-button" :class="{ 'device-active': deviceActive == device.deviceType }" v-for="(device, index) in deviceList" :key="index" @click="deviceChange(index)">{{ device.deviceName }}</div>
         </div>
-        <gasPumpHistory v-if="activeKey == 'monitor_history'" ref="historyTable" class="vent-margin-t-20"  :device-type="currentDeviceType"/>
+        <gasPumpHistory v-if="activeKey == 'monitor_history'" ref="historyTable" class="vent-margin-t-20"  :device-type="currentDeviceType" :device-id="optionValue"/>
         <gasPumpHandleHistoryVue v-if="activeKey == 'handler_history'" ref="alarmHistoryTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="currentDeviceType" />
         <gasPumpAlarmHistory v-if="activeKey == 'faultRecord'" ref="handlerHistoryTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="currentDeviceType"/>
       </div>      

+ 49 - 90
src/views/vent/monitorManager/gateMonitor/gate.threejs.ts

@@ -7,14 +7,15 @@ import Fm2 from './gate.threejs.three';
 import FmTwoSs from './gate.threejs.two.ss';
 import { animateCamera } from '/@/utils/threejs/util';
 import useEvent from '../../../../utils/threejs/useEvent';
+import { useGlobSetting } from '/@/hooks/setting';
 
 // 模型对象、 文字对象
 let model,
-  fm1: Fm1,
-  fm2: Fm2,
-  fm3: Fm3,
-  fmXr: FmXR,
-  fmTwoSs: FmTwoSs,
+  fm1, //液压风门
+  fm2, //三道风门
+  fm3: Fm3, //气动风门
+  fmXr: FmXR, //行人风门
+  fmTwoSs: FmTwoSs, //
   group: THREE.Object3D,
   fmType = '';
 
@@ -28,15 +29,15 @@ const startAnimation = () => {
     event.stopPropagation();
     // 单道、 双道
     if (fmType === 'fm1') {
-      fm1.mouseUpModel.call(fm1);
+      fm1?.mouseUpModel.call(fm1);
     } else if (fmType === 'fm2') {
-      fm2.mouseUpModel.call(fm2);
+      fm2?.mouseUpModel.call(fm2);
     } else if (fmType === 'fm3') {
-      fm3.mouseUpModel.call(fm3);
+      fm3?.mouseUpModel.call(fm3);
     } else if (fmType === 'fmXr') {
-      fmXr.mouseUpModel.call(fmXr);
+      fmXr?.mouseUpModel.call(fmXr);
     } else if (fmType === 'fmTwoSs') {
-      fmTwoSs.mouseUpModel.call(fmTwoSs);
+      fmTwoSs?.mouseUpModel.call(fmTwoSs);
     }
   });
 };
@@ -46,15 +47,15 @@ const mouseEvent = (event) => {
   if (event.button == 0) {
     mouseDownFn(model, group, event, (intersects) => {
       if (fmType === 'fm1' && fm1) {
-        fm1.mousedownModel.call(fm1, intersects);
+        fm1?.mousedownModel.call(fm1, intersects);
       } else if (fmType === 'fm2' && fm2) {
-        fm2.mousedownModel.call(fm2, intersects);
+        fm2?.mousedownModel.call(fm2, intersects);
       } else if (fmType === 'fm3' && fm3) {
-        fm3.mousedownModel.call(fm3, intersects);
+        fm3?.mousedownModel.call(fm3, intersects);
       } else if (fmType === 'fmXr' && fmXr) {
-        fmXr.mousedownModel.call(fmXr, intersects);
+        fmXr?.mousedownModel.call(fmXr, intersects);
       } else if (fmType === 'fmTwoSs' && fmTwoSs) {
-        fmTwoSs.mousedownModel.call(fmTwoSs, intersects);
+        fmTwoSs?.mousedownModel.call(fmTwoSs, intersects);
       }
     });
     // console.log('摄像头控制信息', model.orbitControls, model.camera);
@@ -63,25 +64,25 @@ const mouseEvent = (event) => {
 
 export const addMonitorText = (selectData) => {
   if (fmType === 'fm1' && fm1) {
-    return fm1.addMonitorText.call(fm1, selectData);
+    return fm1?.addMonitorText.call(fm1, selectData);
   } else if (fmType === 'fm2' && fm2) {
-    return fm2.addMonitorText.call(fm2, selectData);
+    return fm2?.addMonitorText.call(fm2, selectData);
   } else if (fmType === 'fm3' && fm3) {
-    return fm3.addMonitorText.call(fm3, selectData);
+    return fm3?.addMonitorText.call(fm3, selectData);
   } else if (fmType === 'fmXr' && fmXr) {
-    return fmXr.addMonitorText.call(fmXr, selectData);
+    return fmXr?.addMonitorText.call(fmXr, selectData);
   } else if (fmType === 'fmTwoSs' && fmTwoSs) {
-    return fmTwoSs.addMonitorText.call(fmTwoSs, selectData);
+    return fmTwoSs?.addMonitorText.call(fmTwoSs, selectData);
   }
 };
 
 export const deviceDetailCard = () => {
   if (fmType === 'fm1') {
-    return fm1.deviceDetailCard.call(fm1);
+    return fm1?.deviceDetailCard.call(fm1);
   } else if (fmType === 'fm3') {
-    return fm3.deviceDetailCard.call(fm3);
+    return fm3?.deviceDetailCard.call(fm3);
   } else if (fmType === 'fmXr') {
-    return fmXr.deviceDetailCard.call(fmXr);
+    return fmXr?.deviceDetailCard.call(fmXr);
   } else {
     // return fm2.addMonitorText.call(fm2);
   }
@@ -120,22 +121,10 @@ export const setModelType = (type) => {
       if (fm1.frontDamperClosedMesh) fm1.frontDamperClosedMesh.visible = true;
       if (fm1.backDamperOpenMesh) fm1.backDamperOpenMesh.visible = false;
       if (fm1.backDamperClosedMesh) fm1.backDamperClosedMesh.visible = true;
-
+      model.scene.remove(group);
       model.startAnimation = fm1.render.bind(fm1);
       group = fm1.group;
       group.rotation.y = 0;
-      if (model.scene.getObjectByName('fm2')) {
-        model.scene.remove(fm2.group);
-      }
-      if (model.scene.getObjectByName('fm3')) {
-        model.scene.remove(fm3.group);
-      }
-      if (model.scene.getObjectByName('fmXr')) {
-        model.scene.remove(fmXr.group);
-      }
-      if (model.scene.getObjectByName('fmTwoSs')) {
-        model.scene.remove(fmTwoSs.group);
-      }
       const oldCameraPosition = { x: -1000, y: 100, z: 500 };
       setTimeout(async () => {
         resolve(null);
@@ -164,19 +153,8 @@ export const setModelType = (type) => {
 
       // 显示单道风窗
       model.startAnimation = fm2.render.bind(fm2);
+      model.scene.remove(group);
       group = fm2.group;
-      if (model.scene.getObjectByName('fm1')) {
-        model.scene.remove(fm1.group);
-      }
-      if (model.scene.getObjectByName('fm3')) {
-        model.scene.remove(fm3.group);
-      }
-      if (model.scene.getObjectByName('fmXr')) {
-        model.scene.remove(fmXr.group);
-      }
-      if (model.scene.getObjectByName('fmTwoSs')) {
-        model.scene.remove(fmTwoSs.group);
-      }
       const oldCameraPosition = { x: -761, y: 569, z: 871 };
       setTimeout(async () => {
         resolve(null);
@@ -206,21 +184,10 @@ export const setModelType = (type) => {
       if (fm3.backDamperOpenMesh) fm3.backDamperOpenMesh.visible = false;
       if (fm3.backDamperClosedMesh) fm3.backDamperClosedMesh.visible = true;
 
+      model.scene.remove(group);
       model.startAnimation = fm3.render.bind(fm3);
       group = fm3.group;
       group.rotation.y = 0;
-      if (model.scene.getObjectByName('fm2')) {
-        model.scene.remove(fm2.group);
-      }
-      if (model.scene.getObjectByName('fm1')) {
-        model.scene.remove(fm1.group);
-      }
-      if (model.scene.getObjectByName('fmXr')) {
-        model.scene.remove(fmXr.group);
-      }
-      if (model.scene.getObjectByName('fmTwoSs')) {
-        model.scene.remove(fmTwoSs.group);
-      }
       const oldCameraPosition = { x: -1000, y: 100, z: 500 };
       setTimeout(async () => {
         resolve(null);
@@ -250,20 +217,10 @@ export const setModelType = (type) => {
       if (fmXr.backDamperClosedMesh) fmXr.backDamperClosedMesh.visible = true;
 
       model.startAnimation = fmXr.render.bind(fmXr);
+      model.scene.remove(group);
       group = fmXr.group;
       group.rotation.y = 0;
-      if (model.scene.getObjectByName('fm2')) {
-        model.scene.remove(fm2.group);
-      }
-      if (model.scene.getObjectByName('fm1')) {
-        model.scene.remove(fm1.group);
-      }
-      if (model.scene.getObjectByName('fm3')) {
-        model.scene.remove(fm3.group);
-      }
-      if (model.scene.getObjectByName('fmTwoSs')) {
-        model.scene.remove(fmTwoSs.group);
-      }
+
       const oldCameraPosition = { x: -1000, y: 100, z: 500 };
       setTimeout(async () => {
         resolve(null);
@@ -293,20 +250,10 @@ export const setModelType = (type) => {
       if (fmTwoSs.backDamperClosedMesh) fmTwoSs.backDamperClosedMesh.visible = true;
 
       model.startAnimation = fmTwoSs.render.bind(fmTwoSs);
+      model.scene.remove(group);
       group = fmTwoSs.group;
       group.rotation.y = 0;
-      if (model.scene.getObjectByName('fm2')) {
-        model.scene.remove(fm2.group);
-      }
-      if (model.scene.getObjectByName('fm1')) {
-        model.scene.remove(fm1.group);
-      }
-      if (model.scene.getObjectByName('fm3')) {
-        model.scene.remove(fm3.group);
-      }
-      if (model.scene.getObjectByName('fmXr')) {
-        model.scene.remove(fmXr.group);
-      }
+
       const oldCameraPosition = { x: -1000, y: 100, z: 500 };
       setTimeout(async () => {
         resolve(null);
@@ -337,23 +284,35 @@ export const initCameraCanvas = async (playerVal1) => {
 };
 
 export const mountedThree = (playerDom) => {
+  let { sysOrgCode } = useGlobSetting();
   return new Promise(async (resolve) => {
     model = new UseThree('#damper3D', '', '#deviceDetail');
     model.setEnvMap('test1');
-    resolve(null);
+    sysOrgCode = 'yjmdjhmk';
     model.renderer.toneMappingExposure = 1.0;
     model.camera.position.set(100, 0, 1000);
-    // 单道、 双道
+    switch (sysOrgCode) {
+      case 'yjmdjhmk': //姚街金河矿
+        const FmYj = await import('./gate.threejs.yj');
+        if (FmYj) fm3 = new FmYj.default(model);
+        if (fm3) fm3.mountedThree(playerDom);
+        break;
+      default:
+        fm3 = new Fm3(model);
+        fm3.mountedThree(playerDom);
+        break;
+    }
+
+    fmXr = new FmXR(model);
+    fmXr.mountedThree(playerDom);
     fm1 = new Fm1(model);
     fm1.mountedThree(playerDom);
     fm2 = new Fm2(model);
     fm2.mountedThree(playerDom);
-    fm3 = new Fm3(model);
-    fm3.mountedThree(playerDom);
-    fmXr = new FmXR(model);
-    fmXr.mountedThree(playerDom);
     fmTwoSs = new FmTwoSs(model);
     fmTwoSs.mountedThree(playerDom);
+    resolve(null);
+
     model.animate();
     startAnimation();
   });

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

@@ -136,7 +136,7 @@
           </a-tab-pane> -->
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item" v-if="activeKey === '3'">
-              <HistoryTable columns-type="gate" device-type="gate" :device-list-api="getTableList" designScope="gate-history" :scroll="scroll" />
+              <HistoryTable columns-type="gate" device-type="gate" designScope="gate-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">
@@ -349,7 +349,7 @@
     } else {
       if (selectData.deviceType == 'gate_ss') {
         type = 'fm2';
-      } else if (selectData.deviceType == 'gate_qd') {
+      } 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';

+ 16 - 12
src/views/vent/monitorManager/groutMonitor/components/groutHandleHistory.vue

@@ -1,19 +1,23 @@
 <template>
   <div class="handle-history">
-    <HandlerHistoryTable columns-type="operator_history" device-type="pulping"
-      :device-list-api="getTableList.bind(null, { devicekind: 'pulping' })" designScope="pulping_history" :scroll="{ y: 650 }"/>
+    <HandlerHistoryTable
+      columns-type="operator_history"
+      device-type="pulping"
+      :device-list-api="getTableList.bind(null, { devicekind: 'pulping' })"
+      designScope="pulping_history"
+      :scroll="{ y: 650 }"
+    />
   </div>
 </template>
 <script setup lang="ts">
-import HandlerHistoryTable from '../../comment/HandlerHistoryTable.vue';
-import { getTableList } from '../grout.api'
-
+  import HandlerHistoryTable from '../../comment/HandlerHistoryTable.vue';
+  import { getTableList } from '../grout.api';
 </script>
 <style lang="less" scoped>
-.handle-history {
-  width: 100%;
-  position: fixed;
-  top: 80px;
-  z-index: 99;
-}
-</style>
+  .handle-history {
+    width: 100%;
+    position: fixed;
+    top: 80px;
+    z-index: 99;
+  }
+</style>

+ 19 - 20
src/views/vent/monitorManager/groutMonitor/components/groutHistory.vue

@@ -1,27 +1,26 @@
 <template>
   <div class="grout-history">
-    <HistoryTable columns-type="pulping" :device-type="deviceType"
-      :device-list-api="getTableList.bind(null, { strtype: deviceType, sysId: deviceId })" designScope="pulping_auto_history" :scroll="{ y: 650 }"/>
+    <HistoryTable columns-type="pulping" device-type="pulping" :sys-id="deviceId" designScope="pulping_auto_history" :scroll="{ y: 650 }" />
   </div>
 </template>
 <script setup lang="ts">
-import HistoryTable from '../../comment/HistoryTable.vue';
-import { getTableList } from '../grout.api'
-const props = defineProps({
-  deviceType: {
-    type: String,
-    required: true,
-  },
-  deviceId: {
-    type: String,
-    required: true,
-  }
-})
-
+  import HistoryTable from '../../comment/HistoryTable.vue';
+  const props = defineProps({
+    deviceType: {
+      type: String,
+      required: true,
+    },
+    deviceId: {
+      type: String,
+      required: true,
+    },
+  });
 </script>
 <style lang="less" scoped>
-.grout-history {
-  position: fixed;
-  top: 80px;
-}
-</style>
+  .grout-history {
+    width: 100%;
+    position: fixed;
+    top: 80px;
+    z-index: 99;
+  }
+</style>

+ 12 - 0
src/views/vent/monitorManager/groutMonitor/components/groutHomeHjt.vue

@@ -113,6 +113,7 @@
       loading.value = false;
     });
   });
+
   onUnmounted(() => {
     destroy();
     removeCamera();
@@ -201,4 +202,15 @@
 
     margin-right: 10px;
   }
+
+  :deep(#LivePlayerBox) {
+    width: 100%;
+    position: relative;
+    display: flex;
+    flex-wrap: wrap-reverse;
+    width: auto;
+    height: calc(100% - 100px);
+    flex-direction: column;
+    gap: 0px 1270px;
+  }
 </style>

+ 23 - 29
src/views/vent/monitorManager/groutMonitor/components/runParameter.modal.vue

@@ -1,40 +1,34 @@
 <template>
-  <BasicModal v-bind="$attrs" @register="register" title="黄泥灌浆系统运行参数设置" width="1200px" @ok="handleOk" @cancel="handleCancel" >
+  <BasicModal v-bind="$attrs" @register="register" title="黄泥灌浆系统运行参数设置" width="1200px" @ok="handleOk" @cancel="handleCancel">
     <div>123</div>
   </BasicModal>
 </template>
 <script lang="ts">
-import { defineComponent} from 'vue';
-import { BasicModal, useModalInner } from '/@/components/Modal';
-import BarAndLine from '/@/components/chart/BarAndLine.vue';
-import { SvgIcon } from '/@/components/Icon';
-import { Decoration7 as DvDecoration7, ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
+  import { defineComponent } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  import { Decoration7 as DvDecoration7, ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
 
-export default defineComponent({
-  name: 'RunParameterModal',
-  components: { BasicModal, BarAndLine, SvgIcon, DvScrollBoard, DvDecoration7 },
+  export default defineComponent({
+    name: 'RunParameterModal',
+    components: { BasicModal, BarAndLine, SvgIcon, DvScrollBoard, DvDecoration7 },
 
-  setup(props) {
-    
-    const [register, { closeModal }] = useModalInner();
+    setup(props) {
+      const [register, { closeModal }] = useModalInner();
 
-    function handleOk(e) {
-      e.preventDefault()
-      closeModal()
-    }
+      function handleOk(e) {
+        e.preventDefault();
+        closeModal();
+      }
 
-    function handleCancel(e) {
-      e.preventDefault()
-      closeModal()
-    }
+      function handleCancel(e) {
+        e.preventDefault();
+        closeModal();
+      }
 
-    
-
-    return { register, handleOk, handleCancel, };
-  },
-  
-});
+      return { register, handleOk, handleCancel };
+    },
+  });
 </script>
-<style lang="less" scoped>
-  
-</style>
+<style lang="less" scoped></style>

+ 23 - 29
src/views/vent/monitorManager/groutMonitor/components/warningParameter.modal.vue

@@ -1,40 +1,34 @@
 <template>
-  <BasicModal v-bind="$attrs" @register="register" title="黄泥灌浆系统报警参数设置" width="1200px" @ok="handleOk" @cancel="handleCancel" >
+  <BasicModal v-bind="$attrs" @register="register" title="黄泥灌浆系统报警参数设置" width="1200px" @ok="handleOk" @cancel="handleCancel">
     <div>123</div>
   </BasicModal>
 </template>
 <script lang="ts">
-import { defineComponent} from 'vue';
-import { BasicModal, useModalInner } from '/@/components/Modal';
-import BarAndLine from '/@/components/chart/BarAndLine.vue';
-import { SvgIcon } from '/@/components/Icon';
-import { Decoration7 as DvDecoration7, ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
+  import { defineComponent } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  import { Decoration7 as DvDecoration7, ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
 
-export default defineComponent({
-  name: 'WarningParameterModal',
-  components: { BasicModal, BarAndLine, SvgIcon, DvScrollBoard, DvDecoration7 },
+  export default defineComponent({
+    name: 'WarningParameterModal',
+    components: { BasicModal, BarAndLine, SvgIcon, DvScrollBoard, DvDecoration7 },
 
-  setup(props) {
-    
-    const [register, { closeModal }] = useModalInner();
+    setup(props) {
+      const [register, { closeModal }] = useModalInner();
 
-    function handleOk(e) {
-      e.preventDefault()
-      closeModal()
-    }
+      function handleOk(e) {
+        e.preventDefault();
+        closeModal();
+      }
 
-    function handleCancel(e) {
-      e.preventDefault()
-      closeModal()
-    }
+      function handleCancel(e) {
+        e.preventDefault();
+        closeModal();
+      }
 
-    
-
-    return { register, handleOk, handleCancel, };
-  },
-  
-});
+      return { register, handleOk, handleCancel };
+    },
+  });
 </script>
-<style lang="less" scoped>
-  
-</style>
+<style lang="less" scoped></style>

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

@@ -163,14 +163,12 @@ onUnmounted(() => {
     padding: 0 20px;
     .history-container{
       position: relative;
-      background: #6195af1a;
       width: calc(100% + 10px);
-      top: 0px;
+      top: 50px;
       left: -10px;
-      border: 1px solid #00fffd22;
       padding: 10px 0;
       pointer-events: auto;
-      box-shadow: 0 0 20px #44b4ff33 inset;
+      height: auto;
     }
   }
   .device-button-group{

+ 7 - 11
src/views/vent/monitorManager/mainFanMonitor/index.vue

@@ -214,16 +214,17 @@
                         <div
                           class="signal-round"
                           :class="{
-                            'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan2')],
+                            'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan2')] == '1',
                             'signal-round-warning':
-                              selectData[state.dataIndex.replace('Fan', 'Fan2')] !== undefined && !selectData[state.dataIndex.replace('Fan', 'Fan2')],
-                            'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan2')] === undefined,
+                              selectData[state.dataIndex.replace('Fan', 'Fan2')] != undefined &&
+                              selectData[state.dataIndex.replace('Fan', 'Fan2')] == '0',
+                            'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan2')] == undefined,
                           }"
                         ></div>
                         <div class="vent-margin-l-8">{{
-                          selectData[state.dataIndex.replace('Fan', 'Fan2')] === undefined
+                          selectData[state.dataIndex.replace('Fan', 'Fan2')] == undefined
                             ? '无状态'
-                            : selectData[state.dataIndex.replace('Fan', 'Fan2')]
+                            : selectData[state.dataIndex.replace('Fan', 'Fan2')] == '1'
                             ? '正常'
                             : '异常'
                         }}</div>
@@ -280,12 +281,7 @@
           </a-tab-pane> -->
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item" v-if="activeKey === '3'">
-              <HistoryTable
-                device-type="fanmain"
-                :device-list-api="baseList.bind(null, { devicekind: 'fanmain' })"
-                designScope="fanmain-history"
-                :scroll="scroll"
-              />
+              <HistoryTable device-type="fanmain" designScope="fanmain-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">

+ 3 - 4
src/views/vent/monitorManager/nitrogen/components/nitrogenHistory.vue

@@ -1,16 +1,15 @@
 <template>
   <div class="nitrogen-history">
-     <HistoryTable columns-type="forcFan" device-type="forcFan" designScope="forcFan_history" :scroll="{y: 650}" />
+    <HistoryTable columns-type="forcFan" device-type="forcFan" designScope="forcFan_history" :scroll="{ y: 650 }" />
   </div>
 </template>
 <script setup lang="ts">
   import HistoryTable from '../../comment/HistoryTable.vue';
-
 </script>
 <style lang="less" scoped>
-  .nitrogen-history{
+  .nitrogen-history {
     position: fixed;
     top: 80px;
     margin-top: 20px;
   }
-</style>
+</style>

+ 3 - 3
src/views/vent/monitorManager/nitrogen/nitrogen.dataHsw.ts

@@ -4,7 +4,7 @@ export const preMonitorList = [
   {
     title: `供气压力`,
     code: `CompressorGasSupplyPressure`,
-    unit: 'bar',
+    unit: 'MPa',
     child: [],
   },
   {
@@ -51,7 +51,7 @@ export const cqgMonitorList = [
   {
     title: `风包压力`,
     code: `CompressorWindBagPressure`,
-    unit: 'bar',
+    unit: 'MPa',
     child: [],
   },
   {
@@ -67,7 +67,7 @@ export const totalData = [
   {
     title: '总压力',
     code: 'Totalpressure',
-    unit: 'bar',
+    unit: 'MPa',
   },
 ];
 export type State = {

+ 3 - 3
src/views/vent/monitorManager/nitrogen/nitrogen.dataYJ.ts

@@ -68,13 +68,13 @@ export const cqgMonitorList = [
   {
     title: `风包压力`,
     code: `CompressorWindBagPressure`,
-    unit: '',
+    unit: 'MPa',
     child: [],
   },
   {
     title: `风包温度`,
     code: `CompressorWindBagTemp`,
-    unit: 'MPa',
+    unit: '',
     child: [],
   },
 ];
@@ -126,7 +126,7 @@ export const totalData = [
   {
     title: '总压力',
     code: 'MainPipePressure',
-    unit: 'bar',
+    unit: 'MPa',
   },
 ];
 

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

@@ -126,7 +126,7 @@
           </a-tab-pane>
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item" v-if="activeKey === '3'">
-              <HistoryTable columns-type="gate" device-type="gate" :device-list-api="getTableList" designScope="gate-history" :scroll="scroll" />
+              <HistoryTable columns-type="gate" device-type="gate" designScope="gate-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">

+ 24 - 20
src/views/vent/monitorManager/obfurageMonitor/components/obfurageHistory.vue

@@ -1,28 +1,32 @@
 <template>
   <div class="history-box">
-    <HistoryTable :columns-type="`${deviceType}`" :device-type="deviceType" :sysId="deviceId"
-      :device-list-api="getTableList.bind(null, { strtype: deviceType, sysId: deviceId })" designScope="pressurefan_history" :scroll="{ y: 650 }"/>
+    <HistoryTable
+      :columns-type="`${deviceType}`"
+      :device-type="deviceType"
+      :sysId="deviceId"
+      designScope="pressurefan_history"
+      :scroll="{ y: 650 }"
+    />
   </div>
 </template>
 <script setup lang="ts">
-import { ref, defineProps } from 'vue'
-import HistoryTable from '../../comment/HistoryTable.vue';
-import { getTableList } from '../obfurage.api'
-
-const props = defineProps({
-  deviceType: {
-    type: String,
-    required: true,
-  },
-  deviceId: {
-    type: String,
-    required: true,
-  }
-})
+  import { ref, defineProps } from 'vue';
+  import HistoryTable from '../../comment/HistoryTable.vue';
+  import { getTableList } from '../obfurage.api';
 
+  const props = defineProps({
+    deviceType: {
+      type: String,
+      required: true,
+    },
+    deviceId: {
+      type: String,
+      required: true,
+    },
+  });
 </script>
 <style lang="less" scoped>
-.history-box {
-  pointer-events: auto;
-}
-</style>
+  .history-box {
+    pointer-events: auto;
+  }
+</style>

+ 0 - 1
src/views/vent/monitorManager/safetyMonitor/index.vue

@@ -109,7 +109,6 @@
             v-if="activeKey == '2'"
             :columns-type="`${deviceType}`"
             :device-type="deviceType"
-            :device-list-api="getDeviceList.bind(null, { devicekind: deviceType })"
             designScope="device-history"
             @change="changeHis"
           />

+ 8 - 6
src/views/vent/monitorManager/windowMonitor/dandaoFc.threejs.ts

@@ -143,12 +143,14 @@ class singleWindow {
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {
     const meshArr01: THREE.Object3D[] = [];
-    this.group.getObjectByName('ddFc')?.children.forEach((obj) => {
-      if (obj.type === 'Mesh' && ((obj.name && obj.name.startsWith('shanye')) || obj.name.startsWith('FCshanye'))) {
-        obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 0);
-        meshArr01.push(obj);
-      }
-    });
+    if (this.group) {
+      this.group.getObjectByName('ddFc')?.children.forEach((obj) => {
+        if (obj.type === 'Mesh' && ((obj.name && obj.name.startsWith('shanye')) || obj.name.startsWith('FCshanye'))) {
+          obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 0);
+          meshArr01.push(obj);
+        }
+      });
+    }
     this.windowsActionArr.frontWindow = meshArr01;
   }
 

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

@@ -101,7 +101,7 @@
           </a-tab-pane> -->
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item" v-if="activeKey === '3'">
-              <HistoryTable columns-type="window" device-type="window" :device-list-api="baseList" designScope="window-history" :scroll="scroll" />
+              <HistoryTable columns-type="window" device-type="window" designScope="window-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">

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

@@ -1,8 +1,8 @@
 import * as THREE from 'three';
 import UseThree from '../../../../utils/threejs/useThree';
 import singleWindow from './dandaoFc.threejs';
-import singleWindowBet from './dandaoFcBet.threejs';
 import doubleWindow from './shuangdaoFc.threejs';
+import singleWindowXk from './dandaoFcXk.threejs';
 import { animateCamera } from '/@/utils/threejs/util';
 import useEvent from '../../../../utils/threejs/useEvent';
 import { useGlobSetting } from '/@/hooks/setting';
@@ -13,8 +13,9 @@ import { useGlobSetting } from '/@/hooks/setting';
 
 // 模型对象、 文字对象
 let model: UseThree,
-  singleWindowObj: singleWindow | singleWindowBet,
+  singleWindowObj,
   doubleWindowObj: doubleWindow,
+  singleWindowXkObj: singleWindowXk,
   group: THREE.Object3D,
   windowType = 'singleWindow';
 
@@ -55,6 +56,8 @@ const startAnimation = () => {
       doubleWindowObj.mouseUpModel.call(doubleWindowObj);
     } else if (windowType === 'singleWindow' && singleWindowObj) {
       singleWindowObj.mouseUpModel.call(singleWindowObj);
+    } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
+      singleWindowXkObj.mouseUpModel.call(singleWindowXkObj);
     }
   });
 };
@@ -67,6 +70,8 @@ const mouseEvent = (event) => {
         doubleWindowObj.mousedownModel.call(doubleWindowObj, intersects);
       } else if (windowType === 'singleWindow' && singleWindowObj) {
         singleWindowObj.mousedownModel.call(singleWindowObj, intersects);
+      } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
+        singleWindowXkObj.mousedownModel.call(singleWindowXkObj, intersects);
       }
     });
   }
@@ -77,6 +82,8 @@ export const addMonitorText = (selectData) => {
     return doubleWindowObj.addMonitorText.call(doubleWindowObj, selectData);
   } else if (windowType === 'singleWindow' && singleWindowObj) {
     return singleWindowObj.addMonitorText.call(singleWindowObj, selectData);
+  } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
+    return singleWindowXkObj.addMonitorText.call(singleWindowXkObj, selectData);
   }
 };
 
@@ -85,14 +92,8 @@ export const play = (rotationParam, flag) => {
     return doubleWindowObj.play.call(doubleWindowObj, rotationParam, flag);
   } else if (windowType === 'singleWindow' && singleWindowObj) {
     return singleWindowObj.play.call(singleWindowObj, rotationParam, flag);
-  }
-};
-
-export const initCameraCanvas = async (playerVal1?, playerVal2?) => {
-  if (windowType === 'singleWindow' && singleWindowObj) {
-    return await singleWindowObj.initCamera.call(singleWindowObj, playerVal1);
-  } else if (windowType === 'doubleWindow' && doubleWindowObj) {
-    return doubleWindowObj.initCamera.call(doubleWindowObj, playerVal1);
+  } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
+    return singleWindowXkObj.play.call(singleWindowXkObj, rotationParam, flag);
   }
 };
 
@@ -105,10 +106,8 @@ export const setModelType = (type) => {
     // 显示双道风窗
     if (windowType === 'doubleWindow' && doubleWindowObj && doubleWindowObj.group) {
       model.startAnimation = doubleWindowObj.render.bind(doubleWindowObj);
+      model.scene?.remove(group);
       group = doubleWindowObj.group;
-      if (model.scene?.getObjectByName('ddFc')) {
-        model.scene.remove(singleWindowObj.group);
-      }
       const oldCameraPosition = { x: 100, y: 0, z: 500 };
       model.scene?.add(doubleWindowObj.group);
       setTimeout(async () => {
@@ -118,10 +117,8 @@ export const setModelType = (type) => {
     } else if (windowType === 'singleWindow') {
       // 显示单道风窗
       model.startAnimation = singleWindowObj.render.bind(singleWindowObj);
+      model.scene?.remove(group);
       group = singleWindowObj.group;
-      if (model.scene?.getObjectByName('sdFc')) {
-        model.scene?.remove(doubleWindowObj.group);
-      }
       const oldCameraPosition = { x: 100, y: 0, z: 500 };
       model.scene?.add(singleWindowObj.group);
       setTimeout(async () => {
@@ -140,14 +137,13 @@ export const mountedThree = (playerDom) => {
     model.setEnvMap('test1');
     resolve(null);
     model.camera.position.set(100, 0, 1000);
-    // 单道、 双道
     doubleWindowObj = new doubleWindow(model);
     if (sysOrgCode === 'sdmtjtbetmk') {
-      singleWindowObj = new singleWindowBet(model);
+      const singleWindowBet = await import('./dandaoFcBet.threejs');
+      if (singleWindowBet) singleWindowObj = new singleWindowBet.default(model);
     } else {
       singleWindowObj = new singleWindow(model);
     }
-
     doubleWindowObj.mountedThree(playerDom);
     singleWindowObj.mountedThree(playerDom);
     model.animate();

+ 3 - 9
src/views/vent/monitorManager/windrectMonitor/index.vue

@@ -101,13 +101,7 @@
           </a-tab-pane>
           <a-tab-pane key="3" tab="历史数据">
             <div class="tab-item">
-              <HistoryTable
-                columns-type="windrect"
-                device-type="windrect"
-                :device-list-api="baseList"
-                designScope="windrect-history"
-                :scroll="scroll"
-              >
+              <HistoryTable columns-type="windrect" device-type="windrect" designScope="windrect-history" :scroll="scroll">
                 <template #filterCell="{ column, record }">
                   <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
                     {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
@@ -127,7 +121,7 @@
               />
             </div>
           </a-tab-pane>
-          <a-tab-pane key="5" tab="操作历史">
+          <a-tab-pane v-if="hasPermission('windrect:handlerHistory')" key="5" tab="操作历史">
             <div class="tab-item" v-if="activeKey === '5'">
               <HandlerHistoryTable
                 columns-type="operator_history"
@@ -138,7 +132,7 @@
               />
             </div>
           </a-tab-pane>
-          <a-tab-pane key="6" tab="测风结果">
+          <a-tab-pane v-if="hasPermission('windrect:result')" key="6" tab="测风结果">
             <ResultTable v-if="activeKey === '6'" deviceType="windrect_list" :scroll="scroll" />
           </a-tab-pane>
         </a-tabs>

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

@@ -366,7 +366,7 @@ export const chartsColumns = [
     color: '#3DF6FF',
     sort: 1,
     xRotate: 0,
-    dataIndex: 'm³',
+    dataIndex: 'm3',
   },
   {
     legend: '风速',