Browse Source

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

lxh 1 month ago
parent
commit
22002685ff

+ 10 - 5
src/views/vent/deviceManager/pointTabel/point.data.ts

@@ -45,11 +45,11 @@ export const columns: BasicColumn[] = [
     width: 100,
     dataIndex: 'datakind_dictText',
   },
-  // {
-  //   title: '最大值',
-  //   dataIndex: 'fmax',
-  //   width: 100,
-  // },
+  {
+    title: '关联监测点位',
+    dataIndex: 'oldValueCode',
+    width: 100,
+  },
   // {
   //   title: '模拟最小值',
   //   dataIndex: 'testlow',
@@ -185,6 +185,11 @@ export const formSchema: FormSchema[] = [
     },
   },
   {
+    label: '关联监测点位code',
+    field: 'oldValueCode',
+    component: 'Input',
+  },
+  {
     label: '指令默认写入值',
     field: 'value',
     component: 'Input',

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

@@ -46,10 +46,11 @@ export const locationList = [
 ];
 
 export function getMonitorComponent() {
-  const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtcctmk';
+  // const { sysOrgCode } = useGlobSetting();
+  const sysOrgCode = 'sdmtjtsgtmk';
   let FiberModal;
   switch (sysOrgCode) {
+    case 'sdmtjtsgtmk': //石圪台
     case 'sdmtjthlgmk': //哈拉沟
       FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.hlg.vue'));
       break;
@@ -533,11 +534,11 @@ export const noWarningArr = [
   'bundleDayReport',
   'bundleSpyDayReport',
   'gate_linkdlfm',
-  'substation_normal'
+  'substation_normal',
 ]; // 无预警详情的
 export const haveSysDetailArr = ['forcFan', 'pulping']; //有场景详情的
 // export const haveSysDetailArr = ['']; //有场景详情的
 export const noHistoryArr = () =>
   History_Type['type'] == 'remote'
     ? ['surface_history', 'majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gasDay', 'gate_linkdlfm']
-    : ['majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gate_linkdlfm', 'gasDay','substation_normal'];
+    : ['majorpath', 'gasDayReport', 'dustDayReport', 'bundleDayReport', 'bundleSpyDayReport', 'gate_linkdlfm', 'gasDay', 'substation_normal'];

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

@@ -119,7 +119,7 @@
     max: number;
   };
   const columns = ref([]);
-  const showFre = ref(true); // 是否显示频率曲线, 是显示,不是显示角度
+  const showFre = ref(false); // 是否显示频率曲线, 是显示,不是显示角度
   const isMock = false;
   let option = reactive({});
   // 注册 modal
@@ -520,7 +520,7 @@
     () => props.selectData,
     async (selectData) => {
       deviceData.value = selectData;
-      if (selectData['adjustmentMethod_mainFanInfo'] == 'angleadjust') {
+      if (selectData && selectData['adjustmentMethod_mainFanInfo'] == 'angleadjust') {
         // 说明是角度了调节
         showFre.value = false;
       } else {

+ 67 - 2
src/views/vent/monitorManager/mainFanMonitor/main.data.ts

@@ -813,7 +813,7 @@ export const assistanceData = {
 export const setOption = (deviceType?) => {
   let yMax = 4500;
   const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtjjmk';
+  // const sysOrgCode = 'sdmtjtdltmkhjtj';
   if (sysOrgCode == 'sdmtjtdltmk') {
     // 这里判断白家渠还是五当沟
     if (deviceType == 'fanmain_bjq') {
@@ -835,6 +835,8 @@ export const setOption = (deviceType?) => {
     }
   } else if (sysOrgCode == 'sdmtjtjjmk') {
     yMax = 6000;
+  } else if (sysOrgCode == 'sdmtjtdltmkhjtj') {
+    yMax = 3000;
   } else {
     yMax = 4500;
   }
@@ -1146,7 +1148,7 @@ export const initData1 = () => {
 // 大柳塔武当沟
 export const initData = (deviceType?) => {
   const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtjjmk';
+  // const sysOrgCode = 'sdmtjtdltmkhjtj';
   if (sysOrgCode == 'sdmtjtdltmk') {
     return initDataDlt(deviceType);
   } else if (sysOrgCode == 'sdmtjtswmk') {
@@ -1157,6 +1159,8 @@ export const initData = (deviceType?) => {
     return initDataBd(deviceType);
   } else if (sysOrgCode == 'sdmtjtjjmk') {
     return initDataJj();
+  } else if (sysOrgCode == 'sdmtjtdltmkhjtj') {
+    return initDataHjt();
   } else {
     return initData1();
   }
@@ -1286,6 +1290,67 @@ export const initDataSw = (deviceType?) => {
   }
 };
 
+export const initDataHjt = () => {
+  const data: any[] = [];
+  data.push({
+    angle: -10,
+    Hz: -10,
+    a: -0.0357,
+    b: 13.657,
+    c: 515.38,
+    min: 170,
+    max: 400,
+  });
+  data.push({
+    angle: -7,
+    Hz: -7,
+    a: -0.0371,
+    b: 15.478,
+    c: 452.43,
+    min: 170,
+    max: 400,
+  });
+  data.push({
+    angle: -5,
+    Hz: -5,
+    a: -0.0357,
+    b: 13.657,
+    c: 515.38,
+    min: 170,
+    max: 400,
+  });
+  data.push({
+    angle: -4,
+    Hz: -4,
+    a: -0.0361,
+    b: 16.706,
+    c: 228.85,
+    min: 170,
+    max: 400,
+  });
+  data.push({
+    angle: -2,
+    Hz: -2,
+    a: -0.0357,
+    b: 15.478,
+    c: 452.43,
+    min: 170,
+    max: 400,
+  });
+
+  data.push({
+    angle: 1,
+    Hz: 1,
+    a: -0.0361,
+    b: 16.706,
+    c: 228.85,
+    min: 170,
+    max: 400,
+  });
+
+  return data;
+};
+
 const initDataBd = (deviceType?) => {
   if (deviceType == 'fanmain_ljy') {
     // 刘家宴

+ 66 - 75
src/views/vent/monitorManager/nitrogen/components/nitrogenHome.vue

@@ -230,94 +230,83 @@
     let dataSource = res.msgTxt[0] && res.msgTxt[0].datalist ? res.msgTxt[0].datalist[0] : [];
     // dataSource = {
     //   msgType: null,
-    //   deviceID: '1773237923639201793',
-    //   strname: '寸草塔二矿压风机',
-    //   strinstallpos: '寸草塔二矿压风机',
+    //   deviceID: '1766018589748658177',
+    //   strname: '压风机',
+    //   strinstallpos: '压风机',
     //   fsectarea: 'null',
-    //   stationname: '寸草塔二矿压风机',
-    //   stationtype: 'redis',
-    //   deviceType: 'forcFan_normal',
+    //   stationname: '压风机分站',
+    //   stationtype: 'http_kc',
+    //   deviceType: 'forcFan_auto',
     //   typeName: '压风机',
     //   netStatus: 1,
     //   warnFlag: 0,
     //   warnLevel: 0,
     //   warnLevel_str: '正常',
+    //   syswarnLevel: null,
+    //   syswarnLevel_str: null,
+    //   syswarnLevel_des: null,
     //   warnTime: null,
-    //   readTime: '2024-04-07 14:47:23',
+    //   readTime: '2025-02-20 16:25:40',
     //   warnDes: '',
     //   frontGateOpenCtrl: null,
     //   rearGateOpenCtrl: null,
     //   readData: {
-    //     PRE1_MOT_PhaseATemp: '27',
-    //     PRE3_CPR_CoolantTemp: '76',
-    //     PRE3_MOT_PhaseCTemp: '92',
+    //     Compressor4GasSupplyPressure: '0.52',
+    //     PreFan2Fault: '0',
     //     sign: '0',
-    //     PRE1_CPR_UnLoadPre: '6.7',
-    //     PRE1_CPR_LoadorUnload: '0',
-    //     PRE3_CPR_ExhaustPre: '6.0',
-    //     PRE2_CPR_ExhaustTemp: '47',
-    //     PRE3_MOT_DrivingEndVibrationValid: '-8.6',
-    //     PRE1_VLS_OverTempAlarm: '0',
-    //     PRE2_CPR_LoadorUnload: '1',
-    //     PRE2_AlamSignal: '0',
-    //     PRE3_MOT_PhaseBTemp: '91',
-    //     PRE2_MOT_DrivingEndVibrationValid: '-8.6',
-    //     PRE1_CPR_ExhaustPre: '5.7',
-    //     PRE3_FaultSignal: '0',
-    //     PRE3_MOT_Power: '0',
-    //     PRE3_MOT_PhaseATemp: '103',
-    //     PRE2_CPR_CoolantTemp: '73',
-    //     PRE1_HostTemp: '22',
-    //     PRE1_FaultSignal: '0',
-    //     PRE2_FaultSignal: '0',
-    //     PRE2_VLS_OverTempAlarm: '0',
-    //     PRE2_MOT_FrontAxleTemp: '43',
-    //     PRE3_MOT_BackAxleTemp: '57',
-    //     PRE1_MOT_TotalRunTime: '493',
-    //     PRE3_MOT_FrontAxleTemp: '80',
-    //     PRE3_VLS_OverTempAlarm: '0',
-    //     PRE1_CPR_LoadTime: '7143',
-    //     PRE2_CPR_LoadTime: '6036',
-    //     PRE3_CPR_LoadTime: '4019',
-    //     PRE2_MOT_Power: '0',
-    //     PRE2_MOT_PhaseBTemp: '72',
-    //     PRE2_HostTemp: '101',
-    //     PRE2_MOT_TotalRunTime: '7318',
-    //     PRE3_MOT_NoneDrivingEndVibrationValid: '-8.46',
-    //     PRE2_MOT_NoneDrivingEndVibrationValid: '-8.44',
-    //     PRE2_MOT_BackAxleTemp: '52',
-    //     PRE1_MOT_NoneDrivingEndVibrationValid: '0.0',
-    //     PRE1_Status: '0',
-    //     PRE3_Status: '1',
-    //     PRE2_Status: '1',
-    //     PRE1_VLS_Temp: '35',
-    //     PRE3_CPR_UnLoadPre: '7.2',
-    //     PRE1_AlamSignal: '0',
-    //     PRE2_CPR_ExhaustPre: '5.8',
-    //     PRE3_CPR_ExhaustTemp: '50',
-    //     PRE3_MOT_TotalRunTime: '4038',
-    //     PRE1_MOT_BackAxleTemp: '26',
-    //     PRE2_MOT_PhaseATemp: '72',
-    //     PRE1_MOT_FrontAxleTemp: '34',
-    //     PRE3_VLS_Temp: '53',
-    //     PRE1_MOT_Power: '351',
-    //     PRE1_CPR_LoadPre: '6.0',
-    //     PRE1_MOT_DrivingEndVibrationValid: '0.0',
-    //     PRE3_AlamSignal: '0',
-    //     PRE3_CPR_LoadPre: '6.5',
-    //     PRE2_CPR_LoadPre: '6.1',
-    //     PRE3_CPR_LoadorUnload: '1',
-    //     PRE1_MOT_PhaseCTemp: '27',
-    //     TotalOutPipePre: '5.75',
-    //     PRE1_CPR_CoolantTemp: '23',
-    //     PRE1_MOT_PhaseBTemp: '26',
-    //     PRE2_MOT_PhaseCTemp: '71',
-    //     PRE2_CPR_UnLoadPre: '7.2',
-    //     PRE3_HostTemp: '96',
-    //     PRE2_VLS_Temp: '49',
+    //     Compressor1CurrentA: '0',
+    //     Compressor1WindBagTemp: '10',
+    //     Compressor5GasSupplyPressure: '0.57',
+    //     Compressor4ExhaustTemp: '91',
+    //     Compressor4RunTime: '1334',
+    //     Compressor5RunTime: '6308.78809',
+    //     Compressor2WindBagPressure: '0.50247',
+    //     Compressor2LoadTime: '14228',
+    //     Compressor1RunTime: '20219',
+    //     Compressor2GasSupplyPressure: '0.53',
+    //     Compressor6RunTime: '13355',
+    //     Compressor2RunTime: '13776.78613',
+    //     Compressor3RunTime: '7053.3335',
+    //     Compressor6WindBagTemp: '4.4',
+    //     Compressor4LoadTime: '1532',
+    //     Compressor6GasSupplyPressure: '0.53',
+    //     Compressor1ExhaustTemp: '16',
+    //     Compressor3ExhaustTemp: '86',
+    //     Compressor5LoadTime: '5029.39404',
+    //     Compressor1GasSupplyPressure: '0.54',
+    //     Compressor3WindBagTemp: '9',
+    //     Totalpressure: '0.48107',
+    //     Compressor4CurrentA: '21',
+    //     Compressor6CurrentA: '0',
+    //     PreFan5Fault: '1',
+    //     Compressor4WindBagTemp: '12.5',
+    //     Compressor1WindBagPressure: '0.49739',
+    //     Compressor6WindBagPressure: '0.49817',
+    //     Compressor5WindBagTemp: '4.8',
+    //     Compressor2CurrentA: '22',
+    //     Compressor2ExhaustTemp: '87',
+    //     Compressor2WindBagTemp: '14',
+    //     PreFan4Fault: '0',
+    //     Compressor3LoadTime: '4670.1665',
+    //     Compressor5ExhaustTemp: '22',
+    //     Compressor1Working: '0',
+    //     Compressor2Working: '1',
+    //     Compressor3Working: '1',
+    //     Compressor4Working: '1',
+    //     Compressor5Working: '0',
+    //     Compressor6Working: '0',
+    //     Compressor6LoadTime: '11308',
+    //     PreFan3Fault: '0',
+    //     Compressor6ExhaustTemp: '17',
+    //     Compressor3WindBagPressure: '0.49328',
+    //     Compressor1LoadTime: '15877',
+    //     PreFan1Fault: '0',
+    //     Compressor3GasSupplyPressure: '0.53',
+    //     Compressor5CurrentA: '0',
+    //     Compressor3CurrentA: '22',
+    //     Compressor5WindBagPressure: '0.48107',
+    //     Compressor4WindBagPressure: '0.49856',
     //     isRun: '-2',
-    //     PRE1_CPR_ExhaustTemp: '27',
-    //     TotalOutPipeFlow: '9999',
     //   },
     //   readDataDes: null,
     //   summaryHour: [],
@@ -333,6 +322,8 @@
     //   other3: null,
     //   remarkInfo: null,
     //   linkInfo: null,
+    //   addrIndex: null,
+    //   warnLogNotOkCount: 0,
     // };
 
     if (dataSource) {

+ 2 - 2
src/views/vent/monitorManager/nitrogen/nitrogen.data.1.ts

@@ -2,7 +2,7 @@ import { ref, defineAsyncComponent } from 'vue';
 import { useGlobSetting } from '/@/hooks/setting';
 export function getNitrogenHome() {
   const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtbltmk';
+  // const sysOrgCode = 'yjmdhswmk';
   let nitrogenHome;
   switch (sysOrgCode) {
     case 'sdmtjtbltmk': //补连塔
@@ -65,7 +65,7 @@ export const bottomBtnList = ref([
 
 export async function getMonitorData() {
   const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtbltmk';
+  // const sysOrgCode = 'yjmdhswmk';
   switch (sysOrgCode) {
     case 'yjmdsankuang': // 窑街三矿
       return await import('./nitrogen.dataYJ');

+ 263 - 0
src/views/vent/monitorManager/windowMonitor/dandaoFcHjt.threejs.ts

@@ -0,0 +1,263 @@
+import * as THREE from 'three';
+
+import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
+import gsap from 'gsap';
+
+class ddFc_6 {
+  model;
+  modelName = 'ddFc';
+  group: THREE.Object3D = new THREE.Object3D();
+  animationTimer;
+  isLRAnimation = true;
+  direction = 1;
+  windowsActionArr = {
+    frontWindow: [],
+  };
+  player1;
+  player2;
+  playerStartClickTime1 = new Date().getTime();
+  constructor(model) {
+    this.model = model;
+    this.group.name = 'ddFc';
+  }
+  addLight = () => {
+    if (!this.group || !this.group) return;
+
+    const directionalLight = new THREE.DirectionalLight(0xffffff, 2);
+    directionalLight.position.set(-437, 61, 559);
+    this.group.add(directionalLight);
+
+    const pointLight2 = new THREE.PointLight(0xffffff, 1, 150);
+    pointLight2.position.set(-101, 34, 16);
+    pointLight2.shadow.bias = 0.05;
+    this.group.add(pointLight2);
+
+    const pointLight3 = new THREE.PointLight(0xffffff, 1, 150);
+    pointLight3.position.set(19, 25, -7);
+    pointLight3.shadow.bias = 0.05;
+    this.group.add(pointLight3);
+
+    const pointLight6 = new THREE.PointLight(0xffffff, 1, 300);
+    pointLight6.position.set(51, 51, 9);
+    pointLight6.shadow.bias = 0.05;
+    this.group.add(pointLight6);
+  };
+
+  // 设置模型位置
+  setModalPosition() {
+    this.group?.scale.set(22, 22, 22);
+    this.group?.position.set(-35, 25, 15);
+  }
+
+  addMonitorText(selectData) {
+    if (!this.group) {
+      return;
+    }
+    const screenDownText = VENT_PARAM['modalText']
+      ? VENT_PARAM['modalText']
+      : History_Type['type'] == 'remote'
+      ? `国能神东煤炭集团监制`
+      : '煤炭科学技术研究院有限公司研制';
+
+    const screenDownTextX = 90 - (screenDownText.length - 10) * 6;
+    const textArr = [
+      {
+        text: `远程定量调节自动风窗`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 100,
+        y: 95,
+      },
+      {
+        text: `${selectData.OpenDegree ? '开度值(°)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 145,
+      },
+      {
+        text: selectData.OpenDegree
+          ? Number(`${selectData.OpenDegree}`).toFixed(2)
+          : selectData.forntArea
+          ? Number(`${selectData.forntArea}`).toFixed(2)
+          : '-',
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 145,
+      },
+      {
+        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态:'}:`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 200,
+      },
+      {
+        text: `${
+          selectData.frontRearDP
+            ? selectData.frontRearDP
+            : selectData.windSpeed
+            ? selectData.windSpeed
+            : selectData.netStatus == '0'
+            ? '断开'
+            : '连接'
+        }`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 200,
+      },
+      {
+        text: `${selectData.fWindowM3 ? '过风量(m³/min)' : '风窗道数'}: `,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 250,
+      },
+      {
+        text: `${selectData.fWindowM3 ? selectData.fWindowM3 : selectData.nwindownum}`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 250,
+      },
+      {
+        text: screenDownText,
+        font: 'normal 28px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: screenDownTextX,
+        y: 300,
+      },
+    ];
+    getTextCanvas(750, 546, textArr, '').then((canvas: HTMLCanvasElement) => {
+      const textMap = new THREE.CanvasTexture(canvas); // 关键一步
+      const textMaterial = new THREE.MeshBasicMaterial({
+        // 关于材质并未讲解 实操即可熟悉                 这里是漫反射类似纸张的材质,对应的就有高光类似金属的材质.
+        map: textMap, // 设置纹理贴图
+        transparent: true,
+        side: THREE.DoubleSide, // 这里是双面渲染的意思
+      });
+      textMap.dispose();
+      textMaterial.blending = THREE.CustomBlending;
+      const monitorPlane = this.group?.getObjectByName('monitorText');
+      if (monitorPlane) {
+        monitorPlane.material = textMaterial;
+      } else {
+        const planeGeometry = new THREE.PlaneGeometry(526, 346); // 平面3维几何体PlaneGeometry
+        const planeMesh = new THREE.Mesh(planeGeometry, textMaterial);
+        planeMesh.name = 'monitorText';
+        planeMesh.scale.set(0.003, 0.0034, 0.004);
+        planeMesh.position.set(4.25, 0.44, -0.27);
+        this.group?.add(planeMesh);
+      }
+    });
+  }
+
+  /* 提取风门序列帧,初始化前后门动画 */
+  initAnimation() {
+    const meshArr01: THREE.Mesh[] = [];
+    const fcGroup = this.group?.getObjectByName('FengChuang_BaoDe_3')?.getObjectByName('FengChuang_1_17');
+    if (fcGroup) {
+      const shanyeNames = [
+        'FengChuang_1_22',
+        'FengChuang_1_24',
+        'FengChuang_1_25',
+        'FengChuang_1_26',
+        'FengChuang_1_27',
+        'FengChuang_1_28',
+        'FengChuang_1_29',
+      ];
+      fcGroup.children.forEach((obj: THREE.Mesh) => {
+        if (obj.type === 'Mesh' && obj.name && shanyeNames.includes(obj.name)) {
+          obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 90);
+          meshArr01.push(obj);
+        }
+      });
+    }
+    this.windowsActionArr.frontWindow = meshArr01;
+  }
+
+  play(rotationParam, flag) {
+    if (!this.windowsActionArr.frontWindow) {
+      return;
+    }
+    if (flag === 1) {
+      // 前风窗动画
+      this.windowsActionArr.frontWindow.forEach((mesh: THREE.Mesh) => {
+        gsap.to(mesh.rotation, {
+          y: THREE.MathUtils.degToRad(rotationParam.frontDeg1),
+          duration: (1 / 9) * Math.abs(rotationParam.frontDeg1 - mesh.rotation.z),
+          overwrite: true,
+        });
+      });
+    } else if (flag === 0) {
+      ([...this.windowsActionArr.frontWindow] as THREE.Mesh[]).forEach((mesh) => {
+        gsap.to(mesh.rotation, {
+          y: THREE.MathUtils.degToRad(90),
+          overwrite: true,
+        });
+      });
+    }
+  }
+
+  /* 点击风窗,风窗全屏 */
+  mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
+    if (this.animationTimer) {
+      clearTimeout(this.animationTimer);
+      this.animationTimer = null;
+    }
+    // 判断是否点击到视频
+    intersects.find((intersect) => {
+      const mesh = intersect.object;
+      if (mesh.name === 'player1') {
+        if (new Date().getTime() - this.playerStartClickTime1 < 400) {
+          // 双击,视频放大
+          if (this.player1) {
+            this.player1.requestFullscreen();
+          }
+        }
+        this.playerStartClickTime1 = new Date().getTime();
+        return true;
+      }
+      return false;
+    });
+  }
+
+  mouseUpModel() {}
+
+  /* 风门动画 */
+  render() {
+    if (!this.model) {
+      return;
+    }
+  }
+
+  mountedThree() {
+    return new Promise((resolve) => {
+      this.model.setGLTFModel('ddFc-hjt').then((gltf) => {
+        this.group = gltf[0];
+        this.group.name = this.modelName;
+        this.setModalPosition();
+        this.initAnimation();
+        resolve(null);
+      });
+    });
+  }
+
+  destroy() {
+    this.model.clearGroup(this.group);
+    this.windowsActionArr.frontWindow = undefined;
+    this.model = null;
+    this.group = null;
+  }
+}
+export default ddFc_6;

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

@@ -10,6 +10,7 @@ import sdFc_2 from './shuangdaoFcSw.threejs'; // sdFc_2 单道-带小门-2个窗
 import sdFc_5 from './shuangdaoFcYjl.threejs'; // sdFc_5 双道-小门(侧边下)-小窗(榆家梁)
 import ddFc_4 from './dandaoFcBd1.threejs'; // ddFc_2 单道-一个小窗两列扇叶
 import ddFc_2 from './dandaoFcBd2.threejs'; // ddFc_2 单道-一个小窗两列扇叶
+import ddFc_6 from './dandaoFcHjt.threejs'; // ddFc_6 单道-大窗1列扇叶(活鸡兔)
 import { animateCamera } from '/@/utils/threejs/util';
 import useEvent from '../../../../utils/threejs/useEvent';
 import { getDictItemsByCode } from '/@/utils/dict';
@@ -29,6 +30,7 @@ let model: UseThree,
   sdFc5: sdFc_5,
   ddFc2: ddFc_2,
   ddFc4: ddFc_4,
+  ddFc6: ddFc_6,
   singleWindowXkObj: singleWindowXk,
   group: THREE.Object3D,
   windowType = 'ddFc1';
@@ -57,6 +59,8 @@ const startAnimation = () => {
       ddFc2.mouseUpModel.call(ddFc2);
     } else if (windowType === 'ddFc4' && ddFc4) {
       ddFc4.mouseUpModel.call(ddFc4);
+    } else if (windowType === 'ddFc6' && ddFc6) {
+      ddFc6.mouseUpModel.call(ddFc6);
     } else if (windowType === 'sdFc1' && sdFc1) {
       sdFc1.mouseUpModel.call(sdFc1);
     } else if (windowType === 'sdFc3' && sdFc3) {
@@ -85,6 +89,8 @@ const mouseEvent = (event) => {
         ddFc2.mousedownModel.call(ddFc2, intersects);
       } else if (windowType === 'ddFc4' && ddFc4) {
         ddFc4.mousedownModel.call(ddFc4, intersects);
+      } else if (windowType === 'ddFc6' && ddFc6) {
+        ddFc6.mousedownModel.call(ddFc6, intersects);
       } else if (windowType === 'sdFc1' && sdFc1) {
         sdFc1.mousedownModel.call(sdFc1, intersects);
       } else if (windowType === 'sdFc3' && sdFc3) {
@@ -112,6 +118,8 @@ export const addMonitorText = (selectData) => {
     return ddFc2.addMonitorText.call(ddFc2, selectData);
   } else if (windowType === 'ddFc4' && ddFc4) {
     return ddFc4.addMonitorText.call(ddFc4, selectData);
+  } else if (windowType === 'ddFc6' && ddFc6) {
+    return ddFc6.addMonitorText.call(ddFc6, selectData);
   } else if (windowType === 'sdFc1' && sdFc1) {
     return sdFc1.addMonitorText.call(sdFc1, selectData);
   } else if (windowType === 'sdFc3' && sdFc3) {
@@ -210,6 +218,8 @@ export const play = (rotationParam, flag) => {
     return ddFc2.play.call(ddFc2, rotationParam, flag);
   } else if (windowType === 'ddFc4' && ddFc4) {
     return ddFc4.play.call(ddFc4, rotationParam, flag);
+  } else if (windowType === 'ddFc6' && ddFc6) {
+    return ddFc6.play.call(ddFc6, rotationParam, flag);
   } else if (windowType === 'sdFc1' && sdFc1) {
     return sdFc1.play.call(sdFc1, rotationParam, flag);
   } else if (windowType === 'sdFc3' && sdFc3) {
@@ -242,6 +252,12 @@ export const setModelType = (type) => {
       newP: { x: 66.257, y: 57.539, z: 94.313 },
       newT: { x: 0, y: 0, z: 0 },
     },
+    ddFc6: {
+      render: ddFc6 ? () => ddFc6.render() : null,
+      group: ddFc6 ? ddFc6.group : null,
+      newP: { x: 66.257, y: 57.539, z: 94.313 },
+      newT: { x: 0, y: 0, z: 0 },
+    },
     ddFc1: {
       render: ddFc1 ? () => ddFc1.render() : null,
       group: ddFc1 ? ddFc1.group : null,
@@ -324,9 +340,10 @@ export const mountedThree = () => {
     model.camera.position.set(100, 0, 1000);
     // 根据模型类型判断要初始化哪些模型
     const dictCodes = getDictItemsByCode('windowModalType');
-
+    debugger;
     for (let i = 0; i < dictCodes.length; i++) {
       const dict = dictCodes[i];
+
       switch (dict.value) {
         case 'sdFc1':
           sdFc1 = new sdFc_1(model);
@@ -348,6 +365,10 @@ export const mountedThree = () => {
           ddFc4 = new ddFc_4(model);
           await ddFc4.mountedThree();
           break;
+        case 'ddFc6':
+          ddFc6 = new ddFc_6(model);
+          await ddFc6.mountedThree();
+          break;
         case 'sdFc3':
           sdFc3 = new sdFc_3(model);
           await sdFc3.mountedThree();
@@ -384,6 +405,7 @@ export const destroy = () => {
     if (ddFc1) ddFc1.destroy();
     if (ddFc2) ddFc2.destroy();
     if (ddFc4) ddFc4.destroy();
+    if (ddFc6) ddFc6.destroy();
     if (sdFc1) sdFc1.destroy();
     if (sdFc3) sdFc3.destroy();
     if (sdFc4) sdFc4.destroy();
@@ -399,6 +421,7 @@ export const destroy = () => {
     ddFc1 = null;
     ddFc2 = null;
     ddFc4 = null;
+    ddFc6 = null;
     sdFc1 = null;
     sdFc3 = null;
     sdFc4 = null;