ソースを参照

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

lxh 11 ヶ月 前
コミット
d36abaa1a0
44 ファイル変更245 行追加226 行削除
  1. BIN
      public/model/glft/fire/Bertai_2023-11-29.glb
  2. BIN
      public/model/glft/fire/Bertai_2024-04-09.glb
  3. BIN
      public/model/glft/workFace/workFace1-1_2024-04-09.glb
  4. BIN
      public/model/glft/workFace/workFace2-1_2024-04-09.glb
  5. BIN
      public/mxcad/default.mxweb
  6. 0 0
      public/mxcad/plugins/test.js
  7. 0 0
      public/mxcad/plugins/test.js.map
  8. BIN
      public/mxcad/stamp.dwg
  9. BIN
      public/mxcad/stamp.mxweb
  10. BIN
      public/mxcad/test2.dwg
  11. BIN
      public/mxcad/test2.mxweb
  12. BIN
      public/mxcad/test3.mxweb
  13. BIN
      public/mxcad/tree.dwg
  14. BIN
      public/mxcad/tree.mxweb
  15. 33 41
      src/hooks/core/useThree copy.ts
  16. 1 0
      src/hooks/system/useCamera.ts
  17. 0 1
      src/hooks/vent/useSystemSelect.ts
  18. 6 4
      src/utils/threejs/main.worker.ts
  19. 28 29
      src/views/vent/gas/gasHome/components/gasMonitor.vue
  20. 2 2
      src/views/vent/gas/gasHome/index.vue
  21. 1 2
      src/views/vent/gas/gasPumpMonitor/components/monitor.vue
  22. 33 32
      src/views/vent/gas/gasPumpMonitor/components/monitorChart.vue
  23. 29 35
      src/views/vent/gas/gasPumpMonitor/gasPumpMonitor.data.ts
  24. 6 7
      src/views/vent/monitorManager/camera/camera.api.ts
  25. 11 10
      src/views/vent/monitorManager/camera/index.vue
  26. 7 1
      src/views/vent/monitorManager/comment/HistoryTable.vue
  27. 13 13
      src/views/vent/monitorManager/deviceMonitor/components/device/index.vue
  28. 1 1
      src/views/vent/monitorManager/fanLocalMonitor/index.vue
  29. 2 1
      src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHome.vue
  30. 1 0
      src/views/vent/monitorManager/groutMonitor/grout.data.ts
  31. 7 2
      src/views/vent/monitorManager/mainFanMonitor/index.vue
  32. 1 1
      src/views/vent/monitorManager/nitrogen/nitrogen.data.1.ts
  33. 4 4
      src/views/vent/monitorManager/nitrogen/nitrogen.dataCc_2.ts
  34. 3 2
      src/views/vent/monitorManager/sensorMonitor/index.vue
  35. 1 1
      src/views/vent/monitorManager/windowMonitor/dandaoFc.threejs.ts
  36. 1 1
      src/views/vent/monitorManager/windowMonitor/dandaoFcBet.threejs.ts
  37. 1 1
      src/views/vent/monitorManager/windowMonitor/dandaoFcXk.threejs.ts
  38. 1 1
      src/views/vent/monitorManager/windowMonitor/shuangdaoFc.threejs.ts
  39. 0 1
      src/views/vent/monitorManager/windrectMonitor/windrect.api.ts
  40. 0 3
      src/views/vent/monitorManager/workFaceMonitor/index.vue
  41. 2 2
      src/views/vent/monitorManager/workFaceMonitor/wokeFace.threejs.ts
  42. 32 21
      src/views/vent/monitorManager/workFaceMonitor/workFace.threejs.base.ts
  43. 4 2
      src/views/vent/performance/comment/CADModal.vue
  44. 14 5
      src/views/vent/performance/fileDetail/commen/CADViewer.vue

BIN
public/model/glft/fire/Bertai_2023-11-29.glb


BIN
public/model/glft/fire/Bertai_2024-04-09.glb


BIN
public/model/glft/workFace/workFace1-1_2024-04-09.glb


BIN
public/model/glft/workFace/workFace2-1_2024-04-09.glb


BIN
public/mxcad/default.mxweb


ファイルの差分が大きいため隠しています
+ 0 - 0
public/mxcad/plugins/test.js


ファイルの差分が大きいため隠しています
+ 0 - 0
public/mxcad/plugins/test.js.map


BIN
public/mxcad/stamp.dwg


BIN
public/mxcad/stamp.mxweb


BIN
public/mxcad/test2.dwg


BIN
public/mxcad/test2.mxweb


BIN
public/mxcad/test3.mxweb


BIN
public/mxcad/tree.dwg


BIN
public/mxcad/tree.mxweb


+ 33 - 41
src/hooks/core/useThree copy.ts

@@ -6,12 +6,10 @@ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls';
 import gsap from 'gsap';
 
 import ResourceTracker from '/@/utils/threejs/ResourceTracker';
