Browse Source

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

lxh 1 month ago
parent
commit
65639eee47
59 changed files with 1780 additions and 875 deletions
  1. 1 1
      src/api/sys/vent.ts
  2. BIN
      src/assets/images/company/monitor-goto.png
  3. 34 12
      src/views/vent/bundle/bundleMonitorTable/index.vue
  4. 33 11
      src/views/vent/bundleSpy/bundleSpyTable/index.vue
  5. 12 2
      src/views/vent/deviceManager/configurationTable/types.ts
  6. 15 15
      src/views/vent/dust/dustMonitorTable/dust-table.data.ts
  7. 19 14
      src/views/vent/dust/dustMonitorTable/index.vue
  8. 7 7
      src/views/vent/gas/gasAssessment/gasAssessment.data.ts
  9. 1 2
      src/views/vent/home/configurable/components/content.vue
  10. 38 0
      src/views/vent/home/configurable/components/detail/ComplexList.vue
  11. 116 11
      src/views/vent/home/configurable/components/detail/CustomChart.vue
  12. 1 1
      src/views/vent/home/configurable/components/header.vue
  13. 7 5
      src/views/vent/home/configurable/components/preset/QHCurve.vue
  14. 60 2
      src/views/vent/home/configurable/configurable.api.ts
  15. 727 171
      src/views/vent/home/configurable/configurable.data.ts
  16. 272 0
      src/views/vent/home/configurable/vent_v5.vue
  17. 1 1
      src/views/vent/monitorManager/compressor/nitrogen.data.ts
  18. 0 1
      src/views/vent/monitorManager/compressor/nitrogen.dishang.threejs.ts
  19. 0 1
      src/views/vent/monitorManager/compressor/nitrogen.dixia.threejs.ts
  20. 2 2
      src/views/vent/monitorManager/deviceMonitor/components/device/device.data.ts
  21. 4 4
      src/views/vent/monitorManager/deviceMonitor/components/device/index.vue
  22. 27 16
      src/views/vent/monitorManager/fanLocalMonitor/fanLocal.threejs.ts
  23. 1 18
      src/views/vent/monitorManager/gateMonitor/gate.threejs.noStation.ts
  24. 1 18
      src/views/vent/monitorManager/gateMonitor/gate.threejs.qd.ts
  25. 1 18
      src/views/vent/monitorManager/gateMonitor/gate.threejs.three.tl.ts
  26. 1 18
      src/views/vent/monitorManager/gateMonitor/gate.threejs.three.ts
  27. 1 18
      src/views/vent/monitorManager/gateMonitor/gate.threejs.two.ss.ts
  28. 1 18
      src/views/vent/monitorManager/gateMonitor/gate.threejs.two.yj.ts
  29. 1 18
      src/views/vent/monitorManager/gateMonitor/gate.threejs.window.ts
  30. 1 18
      src/views/vent/monitorManager/gateMonitor/gate.threejs.xc.ts
  31. 1 18
      src/views/vent/monitorManager/gateMonitor/gate.threejs.xr.ts
  32. 1 19
      src/views/vent/monitorManager/gateMonitor/gate.threejs.yj.ts
  33. 1 18
      src/views/vent/monitorManager/gateMonitor/gate.threejs.yy.ts
  34. 3 3
      src/views/vent/monitorManager/mainFanMonitor/main.data.ts
  35. 0 1
      src/views/vent/monitorManager/nitrogen/nitrogen.dishang.threejs.ts
  36. 1 18
      src/views/vent/monitorManager/obfurage1Monitor/gate.threejs.three.ts
  37. 1 18
      src/views/vent/monitorManager/obfurage1Monitor/gate.threejs.two.ts
  38. 1 1
      src/views/vent/monitorManager/safetyMonitor/index.vue
  39. 1 18
      src/views/vent/monitorManager/windowMonitor/dandaoFc.threejs.ts
  40. 1 18
      src/views/vent/monitorManager/windowMonitor/dandaoFcBet.threejs.ts
  41. 1 18
      src/views/vent/monitorManager/windowMonitor/dandaoFcXk.threejs.ts
  42. 1 18
      src/views/vent/monitorManager/windowMonitor/dandaoFcYjl.threejs.ts
  43. 6 6
      src/views/vent/monitorManager/windowMonitor/index.vue
  44. 1 18
      src/views/vent/monitorManager/windowMonitor/shuangdaoFc.threejs.ts
  45. 11 26
      src/views/vent/monitorManager/windowMonitor/shuangdaoFcBlt.threejs.ts
  46. 339 0
      src/views/vent/monitorManager/windowMonitor/shuangdaoFcHj.threejs.ts
  47. 1 18
      src/views/vent/monitorManager/windowMonitor/shuangdaoFcSw.threejs.ts
  48. 1 21
      src/views/vent/monitorManager/windowMonitor/shuangdaoFcYjl.threejs.ts
  49. 10 3
      src/views/vent/monitorManager/windowMonitor/window.threejs.ts
  50. 1 18
      src/views/vent/monitorManager/windowMonitorBet/dandaoFc.threejs.ts
  51. 1 18
      src/views/vent/monitorManager/windowMonitorBet/dandaoFcBet.threejs.ts
  52. 1 18
      src/views/vent/monitorManager/windowMonitorBet/dandaoFcBetZh.threejs.ts
  53. 1 18
      src/views/vent/monitorManager/windowMonitorBet/shuangdaoFc.threejs.ts
  54. 1 19
      src/views/vent/monitorManager/windrectMonitor/dantou.threejs.ts
  55. 1 19
      src/views/vent/monitorManager/windrectMonitor/duishe.threejs.ts
  56. 1 19
      src/views/vent/monitorManager/windrectMonitor/duisheFixed.threejs.ts
  57. 1 19
      src/views/vent/monitorManager/windrectMonitor/longmen.threejs.ts
  58. 4 26
      src/views/vent/monitorManager/windrectMonitor/longmenSide.threejs.ts
  59. 1 18
      src/views/vent/monitorManager/windrectMonitor/zhedie.threejs.ts

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

@@ -2654,7 +2654,7 @@ export const getAllTableHeaderColumnsApi = () => {
         devicetype: 'modelsensor_detail',
         pagetype: 'detail',
         devicekind: 'modelsensor',
-        des: '气压值(KPa)',
+        des: '气压值(kPa)',
         yaxispos: null,
         linetype: null,
         yname: null,

BIN
src/assets/images/company/monitor-goto.png


+ 34 - 12
src/views/vent/bundle/bundleMonitorTable/index.vue

@@ -4,13 +4,13 @@
     <div class="content-container">
       <div class="file-list">
         <ul>
-          <li v-for="item in selectList" :key="item.fileId" :class="{ selected: item.fileId === selectedFileId }" @click="handleFileClick(item)">
+          <li v-for="item in selectList" :key="item.id" :class="{ selected: item.id === selectedFileId }" @click="handleFileClick(item)">
             {{ item.fileName }}
           </li>
         </ul>
       </div>
       <div class="table-container">
-        <a-table :columns="computedColumns" :data-source="tableData" size="small" :scroll="{ y: 250 }" class="tableW">
+        <a-table :columns="computedColumns" :data-source="tableData" size="small" :pagination="false" :scroll="{ y: 250 }" class="tableW">
           <template #bodyCell="{ column, record }">
             <template v-if="column.dataIndex === 'action'">
               <a class="action-link" @click="toDetail(record)">数据分析</a>
@@ -65,7 +65,7 @@ let jcddArr = ref<any[]>([]);
 let formSearch = reactive({
   pageNum: 1,
   pageSize: 1000,
-  fileId: '',
+  id: '',
   fileName: '',
 });
 const total = ref(0);
@@ -411,6 +411,27 @@ function updateChart(data: any) {
         color: '#ffffff',
       },
     },
+    dataZoom: [
+      {
+        type: 'slider', // 会创建一个滑块来选择要显示的区域
+        start: 0, // 初始选中范围的起始百分比
+        end: (5 / categories.length) * 100, // 初始选中范围的结束百分比,根据数据条数调整
+        minSpan: (5 / categories.length) * 100, // 最小选中范围,根据数据条数调整
+        maxSpan: (5 / categories.length) * 100, // 最大选中范围,根据数据条数调整
+        show: true,
+        height: 10, // 设置滑块高度
+        bottom: 1, // 设置滑块距离容器底部的距离
+        borderColor: 'transparent', // 设置边框颜色为透明
+        backgroundColor: '#F6F7FB', // 设置背景颜色
+        handleIcon: 'path://M512,512m-448,0a448,448,0,1,0,896,0a448,448,0,1,0,-896,0Z', // 设置手柄图标为圆形
+        handleColor: '#C2D2FF', // 设置手柄颜色
+        handleSize: 13, // 设置手柄大小
+        handleStyle: {
+          borderColor: '#C2D2FF', // 设置手柄边框颜色
+        },
+        fillerColor: '#C2D2FF', // 设置选中范围的填充颜色
+      },
+    ],
     grid: {
       top: '21%', // 设置 grid 距离顶部的距离,增加间隔
       left: '3%',
@@ -491,29 +512,29 @@ async function getTableListById(params: any) {
 async function getAllFile() {
   let res = await getAllFileList({ type: 'bundle' });
   selectList.value = res.records.map((item: any) => ({
-    fileId: item.fileId,
+    id: item.id,
     fileName: item.fileName,
   }));
   jcddArr.value = res.records.map((item: any) => ({
-    fileId: item.jcdd,
+    id: item.jcdd,
   }));
   if (selectList.value.length > 0) {
-    formSearch.fileId = selectList.value[0].fileId;
+    formSearch.id = selectList.value[0].id;
     getSearch();
   }
 }
 // 处理文件点击事件
 function handleFileClick(item: any) {
-  formSearch.fileId = item.fileId;
+  formSearch.id = item.id;
   formSearch.fileName = item.fileName;
-  selectedFileId.value = item.fileId;
+  selectedFileId.value = item.id;
   getSearch();
 }
 //查询
 function getSearch() {
-  // const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
+  // const selectedFile = selectList.value.find((item) => item.id === formSearch.id);
   const params = {
-    fileId: formSearch.fileId,
+    id: formSearch.id,
     // fileName: selectedFile ? selectedFile.fileName : '',
   };
   getTableListById(params);
@@ -522,8 +543,8 @@ onMounted(() => {
   getTableList({ type: 'bundle' });
   getAllFile().then(() => {
     if (selectList.value.length > 0) {
-      formSearch.fileId = selectList.value[0].fileId;
-      selectedFileId.value = selectList.value[0].fileId;
+      formSearch.id = selectList.value[0].id;
+      selectedFileId.value = selectList.value[0].id;
       getSearch();
     }
   });
@@ -574,6 +595,7 @@ onMounted(() => {
   box-sizing: border-box;
 }
 .data-container {
+  margin-top: 40px;
   display: flex;
   width: 100%;
   height: 100%;

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

@@ -4,13 +4,13 @@
     <div class="content-container">
       <div class="file-list">
         <ul>
-          <li v-for="item in selectList" :key="item.fileId" :class="{ selected: item.fileId === selectedFileId }" @click="handleFileClick(item)">
+          <li v-for="item in selectList" :key="item.id" :class="{ selected: item.id === selectedFileId }" @click="handleFileClick(item)">
             {{ item.fileName }}
           </li>
         </ul>
       </div>
       <div class="table-container">
-        <a-table :columns="computedColumns" :data-source="tableData" size="small" :scroll="{ y: 300 }" class="tableW">
+        <a-table :columns="computedColumns" :data-source="tableData" size="small" :pagination="false" :scroll="{ y: 300 }" class="tableW">
           <template #bodyCell="{ column, record }">
             <template v-if="column.dataIndex === 'action'">
               <a class="action-link" @click="toDetail(record)">数据分析</a>
@@ -57,7 +57,7 @@ let selectList = ref<any[]>([]);
 let formSearch = reactive({
   pageNum: 1,
   pageSize: 1000,
-  fileId: '',
+  id: '',
   fileName: '',
 });
 const total = ref(0);
@@ -323,6 +323,27 @@ function updateChart(data: any) {
         },
       },
     ],
+    dataZoom: [
+      {
+        type: 'slider', // 会创建一个滑块来选择要显示的区域
+        start: 0, // 初始选中范围的起始百分比
+        end: (5 / categories.length) * 100, // 初始选中范围的结束百分比,根据数据条数调整
+        minSpan: (5 / categories.length) * 100, // 最小选中范围,根据数据条数调整
+        maxSpan: (5 / categories.length) * 100, // 最大选中范围,根据数据条数调整
+        show: true,
+        height: 10, // 设置滑块高度
+        bottom: 1, // 设置滑块距离容器底部的距离
+        borderColor: 'transparent', // 设置边框颜色为透明
+        backgroundColor: '#F6F7FB', // 设置背景颜色
+        handleIcon: 'path://M512,512m-448,0a448,448,0,1,0,896,0a448,448,0,1,0,-896,0Z', // 设置手柄图标为圆形
+        handleColor: '#C2D2FF', // 设置手柄颜色
+        handleSize: 13, // 设置手柄大小
+        handleStyle: {
+          borderColor: '#C2D2FF', // 设置手柄边框颜色
+        },
+        fillerColor: '#C2D2FF', // 设置选中范围的填充颜色
+      },
+    ],
     grid: {
       top: '21%', // 设置 grid 距离顶部的距离,增加间隔
       left: '3%',
@@ -338,26 +359,26 @@ function updateChart(data: any) {
 async function getAllFile() {
   let res = await getAllFileList({ type: 'bundleSpy' });
   selectList.value = res.records.map((item: any) => ({
-    fileId: item.fileId,
+    id: item.id,
     fileName: item.fileName,
   }));
   if (selectList.value.length > 0) {
-    formSearch.fileId = selectList.value[0].fileId;
+    formSearch.id = selectList.value[0].id;
     getSearch();
   }
 }
 // 处理文件点击事件
 function handleFileClick(item: any) {
-  formSearch.fileId = item.fileId;
+  formSearch.id = item.id;
   formSearch.fileName = item.fileName;
-  selectedFileId.value = item.fileId;
+  selectedFileId.value = item.id;
   getSearch();
 }
 //查询
 function getSearch() {
-  // const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
+  // const selectedFile = selectList.value.find((item) => item.id === formSearch.id);
   const params = {
-    fileId: formSearch.fileId,
+    id: formSearch.id,
     // fileName: selectedFile ? selectedFile.fileName : '',
   };
   getTableListById(params);
@@ -366,8 +387,8 @@ onMounted(() => {
   getTableList({ type: 'bundleSpy' });
   getAllFile().then(() => {
     if (selectList.value.length > 0) {
-      formSearch.fileId = selectList.value[0].fileId;
-      selectedFileId.value = selectList.value[0].fileId;
+      formSearch.id = selectList.value[0].id;
+      selectedFileId.value = selectList.value[0].id;
       getSearch();
     }
   });
@@ -443,6 +464,7 @@ onMounted(() => {
   color: #fff !important;
 }
 .data-container {
+  margin-top: 40px;
   display: flex;
   width: 100%;
   height: 100%;

+ 12 - 2
src/views/vent/deviceManager/configurationTable/types.ts

@@ -185,7 +185,17 @@ export interface ModuleDataGalleryList extends ReadFrom {
 
 export interface ModuleDataChart extends ReadFrom {
   /** 图表类型,一个类型对应一种图表预设 */
-  type: 'pie' | 'bar' | 'line' | 'line_area' | 'line_bar' | 'line_smooth' | 'line_smooth_complex' | 'bar_stack' | 'bar_cylinder';
+  type:
+    | 'pie'
+    | 'bar'
+    | 'line'
+    | 'line_area'
+    | 'line_bar'
+    | 'line_smooth'
+    | 'line_smooth_complex'
+    | 'bar_stack'
+    | 'bar_cylinder'
+    | 'bar_cylinder_wide';
   /** 排序依据,该项应配置将配合 readFrom 使用 */
   sortBy?: string;
   /** 排序规则,desc降序,asc升序 */
@@ -252,7 +262,7 @@ export interface ModuleDataPreset extends ReadFrom {
 
 export interface ModuleDataComplexList extends ReadFrom {
   /** 列表预设的背景类型 */
-  type: 'A' | 'B' | 'C' | 'D' | 'E';
+  type: 'A' | 'B' | 'C' | 'D' | 'E' | 'F';
   /** 是否需要根据数据来决定所展示的项目数量,需要确保 items 至少有一项,且 readFrom 指向数组 */
   mapFromData?: boolean;
   /** 核心配置,每个列表项对应一项 */

+ 15 - 15
src/views/vent/dust/dustMonitorTable/dust-table.data.ts

@@ -267,7 +267,7 @@ export const Hjtcolumns = [
     title: '监测地点',
     dataIndex: 'jcdd',
     key: 'jcdd',
-    width: 100,
+    width: 150,
     align: 'center',
   },
   {
@@ -286,14 +286,14 @@ export const Hjtcolumns = [
         title: '总尘',
         dataIndex: 'sc_zcds',
         key: 'sc_zcds',
-        width: 100,
+        width: 80,
         align: 'center',
       },
       {
         title: '呼尘',
         dataIndex: 'sc_hcds',
         key: 'sc_hcds',
-        width: 100,
+        width: 80,
         align: 'center',
       },
       {
@@ -314,14 +314,14 @@ export const Hjtcolumns = [
         title: '总尘',
         dataIndex: 'jx_zcds',
         key: 'jx_zcds',
-        width: 100,
+        width: 80,
         align: 'center',
       },
       {
         title: '呼尘',
         dataIndex: 'jx_hcds',
         key: 'jx_hcds',
-        width: 100,
+        width: 80,
         align: 'center',
       },
       {
@@ -342,28 +342,28 @@ export const Hjtcolumns = [
         title: '总尘',
         dataIndex: 'zcjqpj',
         key: 'zcjqpj',
-        width: 100,
+        width: 80,
         align: 'center',
       },
       {
         title: '是否合格',
         dataIndex: 'zcsfhgjqpj',
         key: 'zcsfhgjqpj',
-        width: 100,
+        width: 80,
         align: 'center',
       },
       {
         title: '呼尘',
         dataIndex: 'hcjqpj',
         key: 'hcjqpj',
-        width: 100,
+        width: 80,
         align: 'center',
       },
       {
         title: '是否合格',
         dataIndex: 'hcsfhgjqpj',
         key: 'hcsfhgjqpj',
-        width: 100,
+        width: 80,
         align: 'center',
       },
     ],
@@ -453,7 +453,7 @@ export const dataDltColumns = [
     align: 'center',
     dataIndex: 'key',
     key: 'key',
-    width: 200,
+    width: 130,
     customRender: ({ text }) => fieldDltMapping[text] || text,
   },
   {
@@ -464,7 +464,7 @@ export const dataDltColumns = [
     key: 'value',
   },
   {
-    width: 100,
+    width: 130,
     align: 'center',
     title: '监测地点',
     dataIndex: 'jcdd',
@@ -515,7 +515,7 @@ export const dataHjtColumns = [
     align: 'center',
     dataIndex: 'key',
     key: 'key',
-    width: 200,
+    width: 100,
     customRender: ({ text }) => fieldHjtMapping[text] || text,
   },
   {
@@ -592,7 +592,7 @@ export const AllDataDltColumns = [
     align: 'center',
     dataIndex: 'key',
     key: 'key',
-    width: 200,
+    width: 130,
     customRender: ({ text }) => fieldDltMapping[text] || text,
   },
   {
@@ -603,7 +603,7 @@ export const AllDataDltColumns = [
     key: 'value',
   },
   {
-    width: 100,
+    width: 130,
     align: 'center',
     title: '监测地点',
     dataIndex: 'jcdd',
@@ -661,7 +661,7 @@ export const AllDataHjtColumns = [
     align: 'center',
     dataIndex: 'key',
     key: 'key',
-    width: 200,
+    width: 100,
     customRender: ({ text }) => fieldHjtMapping[text] || text,
   },
   {

+ 19 - 14
src/views/vent/dust/dustMonitorTable/index.vue

@@ -4,7 +4,7 @@
     <div class="content-container">
       <div class="file-list">
         <ul>
-          <li v-for="item in selectList" :key="item.fileId" :class="{ selected: item.fileId === selectedFileId }" @click="handleFileClick(item)">
+          <li v-for="item in selectList" :key="item.id" :class="{ selected: item.id === selectedFileId }" @click="handleFileClick(item)">
             {{ item.fileName }}
           </li>
         </ul>
@@ -39,7 +39,7 @@
                 :data-source="filteredResultByWorkplace"
                 :pagination="false"
                 size="small"
-                :scroll="{ y: 285 }"
+                :scroll="updateScrollPosition"
                 class="tableW"
               />
             </a-tab-pane>
@@ -49,7 +49,7 @@
                 :data-source="AllMaxValues"
                 size="small"
                 :pagination="false"
-                :scroll="{ y: 330 }"
+                :scroll="{ y: 280 }"
                 class="tableW"
               />
             </a-tab-pane>
@@ -96,9 +96,14 @@ const { sysOrgCode } = useGlobSetting();
 let formSearch = reactive({
   pageNum: 1,
   pageSize: 1000,
-  fileId: '',
+  id: '',
   fileName: '',
 });
+const updateScrollPosition = computed(() => {
+  return {
+    y: workplaceList.value.length > 0 ? 240 : 280,
+  };
+});
 //获取粉尘监测列展示数据
 const computedColumns = computed(() => {
   switch (sysOrgCode) {
@@ -360,26 +365,26 @@ function processTableData(data: any) {
 async function getAllFile() {
   let res = await getAllFileList({ type: 'smoke' });
   selectList.value = res.records.map((item: any) => ({
-    fileId: item.fileId,
+    id: item.id,
     fileName: item.fileName,
   }));
   if (selectList.value.length > 0) {
-    formSearch.fileId = selectList.value[0].fileId;
+    formSearch.id = selectList.value[0].id;
     getSearch();
   }
 }
 //查询
 // 处理文件点击事件
 function handleFileClick(item: any) {
-  formSearch.fileId = item.fileId;
+  formSearch.id = item.id;
   formSearch.fileName = item.fileName;
-  selectedFileId.value = item.fileId;
+  selectedFileId.value = item.id;
   getSearch();
 }
 function getSearch() {
-  // const selectedFile = selectList.value.find((item) => item.fileId === formSearch.fileId);
+  // const selectedFile = selectList.value.find((item) => item.id === formSearch.id);
   const params = {
-    id: formSearch.fileId,
+    id: formSearch.id,
     // fileName: selectedFile ? selectedFile.fileName : '',
   };
   getTableListById(params);
@@ -394,8 +399,8 @@ onMounted(() => {
   getTableList({ type: 'smoke' });
   getAllFile().then(() => {
     if (selectList.value.length > 0) {
-      formSearch.fileId = selectList.value[0].fileId;
-      selectedFileId.value = selectList.value[0].fileId;
+      formSearch.id = selectList.value[0].id;
+      selectedFileId.value = selectList.value[0].id;
       getSearch();
     }
   });
@@ -411,12 +416,11 @@ onMounted(() => {
   height: 100%;
   padding-top: 54px;
 }
-
 .file-list {
   width: 20%;
   padding: 10px;
   margin-right: 10px;
-  margin-bottom: 50px;
+  margin-bottom: 40px;
   border: 1px solid #99e8ff66;
   background: #27546e1a;
   box-shadow: 0px 0px 20px 7px rgba(145, 233, 254, 0.7) inset;
@@ -449,6 +453,7 @@ onMounted(() => {
 .tab-container {
   display: flex;
   align-items: center;
+  padding-top: 50px;
 }
 
 .tab-container .ant-tabs {

+ 7 - 7
src/views/vent/gas/gasAssessment/gasAssessment.data.ts

@@ -276,7 +276,7 @@ export const monitorPosData = [
   {
     title: '负压',
     code: 'T0',
-    unit: 'KPa',
+    unit: 'kPa',
   },
   {
     title: 'CH₄浓度',
@@ -1175,9 +1175,9 @@ export const mockGasPipingCylData = [
 export const gasPipingFyOption = [
   {
     legend: '主管道',
-    seriesName: '(KPa)',
+    seriesName: '(kPa)',
     ymax: 30,
-    yname: 'KPa',
+    yname: 'kPa',
     linetype: 'line',
     yaxispos: 'left',
     color: '#37BCF2',
@@ -1187,9 +1187,9 @@ export const gasPipingFyOption = [
   },
   {
     legend: '支路1',
-    seriesName: '(KPa)',
+    seriesName: '(kPa)',
     ymax: 30,
-    yname: 'KPa',
+    yname: 'kPa',
     linetype: 'line',
     yaxispos: 'left',
     color: '#FC4327',
@@ -1199,9 +1199,9 @@ export const gasPipingFyOption = [
   },
   {
     legend: '支路2',
-    seriesName: '(KPa)',
+    seriesName: '(kPa)',
     ymax: 30,
-    yname: 'KPa',
+    yname: 'kPa',
     linetype: 'line',
     yaxispos: 'left',
     color: '#91CC75',

+ 1 - 2
src/views/vent/home/configurable/components/content.vue

@@ -65,7 +65,7 @@
           <BlastDelta class="content__module" :pos-monitor="config.data" :canvasSize="{ width: 250, height: 200 }" />
         </template>
         <template v-if="config.name === 'qh_curve'">
-          <QHCurve class="content__module" :mainfan="config.data" />
+          <QHCurve class="content__module" :mainfan="config.data" :fan1-prop="config.config.fan1Prop" :fan2-prop="config.config.fan2Prop" />
         </template>
         <template v-if="config.name === 'measure_detail'">
           <MeasureDetail
@@ -261,7 +261,6 @@
         case 'chart': {
           const cfg = chart.shift();
           if (!cfg) break;
-          debugger;
           const data = getData(refData, cfg.readFrom, cfg.parser);
 
           arr.push({

+ 38 - 0
src/views/vent/home/configurable/components/detail/ComplexList.vue

@@ -365,6 +365,44 @@
     }
   }
 
+  .list-item_F {
+      // height: 155px;
+      background-repeat: no-repeat;
+      background-size: 100% 100%;
+      // background-size: auto 100%;
+      background-position: center;
+      background-image: @vent-gas-list-item-bg-img;
+      display: flex;
+      align-items: center;
+      // justify-content: space-between;
+      // text-align: center;
+      padding: 0 5%;
+      margin-top: 5px;
+      height: 50px;
+
+      .list-item__title_F {
+        flex-basis: 25%;
+      }
+      .list-item__content_F {
+        flex-basis: 25%;
+      }
+      .list-item__label::after {
+        content: ':';
+      }
+      .list-item__value {
+        font-size: 18px;
+        margin-left: 5px;
+        font-weight: bold;
+      }
+      .list-item__content_F {
+        display: flex;
+        align-items: center;
+      }
+      .list-item__info {
+        display: none;
+      }
+    }
+
     // .list-item__title_B_O2 {
     //   background-image: url(/@/assets/images/home-container/configurable/firehome/O₂.png);
     // }

+ 116 - 11
src/views/vent/home/configurable/components/detail/CustomChart.vue

@@ -56,9 +56,12 @@
     // 该项作为下面所有图表依赖的基准系列数据
     const baseSeries: { name: string; data: [string, string][]; color: string }[] = sorttedData.reduce((res: any[], baseData) => {
       series.forEach((serie) => {
+        // 将读取出的数据转为数组
+        const temp = getData(baseData, serie.readFrom) || [];
+
         res.push({
           name: getFormattedText(baseData, serie.label),
-          data: (getData(baseData, serie.readFrom) || []).map((data) => {
+          data: (Array.isArray(temp) ? temp : [temp]).map((data) => {
             return [getData(data, serie.xprop), getData(data, serie.yprop)]; /** x y */
             // return { name: getData(data, serie.xprop), value: getData(data, serie.yprop) }; /** x y */
           }),
@@ -232,12 +235,12 @@
             },
           };
         }),
-        yAxis: yAxis.map((e) => {
+        yAxis: yAxis.map((e, i) => {
           return {
             ...e,
             splitLine: {
               lineStyle: {
-                opacity: 0.1,
+                opacity: i === 0 ? 0.1 : 0,
               },
             },
           };
@@ -308,12 +311,12 @@
             },
           };
         }),
-        yAxis: yAxis.map((e) => {
+        yAxis: yAxis.map((e, i) => {
           return {
             ...e,
             splitLine: {
               lineStyle: {
-                opacity: 0.1,
+                opacity: i === 0 ? 0.1 : 0,
               },
             },
           };
@@ -348,12 +351,12 @@
             type: 'category',
           };
         }),
-        yAxis: yAxis.map((e) => {
+        yAxis: yAxis.map((e, i) => {
           return {
             ...e,
             splitLine: {
               lineStyle: {
-                opacity: 0.1,
+                opacity: i === 0 ? 0.1 : 0,
               },
             },
           };
@@ -393,13 +396,13 @@
             boundaryGap: false,
           };
         }),
-        yAxis: yAxis.map((e) => {
+        yAxis: yAxis.map((e, i) => {
           return {
             ...e,
             splitLine: {
               lineStyle: {
                 color: '#fff',
-                opacity: 0.1,
+                opacity: i === 0 ? 0.1 : 0,
               },
             },
           };
@@ -555,12 +558,12 @@
             },
           };
         }),
-        yAxis: yAxis.map((e) => {
+        yAxis: yAxis.map((e, i) => {
           return {
             ...e,
             splitLine: {
               lineStyle: {
-                opacity: 0.1,
+                opacity: i === 0 ? 0.1 : 0,
               },
             },
           };
@@ -631,6 +634,108 @@
       };
     }
 
+    // 柱状图,圆柱形样式
+    if (type === 'bar_cylinder_wide') {
+      return {
+        textStyle,
+        grid: {
+          top: 40,
+          bottom: 50,
+        },
+        legend: {
+          textStyle,
+          show: legend.show,
+        },
+        tooltip: {
+          trigger: 'item',
+        },
+        xAxis: xAxis.map((e) => {
+          return {
+            ...e,
+            type: 'category',
+            axisLabel: {
+              interval: 0,
+              width: (domWidth - 100) / get(baseSeries, '[0].data.length', 1),
+              overflow: 'break',
+            },
+          };
+        }),
+        yAxis: yAxis.map((e, i) => {
+          return {
+            ...e,
+            splitLine: {
+              lineStyle: {
+                opacity: i === 0 ? 0.1 : 0,
+              },
+            },
+          };
+        }),
+        series: baseSeries.reduce((curr: EChartsOption[], serie, index) => {
+          // const colors = ['#66ffff', '#00ff66', '#ffff66'];
+          const colors = ['#73C0DE', '#ED6666', '#5470C6', '#91CC75', '#FAC858', '#17d1b2', '#2ae271', '#11bce7', '#c127f0', '#ee125b'];
+          if (baseSeries.length === 1) {
+            curr.push({
+              ...serie,
+              type: 'pictorialBar',
+              symbol: 'circle',
+              symbolPosition: 'end',
+              symbolSize: [50, 10],
+              symbolOffset: [0, -5],
+              barGap: '-100%',
+              yAxisIndex: index,
+              itemStyle: {
+                color: ({ dataIndex }) => colors[dataIndex % colors.length],
+              },
+            });
+            curr.push({
+              ...serie,
+              type: 'pictorialBar',
+              symbol: 'circle',
+              symbolPosition: 'start',
+              symbolSize: [50, 10],
+              symbolOffset: [0, 5],
+              barGap: '-100%',
+              yAxisIndex: index,
+              itemStyle: {
+                color: ({ dataIndex }) => colors[dataIndex % colors.length],
+              },
+            });
+          }
+          curr.push({
+            ...serie,
+            type: 'bar',
+            // silent: true,
+            yAxisIndex: index,
+            barWidth: 50,
+            barGap: '100%',
+            itemStyle: {
+              color: ({ dataIndex }) =>
+                new graphic.LinearGradient(0, 0, 0, 1, [
+                  { offset: 0, color: `${colors[dataIndex % colors.length]}44` },
+                  { offset: 0.5, color: colors[dataIndex % colors.length] },
+                  { offset: 1, color: colors[dataIndex % colors.length] },
+                ]),
+              borderRadius: [5, 5, 0, 0],
+            },
+            label: {
+              show: true, //开启显示
+              position: 'top', //在上方显示
+              textStyle: {
+                //数值样式
+                color: '#ffffffbb',
+                fontSize: 13,
+              },
+              formatter: function (obj) {
+                return obj['data'][1];
+              },
+            },
+          });
+
+          return curr;
+        }, []),
+      };
+    }
+
     return {};
   };
 

+ 1 - 1
src/views/vent/home/configurable/components/header.vue

@@ -12,7 +12,7 @@
     >
       <div class="flex-basis-100% flex flex-items-center" @click.prevent>
         <SwapOutlined class="w-30px" />
-        <div class="flex-grow-1">
+        <div class="w-100px flex-grow-1 overflow-hidden whitespace-nowrap text-ellipsis">
           {{ selectedDeviceLabel }}
         </div>
         <CaretUpOutlined class="w-30px" v-if="visible" />

+ 7 - 5
src/views/vent/home/configurable/components/preset/QHCurve.vue

@@ -12,10 +12,11 @@
 <script lang="ts" setup>
   import { ref, reactive, nextTick, defineProps, watch } from 'vue';
   import * as echarts from 'echarts';
+  import { get } from 'lodash-es';
   //   import { useGlobSetting } from '/@/hooks/setting';
   //   const { sysOrgCode } = useGlobSetting();
 
-  const props = defineProps<{ mainfan: Record<string, any> }>();
+  const props = defineProps<{ mainfan: Record<string, any>; /** QH */ fan1Prop: [string, string]; fan2Prop: [string, string] }>();
   const selectDataObj = ref({
     dataQ: 0,
     dataH: 0,
@@ -33,16 +34,17 @@
   function changeSelect(selectData) {
     let objParam;
     if (!selectData) return;
+    if (!selectData.readData) return;
     const fan2Active = selectData.readData.Fan2StartStatus && selectData.readData.Fan2StartStatus == '1';
     if (fan2Active) {
       objParam = {
-        dataQ: selectData.readData.Fan2m3 || 0,
-        dataH: Math.abs(Number(selectData.readData.Fan2FanPre || 0)),
+        dataQ: get(selectData, props.fan2Prop[0], 0),
+        dataH: Math.abs(Number(get(selectData, props.fan2Prop[1], 0))),
       };
     } else {
       objParam = {
-        dataQ: selectData.readData.Fan1m3 || 0,
-        dataH: Math.abs(Number(selectData.readData.Fan1FanPre || 0)),
+        dataQ: get(selectData, props.fan1Prop[0], 0),
+        dataH: Math.abs(Number(get(selectData, props.fan1Prop[1], 0))),
       };
     }
 

+ 60 - 2
src/views/vent/home/configurable/configurable.api.ts

@@ -1,3 +1,4 @@
+import { floor, random } from 'lodash-es';
 import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
@@ -13,10 +14,67 @@ enum Api {
 const cache = new Map<string, Promise<any>>();
 
 /**
- * 列表接口
+ * 列表接口,5.5专用,和6.0的getHomeData基本一致
  * @param params
  */
-export const list = (params) => defHttp.post({ url: Api.list, params });
+export const list = (params) => {
+  const key = `${Api.list}?${JSON.stringify(params)}`;
+  if (!cache.has(key)) {
+    cache.set(
+      key,
+      defHttp.post({ url: Api.list, params }).finally(() => {
+        cache.delete(key);
+      })
+    );
+  }
+  return (cache.get(key) as Promise<any>).then((res) => {
+    res.fanmain.forEach((e) => {
+      if (e.readData.Fan2StartStatus === '1') {
+        e.current = '二号';
+        e.readData.FanFreqHz = e.readData.Fan2FreqHz;
+      } else {
+        e.current = '一号';
+        e.readData.FanFreqHz = e.readData.Fan1FreqHz;
+      }
+    });
+    res.fanlocal.forEach((e) => {
+      e.chartData = [
+        {
+          x: '吸风量',
+          yRealtime: e.readData.windQuantity1,
+          yMock: floor(parseFloat(e.inletAirVolume_merge) * random(0.98, 1, false), 2),
+          y: e.inletAirVolume_merge,
+        },
+        {
+          x: '供风量',
+          yRealtime: e.readData.windQuantity2,
+          yMock: floor(parseFloat(e.ductOutletAirVolume_merge) * random(0.98, 1, false), 2),
+          y: e.ductOutletAirVolume_merge,
+        },
+      ];
+      if (e.readData.Fan2StartStatus === '1') {
+        e.current = '二号';
+        e.readData.FanfHz = e.readData.Fan2fHz;
+      } else {
+        e.current = '一号';
+        e.readData.FanfHz = e.readData.Fan1fHz;
+      }
+    });
+    res.sys_majorpath.forEach((e) => {
+      const { drag_1, drag_2, drag_3, drag_total } = e.majorpath;
+      const { retM3_merge } = e.readData;
+      const m3_merge = parseInt(retM3_merge.value);
+      e.piechart = [
+        { val: drag_1, valMock: floor((drag_1 / drag_total) * m3_merge), label: '进风区' },
+        { val: drag_2, valMock: floor((drag_2 / drag_total) * m3_merge), label: '用风区' },
+        { val: drag_3, valMock: floor((drag_3 / drag_total) * m3_merge), label: '回风区' },
+      ];
+    });
+    res.device_arr = Object.values(res.device);
+
+    return res;
+  });
+};
 
 export const getHomeData = (params) => {
   const key = `${Api.getHomeData}?${JSON.stringify(params)}`;

+ 727 - 171
src/views/vent/home/configurable/configurable.data.ts

@@ -2,154 +2,6 @@ import { Config } from '../../deviceManager/configurationTable/types';
 // import { BDdustMock, BDfireMock } from './configurable.data.bd';
 
 export const testConfigVent: Config[] = [
-  // {
-  //   deviceType: 'fanmain',
-  //   moduleName: '主通风机系统',
-  //   pageType: 'vent',
-  //   moduleData: {
-  //     header: {
-  //       show: true,
-  //       readFrom: '',
-  //       selector: {
-  //         show: true,
-  //         value: '${strinstallpos}',
-  //       },
-  //       slot: {
-  //         show: true,
-  //         value: '运行风机:${readData.Fan1StartStatus}',
-  //         trans: {
-  //           '1': '一号',
-  //           '0': '二号',
-  //         },
-  //       },
-  //     },
-  //     background: {
-  //       show: true,
-  //       type: 'video',
-  //       link: '/video/mainFan.mp4',
-  //     },
-  //     layout: {
-  //       direction: 'column',
-  //       items: [
-  //         {
-  //           name: 'board',
-  //           basis: '40%',
-  //         },
-  //       ],
-  //     },
-  //     board: [
-  //       {
-  //         type: 'A',
-  //         readFrom: 'readData',
-  //         layout: 'val-top',
-  //         items: [
-  //           {
-  //             label: '风量(m³/min)',
-  //             value: '${m3}',
-  //           },
-  //           {
-  //             label: '负压(Pa)',
-  //             value: '${Fan1StartStatus}',
-  //             trans: {
-  //               '1': '${Fan1FreqHz}',
-  //               '0': '${Fan1FreqHz}',
-  //             },
-  //           },
-  //           {
-  //             label: '频率(Hz)',
-  //             value: '${DataPa}',
-  //           },
-  //         ],
-  //       },
-  //     ],
-  //     list: [],
-  //     chart: [],
-  //     table: [],
-  //     gallery: [],
-  //     complex_list: [],
-  //     gallery_list: [],
-  //     preset: [],
-  //   },
-  //   showStyle: {
-  //     size: 'width:450px;height:280px;',
-  //     version: '新版',
-  //     position: 'top:60px;left:0;',
-  //   },
-  // },
-  // {
-  //   deviceType: 'fanlocal',
-  //   moduleName: '局部通风机系统',
-  //   pageType: 'vent',
-  //   moduleData: {
-  //     header: {
-  //       show: true,
-  //       readFrom: '',
-  //       selector: {
-  //         show: true,
-  //         value: '${strinstallpos}',
-  //       },
-  //       slot: {
-  //         show: true,
-  //         value: '运行风机:${readData.Fan1StartStatus}',
-  //         trans: {
-  //           '1': '一号',
-  //           '0': '二号',
-  //         },
-  //       },
-  //     },
-  //     background: {
-  //       show: true,
-  //       type: 'video',
-  //       link: '/video/fanLocal.mp4',
-  //     },
-  //     layout: {
-  //       direction: 'column',
-  //       items: [
-  //         {
-  //           name: 'board',
-  //           basis: '40%',
-  //         },
-  //       ],
-  //     },
-  //     board: [
-  //       {
-  //         type: 'A',
-  //         readFrom: 'readData',
-  //         layout: 'val-top',
-  //         items: [
-  //           {
-  //             label: '吸风量(m³/min)',
-  //             value: '${windQuantity1}',
-  //           },
-  //           {
-  //             label: '供风量(m³/min)',
-  //             value: '${windQuantity2}',
-  //           },
-  //           {
-  //             label: '频率(Hz)',
-  //             value: '${Fan1StartStatus}',
-  //             trans: {
-  //               '1': '${Fan1fHz}',
-  //               '0': '${Fan2fHz}',
-  //             },
-  //           },
-  //         ],
-  //       },
-  //     ],
-  //     list: [],
-  //     chart: [],
-  //     table: [],
-  //     gallery: [],
-  //     complex_list: [],
-  //     gallery_list: [],
-  //     preset: [],
-  //   },
-  //   showStyle: {
-  //     size: 'width:450px;height:280px;',
-  //     version: '新版',
-  //     position: 'top:350px;left:0;',
-  //   },
-  // },
   {
     deviceType: 'fanmain',
     moduleName: '主通风机系统',
@@ -192,20 +44,16 @@ export const testConfigVent: Config[] = [
       board: [
         {
           type: 'A',
-          readFrom: 'readData',
+          readFrom: '',
           layout: 'val-top',
           items: [
             {
               label: '风量(m³/min)',
-              value: '${m3}',
+              value: '${flow_merge}',
             },
             {
               label: '负压(Pa)',
-              value: '${Fan1StartStatus}',
-              trans: {
-                '1': '${Fan1FreqHz}',
-                '0': '${Fan1FreqHz}',
-              },
+              value: '${fy_merge}',
             },
           ],
         },
@@ -219,6 +67,8 @@ export const testConfigVent: Config[] = [
       preset: [
         {
           readFrom: '',
+          fan1Prop: ['flow_merge', 'fy_merge'],
+          fan2Prop: ['flow_merge', 'fy_merge'],
         },
       ],
     },
@@ -267,7 +117,7 @@ export const testConfigVent: Config[] = [
       list: [],
       chart: [
         {
-          type: 'bar_cylinder',
+          type: 'bar_cylinder_wide',
           readFrom: '',
           legend: { show: false },
           xAxis: [{ show: true }],
@@ -305,20 +155,51 @@ export const testConfigVent: Config[] = [
         },
       },
       background: {
-        show: true,
-        type: 'video',
-        link: '/video/gate.mp4',
+        show: false,
+        type: 'image',
+        link: '',
       },
       layout: {
         direction: 'row',
-        items: [],
+        items: [
+          {
+            name: 'complex_list',
+            basis: '100%',
+          },
+        ],
       },
       board: [],
       list: [],
       chart: [],
       table: [],
       gallery: [],
-      complex_list: [],
+      complex_list: [
+        {
+          type: 'F',
+          readFrom: 'device_arr',
+          mapFromData: true,
+          items: [
+            {
+              title: '${name}',
+              contents: [
+                {
+                  label: '总数',
+                  value: '${totalcount}',
+                },
+                {
+                  label: '报警',
+                  value: '${count}',
+                  color: 'red',
+                },
+                {
+                  label: '断开',
+                  value: '${netstatus}',
+                },
+              ],
+            },
+          ],
+        },
+      ],
       gallery_list: [],
       preset: [],
     },
@@ -378,7 +259,7 @@ export const testConfigVent: Config[] = [
           ],
           series: [
             { readFrom: 'sys_wind', xprop: 'strinstallpos', yprop: 'readData.m3', label: '风量' },
-            { readFrom: 'sys_wind', xprop: 'strinstallpos', yprop: 'readData.incipientWindSpeed1', label: '风速' },
+            { readFrom: 'sys_wind', xprop: 'strinstallpos', yprop: 'readData.va', label: '风速' },
           ],
         },
       ],
@@ -427,16 +308,16 @@ export const testConfigVent: Config[] = [
       board: [
         {
           type: 'D',
-          readFrom: 'majorpath',
+          readFrom: 'readData',
           layout: 'label-top',
           items: [
             {
               label: '矿井风量',
-              value: '${m3_total}',
+              value: '${retM3_merge.value}',
             },
             {
               label: '矿井阻力',
-              value: '${drag_total}',
+              value: '${zuli.value}',
             },
             {
               label: '等积孔',
@@ -456,7 +337,7 @@ export const testConfigVent: Config[] = [
           legend: { show: false },
           xAxis: [{ show: false }],
           yAxis: [{ show: false, name: '风量', position: 'left' }],
-          series: [{ readFrom: 'piechart', xprop: 'label', yprop: 'val', label: '-' }],
+          series: [{ readFrom: 'piechart', xprop: 'label', yprop: 'valMock', label: '' }],
         },
       ],
       gallery_list: [],
@@ -511,15 +392,15 @@ export const testConfigVent: Config[] = [
           items: [
             {
               label: '进风',
-              value: '${jin}',
+              value: '${faceIntM3}',
             },
             {
               label: '回风',
-              value: '${hui}',
+              value: '${faceRetM3}',
             },
             {
               label: '需风量',
-              value: '${xufengliang}',
+              value: '${facePlanM3}',
             },
           ],
         },
@@ -536,8 +417,8 @@ export const testConfigVent: Config[] = [
           xAxis: [{ show: true }],
           yAxis: [{ show: true, name: '风量(m³/min)', position: 'left' }],
           series: [
-            { readFrom: 'history', xprop: 'time', yprop: 'jin', label: '进风' },
-            { readFrom: 'history', xprop: 'time', yprop: 'hui', label: '回风' },
+            { readFrom: 'history_report', xprop: 'time', yprop: 'faceIntM3', label: '进风' },
+            { readFrom: 'history_report', xprop: 'time', yprop: 'faceRetM3', label: '回风' },
           ],
         },
       ],
@@ -1535,3 +1416,678 @@ export const testConfigFire: Config[] = [
     },
   },
 ];
+
+export const testConfigVentRealtime: Config[] = [
+  {
+    deviceType: 'fanmain',
+    moduleName: '主通风机系统',
+    pageType: 'vent_realtime',
+    moduleData: {
+      header: {
+        show: true,
+        readFrom: '',
+        selector: {
+          show: true,
+          value: '${strinstallpos}',
+        },
+        slot: {
+          show: true,
+          value: '运行风机:${readData.Fan1StartStatus}',
+          trans: {
+            '1': '一号',
+            '0': '二号',
+          },
+        },
+      },
+      background: {
+        show: false,
+        type: 'image',
+        link: '',
+      },
+      layout: {
+        direction: 'column',
+        items: [
+          {
+            name: 'board',
+            basis: '33%',
+          },
+          {
+            name: 'qh_curve',
+            basis: '67%',
+          },
+        ],
+      },
+      board: [
+        {
+          type: 'A',
+          readFrom: 'readData',
+          layout: 'val-top',
+          items: [
+            {
+              label: '风量(m³/min)',
+              value: '${Fan1StartStatus}',
+              trans: {
+                '1': '${Fan1_FanFlow}',
+                '0': '${Fan2_FanFlow}',
+              },
+            },
+            {
+              label: '负压(Pa)',
+              value: '${Fan1StartStatus}',
+              trans: {
+                '1': '${Fan1FanPre}',
+                '0': '${Fan2FanPre}',
+              },
+            },
+          ],
+        },
+      ],
+      list: [],
+      chart: [],
+      table: [],
+      gallery: [],
+      complex_list: [],
+      gallery_list: [],
+      preset: [
+        {
+          readFrom: '',
+          fan1Prop: ['readData.Fan1_FanFlow', 'readData.Fan1FanPre'],
+          fan2Prop: ['readData.Fan2_FanFlow', 'readData.Fan2FanPre'],
+        },
+      ],
+    },
+    showStyle: {
+      size: 'width:450px;height:280px;',
+      version: '新版',
+      position: 'top:60px;left:0;',
+    },
+  },
+  {
+    deviceType: 'fanlocal',
+    moduleName: '局部通风机系统',
+    pageType: 'vent_realtime',
+    moduleData: {
+      header: {
+        show: true,
+        readFrom: '',
+        selector: {
+          show: true,
+          value: '${strinstallpos}',
+        },
+        slot: {
+          show: true,
+          value: '运行风机:${readData.Fan1StartStatus}',
+          trans: {
+            '1': '一号',
+            '0': '二号',
+          },
+        },
+      },
+      background: {
+        show: false,
+        type: 'image',
+        link: '',
+      },
+      layout: {
+        direction: 'column',
+        items: [
+          {
+            name: 'chart',
+            basis: '100%',
+          },
+        ],
+      },
+      board: [],
+      list: [],
+      chart: [
+        {
+          type: 'bar_cylinder_wide',
+          readFrom: '',
+          legend: { show: false },
+          xAxis: [{ show: true }],
+          yAxis: [{ show: true, name: '(m³/min)', position: 'left' }],
+          series: [
+            { readFrom: 'chartData', xprop: 'x', yprop: 'yMock', label: '风量' },
+            // { readFrom: '', xprop: 'x', yprop: 'y2', label: '风量' },
+          ],
+        },
+      ],
+      table: [],
+      gallery: [],
+      complex_list: [],
+      gallery_list: [],
+      preset: [],
+    },
+    showStyle: {
+      size: 'width:450px;height:280px;',
+      version: '新版',
+      position: 'top:350px;left:0;',
+    },
+  },
+  {
+    deviceType: '',
+    moduleName: '通风设施远程控制',
+    pageType: 'vent_realtime',
+    moduleData: {
+      header: {
+        show: false,
+        readFrom: '',
+        selector: {
+          show: false,
+          value: '',
+        },
+        slot: {
+          show: false,
+          value: '',
+        },
+      },
+      background: {
+        show: false,
+        type: 'image',
+        link: '',
+      },
+      layout: {
+        direction: 'row',
+        items: [
+          {
+            name: 'complex_list',
+            basis: '100%',
+          },
+        ],
+      },
+      board: [],
+      list: [],
+      chart: [],
+      table: [],
+      gallery: [],
+      complex_list: [
+        {
+          type: 'F',
+          readFrom: 'device_arr',
+          mapFromData: true,
+          items: [
+            {
+              title: '${name}',
+              contents: [
+                {
+                  label: '总数',
+                  value: '${totalcount}',
+                },
+                {
+                  label: '报警',
+                  value: '${count}',
+                  color: 'red',
+                },
+                {
+                  label: '断开',
+                  value: '${netstatus}',
+                },
+              ],
+            },
+          ],
+        },
+      ],
+      gallery_list: [],
+      preset: [],
+    },
+    showStyle: {
+      size: 'width:450px;height:280px;',
+      version: '新版',
+      position: 'top:640px;left:0;',
+    },
+  },
+  {
+    deviceType: 'sys_wind',
+    moduleName: '风量监测',
+    pageType: 'vent_realtime',
+    moduleData: {
+      header: {
+        show: false,
+        readFrom: '',
+        selector: {
+          show: false,
+          value: '',
+        },
+        slot: {
+          show: false,
+          value: '',
+        },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'row',
+        items: [
+          {
+            name: 'chart',
+            basis: '100%',
+          },
+        ],
+      },
+      board: [],
+      list: [],
+      table: [],
+      preset: [],
+      gallery: [],
+      complex_list: [],
+      gallery_list: [],
+      chart: [
+        {
+          type: 'bar',
+          readFrom: '',
+          legend: { show: true },
+          xAxis: [{ show: true }],
+          yAxis: [
+            { show: true, name: '风量(m³/min)', position: 'left' },
+            { show: true, name: '风速(m/s)', position: 'right' },
+          ],
+          series: [
+            { readFrom: 'sys_wind', xprop: 'strinstallpos', yprop: 'readData.m3', label: '风量' },
+            { readFrom: 'sys_wind', xprop: 'strinstallpos', yprop: 'readData.va', label: '风速' },
+          ],
+        },
+      ],
+    },
+    showStyle: {
+      size: 'width:1000px;height:280px;',
+      version: '新版',
+      position: 'top:640px;left:460px;',
+    },
+  },
+  {
+    deviceType: 'sys_majorpath',
+    moduleName: '关键通风路线',
+    pageType: 'vent_realtime',
+    moduleData: {
+      header: {
+        show: true,
+        readFrom: '',
+        selector: {
+          show: true,
+          value: '${devicePos}',
+        },
+        slot: {
+          show: false,
+          value: '',
+        },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'column',
+        items: [
+          {
+            name: 'chart',
+            basis: '60%',
+          },
+          {
+            name: 'board',
+            basis: '40%',
+          },
+        ],
+      },
+      board: [
+        {
+          type: 'D',
+          readFrom: 'majorpath',
+          layout: 'label-top',
+          items: [
+            {
+              label: '矿井风量',
+              value: '${m3_total}',
+            },
+            {
+              label: '矿井阻力',
+              value: '${drag_total}',
+            },
+            {
+              label: '等积孔',
+              value: '6.12',
+            },
+          ],
+        },
+      ],
+      complex_list: [],
+      gallery: [],
+      list: [],
+      table: [],
+      chart: [
+        {
+          type: 'pie',
+          readFrom: '',
+          legend: { show: false },
+          xAxis: [{ show: false }],
+          yAxis: [{ show: false, name: '风量', position: 'left' }],
+          series: [{ readFrom: 'piechart', xprop: 'label', yprop: 'val', label: '-' }],
+        },
+      ],
+      gallery_list: [],
+      preset: [],
+    },
+    showStyle: {
+      size: 'width:450px;height:280px;',
+      version: '新版',
+      position: 'top:60px;right:0;',
+    },
+  },
+  {
+    deviceType: 'sys_surface_caimei',
+    moduleName: '工作面智能监控',
+    pageType: 'vent_realtime',
+    moduleData: {
+      header: {
+        show: true,
+        readFrom: '',
+        selector: {
+          show: true,
+          value: '${devicePos}',
+        },
+        slot: {
+          show: false,
+          value: '',
+        },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'column',
+        items: [
+          {
+            name: 'chart',
+            basis: '65%',
+          },
+          {
+            name: 'board',
+            basis: '35%',
+          },
+        ],
+      },
+      board: [
+        {
+          type: 'B',
+          readFrom: '',
+          layout: 'label-top',
+          items: [
+            {
+              label: '进风',
+              value: '${jin}',
+            },
+            {
+              label: '回风',
+              value: '${hui}',
+            },
+            // {
+            //   label: '需风量',
+            //   value: '${xufengliang}',
+            // },
+          ],
+        },
+      ],
+      list: [],
+      preset: [],
+      table: [],
+      gallery: [],
+      chart: [
+        {
+          type: 'line',
+          readFrom: '',
+          legend: { show: true },
+          xAxis: [{ show: true }],
+          yAxis: [{ show: true, name: '风量(m³/min)', position: 'left' }],
+          series: [
+            { readFrom: 'history', xprop: 'time', yprop: 'jin', label: '进风' },
+            { readFrom: 'history', xprop: 'time', yprop: 'hui', label: '回风' },
+          ],
+        },
+      ],
+      gallery_list: [],
+      complex_list: [],
+    },
+    showStyle: {
+      size: 'width:450px;height:280px;',
+      version: '新版',
+      position: 'top:350px;right:0;',
+    },
+  },
+  {
+    deviceType: 'warn',
+    moduleName: '预警监测',
+    pageType: 'vent_realtime',
+    moduleData: {
+      header: {
+        show: true,
+        readFrom: '',
+        selector: {
+          show: false,
+          value: '',
+        },
+        slot: {
+          show: true,
+          value: '网络异常:${warn[0].netstatus.val}',
+        },
+      },
+      background: {
+        show: false,
+        type: 'video',
+        link: '',
+      },
+      layout: {
+        direction: 'row',
+        items: [
+          {
+            name: 'list',
+            basis: '100%',
+          },
+        ],
+      },
+      board: [],
+      list: [
+        {
+          type: 'timeline',
+          readFrom: 'warn[0]',
+          items: [
+            {
+              label: '报警',
+              value: '${alarm.val}',
+              info: '',
+              color: 'blue',
+            },
+            {
+              label: '重大风险预警',
+              value: '${red.val}',
+              info: '',
+              color: 'red',
+            },
+            {
+              label: '较大风险预警',
+              value: '${orange.val}',
+              info: '',
+              color: 'orange',
+            },
+            {
+              label: '一般风险预警',
+              value: '${yellow.val}',
+              info: '',
+              color: 'yellow',
+            },
+            {
+              label: '低风险预警',
+              value: '${blue.val}',
+              info: '',
+              color: 'blue',
+            },
+          ],
+        },
+      ],
+      preset: [],
+      table: [],
+      gallery: [],
+      chart: [],
+      gallery_list: [],
+      complex_list: [],
+    },
+    showStyle: {
+      size: 'width:450px;height:280px;',
+      version: '新版',
+      position: 'top:640px;right:0;',
+    },
+  },
+];
+
+// {
+//   deviceType: 'fanmain',
+//   moduleName: '主通风机系统',
+//   pageType: 'vent',
+//   moduleData: {
+//     header: {
+//       show: true,
+//       readFrom: '',
+//       selector: {
+//         show: true,
+//         value: '${strinstallpos}',
+//       },
+//       slot: {
+//         show: true,
+//         value: '运行风机:${readData.Fan1StartStatus}',
+//         trans: {
+//           '1': '一号',
+//           '0': '二号',
+//         },
+//       },
+//     },
+//     background: {
+//       show: true,
+//       type: 'video',
+//       link: '/video/mainFan.mp4',
+//     },
+//     layout: {
+//       direction: 'column',
+//       items: [
+//         {
+//           name: 'board',
+//           basis: '40%',
+//         },
+//       ],
+//     },
+//     board: [
+//       {
+//         type: 'A',
+//         readFrom: 'readData',
+//         layout: 'val-top',
+//         items: [
+//           {
+//             label: '风量(m³/min)',
+//             value: '${m3}',
+//           },
+//           {
+//             label: '负压(Pa)',
+//             value: '${Fan1StartStatus}',
+//             trans: {
+//               '1': '${Fan1FreqHz}',
+//               '0': '${Fan1FreqHz}',
+//             },
+//           },
+//           {
+//             label: '频率(Hz)',
+//             value: '${DataPa}',
+//           },
+//         ],
+//       },
+//     ],
+//     list: [],
+//     chart: [],
+//     table: [],
+//     gallery: [],
+//     complex_list: [],
+//     gallery_list: [],
+//     preset: [],
+//   },
+//   showStyle: {
+//     size: 'width:450px;height:280px;',
+//     version: '新版',
+//     position: 'top:60px;left:0;',
+//   },
+// },
+// {
+//   deviceType: 'fanlocal',
+//   moduleName: '局部通风机系统',
+//   pageType: 'vent',
+//   moduleData: {
+//     header: {
+//       show: true,
+//       readFrom: '',
+//       selector: {
+//         show: true,
+//         value: '${strinstallpos}',
+//       },
+//       slot: {
+//         show: true,
+//         value: '运行风机:${readData.Fan1StartStatus}',
+//         trans: {
+//           '1': '一号',
+//           '0': '二号',
+//         },
+//       },
+//     },
+//     background: {
+//       show: true,
+//       type: 'video',
+//       link: '/video/fanLocal.mp4',
+//     },
+//     layout: {
+//       direction: 'column',
+//       items: [
+//         {
+//           name: 'board',
+//           basis: '40%',
+//         },
+//       ],
+//     },
+//     board: [
+//       {
+//         type: 'A',
+//         readFrom: 'readData',
+//         layout: 'val-top',
+//         items: [
+//           {
+//             label: '吸风量(m³/min)',
+//             value: '${windQuantity1}',
+//           },
+//           {
+//             label: '供风量(m³/min)',
+//             value: '${windQuantity2}',
+//           },
+//           {
+//             label: '频率(Hz)',
+//             value: '${Fan1StartStatus}',
+//             trans: {
+//               '1': '${Fan1fHz}',
+//               '0': '${Fan2fHz}',
+//             },
+//           },
+//         ],
+//       },
+//     ],
+//     list: [],
+//     chart: [],
+//     table: [],
+//     gallery: [],
+//     complex_list: [],
+//     gallery_list: [],
+//     preset: [],
+//   },
+//   showStyle: {
+//     size: 'width:450px;height:280px;',
+//     version: '新版',
+//     position: 'top:350px;left:0;',
+//   },
+// },

+ 272 - 0
src/views/vent/home/configurable/vent_v5.vue

@@ -0,0 +1,272 @@
+<!-- eslint-disable vue/multi-word-component-names -->
+<template>
+  <div class="company-home">
+    <div v-if="!route.query.embed" class="top-bg">
+      <div class="main-title">{{ mainTitle }}</div>
+    </div>
+    <!-- <a-dropdown class="module-dropdown" :class="{ 'module-dropdown-original': isOriginal }" :trigger="['click']" placement="bottomRight">
+      <a class="ant-dropdown-link" @click.prevent>
+        全矿井通风检测
+        <CaretDownOutlined />
+      </a>
+      <template #overlay>
+        <MonitorCenter />
+      </template>
+    </a-dropdown> -->
+    <!-- 如果是有 deviceType、type 等 query,认为是详情页,不需要展示普通模块,只需要模型 -->
+    <template v-if="route.query.deviceType">
+      <div style="width: 100%; height: 100%; position: absolute; left: 0; top: 0">
+        <VentModal />
+        <div class="switch-button icon-goto right-5px" @click="goMicroApp(true)"></div>
+      </div>
+    </template>
+    <template v-else>
+      <!-- 采用定位方式以避免出现各个模块隐藏时其他模块下移的问题 -->
+      <template v-if="isOriginal">
+        <ModuleOriginal
+          v-for="cfg in configs"
+          :key="cfg.deviceType"
+          :show-style="cfg.showStyle"
+          :module-data="cfg.moduleData"
+          :module-name="cfg.moduleName"
+          :device-type="cfg.deviceType"
+          :data="data"
+          :visible="true"
+        />
+      </template>
+      <template v-else-if="isCommon">
+        <ModuleCommon
+          v-for="cfg in configs"
+          :key="cfg.deviceType"
+          :show-style="cfg.showStyle"
+          :module-data="cfg.moduleData"
+          :module-name="cfg.moduleName"
+          :device-type="cfg.deviceType"
+          :data="data"
+          :visible="true"
+        />
+      </template>
+      <template v-else>
+        <!-- 下面是正常展示的各新版模块 -->
+        <ModuleEnhanced
+          v-for="cfg in enhancedConfigs"
+          :key="cfg.deviceType"
+          :visible="cfg.visible"
+          :show-style="cfg.showStyle"
+          :module-data="cfg.moduleData"
+          :module-name="cfg.moduleName"
+          :device-type="cfg.deviceType"
+          :data="data"
+          @close="cfg.visible = false"
+        />
+        <!-- 下面是用于呼出已隐藏的模块的按钮 -->
+        <div class="pos-absolute top-70px left-460px z-3">
+          <div v-for="(item, i) in hiddenList" :key="`vvhchg${i}`">
+            <AButton class="module-trigger-button" @click="item.visible = true">{{ item.moduleName }}</AButton>
+          </div>
+        </div>
+      </template>
+      <div style="width: 1000px; height: 570px; position: absolute; left: calc(50% - 500px); top: 60px">
+        <VentModal />
+        <div
+          v-if="sysDataType === 'all'"
+          :class="{ 'realtime-mode': isDataRealTime }"
+          alt="切换数据模式"
+          class="switch-button report-mode right-50px"
+          @click="switchDataMode"
+        ></div>
+        <div class="switch-button icon-goto right-5px" @click="goMicroApp()"></div>
+      </div>
+    </template>
+  </div>
+</template>
+<script lang="ts" setup>
+  import { onMounted, onUnmounted, ref, watch } from 'vue';
+  // import { CaretDownOutlined } from '@ant-design/icons-vue';
+  // import MonitorCenter from './components/MonitorCenter.vue';
+  import { useInitConfigs, useInitPage } from './hooks/useInit';
+  import ModuleEnhanced from './components/ModuleEnhanced.vue';
+  import ModuleOriginal from './components/ModuleOriginal.vue';
+  import ModuleCommon from './components/ModuleCommon.vue';
+  // import { useRoute } from 'vue-router';
+  import VentModal from '/@/components/vent/micro/ventModal.vue';
+  import { list } from './configurable.api';
+  import { useRoute, useRouter } from 'vue-router';
+  import { useGlobSetting } from '/@/hooks/setting';
+  // import { testConfigVent, testConfigVentRealtime } from './configurable.data';
+
+  const { sysDataType } = useGlobSetting();
+  const { configs, isOriginal, isCommon, fetchConfigs } = useInitConfigs();
+  const { mainTitle, enhancedConfigs, hiddenList, data, updateData, updateEnhancedConfigs } = useInitPage('智能通风管控系统');
+  const route = useRoute();
+  const router = useRouter();
+  const isDataRealTime = ref(sysDataType === 'monitor');
+  let interval: number | undefined;
+
+  function switchDataMode() {
+    isDataRealTime.value = !isDataRealTime.value;
+    refresh();
+  }
+
+  function refresh() {
+    fetchConfigs(isDataRealTime.value ? 'vent_realtime' : 'vent').then(() => {
+      // configs.value = isDataRealTime.value ? testConfigVentRealtime : testConfigVent;
+      updateEnhancedConfigs(configs.value);
+
+      list({}).then(updateData);
+    });
+  }
+
+  function initInterval() {
+    setInterval(() => {
+      list({}).then(updateData);
+    }, 60000);
+  }
+
+  function goMicroApp(test = false) {
+    if (test) {
+      router.push({ path: route.path });
+    } else {
+      router.push({
+        path: route.path,
+        query: {
+          ...route.query,
+          type: 'model3D',
+          deviceType: 'model3D',
+        },
+      });
+    }
+  }
+
+  watch(
+    () => route.query,
+    () => {
+      if (route.query.deviceType) {
+        // 仅需要展示子应用,模拟 unmounted
+        clearInterval(interval);
+      } else {
+        // 模拟 mounted
+        refresh();
+        initInterval();
+      }
+    }
+  );
+
+  onMounted(() => {
+    refresh();
+    initInterval();
+  });
+
+  onUnmounted(() => {
+    clearInterval(interval);
+  });
+</script>
+<style lang="less" scoped>
+  @import '/@/design/theme.less';
+
+  @font-face {
+    font-family: 'douyuFont';
+    src: url('../../../../assets/font/douyuFont.otf');
+  }
+
+  @{theme-deepblue} {
+    .company-home {
+      --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
+    }
+  }
+
+  .company-home {
+    --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
+    --image-monitor-realtime: url('/@/assets/images/company/monitor-realtime.png');
+    --image-monitor-doc: url('/@/assets/images/company/monitor-doc.png');
+    --image-monitor-goto: url('/@/assets/images/company/monitor-goto.png');
+
+    width: 100%;
+    height: 100%;
+    color: @white;
+    position: relative;
+    // background: url('@/assets/images/home-container/configurable/firehome/bg.png') no-repeat center;
+
+    .top-bg {
+      width: 100%;
+      height: 56px;
+      background: var(--image-modal-top) no-repeat center;
+      position: absolute;
+      z-index: 1;
+      .main-title {
+        height: 56px;
+        font-family: 'douyuFont';
+        font-size: 20px;
+        letter-spacing: 2px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+    }
+
+    // .module-left {
+    //   position: absolute;
+    //   width: 450px;
+    //   height: 280px;
+    //   left: 0;
+    // }
+    // .module-right {
+    //   position: absolute;
+    //   width: 450px;
+    //   height: 280px;
+    //   right: 0;
+    // }
+    // .module-bottom {
+    //   position: absolute;
+    //   width: 1000px;
+    //   height: 280px;
+    // }
+    .module-dropdown {
+      padding: 10px;
+      background-image: @vent-configurable-dropdown;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
+      color: @vent-font-color;
+      position: absolute;
+      top: 70px;
+      right: 460px;
+    }
+    .module-dropdown-original {
+      padding: 10px;
+      background-image: @vent-configurable-dropdown;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
+      color: @vent-font-color;
+      position: absolute;
+      top: 70px;
+      right: 460px;
+    }
+    .module-trigger-button {
+      color: @vent-font-color;
+      background-image: @vent-configurable-dropdown;
+      border: none;
+      border-bottom: 2px solid @vent-configurable-home-light-border;
+    }
+
+    .switch-button {
+      width: 34px;
+      height: 34px;
+      position: absolute;
+      // right: 5px;
+      bottom: 5px;
+      z-index: 5;
+      background-repeat: no-repeat;
+      background-size: 100% 100%;
+    }
+    .report-mode {
+      background-image: var(--image-monitor-doc);
+    }
+    .realtime-mode {
+      background-image: var(--image-monitor-realtime);
+    }
+    .icon-goto {
+      background-image: var(--image-monitor-goto);
+    }
+  }
+  :deep(.loading-box) {
+    position: unset;
+  }
+</style>

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

@@ -37,7 +37,7 @@ export const groupParameterData = [
 ];
 export const deviceParameterData = [
   {
-    AirCompressor_ExhaustPre: '排气压力(KPa)',
+    AirCompressor_ExhaustPre: '排气压力(kPa)',
     AirCompressor_ExhaustTemp: '排气温度(­°C)',
   },
   {

+ 0 - 1
src/views/vent/monitorManager/compressor/nitrogen.dishang.threejs.ts

@@ -84,7 +84,6 @@ class NitrogenOverground {
 
   /* 点击 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;

+ 0 - 1
src/views/vent/monitorManager/compressor/nitrogen.dixia.threejs.ts

@@ -50,7 +50,6 @@ class NitrogenUnderground {
 
   resetModel() {
     clearTimeout(this.animationTimer);
-    this.isLRAnimation = false;
   }
 
   addCssText = () => {

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

@@ -266,7 +266,7 @@ export const majorColumns: BasicColumn[] = [
         width: 100,
       },
       // {
-      //   title:'风压(KPa)',
+      //   title:'风压(kPa)',
       //   align:"center",
       //   dataIndex: 'name1'
       // },
@@ -300,7 +300,7 @@ export const majorColumns: BasicColumn[] = [
         width: 100,
       },
       // {
-      //   title:'风压(KPa)',
+      //   title:'风压(kPa)',
       //   align:"center",
       //   dataIndex: 'name1'
       // },

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

@@ -707,7 +707,7 @@ function getMonitor(flag?) {
           } else if (deviceType.value.startsWith('gasDayReport')) {
             let searchParams = glob.sysOrgCode == 'sdmtjtbetmk' ? searchReportParam1.value : searchReportParam.value
             await getSearchReport(searchParams)//瓦斯日报
-          } else if (deviceType.value.startsWith('substation_normal')) {//分站
+          } else if (deviceType.value.startsWith('substation')) {//分站
             await getStationList()
           } else {
             await getDataSource();
@@ -901,12 +901,12 @@ function goLocation(record) {
     actions.setGlobalState({ locationId: record.devNum, locationObj: null, pageObj: null, type: record['deviceType'].split('_')[0] });
   } else if (deviceType.value == 'bundleSpyDayReport' || deviceType.value == 'dustDayReport' || deviceType.value == 'bundleDayReport') {
     actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
-  } else if (deviceType.value == 'gasDay_normal') {
+  } else if (deviceType.value.startsWith('gasDay')) {
     actions.setGlobalState({ locationName: record.strInstallPos, locationObj: null, pageObj: null, type: record['deviceType'] });
   } else if (deviceType.value == 'gasDayReport') {
     actions.setGlobalState({ locationName: record.jcdd, locationObj: null, pageObj: null, type: record['deviceType'] });
-  } else if (deviceType.value == 'substation_normal') {
-    actions.setGlobalState({ locationName: record.strinstallpos, locationObj: null, pageObj: null, type: record['deviceType'] });
+  } else if (deviceType.value.startsWith('substation')) {
+    actions.setGlobalState({ locationId: record.id, locationObj: null, pageObj: null, type: record['deviceType'] });
   } else {
     if (deviceType.value.startsWith('location')) {
       actions.setGlobalState({ locationId: record.deviceID, locationObj: null, pageObj: null, type: 'person' });

+ 27 - 16
src/views/vent/monitorManager/fanLocalMonitor/fanLocal.threejs.ts

@@ -95,20 +95,31 @@ export function setModelType(modelType: 'fanLocal' | 'fanLocalDual' | string, su
           group.children.forEach((e) => {
             e.visible = true;
           });
-          // const oldCameraPosition = { x: -693, y: 474, z: 398 };
-          // const position = { x: 14.826074594663222, y: 16.901762713393836, z: 36.459944037951004 };
-          // await animateCamera(
-          //   oldCameraPosition,
-          //   { x: 0, y: 0, z: 0 },
-          //   { x: position.x, y: position.y, z: position.z },
-          //   { x: 0, y: 0, z: 0 },
-          //   model,
-          //   0.8
-          // );
 
           // 模型不同需要不同的初始角度与位置
-          const oldCameraPosition = { x: 615, y: 275, z: 744 };
-          await animateCamera(oldCameraPosition, { x: 0, y: 0, z: 0 }, { x: -1.85, y: 13.58, z: 37.39 }, { x: -1.83, y: 2.58, z: -0.75 }, model, 0.8);
+          if (type == 'fanLocal') {
+            const oldCameraPosition = { x: 615, y: 275, z: 744 };
+            await animateCamera(
+              oldCameraPosition,
+              { x: 0, y: 0, z: 0 },
+              { x: -1.85, y: 13.58, z: 37.39 },
+              { x: -1.83, y: 2.58, z: -0.75 },
+              model,
+              0.8
+            );
+          } else {
+            const oldCameraPosition = { x: -693, y: 474, z: 398 };
+            const position = { x: 14.826074594663222, y: 16.901762713393836, z: 36.459944037951004 };
+            await animateCamera(
+              oldCameraPosition,
+              { x: 0, y: 0, z: 0 },
+              { x: position.x, y: position.y, z: position.z },
+              { x: 0, y: 0, z: 0 },
+              model,
+              0.8
+            );
+          }
+
           resolve(null);
         }, 400);
       }
@@ -137,10 +148,10 @@ export function mountedThree(sceneSelctor: string, cssSelectors: string[]) {
     const model2 = new FanLocalDual(model);
     await model2.mountedThree();
     // 暂时先不加双行
-    // modelContextList.push({
-    //   type: 'fanLocalDual',
-    //   context: model2,
-    // });
+    modelContextList.push({
+      type: 'fanLocalDual',
+      context: model2,
+    });
 
     initEventListender();
     setCamera();

+ 1 - 18
src/views/vent/monitorManager/gateMonitor/gate.threejs.noStation.ts

@@ -176,15 +176,6 @@ class FmNoStation {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     if (this.mixers && this.fmClock.running) {
       this.mixers.update(2);
@@ -193,21 +184,13 @@ class FmNoStation {
 
   /* 点击风门 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
     }
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 18
src/views/vent/monitorManager/gateMonitor/gate.threejs.qd.ts

@@ -195,15 +195,6 @@ class Fm3 {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     if (this.mixers && this.fmClock.running) {
       this.mixers.update(2);
@@ -212,21 +203,13 @@ class Fm3 {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
     }
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 18
src/views/vent/monitorManager/gateMonitor/gate.threejs.three.tl.ts

@@ -207,15 +207,6 @@ class FmThreeTl {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     // 风门开关动画
     if (this.mixers && this.fmClock.running) this.mixers.update(2);
@@ -223,7 +214,6 @@ class FmThreeTl {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -237,14 +227,7 @@ class FmThreeTl {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 18
src/views/vent/monitorManager/gateMonitor/gate.threejs.three.ts

@@ -200,15 +200,6 @@ class Fm2 {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     // 风门开关动画
     if (this.mixers && this.fmClock.running) this.mixers.update(2);
@@ -216,7 +207,6 @@ class Fm2 {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -260,14 +250,7 @@ class Fm2 {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 18
src/views/vent/monitorManager/gateMonitor/gate.threejs.two.ss.ts

@@ -220,15 +220,6 @@ class FmTwoSs {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     if (this.mixers && this.fmClock.running) {
       this.mixers.update(2);
@@ -237,7 +228,6 @@ class FmTwoSs {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -279,14 +269,7 @@ class FmTwoSs {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 18
src/views/vent/monitorManager/gateMonitor/gate.threejs.two.yj.ts

@@ -220,15 +220,6 @@ class FmTwoYj {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     if (this.mixers && this.fmClock.running) {
       this.mixers.update(2);
@@ -237,7 +228,6 @@ class FmTwoYj {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -279,14 +269,7 @@ class FmTwoYj {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 18
src/views/vent/monitorManager/gateMonitor/gate.threejs.window.ts

@@ -190,15 +190,6 @@ class FmDc {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     if (this.mixers && this.fmClock.running) {
       this.mixers.update(2);
@@ -207,21 +198,13 @@ class FmDc {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
     }
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 18
src/views/vent/monitorManager/gateMonitor/gate.threejs.xc.ts

@@ -221,15 +221,6 @@ class FmXR {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     if (this.mixers && this.fmClock.running) {
       this.mixers.update(2);
@@ -238,7 +229,6 @@ class FmXR {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -280,14 +270,7 @@ class FmXR {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 18
src/views/vent/monitorManager/gateMonitor/gate.threejs.xr.ts

@@ -193,15 +193,6 @@ class FmXR {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     if (this.mixers && this.fmClock.running) {
       this.mixers.update(2);
@@ -210,7 +201,6 @@ class FmXR {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -252,14 +242,7 @@ class FmXR {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 19
src/views/vent/monitorManager/gateMonitor/gate.threejs.yj.ts

@@ -220,16 +220,6 @@ class FmYj {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
-
     if (this.mixers && this.fmClock.running) {
       this.mixers.update(2);
     }
@@ -237,7 +227,6 @@ class FmYj {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -279,14 +268,7 @@ class FmYj {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 18
src/views/vent/monitorManager/gateMonitor/gate.threejs.yy.ts

@@ -195,15 +195,6 @@ class Fm1 {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     if (this.mixers && this.fmClock.running) {
       this.mixers.update(2);
@@ -212,7 +203,6 @@ class Fm1 {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -224,14 +214,7 @@ class Fm1 {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

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

@@ -370,17 +370,17 @@ export const modalTypeArr = {
   centerBtnArr: [
     {
       key: 'startSmoke',
-      value: '启动/停止',
+      value: '一键启动/停止',
       permission: 'fan:startSmoke',
     },
     {
       key: 'startFan',
-      value: '启动/停止',
+      value: '一键启动/停止',
       permission: 'fan:startFan',
     },
     {
       key: 'startFan',
-      value: '启动/停止',
+      value: '一键启动/停止',
       permission: 'fan:startAndResetFan',
     },
     {

+ 0 - 1
src/views/vent/monitorManager/nitrogen/nitrogen.dishang.threejs.ts

@@ -92,7 +92,6 @@ class Nitrogen {
 
   /* 点击 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;

+ 1 - 18
src/views/vent/monitorManager/obfurage1Monitor/gate.threejs.three.ts

@@ -194,15 +194,6 @@ class Fm2 {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     // 风门开关动画
     if (this.mixers && this.fmClock.running) this.mixers.update(2);
@@ -210,7 +201,6 @@ class Fm2 {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -254,14 +244,7 @@ class Fm2 {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

+ 1 - 18
src/views/vent/monitorManager/obfurage1Monitor/gate.threejs.two.ts

@@ -214,15 +214,6 @@ class Fm1 {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
 
     if (this.mixers && this.fmClock.running) {
       this.mixers.update(2);
@@ -231,7 +222,6 @@ class Fm1 {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -273,14 +263,7 @@ class Fm1 {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 提取风门序列帧,初始化前后门动画 */
   initAnimation() {

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

@@ -181,7 +181,7 @@
       </div>
       <div class="export-btn"><div class="btn btn1" @click="exportData">一键导出</div></div>
       <div class="export-btn m-l-20px"
-        ><div class="btn btn2" @click="goSystem"><send-outlined />安全控系统</div></div
+        ><div class="btn btn2" @click="goSystem"><send-outlined />安全控系统</div></div
       >
     </div>
   </div>

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

@@ -211,7 +211,6 @@ class singleWindow {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -233,29 +232,13 @@ class singleWindow {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 风门动画 */
   render() {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   async initCamera(dom1) {

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

@@ -200,7 +200,6 @@ class singleWindowBet {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -222,29 +221,13 @@ class singleWindowBet {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 风门动画 */
   render() {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   mountedThree() {

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

@@ -191,7 +191,6 @@ class singleWindowXk {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -199,29 +198,13 @@ class singleWindowXk {
     console.log('摄像头控制信息', this.model.orbitControls, this.model.camera);
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 风门动画 */
   render() {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   resetMaterial() {

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

@@ -191,7 +191,6 @@ class singleWindowYjl {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -213,29 +212,13 @@ class singleWindowYjl {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 风门动画 */
   render() {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   mountedThree() {

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

@@ -34,10 +34,10 @@
           <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="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>
@@ -125,12 +125,12 @@
             <div class="tab-item" v-if="activeKey === '3'">
               <HistoryTable :columns-type="deviceType" :device-type="deviceType" designScope="window-history" :scroll="scroll">
                 <template #filterCell="{ column, record }">
-                  <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : 'red'">{{
+                  <!-- <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : 'red'">{{
                     record.warnFlag == '0' ? '正常' : '报警'
                   }}</a-tag>
                   <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? 'default' : 'green'">{{
                     record.netStatus == '0' ? '断开' : '连接'
-                  }}</a-tag>
+                  }}</a-tag> -->
                   <div v-if="record.nwindownum == 1 && column.dataIndex === 'rearArea'">/</div>
                 </template>
               </HistoryTable>

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

@@ -174,15 +174,6 @@ class doubleWindow {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   /* 提取风门序列帧,初始化前后门动画 */
@@ -209,7 +200,6 @@ class doubleWindow {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -221,14 +211,7 @@ class doubleWindow {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   play(rotationParam, flag) {
     if (this.windowsActionArr.frontWindow.length <= 0 || this.windowsActionArr.backWindow.length <= 0) {

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

@@ -155,19 +155,21 @@ class doubleWindow {
   initAnimation() {
     const meshArr01: THREE.Object3D[] = [];
     const meshArr02: THREE.Object3D[] = [];
-    const fcObj = this.group.getObjectByName('sdFc')?.getObjectByName('FengChuang_2')?.getObjectByName('FengChuang');
-    const leftObjNames = ['FCshanye03', 'FCshanye04'];
-    const rightObjNames = ['FCshanye05', 'FCshanye06'];
+    const fc = this.group.getObjectByName('sdFc')?.getObjectByName('FengChuang_2_ShuangDao');
+    const fcObj1 = fc?.getObjectByName('FengChuang_1_1');
+    const fcObj2 = fc?.getObjectByName('FengChuang_2_1');
+    const frontObjNames = ['FengChuang_1_2', 'FengChuang_1_3', 'FengChuang_1_4', 'FengChuang_1_5'];
+    const backObjNames = ['FengChuang_2_2', 'FengChuang_2_3', 'FengChuang_2_4', 'FengChuang_2_5'];
     debugger;
-    leftObjNames.filter((name) => {
-      const obj = fcObj?.getObjectByName(name);
+    frontObjNames.filter((name) => {
+      const obj = fcObj1?.getObjectByName(name);
       if (obj) {
         obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 0);
         meshArr01.push(obj);
       }
     });
-    rightObjNames.filter((name) => {
-      const obj = fcObj?.getObjectByName(name);
+    backObjNames.filter((name) => {
+      const obj = fcObj2?.getObjectByName(name);
       if (obj) {
         obj.rotateOnAxis(new THREE.Vector3(0, 1, 0), 0);
         meshArr02.push(obj);
@@ -212,7 +214,6 @@ class doubleWindow {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -234,34 +235,18 @@ class doubleWindow {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 风门动画 */
   render() {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   mountedThree(playerDom) {
     return new Promise((resolve) => {
-      this.model.setGLTFModel('sdFc-d').then((gltf) => {
+      this.model.setGLTFModel('sdFc-dm').then((gltf) => {
         const fcModal = gltf[0];
         fcModal.name = 'sdFc';
         this.group?.add(fcModal);

+ 339 - 0
src/views/vent/monitorManager/windowMonitor/shuangdaoFcHj.threejs.ts

@@ -0,0 +1,339 @@
+import * as THREE from 'three';
+import { getTextCanvas, renderVideo } from '/@/utils/threejs/util';
+import gsap from 'gsap';
+
+class doubleWindow {
+  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,
+  };
+  constructor(model) {
+    this.model = model;
+    // this.group.name = 'ddFc';
+  }
+  // // 重置摄像头
+  // const resetCamera = () => {
+  //   this.model.camera.position.set(30.328, 58.993, 148.315);
+  //   this.model.camera.rotation.set(-27.88, 14.35, 7.47);
+  //   this.model.orbitControls?.update();
+  //   this.model.camera.updateProjectionMatrix();
+  // };
+
+  addLight = () => {};
+
+  // 设置模型位置
+  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 = 125 - (screenDownText.length - 10) * 10;
+    const textArr = [
+      {
+        text: `远程定量调节自动风窗`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 120,
+        y: 90,
+      },
+      {
+        text: `${selectData.OpenDegree1 ? '前窗开度值(°)' : selectData.forntArea ? '前窗过风面积(㎡)' : '前窗过风面积(㎡)'}:`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 145,
+      },
+      {
+        text: selectData.OpenDegree1
+          ? Number(`${selectData.OpenDegree1}`).toFixed(2)
+          : selectData.forntArea
+          ? Number(`${selectData.forntArea}`).toFixed(2)
+          : '-',
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 145,
+      },
+      {
+        text: `${selectData.OpenDegree2 ? '后窗开度值(°)' : selectData.forntArea ? '后窗过风面积(㎡)' : '后窗过风面积(㎡)'}:`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 200,
+      },
+      {
+        text: selectData.OpenDegree2
+          ? Number(`${selectData.OpenDegree2}`).toFixed(2)
+          : selectData.rearArea
+          ? Number(`${selectData.rearArea}`).toFixed(2)
+          : '-',
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 200,
+      },
+      {
+        text: `${selectData.frontRearDP ? '风窗压差(Pa)' : selectData.windSpeed ? '风速(m/s)' : '通信状态'}:`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 5,
+        y: 256,
+      },
+      {
+        text: `${
+          selectData.frontRearDP
+            ? selectData.frontRearDP
+            : selectData.windSpeed
+            ? selectData.windSpeed
+            : selectData.netStatus == '0'
+            ? '断开'
+            : '连接'
+        }`,
+        font: 'normal 30px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: 330,
+        y: 256,
+      },
+      {
+        text: screenDownText,
+        font: 'normal 28px Arial',
+        color: '#009900',
+        strokeStyle: '#002200',
+        x: screenDownTextX,
+        y: 303,
+      },
+    ];
+
+    getTextCanvas(726, 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(726, 546); // 平面3维几何体PlaneGeometry
+        const planeMesh = new THREE.Mesh(planeGeometry, textMaterial);
+        planeMesh.name = 'monitorText';
+        planeMesh.scale.set(0.002, 0.002, 0.002);
+        planeMesh.position.set(4.19, 0.448, -0.27);
+        this.group?.add(planeMesh);
+      }
+    });
+  }
+
+  /* 提取风门序列帧,初始化前后门动画 */
+  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;
+      }
+    }
+  }
+
+  play(handlerState, timeScale = 0.01) {
+    let handler = () => {};
+    if (
+      this.windowsActionArr.frontWindow1 &&
+      this.windowsActionArr.frontWindow2 &&
+      this.windowsActionArr.backWindow1 &&
+      this.windowsActionArr.backWindow2
+    ) {
+      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();
+            }
+          };
+          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();
+            }
+          };
+          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();
+            }
+          };
+          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();
+            }
+          };
+          break;
+        default:
+      }
+      handler();
+    }
+  }
+
+  /* 点击风窗,风窗全屏 */
+  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(playerDom) {
+    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.setModalPosition();
+        this.initAnimation();
+        this.addLight();
+        resolve(null);
+      });
+    });
+  }
+
+  destroy() {
+    this.model.clearGroup(this.group);
+    this.windowsActionArr.frontWindow = undefined;
+    this.model = null;
+    this.group = null;
+  }
+}
+export default doubleWindow;

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

@@ -235,7 +235,6 @@ class doubleWindow {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -257,29 +256,13 @@ class doubleWindow {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 风门动画 */
   render() {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   mountedThree(playerDom) {

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

@@ -159,18 +159,6 @@ class doubleWindowYjl {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
-    // if (this.mixers && this.fmClock.running) {
-    //   this.mixers.update(2);
-    // }
   }
 
   /* 提取风门序列帧,初始化前后门动画 */
@@ -219,7 +207,6 @@ class doubleWindowYjl {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -231,14 +218,7 @@ class doubleWindowYjl {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   play(rotationParam, flag) {
     if (this.windowsActionArr.frontWindow.length <= 0 || this.windowsActionArr.backWindow.length <= 0) {

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

@@ -233,8 +233,8 @@ export const setModelType = (type) => {
 };
 
 export const mountedThree = (playerDom) => {
-  const { sysOrgCode } = useGlobSetting();
-  // const sysOrgCode = 'sdmtjtswmk';
+  // const { sysOrgCode } = useGlobSetting();
+  const sysOrgCode = 'zmhjhzmy';
   return new Promise(async (resolve) => {
     model = new UseThree('#window3D');
     if (!model || !model.renderer || !model.camera) return;
@@ -264,6 +264,13 @@ export const mountedThree = (playerDom) => {
     } 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);
     }
@@ -273,7 +280,7 @@ export const mountedThree = (playerDom) => {
     singleWindowObj.mountedThree(playerDom);
     model.animate();
     // addLight();
-    startAnimation();
+    // startAnimation();
     resolve(null);
   });
 };

+ 1 - 18
src/views/vent/monitorManager/windowMonitorBet/dandaoFc.threejs.ts

@@ -186,7 +186,6 @@ class singleWindow {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -208,29 +207,13 @@ class singleWindow {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 风门动画 */
   render() {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   async initCamera(dom1) {

+ 1 - 18
src/views/vent/monitorManager/windowMonitorBet/dandaoFcBet.threejs.ts

@@ -183,7 +183,6 @@ class singleWindowBet {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -205,29 +204,13 @@ class singleWindowBet {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 风门动画 */
   render() {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   async initCamera(dom1?) {

+ 1 - 18
src/views/vent/monitorManager/windowMonitorBet/dandaoFcBetZh.threejs.ts

@@ -206,7 +206,6 @@ class singleWindowBetZh {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -228,29 +227,13 @@ class singleWindowBetZh {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   /* 风门动画 */
   render() {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   async initCamera(dom1?) {

+ 1 - 18
src/views/vent/monitorManager/windowMonitorBet/shuangdaoFc.threejs.ts

@@ -148,15 +148,6 @@ class doubleWindow {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   /* 提取风门序列帧,初始化前后门动画 */
@@ -183,7 +174,6 @@ class doubleWindow {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -195,14 +185,7 @@ class doubleWindow {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   play(rotationParam, flag) {
     if (this.windowsActionArr.frontWindow.length <= 0 || this.windowsActionArr.backWindow.length <= 0) {

+ 1 - 19
src/views/vent/monitorManager/windrectMonitor/dantou.threejs.ts

@@ -151,20 +151,10 @@ class ddWindRect {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -176,18 +166,10 @@ class ddWindRect {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   resetModel() {
     clearTimeout(this.animationTimer);
-    this.isLRAnimation = false;
   }
 
   resetModalType(flag) {

+ 1 - 19
src/views/vent/monitorManager/windrectMonitor/duishe.threejs.ts

@@ -176,15 +176,6 @@ class dsWindRect {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   initAnimation() {
@@ -229,7 +220,6 @@ class dsWindRect {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -251,18 +241,10 @@ class dsWindRect {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   resetModel() {
     clearTimeout(this.animationTimer);
-    this.isLRAnimation = false;
   }
 
   // 播放动画

+ 1 - 19
src/views/vent/monitorManager/windrectMonitor/duisheFixed.threejs.ts

@@ -237,20 +237,10 @@ class fixedWindRect {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -262,18 +252,10 @@ class fixedWindRect {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   resetModel() {
     clearTimeout(this.animationTimer);
-    this.isLRAnimation = false;
   }
 
   mountedThree(playerDom) {

+ 1 - 19
src/views/vent/monitorManager/windrectMonitor/longmen.threejs.ts

@@ -206,15 +206,6 @@ class lmWindRect {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
   }
 
   /* 提取风门序列帧,初始化前后门动画 */
@@ -237,7 +228,6 @@ class lmWindRect {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -268,18 +258,10 @@ class lmWindRect {
     });
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   resetModel() {
     clearTimeout(this.animationTimer);
-    this.isLRAnimation = false;
   }
 
   // 播放动画

+ 4 - 26
src/views/vent/monitorManager/windrectMonitor/longmenSide.threejs.ts

@@ -156,18 +156,9 @@ class lmWindRectSide {
 
   /* 风门动画 */
   render() {
-    // if (!this.model) {
-    //   return;
-    // }
-    // if (this.isLRAnimation && this.group) {
-    //   // 左右摇摆动画
-    //   if (Math.abs(this.group.rotation.y) >= 0.2) {
-    //     this.direction = -this.direction;
-    //     this.group.rotation.y += 0.00002 * 30 * this.direction;
-    //   } else {
-    //     this.group.rotation.y += 0.00002 * 30 * this.direction;
-    //   }
-    // }
+    if (!this.model) {
+      return;
+    }
   }
   playCamera(flag) {
     const _this = this;
@@ -236,11 +227,6 @@ class lmWindRectSide {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    // this.isLRAnimation = false;
-    // if (this.animationTimer) {
-    //   clearTimeout(this.animationTimer);
-    //   this.animationTimer = null;
-    // }
     // 判断是否点击到视频
 
     intersects.find((intersect) => {
@@ -261,18 +247,10 @@ class lmWindRectSide {
     // console.log('999999999', this.model.camera.position, this.model.orbitControls);
   }
 
-  mouseUpModel() {
-    // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
-  }
+  mouseUpModel() {}
 
   resetModel() {
     clearTimeout(this.animationTimer);
-    this.isLRAnimation = false;
   }
 
   // 播放动画

+ 1 - 18
src/views/vent/monitorManager/windrectMonitor/zhedie.threejs.ts

@@ -200,20 +200,10 @@ class zdWindRect {
     if (!this.model) {
       return;
     }
-    if (this.isLRAnimation && this.group) {
-      // 左右摇摆动画
-      if (Math.abs(this.group.rotation.y) >= 0.2) {
-        this.direction = -this.direction;
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      } else {
-        this.group.rotation.y += 0.00002 * 30 * this.direction;
-      }
-    }
-
     if (this.mixers[0]) this.mixers[0]?.update(1 / 25);
   }
 
-  /* 提取风门序列帧,初始化前后门动画 */
+  /* 提取序列帧,初始化动画 */
   initAnimation() {
     if (this.group) {
       if (this.group.animations && this.group.animations.length > 0) {
@@ -231,7 +221,6 @@ class zdWindRect {
 
   /* 点击风窗,风窗全屏 */
   mousedownModel(intersects: THREE.Intersection<THREE.Object3D<THREE.Event>>[]) {
-    this.isLRAnimation = false;
     if (this.animationTimer) {
       clearTimeout(this.animationTimer);
       this.animationTimer = null;
@@ -255,16 +244,10 @@ class zdWindRect {
 
   mouseUpModel() {
     // 10s后开始摆动
-    if (!this.animationTimer && !this.isLRAnimation) {
-      this.animationTimer = setTimeout(() => {
-        this.isLRAnimation = true;
-      }, 10000);
-    }
   }
 
   resetModel() {
     clearTimeout(this.animationTimer);
-    this.isLRAnimation = false;
   }
 
   // 播放动画