Browse Source

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

lxh 2 months ago
parent
commit
d4c267aeb8

+ 9 - 9
src/views/system/dict/dict.data.ts

@@ -2,7 +2,7 @@ import { BasicColumn } from '/@/components/Table';
 import { FormSchema } from '/@/components/Table';
 import { dictItemCheck } from './dict.api';
 import { rules } from '/@/utils/helper/validator';
-import { h } from "vue";
+import { h } from 'vue';
 
 export const columns: BasicColumn[] = [
   {
@@ -88,7 +88,7 @@ export const dictItemColumns: BasicColumn[] = [
   {
     title: '名称',
     dataIndex: 'itemText',
-    width: 80,
+    width: 200,
   },
   {
     title: '数据值',
@@ -99,12 +99,12 @@ export const dictItemColumns: BasicColumn[] = [
     title: '字典颜色',
     dataIndex: 'itemColor',
     width: 80,
-    align:'center',
-    customRender:({ text }) => {
+    align: 'center',
+    customRender: ({ text }) => {
       return h('div', {
-        style: {"background": text, "width":"18px","height":"18px","border-radius":"50%","margin":"0 auto"}
-      })
-    }
+        style: { background: text, width: '18px', height: '18px', 'border-radius': '50%', margin: '0 auto' },
+      });
+    },
   },
 ];
 
@@ -154,7 +154,7 @@ export const itemFormSchema: FormSchema[] = [
               return Promise.reject('数据值不能包含特殊字符!');
             }
             return new Promise<void>((resolve, reject) => {
-              let params = {
+              const params = {
                 dictId: values.dictId,
                 id: model.id,
                 itemValue: value,
@@ -176,7 +176,7 @@ export const itemFormSchema: FormSchema[] = [
     label: '颜色值',
     field: 'itemColor',
     component: 'Input',
-    slot:'itemColor'
+    slot: 'itemColor',
   },
   {
     label: '描述',

+ 262 - 0
src/views/vent/bundle/bundleMonitorTable/bundle-table.data.ts

@@ -368,3 +368,265 @@ export const Hjtcolumns: BasicColumn[] = [
     align: 'center',
   },
 ];
+export const Bdcolumns: BasicColumn[] = [
+  {
+    title: '束管编号',
+    width: 80,
+    align: 'center',
+    dataIndex: 'xh',
+    key: 'xh',
+  },
+  {
+    title: '监测地点',
+    dataIndex: 'jcdd',
+    key: 'jcdd',
+    width: 130,
+    align: 'center',
+  },
+  {
+    title: '氧气(O₂%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'o2_max',
+        key: 'o2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'o2_min',
+        key: 'o2_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'o2_ave',
+        key: 'o2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '氮气(N₂%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'n2_max',
+        key: 'n2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'n2_ave',
+        key: 'n2_ave',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'n2_ave',
+        key: 'n2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '一氧化碳(CO%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'co_max',
+        key: 'co_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'co_min',
+        key: 'co_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'co_ave',
+        key: 'co_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '二氧化碳(CO₂%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'co2_max',
+        key: 'co2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'co2_min',
+        key: 'co2_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'co2_ave',
+        key: 'co2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '甲烷(CH₄%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'ch4_max',
+        key: 'ch4_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'ch4_min',
+        key: 'ch4_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'ch4_ave',
+        key: 'ch4_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '乙烯(C₂H₄%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'c2h4_max',
+        key: 'c2h4_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'c2h4_min',
+        key: 'c2h4_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'c2h4_ave',
+        key: 'c2h4_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '乙炔(C₂H₂%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'c2h2_max',
+        key: 'c2h2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'c2h2_min',
+        key: 'c2h2_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'c2h2_ave',
+        key: 'c2h2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '氢气(H₂%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'h2_max',
+        key: 'h2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'h2_min',
+        key: 'h2_min',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'h2_ave',
+        key: 'h2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '二氧化氮(NO₂%)',
+    children: [
+      {
+        title: '最大值',
+        dataIndex: 'no2_max',
+        key: 'no22_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '最小值',
+        dataIndex: 'no22_max',
+        key: 'no2_max',
+        width: 80,
+        align: 'center',
+      },
+      {
+        title: '平均值',
+        dataIndex: 'no2_ave',
+        key: 'no2_ave',
+        width: 80,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '煤自燃阶段',
+    dataIndex: 'internalFireWarnLevel',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    width: 100,
+    align: 'center',
+  },
+];

+ 154 - 10
src/views/vent/bundle/bundleMonitorTable/index.vue

@@ -50,7 +50,7 @@
 
 <script setup lang="ts">
 import { ref, onMounted, computed, shallowRef, reactive, nextTick } from 'vue';
-import { columns, Hjtcolumns } from './bundle-table.data';
+import { columns, Hjtcolumns, Bdcolumns } from './bundle-table.data';
 import { getBundleInfoList, getAllFileList, getAllFileListById } from './bundle-table.api';
 import customHeader from '/@/components/vent/customHeader.vue';
 // import { blastDelta } from './modal/blastDelta.vue';
@@ -86,6 +86,8 @@ const computedColumns = computed(() => {
   switch (sysOrgCode) {
     case 'sdmtjtdltmkhjtj':
       return Hjtcolumns; // 活鸡兔对应的列配置
+    case 'sdmtjtBdmk':
+      return Bdcolumns; // 保德对应的列配置
     default:
       return columns; // 默认情况下返回的列配置
   }
@@ -95,21 +97,32 @@ function updateChart(data: any) {
   const myChart = echarts.init(chartDom);
   const categories = data.map((item: any) => item.jcdd);
   const c2h2MaxValues = data.map((item: any) => parseFloat(item.c2h2_max));
+  const c2h2MinValues = data.map((item: any) => parseFloat(item.c2h2_min));
   const c2h2AveValues = data.map((item: any) => parseFloat(item.c2h2_ave));
   const c2h4MaxValues = data.map((item: any) => parseFloat(item.c2h4_max));
+  const c2h4MinValues = data.map((item: any) => parseFloat(item.c2h4_min));
   const c2h4AveValues = data.map((item: any) => parseFloat(item.c2h4_ave));
   const ch4MaxValues = data.map((item: any) => parseFloat(item.ch4_max));
+  const ch4MinValues = data.map((item: any) => parseFloat(item.ch4_min));
   const ch4AveValues = data.map((item: any) => parseFloat(item.ch4_ave));
   const co2MaxValues = data.map((item: any) => parseFloat(item.co2_max));
+  const co2MinValues = data.map((item: any) => parseFloat(item.co2_min));
   const co2AveValues = data.map((item: any) => parseFloat(item.co2_ave));
   const coMaxValues = data.map((item: any) => parseFloat(item.co_max));
+  const coMinValues = data.map((item: any) => parseFloat(item.co_min));
   const coAveValues = data.map((item: any) => parseFloat(item.co_ave));
+  const o2MaxValues = data.map((item: any) => parseFloat(item.o2_max));
   const o2MinValues = data.map((item: any) => parseFloat(item.o2_min));
   const o2AveValues = data.map((item: any) => parseFloat(item.o2_ave));
   const n2MaxValues = data.map((item: any) => parseFloat(item.n2_max));
+  const n2MinValues = data.map((item: any) => parseFloat(item.n2_min));
   const n2AveValues = data.map((item: any) => parseFloat(item.n2_ave));
   const no2MaxValues = data.map((item: any) => parseFloat(item.no2_max));
+  const no2MinValues = data.map((item: any) => parseFloat(item.no2_min));
   const no2AveValues = data.map((item: any) => parseFloat(item.no2_ave));
+  const h2MaxValues = data.map((item: any) => parseFloat(item.h2_max));
+  const h2MinValues = data.map((item: any) => parseFloat(item.h2_min));
+  const h2AveValues = data.map((item: any) => parseFloat(item.h2_ave));
 
   const getSeriesConfig = (sysOrgCode) => {
     switch (sysOrgCode) {
@@ -269,6 +282,145 @@ function updateChart(data: any) {
             type: 'bar',
           },
         ];
+      case 'sdmtjtBdmk':
+        return [
+          {
+            name: 'O₂最大值',
+            data: o2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'O₂最小值',
+            data: o2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'O₂平均值',
+            data: o2AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'N₂最大值',
+            data: n2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'N₂最小值',
+            data: n2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'N₂平均值',
+            data: n2AveValues,
+            type: 'bar',
+          },
+
+          {
+            name: 'CO最大值',
+            data: coMaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'CO最小值',
+            data: coMinValues,
+            type: 'bar',
+          },
+          {
+            name: 'CO平均值',
+            data: coAveValues,
+            type: 'bar',
+          },
+          {
+            name: 'CO₂最大值',
+            data: co2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'CO₂最小值',
+            data: co2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'CO₂平均值',
+            data: co2AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'CH₄最大值',
+            data: ch4MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'CH₄最小值',
+            data: ch4MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'CH₄平均值',
+            data: ch4AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₄最大值',
+            data: c2h4MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₄最小值',
+            data: c2h4MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₄平均值',
+            data: c2h4AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₂最大值',
+            data: c2h2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₂最小值',
+            data: c2h2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₂平均值',
+            data: c2h2AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'H₂最大值',
+            data: h2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'H₂最小值',
+            data: h2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'H₂平均值',
+            data: h2AveValues,
+            type: 'bar',
+          },
+          {
+            name: 'NO₂最大值',
+            data: no2MaxValues,
+            type: 'bar',
+          },
+          {
+            name: 'NO₂最小值',
+            data: no2MinValues,
+            type: 'bar',
+          },
+          {
+            name: 'NO₂平均值',
+            data: no2AveValues,
+            type: 'bar',
+          },
+        ];
       default:
         return [
           {
@@ -358,14 +510,6 @@ function updateChart(data: any) {
   const seriesConfig = getSeriesConfig(sysOrgCode);
 
   const option = {
-    title: {
-      text: '束管日报分析',
-      textStyle: {
-        color: '#ffffff', // 设置标题颜色
-      },
-      left: 'center', // 水平居中
-      top: '0', // 设置标题距离顶部的距离
-    },
     tooltip: {
       trigger: 'axis',
       backgroundColor: 'rgba(28, 72, 105, 0.5)', // 设置 tooltip 背景为透明
@@ -381,7 +525,7 @@ function updateChart(data: any) {
       },
     },
     legend: {
-      top: '8%',
+      top: '2%',
       textStyle: {
         color: '#ffffffff',
       },

+ 130 - 0
src/views/vent/bundleSpy/bundleSpyTable/bundleSpy-table.data.ts

@@ -226,3 +226,133 @@ export const Hjtcolumns: BasicColumn[] = [
     align: 'center',
   },
 ];
+export const Bdcolumns: BasicColumn[] = [
+  {
+    title: '序号',
+    width: 60,
+    align: 'center',
+    dataIndex: 'xh',
+    key: 'xh',
+  },
+  {
+    title: '采空区名称',
+    dataIndex: 'ckqmc',
+    key: 'ckqmc',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '采样地点',
+    dataIndex: 'jcdd',
+    key: 'jcdd',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '采样时间',
+    dataIndex: 'cysj',
+    key: 'cysj',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '分析时间',
+    dataIndex: 'fxsj',
+    key: 'fxsj',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '气体分析结果表',
+    children: [
+      {
+        title: '氧气(O₂%)',
+        dataIndex: 'o2_ave',
+        key: 'o2_ave',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '氮气(N₂%)',
+        dataIndex: 'n2_ave',
+        key: 'n2_ave',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '一氧化碳(CO%)',
+        dataIndex: 'co_ave',
+        key: 'co_ave',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '二氧化碳(CO₂%)',
+        dataIndex: 'co2_ave',
+        key: 'co2_ave',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '甲烷(CH₄%)',
+        dataIndex: 'ch4_ave',
+        key: 'ch4_ave',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '乙烷(C2H6%)',
+        dataIndex: 'c2h6_ave',
+        key: 'c2h6_ave',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '丙烷(C3H8%)',
+        dataIndex: 'c3h8_ave',
+        key: 'c3h8_ave',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '乙烯(C₂H₄%)',
+        dataIndex: 'c2h4_ave',
+        key: 'c2h4_ave',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '乙炔(C₂H₂%)',
+        dataIndex: 'c2h2_ave',
+        key: 'c2h2_ave',
+        width: 100,
+        align: 'center',
+      },
+      {
+        title: '合计',
+        dataIndex: 'zzfhl_ave',
+        key: 'zzfhl_ave',
+        width: 100,
+        align: 'center',
+      },
+    ],
+  },
+  {
+    title: '煤自燃阶段',
+    dataIndex: 'internalFireWarnLevel',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '进出风状态',
+    dataIndex: 'jcfzt',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    width: 100,
+    align: 'center',
+  },
+];

+ 64 - 11
src/views/vent/bundleSpy/bundleSpyTable/index.vue

@@ -44,7 +44,7 @@
 
 <script setup lang="ts">
 import { ref, onMounted, computed, reactive, shallowRef } from 'vue';
-import { columns, Hjtcolumns } from './bundleSpy-table.data';
+import { columns, Hjtcolumns, Bdcolumns } from './bundleSpy-table.data';
 import { getbundleSpyInfoList, getAllFileList, getAllFileListById } from './bundleSpy-table.api';
 import customHeader from '/@/components/vent/customHeader.vue';
 import * as echarts from 'echarts';
@@ -78,8 +78,10 @@ const computedColumns = computed(() => {
   switch (sysOrgCode) {
     case 'sdmtjtdltmkhjtj':
       return Hjtcolumns; // 活鸡兔对应的列配置
+    case 'sdmtjtBdmk':
+      return Bdcolumns; // 保德对应的列配置
     default:
-      return columns; // 默认情况下返回的列配置
+      return Bdcolumns; // 默认情况下返回的列配置
   }
 });
 
@@ -159,6 +161,7 @@ function updateChart(data: any) {
   const o2AveValues = data.map((item: any) => parseFloat(item.o2_ave));
   const n2AveValues = data.map((item: any) => parseFloat(item.n2_ave));
   const c2h6AveValues = data.map((item: any) => parseFloat(item.c2h6_ave));
+  const c3h8AveValues = data.map((item: any) => parseFloat(item.c3h8_ave));
   const ch4AveBqValues = data.map((item: any) => parseFloat(item.ch4_ave_bq));
   const o2AveBqValues = data.map((item: any) => parseFloat(item.o2_ave_bq));
 
@@ -203,6 +206,64 @@ function updateChart(data: any) {
             type: 'bar',
           },
         ];
+      case 'sdmtjtBdmk':
+        return [
+          {
+            name: 'O₂平均值',
+            data: o2AveValues,
+            yAxisIndex: 0,
+            type: 'bar',
+          },
+          {
+            name: 'N₂平均值',
+            data: n2AveValues,
+            yAxisIndex: 0,
+            type: 'bar',
+          },
+
+          {
+            name: 'CO平均值',
+            data: coAveValues,
+            yAxisIndex: 1,
+            type: 'bar',
+          },
+          {
+            name: 'CO₂平均值',
+            data: co2AveValues,
+            yAxisIndex: 1,
+            type: 'bar',
+          },
+          {
+            name: 'CH₄平均值',
+            data: ch4AveValues,
+            yAxisIndex: 1,
+            type: 'bar',
+          },
+          {
+            name: 'C2H6平均值',
+            data: c2h6AveValues,
+            yAxisIndex: 1,
+            type: 'bar',
+          },
+          {
+            name: 'C3H8平均值',
+            data: c3h8AveValues,
+            yAxisIndex: 1,
+            type: 'bar',
+          },
+          {
+            name: 'C₂H₄平均值',
+            data: c2h4AveValues,
+            type: 'bar',
+            yAxisIndex: 1,
+          },
+          {
+            name: 'C₂H₂平均值',
+            data: c2h2AveValues,
+            type: 'bar',
+            yAxisIndex: 1,
+          },
+        ];
       default:
         return [
           {
@@ -259,14 +320,6 @@ function updateChart(data: any) {
 
   const seriesConfig = getSeriesConfig(sysOrgCode);
   const option = {
-    title: {
-      text: '色谱仪报表分析',
-      textStyle: {
-        color: '#ffffff', // 设置标题颜色
-      },
-      left: 'center', // 水平居中
-      top: '0', // 设置标题距离顶部的距离
-    },
     tooltip: {
       trigger: 'axis',
       backgroundColor: 'rgba(28, 72, 105, 0.5)', // 设置 tooltip 背景为透明
@@ -281,7 +334,7 @@ function updateChart(data: any) {
       },
     },
     legend: {
-      top: '9%',
+      top: '5%',
       textStyle: {
         color: '#ffffffff',
       },

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

@@ -20,7 +20,7 @@ enum Api {
   warningLogList = '/safety/managesysAlarmInfo/list',
   warningLogAdd = '/safety/managesysAlarmInfo/add',
   warningLogEdit = '/safety/managesysAlarmInfo/edit',
-  warningLogDeleteById = '/safety/managesysAlarmInfo/delete',
+  warningLogDeleteById = '/safety/managesysAlarmInfo/delete/',
 
   workFaceWarningList = '/safety/managesysAlarm/list',
   workFaceWarningAdd = '/safety/managesysAlarm/add',

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

@@ -2,7 +2,7 @@ import * as THREE from 'three';
 import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
 import gsap from 'gsap';
 
-class singleWindow {
+class ddFc_5 {
   model;
   modelName = 'ddFc';
   group: THREE.Object3D = new THREE.Object3D();
@@ -341,7 +341,7 @@ class singleWindow {
       // (stainlesssteel_blue as THREE.MeshStandardMaterial).roughness = 0.45;
     }
   }
-  mountedThree(playerDom) {
+  mountedThree() {
     return new Promise((resolve) => {
       this.model.setGLTFModel('ddFc').then((gltf) => {
         const fcModal = gltf[0];
@@ -363,4 +363,4 @@ class singleWindow {
     this.group = null;
   }
 }
-export default singleWindow;
+export default ddFc_5;

+ 255 - 0
src/views/vent/monitorManager/windowMonitor/dandaoFcBd1.threejs.ts

@@ -0,0 +1,255 @@
+import * as THREE from 'three';
+
+import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
+import gsap from 'gsap';
+
+class ddFc_4 {
+  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_1')?.getObjectByName('FengChuang_1_1');
+    if (fcGroup) {
+      const sy1 = fcGroup.getObjectByName('FengChuang_1_2') as THREE.Mesh;
+      const sy2 = fcGroup.getObjectByName('FengChuang_1_3') as THREE.Mesh;
+      sy1.rotateOnAxis(new THREE.Vector3(0, 0, 1), 0);
+      sy2.rotateOnAxis(new THREE.Vector3(0, 0, 1), 0);
+      meshArr01.push(sy1);
+      meshArr01.push(sy2);
+    }
+
+    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, {
+          z: 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, {
+          z: THREE.MathUtils.degToRad(90),
+          overwrite: true,
+        });
+      });
+    }
+  }
+
+  /* 点击风窗,风窗全屏 */
+  mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
+    if (this.animationTimer) {
+      clearTimeout(this.animationTimer);
+      this.animationTimer = null;
+    }
+    // 判断是否点击到视频
+    intersects.find((intersect) => {
+      const mesh = intersect.object;
+      if (mesh.name === 'player1') {
+        if (new Date().getTime() - this.playerStartClickTime1 < 400) {
+          // 双击,视频放大
+          if (this.player1) {
+            this.player1.requestFullscreen();
+          }
+        }
+        this.playerStartClickTime1 = new Date().getTime();
+        return true;
+      }
+      return false;
+    });
+  }
+
+  mouseUpModel() {}
+
+  /* 风门动画 */
+  render() {
+    if (!this.model) {
+      return;
+    }
+  }
+
+  mountedThree() {
+    return new Promise((resolve) => {
+      this.model.setGLTFModel('ddFc-bd1').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_4;

+ 266 - 0
src/views/vent/monitorManager/windowMonitor/dandaoFcBd2.threejs.ts

@@ -0,0 +1,266 @@
+import * as THREE from 'three';
+
+import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
+import gsap from 'gsap';
+
+class ddFc_2 {
+  model;
+  modelName = 'ddFcGroup';
+  group: THREE.Object3D = new THREE.Object3D();
+  animationTimer;
+  isLRAnimation = true;
+  direction = 1;
+  windowsActionArr = {
+    frontWindow: [],
+    backWindow: [],
+  };
+  player1;
+  player2;
+  playerStartClickTime1 = new Date().getTime();
+  constructor(model) {
+    this.model = model;
+    this.group.name = 'ddFcGroup';
+  }
+  addLight = () => {
+    if (!this.group || !this.group) return;
+
+    const directionalLight = new THREE.DirectionalLight(0xffffff, 2);
+    directionalLight.position.set(-437, 61, 559);
+    this.group.add(directionalLight);
+
+    const pointLight2 = new THREE.PointLight(0xffffff, 1, 150);
+    pointLight2.position.set(-101, 34, 16);
+    pointLight2.shadow.bias = 0.05;
+    this.group.add(pointLight2);
+
+    const pointLight3 = new THREE.PointLight(0xffffff, 1, 150);
+    pointLight3.position.set(19, 25, -7);
+    pointLight3.shadow.bias = 0.05;
+    this.group.add(pointLight3);
+
+    const pointLight6 = new THREE.PointLight(0xffffff, 1, 300);
+    pointLight6.position.set(51, 51, 9);
+    pointLight6.shadow.bias = 0.05;
+    this.group.add(pointLight6);
+  };
+
+  // 设置模型位置
+  setModalPosition() {
+    this.group?.scale.set(22, 22, 22);
+    this.group?.position.set(-35, 25, 15);
+  }
+
+  addMonitorText(selectData) {
+    if (!this.group) {
+      return;
+    }
+    const screenDownText = VENT_PARAM['modalText']
+      ? VENT_PARAM['modalText']
+      : History_Type['type'] == 'remote'
+      ? `国能神东煤炭集团监制`
+      : '煤炭科学技术研究院有限公司研制';
+
+    const screenDownTextX = 90 - (screenDownText.length - 10) * 6;
+    const textArr = [
+      {
+        text: `远程定量调节自动风窗`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 100,
+        y: 95,
+      },
+      {
+        text: `${selectData.OpenDegree ? '开度值(°)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 145,
+      },
+      {
+        text: selectData.OpenDegree
+          ? Number(`${selectData.OpenDegree}`).toFixed(2)
+          : selectData.forntArea
+          ? Number(`${selectData.forntArea}`).toFixed(2)
+          : '-',
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 145,
+      },
+      {
+        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态:'}:`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 200,
+      },
+      {
+        text: `${
+          selectData.frontRearDP
+            ? selectData.frontRearDP
+            : selectData.windSpeed
+            ? selectData.windSpeed
+            : selectData.netStatus == '0'
+            ? '断开'
+            : '连接'
+        }`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 200,
+      },
+      {
+        text: `${selectData.fWindowM3 ? '过风量(m³/min)' : '风窗道数'}: `,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 250,
+      },
+      {
+        text: `${selectData.fWindowM3 ? selectData.fWindowM3 : selectData.nwindownum}`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 250,
+      },
+      {
+        text: screenDownText,
+        font: 'normal 28px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: screenDownTextX,
+        y: 300,
+      },
+    ];
+    getTextCanvas(750, 546, textArr, '').then((canvas: HTMLCanvasElement) => {
+      const textMap = new THREE.CanvasTexture(canvas); // 关键一步
+      const textMaterial = new THREE.MeshBasicMaterial({
+        // 关于材质并未讲解 实操即可熟悉                 这里是漫反射类似纸张的材质,对应的就有高光类似金属的材质.
+        map: textMap, // 设置纹理贴图
+        transparent: true,
+        side: THREE.DoubleSide, // 这里是双面渲染的意思
+      });
+      textMap.dispose();
+      textMaterial.blending = THREE.CustomBlending;
+      const monitorPlane = this.group?.getObjectByName('monitorText');
+      if (monitorPlane) {
+        monitorPlane.material = textMaterial;
+      } else {
+        const planeGeometry = new THREE.PlaneGeometry(526, 346); // 平面3维几何体PlaneGeometry
+        const planeMesh = new THREE.Mesh(planeGeometry, textMaterial);
+        planeMesh.name = 'monitorText';
+        planeMesh.scale.set(0.003, 0.0034, 0.004);
+        planeMesh.position.set(4.25, 0.44, -0.27);
+        this.group?.add(planeMesh);
+      }
+    });
+  }
+
+  /* 提取风门序列帧,初始化前后门动画 */
+  initAnimation() {
+    const meshArr01: THREE.Object3D[] = [];
+    const meshArr02: THREE.Object3D[] = [];
+    const fcGroup = this.group?.getObjectByName('FengChuang_BaoDe_2')?.getObjectByName('FengChuang_1_17')?.getObjectByName('FengChuang_1_13');
+    if (fcGroup) {
+      const frontObjNames = ['FengChuang_1_3', 'FengChuang_1_2', 'FengChuang_1_18'];
+      const backObjNames = ['FengChuang_1_20', 'FengChuang_1_21', 'FengChuang_1_22'];
+      debugger;
+      frontObjNames.filter((name) => {
+        const obj = fcGroup?.getObjectByName(name);
+        if (obj) {
+          obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 0);
+          meshArr01.push(obj);
+        }
+      });
+      backObjNames.filter((name) => {
+        const obj = fcGroup?.getObjectByName(name);
+        if (obj) {
+          obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 0);
+          meshArr02.push(obj);
+        }
+      });
+      this.windowsActionArr.frontWindow = [...meshArr01, ...meshArr02];
+      this.windowsActionArr.backWindow = meshArr02;
+    }
+  }
+
+  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.y),
+          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-bd2'], this.group).then(() => {
+        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_2;

+ 2 - 2
src/views/vent/monitorManager/windowMonitor/dandaoFcYjl.threejs.ts

@@ -3,7 +3,7 @@ import * as THREE from 'three';
 import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
 import gsap from 'gsap';
 
-class singleWindowYjl {
+class ddFc_1 {
   model;
   modelName = 'ddFcGroup';
   group: THREE.Object3D = new THREE.Object3D();
@@ -238,4 +238,4 @@ class singleWindowYjl {
     this.group = null;
   }
 }
-export default singleWindowYjl;
+export default ddFc_1;

+ 8 - 10
src/views/vent/monitorManager/windowMonitor/index.vue

@@ -33,11 +33,11 @@
           <!-- <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(3)">自主联动控制开启</div>
           <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea(4)">自主联动控制停止</div> -->
         </div>
-        <div class="row" v-if="hasPermission('window:fourAreaControl')">
-          <div class="button-box" @click="setControl('frontSetValue1', '前窗1开度设置')">前窗1面积</div>
-          <div class="button-box" @click="setControl('frontSetValue2', '前窗2开度设置')">前窗2面积</div>
-          <div class="button-box" @click="setControl('frontSetValue3', '后窗1开度设置')">后窗1面积</div>
-          <div class="button-box" @click="setControl('frontSetValue4', '后窗2开度设置')">后窗2面积</div>
+        <div class="row" v-if="hasPermission('window:fourAreaControl') && selectData.windowModal == 'sdFc4'">
+          <div class="button-box" @click="setControl('frontSetValue1', '前窗1面积设置')">前窗1面积</div>
+          <div class="button-box" @click="setControl('frontSetValue2', '前窗2面积设置')">前窗2面积</div>
+          <div class="button-box" @click="setControl('frontSetValue3', '后窗1面积设置')">后窗1面积</div>
+          <div class="button-box" @click="setControl('frontSetValue4', '后窗2面积设置')">后窗2面积</div>
         </div>
         <div class="row" v-if="Number(selectData.nwindownum) == 1">
           <div v-if="hasPermission('window:AreaControl')" class="button-box" @click="setArea(1)">设定风窗面积</div>
@@ -357,8 +357,8 @@
     const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
     Object.assign(selectData, initData, selectRow, baseData);
 
-    // const type = selectData.nwindownum == 1 ? 'singleXkWindow' : 'doubleWindow';
-    const type = selectData.nwindownum == 1 ? 'singleWindow' : 'doubleWindow';
+    const type = selectData.windowModal ? selectData.windowModal : selectData.nwindownum == 1 ? 'ddFc5' : 'sdFc1';
+
     setModelType(type).then(() => {
       addMonitorText(selectData);
       playAnimation(selectRow, selectData.maxarea, true);
@@ -557,9 +557,7 @@
     const { query } = unref(currentRoute);
     if (query['deviceType']) deviceType.value = query['deviceType'] as string;
     loading.value = true;
-    const playerDom = document.getElementById('fc-player1')?.getElementsByClassName('vjs-tech')[0];
-    mountedThree(playerDom).then(async () => {
-      // await setModelType('singleWindow');
+    mountedThree().then(async () => {
       getMonitor(true);
       loading.value = false;
       addMonitorText(selectData);

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

@@ -2,7 +2,7 @@ import * as THREE from 'three';
 import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
 import gsap from 'gsap';
 
-class doubleWindow {
+class sdFc_1 {
   model;
   modelName = 'sdFc';
   group: THREE.Object3D = new THREE.Object3D();
@@ -244,7 +244,7 @@ class doubleWindow {
       });
     }
   }
-  mountedThree(playerDom) {
+  mountedThree() {
     return new Promise((resolve) => {
       this.model.setGLTFModel(['sdFc'], this.group).then(() => {
         this.setModalPosition();
@@ -265,4 +265,4 @@ class doubleWindow {
   }
 }
 
-export default doubleWindow;
+export default sdFc_1;

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

@@ -2,7 +2,7 @@ import * as THREE from 'three';
 import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
 import gsap from 'gsap';
 
-class doubleWindow {
+class sdFc_3 {
   model;
   modelName = 'sdFc';
   group: THREE.Object3D = new THREE.Object3D();
@@ -244,7 +244,7 @@ class doubleWindow {
     }
   }
 
-  mountedThree(playerDom) {
+  mountedThree() {
     return new Promise((resolve) => {
       this.model.setGLTFModel('sdFc-dm').then((gltf) => {
         const fcModal = gltf[0];
@@ -265,4 +265,4 @@ class doubleWindow {
     this.group = null;
   }
 }
-export default doubleWindow;
+export default sdFc_3;

+ 70 - 128
src/views/vent/monitorManager/windowMonitor/shuangdaoFcHj.threejs.ts

@@ -2,25 +2,18 @@ import * as THREE from 'three';
 import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
 import gsap from 'gsap';
 
-class doubleWindow {
+class sdFc_4 {
   model;
   modelName = 'sdFc';
   group: THREE.Object3D = new THREE.Object3D();
   animationTimer;
   direction = 1;
-  fontMixers1: THREE.AnimationMixer | null = null;
-  fontMixers2: THREE.AnimationMixer | null = null;
-  backMixers1: THREE.AnimationMixer | null = null;
-  backMixers2: THREE.AnimationMixer | null = null;
-  frontClipWindow1: THREE.AnimationClip | null = null;
-  frontClipWindow2: THREE.AnimationClip | null = null;
-  backClipWindow1: THREE.AnimationClip | null = null;
-  backClipWindow2: THREE.AnimationClip | null = null;
+
   windowsActionArr = {
-    frontWindow1: <THREE.AnimationAction | null>null,
-    frontWindow2: <THREE.AnimationAction | null>null,
-    backWindow1: <THREE.AnimationAction | null>null,
-    backWindow2: <THREE.AnimationAction | null>null,
+    frontWindow1: <THREE.Mesh[]>[],
+    frontWindow2: <THREE.Mesh[]>[],
+    backWindow1: <THREE.Mesh[]>[],
+    backWindow2: <THREE.Mesh[]>[],
   };
   constructor(model) {
     this.model = model;
@@ -63,7 +56,7 @@ class doubleWindow {
         y: 90,
       },
       {
-        text: `${selectData.OpenDegree1 ? '前窗开度值(°)' : selectData.forntArea ? '前窗过风面积(㎡)' : '前窗过风面积(㎡)'}:`,
+        text: `${selectData.OpenDegree1 ? '前窗开度值(°)' : selectData.frontArea ? '前窗过风面积(㎡)' : '前窗过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -73,8 +66,8 @@ class doubleWindow {
       {
         text: selectData.OpenDegree1
           ? Number(`${selectData.OpenDegree1}`).toFixed(2)
-          : selectData.forntArea
-          ? Number(`${selectData.forntArea}`).toFixed(2)
+          : selectData.frontArea
+          ? Number(`${selectData.frontArea}`).toFixed(2)
           : '-',
         font: 'normal 30px Arial',
         color: '#009900',
@@ -83,7 +76,7 @@ class doubleWindow {
         y: 145,
       },
       {
-        text: `${selectData.OpenDegree2 ? '后窗开度值(°)' : selectData.forntArea ? '后窗过风面积(㎡)' : '后窗过风面积(㎡)'}:`,
+        text: `${selectData.OpenDegree2 ? '后窗开度值(°)' : selectData.rearArea ? '后窗过风面积(㎡)' : '后窗过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -164,62 +157,32 @@ class doubleWindow {
   initAnimation() {
     const fcGroup = this.group?.getObjectByName('ShuangDaoTiaoJieFengChuang_1');
     if (fcGroup) {
-      const tracks = fcGroup.animations[0].tracks;
-      const fontTracks1: any[] = [],
-        fontTracks2: any[] = [],
-        backTracks1: any[] = [],
-        backTracks2: any[] = [];
-      for (let i = 0; i < tracks.length; i++) {
-        const track = tracks[i];
-        if (track.name.startsWith('juan_1')) {
-          fontTracks1.push(track);
-        } else if (track.name.startsWith('juan_2')) {
-          fontTracks2.push(track);
-        } else if (track.name.startsWith('juan_3')) {
-          backTracks1.push(track);
-        } else if (track.name.startsWith('juan_4')) {
-          backTracks2.push(track);
-        }
-      }
-      const fontGroup1 = fcGroup.getObjectByName('FengChuang_1')?.getObjectByName('ske_1');
-      const fontGroup2 = fcGroup.getObjectByName('FengChuang_1')?.getObjectByName('ske_2');
-      const backGroup1 = fcGroup.getObjectByName('FengChuang_2')?.getObjectByName('ske_3');
-      const backGroup2 = fcGroup.getObjectByName('FengChuang_2')?.getObjectByName('ske_4');
-      if (fontGroup1 && fontGroup2 && backGroup1 && backGroup2) {
-        this.fontMixers1 = new THREE.AnimationMixer(fontGroup1);
-        this.fontMixers2 = new THREE.AnimationMixer(fontGroup1);
-        this.backMixers1 = new THREE.AnimationMixer(backGroup1);
-        this.backMixers2 = new THREE.AnimationMixer(backGroup2);
-
-        this.frontClipWindow1 = new THREE.AnimationClip('frontWindow1', 22, fontTracks1);
-        const frontClipAction1 = this.fontMixers1.clipAction(this.frontClipWindow1, fontGroup1);
-        frontClipAction1.clampWhenFinished = true;
-        frontClipAction1.loop = THREE.LoopOnce;
-        this.windowsActionArr.frontWindow1 = frontClipAction1;
-
-        this.frontClipWindow2 = new THREE.AnimationClip('frontWindow2', 22, fontTracks2);
-        const frontClipAction2 = this.fontMixers2.clipAction(this.frontClipWindow2, fontGroup2);
-        frontClipAction2.clampWhenFinished = true;
-        frontClipAction2.loop = THREE.LoopOnce;
-        this.windowsActionArr.frontWindow1 = frontClipAction2;
-
-        this.backClipWindow1 = new THREE.AnimationClip('backWindow1', 22, backTracks1);
-        const backClipAction1 = this.backMixers1.clipAction(this.backClipWindow1, backGroup1);
-        backClipAction1.clampWhenFinished = true;
-        backClipAction1.loop = THREE.LoopOnce;
-        this.windowsActionArr.backWindow1 = backClipAction1;
-
-        this.backClipWindow2 = new THREE.AnimationClip('backWindow1', 22, backTracks2);
-        const backClipAction2 = this.backMixers2.clipAction(this.backClipWindow2, backGroup2);
-        backClipAction2.clampWhenFinished = true;
-        backClipAction2.loop = THREE.LoopOnce;
-        this.windowsActionArr.backWindow1 = backClipAction2;
-      }
+      const fontGroup = fcGroup.getObjectByName('FengChuang_1');
+      const backGroup = fcGroup.getObjectByName('FengChuang_2');
+      const JuanLian1 = fontGroup?.getObjectByName('JuanLian_1') as THREE.Mesh;
+      JuanLian1.scale.set(1, -1, 1);
+      JuanLian1.position.setY(0.9);
+      const JuanLian2 = fontGroup?.getObjectByName('JuanLian_2') as THREE.Mesh;
+      JuanLian2.scale.set(1, -1, 1);
+      JuanLian2.position.setY(0.9);
+      const JuanLian3 = backGroup?.getObjectByName('JuanLian_4') as THREE.Mesh;
+      JuanLian3.scale.set(1, -1, 1);
+      JuanLian3.position.setY(0.9);
+      const JuanLian4 = backGroup?.getObjectByName('JuanLian_3') as THREE.Mesh;
+      JuanLian4.scale.set(1, -1, 1);
+      JuanLian4.position.setY(0.9);
+      const meshArr01: THREE.Mesh[] = [JuanLian1];
+      const meshArr02: THREE.Mesh[] = [JuanLian2];
+      const meshArr03: THREE.Mesh[] = [JuanLian3];
+      const meshArr04: THREE.Mesh[] = [JuanLian4];
+      this.windowsActionArr.frontWindow1 = meshArr01;
+      this.windowsActionArr.frontWindow2 = meshArr02;
+      this.windowsActionArr.backWindow1 = meshArr03;
+      this.windowsActionArr.backWindow2 = meshArr04;
     }
   }
 
-  play(handlerState, timeScale = 0.01) {
-    let handler = () => {};
+  play(handlerState, rotationParam) {
     if (
       this.windowsActionArr.frontWindow1 &&
       this.windowsActionArr.frontWindow2 &&
@@ -228,57 +191,43 @@ class doubleWindow {
     ) {
       switch (handlerState) {
         case 1: // 窗1开启动画
-          handler = () => {
-            const frontWindow1 = this.windowsActionArr.frontWindow1;
-            if (frontWindow1 && this.frontClipWindow1) {
-              frontWindow1.paused = true;
-              frontWindow1.reset();
-              this.frontClipWindow1.duration = 0;
-              frontWindow1.time = 1.8;
-              frontWindow1.timeScale = timeScale;
-              frontWindow1.play();
-            }
-          };
+          this.windowsActionArr.frontWindow1.forEach((mesh) => {
+            gsap.to(mesh.scale, {
+              y: -1 + rotationParam.scaleY,
+              duration: 10 * Math.abs(-1 + rotationParam.scaleY - mesh.scale.y),
+              overwrite: true,
+            });
+          });
           break;
         case 2: // 窗2开启动画
-          handler = () => {
-            const frontWindow2 = this.windowsActionArr.frontWindow2;
-            if (frontWindow2) {
-              frontWindow2.paused = true;
-              frontWindow2.reset();
-              frontWindow2.time = 4;
-              frontWindow2.timeScale = -timeScale;
-              frontWindow2.play();
-            }
-          };
+          this.windowsActionArr.frontWindow2.forEach((mesh) => {
+            gsap.to(mesh.scale, {
+              y: -1 + rotationParam.scaleY,
+              duration: 10 * Math.abs(-1 + rotationParam.scaleY - mesh.scale.y),
+              overwrite: true,
+            });
+          });
           break;
         case 3: // 窗3开启动画
-          handler = () => {
-            const backWindow1 = this.windowsActionArr.backWindow1;
-            if (backWindow1) {
-              backWindow1.paused = true;
-              backWindow1.reset();
-              backWindow1.time = 1.2;
-              backWindow1.timeScale = timeScale;
-              backWindow1.play();
-            }
-          };
+          this.windowsActionArr.backWindow1.forEach((mesh) => {
+            gsap.to(mesh.scale, {
+              y: -1 + rotationParam.scaleY,
+              duration: 10 * Math.abs(-1 + rotationParam.scaleY - mesh.scale.y),
+              overwrite: true,
+            });
+          });
           break;
         case 4: // 窗4开启动画
-          handler = () => {
-            const backWindow2 = this.windowsActionArr.backWindow2;
-            if (backWindow2) {
-              backWindow2.paused = true;
-              backWindow2.reset();
-              backWindow2.time = 4;
-              backWindow2.timeScale = -timeScale;
-              backWindow2.play();
-            }
-          };
+          this.windowsActionArr.backWindow2.forEach((mesh) => {
+            gsap.to(mesh.scale, {
+              y: -1 + rotationParam.scaleY,
+              duration: 10 * Math.abs(-1 + rotationParam.scaleY - mesh.scale.y),
+              overwrite: true,
+            });
+          });
           break;
         default:
       }
-      handler();
     }
   }
 
@@ -291,16 +240,7 @@ class doubleWindow {
     // 判断是否点击到视频
     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;
     });
   }
@@ -312,15 +252,17 @@ class doubleWindow {
     if (!this.model) {
       return;
     }
+    if (this.fontMixers1 && this.frontClock1.running) {
+      this.fontMixers1.update(2);
+    }
   }
 
-  mountedThree(playerDom) {
+  mountedThree() {
     return new Promise((resolve) => {
       this.model.setGLTFModel('sdFc-jz').then((gltf) => {
-        console.log('gltf', gltf);
-        const fcModal = gltf[0];
-        fcModal.name = 'sdFc';
-        this.group?.add(fcModal);
+        // this.group?.add(gltf[0]);
+        this.group = gltf[0];
+        this.group.name = 'sdFc';
         this.setModalPosition();
         this.initAnimation();
         this.addLight();
@@ -336,4 +278,4 @@ class doubleWindow {
     this.group = null;
   }
 }
-export default doubleWindow;
+export default sdFc_4;

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

@@ -2,7 +2,7 @@ import * as THREE from 'three';
 import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
 import gsap from 'gsap';
 
-class doubleWindow {
+class sdFc_2 {
   model;
   modelName = 'sdFc';
   group: THREE.Object3D = new THREE.Object3D();
@@ -265,7 +265,7 @@ class doubleWindow {
     }
   }
 
-  mountedThree(playerDom) {
+  mountedThree() {
     return new Promise((resolve) => {
       this.model.setGLTFModel('ddFc-sw').then((gltf) => {
         const fcModal = gltf[0];
@@ -286,4 +286,4 @@ class doubleWindow {
     this.group = null;
   }
 }
-export default doubleWindow;
+export default sdFc_2;

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

@@ -2,7 +2,7 @@ import * as THREE from 'three';
 import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
 import gsap from 'gsap';
 
-class doubleWindowYjl {
+class ddFc_2 {
   model;
   modelName = 'sdFc';
   group: THREE.Object3D = new THREE.Object3D();
@@ -358,7 +358,7 @@ class doubleWindowYjl {
   //   }
   // }
 
-  mountedThree(playerDom) {
+  mountedThree() {
     return new Promise((resolve) => {
       this.model.setGLTFModel(['sdFc-yjl'], this.group).then(() => {
         console.log(this.group);
@@ -378,4 +378,4 @@ class doubleWindowYjl {
   }
 }
 
-export default doubleWindowYjl;
+export default ddFc_2;

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

@@ -1,11 +1,18 @@
 import * as THREE from 'three';
 import UseThree from '../../../../utils/threejs/useThree';
-import singleWindow from './dandaoFc.threejs';
-import doubleWindow from './shuangdaoFc.threejs';
+import ddFc_5 from './dandaoFc.threejs'; // ddFc_5  单道-大窗2列扇叶
 import singleWindowXk from './dandaoFcXk.threejs';
+import ddFc_1 from './dandaoFcYjl.threejs'; // ddFc_1  单道_小窗两列扇叶
+import sdFc_1 from './shuangdaoFc.threejs'; //  sdFc_1 双道-带小门
+import sdFc_3 from './shuangdaoFcBlt.threejs'; // sdFc_3 双道-带小门-小窗
+import sdFc_4 from './shuangdaoFcHj.threejs'; // sdFc_4 双道-带门-卷闸
+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 { animateCamera } from '/@/utils/threejs/util';
 import useEvent from '../../../../utils/threejs/useEvent';
-import { useGlobSetting } from '/@/hooks/setting';
+import { getDictItemsByCode } from '/@/utils/dict';
 
 // import * as dat from 'dat.gui';
 // const gui = new dat.GUI();
@@ -13,11 +20,18 @@ import { useGlobSetting } from '/@/hooks/setting';
 
 // 模型对象、 文字对象
 let model: UseThree,
-  singleWindowObj,
-  doubleWindowObj: doubleWindow,
+  ddFc5: ddFc_5,
+  ddFc1: ddFc_1,
+  sdFc1: sdFc_1,
+  sdFc3: sdFc_3,
+  sdFc4: sdFc_4,
+  sdFc2: sdFc_2,
+  sdFc5: sdFc_5,
+  ddFc2: ddFc_2,
+  ddFc4: ddFc_4,
   singleWindowXkObj: singleWindowXk,
   group: THREE.Object3D,
-  windowType = 'singleWindow';
+  windowType = 'ddFc1';
 
 const rotationParam = {
   frontDeg0: 0, // 前门初始
@@ -27,30 +41,6 @@ const rotationParam = {
 };
 
 const { mouseDownFn } = useEvent();
-// 打灯光
-const addLight = () => {
-  if (!model || !model.scene) return;
-
-  const directionalLight = new THREE.DirectionalLight(0xffffff, 1);
-  directionalLight.position.set(-110, 150, 647);
-  model.scene?.add(directionalLight);
-  // directionalLight.target = group;
-
-  const pointLight2 = new THREE.PointLight(0xffffff, 1, 150);
-  pointLight2.position.set(-101, 34, 16);
-  pointLight2.shadow.bias = 0.05;
-  model.scene.add(pointLight2);
-
-  const pointLight3 = new THREE.PointLight(0xffffff, 1, 150);
-  pointLight3.position.set(19, 25, -7);
-  pointLight3.shadow.bias = 0.05;
-  model.scene.add(pointLight3);
-
-  const pointLight6 = new THREE.PointLight(0xffffff, 1, 300);
-  pointLight6.position.set(51, 51, 9);
-  pointLight6.shadow.bias = 0.05;
-  model.scene.add(pointLight6);
-};
 
 // 初始化左右摇摆动画
 const startAnimation = () => {
@@ -59,10 +49,24 @@ const startAnimation = () => {
   model.canvasContainer?.addEventListener('pointerup', (event) => {
     event.stopPropagation();
     // 单道、 双道
-    if (windowType === 'doubleWindow' && doubleWindowObj) {
-      doubleWindowObj.mouseUpModel.call(doubleWindowObj);
-    } else if (windowType === 'singleWindow' && singleWindowObj) {
-      singleWindowObj.mouseUpModel.call(singleWindowObj);
+    if (windowType === 'ddFc5' && ddFc5) {
+      ddFc5.mouseUpModel.call(ddFc5);
+    } else if (windowType === 'ddFc1' && ddFc1) {
+      ddFc1.mouseUpModel.call(ddFc1);
+    } else if (windowType === 'ddFc2' && ddFc2) {
+      ddFc2.mouseUpModel.call(ddFc2);
+    } else if (windowType === 'ddFc4' && ddFc4) {
+      ddFc4.mouseUpModel.call(ddFc4);
+    } else if (windowType === 'sdFc1' && sdFc1) {
+      sdFc1.mouseUpModel.call(sdFc1);
+    } else if (windowType === 'sdFc3' && sdFc3) {
+      sdFc3.mouseUpModel.call(sdFc3);
+    } else if (windowType === 'sdFc4' && sdFc4) {
+      sdFc4.mouseUpModel.call(sdFc4);
+    } else if (windowType === 'sdFc2' && sdFc2) {
+      sdFc2.mouseUpModel.call(sdFc2);
+    } else if (windowType === 'sdFc5' && sdFc5) {
+      sdFc5.mouseUpModel.call(sdFc5);
     } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
       singleWindowXkObj.mouseUpModel.call(singleWindowXkObj);
     }
@@ -73,10 +77,24 @@ const startAnimation = () => {
 const mouseEvent = (event) => {
   if (event.button == 0) {
     mouseDownFn(model, group, event, (intersects) => {
-      if (windowType === 'doubleWindow' && doubleWindowObj) {
-        doubleWindowObj.mousedownModel.call(doubleWindowObj, intersects);
-      } else if (windowType === 'singleWindow' && singleWindowObj) {
-        singleWindowObj.mousedownModel.call(singleWindowObj, intersects);
+      if (windowType === 'ddFc5' && ddFc5) {
+        ddFc5.mousedownModel.call(ddFc5, intersects);
+      } else if (windowType === 'ddFc1' && ddFc1) {
+        ddFc1.mousedownModel.call(ddFc1, intersects);
+      } else if (windowType === 'ddFc2' && ddFc2) {
+        ddFc2.mousedownModel.call(ddFc2, intersects);
+      } else if (windowType === 'ddFc4' && ddFc4) {
+        ddFc4.mousedownModel.call(ddFc4, intersects);
+      } else if (windowType === 'sdFc1' && sdFc1) {
+        sdFc1.mousedownModel.call(sdFc1, intersects);
+      } else if (windowType === 'sdFc3' && sdFc3) {
+        sdFc3.mousedownModel.call(sdFc3, intersects);
+      } else if (windowType === 'sdFc4' && sdFc4) {
+        sdFc4.mousedownModel.call(sdFc4, intersects);
+      } else if (windowType === 'sdFc2' && sdFc2) {
+        sdFc2.mousedownModel.call(sdFc2, intersects);
+      } else if (windowType === 'sdFc5' && sdFc5) {
+        sdFc5.mousedownModel.call(sdFc5, intersects);
       } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
         singleWindowXkObj.mousedownModel.call(singleWindowXkObj, intersects);
       }
@@ -86,17 +104,49 @@ const mouseEvent = (event) => {
 };
 
 export const addMonitorText = (selectData) => {
-  if (windowType === 'doubleWindow' && doubleWindowObj) {
-    return doubleWindowObj.addMonitorText.call(doubleWindowObj, selectData);
-  } else if (windowType === 'singleWindow' && singleWindowObj) {
-    return singleWindowObj.addMonitorText.call(singleWindowObj, selectData);
+  if (windowType === 'ddFc5' && ddFc5) {
+    return ddFc5.addMonitorText.call(ddFc5, selectData);
+  } else if (windowType === 'ddFc1' && ddFc1) {
+    return ddFc1.addMonitorText.call(ddFc1, selectData);
+  } else if (windowType === 'ddFc2' && ddFc2) {
+    return ddFc2.addMonitorText.call(ddFc2, selectData);
+  } else if (windowType === 'ddFc4' && ddFc4) {
+    return ddFc4.addMonitorText.call(ddFc4, selectData);
+  } else if (windowType === 'sdFc1' && sdFc1) {
+    return sdFc1.addMonitorText.call(sdFc1, selectData);
+  } else if (windowType === 'sdFc3' && sdFc3) {
+    return sdFc3.addMonitorText.call(sdFc3, selectData);
+  } else if (windowType === 'sdFc4' && sdFc4) {
+    return sdFc4.addMonitorText.call(sdFc4, selectData);
+  } else if (windowType === 'sdFc2' && sdFc2) {
+    return sdFc2.addMonitorText.call(sdFc2, selectData);
+  } else if (windowType === 'sdFc5' && sdFc5) {
+    return sdFc5.addMonitorText.call(sdFc5, selectData);
   } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
     return singleWindowXkObj.addMonitorText.call(singleWindowXkObj, selectData);
   }
 };
 
 export function computePlay(data, maxarea, isFirst = false) {
-  if (windowType === 'doubleWindow' || windowType === 'singleWindow') {
+  const isJz = data.windowModal == 'sdFc4';
+  if (windowType === 'singleXkWindow') {
+    const acosToAngle = (cosValue) => {
+      cosValue = Math.max(Math.min(cosValue, 1), -1);
+      // 计算角度
+      return Math.asin(cosValue) * (180 / Math.PI);
+    };
+    const sina = Math.sqrt((Math.sin((78 * Math.PI) / 180) ** 2 * parseFloat(data.forntArea)) / parseFloat(maxarea));
+    const angleInRadians = acosToAngle(sina);
+    rotationParam.frontDeg1 = angleInRadians;
+    if (!rotationParam.frontDeg1 && !rotationParam.backDeg1) {
+      // 当返回值有误时默认关闭
+      play(rotationParam, 0);
+    } else {
+      setTimeout(() => {
+        play(rotationParam, 1);
+      }, 0);
+    }
+  } else {
     if (data.OpenDegree || data.OpenDegree1 || data.OpenDegree2) {
       maxarea = 180;
       if (data.OpenDegree) {
@@ -112,53 +162,64 @@ export function computePlay(data, maxarea, isFirst = false) {
         rotationParam.backDeg1 = (180 / maxarea) * Number(data.OpenDegree2) || 0;
       }
     } else {
-      if (!maxarea) maxarea = 90;
-      rotationParam.frontDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.forntArea);
-      rotationParam.backDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.rearArea);
-      rotationParam.frontDeg1 = (90 / maxarea) * Number(data.forntArea) || 0;
-      rotationParam.backDeg1 = (90 / maxarea) * Number(data.rearArea) || 0;
-    }
-
-    if (!rotationParam.frontDeg1 && !rotationParam.backDeg1) {
-      // 当返回值有误时默认关闭
-      play(rotationParam, 0);
-    } else {
-      if (data.nwindownum == 1 || data.nwindownum == 2) {
-        setTimeout(() => {
-          play(rotationParam, 1);
-        }, 0);
-      }
-      if (data.nwindownum == 2) {
-        setTimeout(() => {
-          play(rotationParam, 2);
-        }, 0);
+      // 这里判断是扇叶模型还是卷闸模型,如果是卷闸模型时
+      if (isJz) {
+        rotationParam.frontDeg0 = 0;
+        rotationParam.backDeg0 = 0;
+        rotationParam.frontDeg1 = data.forntArea / maxarea;
+        rotationParam.backDeg1 = data.rearArea / maxarea;
+      } else {
+        if (!maxarea) maxarea = 90;
+        rotationParam.frontDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.forntArea);
+        rotationParam.backDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.rearArea);
+        rotationParam.frontDeg1 = (90 / maxarea) * Number(data.forntArea) || 0;
+        rotationParam.backDeg1 = (90 / maxarea) * Number(data.rearArea) || 0;
       }
     }
-  } else if (windowType === 'singleXkWindow') {
-    const acosToAngle = (cosValue) => {
-      cosValue = Math.max(Math.min(cosValue, 1), -1);
-      // 计算角度
-      return Math.asin(cosValue) * (180 / Math.PI);
-    };
-    const sina = Math.sqrt((Math.sin((78 * Math.PI) / 180) ** 2 * parseFloat(data.forntArea)) / parseFloat(maxarea));
-    const angleInRadians = acosToAngle(sina);
-    rotationParam.frontDeg1 = angleInRadians;
-    if (!rotationParam.frontDeg1 && !rotationParam.backDeg1) {
-      // 当返回值有误时默认关闭
-      play(rotationParam, 0);
+    if (isJz) {
+      play(1, { scaleY: data.frontArea / maxarea });
+      play(2, { scaleY: data.rearArea / maxarea });
+      play(3, { scaleY: data.frontArea3 / maxarea });
+      play(4, { scaleY: data.frontArea4 / maxarea });
     } else {
-      setTimeout(() => {
-        play(rotationParam, 1);
-      }, 0);
+      if (!rotationParam.frontDeg1 && !rotationParam.backDeg1) {
+        // 当返回值有误时默认关闭
+        play(rotationParam, 0);
+      } else {
+        if (data.nwindownum == 1 || data.nwindownum == 2) {
+          setTimeout(() => {
+            play(rotationParam, 1);
+          }, 0);
+        }
+        if (data.nwindownum == 2) {
+          setTimeout(() => {
+            play(rotationParam, 2);
+          }, 0);
+        }
+      }
     }
   }
 }
 
 export const play = (rotationParam, flag) => {
-  if (windowType === 'doubleWindow' && doubleWindowObj) {
-    return doubleWindowObj.play.call(doubleWindowObj, rotationParam, flag);
-  } else if (windowType === 'singleWindow' && singleWindowObj) {
-    return singleWindowObj.play.call(singleWindowObj, rotationParam, flag);
+  if (windowType === 'ddFc5' && ddFc5) {
+    return ddFc5.play.call(ddFc5, rotationParam, flag);
+  } else if (windowType === 'ddFc1' && ddFc1) {
+    return ddFc1.play.call(ddFc1, rotationParam, flag);
+  } else if (windowType === 'ddFc2' && ddFc2) {
+    return ddFc2.play.call(ddFc2, rotationParam, flag);
+  } else if (windowType === 'ddFc4' && ddFc4) {
+    return ddFc4.play.call(ddFc4, rotationParam, flag);
+  } else if (windowType === 'sdFc1' && sdFc1) {
+    return sdFc1.play.call(sdFc1, rotationParam, flag);
+  } else if (windowType === 'sdFc3' && sdFc3) {
+    return sdFc3.play.call(sdFc3, rotationParam, flag);
+  } else if (windowType === 'sdFc4' && sdFc4) {
+    return sdFc4.play.call(sdFc4, rotationParam, flag);
+  } else if (windowType === 'sdFc2' && sdFc2) {
+    return sdFc2.play.call(sdFc2, rotationParam, flag);
+  } else if (windowType === 'sdFc5' && sdFc5) {
+    return sdFc5.play.call(sdFc5, rotationParam, flag);
   } else if (windowType === 'singleXkWindow' && singleWindowXkObj) {
     return singleWindowXkObj.play.call(singleWindowXkObj, rotationParam, flag);
   }
@@ -167,120 +228,149 @@ export const play = (rotationParam, flag) => {
 // 切换风窗类型
 export const setModelType = (type) => {
   // if (!model || !model.scene) return;
-  const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtswmk';
   windowType = type;
-  return new Promise((resolve) => {
-    // 显示双道风窗
-    if (windowType === 'doubleWindow' && doubleWindowObj && doubleWindowObj.group) {
-      model.startAnimation = doubleWindowObj.render.bind(doubleWindowObj);
-      model.scene?.remove(group);
-      group = doubleWindowObj.group;
-      const oldCameraPosition = { x: 100, y: 0, z: 10 };
-      // let newP, newT;
-      // if (sysOrgCode === 'sdmtjtyjlmk') {
-      //   newP = { x: 34.294433107431956, y: 19.284123769585108, z: 47.717286013509835 };
-      //   newT = { x: 12.311816240141978, y: -5.691930035759495, z: -5.57302688985693 };
-      // } else {
-      //   newP = { x: 66.257, y: 57.539, z: 94.313 };
-      //   newT = { x: 0, y: 0, z: 0 };
-      // }
-      const newP = { x: 66.257, y: 57.539, z: 94.313 };
-      const newT = { x: 0, y: 0, z: 0 };
-      model.scene?.add(doubleWindowObj.group);
-      setTimeout(async () => {
-        resolve(null);
-        await animateCamera(oldCameraPosition, { x: 0, y: 0, z: 0 }, newP, newT, model);
-      }, 1000);
-    } else if (windowType === 'singleWindow') {
-      // 显示单道风窗
-      model.startAnimation = singleWindowObj.render.bind(singleWindowObj);
-      model.scene?.remove(group);
-      group = singleWindowObj.group;
-      const oldCameraPosition = { x: 100, y: 0, z: 10 };
-      let newP, newT;
-      if (sysOrgCode === 'sdmtjtyjlmk') {
-        newP = { x: 34.294433107431956, y: 19.284123769585108, z: 47.717286013509835 };
-        newT = { x: 12.311816240141978, y: -5.691930035759495, z: -5.57302688985693 };
-      } else {
-        newP = { x: 66.257, y: 57.539, z: 94.313 };
-        newT = { x: 0, y: 0, z: 0 };
-      }
-      model.scene?.add(singleWindowObj.group);
-      setTimeout(async () => {
-        resolve(null);
-        await animateCamera(oldCameraPosition, { x: 0, y: 0, z: 0 }, newP, newT, model);
-      }, 1000);
-    } else if (windowType === 'singleXkWindow') {
-      // 显示单道风窗
-      model.startAnimation = singleWindowXkObj.render.bind(singleWindowXkObj);
-      model.scene?.remove(group);
-      group = singleWindowXkObj.group;
-      const oldCameraPosition = { x: 100, y: 0, z: 10 };
-      model.scene?.add(singleWindowXkObj.group);
-      setTimeout(async () => {
-        resolve(null);
-        await animateCamera(
-          oldCameraPosition,
-          { x: 0, y: 0, z: 0 },
-          { x: 116.08531358656566, y: 81.45510733175816, z: 193.00752046594465 },
-          { x: 23.446366480086372, y: -12.335134633777185, z: -5.63294282643405 },
-          model
-        );
-      }, 1000);
+  const windowConfigurations = {
+    sdFc1: {
+      render: sdFc1 ? () => sdFc1.render() : null,
+      group: sdFc1 ? sdFc1.group : null,
+      newP: { x: 66.257, y: 57.539, z: 94.313 },
+      newT: { x: 0, y: 0, z: 0 },
+    },
+    ddFc5: {
+      render: ddFc5 ? () => ddFc5.render() : null,
+      group: ddFc5 ? ddFc5.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,
+      newP: { x: 34.294433107431956, y: 19.284123769585108, z: 47.717286013509835 },
+      newT: { x: 12.311816240141978, y: -5.691930035759495, z: -5.57302688985693 },
+    },
+    ddFc2: {
+      render: ddFc2 ? () => ddFc2.render() : null,
+      group: ddFc2 ? ddFc2.group : null,
+      newP: { x: 66.257, y: 57.539, z: 94.313 },
+      newT: { x: 0, y: 0, z: 0 },
+    },
+    ddFc4: {
+      render: ddFc4 ? () => ddFc4.render() : null,
+      group: ddFc4 ? ddFc4.group : null,
+      newP: { x: 66.257, y: 57.539, z: 94.313 },
+      newT: { x: 0, y: 0, z: 0 },
+    },
+    sdFc3: {
+      render: sdFc3 ? () => sdFc3.render() : null,
+      group: sdFc3 ? sdFc3.group : null,
+      newP: { x: 66.257, y: 57.539, z: 94.313 },
+      newT: { x: 0, y: 0, z: 0 },
+    },
+    sdFc4: {
+      render: sdFc4 ? () => sdFc4.render() : null,
+      group: sdFc4 ? sdFc4.group : null,
+      newP: { x: 66.257, y: 57.539, z: 94.313 },
+      newT: { x: 0, y: 0, z: 0 },
+    },
+    sdFc2: {
+      render: sdFc2 ? () => sdFc2.render() : null,
+      group: sdFc2 ? sdFc2.group : null,
+      newP: { x: 66.257, y: 57.539, z: 94.313 },
+      newT: { x: 0, y: 0, z: 0 },
+    },
+    sdFc5: {
+      render: sdFc5 ? () => sdFc5.render() : null,
+      group: sdFc5 ? sdFc5.group : null,
+      newP: { x: 34.294433107431956, y: 19.284123769585108, z: 47.717286013509835 },
+      newT: { x: 12.311816240141978, y: -5.691930035759495, z: -5.57302688985693 },
+    },
+    singleXkWindow: {
+      render: singleWindowXkObj ? () => singleWindowXkObj.render() : null,
+      group: singleWindowXkObj ? singleWindowXkObj.group : null,
+      newP: { x: 116.08531358656566, y: 81.45510733175816, z: 193.00752046594465 },
+      newT: { x: 23.446366480086372, y: -12.335134633777185, z: -5.63294282643405 },
+    },
+  };
+  const oldCameraPosition = { x: 100, y: 0, z: 10 };
+  model.scene?.remove(group);
+  function handleWindowType(windowType: string, model: any) {
+    const config = windowConfigurations[windowType];
+
+    if (config && config.group) {
+      model.startAnimation = config.render;
+      group = config.group;
+      return new Promise((resolve) => {
+        setTimeout(async () => {
+          await animateCamera(oldCameraPosition, { x: 0, y: 0, z: 0 }, config.newP, config.newT, model);
+          model.scene?.add(config.group);
+          resolve(null);
+        }, 1000);
+      });
+    } else {
+      throw new Error(`Unsupported windowType: ${windowType}`);
     }
-  });
+  }
+  return handleWindowType(windowType, model);
 };
 
-export const mountedThree = (playerDom) => {
+export const mountedThree = () => {
   // const { sysOrgCode } = useGlobSetting();
-  const sysOrgCode = 'zmhjhzmy';
+  // const sysOrgCode = 'zmhjhzmy';
   return new Promise(async (resolve) => {
     model = new UseThree('#window3D');
     if (!model || !model.renderer || !model.camera) return;
     model.setEnvMap('royal_esplanade_1k.hdr');
     model.renderer.toneMappingExposure = 1.8;
     model.camera.position.set(100, 0, 1000);
+    // 根据模型类型判断要初始化哪些模型
+    const dictCodes = getDictItemsByCode('windowModalType');
 
-    singleWindowXkObj = new singleWindowXk(model);
-
-    // 这里是加载的蓝色有栅栏的模型
-    // if (sysOrgCode === 'sdmtjtbetmk') {
-    //   const singleWindowBet = await import('./dandaoFcBet.threejs');
-    //   if (singleWindowBet) singleWindowObj = new singleWindowBet.default(model);
-    // }
-
-    if (sysOrgCode === 'sdmtjtyjlmk') {
-      // 单
-      const singleWindowYjl = await import('./dandaoFcYjl.threejs');
-      if (singleWindowYjl) singleWindowObj = new singleWindowYjl.default(model);
-    } else {
-      singleWindowObj = new singleWindow(model);
-    }
-
-    if (sysOrgCode === 'sdmtjtswmk') {
-      const doubleWindow = await import('./shuangdaoFcSw.threejs');
-      if (doubleWindow) doubleWindowObj = new doubleWindow.default(model);
-    } else if (sysOrgCode === 'sdmtjtbltmk') {
-      const doubleWindow = await import('./shuangdaoFcBlt.threejs');
-      if (doubleWindow) doubleWindowObj = new doubleWindow.default(model);
-    } else if (sysOrgCode === 'sdmtjtbltmk') {
-      const doubleWindow = await import('./shuangdaoFcBlt.threejs');
-      if (doubleWindow) doubleWindowObj = new doubleWindow.default(model);
-    } else if (sysOrgCode === 'zmhjhzmy') {
-      // 韩咀
-      const doubleWindow = await import('./shuangdaoFcHj.threejs');
-      if (doubleWindow) doubleWindowObj = new doubleWindow.default(model);
-    } else {
-      doubleWindowObj = new doubleWindow(model);
+    for (let i = 0; i < dictCodes.length; i++) {
+      const dict = dictCodes[i];
+      switch (dict.value) {
+        case 'sdFc1':
+          sdFc1 = new sdFc_1(model);
+          await sdFc1.mountedThree();
+          break;
+        case 'ddFc5':
+          ddFc5 = new ddFc_5(model);
+          await ddFc5.mountedThree();
+          break;
+        case 'ddFc1':
+          ddFc1 = new ddFc_1(model);
+          await ddFc1.mountedThree();
+          break;
+        case 'ddFc2':
+          ddFc2 = new ddFc_2(model);
+          await ddFc2.mountedThree();
+          break;
+        case 'ddFc4':
+          ddFc4 = new ddFc_4(model);
+          await ddFc4.mountedThree();
+          break;
+        case 'sdFc3':
+          sdFc3 = new sdFc_3(model);
+          await sdFc3.mountedThree();
+          break;
+        case 'sdFc4':
+          sdFc4 = new sdFc_4(model);
+          await sdFc4.mountedThree();
+          break;
+        case 'sdFc2':
+          sdFc2 = new sdFc_2(model);
+          await sdFc2.mountedThree();
+          break;
+        case 'sdFc5':
+          sdFc5 = new sdFc_5(model);
+          await sdFc5.mountedThree();
+          break;
+        case 'singleXkWindow':
+          singleWindowXkObj = new singleWindowXk(model);
+          await singleWindowXkObj.mountedThree();
+          break;
+      }
     }
-
-    doubleWindowObj.mountedThree(playerDom);
-    singleWindowXkObj.mountedThree();
-    singleWindowObj.mountedThree(playerDom);
     model.animate();
-    // addLight();
-    // startAnimation();
     resolve(null);
   });
 };
@@ -290,14 +380,29 @@ export const destroy = () => {
     model.isRender = false;
     console.log('场景销毁前信息----------->', model.renderer?.info);
     model.isRender = false;
-    doubleWindowObj.destroy();
-    singleWindowObj.destroy();
+    if (ddFc5) ddFc5.destroy();
+    if (ddFc1) ddFc1.destroy();
+    if (ddFc2) ddFc2.destroy();
+    if (ddFc4) ddFc4.destroy();
+    if (sdFc1) sdFc1.destroy();
+    if (sdFc3) sdFc3.destroy();
+    if (sdFc4) sdFc4.destroy();
+    if (sdFc2) sdFc2.destroy();
+    if (sdFc5) sdFc5.destroy();
+
     singleWindowXkObj.destroy();
     model.destroy();
     model = null;
     group = null;
-    singleWindowObj = null;
-    doubleWindowObj = null;
     singleWindowXkObj = null;
+    ddFc5 = null;
+    ddFc1 = null;
+    ddFc2 = null;
+    ddFc4 = null;
+    sdFc1 = null;
+    sdFc3 = null;
+    sdFc4 = null;
+    sdFc2 = null;
+    sdFc5 = null;
   }
 };