-const resourceTracker = new ResourceTracker()
-const track = resourceTracker.track.bind(resourceTracker)
-
+const resourceTracker = new ResourceTracker();
+const track = resourceTracker.track.bind(resourceTracker);
 
 class UseThree {
-
   container: HTMLCanvasElement;
   camera: THREE.PerspectiveCamera | null = null;
   scene: THREE.Scene | null = null;
@@ -22,10 +20,10 @@ class UseThree {
   animationAction: THREE.AnimationAction | null = null;
   clock: THREE.Clock = new THREE.Clock(); // 计时器
   timeoutId: NodeJS.Timeout | null = null;
-  animationId: number = 0
+  animationId: number = 0;
 
   constructor(selector) {
-    this.animationId = 0
+    this.animationId = 0;
     this.container = document.querySelector(selector);
     //初始化
     this.init();
@@ -35,7 +33,6 @@ class UseThree {
     // window.addEventListener('wheel', this.wheelRenderer.bind(this));
   }
   init() {
-
     // 初始化场景
     this.initScene();
     // 初始化环境光
@@ -63,7 +60,6 @@ class UseThree {
     this.camera.position.set(0, 0.2, 0.3);
   }
   initRenderer() {
-
     this.renderer = new THREE.WebGLRenderer({ antialias: true });
     // 设置屏幕像素比
     this.renderer.setPixelRatio(window.devicePixelRatio);
@@ -91,15 +87,15 @@ class UseThree {
   }
 
   setGLTFModel(modalName) {
-    const a = new Date().getTime() / 1000
+    const a = new Date().getTime() / 1000;
     return new Promise(async (resolve, reject) => {
       try {
-        const db =  window['CustomDB']
-        const modalArr =  await db.modal.where('modalName').equals(modalName).toArray()
-        if(modalArr.length > 0) {
-          const modalValue = modalArr[0].modalVal
+        const db = window['CustomDB'];
+        const modalArr = await db.modal.where('modalName').equals(modalName).toArray();
+        if (modalArr.length > 0) {
+          const modalValue = modalArr[0].modalVal;
           new THREE.ObjectLoader().parse(modalValue, (e) => {
-            const group = e.children[0]
+            const group = e.children[0];
 
             const cityMaterial = new THREE.MeshBasicMaterial({
               color: new THREE.Color(0x0c016f),
@@ -111,19 +107,17 @@ class UseThree {
               }
             });
             this.scene?.add(e.children[0]);
-            console.log((new Date().getTime() / 1000) - a + " s")
+            console.log(new Date().getTime() / 1000 - a + ' s');
             resolve(this.scene);
-          })
-        } 
+          });
+        }
       } catch (error) {
-        reject('加载模型出错')
+        reject('加载模型出错');
       }
-      
-    })
+    });
   }
 
   setMaterial(obj) {
-
     obj.geometry.computeBoundingBox();
     const { max, min } = obj.geometry.boundingBox;
     const distance = max.y - min.y + 2;
@@ -341,9 +335,9 @@ class UseThree {
 
   animate() {
     // this.renderer?.setAnimationLoop(this.render.bind(this));
-    if(this.animationId != -1) {
-      this.render()
-      this.animationId = requestAnimationFrame(this.animate.bind(this))
+    if (this.animationId != -1) {
+      this.render();
+      this.animationId = requestAnimationFrame(this.animate.bind(this));
     }
   }
   resizeRenderer() {
@@ -367,26 +361,26 @@ class UseThree {
     }, 500);
   }
   clearScene() {
-    this.scene?.children.forEach((obj:any) => {
-      if(obj.type === 'Group'){
-        obj.traverse(function(item:any) {
+    this.scene?.children.forEach((obj: any) => {
+      if (obj.type === 'Group') {
+        obj.traverse(function (item: any) {
           if (item.type === 'Mesh') {
             item.geometry.dispose();
             item.material.dispose();
-            !!item.clear&&item.clear();
+            !!item.clear && item.clear();
           }
-        })
-      }else if (obj.material) {
+        });
+      } else if (obj.material) {
         obj.material.dispose();
-      }else if (obj.geometry) {
+      } else if (obj.geometry) {
         obj.geometry.dispose();
       }
-      this.scene?.remove(obj)
-      !!obj.clear??obj.clear()
+      this.scene?.remove(obj);
+      !!obj.clear ?? obj.clear();
       obj = null;
-    })
-    let gl = this.renderer?.domElement.getContext("webgl");
-    gl && gl?.getExtension("WEBGL_lose_context")?.loseContext();
+    });
+    const gl = this.renderer?.domElement.getContext('webgl');
+    gl && gl?.getExtension('WEBGL_lose_context')?.loseContext();
 
     this.renderer?.forceContextLoss();
     this.renderer?.dispose();
@@ -402,17 +396,15 @@ class UseThree {
     // model3D = null
     // css3D = null
 
-    !!this.scene?.clear??this.scene?.clear();
+    !!this.scene?.clear ?? this.scene?.clear();
     cancelAnimationFrame(this.animationId);
-    this.animationId = -1
+    this.animationId = -1;
     // this.stats = null
     // scene = null
 
-    THREE.Cache.clear();  
+    THREE.Cache.clear();
     console.log('3D环境已清理干净');
   }
-
-
 }
 
 export default UseThree;

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

@@ -337,6 +337,7 @@ export function useCamera() {
     });
     videoParentDomList.length = 0;
     playerDoms.length = 0;
+    playerList.length = 0;
   }
 
   return {

+ 0 - 1
src/hooks/vent/useSystemSelect.ts

@@ -39,7 +39,6 @@ export function useSystemSelect(sysType: string, changeModalType?: (param) => {}
     });
     deviceList.value = deviceArr;
     deviceActive.value = deviceArr[0].deviceType;
-    console.log('debug', deviceList.value, deviceActive.value);
     deviceChange(0);
   }
 

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

@@ -62,15 +62,17 @@ export function initModalWorker() {
     'fire/nitrogen_2023-06-02.glb',
     'fire/nitrogenUnderground_2023-09-15.glb',
     'fire/grout_2023-06-02.glb',
-    'fire/Bertai_2023-11-29.glb', //lxh
+    'fire/Bertai_2024-04-09.glb',
     'fire/balancePress_2024-03-14.glb',
     'yafeng/compressor_2023-07-10.glb',
     'gas/gasPump_2024-03-04.glb',
     'gas/gasPumpUnder_2023-10-05.glb',
     'mb/obfurage_2024-03-19.glb',
-    'workFace/workFace-base_2024-03-04.glb',
-    'workFace/workFace-jin_2024-03-04.glb',
-    'workFace/workFace-hui_2024-03-04.glb',
+    // 'workFace/workFace-base_2024-03-04.glb',
+    // 'workFace/workFace-jin_2024-03-04.glb',
+    // 'workFace/workFace-hui_2024-03-04.glb',
+    'workFace/workFace1-1_2024-04-09.glb',
+    'workFace/workFace2-1_2024-04-09.glb',
   ];
 
   const db: any = new Dexie('DB');

+ 28 - 29
src/views/vent/gas/gasHome/components/gasMonitor.vue

@@ -6,12 +6,12 @@
           <div>矿井概况</div>
         </template>
         <template #container>
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="矿井名称" />
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="矿井产量" />
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="矿井瓦斯等级" />
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="煤炭储量" />
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="主采煤层" />
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="平均煤厚" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="矿井名称" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="矿井产量" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="矿井瓦斯等级" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="煤炭储量" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="主采煤层" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="平均煤厚" />
         </template>
       </ventBox1>
       <ventBox1 class="vent-margin-t-10">
@@ -19,11 +19,11 @@
           <div>瓦斯抽采泵站概况</div>
         </template>
         <template #container>
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="地面泵站数量" />
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="移动泵站数量" />
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="抽放泵型号" />
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="抽采管路" />
-          <ListItem class="w-100% mb-5px" :value="activedPump.name" label="抽放泵运行数量" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="地面泵站数量" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="移动泵站数量" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="抽放泵型号" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="抽采管路" />
+          <ListItem class="w-100% mb-5px" :value="device.name" label="抽放泵运行数量" />
         </template>
       </ventBox1>
     </div>
@@ -34,12 +34,12 @@
             <div>井下抽采区域</div>
           </template>
           <template #container>
-            <ListItem class="w-100% mb-5px" :value="activedPump.name" label="回采工作面数量" />
-            <ListItem class="w-100% mb-5px" :value="activedPump.name" label="掘进工作面数量" />
-            <ListItem class="w-100% mb-5px" :value="activedPump.name" label="回采工作面位置" />
-            <ListItem class="w-100% mb-5px" :value="activedPump.name" label="掘进工作面位置" />
-            <ListItem class="w-100% mb-5px" :value="activedPump.name" label="采空区数量" />
-            <ListItem class="w-100% mb-5px" :value="activedPump.name" label="采空区位置" />
+            <ListItem class="w-100% mb-5px" :value="device.name" label="回采工作面数量" />
+            <ListItem class="w-100% mb-5px" :value="device.name" label="掘进工作面数量" />
+            <ListItem class="w-100% mb-5px" :value="device.name" label="回采工作面位置" />
+            <ListItem class="w-100% mb-5px" :value="device.name" label="掘进工作面位置" />
+            <ListItem class="w-100% mb-5px" :value="device.name" label="采空区数量" />
+            <ListItem class="w-100% mb-5px" :value="device.name" label="采空区位置" />
           </template>
         </ventBox1>
       </div>
@@ -48,28 +48,27 @@
 </template>
 
 <script setup lang="ts" name="gas-pump-monitor">
-  import { ref, onMounted, defineProps } from 'vue';
+  import { onMounted, defineProps } from 'vue';
   import ventBox1 from '/@/components/vent/ventBox1.vue';
   import ListItem from '@/views/vent/gas/components/list/listItem.vue';
 
-  const props = defineProps({
-    deviceId: {
-      type: String,
+  defineProps({
+    device: {
+      type: Object,
+      default: () => {},
       require: true,
     },
   });
 
   // 抽放泵相关
-  const activedPump = ref<any>({});
+  // const activedPump = ref<any>({});
 
-  function fetchPump() {
-    const fakePP = { name: 't4', id: 4 };
-    activedPump.value = fakePP;
-  }
+  // function fetchPump() {
+  //   const fakePP = { name: 't4', id: 4 };
+  //   activedPump.value = fakePP;
+  // }
 
-  onMounted(async () => {
-    fetchPump();
-  });
+  onMounted(async () => {});
 </script>
 
 <style lang="less" scoped>

+ 2 - 2
src/views/vent/gas/gasHome/index.vue

@@ -5,7 +5,7 @@
     <CustomHeader class="w-1710px ml-100px mt-20px" :badges="headerBadges" />
     <template v-if="activeKey === 'gasHome'">
       <CustomBadges class="w-1710px ml-100px mt-50px" :badges="headerBadges" />
-      <GasMonitor :deviceId="optionValue" />
+      <GasMonitor :device="deviceValue" />
     </template>
     <BottomMenu :navList="navList" @change="changeActive" />
   </div>
@@ -20,7 +20,7 @@
   import GasMonitor from './components/gasMonitor.vue';
 
   const activeKey = ref('gasHome');
-  const { options, optionValue, getSelectRow, getSysDataSource } = useSystemSelect('sys_surface_caimei'); // 参数为场景类型(设备类型管理中可以查询到)
+  const { options, optionValue, deviceValue, getSelectRow, getSysDataSource } = useSystemSelect('sys_surface_caimei'); // 参数为场景类型(设备类型管理中可以查询到)
 
   function changeActive(activeValue) {
     activeKey.value = activeValue;

+ 1 - 2
src/views/vent/gas/gasPumpMonitor/components/monitor.vue

@@ -54,7 +54,7 @@
 </template>
 
 <script setup lang="ts" name="gas-pump-monitor">
-  import _ from 'lodash';
+  import _ from 'lodash-es';
   import { ref, defineProps, computed } from 'vue';
   import ventBox1 from '/@/components/vent/ventBox1.vue';
   import List from '@/views/vent/gas/components/list/index.vue';
@@ -95,7 +95,6 @@
   // const pump = ref({});
   // 将列表配置项转换为列表可用的prop
   function transConfigToProp(config, source) {
-    console.log('debug', source);
     return config.map((c) => {
       return {
         ...c,

+ 33 - 32
src/views/vent/gas/gasPumpMonitor/components/monitorChart.vue

@@ -1,28 +1,16 @@
 <template>
   <div class="monitor-chart">
     <Row :gutter="[40, 40]">
-      <Col :span="12">
+      <Col v-for="(chart, i) in monitorCharts" :key="`monitor-chart-${i}`" :span="12">
         <div class="h-400px monitor-chart__wrapper p-20px">
-          <FormTitle class="monitor-chart__title" icon="gas-monitor-extract" title="累积抽采量" />
-          <BarMulti :propTypeArr="chartSeriesMap" xAxisPropType="date" :chartData="testChartData.items" height="350px" />
-        </div>
-      </Col>
-      <Col :span="12">
-        <div class="h-400px monitor-chart__wrapper p-20px">
-          <FormTitle class="monitor-chart__title" icon="gas-monitor-co" title="CO浓度" />
-          <BarMulti :propTypeArr="chartSeriesMap" xAxisPropType="date" :chartData="testChartData.items" height="350px" />
-        </div>
-      </Col>
-      <Col :span="12">
-        <div class="h-400px monitor-chart__wrapper p-20px">
-          <FormTitle class="monitor-chart__title" icon="gas-monitor-np" title="负压浓度" />
-          <BarMulti :propTypeArr="chartSeriesMap" xAxisPropType="date" :chartData="testChartData.items" height="350px" />
-        </div>
-      </Col>
-      <Col :span="12">
-        <div class="h-400px monitor-chart__wrapper p-20px">
-          <FormTitle class="monitor-chart__title" icon="gas-monitor-flow" title="瞬时流量" />
-          <LineMulti :propTypeArr="chartSeriesMap" xAxisPropType="date" :chartData="testChartData.items" height="350px" />
+          <FormTitle class="monitor-chart__title" icon="gas-monitor-extract" :title="chart.title" />
+          <components
+            :is="componentMap[chart.type]"
+            :propTypeArr="chart.seriesMap"
+            :xAxisPropType="chart.dateProp"
+            :chartData="chartData.items"
+            height="350px"
+          />
         </div>
       </Col>
     </Row>
@@ -36,28 +24,41 @@
   import { Row, Col } from 'ant-design-vue';
   import { LimitedArray } from '/@/utils/limitedArray';
   import { onMounted, onUnmounted, ref } from 'vue';
-  defineProps({
+  import { monitorCharts } from '../gasPumpMonitor.data';
+  import _ from 'lodash-es';
+
+  const props = defineProps({
     device: {
       type: Object,
       require: true,
     },
   });
 
-  const testChartData = ref(new LimitedArray(10));
-  const chartSeriesMap = new Map([
-    ['valueA', '值A'],
-    ['valueB', '值B'],
-  ]);
+  const chartData = ref(new LimitedArray(10));
+  const componentMap = {
+    line: LineMulti,
+    bar: BarMulti,
+  };
+  // const testChartData = ref(new LimitedArray(10));
+  // const chartSeriesMap = new Map([
+  //   ['valueA', '值A'],
+  //   ['valueB', '值B'],
+  // ]);
   let timer: any = null;
 
   onMounted(() => {
     timer = setInterval(() => {
-      const testobj = {
-        valueA: Math.floor(Math.random() * 10),
-        valueB: Math.floor(Math.random() * 10),
+      const data = Object.assign({ ...props.device }, _.get(props.device, 'datalist[0]'));
+      chartData.value.push({
+        ...data,
         date: new Date().getSeconds().toString(),
-      };
-      testChartData.value.push(testobj);
+      });
+      // const testobj = {
+      //   valueA: Math.floor(Math.random() * 10),
+      //   valueB: Math.floor(Math.random() * 10),
+      //   date: new Date().getSeconds().toString(),
+      // };
+      // testChartData.value.push(testobj);
     }, 2000);
   });
   onUnmounted(() => {

+ 29 - 35
src/views/vent/gas/gasPumpMonitor/gasPumpMonitor.data.ts

@@ -99,47 +99,41 @@ export const LPumpCategoryConfig = [
   { prop: 'activedPump', label: '累计抽采时间' },
 ];
 
-/** 累积抽采量图表配置项 */
-export const cumulativeExtractionChart = [
+export const monitorCharts = [
   {
-    name: '高负压',
-    prop: 'HPressure',
+    title: '累积抽采量',
+    seriesMap: new Map([
+      ['valueA', '高负压'],
+      ['valueB', '低负压'],
+    ]),
+    dateProp: 'date',
+    type: 'bar',
   },
   {
-    name: '低负压',
-    prop: 'LPressure',
+    title: 'CO浓度',
+    seriesMap: new Map([
+      ['valueA', '高负压'],
+      ['valueB', '低负压'],
+    ]),
+    dateProp: 'date',
+    type: 'bar',
   },
-];
-/** CO浓度图表配置项 */
-export const coChart = [
-  {
-    name: '高负压',
-    prop: 'HPressure',
-  },
-  {
-    name: '低负压',
-    prop: 'LPressure',
-  },
-];
-/** 负压浓度图表配置项 */
-export const negativePressureChart = [
-  {
-    name: '高负压',
-    prop: 'HPressure',
-  },
-  {
-    name: '低负压',
-    prop: 'LPressure',
-  },
-];
-/** 瞬时流量图表配置项 */
-export const instantaneousFlowChart = [
   {
-    name: '高负压',
-    prop: 'HPressure',
+    title: '负压浓度',
+    seriesMap: new Map([
+      ['valueA', '高负压'],
+      ['valueB', '低负压'],
+    ]),
+    dateProp: 'date',
+    type: 'bar',
   },
   {
-    name: '低负压',
-    prop: 'LPressure',
+    title: '瞬时流量',
+    seriesMap: new Map([
+      ['valueA', '高负压'],
+      ['valueB', '低负压'],
+    ]),
+    dateProp: 'date',
+    type: 'line',
   },
 ];

+ 6 - 7
src/views/vent/monitorManager/camera/camera.api.ts

@@ -1,12 +1,11 @@
 import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
-  getCameraDevKind='/safety/ventanalyCamera/getCameraDevKind',
+  getCameraDevKind = '/safety/ventanalyCamera/getCameraDevKind',
   list = '/safety/ventanalyCamera/listNew',
   getCameraUrl = '/ventanaly-device/camera/queryByCameraCode',
-  getDevice='/ventanaly-device/monitor/device',
-  getVentanalyCamera='/safety/ventanalyCamera/list'
-
+  getDevice = '/ventanaly-device/monitor/device',
+  getVentanalyCamera = '/safety/ventanalyCamera/list',
 }
 /**
  * 列表接口
@@ -16,6 +15,6 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
 
 export const cameraAddr = (params) => defHttp.get({ url: Api.getCameraUrl, params });
 
-export const getCameraDevKind = () => defHttp.get({ url: Api.getCameraDevKind, });
-export const getDevice = (params) => defHttp.post({ url: Api.getDevice,params });
-export const getVentanalyCamera = (params) => defHttp.get({ url: Api.getVentanalyCamera,params });
+export const getCameraDevKind = () => defHttp.get({ url: Api.getCameraDevKind });
+export const getDevice = (params) => defHttp.post({ url: Api.getDevice, params });
+export const getVentanalyCamera = (params) => defHttp.get({ url: Api.getVentanalyCamera, params });

+ 11 - 10
src/views/vent/monitorManager/camera/index.vue

@@ -31,7 +31,7 @@
         </div>
       </div>
       <div class="pagination">
-        <Pagination v-model:current="current" :total="total" show-less-items @change="onChange" />
+        <Pagination v-model:current="current" v-model:page-size="pageSize" :total="total"  @change="onChange" />
       </div>
     </div>
     <div class="camera-box" v-else>
@@ -40,7 +40,7 @@
   </div>
 </template>
 <script lang="ts" setup>
-import { onMounted, onUnmounted, ref, reactive, nextTick } from 'vue';
+import { onMounted, onUnmounted, ref, reactive } from 'vue';
 import { useRouter } from 'vue-router';
 import { Pagination, Empty } from 'ant-design-vue';
 import { list, cameraAddr, getCameraDevKind, getDevice, getVentanalyCamera } from './camera.api'
@@ -69,7 +69,7 @@ let searchParam = reactive({
 
 I18N.use(ZH)
 let router = useRouter(); //路由
-const pageSize = 8
+const pageSize = ref(8)
 const current = ref(1)
 const total = ref(0)
 const playerList = ref([])
@@ -107,7 +107,8 @@ async function getCameraDevKindList() {
 
 //点击目录
 async function onClick(node) {
-  console.log(node, 'node--------------')
+  if(selected.title === node.title && selected.id === node.id) return
+  current.value = 1
   selected.id = node.id;
   selected.pid = node.pid;
   selected.title = node.title;
@@ -130,7 +131,7 @@ async function onClick(node) {
       }
       searchParam.devKind = node.itemValue
       searchParam.strType = ''
-      getVideoAddrs()
+      await getVideoAddrs()
     } else {
       getVideoAddrsSon(node.deviceID)
     }
@@ -138,9 +139,9 @@ async function onClick(node) {
   } else {
     searchParam.devKind = ''
     searchParam.strType = ''
-    getVideoAddrs()
+    await getVideoAddrs()
   }
-
+  getVideo()
 };
 
 //点击详情跳转
@@ -162,8 +163,8 @@ function onDetail(node) {
 async function getVideoAddrs() {
   clearCamera();
   playerList.value = []
-  let res = await list({ ...searchParam })
-  console.log(res, '摄像头信息--------')
+  let res = await list({ ...searchParam, pageSize: pageSize.value, pageNo: current.value })
+  total.value = res['total'] || 0
   if (res.records.length != 0) {
     const cameraList = <{ name: string, addr: string }[]>[]
     const cameras = res.records
@@ -174,7 +175,7 @@ async function getVideoAddrs() {
         // 从海康平台接口获取视频流
         try {
           const data = await cameraAddr({ cameraCode: item['addr'] });
-          if (data && data['url']) {
+          if (data) {
             cameraList.push({ name: item['name'], addr: data['url'] });
           }
           // cameraList.push({

+ 7 - 1
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -166,7 +166,13 @@
     if (!props.sysId) {
       if (props.deviceListApi) {
         const res = await props.deviceListApi();
-        if (res['records'] && res['records'].length > 0) result = res['records'];
+        if (props.deviceType.startsWith('modelsensor')) {
+          if (res['msgTxt'] && res['msgTxt'][0] && res['msgTxt'][0]['datalist']) {
+            result = res['msgTxt'][0]['datalist'];
+          }
+        } else {
+          if (res['records'] && res['records'].length > 0) result = res['records'];
+        }
       } else {
         const res = await deviceListApi({ devicekind: props.deviceType, pageSize: 10000 });
         if (res['records'] && res['records'].length > 0) {

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

@@ -392,7 +392,7 @@ const scroll = reactive({
   y: 210
 })
 const treeData = ref<TreeProps['treeData']>([]);
-
+let startMonitorTimer = 0
 
 //树形菜单选择事件
 const onSelect: TreeProps['onSelect'] = (keys, e) => {
@@ -411,15 +411,12 @@ const onSelect: TreeProps['onSelect'] = (keys, e) => {
     deviceType.value = e.node.type
     actions.setGlobalState({ locationObj: { pageType: deviceType.value  }, pageObj: null });
   }
-  if(timer == null){
-    timer = undefined
-  }
-  if(timer){
-    clearTimeout(timer)
-    timer = undefined
+  clearTimeout(timer)
+  timer = undefined
+  if(startMonitorTimer){
+    clearTimeout(startMonitorTimer)
   }
-
-  setTimeout(() => {
+  startMonitorTimer = setTimeout(() => {
     expandedKeys.value = keys
     selectedKeys.value = keys
     treeNodeTitle.value = e.node.title
@@ -430,7 +427,7 @@ const onSelect: TreeProps['onSelect'] = (keys, e) => {
     if(e.node.children?.length < 1){
       getMonitor(true)
     }
-  }, 200)
+  }, 1000)
 };
 
 function tabChange(activeKeyVal) {
@@ -564,9 +561,9 @@ async function getDataSource() {
         if(deviceType.value.startsWith('safetymonitor')){
           resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: { ...searchForm } })
         }else if(deviceType.value.startsWith('location')) {
-          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: {strinstallpos: searchForm['stationname'], userName: searchForm['strname'] }, ...searchForm,})
+          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: {strinstallpos: searchForm && searchForm['stationname'] ? searchForm['stationname'] : '', userName: searchForm && searchForm['strname'] ? searchForm['strname'] : ''}})
         }else if(deviceType.value.startsWith('vehicle')) {
-          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: {strinstallpos: searchForm['stationname'], vehicleName: searchForm['strname'] ,...searchForm,}})
+          resultData = await list({ devicetype: deviceType.value, pagetype: 'normal', filterParams: {strinstallpos: searchForm && searchForm['stationname'] ? searchForm['stationname'] : '', vehicleName: searchForm && searchForm['strname'] ? searchForm['strname'] : ''}})
         }else{
           resultData = await list({ devicetype: deviceType.value, pagetype: 'normal'})
         }
@@ -805,8 +802,11 @@ function setLocation() {
   }, 600)
 }
 
-watch(() => props.pageData, (pageObj) => {
+watch(() => props.pageData, async(pageObj) => {
   isRefresh.value = false
+  if(!treeData.value || treeData.value?.length < 1){
+    await getDeviceType()
+  }
   nextTick(() => {
     isRefresh.value = true
     if (pageObj.deviceid) {

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

@@ -68,7 +68,7 @@
               >风窗开度值:<span class="value">{{ selectData.OpenDegree ? selectData.OpenDegree : '-' }}</span> <span class="unit"> %</span></p
             >
             <p v-if="selectData.OpenDegree"
-              >风窗过风面积:<span class="value">{{ selectData.forntArea ? selectData.forntArea : '-' }}</span> <span class="unit"> m2</span></p
+              >风窗过风面积:<span class="value">{{ selectData.forntArea ? selectData.forntArea : '-' }}</span> <span class="unit"> </span></p
             >
           </div>
         </div>

+ 2 - 1
src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHome.vue

@@ -378,6 +378,7 @@
   watch(
     () => props.deviceType,
     () => {
+      removeCamera();
       nextTick(async () => {
         if (props.deviceType == 'pump_over') {
           setModelType('gasPump');
@@ -398,7 +399,7 @@
   onMounted(async () => {
     timer = null;
     await getMonitor(true);
-    if (selectData && selectData['deviceID']) await getCamera(selectData['deviceID'], playerRef.value);
+    // if (selectData && selectData['deviceID']) await getCamera(selectData['deviceID'], playerRef.value);
   });
 
   onBeforeUnmount(() => {

+ 1 - 0
src/views/vent/monitorManager/groutMonitor/grout.data.ts

@@ -645,6 +645,7 @@ export function getMonitorComponent() {
   const { sysOrgCode } = useGlobSetting();
   let groutHome;
   switch (sysOrgCode) {
+    case 'sdmtjtbetmk': // 布尔台
     case 'sdmtjtjjmk': // 锦界
       groutHome = defineAsyncComponent(() => import('./components/groutHomeJj.vue'));
       return groutHome;

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

@@ -551,7 +551,6 @@
               MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID']);
             }
           }
-          Object.assign(selectData, deviceBaseList.value, dataSource.value[selectRowIndex.value]);
 
           if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
             frontMonitorIsShow.value = true;
@@ -560,7 +559,13 @@
             backMonitorIsShow.value = true;
             frontMonitorIsShow.value = false;
           }
-          deviceType.value = selectData.deviceType;
+
+          if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
+            deviceType.value = dataSource.value[selectRowIndex.value]['deviceType'];
+            if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
+              Object.assign(selectData, dataSource.value[selectRowIndex.value]);
+            }
+          }
           addText();
           playAnimate(selectData);
           if (timer) {

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

@@ -71,7 +71,7 @@ export async function getMonitorData() {
     case 'sdmtjtcctmk': // 寸草1
       return await import('./nitrogen.dataCc');
     case 'sdmtjtcctrk': // 寸草2
-      return await import('./nitrogen.dataCc');
+      return await import('./nitrogen.dataCc_2');
     default: //默认
       return await import('./nitrogen.dataBet');
   }

+ 4 - 4
src/views/vent/monitorManager/nitrogen/nitrogen.dataCc_2.ts

@@ -17,8 +17,8 @@ export const preMonitorList = [
     child: [],
   },
   {
-    title: `机温度`,
-    code: `PRE_CPR_HeadTemp`,
+    title: `机温度`,
+    code: `PRE_HostTemp`,
     unit: '℃',
     child: [],
   },
@@ -139,8 +139,8 @@ export const preFanMonitorData = [
 ];
 export const totalData = [
   {
-    title: '总风管流量',
-    code: 'TotalInPipeFlow',
+    title: '总风管流量',
+    code: 'TotalOutPipeFlow',
     unit: 'm³/h',
   },
   {

+ 3 - 2
src/views/vent/monitorManager/sensorMonitor/index.vue

@@ -55,16 +55,17 @@
             <HistoryTable
               :columns-type="deviceKind"
               :device-type="deviceKind"
-              :device-list-api="baseList.bind(null, { strtype: selectData.deviceType })"
+              :device-list-api="list.bind(null, { devicetype: selectData.deviceType })"
               @change="historyDataSourceChange"
               designScope="modelsensor-history"
+              :scroll="{ y: chartsColumns.length > 0 ? 400 : 600 }"
             />
             <div class="charts-box" v-if="chartsColumns.length > 0">
               <BarAndLine
                 :chartsColumnsType="selectData.deviceType"
                 xAxisPropType="gcreatetime"
                 :dataSource="historyDataSource"
-                height="100%"
+                height="300px"
                 :chartsColumns="chartsColumns"
                 chartsType="history"
                 :option="echartsOption1"

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

@@ -47,7 +47,7 @@ class singleWindow {
         y: 90,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(m2)' : '过风面积(m2)'}:`,
+        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',

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

@@ -47,7 +47,7 @@ class singleWindowBet {
         y: 95,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(m2)' : '过风面积(m2)'}:`,
+        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',

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

@@ -44,7 +44,7 @@ class singleWindowXk {
         y: 95,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(m2)' : '过风面积(m2)'}:`,
+        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',

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

@@ -42,7 +42,7 @@ class doubleWindow {
         y: 97,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(m2)' : '过风面积(m2)'}:`,
+        text: `${selectData.OpenDegree ? '开度值(%)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
         font: 'normal 28px Arial',
         color: '#009900',
         strokeStyle: '#002200',

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

@@ -53,4 +53,3 @@ export const cameraAddrList = (params) => defHttp.post({ url: Api.cameraAddrList
 export const cameraList = (params) => defHttp.get({ url: Api.cameraList, params });
 
 export const exportXls = (params) => defHttp.post({ url: Api.importExcel, params });
-

+ 0 - 3
src/views/vent/monitorManager/workFaceMonitor/index.vue

@@ -162,9 +162,6 @@ function changeModalType(currentData) {
   if (currentData['strsystype'] === 'sys_surface_caimei_modal_1') {
     // 单进单回
     modalType = 'workFace1'
-  } else if (currentData['strsystype'] === 'sys_surface_caimei_modal_2') {
-    // 单进双回
-    modalType = 'workFace2'
   } else if (currentData['strsystype'] === 'sys_surface_caimei_modal_3') {
     // 双进单回
     modalType = 'workFace3'

+ 2 - 2
src/views/vent/monitorManager/workFaceMonitor/wokeFace.threejs.ts

@@ -85,8 +85,8 @@ export const setModelType = (type, n = Math.ceil(Math.random() * 4), isShowPlane
         // 双进单会
         var oldControlsPosition = { x: 0.055, y: 0.062, z: 0.117 };
         var oldCameraPosition = { x: 1.403, y: 3.354, z: 2.873 };
-        var newCameraPosition = { x: -0.078, y: 2.524, z: 0.886 };
-        var newControlsPosition = { x: -0.078, y: 0.063, z: 0.181 };
+        var newCameraPosition = { x: -0.0736339522439517, y: 2.8359333767190282, z: 1.1782304435986413 };
+        var newControlsPosition = { x: -0.0792833688241211, y: 0.1249789297357116, z: -0.07315650372945247 };
       } else {
         var oldControlsPosition = { x: 0.055, y: 0.062, z: 0.117 };
         var oldCameraPosition = { x: 1.403, y: 3.354, z: 2.873 };

+ 32 - 21
src/views/vent/monitorManager/workFaceMonitor/workFace.threejs.base.ts

@@ -6,9 +6,8 @@ import { OutlinePass } from 'three/examples/jsm/postprocessing/OutlinePass.js';
 import { FXAAShader } from 'three/examples/jsm/shaders/FXAAShader.js';
 import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js';
 import { OutputPass } from 'three/examples/jsm/postprocessing/OutputPass.js';
-import { setModalCenter, setTag3D } from '/@/utils/threejs/util';
+import { setModalCenter, setTag3D, gradientColors } from '/@/utils/threejs/util';
 import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer.js';
-import { gradientColors } from '/@/utils/threejs/util';
 
 // import * as dat from 'dat.gui';
 // const gui = new dat.GUI();
@@ -117,7 +116,7 @@ class WorkFace {
         gasUnitCSS3D.scale.set(0.0009, 0.0009, 0.0009);
         gasUnitCSS3D.position.set(-0.1, 0.11, 0.05);
         gasUnitCSS3D.lookAt(-0.1, 0.5, 1);
-        this.group.add(gasUnitCSS3D);
+        this.planeGroup.add(gasUnitCSS3D);
       }
     }
     for (let i = 0; i < this.planeNum; i++) {
@@ -350,26 +349,34 @@ class WorkFace {
   }
 
   setModalType(modalType) {
-    const intakeWind = this.group.getObjectByName('workFace-jin');
-    const returnWind = this.group.getObjectByName('workFace-hui');
-    if (intakeWind && returnWind) {
+    debugger;
+    const workFace2 = this.group.getObjectByName('workFace2-1');
+    const workFace1 = this.group.getObjectByName('workFace1-1');
+    // const workFace3 = this.group.getObjectByName('workFace2-2');
+    if (workFace2 && workFace1) {
       if (modalType === 'workFace1') {
         // 单进单回
-        intakeWind.visible = false;
-        returnWind.visible = false;
-      } else if (modalType === 'workFace2') {
-        // 单进双回
-        intakeWind.visible = false;
-        returnWind.visible = true;
+        workFace2.visible = false;
+        // workFace3.visible = false;
+        workFace1.visible = true;
+        workFace1.add(this.planeGroup);
+        this.planeGroup.visible = false;
+        this.planeGroup.position.set(-0.35, 0.14, -0.21);
       } else if (modalType === 'workFace3') {
         // 双进单回
-        intakeWind.visible = true;
-        returnWind.visible = false;
-      } else if (modalType === 'workFace4') {
-        // 双进双回
-        intakeWind.visible = true;
-        returnWind.visible = true;
+        workFace1.visible = false;
+        // workFace3.visible = false;
+        workFace2.visible = true;
+        workFace2.add(this.planeGroup);
+        this.planeGroup.visible = false;
+        this.planeGroup.position.set(-0.35, 0.14, -0.21);
       }
+      // else if (modalType === 'workFace4') {
+      //   // 双进双回
+      //   workFace2.visible = false;
+      //   workFace3.visible = true;
+      //   workFace1.visible = false;
+      // }
       setModalCenter(this.group);
     }
   }
@@ -380,10 +387,14 @@ class WorkFace {
       // this.model.camera.position.set(0, 3.1, 500);
       // this.setRenderPass();
       this.model.orbitControls.update();
-      this.model.setGLTFModel(['workFace-base', 'workFace-jin', 'workFace-hui'], this.group).then(async () => {
+      this.model.setGLTFModel(['workFace2-1', 'workFace1-1'], this.group).then(async () => {
+        this.group.children.forEach((object: THREE.Object3D) => {
+          if (object.name.startsWith('workFace')) {
+            setModalCenter(object);
+          }
+        });
         this.group.name = this.modelName;
-        this.group.add(this.planeGroup);
-        this.planeGroup.visible = false;
+
         // this.group.position.set(-0.06, 0.28, 0.07);
         this.group.scale.set(2.5, 2.5, 2.5);
         // this.resetMesh();

+ 4 - 2
src/views/vent/performance/comment/CADModal.vue

@@ -11,12 +11,14 @@
     destroyOnClose
   >
     <!-- <button @click="mxcadmode = !mxcadmode">Switch Previewer</button> -->
-    <CADViewer v-if="mxcadmode" :id="fileid" :filename="filename" class="w-100%" :height="800" />
+    <div v-if="mxcadmode">
+      <CADViewer v-if="fileid" :id="fileid" :filename="filename" class="w-100%" :height="800" />
+    </div>
     <iframe v-else :src="iframesrc" class="w-100%" :height="800" ref="frameRef"></iframe>
   </BasicModal>
 </template>
 <script lang="ts" setup>
-  import { ref } from 'vue';
+  import { ref, triggerRef } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { onMounted } from 'vue';
   import CADViewer from '/@/views/vent/performance/fileDetail/commen/CADViewer.vue';

+ 14 - 5
src/views/vent/performance/fileDetail/commen/CADViewer.vue

@@ -7,6 +7,7 @@
   import { CADViewer, useCADViewer } from '/@/components/CADViewer';
   import { downLoad } from '../fileDetail.api';
   import { useRoute } from 'vue-router';
+  import { message } from 'ant-design-vue';
 
   const props = defineProps<{
     // 文件共享中心中该文件的ID
@@ -19,14 +20,18 @@
   const { processFile, postMessage } = useCADViewer();
 
   function openFile(id: string, filename: string) {
+    const loading = message.loading('正在下载文件', 0);
     downLoad({ id }).then((res: Blob) => {
-      processFile(new File([res], filename)).then((path) => {
-        postMessage('MKY_Open_Mxweb', path);
-      });
+      processFile(new File([res], filename))
+        .then((path) => {
+          postMessage('MKY_Open_Mxweb', path);
+        })
+        .finally(() => {
+          loading();
+        });
     });
   }
 
-  // 通过 props 指定文件 ID 的形式使用该组件
   watch(
     () => props.id,
     (v) => {
@@ -35,11 +40,15 @@
     }
   );
 
-  // 通过 url query 指定文件 ID 的形式使用该组件
   onMounted(() => {
+    postMessage('MKY_Open_Mxweb', window.location.origin + '/mxcad/test31.mxweb');
     const route = useRoute();
     if (route.query.id && route.query.filename) {
+      // 通过 url query 指定文件 ID 的形式使用该组件
       openFile(route.query.id as string, route.query.filename as string);
+    } else {
+      // 通过 props 指定文件 ID 的形式使用该组件
+      openFile(props.id, props.filename);
     }
   });
 </script>

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません