ソースを参照

1. 新增预警历史记录报表下载
2. 解决预警历史查询条件缺失问题
3. 整理光纤测温、注浆监测系统代码,根据矿端组织码动态加载各矿自己的业务代码
4. 优化皮带监测相关代码,解决内容泄漏问题
5. 对接神东(大柳塔、活鸡兔井)视频流接口

hongrunxia 1 年間 前
コミット
3ba5bae8e1
50 ファイル変更1770 行追加1765 行削除
  1. 6 11
      index.html
  2. 2 2
      public/js/config.js
  3. BIN
      public/model/glft/fire/laneway_2023-06-02.glb
  4. BIN
      public/model/glft/gas/gasPump_2023-08-18.glb
  5. BIN
      public/model/glft/workFace/workFace-base_2014-02-04.glb
  6. BIN
      public/model/glft/workFace/workFace-hui_2014-02-04.glb
  7. BIN
      public/model/glft/workFace/workFace-jin_2014-02-04.glb
  8. 16 13
      src/components/Form/src/BasicForm.vue
  9. 1 0
      src/components/Form/src/components/FormAction.vue
  10. 3 0
      src/components/Table/src/BasicTable.vue
  11. 1 1
      src/components/Table/src/hooks/useTableForm.ts
  12. 0 3
      src/components/vent/micro/ventModal.vue
  13. 6 17
      src/hooks/system/useCamera.ts
  14. 1 0
      src/hooks/system/useListPage.ts
  15. 4 1
      src/qiankun/apps.ts
  16. 5 5
      src/utils/threejs/main.worker.ts
  17. 59 54
      src/views/vent/comment/components/bottomMenu.vue
  18. 15 16
      src/views/vent/comment/components/fourBorderBg.vue
  19. 220 214
      src/views/vent/deviceManager/comment/NormalTable.vue
  20. 470 500
      src/views/vent/monitorManager/alarmMonitor/DetailModalFire.vue
  21. 20 1
      src/views/vent/monitorManager/alarmMonitor/index.vue
  22. 18 12
      src/views/vent/monitorManager/beltTunMonitor/beltTun.threejs.base.ts
  23. 10 6
      src/views/vent/monitorManager/beltTunMonitor/beltTun.threejs.ts
  24. 1 2
      src/views/vent/monitorManager/beltTunMonitor/index.vue
  25. 4 1
      src/views/vent/monitorManager/camera/camera.api.ts
  26. 16 3
      src/views/vent/monitorManager/camera/index.vue
  27. 17 4
      src/views/vent/monitorManager/comment/AlarmHistoryTable.vue
  28. 0 1
      src/views/vent/monitorManager/comment/GroupMonitorTable.vue
  29. 23 3
      src/views/vent/monitorManager/comment/HistoryTable.vue
  30. 92 27
      src/views/vent/monitorManager/comment/WorkFaceAlarmHistoryTable.vue
  31. 6 2
      src/views/vent/monitorManager/compressor/nitrogen.data.ts
  32. 23 1
      src/views/vent/monitorManager/deviceMonitor/components/device/device.data.ts
  33. 2 6
      src/views/vent/monitorManager/deviceMonitor/components/device/index.vue
  34. 351 336
      src/views/vent/monitorManager/deviceMonitor/components/device/modal/fiber.modal.vue
  35. 138 122
      src/views/vent/monitorManager/deviceMonitor/components/device/modal/fiber.modal1.vue
  36. 1 1
      src/views/vent/monitorManager/deviceMonitor/components/network/network.data.ts
  37. 1 3
      src/views/vent/monitorManager/deviceMonitor/index.vue
  38. 1 0
      src/views/vent/monitorManager/fanLocalMonitor/index.vue
  39. 1 6
      src/views/vent/monitorManager/fiberMonitor/index.vue
  40. 177 167
      src/views/vent/monitorManager/fireMonitor/index.vue
  41. 0 180
      src/views/vent/monitorManager/groutMonitor/components/groutHomeDlt.vue
  42. 18 2
      src/views/vent/monitorManager/groutMonitor/grout.data.ts
  43. 3 8
      src/views/vent/monitorManager/groutMonitor/index.vue
  44. 1 1
      src/views/vent/monitorManager/nitrogen/components/nitrogenHome.vue
  45. 2 2
      src/views/vent/monitorManager/nitrogen/nitrogen.data.1.ts
  46. 1 2
      src/views/vent/monitorManager/tunFaceMonitor/index.vue
  47. 6 3
      src/views/vent/monitorManager/workFaceMonitor/index.vue
  48. 3 3
      src/views/vent/monitorManager/workFaceMonitor/wokeFace.threejs.ts
  49. 4 5
      src/views/vent/performance/comment/DeviceModal.vue
  50. 21 18
      src/views/vent/reportManager/comment/DeviceModal.vue

+ 6 - 11
index.html

@@ -12,7 +12,7 @@
     <script src="/js/liveplayer-lib.min.js"></script>
     <script src="/js/webrtcstreamer.js"></script>
     <script src="/js/adapter.min.js"></script>
-    <script type="text/javascript" src="http://182.92.126.35:9050/web-apps/apps/api/documents/api.js"></script>
+    <!-- <script type="text/javascript" src="http://182.92.126.35:9050/web-apps/apps/api/documents/api.js"></script> -->
   </head>
   <body>
     <script>
@@ -23,6 +23,11 @@
           htmlRoot.setAttribute('data-theme', theme);
           theme = htmlRoot = null;
         }
+        const remoteUrl = window.location.hostname === 'localhost' ? '182.92.126.35' : window.location.hostname;
+        var script = document.createElement('script');
+          script.type = 'text/javascript';
+          script.src = 'http://'+remoteUrl+':9050/web-apps/apps/api/documents/api.js';
+          document.head.appendChild(script);
       })();
     </script>
     <div id="app">
@@ -329,15 +334,5 @@
       //   s.parentNode.insertBefore(hm, s);
       // })();
     </script>
-    <script>
-      var _hmt = _hmt || [];
-      (function() {
-        var hm = document.createElement("script");
-        const ip = window.location.origin.split(':')[0]
-        hm.src = ip + ":9050/web-apps/apps/api/documents/api.js";
-        var s = document.getElementsByTagName("script")[0];
-        s.parentNode.insertBefore(hm, s);
-      })();
-    </script>
   </body>
 </html>

+ 2 - 2
public/js/config.js

@@ -9,7 +9,7 @@ const History_Type = {
 }
 
 const VENT_PARAM = {
-  // simulatedPassword: '123456', //(simulatedPassword 为空时有密码输入框弹出,不为空时不弹出密码输入框,无需输入密码)
-  simulatedPassword: '',
+  simulatedPassword: '123456', //(simulatedPassword 为空时有密码输入框弹出,不为空时不弹出密码输入框,无需输入密码)
+  // simulatedPassword: '',
   showReport: true
 }

BIN
public/model/glft/fire/laneway_2023-06-02.glb


BIN
public/model/glft/gas/gasPump_2023-08-18.glb


BIN
public/model/glft/workFace/workFace-base_2014-02-04.glb


BIN
public/model/glft/workFace/workFace-hui_2014-02-04.glb


BIN
public/model/glft/workFace/workFace-jin_2014-02-04.glb


+ 16 - 13
src/components/Form/src/BasicForm.vue

@@ -23,7 +23,11 @@
           <template #[item]="data" v-for="item in ['resetBefore', 'submitBefore', 'advanceBefore', 'advanceAfter']">
             <slot :name="item" v-bind="data || {}"></slot>
           </template>
+          <template #exportXls>
+            <slot name="exportXls"></slot>
+          </template>
         </FormAction>
+
         <slot name="formFooter"></slot>
       </Row>
     </Form>
@@ -123,7 +127,7 @@
         };
       });
 
-      const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) } as Recordable));
+      const getBindValue = computed(() => ({ ...attrs, ...props, ...unref(getProps) }) as Recordable);
 
       const getSchema = computed((): FormSchema[] => {
         const schemas: FormSchema[] = unref(schemaRef) || (unref(getProps).schemas as any);
@@ -132,19 +136,19 @@
           // handle date type
           if (defaultValue && dateItemType.includes(component)) {
             //update-begin---author:wangshuai ---date:20230410  for:【issues/435】代码生成的日期控件赋默认值报错------------
-            let valueFormat:string = "";
-            if(componentProps){
+            let valueFormat: string = '';
+            if (componentProps) {
               valueFormat = componentProps?.valueFormat;
             }
-            if(!valueFormat){
-              console.warn("未配置valueFormat,可能导致格式化错误!");
+            if (!valueFormat) {
+              console.warn('未配置valueFormat,可能导致格式化错误!');
             }
             //update-end---author:wangshuai ---date:20230410  for:【issues/435】代码生成的日期控件赋默认值报错------------
             if (!Array.isArray(defaultValue)) {
               //update-begin---author:wangshuai ---date:20221124  for:[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
-              if(valueFormat){
+              if (valueFormat) {
                 schema.defaultValue = dateUtil(defaultValue).format(valueFormat);
-              }else{
+              } else {
                 schema.defaultValue = dateUtil(defaultValue);
               }
               //update-end---author:wangshuai ---date:20221124  for:[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
@@ -152,9 +156,9 @@
               const def: dayjs.Dayjs[] = [];
               defaultValue.forEach((item) => {
                 //update-begin---author:wangshuai ---date:20221124  for:[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
-                if(valueFormat){
+                if (valueFormat) {
                   def.push(dateUtil(item).format(valueFormat));
-                }else{
+                } else {
                   def.push(dateUtil(item));
                 }
                 //update-end---author:wangshuai ---date:20221124  for:[issues/215]列表页查询框(日期选择框)设置初始时间,一进入页面时,后台报日期转换类型错误的------------
@@ -272,7 +276,7 @@
         //   validateFields([key]).catch((_) => {});
         // }
         // update-end--author:liaozhiyang---date:20230922---for:【issues/752】表单校验dynamicRules 无法 使用失去焦点后校验 trigger: 'blur'
-        if(props.autoSearch === true){
+        if (props.autoSearch === true) {
           onFormSubmitWhenChange();
         }
       }
@@ -395,12 +399,12 @@
       }
     }
   }
-  .vent-form{
+  .vent-form {
     :deep(.@{ventSpace}-select-dropdown) {
       left: 0px !important;
       top: 34px !important;
       // background: #ffffff !important;
-      .@{ventSpace}-select-item{
+      .@{ventSpace}-select-item {
         color: #000 !important;
       }
       .@{ventSpace}-select-tree {
@@ -413,5 +417,4 @@
       }
     }
   }
-  
 </style>

+ 1 - 0
src/components/Form/src/components/FormAction.vue

@@ -20,6 +20,7 @@
           <BasicArrow class="ml-1" :expand="!isAdvanced" up />
         </Button>
         <slot name="advanceAfter"></slot>
+        <slot name="exportXls"></slot>
       </FormItem>
     </div>
   </a-col>

+ 3 - 0
src/components/Table/src/BasicTable.vue

@@ -13,6 +13,9 @@
       <template #[replaceFormSlotKey(item)]="data" v-for="item in getFormSlotKeys">
         <slot :name="item" v-bind="data || {}"></slot>
       </template>
+      <template #exportXls>
+        <slot name="form-onExportXls"></slot>
+      </template>
     </BasicForm>
 
     <!-- antd v3 升级兼容,阻止数据的收集,防止控制台报错 -->

+ 1 - 1
src/components/Table/src/hooks/useTableForm.ts

@@ -12,7 +12,7 @@ export function useTableForm(
 ) {
   const getFormProps = computed((): Partial<FormProps> => {
     const { formConfig } = unref(propsRef);
-    const { submitButtonOptions, autoSubmitOnEnter} = formConfig || {};
+    const { submitButtonOptions, autoSubmitOnEnter } = formConfig || {};
     return {
       showAdvancedButton: true,
       ...formConfig,

+ 0 - 3
src/components/vent/micro/ventModal.vue

@@ -24,9 +24,6 @@
         unmountMicroApps(['/micro-vent-3dModal']);
       });
 
-      onUnmounted(() => {
-        unmountMicroApps(['/micro-vent-3dModal']);
-      });
       return { loading };
     },
   });

+ 6 - 17
src/hooks/system/useCamera.ts

@@ -7,6 +7,7 @@ import { useGlobSetting } from '/@/hooks/setting';
 export function useCamera() {
   const cameraList = (params) => defHttp.get({ url: '/safety/ventanalyCamera/list', params });
   const cameraAddrList = (params) => defHttp.post({ url: '/ventanaly-device/camera/info', params });
+  const cameraAddr = (params) => defHttp.get({ url: '/ventanaly-device/camera/queryByCameraCode', params });
 
   let webRtcServer = <any[]>[];
   let playerDoms = <(HTMLVideoElement | undefined | null)[]>[];
@@ -25,23 +26,11 @@ export function useCamera() {
       cameras.forEach(async (item) => {
         if (item['devicekind'] == 'toHKRtsp') {
           // 从海康平台接口获取视频流
-          // cameraAddrs.push({ devicekind: 'toHKRtsp', name: item['name'], addr: item['addr'] });
-          // const { hkUrl, hkAppKey, hkSignature } = globSetting;
-          // const data = await defHttp.post({
-          //   headers: {
-          //     Accept: '*/*',
-          //     'Access-Control-Allow-Origin': '*',
-          //     'Content-Type': 'application/json',
-          //     'x-ca-key': hkAppKey,
-          //     'x-ca-signature-headers': 'x-ca-key',
-          //     'x-ca-signature': hkSignature,
-          //   },
-          //   url: hkUrl,
-          //   params: { cameraIndexCode: item['addr'], streamType: 0, protocol: 'rtsp', transmode: 1, expand: 'streamform=rtp', streamform: 'rtp' },
-          // });
-          // if (data) {
-          //   cameraAddrs.push({ name: item['name'], addr: data.url });
-          // }
+          // cameraAddrs.push({ name: item['name'], addr: 'http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8' });
+          const data = await cameraAddr({ cameraCode: item['addr'] });
+          if (data && data['url']) {
+            cameraAddrs.push({ name: item['name'], addr: data['url'] });
+          }
         } else {
           cameraAddrs.push({ name: item['name'], addr: item['addr'] });
         }

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

@@ -63,6 +63,7 @@ export function useListPage(options: ListPageOptions) {
 
   // 导出 excel
   async function onExportXls(selectForm?) {
+    debugger;
     //update-begin---author:wangshuai ---date:20220411  for:导出新增自定义参数------------
     const { url, name, params } = options?.exportConfig ?? {};
     const realUrl = typeof url === 'function' ? url() : url;

+ 4 - 1
src/qiankun/apps.ts

@@ -1,3 +1,4 @@
+import { prefetchApps, AppMetadata } from 'qiankun';
 /**
  *微应用apps
  * @name: 微应用名称 - 具有唯一性
@@ -6,7 +7,7 @@
  * @activeRule: 微应用触发的路由规则 - 触发路由规则后将加载该微应用
  */
 //子应用列表
-const _apps: object[] = [];
+const _apps: AppMetadata[] = [];
 for (const key in import.meta.env) {
   if (key === 'VITE_APP_SUB_APP') {
     const appList = JSON.parse(import.meta.env[key].replace(/'/g, '"'));
@@ -28,8 +29,10 @@ for (const key in import.meta.env) {
         container: `#${app[0]}`,
         activeRule: app[0],
       };
+
       _apps.push(obj);
     });
   }
+  prefetchApps([..._apps]);
 }
 export const apps = _apps;

+ 5 - 5
src/utils/threejs/main.worker.ts

@@ -54,7 +54,7 @@ export function initModalWorker() {
     'ztfj/fbm_2023-06-02.glb',
     'ztfj/ztfj-fc_2023-06-02.glb',
     'ztfj/ztfj_2023-12-12.glb',
-    'fire/laneway_2023-06-02.glb',
+    'fire/laneway_2024-03-04.glb',
     'fire/chamber_2023-06-02.glb',
     // 'fire/workFace_2023-06-29.glb',
     'fire/tunFace_2023-07-14.glb',
@@ -64,12 +64,12 @@ export function initModalWorker() {
     'fire/Bertai_2023-11-29.glb', //lxh
     'fire/balancePress_2024-02-23.glb',
     'yafeng/compressor_2023-07-10.glb',
-    'gas/gasPump_2023-08-18.glb',
+    'gas/gasPump_2024-03-04.glb',
     'gas/gasPumpUnder_2023-10-05.glb',
     'mb/obfurage_2023-09-09.glb',
-    'workFace/workFace-base_2014-02-04.glb',
-    'workFace/workFace-jin_2014-02-04.glb',
-    'workFace/workFace-hui_2014-02-04.glb',
+    'workFace/workFace-base_2024-03-04.glb',
+    'workFace/workFace-jin_2024-03-04.glb',
+    'workFace/workFace-hui_2024-03-04.glb',
   ];
 
   const db: any = new Dexie('DB');

+ 59 - 54
src/views/vent/comment/components/bottomMenu.vue

@@ -1,69 +1,74 @@
 <template>
   <div class="bottom-btn-group">
-    <div v-for="item in navList" :key="item.pathName" class="vent-row-center btn-item" :class="{'btn-item-active': isBtnActive === item.pathName || item.isHover }" @click="setBtn('click', item)">
+    <div
+      v-for="item in navList"
+      :key="item.pathName"
+      class="vent-row-center btn-item"
+      :class="{ 'btn-item-active': isBtnActive === item.pathName || item.isHover }"
+      @click="setBtn('click', item)"
+    >
       {{ item.title }}
     </div>
   </div>
 </template>
 <script lang="ts">
-import { ref, defineComponent } from 'vue'
-type navListType = { title: string; pathName: string; isHover: Boolean };
+  import { ref, defineComponent } from 'vue';
+  type navListType = { title: string; pathName: string; isHover: Boolean };
 
-export default defineComponent({
-  name: 'BottomMenu',
-  props: {
-    navList: {
-      type: Array<navListType>,
-      default: () => [
-        {
-          title: '监控界面',
-          pathName: 'monitor',
-          isHover: false
-        },
-        {
-          title: '历史监测记录',
-          pathName: 'monitor_history',
-          isHover: false
-        },
-        {
-          title: '操作历史记录',
-          pathName: 'handler_history',
-          isHover: false
-        },
-        {
-          title: '故障诊断历史记录',
-          pathName: 'faultRecord',
-          isHover: false
-        }
-      ]
+  export default defineComponent({
+    name: 'BottomMenu',
+    props: {
+      navList: {
+        type: Array<navListType>,
+        default: () => [
+          {
+            title: '监控界面',
+            pathName: 'monitor',
+            isHover: false,
+          },
+          {
+            title: '历史监测记录',
+            pathName: 'monitor_history',
+            isHover: false,
+          },
+          {
+            title: '操作历史记录',
+            pathName: 'handler_history',
+            isHover: false,
+          },
+          {
+            title: '故障诊断历史记录',
+            pathName: 'faultRecord',
+            isHover: false,
+          },
+        ],
+      },
     },
-  },
-  emits: ['change'],
-  setup(props, {emit}) {
-    const isBtnActive = ref(props.navList[0].pathName)
+    emits: ['change'],
+    setup(props, { emit }) {
+      const isBtnActive = ref(props.navList[0].pathName);
 
-    function setBtn(type, activeObj) {
-      if (type === 'click') {
-        isBtnActive.value = activeObj.pathName
-        activeObj.isHover = true
-      }
-      props.navList.forEach(item => {
-        if(item.title !== activeObj.title){
-          activeObj.isHover = false
+      function setBtn(type, activeObj) {
+        if (type === 'click') {
+          isBtnActive.value = activeObj.pathName;
+          activeObj.isHover = true;
         }
-      })
-      emit('change', isBtnActive.value)
-    }
-    return {
-      setBtn, isBtnActive
-    }
-  },
-})
-
-
+        props.navList.forEach((item) => {
+          if (item.title !== activeObj.title) {
+            activeObj.isHover = false;
+          }
+        });
+        emit('change', isBtnActive.value);
+      }
+      return {
+        setBtn,
+        isBtnActive,
+      };
+    },
+  });
 </script>
 <style lang="less" scoped>
-.bottom-btn-group {
+  .bottom-btn-group {
     display: flex;
     position: fixed;
     width: 100%;
@@ -89,4 +94,4 @@ export default defineComponent({
       color: #ffffff !important;
     }
   }
-</style>
+</style>

+ 15 - 16
src/views/vent/comment/components/fourBorderBg.vue

@@ -6,16 +6,16 @@
     <div class="border_corner border_corner_left_bottom"></div>
     <div class="border_corner border_corner_right_bottom"></div>
     <div class="main">
-        <!-- 这里写内容 -->
-        <slot></slot>
+      <!-- 这里写内容 -->
+      <slot></slot>
     </div>
-</div>
+  </div>
 </template>
 <script lang="ts">
-import { defineComponent } from 'vue'
-export default defineComponent({
-  name: 'fourBorderBg',
-})
+  import { defineComponent } from 'vue';
+  export default defineComponent({
+    name: 'FourBorderBg',
+  });
 </script>
 
 <style lang="less" scoped>
@@ -26,7 +26,7 @@ export default defineComponent({
   }
   .main {
     min-width: 60px;
-    border: 1px solid #3DF6FF66;
+    border: 1px solid #3df6ff66;
     border-radius: 2px;
     background-color: #001d3055;
     backdrop-filter: blur(8px);
@@ -34,41 +34,40 @@ export default defineComponent({
     padding: 5px 8px;
     color: #ffffffee;
   }
-  .border_corner{
+  .border_corner {
     z-index: 2500;
     position: absolute;
     width: 8px;
     height: 8px;
-    background-color: rgba(0,0,0,0);
-    border: 2px solid #3DF6FF;
+    background-color: rgba(0, 0, 0, 0);
+    border: 2px solid #3df6ff;
   }
-  .border_corner_left_top{
+  .border_corner_left_top {
     top: 0;
     left: 0;
     border-right: none;
     border-bottom: none;
     border-top-left-radius: 2px;
   }
-  .border_corner_right_top{
+  .border_corner_right_top {
     top: 0;
     right: 0;
     border-left: none;
     border-bottom: none;
     border-top-right-radius: 2px;
   }
-  .border_corner_left_bottom{
+  .border_corner_left_bottom {
     bottom: 0;
     left: 0;
     border-right: none;
     border-top: none;
     border-bottom-left-radius: 2px;
   }
-  .border_corner_right_bottom{
+  .border_corner_right_bottom {
     bottom: 0;
     right: 0;
     border-left: none;
     border-top: none;
     border-bottom-right-radius: 2px;
-
   }
 </style>

+ 220 - 214
src/views/vent/deviceManager/comment/NormalTable.vue

@@ -1,5 +1,5 @@
 <template>
-  <div >
+  <div>
     <BasicTable @register="registerTable" :rowSelection="rowSelection">
       <template #tableTitle>
         <a-button preIcon="ant-design:plus-outlined" type="primary" @click="handleAdd">新增</a-button>
@@ -22,10 +22,7 @@
       </template>
       <template #action="{ record }">
         <a class="table-action-link" @click="handleEdit(record)">编辑</a>
-        <a-popconfirm
-          title="确定删除?"
-          @confirm="handleDelete(record)"
-        >
+        <a-popconfirm title="确定删除?" @confirm="handleDelete(record)">
           <a class="table-action-link">删除</a>
         </a-popconfirm>
         <slot name="action" v-bind="{ record }"></slot>
@@ -40,236 +37,245 @@
 </template>
 
 <script lang="ts" setup>
-//ts语法
-import { ref, provide, reactive, toRaw, defineExpose, watch } from 'vue';
-import { BasicTable, ActionItem, EditRecordRow, BasicColumn } from '/@/components/Table';
-import { useModal } from '/@/components/Modal';
-import DeviceModal from './DeviceModal.vue';
-// import { getToken } from '/@/utils/auth';
-// import { useGlobSetting } from '/@/hooks/setting';
-import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
-import { useListPage } from '/@/hooks/system/useListPage';
-import { getPopupContainer } from '/@/utils';
+  //ts语法
+  import { ref, provide, reactive, toRaw, defineExpose, watch } from 'vue';
+  import { BasicTable, ActionItem, EditRecordRow, BasicColumn } from '/@/components/Table';
+  import { useModal } from '/@/components/Modal';
+  import DeviceModal from './DeviceModal.vue';
+  // import { getToken } from '/@/utils/auth';
+  // import { useGlobSetting } from '/@/hooks/setting';
+  import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
+  import { useListPage } from '/@/hooks/system/useListPage';
+  import { getPopupContainer } from '/@/utils';
 
-const props = defineProps({
-  columnsType: {
-    type: String,
-    // required: true,
-  },
-  columns: {
-    type: Array,
-    // required: true,
-    default: () => [],
-  },
-  searchFormSchema: {
-    type: Array,
-    default: () => [],
-  },
-  formSchema: {
-    type: Array,
-    required: true,
-  },
-  list: {
-    type: Function,
-    required: true,
-  },
-  getImportUrl: {
-    type: String,
-  },
-  getExportUrl: {
-    type: String,
-  },
-  deleteById: {
-    type: Function,
-    required: true,
-  },
-  batchDelete: {
-    type: Function,
-  },
-  saveOrUpdate: {
-    type: Function,
-    required: true,
-  },
-  pointList: {
-    type: Function,
-  },
-  showTab: {
-    type: Boolean,
-    default: false,
-  },
-  designScope: {
-    type: String,
-  },
-  title: {
-    type: String,
-  },
-  deviceType: {
-    type: String,
-  },
-});
+  const props = defineProps({
+    columnsType: {
+      type: String,
+      // required: true,
+    },
+    columns: {
+      type: Array,
+      // required: true,
+      default: () => [],
+    },
+    searchFormSchema: {
+      type: Array,
+      default: () => [],
+    },
+    formSchema: {
+      type: Array,
+      required: true,
+    },
+    list: {
+      type: Function,
+      required: true,
+    },
+    getImportUrl: {
+      type: String,
+    },
+    getExportUrl: {
+      type: String,
+    },
+    deleteById: {
+      type: Function,
+      required: true,
+    },
+    batchDelete: {
+      type: Function,
+    },
+    saveOrUpdate: {
+      type: Function,
+      required: true,
+    },
+    pointList: {
+      type: Function,
+    },
+    showTab: {
+      type: Boolean,
+      default: false,
+    },
+    designScope: {
+      type: String,
+    },
+    title: {
+      type: String,
+    },
+    deviceType: {
+      type: String,
+    },
+  });
 
-const emit = defineEmits(['submitSuccess', 'editHandler']);
+  const emit = defineEmits(['submitSuccess', 'editHandler']);
 
-const isUpdate = ref(false);
-const record = reactive({});
-const formSchemaData = ref(props.formSchema)
-const deviceTypeId = ref('')
-const pageType = ref('')
+  const isUpdate = ref(false);
+  const record = reactive({});
+  const formSchemaData = ref(props.formSchema);
+  const deviceTypeId = ref('');
+  const pageType = ref('');
 
-watch(() => props.formSchema, (val) => {
-  formSchemaData.value = val
-})
+  watch(
+    () => props.formSchema,
+    (val) => {
+      formSchemaData.value = val;
+    }
+  );
 
-provide('formSchema', formSchemaData);
-provide('isUpdate', isUpdate);
-provide('formData', record);
-provide('deviceType', props.deviceType);
-// const glob = useGlobSetting();
-const [registerModal, { openModal, closeModal }] = useModal();
+  provide('formSchema', formSchemaData);
+  provide('isUpdate', isUpdate);
+  provide('formData', record);
+  provide('deviceType', props.deviceType);
+  // const glob = useGlobSetting();
+  const [registerModal, { openModal, closeModal }] = useModal();
 
-const columnList = getTableHeaderColumns(props.columnsType);
+  const columnList = getTableHeaderColumns(props.columnsType);
 
-// 列表页面公共参数、方法
-const { prefixCls, tableContext, onExportXls, onImportXls, doRequest } = useListPage({
-  designScope: props.designScope,
-  tableProps: {
-    title: props.title,
-    api: props.list,
-    columns: props.columns.length > 0 ? (props.columns as any[]) : columnList,
-    showTableSetting: false,
-    // size: 'small',
-    // bordered: false,
-    formConfig: {
-      showAdvancedButton: true,
-      // labelWidth: 100,
-      labelAlign: 'left',
-      labelCol: {
-        xs: 24,
-        sm: 24,
-        md: 24,
-        lg: 9,
-        xl: 7,
-        xxl: 5,
+  // 列表页面公共参数、方法
+  const { prefixCls, tableContext, onExportXls, onImportXls, doRequest } = useListPage({
+    designScope: props.designScope,
+    tableProps: {
+      title: props.title,
+      api: props.list,
+      columns: props.columns.length > 0 ? (props.columns as any[]) : columnList,
+      showTableSetting: false,
+      // size: 'small',
+      // bordered: false,
+      formConfig: {
+        showAdvancedButton: true,
+        // labelWidth: 100,
+        labelAlign: 'left',
+        labelCol: {
+          xs: 24,
+          sm: 24,
+          md: 24,
+          lg: 9,
+          xl: 7,
+          xxl: 5,
+        },
+        schemas: props.searchFormSchema as any[],
+      },
+      useSearchForm: props.searchFormSchema.length > 0 ? true : false,
+      striped: true,
+      actionColumn: {
+        width: 180,
+      },
+      beforeFetch: (params) => {
+        return Object.assign(params, { column: 'createTime', devicekind: props.deviceType });
       },
-      schemas: props.searchFormSchema as any[],
     },
-    useSearchForm: props.searchFormSchema.length > 0 ? true : false,
-    striped: true,
-    actionColumn: {
-      width: 180,
+    exportConfig: {
+      name: props.title,
+      url: props.getExportUrl,
     },
-    beforeFetch: (params) => {
-      return Object.assign(params, { column: 'createTime', devicekind: props.deviceType });
+    importConfig: {
+      url: props.getImportUrl,
     },
-  },
-  exportConfig: {
-    name: props.title,
-    url: props.getExportUrl,
-  },
-  importConfig: {
-    url: props.getImportUrl,
-  },
-});
+  });
 
-const onExportXlsFn = () => {
-  const formData = getForm().getFieldsValue()
-  if(props.designScope == 'table-search-reset' && formData['devicetype']){
-    // 针对接口模糊查询的
-    onExportXls({...formData, devicetype: formData['devicetype']+'*'})
-  }else{
-    onExportXls()
-  }
-}
+  const onExportXlsFn = () => {
+    const formData = getForm().getFieldsValue();
+    if (props.designScope == 'table-search-reset' && formData['devicetype']) {
+      // 针对接口模糊查询的
+      onExportXls({ ...formData, devicetype: formData['devicetype'] + '*' });
+    } else {
+      onExportXls();
+    }
+  };
 
-//注册table数据
-const [registerTable, { reload, getForm }, { rowSelection, selectedRowKeys }] = tableContext;
+  //注册table数据
+  const [registerTable, { reload, getForm }, { rowSelection, selectedRowKeys }] = tableContext;
 
-const saveOrUpdateHandler = async (params) => {
-  try {
-    await props.saveOrUpdate(params, isUpdate.value);
-    !props.showTab ? closeModal() : '';
-    // await doRequest(props.list, { confirm: false });
-    reload()
-    emit('submitSuccess', params)
-  } catch (error) {
-    message.error('保存失败,请联系管理员');
-  }
-};
+  const saveOrUpdateHandler = async (params) => {
+    try {
+      await props.saveOrUpdate(params, isUpdate.value);
+      !props.showTab ? closeModal() : '';
+      // await doRequest(props.list, { confirm: false });
+      reload();
+      emit('submitSuccess', params);
+    } catch (error) {
+      message.error('保存失败,请联系管理员');
+    }
+  };
 
-// const closeModalFn = () => {
-//   closeModal()
-// }
-/**
- * 新增事件
- */
-function handleAdd() {
-  for (let key in record) {
-    delete record[key];
+  // const closeModalFn = () => {
+  //   closeModal()
+  // }
+  /**
+   * 新增事件
+   */
+  function handleAdd() {
+    for (let key in record) {
+      delete record[key];
+    }
+    isUpdate.value = false;
+    openModal(true);
   }
-  isUpdate.value = false;
-  openModal(true);
-}
-
-/**
- * 编辑事件
- */
-function handleEdit(data) {
-  isUpdate.value = true;
-  Object.assign(record, toRaw(data));
-  openModal(true, {
-    record,
-  }, false);
-}
-
-/**
- * 删除事件
- */
-async function handleDelete(record) {
-  await props.deleteById({ id: record.id }, reload);
-}
 
-/**
- * 批量删除事件
- */
-async function batchHandleDelete() {
-  doRequest(() => props.batchDelete({ ids: selectedRowKeys.value }));
-}
-/**
- * 查看
- */
-// function handleDetail(record) {
-//   iframeUrl.value = `${glob.uploadUrl}/sys/annountCement/show/${record.id}?token=${getToken()}`;
-//   openDetail(true);
-// }
-/**
- * 操作列定义
- * @param record
- */
-function getActions(record: EditRecordRow, column: BasicColumn): ActionItem[] {
-  return [
-    {
-      label: '编辑',
-      onClick: handleEdit.bind(null, record, column),
-    },
-    {
-      label: '删除',
-      popConfirm: {
-        title: '是否确认删除',
-        confirm: handleDelete.bind(null, record, column),
+  /**
+   * 编辑事件
+   */
+  function handleEdit(data) {
+    isUpdate.value = true;
+    Object.assign(record, toRaw(data));
+    openModal(
+      true,
+      {
+        record,
       },
-    },
-    // {
-    //   label: '查看',
-    //   onClick: handleDetail.bind(null, record),
-    // },
-  ];
-}
+      false
+    );
+  }
 
+  /**
+   * 删除事件
+   */
+  async function handleDelete(record) {
+    await props.deleteById({ id: record.id }, reload);
+  }
 
-defineExpose({
-  doRequest, onExportXls, onImportXls, reload, getForm
-});
+  /**
+   * 批量删除事件
+   */
+  async function batchHandleDelete() {
+    doRequest(() => props.batchDelete({ ids: selectedRowKeys.value }));
+  }
+  /**
+   * 查看
+   */
+  // function handleDetail(record) {
+  //   iframeUrl.value = `${glob.uploadUrl}/sys/annountCement/show/${record.id}?token=${getToken()}`;
+  //   openDetail(true);
+  // }
+  /**
+   * 操作列定义
+   * @param record
+   */
+  function getActions(record: EditRecordRow, column: BasicColumn): ActionItem[] {
+    return [
+      {
+        label: '编辑',
+        onClick: handleEdit.bind(null, record, column),
+      },
+      {
+        label: '删除',
+        popConfirm: {
+          title: '是否确认删除',
+          confirm: handleDelete.bind(null, record, column),
+        },
+      },
+      // {
+      //   label: '查看',
+      //   onClick: handleDetail.bind(null, record),
+      // },
+    ];
+  }
 
+  defineExpose({
+    doRequest,
+    onExportXls,
+    onImportXls,
+    reload,
+    getForm,
+  });
 </script>
 
 <style scoped lang="less">

+ 470 - 500
src/views/vent/monitorManager/alarmMonitor/DetailModalFire.vue

@@ -1,25 +1,21 @@
 <template>
-  <BasicModal @register="register" :title="titleName" width="100%" v-bind="$attrs" @ok="onSubmit" @cancel="onSubmit"
-    :defaultFullscreen="true">
+  <BasicModal @register="register" :title="titleName" width="100%" v-bind="$attrs" @ok="onSubmit" @cancel="onSubmit" :defaultFullscreen="true">
     <div class="alarm-modal">
       <div class="containers">
         <div class="alarm-menu">
           <div class="type-btn" v-if="isShowModule">
-            <div :class="activeIndex == index ? 'btn1' : 'btn'" v-for="(item, index) in typeMenuList" :key="index"
-              @click="btnClick(index)">
+            <div :class="activeIndex == index ? 'btn1' : 'btn'" v-for="(item, index) in typeMenuList" :key="index" @click="btnClick(index)">
               {{ item.name }}
             </div>
           </div>
           <div class="card-btn">
-            <div :class="activeIndex1 == ind ? 'btn1' : 'btn'" v-for="(item, ind) in menuList" :key="ind"
-              @click="cardClick(ind, item)">
+            <div :class="activeIndex1 == ind ? 'btn1' : 'btn'" v-for="(item, ind) in menuList" :key="ind" @click="cardClick(ind, item)">
               <div class="text">{{ item.name }}</div>
               <div class="warn">{{ item.warn }}</div>
             </div>
           </div>
         </div>
         <div class="alarm-content">
-
           <component :is="componentName[current]" :listData="listData" :strType="strType" />
         </div>
       </div>
@@ -27,571 +23,545 @@
   </BasicModal>
 </template>
 <script lang="ts" setup>
-import { onMounted, ref, defineEmits, reactive, onUnmounted, watch, markRaw, defineAsyncComponent, defineProps } from 'vue';
-import { BasicModal, useModalInner } from '/@/components/Modal';
-import { typeMenuList, componentName } from './fire.data';
-import { sysTypeWarnList, sysWarn } from './alarm.api';
-
-let props = defineProps({
-  moduleObj: {
-    type: Object,
-    default: () => {
-      return {}
-    }
-  }
-});
-
-let listData = reactive({
-  common: {},
-  bundletube: [],
-  fiber: [],
-  fire: [],
-  smoke: [],
-  spray: [],
-  temperature: [],
-}); //详情数据
-let isShowModule = ref(true); //是否显示内外因火灾切换按钮
-let titleName = ref('');
-let menuList = reactive<any[]>([]); //左侧菜单列表
-let menuList1 = reactive({
-  external: [],
-  internal: []
-})
-//内外因火灾激活索引
-let activeIndex = ref(0);
-//当前激活菜单的索引
-let activeIndex1 = ref(0);
-//当前加载组件
-let current = ref('');
-
-let strType = ref('')//火灾外因-区别工作面和煤层
-
-
-const emit = defineEmits(['close', 'register']);
-
-// 注册 modal
-const [register, { closeModal }] = useModalInner();
-
-// https获取监测数据
-let timer: null | NodeJS.Timeout = null;
-function getMonitor(deviceID) {
-  timer = setTimeout(
-    async () => {
+  import { onMounted, ref, defineEmits, reactive, onUnmounted, watch, markRaw, defineAsyncComponent, defineProps } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { typeMenuList, componentName } from './fire.data';
+  import { sysTypeWarnList, sysWarn } from './alarm.api';
+
+  let props = defineProps({
+    moduleObj: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  });
+
+  let listData = reactive({
+    common: {},
+    bundletube: [],
+    fiber: [],
+    fire: [],
+    smoke: [],
+    spray: [],
+    temperature: [],
+  }); //详情数据
+  let isShowModule = ref(true); //是否显示内外因火灾切换按钮
+  let titleName = ref('');
+  let menuList = reactive<any[]>([]); //左侧菜单列表
+  let menuList1 = reactive({
+    external: [],
+    internal: [],
+  });
+  //内外因火灾激活索引
+  let activeIndex = ref(0);
+  //当前激活菜单的索引
+  let activeIndex1 = ref(0);
+  //当前加载组件
+  let current = ref('');
+
+  let strType = ref(''); //火灾外因-区别工作面和煤层
+
+  const emit = defineEmits(['close', 'register']);
+
+  // 注册 modal
+  const [register, { closeModal }] = useModalInner();
+
+  // https获取监测数据
+  let timer: null | NodeJS.Timeout = null;
+  function getMonitor(deviceID) {
+    timer = setTimeout(async () => {
       await getSysWarnList(deviceID, props.moduleObj.moduleName);
       if (timer) {
         timer = null;
       }
       getMonitor(deviceID);
-    },
-    500
-  );
-}
-
-//清空数据
-function getClearList() {
-  listData.common = {}
-  listData.bundletube.length = 0
-  listData.fiber.length = 0
-  listData.fire.length = 0
-  listData.smoke.length = 0
-  listData.spray.length = 0
-  listData.temperature.length = 0
-}
-
-async function onSubmit() {
-  activeIndex1.value = 0;
-  activeIndex.value=0
-  getClearList()
-  clearTimeout(timer)
-  emit('close');
-  closeModal();
-
-}
-//内外因火灾选项切换
-function btnClick(ind) {
-  activeIndex.value = ind;
-  switch (ind) {
-    case 0:
-      activeIndex1.value = 0;
-      menuList.length = 0
-      current.value = '';
-      menuList1.internal.forEach(el => {
-        menuList.push({
-          name: el.systemname,
-          warn: '低风险',
-          type: 'on',
-          deviceID: el.id,
-          strtype: el.strtype,
-        })
-      })
-      clearTimeout(timer)
-      getClearList()
-      getMonitor(menuList[0].deviceID)
-      break;
-    case 1:
-      activeIndex1.value = 0;
-      menuList.length = 0
-      current.value = '';
-      if (menuList1.external.length != 0) {
-        menuList1.external.forEach(el => {
+    }, 500);
+  }
+
+  //清空数据
+  function getClearList() {
+    listData.common = {};
+    listData.bundletube.length = 0;
+    listData.fiber.length = 0;
+    listData.fire.length = 0;
+    listData.smoke.length = 0;
+    listData.spray.length = 0;
+    listData.temperature.length = 0;
+  }
+
+  async function onSubmit() {
+    activeIndex1.value = 0;
+    activeIndex.value = 0;
+    getClearList();
+    clearTimeout(timer);
+    emit('close');
+    closeModal();
+  }
+  //内外因火灾选项切换
+  function btnClick(ind) {
+    activeIndex.value = ind;
+    switch (ind) {
+      case 0:
+        activeIndex1.value = 0;
+        menuList.length = 0;
+        current.value = '';
+        menuList1.internal.forEach((el) => {
           menuList.push({
             name: el.systemname,
             warn: '低风险',
-            type: 'out',
+            type: 'on',
             deviceID: el.id,
             strtype: el.strtype,
-          })
-
-        })
-        clearTimeout(timer)
-        getClearList()
-        getMonitor(menuList[0].deviceID)
-        strType.value = menuList[0].strtype
-      } else {
-        menuList.length = 0
-        clearTimeout(timer)
-        current.value = ''
-      }
-      break;
+          });
+        });
+        clearTimeout(timer);
+        getClearList();
+        getMonitor(menuList[0].deviceID);
+        break;
+      case 1:
+        activeIndex1.value = 0;
+        menuList.length = 0;
+        current.value = '';
+        if (menuList1.external.length != 0) {
+          menuList1.external.forEach((el) => {
+            menuList.push({
+              name: el.systemname,
+              warn: '低风险',
+              type: 'out',
+              deviceID: el.id,
+              strtype: el.strtype,
+            });
+          });
+          clearTimeout(timer);
+          getClearList();
+          getMonitor(menuList[0].deviceID);
+          strType.value = menuList[0].strtype;
+        } else {
+          menuList.length = 0;
+          clearTimeout(timer);
+          current.value = '';
+        }
+        break;
+    }
   }
-}
-//菜单选项切换
-function cardClick(ind, item) {
-  activeIndex1.value = ind;
-  strType.value = item.strtype
-  clearTimeout(timer)
-  getClearList()
-  if (props.moduleObj.moduleName == 'fire') {
-    current.value = ''
+  //菜单选项切换
+  function cardClick(ind, item) {
+    activeIndex1.value = ind;
+    strType.value = item.strtype;
+    clearTimeout(timer);
+    getClearList();
+    if (props.moduleObj.moduleName == 'fire') {
+      current.value = '';
+    }
+    getMonitor(item.deviceID);
   }
-  getMonitor(item.deviceID)
-}
-
-//加载组件
-function loadZj() {
-  if (!activeIndex.value && listData.fiber.length != 0 && listData.bundletube.length != 0) {
-    current.value = 'fireWork'
-  } else if (!activeIndex.value && listData.bundletube.length != 0) {
-    current.value = 'closeWall'
-  } else if (activeIndex.value) {
-    current.value = 'mainWell'
-    // current.value = ''
-  } else {
-    current.value = ''
+
+  //加载组件
+  function loadZj() {
+    if (!activeIndex.value && listData.fiber.length != 0 && listData.bundletube.length != 0) {
+      current.value = 'fireWork';
+    } else if (!activeIndex.value && listData.bundletube.length != 0) {
+      current.value = 'closeWall';
+    } else if (activeIndex.value) {
+      current.value = 'mainWell';
+      // current.value = ''
+    } else {
+      current.value = '';
+    }
   }
-}
-
-//获取预警详情弹窗左侧数据
-function getSysTypeWarnList(data) {
-  sysTypeWarnList({ type: data }).then((res) => {
-    if (props.moduleObj.moduleName == 'vent') {
-      res.forEach((el) => {
-        menuList.push({
-          name: el.deviceName,
-          warn: el.netStatus ? '高风险' : '低风险',
-          type: 'on',
-          deviceID: el.deviceID,
-          strtype: el.deviceType
+
+  //获取预警详情弹窗左侧数据
+  function getSysTypeWarnList(data) {
+    sysTypeWarnList({ type: data }).then((res) => {
+      if (props.moduleObj.moduleName == 'vent') {
+        res.forEach((el) => {
+          menuList.push({
+            name: el.deviceName,
+            warn: el.netStatus ? '高风险' : '低风险',
+            type: 'on',
+            deviceID: el.deviceID,
+            strtype: el.deviceType,
+          });
         });
-      });
-      getMonitor(menuList[0].deviceID);
-    } else if (props.moduleObj.moduleName == 'fire') {
-      menuList1.external = res.external
-      menuList1.internal = res.internal
-      menuList1.internal.forEach(el => {
-        menuList.push({
-          name: el.systemname,
-          warn: '低风险',
-          type: 'on',
-          deviceID: el.id,
-          strtype: el.strtype
+        getMonitor(menuList[0].deviceID);
+      } else if (props.moduleObj.moduleName == 'fire') {
+        menuList1.external = res.external;
+        menuList1.internal = res.internal;
+        menuList1.internal.forEach((el) => {
+          menuList.push({
+            name: el.systemname,
+            warn: '低风险',
+            type: 'on',
+            deviceID: el.id,
+            strtype: el.strtype,
+          });
         });
-      })
-      getMonitor(menuList[0].deviceID);
-    } else if (props.moduleObj.moduleName == 'dust') {
-      res.forEach((el) => {
-        menuList.push({
-          name: el.systemname,
-          warn: '低风险',
-          type: 'on',
-          deviceID: el.id,
-          strtype: el.strtype
+        getMonitor(menuList[0].deviceID);
+      } else if (props.moduleObj.moduleName == 'dust') {
+        res.forEach((el) => {
+          menuList.push({
+            name: el.systemname,
+            warn: '低风险',
+            type: 'on',
+            deviceID: el.id,
+            strtype: el.strtype,
+          });
         });
-      });
-      getMonitor(menuList[0].deviceID);
-    } else if (props.moduleObj.moduleName == 'gas') {
-      res.forEach((el) => {
-        menuList.push({
-          name: el.systemname,
-          warn: '低风险',
-          type: 'on',
-          deviceID: el.id,
-          strtype: el.strtype
+        getMonitor(menuList[0].deviceID);
+      } else if (props.moduleObj.moduleName == 'gas') {
+        res.forEach((el) => {
+          menuList.push({
+            name: el.systemname,
+            warn: '低风险',
+            type: 'on',
+            deviceID: el.id,
+            strtype: el.strtype,
+          });
         });
-      });
-      getMonitor(menuList[0].deviceID);
-    }
-  });
-}
-//获取预警详情弹窗右侧数据
-function getSysWarnList(id, type) {
-  sysWarn({ sysid: id, type: type }).then((res) => {
-    if (type == 'fire') {
-      listData.bundletube = res.bundletube,
-        listData.fiber = res.fiber
-      listData.fire = res.fire,
-        listData.smoke = res.smoke,
-        listData.spray = res.spray,
-        listData.temperature = res.temperature,
-        loadZj()
-    } else if (type == 'vent' || type == 'dust' || type == 'gas') {
-      listData.common = res
-    }
-  });
-}
-
-watch(
-  () => props.moduleObj,
-  (val) => {
-    if (val.moduleName == 'fire') {
-      menuList.length = 0
-      menuList1.external.length = 0
-      menuList1.internal.length = 0
-      current.value = '';
-      titleName.value = '火灾监测';
-      isShowModule.value = true;
-      getSysTypeWarnList('fire');
-    } else if (val.moduleName == 'dust') {
-      menuList.length = 0
-      current.value = '';
-      titleName.value = '粉尘监测';
-      isShowModule.value = false;
-      current.value = 'dustPage';
-      getSysTypeWarnList('dust');
-
-    } else if (val.moduleName == 'vent') {
-      menuList.length = 0
-      current.value = '';
-      titleName.value = '通风监测';
-      isShowModule.value = false;
-      current.value = 'ventilate';
-      getSysTypeWarnList('vent');
-    } else if (val.moduleName == 'gas') {
-      menuList.length = 0
-      current.value = '';
-      titleName.value = '瓦斯监测';
-      isShowModule.value = false;
-      current.value = 'gasPage';
-      getSysTypeWarnList('gas');
-    }
-  },
-  { immediate: true, deep: true }
-);
+        getMonitor(menuList[0].deviceID);
+      }
+    });
+  }
+  //获取预警详情弹窗右侧数据
+  function getSysWarnList(id, type) {
+    sysWarn({ sysid: id, type: type }).then((res) => {
+      if (type == 'fire') {
+        (listData.bundletube = res.bundletube), (listData.fiber = res.fiber);
+        (listData.fire = res.fire), (listData.smoke = res.smoke), (listData.spray = res.spray), (listData.temperature = res.temperature), loadZj();
+      } else if (type == 'vent' || type == 'dust' || type == 'gas') {
+        listData.common = res;
+      }
+    });
+  }
 
-onMounted(async () => { });
+  watch(
+    () => props.moduleObj,
+    (val) => {
+      if (val.moduleName == 'fire') {
+        menuList.length = 0;
+        menuList1.external.length = 0;
+        menuList1.internal.length = 0;
+        current.value = '';
+        titleName.value = '火灾监测';
+        isShowModule.value = true;
+        getSysTypeWarnList('fire');
+      } else if (val.moduleName == 'dust') {
+        menuList.length = 0;
+        current.value = '';
+        titleName.value = '粉尘监测';
+        isShowModule.value = false;
+        current.value = 'dustPage';
+        getSysTypeWarnList('dust');
+      } else if (val.moduleName == 'vent') {
+        menuList.length = 0;
+        current.value = '';
+        titleName.value = '通风监测';
+        isShowModule.value = false;
+        current.value = 'ventilate';
+        getSysTypeWarnList('vent');
+      } else if (val.moduleName == 'gas') {
+        menuList.length = 0;
+        current.value = '';
+        titleName.value = '瓦斯监测';
+        isShowModule.value = false;
+        current.value = 'gasPage';
+        getSysTypeWarnList('gas');
+      }
+    },
+    { immediate: true, deep: true }
+  );
 
+  onMounted(async () => {});
 </script>
 <style scoped lang="less">
-@import '/@/design/vent/color.less';
-@import '/@/design/vent/modal.less';
+  @import '/@/design/vent/color.less';
+  @import '/@/design/vent/modal.less';
 
-.alarm-modal {
-  position: relative;
-  z-index: 999;
+  .alarm-modal {
+    position: relative;
+    z-index: 999;
 
-  max-height: calc(100vh - 150px);
+    max-height: calc(100vh - 150px);
 
-  .@{ventSpace}-tabs {
-    max-height: calc(100vh - 100px);
-  }
+    .@{ventSpace}-tabs {
+      max-height: calc(100vh - 100px);
+    }
 
-  .containers {
-    width: 100%;
-    height: calc(100vh - 159px);
-    display: flex;
-    justify-content: space-between;
-
-    .alarm-menu {
-      height: 100%;
-      // width: 272px;
-      width: 15%;
-
-      .type-btn {
-        width: 68%;
-        height: 28px;
-        line-height: 28px;
-        border: 1px solid #0058ee;
-        margin-bottom: 20px;
-        border-radius: 5px;
-        box-sizing: border-box;
-        display: flex;
-        justify-content: space-between;
-
-        .btn {
-          width: 50%;
-          height: 100%;
-          font-size: 14px;
-          text-align: center;
-          color: #fff;
-          cursor: pointer;
-        }
+    .containers {
+      width: 100%;
+      height: calc(100vh - 159px);
+      display: flex;
+      justify-content: space-between;
+
+      .alarm-menu {
+        height: 100%;
+        // width: 272px;
+        width: 15%;
+
+        .type-btn {
+          width: 68%;
+          height: 28px;
+          line-height: 28px;
+          border: 1px solid #0058ee;
+          margin-bottom: 20px;
+          border-radius: 5px;
+          box-sizing: border-box;
+          display: flex;
+          justify-content: space-between;
+
+          .btn {
+            width: 50%;
+            height: 100%;
+            font-size: 14px;
+            text-align: center;
+            color: #fff;
+            cursor: pointer;
+          }
 
-        .btn1 {
-          width: 50%;
-          height: 100%;
-          font-size: 14px;
-          color: #fff;
-          text-align: center;
-          border-radius: 2px;
-          background: #0058ee;
-          cursor: pointer;
+          .btn1 {
+            width: 50%;
+            height: 100%;
+            font-size: 14px;
+            color: #fff;
+            text-align: center;
+            border-radius: 2px;
+            background: #0058ee;
+            cursor: pointer;
+          }
         }
-      }
 
-      .card-btn {
-        width: 100%;
-        height: calc(100% - 48px);
-        overflow-y: auto;
-
-        .btn {
-          position: relative;
-          width: 81%;
-          height: 14%;
-          margin-bottom: 10%;
-          font-family: 'douyuFont';
-          background: url('../../../../assets/images/fire/no-choice.png') no-repeat;
-          background-size: 100% 100%;
-          cursor: pointer;
-
-          @media screen and (max-width:1920px) {
-            .text {
-              width: 80%;
-              position: absolute;
-              left: 50%;
-              top: 22px;
-              font-size: 16px;
-              color: #01fefc;
-              text-align: center;
-              transform: translate(-50%, 0);
+        .card-btn {
+          width: 100%;
+          height: calc(100% - 48px);
+          overflow-y: auto;
+
+          .btn {
+            position: relative;
+            width: 81%;
+            height: 14%;
+            margin-bottom: 10%;
+            font-family: 'douyuFont';
+            background: url('../../../../assets/images/fire/no-choice.png') no-repeat;
+            background-size: 100% 100%;
+            cursor: pointer;
+
+            @media screen and (max-width: 1920px) {
+              .text {
+                width: 80%;
+                position: absolute;
+                left: 50%;
+                top: 22px;
+                font-size: 16px;
+                color: #01fefc;
+                text-align: center;
+                transform: translate(-50%, 0);
+              }
             }
-          }
-
 
-          @media screen and (min-width:1921px) and (max-width:2560px) {
-            .text {
-              width: 100%;
-              position: absolute;
-              left: 50%;
-              top: 38px;
-              font-size: 16px;
-              color: #01fefc;
-              text-align: center;
-              transform: translate(-50%, 0);
+            @media screen and (min-width: 1921px) and (max-width: 2560px) {
+              .text {
+                width: 100%;
+                position: absolute;
+                left: 50%;
+                top: 38px;
+                font-size: 16px;
+                color: #01fefc;
+                text-align: center;
+                transform: translate(-50%, 0);
+              }
             }
 
-          }
-
-
-          @media screen and (max-width:1920px) {
-            .warn {
-              width: 100%;
-              position: absolute;
-              left: 50%;
-              top: 70px;
-              font-size: 16px;
-              color: #fff;
-              text-align: center;
-              transform: translate(-50%, 0);
-
+            @media screen and (max-width: 1920px) {
+              .warn {
+                width: 100%;
+                position: absolute;
+                left: 50%;
+                top: 70px;
+                font-size: 16px;
+                color: #fff;
+                text-align: center;
+                transform: translate(-50%, 0);
+              }
             }
-          }
 
-          @media screen and (min-width: 1921px) and (max-width:2560px) {
-            .warn {
-              width: 100%;
-              position: absolute;
-              left: 50%;
-              top: 103px;
-              font-size: 16px;
-              color: #fff;
-              text-align: center;
-              transform: translate(-50%, 0);
+            @media screen and (min-width: 1921px) and (max-width: 2560px) {
+              .warn {
+                width: 100%;
+                position: absolute;
+                left: 50%;
+                top: 103px;
+                font-size: 16px;
+                color: #fff;
+                text-align: center;
+                transform: translate(-50%, 0);
+              }
             }
-
           }
-        }
 
-        .btn1 {
-          position: relative;
-          width: 100%;
-          height: 14%;
-          margin-bottom: 10%;
-          font-family: 'douyuFont';
-          background: url('../../../../assets//images//fire/choice.png') no-repeat;
-          background-size: 100% 100%;
-          cursor: pointer;
-
-
-
-          @media screen and (max-width:1920px) {
-            .text {
-              width: 80%;
-              position: absolute;
-              left: 50%;
-              top: 22px;
-              font-size: 16px;
-              color: #01fefc;
-              text-align: center;
-              transform: translate(-62%, 0);
+          .btn1 {
+            position: relative;
+            width: 100%;
+            height: 14%;
+            margin-bottom: 10%;
+            font-family: 'douyuFont';
+            background: url('../../../../assets//images//fire/choice.png') no-repeat;
+            background-size: 100% 100%;
+            cursor: pointer;
+
+            @media screen and (max-width: 1920px) {
+              .text {
+                width: 80%;
+                position: absolute;
+                left: 50%;
+                top: 22px;
+                font-size: 16px;
+                color: #01fefc;
+                text-align: center;
+                transform: translate(-62%, 0);
+              }
             }
-          }
 
-          @media screen and (min-width: 1921px) and (max-width:2560px) {
-            .text {
-              width: 100%;
-              position: absolute;
-              left: 50%;
-              top: 38px;
-              font-size: 16px;
-              color: #01fefc;
-              text-align: center;
-              transform: translate(-60%, 0);
+            @media screen and (min-width: 1921px) and (max-width: 2560px) {
+              .text {
+                width: 100%;
+                position: absolute;
+                left: 50%;
+                top: 38px;
+                font-size: 16px;
+                color: #01fefc;
+                text-align: center;
+                transform: translate(-60%, 0);
+              }
             }
 
-          }
-
-
-          @media screen and (max-width:1920px) {
-            .warn {
-              width: 100%;
-              position: absolute;
-              left: 50%;
-              top: 70px;
-              font-size: 16px;
-              color: #fff;
-              text-align: center;
-              transform: translate(-60%, 0);
+            @media screen and (max-width: 1920px) {
+              .warn {
+                width: 100%;
+                position: absolute;
+                left: 50%;
+                top: 70px;
+                font-size: 16px;
+                color: #fff;
+                text-align: center;
+                transform: translate(-60%, 0);
+              }
             }
-          }
 
-          @media screen and (min-width: 1921px) and (max-width:2560px) {
-            .warn {
-              width: 100%;
-              position: absolute;
-              left: 50%;
-              top: 103px;
-              font-size: 16px;
-              color: #fff;
-              text-align: center;
-              transform: translate(-60%, 0);
+            @media screen and (min-width: 1921px) and (max-width: 2560px) {
+              .warn {
+                width: 100%;
+                position: absolute;
+                left: 50%;
+                top: 103px;
+                font-size: 16px;
+                color: #fff;
+                text-align: center;
+                transform: translate(-60%, 0);
+              }
             }
-
           }
         }
       }
-    }
 
-    .alarm-content {
-      width: calc(85% - 10px);
-      height: 100%;
-      margin-left: 10px;
-      background: url('../../../../assets//images/fire/border.png') no-repeat;
-      background-size: 100% 100%;
+      .alarm-content {
+        width: calc(85% - 10px);
+        height: 100%;
+        margin-left: 10px;
+        background: url('../../../../assets//images/fire/border.png') no-repeat;
+        background-size: 100% 100%;
+      }
     }
-
   }
-}
 
+  :deep(.@{ventSpace}-tabs-tabpane-active) {
+    height: 100%;
+  }
 
+  :deep(.@{ventSpace}-tabs-card) {
+    .@{ventSpace}-tabs-tab {
+      background: linear-gradient(#2cd1ff55, #1eb0ff55);
+      border-color: #74e9fe;
+      border-radius: 0%;
 
-:deep(.@{ventSpace}-tabs-tabpane-active) {
-  height: 100%;
-}
+      &:hover {
+        color: #64d5ff;
+      }
+    }
 
-:deep(.@{ventSpace}-tabs-card) {
-  .@{ventSpace}-tabs-tab {
-    background: linear-gradient(#2cd1ff55, #1eb0ff55);
-    border-color: #74e9fe;
-    border-radius: 0%;
+    .@{ventSpace}-tabs-tab.@{ventSpace}-tabs-tab-active .@{ventSpace}-tabs-tab-btn {
+      color: aqua;
+    }
 
-    &:hover {
-      color: #64d5ff;
+    .@{ventSpace}-tabs-nav::before {
+      border-color: #74e9fe;
     }
-  }
 
-  .@{ventSpace}-tabs-tab.@{ventSpace}-tabs-tab-active .@{ventSpace}-tabs-tab-btn {
-    color: aqua;
-  }
+    .@{ventSpace}-picker,
+    .@{ventSpace}-select-selector {
+      width: 100% !important;
+      background: #00000017 !important;
+      border: 1px solid @vent-form-item-boder !important;
 
-  .@{ventSpace}-tabs-nav::before {
-    border-color: #74e9fe;
-  }
+      input,
+      .@{ventSpace}-select-selection-item,
+      .@{ventSpace}-picker-suffix {
+        color: #fff !important;
+      }
 
-  .@{ventSpace}-picker,
-  .@{ventSpace}-select-selector {
-    width: 100% !important;
-    background: #00000017 !important;
-    border: 1px solid @vent-form-item-boder !important;
+      .@{ventSpace}-select-selection-placeholder {
+        color: #b7b7b7 !important;
+      }
+    }
 
-    input,
-    .@{ventSpace}-select-selection-item,
-    .@{ventSpace}-picker-suffix {
+    .@{ventSpace}-pagination-next,
+    .action,
+    .@{ventSpace}-select-arrow,
+    .@{ventSpace}-picker-separator {
       color: #fff !important;
     }
 
-    .@{ventSpace}-select-selection-placeholder {
-      color: #b7b7b7 !important;
+    .@{ventSpace}-table-cell-row-hover {
+      background: #264d8833 !important;
     }
-  }
 
-  .@{ventSpace}-pagination-next,
-  .action,
-  .@{ventSpace}-select-arrow,
-  .@{ventSpace}-picker-separator {
-    color: #fff !important;
-  }
-
-  .@{ventSpace}-table-cell-row-hover {
-    background: #264d8833 !important;
-  }
-
-  .@{ventSpace}-table-row-selected {
-    background: #00c0a311 !important;
+    .@{ventSpace}-table-row-selected {
+      background: #00c0a311 !important;
 
-    td {
-      background-color: #00000000 !important;
+      td {
+        background-color: #00000000 !important;
+      }
     }
-  }
 
-  .@{ventSpace}-table-thead {
-    // background: linear-gradient(#004a8655 0%, #004a86aa 10%) !important;
-    background: #3d9dd45d !important;
-
-    &>tr>th,
-    .@{ventSpace}-table-column-title {
-      // color: #70f9fc !important;
-      border-color: #84f2ff !important;
-      border-left: none !important;
-      border-right: none !important;
-      padding: 7px;
+    .@{ventSpace}-table-thead {
+      // background: linear-gradient(#004a8655 0%, #004a86aa 10%) !important;
+      background: #3d9dd45d !important;
+
+      & > tr > th,
+      .@{ventSpace}-table-column-title {
+        // color: #70f9fc !important;
+        border-color: #84f2ff !important;
+        border-left: none !important;
+        border-right: none !important;
+        padding: 7px;
+      }
     }
-  }
 
-  .@{ventSpace}-table-tbody {
-    tr>td {
-      padding: 12px;
+    .@{ventSpace}-table-tbody {
+      tr > td {
+        padding: 12px;
+      }
     }
-  }
 
-  .@{ventSpace}-table-tbody>tr:hover.@{ventSpace}-table-row>td {
-    background-color: #26648855 !important;
-  }
-
-  .jeecg-basic-table-row__striped {
+    .@{ventSpace}-table-tbody > tr:hover.@{ventSpace}-table-row > td {
+      background-color: #26648855 !important;
+    }
 
-    // background: #97efff11 !important;
-    td {
-      background-color: #97efff11 !important;
+    .jeecg-basic-table-row__striped {
+      // background: #97efff11 !important;
+      td {
+        background-color: #97efff11 !important;
+      }
     }
   }
-}</style>
+</style>

+ 20 - 1
src/views/vent/monitorManager/alarmMonitor/index.vue

@@ -440,7 +440,26 @@
         iconsMonitor[el].level = res.info.devicekindInfo[el].maxLevel;
       }
     });
-    // fireMonitor[0].value = res.info.sysInfo.fireS.summaryInfo.external.temperature ? res.info.sysInfo.fireS.summaryInfo.external.temperature.value : '';
+    fireMonitor[0].value =
+      res.info.sysInfo.fireS.summaryInfo.external.temperature && res.info.sysInfo.fireS.summaryInfo.external.temperature.maxlevel == '0'
+        ? '正常'
+        : '-';
+    fireMonitor[1].value =
+      res.info.sysInfo.fireS.summaryInfo.external.smokeval &&
+      res.info.sysInfo.fireS.summaryInfo.external.smokeval.maxlevel &&
+      res.info.sysInfo.fireS.summaryInfo.external.smokeval.maxlevel == '0'
+        ? '正常'
+        : '-';
+    fireMonitor[2].value =
+      res.info.sysInfo.fireS.summaryInfo.external.fireval &&
+      res.info.sysInfo.fireS.summaryInfo.external.fireval.maxlevel &&
+      res.info.sysInfo.fireS.summaryInfo.external.fireval.maxlevel == '0'
+        ? '正常'
+        : '-';
+    fireMonitor[3].value =
+      res.info.sysInfo.fireS.summaryInfo.external.coval && res.info.sysInfo.fireS.summaryInfo.external.coval.value
+        ? res.info.sysInfo.fireS.summaryInfo.external.coval.value
+        : '-';
     // fireMonitor[0].level = res.info.sysInfo.fireS.summaryInfo.external.temperature ? res.info.sysInfo.fireS.summaryInfo.external.temperature.maxlevel : '';
     // fireMonitor[1].value = res.info.sysInfo.fireS.summaryInfo.external.coval ? res.info.sysInfo.fireS.summaryInfo.external.coval.value : '';
     // fireMonitor[1].level = res.info.sysInfo.fireS.summaryInfo.external.coval ? res.info.sysInfo.fireS.summaryInfo.external.coval.maxlevel : '';

+ 18 - 12
src/views/vent/monitorManager/beltTunMonitor/beltTun.threejs.base.ts

@@ -12,7 +12,7 @@ import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer.js';
 // const gui = new dat.GUI();
 // gui.domElement.style = 'position:absolute;top:100px;left:10px;z-index:99999999999999';
 
-class WorkFace {
+class BeltFace {
   model;
   modelName = 'beltTun';
   group: THREE.Object3D = new THREE.Object3D();
@@ -114,18 +114,23 @@ class WorkFace {
   }
 
   render() {
-    const _this = this;
+    // 无发光
     if (this.model && this.model.scene.getObjectByName(this.modelName)) {
-      this.group?.traverse((obj) => {
-        _this.darkenNonBloomed(obj);
-      });
-      this.bloomComposer?.render();
-      this.group?.traverse((obj) => {
-        _this.restoreMaterial(obj);
-      });
-      this.finalComposer?.render();
-      this.model.css3dRender?.render(this.model.scene as THREE.Scene, this.model.camera as THREE.PerspectiveCamera);
+      this.model.renderer?.render(this.model.scene as THREE.Scene, this.model.camera as THREE.PerspectiveCamera);
     }
+    // 有发光
+    // const _this = this;
+    // if (this.model && this.model.scene.getObjectByName(this.modelName)) {
+    //   this.group?.traverse((obj) => {
+    //     _this.darkenNonBloomed(obj);
+    //   });
+    //   this.bloomComposer?.render();
+    //   this.group?.traverse((obj) => {
+    //     _this.restoreMaterial(obj);
+    //   });
+    //   this.finalComposer?.render();
+    //   this.model.css3dRender?.render(this.model.scene as THREE.Scene, this.model.camera as THREE.PerspectiveCamera);
+    // }
   }
 
   setRenderPass = () => {
@@ -264,6 +269,7 @@ class WorkFace {
 
   /* 点击 */
   mousedownModel(rayCaster: THREE.Raycaster) {
+    debugger;
     // const outlinePass = this.outlinePass;
     // const selectedObjects = [];
     // outlinePass.selectedObjects = selectedObjects;
@@ -326,4 +332,4 @@ class WorkFace {
   }
 }
 
-export default WorkFace;
+export default BeltFace;

+ 10 - 6
src/views/vent/monitorManager/beltTunMonitor/beltTun.threejs.ts

@@ -1,12 +1,12 @@
 import * as THREE from 'three';
 import UseThree from '../../../../utils/threejs/useThree';
-import WorkFace from './beltTun.threejs.base';
+import BeltFace from './beltTun.threejs.base';
 import { animateCamera } from '/@/utils/threejs/util';
 import useEvent from '../../../../utils/threejs/useEvent';
 
 // 模型对象、 文字对象
 let model,
-  beltTunObj: WorkFace | undefined,
+  beltTunObj: BeltFace | undefined,
   group: THREE.Object3D | undefined,
   fiberType = 'beltTun'; // workerFaceFiber
 const { mouseDownFn } = useEvent();
@@ -23,7 +23,7 @@ const mouseEvent = (event) => {
 
 const addMouseEvent = () => {
   // 定义鼠标点击事件
-  model.canvasContainer?.addEventListener('mousedown', mouseEvent.bind(null));
+  model.canvasContainer?.addEventListener('mousedown', mouseEvent);
   // model.canvasContainer?.addEventListener('pointerup', (event) => {
   //   event.stopPropagation();
   //   if (fiberType === 'beltTun') {
@@ -31,12 +31,16 @@ const addMouseEvent = () => {
   //   }
   // });
 };
+const removeEvent = () => {
+  model.canvasContainer?.removeEventListener('mousedown', mouseEvent);
+};
 
 const render = () => {
   if (model && model.isRender) {
     model.animationId = requestAnimationFrame(render);
     model.css3dRender?.render(model.scene as THREE.Scene, model.camera as THREE.PerspectiveCamera);
     model.stats?.update();
+    beltTunObj?.render();
   }
 };
 
@@ -58,7 +62,7 @@ export const setModelType = (type) => {
       if (!model.scene.getObjectByName('beltTun')) {
         model.scene.add(beltTunObj.group);
       }
-      model.orbitControls.addEventListener('change', beltTunObj.render.bind(beltTunObj));
+      // model.orbitControls.addEventListener('change', beltTunObj.render.bind(beltTunObj));
 
       setTimeout(async () => {
         resolve(null);
@@ -83,10 +87,10 @@ export const mountedThree = () => {
     model.setEnvMap('test1');
     model.renderer.toneMappingExposure = 1.0;
     model.camera.position.set(100, 0, 1000);
-    beltTunObj = new WorkFace(model);
+    beltTunObj = new BeltFace(model);
     await beltTunObj.mountedThree();
 
-    addMouseEvent();
+    // addMouseEvent();
     render();
     resolve(null);
   });

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

@@ -46,7 +46,7 @@
 
 <script setup lang="ts">
 import { onBeforeMount, ref, onMounted, onUnmounted, reactive, toRaw } from 'vue';
-import { mountedThree, destroy, setModelType, refreshModal } from './beltTun.threejs';
+import { mountedThree, destroy, setModelType } from './beltTun.threejs';
 import { list, systemList, getTableList } from './beltTun.api';
 import { monitorNav } from './beltTun.data'
 import customHeader from '/@/views/vent/comment/components/customHeader.vue';
@@ -93,7 +93,6 @@ function changeActive(activeValue) {
   activeKey.value = activeValue
   loading.value = true
   if(activeKey.value === 'monitor'){
-    // refreshModal()
     setModelType('beltTun')
     setTimeout(() =>{
       loading.value = false

+ 4 - 1
src/views/vent/monitorManager/camera/camera.api.ts

@@ -2,9 +2,12 @@ import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
   list = '/ventanaly-device/safety/ventanalyCamera/list',
+  getCameraUrl = '/ventanaly-device/camera/queryByCameraCode',
 }
 /**
  * 列表接口
  * @param params
  */
-export const list = (params) => defHttp.get({ url: Api.list, params });
+export const list = (params) => defHttp.get({ url: Api.list, params });
+
+export const cameraAddr = (params) => defHttp.get({ url: Api.getCameraUrl, params });

+ 16 - 3
src/views/vent/monitorManager/camera/index.vue

@@ -17,16 +17,29 @@
 </template>
 <script lang="ts" setup>
   import {onMounted, onUnmounted, ref } from 'vue';
-  import { list } from './camera.api'
+  import { list, cameraAddr } from './camera.api'
   import LivePlayer from '@liveqing/liveplayer-v3';
-
+  
   const webRtcServerList = <any[]>[]
   let addrList = ref<{ name: string, addr: string }[]>([])
 
   async function getVideoAddrs(){
     const result = await list({ pageSize: 10000 })
     if(result && result.records && result.records.length > 0){
-      addrList.value = result.records.map(item => ({ addr: item['addr'].includes('0.0.0.0') ? item['addr'].replace('0.0.0.0', window.location.hostname) :item['addr'] , name: item['name'] }))
+      // addrList.value = result.records.map(item => ({ addr: item['addr'].includes('0.0.0.0') ? item['addr'].replace('0.0.0.0', window.location.hostname) :item['addr'] , name: item['name'] }))
+      const cameraList = <{ name: string, addr: string }[]>[]
+      result.records.forEach(async item => {
+        if (item['devicekind'] == 'toHKRtsp') {
+          // 从海康平台接口获取视频流
+          const data = await cameraAddr({ cameraCode: item['addr'] });
+          if (data && data['url']) {
+            cameraList.push({ name: item['name'], addr: data['url'] });
+          }
+        } else {
+          cameraList.push({ name: item['name'], addr: item['addr'] });
+        }
+      });
+      addrList.value = cameraList
     }
   }
 

+ 17 - 4
src/views/vent/monitorManager/comment/AlarmHistoryTable.vue

@@ -1,12 +1,16 @@
 <template>
   <div class="alarm-history-table">
-    <BasicTable ref="alarmHistory" @register="registerTable" />
+    <BasicTable ref="alarmHistory" @register="registerTable">
+      <template #form-onExportXls>
+        <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls()"> 导出</a-button>
+      </template>
+    </BasicTable>
   </div>
 </template>
 
 <script lang="ts" name="system-user" setup>
   //ts语法
-  import { watch, ref, defineExpose, inject } from 'vue';
+  import { watch, ref, defineExpose, inject, onMounted } from 'vue';
   import { BasicTable } from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage';
   import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
@@ -137,7 +141,7 @@
   );
 
   // 列表页面公共参数、方法
-  const { tableContext } = useListPage({
+  const { tableContext, onExportXls } = useListPage({
     tableProps: {
       api: props.list,
       columns: props.columnsType ? columns : (props.columns as any[]),
@@ -163,7 +167,7 @@
           },
           {
             label: '查询设备',
-            field: 'deviceid',
+            field: 'gdeviceid',
             component: 'Select',
             defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
             required: true,
@@ -189,9 +193,18 @@
         }
       },
     },
+    exportConfig: {
+      name: '预警历史列表',
+      url: '/safety/ventanalyAlarmLog/exportXls',
+    },
   });
   //注册table数据
   const [registerTable, { reload, setLoading, getForm }] = tableContext;
+
+  onMounted(async () => {
+    await getDeviceList();
+  });
+
   defineExpose({ setLoading });
 </script>
 

+ 0 - 1
src/views/vent/monitorManager/comment/GroupMonitorTable.vue

@@ -242,7 +242,6 @@
                   resultData1[columnKey] = data['Fan1StartStatus'] == '0' && globalConfig?.simulatedPassword ? '-' : data[key1];
                   resultData2[columnKey] = data['Fan2StartStatus'] == '0' && globalConfig?.simulatedPassword ? '-' : data[key2];
                 }
-
                 if (resultData1[columnKey] == undefined && resultData2[columnKey] == undefined) {
                   resultData1[columnKey] = data[columnKey];
                   resultData2[columnKey] = data[columnKey];

+ 23 - 3
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -4,6 +4,9 @@
       <template #bodyCell="{ column, record }">
         <slot name="filterCell" v-bind="{ column, record }"></slot>
       </template>
+      <!-- <template #form-onExportXls>
+        <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
+      </template> -->
     </BasicTable>
   </div>
 </template>
@@ -18,7 +21,7 @@
   import { defHttp } from '/@/utils/http/axios';
   import dayjs from 'dayjs';
   import { getAutoScrollContainer } from '/@/utils/common/compUtils';
-import { onMounted } from 'vue';
+  import { onMounted } from 'vue';
 
   const globalConfig = inject('globalConfig');
   
@@ -32,6 +35,13 @@ import { onMounted } from 'vue';
       return defHttp.post({ url: '/ventanaly-device/history/getHistoryData', params })
     }
   };
+  const getExportXlsUrl = () => {
+    if(globalConfig.History_Type == 'vent') {
+      return '/safety/ventanalyMonitorData/exportXls'
+    } else {
+      return '/ventanaly-device/history/getHistoryData/exportXls'
+    }
+  }
   const emit = defineEmits(['change']);
   const props = defineProps({
     columnsType: {
@@ -145,7 +155,7 @@ import { onMounted } from 'vue';
   
   loading.value = true
   // 列表页面公共参数、方法
-  const { tableContext } = useListPage(
+  const { tableContext, onExportXls } = useListPage(
     globalConfig.History_Type == 'vent' ? {
       tableProps: {
         api: list,
@@ -285,6 +295,10 @@ import { onMounted } from 'vue';
           return resultItems;
         },
       },
+      exportConfig: {
+        name: '历史列表',
+        url: getExportXlsUrl(),
+      },
     }: {
       tableProps: {
       api: list,
@@ -442,8 +456,14 @@ import { onMounted } from 'vue';
       afterFetch(result) {
         return result;
       },
+      
+      },
+      exportConfig: {
+        name: '历史列表',
+        url: getExportXlsUrl(),
+      },
     },
-    } 
+    
   );
 
   //注册table数据

+ 92 - 27
src/views/vent/monitorManager/comment/WorkFaceAlarmHistoryTable.vue

@@ -1,17 +1,24 @@
 <template>
   <div class="alarm-history-table">
-    <BasicTable ref="alarmHistory" @register="registerTable" />
+    <BasicTable ref="alarmHistory" @register="registerTable">
+      <template #form-onExportXls>
+        <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls()"> 导出</a-button>
+      </template>
+    </BasicTable>
   </div>
 </template>
 
 <script lang="ts" name="system-user" setup>
   //ts语法
-  import { watch, ref, defineExpose } from 'vue'
+  import { watch, ref, defineExpose, onMounted, inject } from 'vue';
   import { BasicTable } from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage';
   import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
   import { defHttp } from '/@/utils/http/axios';
-  
+  import dayjs from 'dayjs';
+
+  const globalConfig = inject('globalConfig');
+
   const props = defineProps({
     columnsType: {
       type: String,
@@ -23,7 +30,7 @@
     },
     deviceListApi: {
       type: Function,
-      default: (params) => defHttp.get({ url: '/safety/ventanalyManageSystem/linkdevicelist', params })
+      default: (params) => defHttp.get({ url: '/safety/ventanalyManageSystem/linkdevicelist', params }),
     },
     designScope: {
       type: String,
@@ -33,44 +40,82 @@
     },
     scroll: {
       type: Object,
-      default: () => { }
+      default: () => {},
     },
     list: {
       type: Function,
-      default: (params) => defHttp.get({ url: '/safety/ventanalyAlarmLog/list', params })
-    }
+      default: (params) => defHttp.get({ url: '/safety/ventanalyAlarmLog/list', params }),
+    },
   });
-  const alarmHistory = ref()
-  const columns = ref([])
+  const alarmHistory = ref();
+  const columns = ref([]);
+  const deviceOptions = ref([]);
 
   watch(
     () => {
       return props.columnsType;
     },
     (newVal) => {
-      const column = getTableHeaderColumns(newVal + '_history')
+      const column = getTableHeaderColumns(newVal + '_history');
       if (column && column.length < 1) {
-        const arr = newVal.split('_')
+        const arr = newVal.split('_');
         const columnKey = arr.reduce((prev, cur, index) => {
           if (index !== arr.length - 2) {
-            return prev + '_' + cur
+            return prev + '_' + cur;
           } else {
-            return prev
+            return prev;
           }
-        })
+        });
         columns.value = getTableHeaderColumns(arr[0] + '_history');
       } else {
-        columns.value = column
+        columns.value = column;
       }
-      if (alarmHistory.value) reload()
+      if (alarmHistory.value) reload();
     },
     {
-      immediate: true
+      immediate: true,
     }
   );
 
+  async function getDeviceList() {
+    let result;
+    debugger;
+    if (globalConfig.History_Type == 'vent') {
+      if (props.deviceListApi) {
+        result = await props.deviceListApi();
+      } else {
+        result = await defHttp.get({
+          url: '/safety/ventanalyManageSystem/linkdevicelist',
+          params: { sysId: props.sysId, deviceType: props.deviceType, pageSize: 9999 },
+        });
+      }
+    } else {
+      result = await defHttp.get({
+        url: '/safety/ventanalyManageSystem/linkdevicelist',
+        params: { sysId: props.sysId, deviceType: props.deviceType.startsWith('vehicle') ? 'location_normal' : props.deviceType },
+      });
+    }
+    if (result) {
+      deviceOptions.value = [];
+      deviceOptions.value = result.map((item) => {
+        return {
+          label: item['strname'],
+          value: item['id'],
+          strtype: item['strtype'],
+          strinstallpos: item['strinstallpos'],
+          devicekind: item['devicekind'],
+        };
+        // return { label: item['strname'], value: item['id']}
+      });
+      // globalConfig.History_Type == 'vent' && deviceOptions.value[0]
+      //   ? getForm().setFieldsValue({ deviceId: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '' })
+      //   : getForm().setFieldsValue({ deviceId: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '' });
+      getForm().setFieldsValue({ deviceId: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '' });
+    }
+  }
+
   // 列表页面公共参数、方法
-  const { tableContext } = useListPage({
+  const { tableContext, onExportXls } = useListPage({
     tableProps: {
       api: props.list,
       columns: columns,
@@ -89,6 +134,7 @@
             label: '时间范围',
             field: 'createTime',
             component: 'RangePicker',
+            defaultValue: [dayjs().subtract(1, 'day'), dayjs()],
             componentProps: {
               valueFormat: 'YYYY-MM-DD HH:mm:ss',
             },
@@ -96,14 +142,24 @@
           {
             label: '查询设备',
             field: 'deviceId',
-            component: 'ApiSelect',
+            component: 'Select',
+            defaultValue: deviceOptions.value[0] ? deviceOptions.value[0]['value'] : '',
+            required: true,
             componentProps: {
-              api: props.deviceListApi,
-              resultField: 'records',
-              labelField: 'strname',
-              valueField: 'id',
+              options: deviceOptions,
             },
           },
+          // {
+          //   label: '查询设备',
+          //   field: 'deviceId',
+          //   component: 'ApiSelect',
+          //   componentProps: {
+          //     api: props.deviceListApi,
+          //     resultField: 'records',
+          //     labelField: 'strname',
+          //     valueField: 'id',
+          //   },
+          // },
         ],
         fieldMapToTime: [['createTime', ['starttime', 'endtime'], '']],
       },
@@ -122,10 +178,19 @@
         }
       },
     },
+    exportConfig: {
+      name: '预警历史列表',
+      url: '/safety/ventanalyAlarmLog/exportXls',
+    },
   });
   //注册table数据
-  const [registerTable, { reload, setLoading }] = tableContext;
-  defineExpose({ setLoading })
+  const [registerTable, { reload, setLoading, getForm }] = tableContext;
+
+  onMounted(async () => {
+    await getDeviceList();
+  });
+
+  defineExpose({ setLoading });
 </script>
 
 <style scoped lang="less">
@@ -134,8 +199,8 @@
   :deep(.ventSpace-table-body) {
     height: auto !important;
   }
-  :deep(.zxm-picker){
-      height: 30px !important;
+  :deep(.zxm-picker) {
+    height: 30px !important;
   }
   .alarm-history-table {
     width: 100%;

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

@@ -205,14 +205,18 @@ export function getMonitorComponent() {
   switch (sysOrgCode) {
     case 'sdmtjtdltmk': //大柳塔井
       nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_dltj.vue'));
+      return nitrogenHome;
     case 'sdmtjtbetmk': // 布尔台
       nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_bet.vue'));
+      return nitrogenHome;
     case 'sdmtjtbdmk': // 保德
       nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_bd.vue'));
+      return nitrogenHome;
     case 'sdmtjtbltmk': // 补连塔
       nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_blt.vue'));
+      return nitrogenHome;
     default:
-      nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_blt.vue'));
+      nitrogenHome = defineAsyncComponent(() => import('./components/nitrogenHome_dltj.vue'));
+      return nitrogenHome;
   }
-  return nitrogenHome;
 }

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

@@ -1,4 +1,6 @@
+import { defineAsyncComponent } from 'vue';
 import { BasicColumn } from '/@/components/Table';
+import { useGlobSetting } from '/@/hooks/setting';
 
 export const chartsColumns = (deviceType) => {
   if (deviceType === '') {
@@ -48,6 +50,26 @@ export const locationList = [
   },
 ];
 
+export function getMonitorComponent() {
+  const { sysOrgCode } = useGlobSetting();
+  let FiberModal;
+  switch (sysOrgCode) {
+    case 'sdmtjthlgmk': //哈拉沟
+      FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal.vue'));
+      break;
+    // case 'sdmtjtbetmk': // 布尔台
+    // case 'sdmtjtbdmk': // 保德
+    // case 'sdmtjtbltmk': // 补连塔
+    default:
+      FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal1.vue'));
+  }
+  const BundleModal = defineAsyncComponent(() => import('./modal/bundle.modal.vue'));
+  const DustModal = defineAsyncComponent(() => import('./modal/dust.modal.vue'));
+  const BallvalveModal = defineAsyncComponent(() => import('./modal/ballvalve.modal.vue'));
+
+  return { FiberModal, BundleModal, DustModal, BallvalveModal };
+}
+
 // export const searchFormSchema: FormSchema[] = [
 //   {
 //     label: '查询日期',
@@ -306,4 +328,4 @@ export const haveDetailArr = [
 export const haveHandlerArr = ['windrect', 'window', 'gate', 'fanlocal', 'fanmain', 'pump', 'obfurage', 'nitrogen', 'pulping', 'spray', 'dustdev']; // table无操作
 export const noWarningArr = ['location', 'vehicle', 'cheliang']; // 无预警详情的
 export const haveSysDetailArr = ['']; //有场景详情的
-export const noHistoryArr = () => History_Type['type'] == 'remote' ? ['surface_history'] : [];
+export const noHistoryArr = () => (History_Type['type'] == 'remote' ? ['surface_history'] : []);

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

@@ -294,15 +294,11 @@ import MonitorTable from '../../../comment/MonitorTable.vue';
 import GroupMonitorTable from '../../../comment/GroupMonitorTable.vue';
 import { TreeProps, message, Progress } from 'ant-design-vue';
 import { TableAction } from '/@/components/Table';
-import FiberModal from './modal/fiber.modal.vue';
-import BundleModal from './modal/bundle.modal.vue'
-import DustModal from './modal/dust.modal.vue'
-import BallvalveModal from './modal/ballvalve.modal.vue'
 import { SvgIcon } from '/@/components/Icon';
 import { getActions } from '/@/qiankun/state';
 import { useRouter } from 'vue-router';
 import { setDivHeight } from '/@/utils/event';
-import { majorColumns, haveSysDetailArr, haveDetailArr, haveHandlerArr, noWarningArr, surfaceChartsColumns, noHistoryArr } from  './device.data'
+import { majorColumns, haveSysDetailArr, haveDetailArr, haveHandlerArr, noWarningArr, surfaceChartsColumns, noHistoryArr, getMonitorComponent } from  './device.data'
 import mainPath from './modal/mainPath.vue'
 import { formConfig } from '../../../safetyMonitor/safety.data'
 import { getDictItemsByCode } from '/@/utils/dict';
@@ -310,7 +306,7 @@ import BarAndLine from '/@/components/chart/BarAndLine.vue';
 import { nextTick } from 'vue';
 // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
 
-
+const {FiberModal, BundleModal, DustModal, BallvalveModal} = getMonitorComponent()
 type DeviceType = { deviceType: string, deviceName: string, datalist: any[] };
 
 const props = defineProps({

+ 351 - 336
src/views/vent/monitorManager/deviceMonitor/components/device/modal/fiber.modal.vue

@@ -1,10 +1,13 @@
 <template>
-  <BasicModal v-bind="$attrs" @register="register" :title="`光纤测温详情    ${currentTime}`" width="1200px" @ok="handleOk"
-    @cancel="handleCancel">
+  <BasicModal v-bind="$attrs" @register="register" :title="`光纤测温详情    ${currentTime}`" width="1200px" @ok="handleOk" @cancel="handleCancel">
     <div class="fiber-modal">
       <div class="modal-left">
-        <div v-for="device in deviceList" class="link-item"
-          :class="{ 'active-device-title': device.deviceID === activeDeviceID }" :key="device.deviceID">
+        <div
+          v-for="device in deviceList"
+          class="link-item"
+          :class="{ 'active-device-title': device.deviceID === activeDeviceID }"
+          :key="device.deviceID"
+        >
           <span class="" @click="selectDevice(device.deviceID)">{{ device.strinstallpos }}</span>
         </div>
       </div>
@@ -19,7 +22,6 @@
               <div class="value">{{ maxTemp || '--' }} <span>℃</span> </div>
             </div>
           </div>
-
           <div class="top-item warning-box">
             <div class="icon">
               <SvgIcon class="icon-style" size="38" name="risk-level" />
@@ -35,13 +37,18 @@
             <span class="base-title">测点监测详情</span>
             <a-table size="small" :columns="columns" :data-source="posList" :pagination="false" :scroll="{ y: 200 }" />
           </div>
-         
         </div>
         <div class="right-bottom">
           <span class="base-title">测点监测曲线</span>
           <div class="echarts-box">
-            <BarAndLine xAxisPropType="Section_AlarmTemp" :dataSource="posList1" height="100%"
-              :chartsColumns="chartsColumns" :option="echatsOption" chartsType="listMonitor" />
+            <BarAndLine
+              xAxisPropType="Section_AlarmTemp"
+              :dataSource="posList1"
+              height="100%"
+              :chartsColumns="chartsColumns"
+              :option="echatsOption"
+              chartsType="listMonitor"
+            />
           </div>
         </div>
       </div>
@@ -49,385 +56,393 @@
   </BasicModal>
 </template>
 <script lang="ts">
-import { defineComponent, ref, watch, shallowRef, reactive } from 'vue';
-import { BasicModal, useModalInner } from '/@/components/Modal';
-import BarAndLine from '/@/components/chart/BarAndLine.vue';
-import { SvgIcon } from '/@/components/Icon';
-import { Decoration7 as DvDecoration7, ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
-import dayjs from 'dayjs';
-
-export default defineComponent({
-  components: { BasicModal, BarAndLine, SvgIcon, DvScrollBoard, DvDecoration7 },
-  props: {
-    dataSource: { type: Array },
-    activeID: { type: String },
-  },
-  setup(props) {
-    const currentTime = ref(dayjs().format('YYYY-MM-DD HH:mm:ss'));
-    const modelRef = ref({});
-    const loading = ref(true);
-    const activeDeviceID = ref('');
-    const deviceList = ref<any[]>([]);
-    const posList = reactive<any[]>([]);
-    const posList1 = reactive<any[]>([])
-    //风险等级
-    const warnLevels = ref('')
-    //最高温度
-    const maxTemp = ref(0)
-
-    const echatsOption = {
-      grid: {
-        top: '20%',
-        left: '2px',
-        right: '10px',
-        bottom: '3%',
-        containLabel: true,
-      },
-      toolbox: {
-        feature: {},
-      },
-    };
-
-    const chartsColumns = [
-      {
-        legend: '测点报警温度',
-        seriesName: '(℃)',
-        ymax: 200,
-        yname: '℃',
-        linetype: 'line',
-        yaxispos: 'left',
-        color: '#FDB146',
-        sort: 1,
-        xRotate: 0,
-        dataIndex: 'value',
-      },
-    ];
-    const columns = [
-      {
-        title: '位置',
-        dataIndex: 'position',
-        width: 60,
-        align: 'center',
-        customRender: ({ index }) => {
-          return `测点${index + 1}`;
+  import { defineComponent, ref, watch, shallowRef, reactive } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  import { SvgIcon } from '/@/components/Icon';
+  import { Decoration7 as DvDecoration7, ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
+  import dayjs from 'dayjs';
+
+  export default defineComponent({
+    components: { BasicModal, BarAndLine, SvgIcon, DvScrollBoard, DvDecoration7 },
+    props: {
+      dataSource: { type: Array },
+      activeID: { type: String },
+    },
+    setup(props) {
+      const currentTime = ref(dayjs().format('YYYY-MM-DD HH:mm:ss'));
+      const modelRef = ref({});
+      const loading = ref(true);
+      const activeDeviceID = ref('');
+      const deviceList = ref<any[]>([]);
+      const posList = reactive<any[]>([]);
+      const posList1 = reactive<any[]>([]);
+      //风险等级
+      const warnLevels = ref('');
+      //最高温度
+      const maxTemp = ref(0);
+
+      const echatsOption = {
+        grid: {
+          top: '20%',
+          left: '2px',
+          right: '10px',
+          bottom: '3%',
+          containLabel: true,
+        },
+        toolbox: {
+          feature: {},
+        },
+      };
+
+      const chartsColumns = [
+        {
+          legend: '测点报警温度',
+          seriesName: '(℃)',
+          ymax: 200,
+          yname: '℃',
+          linetype: 'line',
+          yaxispos: 'left',
+          color: '#FDB146',
+          sort: 1,
+          xRotate: 0,
+          dataIndex: 'value',
+        },
+      ];
+      const columns = [
+        {
+          title: '位置',
+          dataIndex: 'position',
+          width: 60,
+          align: 'center',
+          customRender: ({ index }) => {
+            return `测点${index + 1}`;
+          },
+        },
+        {
+          title: '最高温度(℃)',
+          dataIndex: 'Section_MaxTemp',
+          align: 'center',
+        },
+        {
+          title: '对应米数(m)',
+          dataIndex: 'Section_MaxTempPos',
+          align: 'center',
+        },
+        {
+          title: '起点',
+          dataIndex: 'Section_BeginPosition',
+          align: 'center',
+        },
+        {
+          title: '终点',
+          dataIndex: 'Section_EndPosition',
+          align: 'center',
+        },
+        {
+          title: '报警温度(℃)',
+          dataIndex: 'Section_AlarmTemp',
+          align: 'center',
         },
-      },
-      {
-        title: '最高温度(℃)',
-        dataIndex: 'Section_MaxTemp',
-        align: 'center',
-      },
-      {
-        title: '对应米数(m)',
-        dataIndex: 'Section_MaxTempPos',
-        align: 'center',
-      },
-      {
-        title: '起点',
-        dataIndex: 'Section_BeginPosition',
-        align: 'center',
-      },
-      {
-        title: '终点',
-        dataIndex: 'Section_EndPosition',
-        align: 'center',
-      },
-      {
-        title: '报警温度(℃)',
-        dataIndex: 'Section_AlarmTemp',
-        align: 'center',
-      },
-      {
-        title: '报警状态',
-        dataIndex: 'isWarn',
-        align: 'center',
-      },
-    ];
-
-    const [register, { setModalProps, closeModal }] = useModalInner();
-
-    function handleVisibleChange(visible) {
-      if (visible) {
+        {
+          title: '报警状态',
+          dataIndex: 'isWarn',
+          align: 'center',
+        },
+      ];
+
+      const [register, { setModalProps, closeModal }] = useModalInner();
+
+      function handleVisibleChange(visible) {
+        if (visible) {
+          loading.value = true;
+          setModalProps({ loading: true, confirmLoading: true });
+
+          setTimeout(() => {
+            loading.value = false;
+            setModalProps({ loading: false, confirmLoading: false });
+          }, 1000);
+        }
+      }
+
+      // 选择监测
+      function selectDevice(id) {
         loading.value = true;
         setModalProps({ loading: true, confirmLoading: true });
-
         setTimeout(() => {
           loading.value = false;
+          activeDeviceID.value = id;
           setModalProps({ loading: false, confirmLoading: false });
-        }, 1000);
+        }, 300);
       }
-    }
-
-    // 选择监测
-    function selectDevice(id) {
-      loading.value = true;
-      setModalProps({ loading: true, confirmLoading: true });
-      setTimeout(() => {
-        loading.value = false;
-        activeDeviceID.value = id;
-        setModalProps({ loading: false, confirmLoading: false });
-      }, 300);
-    }
-
-    function handleOk(e) {
-      e.preventDefault();
-      closeModal();
-    }
 
-    function handleCancel(e) {
-      e.preventDefault();
-      closeModal();
-    }
+      function handleOk(e) {
+        e.preventDefault();
+        closeModal();
+      }
 
-    watch([() => props.dataSource, () => props.activeID], ([newDataSource, newActiveID], [oldDataSource, oldActiveID]) => {
-      console.log(newDataSource, 'newDataSource--------------')
-      deviceList.value = newDataSource as any[];
-      if (newActiveID != oldActiveID) {
-        activeDeviceID.value = newActiveID as string;
+      function handleCancel(e) {
+        e.preventDefault();
+        closeModal();
       }
-      newDataSource?.forEach((item: any, index) => {
-        if ((!activeDeviceID.value && index == 0) || item.deviceID === activeDeviceID.value) {
-          activeDeviceID.value = item.deviceID;
-          posList.length = 0
-          posList1.length = 0
-          let counts = Math.ceil((Object.keys(item.readData).length - 2) / 5)
-          for (let i = 0; i < counts; i++) {
-            posList.push({ Section_MaxTemp: item.readData[`Section${i + 1}_MaxTemp`], Section_MaxTempPos: item.readData[`Section${i + 1}_MaxTempPos`], Section_BeginPosition: item.readData[`Section${i + 1}_BeginPosition`], Section_EndPosition: item.readData[`Section${i + 1}_EndPosition`], Section_AlarmTemp: item.readData[`Section${i + 1}_AlarmTemp`], isWarn: parseFloat(item.readData[`Section${i + 1}_MaxTemp`]) > parseFloat(item.readData[`Section${i + 1}_AlarmTemp`]) ? '报警' : '未报警' })
-          }
-          posList.forEach((el, index) => {
-            posList1.push({ Section_AlarmTemp: index + 1, value: el.Section_AlarmTemp })
-          })
-          let maxValue = posList.map(m => m.Section_MaxTemp)
-          maxTemp.value = Math.max(...maxValue)
-          warnLevels.value = posList.find(v => v.isWarn == '报警') ? '报警' : '未报警'
-          console.log(posList, 'posList-----------------')
-          console.log(posList1, 'posList1-----------------')
+
+      watch([() => props.dataSource, () => props.activeID], ([newDataSource, newActiveID], [oldDataSource, oldActiveID]) => {
+        console.log(newDataSource, 'newDataSource--------------');
+        deviceList.value = newDataSource as any[];
+        if (newActiveID != oldActiveID) {
+          activeDeviceID.value = newActiveID as string;
         }
+        newDataSource?.forEach((item: any, index) => {
+          if ((!activeDeviceID.value && index == 0) || item.deviceID === activeDeviceID.value) {
+            activeDeviceID.value = item.deviceID;
+            posList.length = 0;
+            posList1.length = 0;
+            let counts = Math.ceil((Object.keys(item.readData).length - 2) / 5);
+            for (let i = 0; i < counts; i++) {
+              posList.push({
+                Section_MaxTemp: item.readData[`Section${i + 1}_MaxTemp`],
+                Section_MaxTempPos: item.readData[`Section${i + 1}_MaxTempPos`],
+                Section_BeginPosition: item.readData[`Section${i + 1}_BeginPosition`],
+                Section_EndPosition: item.readData[`Section${i + 1}_EndPosition`],
+                Section_AlarmTemp: item.readData[`Section${i + 1}_AlarmTemp`],
+                isWarn:
+                  parseFloat(item.readData[`Section${i + 1}_MaxTemp`]) > parseFloat(item.readData[`Section${i + 1}_AlarmTemp`]) ? '报警' : '未报警',
+              });
+            }
+            posList.forEach((el, index) => {
+              posList1.push({ Section_AlarmTemp: index + 1, value: el.Section_AlarmTemp });
+            });
+            let maxValue = posList.map((m) => m.Section_MaxTemp);
+            maxTemp.value = Math.max(...maxValue);
+            warnLevels.value = posList.find((v) => v.isWarn == '报警') ? '报警' : '未报警';
+            console.log(posList, 'posList-----------------');
+            console.log(posList1, 'posList1-----------------');
+          }
+        });
       });
-    });
-
-    return {
-      register,
-      model: modelRef,
-      currentTime,
-      handleVisibleChange,
-      selectDevice,
-      handleOk,
-      handleCancel,
-      deviceList,
-      activeDeviceID,
-      echatsOption,
-      posList,
-      posList1,
-      chartsColumns,
-      columns,
-      warnLevels,
-      maxTemp
-      // warningConfig,
-    };
-  },
-});
+
+      return {
+        register,
+        model: modelRef,
+        currentTime,
+        handleVisibleChange,
+        selectDevice,
+        handleOk,
+        handleCancel,
+        deviceList,
+        activeDeviceID,
+        echatsOption,
+        posList,
+        posList1,
+        chartsColumns,
+        columns,
+        warnLevels,
+        maxTemp,
+        // warningConfig,
+      };
+    },
+  });
 </script>
 <style lang="less" scoped>
-.fiber-modal {
-  width: 100%;
-  height: 650px;
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-
-  .modal-left {
-    width: 200px;
-    height: 100%;
-    overflow-y: auto;
-    background: #ffffff11;
-    padding: 5px;
-    border-radius: 5px;
-
-    .active-device-title {
-      color: aqua;
-    }
+  .fiber-modal {
+    width: 100%;
+    height: 650px;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+
+    .modal-left {
+      width: 200px;
+      height: 100%;
+      overflow-y: auto;
+      background: #ffffff11;
+      padding: 5px;
+      border-radius: 5px;
+
+      .active-device-title {
+        color: aqua;
+      }
 
-    .link-item {
-      position: relative;
-      cursor: pointer;
-      line-height: 30px;
-      padding-left: 30px;
+      .link-item {
+        position: relative;
+        cursor: pointer;
+        line-height: 30px;
+        padding-left: 30px;
 
-      span:hover {
-        color: #89ffff;
-      }
+        span:hover {
+          color: #89ffff;
+        }
 
-      &::after {
-        content: '';
-        position: absolute;
-        display: block;
-        width: 8px;
-        height: 8px;
-        top: 12px;
-        left: 10px;
-        transform: rotateZ(45deg) skew(10deg, 10deg);
-        background: #45d3fd;
+        &::after {
+          content: '';
+          position: absolute;
+          display: block;
+          width: 8px;
+          height: 8px;
+          top: 12px;
+          left: 10px;
+          transform: rotateZ(45deg) skew(10deg, 10deg);
+          background: #45d3fd;
+        }
       }
     }
-  }
 
-  .modal-right {
-    width: calc(100% - 220px);
-    overflow-y: auto;
-
-    .base-title {
-      line-height: 32px;
-      position: relative;
-      padding-left: 20px;
-
-      &::after {
-        content: '';
-        position: absolute;
-        display: block;
-        width: 4px;
-        height: 12px;
-        top: 4px;
-        left: 10px;
-        background: #45d3fd;
-        border-radius: 4px;
-      }
-    }
+    .modal-right {
+      width: calc(100% - 220px);
+      overflow-y: auto;
 
-    .right-top {
-      display: flex;
-      flex-direction: row;
-      justify-content: space-between;
-      margin-bottom: 10px;
+      .base-title {
+        line-height: 32px;
+        position: relative;
+        padding-left: 20px;
+
+        &::after {
+          content: '';
+          position: absolute;
+          display: block;
+          width: 4px;
+          height: 12px;
+          top: 4px;
+          left: 10px;
+          background: #45d3fd;
+          border-radius: 4px;
+        }
+      }
 
-      .top-item {
-        // width: 200px;
-        width: 49%;
-        height: 80px;
+      .right-top {
         display: flex;
         flex-direction: row;
-        justify-content: center;
-        border: 1px solid rgba(25, 237, 255, 0.4);
-        box-shadow: inset 0 0 10px rgba(0, 197, 255, 0.6);
-        background: rgba(0, 0, 0, 0.06666666666666667);
-        padding-top: 16px;
-
-        .icon {
-          margin-right: 10px;
-          margin-top: 5px;
-          color: #fdb146;
-        }
+        justify-content: space-between;
+        margin-bottom: 10px;
 
-        .item-container {
-          width: 100px;
+        .top-item {
+          // width: 200px;
+          width: 49%;
+          height: 80px;
           display: flex;
-          flex-direction: column;
+          flex-direction: row;
           justify-content: center;
-
-          div {
-            text-align: center;
+          border: 1px solid rgba(25, 237, 255, 0.4);
+          box-shadow: inset 0 0 10px rgba(0, 197, 255, 0.6);
+          background: rgba(0, 0, 0, 0.06666666666666667);
+          padding-top: 16px;
+
+          .icon {
+            margin-right: 10px;
+            margin-top: 5px;
+            color: #fdb146;
           }
 
-          .title {
-            font-size: 18px;
-          }
+          .item-container {
+            width: 100px;
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+
+            div {
+              text-align: center;
+            }
 
-          .value {
-            text-shadow: 0 0 25px #00fbfe;
-            background: linear-gradient(0deg, #45d3fd, #45d3fd, #61ddb1, #61ddb1);
-            font-style: normal;
-            background-size: cover;
-            font-family: electronicFont;
-            font-size: 30px;
-            -webkit-background-clip: text;
-            background-clip: text;
-            -webkit-text-fill-color: transparent;
-            position: relative;
-            top: -8px;
-
-            span {
-              font-family: Arial, Helvetica, sans-serif;
+            .title {
               font-size: 18px;
-              color: aliceblue;
+            }
+
+            .value {
+              text-shadow: 0 0 25px #00fbfe;
+              background: linear-gradient(0deg, #45d3fd, #45d3fd, #61ddb1, #61ddb1);
+              font-style: normal;
+              background-size: cover;
+              font-family: electronicFont;
+              font-size: 30px;
+              -webkit-background-clip: text;
+              background-clip: text;
+              -webkit-text-fill-color: transparent;
+              position: relative;
+              top: -8px;
+
+              span {
+                font-family: Arial, Helvetica, sans-serif;
+                font-size: 18px;
+                color: aliceblue;
+              }
             }
           }
         }
-      }
 
-      .warning-box {
-        padding-top: 0px;
+        .warning-box {
+          padding-top: 0px;
 
-        .icon {
-          margin-top: 20px;
+          .icon {
+            margin-top: 20px;
 
-          .icon-style {
-            color: #fdb146;
+            .icon-style {
+              color: #fdb146;
+            }
           }
-        }
 
-        .warning-value {
-          font-size: 18px;
-          color: #61ddb1;
+          .warning-value {
+            font-size: 18px;
+            color: #61ddb1;
+          }
         }
       }
-    }
 
-    .right-center {
-      margin-top: 20px;
-      display: flex;
-      flex-direction: row;
-      justify-content: space-between;
+      .right-center {
+        margin-top: 20px;
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+
+        .table-box {
+          position: relative;
+          // width: 500px;
+          width: 100%;
+          height: 250px;
+        }
 
-      .table-box {
-        position: relative;
-        // width: 500px;
-        width: 100%;
-        height: 250px;
+        // .warning-box {
+        //   width: calc(100% - 520px);
+
+        //   .warning-container {
+        //     width: 100%;
+        //     height: convert;
+        //     background: #009acd00;
+
+        //     :deep(.dv-scroll-board) {
+        //       .row-item {
+        //         height: 40px !important;
+        //         line-height: 40px !important;
+        //       }
+
+        //       .header-item {
+        //         border-top: 1px solid #91e9fe !important;
+        //         border-bottom: 1px solid #91e9fe !important;
+        //       }
+        //     }
+        //   }
+        // }
       }
 
-      // .warning-box {
-      //   width: calc(100% - 520px);
-
-      //   .warning-container {
-      //     width: 100%;
-      //     height: convert;
-      //     background: #009acd00;
-
-      //     :deep(.dv-scroll-board) {
-      //       .row-item {
-      //         height: 40px !important;
-      //         line-height: 40px !important;
-      //       }
-
-      //       .header-item {
-      //         border-top: 1px solid #91e9fe !important;
-      //         border-bottom: 1px solid #91e9fe !important;
-      //       }
-      //     }
-      //   }
-      // }
-    }
-
-    .right-bottom {
-      margin-top: 20px;
+      .right-bottom {
+        margin-top: 20px;
 
-      .echarts-box {
-        width: 100%;
-        height: 230px;
+        .echarts-box {
+          width: 100%;
+          height: 230px;
+        }
       }
     }
   }
-}
 
-:deep(.zxm-table-body) {
-  border: 1px solid rgba(57, 232, 255, 0.2) !important;
+  :deep(.zxm-table-body) {
+    border: 1px solid rgba(57, 232, 255, 0.2) !important;
 
-  .zxm-table-tbody>tr>td {
-    border: none !important;
+    .zxm-table-tbody > tr > td {
+      border: none !important;
+    }
   }
-}
 
-:deep(.zxm-table-cell) {
-  border-right: none !important;
-}
+  :deep(.zxm-table-cell) {
+    border-right: none !important;
+  }
 </style>

+ 138 - 122
src/views/vent/monitorManager/deviceMonitor/components/device/modal/fiber.modal1.vue

@@ -1,87 +1,99 @@
 <template>
-    <BasicModal v-bind="$attrs" @register="register" :title="`光纤测温详情    ${currentTime}`" width="1200px" @ok="handleOk"
-      @cancel="handleCancel">
-      <div class="fiber-modal">
-        <div class="modal-left">
-          <div v-for="device in deviceList" class="link-item"
-            :class="{ 'active-device-title': device.deviceID === activeDeviceID }" :key="device.deviceID">
-            <span class="" @click="selectDevice(device.deviceID)">{{ device.strinstallpos }}</span>
-          </div>
+  <BasicModal v-bind="$attrs" @register="register" :title="`光纤测温详情    ${currentTime}`" width="1200px" @ok="handleOk" @cancel="handleCancel">
+    <div class="fiber-modal">
+      <div class="modal-left">
+        <div
+          v-for="device in deviceList"
+          class="link-item"
+          :class="{ 'active-device-title': device.deviceID === activeDeviceID }"
+          :key="device.deviceID"
+        >
+          <span class="" @click="selectDevice(device.deviceID)">{{ device.strinstallpos }}</span>
         </div>
-        <div class="modal-right">
-          <div class="right-top">
-            <div class="top-item">
-              <div class="icon">
-                <SvgIcon class="icon-style max-temperature" size="38" name="max-temperature" />
-              </div>
-              <div class="item-container">
-                <div class="title">最高温度</div>
-                <!-- <div class="value">{{ posMonitor.fmax }} <span>℃</span> </div> -->
-                <div class="value">{{ posMonitor.fmax || '--' }} <span>℃</span> </div>
-              </div>
+      </div>
+      <div class="modal-right">
+        <div class="right-top">
+          <div class="top-item">
+            <div class="icon">
+              <SvgIcon class="icon-style max-temperature" size="38" name="max-temperature" />
+            </div>
+            <div class="item-container">
+              <div class="title">最高温度</div>
+              <!-- <div class="value">{{ posMonitor.fmax }} <span>℃</span> </div> -->
+              <div class="value">{{ posMonitor.fmax || '--' }} <span>℃</span> </div>
+            </div>
+          </div>
+          <div class="top-item">
+            <div class="icon">
+              <SvgIcon class="icon-style min-temperature" size="38" name="min-temperature" />
             </div>
-            <div class="top-item">
-              <div class="icon">
-                <SvgIcon class="icon-style min-temperature" size="38" name="min-temperature" />
-              </div>
-              <div class="item-container">
-                <div class="title">最低温度</div>
-                <!-- <div class="value">{{ posMonitor.fmin }} <span>℃</span></div> -->
-                <div class="value">{{ posMonitor.fmin || '--' }} <span>℃</span></div>
-              </div>
+            <div class="item-container">
+              <div class="title">最低温度</div>
+              <!-- <div class="value">{{ posMonitor.fmin }} <span>℃</span></div> -->
+              <div class="value">{{ posMonitor.fmin || '--' }} <span>℃</span></div>
             </div>
-            <div class="top-item">
-              <div class="icon">
-                <SvgIcon class="icon-style aveg-temperature" size="38" name="aveg-temperature" />
-              </div>
-              <div class="item-container">
-                <div class="title">平均温度</div>
-                <!-- <div class="value">{{ posMonitor.favg }} <span>℃</span></div> -->
-                <div class="value">{{ posMonitor.favg || '--' }} <span>℃</span></div>
-              </div>
+          </div>
+          <div class="top-item">
+            <div class="icon">
+              <SvgIcon class="icon-style aveg-temperature" size="38" name="aveg-temperature" />
             </div>
-            <div class="top-item warning-box">
-              <div class="icon">
-                <SvgIcon class="icon-style" size="38" name="risk-level" />
-              </div>
-              <div class="item-container">
-                <div class="title">风险等级</div>
-                <div class="warning-value">低风险</div>
-              </div>
+            <div class="item-container">
+              <div class="title">平均温度</div>
+              <!-- <div class="value">{{ posMonitor.favg }} <span>℃</span></div> -->
+              <div class="value">{{ posMonitor.favg || '--' }} <span>℃</span></div>
             </div>
           </div>
-          <div class="right-center">
-            <div class="table-box">
-              <span class="base-title">测点监测详情</span>
-              <a-table size="small" :columns="columns" :data-source="posList" :pagination="false" :scroll="{ y: 200 }" />
+          <div class="top-item warning-box">
+            <div class="icon">
+              <SvgIcon class="icon-style" size="38" name="risk-level" />
             </div>
-            <div class="warning-box">
-              <span class="base-title">预警历史详情</span>
-              <div class="warning-container">
-                <dv-scroll-board ref="scrollBoard" :config="warningConfig"
-                  style="width: 100%; height: 240px; overflow-y: auto; border: 1px solid #39e8ff33" />
-              </div>
+            <div class="item-container">
+              <div class="title">风险等级</div>
+              <div class="warning-value">低风险</div>
             </div>
           </div>
-          <div class="right-bottom">
-            <span class="base-title">测点监测曲线</span>
-            <div class="echarts-box">
-              <BarAndLine xAxisPropType="Section_AlarmTemp" :dataSource="posList1" height="100%"
-                :chartsColumns="chartsColumns" :option="echatsOption" chartsType="listMonitor" />
+        </div>
+        <div class="right-center">
+          <div class="table-box">
+            <span class="base-title">测点监测详情</span>
+            <a-table size="small" :columns="columns" :data-source="posList" :pagination="false" :scroll="{ y: 200 }" />
+          </div>
+          <div class="warning-box">
+            <span class="base-title">预警历史详情</span>
+            <div class="warning-container">
+              <dv-scroll-board
+                ref="scrollBoard"
+                :config="warningConfig"
+                style="width: 100%; height: 240px; overflow-y: auto; border: 1px solid #39e8ff33"
+              />
             </div>
           </div>
         </div>
+        <div class="right-bottom">
+          <span class="base-title">测点监测曲线</span>
+          <div class="echarts-box">
+            <BarAndLine
+              xAxisPropType="Section_AlarmTemp"
+              :dataSource="posList1"
+              height="100%"
+              :chartsColumns="chartsColumns"
+              :option="echatsOption"
+              chartsType="listMonitor"
+            />
+          </div>
+        </div>
       </div>
-    </BasicModal>
-  </template>
-  <script lang="ts">
+    </div>
+  </BasicModal>
+</template>
+<script lang="ts">
   import { defineComponent, ref, watch, shallowRef, reactive } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import BarAndLine from '/@/components/chart/BarAndLine.vue';
   import { SvgIcon } from '/@/components/Icon';
   import { Decoration7 as DvDecoration7, ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
   import dayjs from 'dayjs';
-  
+
   export default defineComponent({
     components: { BasicModal, BarAndLine, SvgIcon, DvScrollBoard, DvDecoration7 },
     props: {
@@ -95,9 +107,9 @@
       const activeDeviceID = ref('');
       const deviceList = ref<any[]>([]);
       const posList = reactive<any[]>([]);
-      const posList1 = reactive<any[]>([])
+      const posList1 = reactive<any[]>([]);
       const posMonitor = shallowRef({});
-  
+
       const echatsOption = {
         grid: {
           top: '20%',
@@ -110,7 +122,7 @@
           feature: {},
         },
       };
-  
+
       const chartsColumns = [
         {
           legend: '测点报警温度',
@@ -163,10 +175,9 @@
           title: '报警温度(℃)',
           dataIndex: 'Section_AlarmTemp',
           align: 'center',
-  
         },
       ];
-  
+
       const warningConfig = reactive({
         header: ['测点', '温度', '预警信息'],
         data: [
@@ -187,21 +198,21 @@
         evenRowBGC: '#009acd05',
         align: ['center', 'center', 'center'],
       });
-  
+
       const [register, { setModalProps, closeModal }] = useModalInner();
-  
+
       function handleVisibleChange(visible) {
         if (visible) {
           loading.value = true;
           setModalProps({ loading: true, confirmLoading: true });
-  
+
           setTimeout(() => {
             loading.value = false;
             setModalProps({ loading: false, confirmLoading: false });
           }, 1000);
         }
       }
-  
+
       // 选择监测
       function selectDevice(id) {
         loading.value = true;
@@ -212,19 +223,19 @@
           setModalProps({ loading: false, confirmLoading: false });
         }, 300);
       }
-  
+
       function handleOk(e) {
         e.preventDefault();
         closeModal();
       }
-  
+
       function handleCancel(e) {
         e.preventDefault();
         closeModal();
       }
-  
+
       watch([() => props.dataSource, () => props.activeID], ([newDataSource, newActiveID], [oldDataSource, oldActiveID]) => {
-        console.log(newDataSource, 'newDataSource--------------')
+        console.log(newDataSource, 'newDataSource--------------');
         deviceList.value = newDataSource as any[];
         if (newActiveID != oldActiveID) {
           activeDeviceID.value = newActiveID as string;
@@ -237,21 +248,27 @@
             //   if (list.length > 0) posList.value = list;
             // }
             posMonitor.value = item.readData;
-            posList.length = 0
-            posList1.length = 0
-            let counts = Math.ceil((Object.keys(item.readData).length - 2) / 5)
+            posList.length = 0;
+            posList1.length = 0;
+            let counts = Math.ceil((Object.keys(item.readData).length - 2) / 5);
             for (let i = 0; i < counts; i++) {
-              posList.push({ Section_MaxTemp: item.readData[`Section${i + 1}_MaxTemp`], Section_MaxTempPos: item.readData[`Section${i + 1}_MaxTempPos`], Section_BeginPosition: item.readData[`Section${i + 1}_BeginPosition`], Section_EndPosition: item.readData[`Section${i + 1}_EndPosition`], Section_AlarmTemp: item.readData[`Section${i + 1}_AlarmTemp`] })
+              posList.push({
+                Section_MaxTemp: item.readData[`Section${i + 1}_MaxTemp`],
+                Section_MaxTempPos: item.readData[`Section${i + 1}_MaxTempPos`],
+                Section_BeginPosition: item.readData[`Section${i + 1}_BeginPosition`],
+                Section_EndPosition: item.readData[`Section${i + 1}_EndPosition`],
+                Section_AlarmTemp: item.readData[`Section${i + 1}_AlarmTemp`],
+              });
             }
             posList.forEach((el, index) => {
-              posList1.push({ Section_AlarmTemp: index + 1, value: el.Section_AlarmTemp })
-            })
-            console.log(posList, 'posList-----------------')
-            console.log(posList1, 'posList1-----------------')
+              posList1.push({ Section_AlarmTemp: index + 1, value: el.Section_AlarmTemp });
+            });
+            console.log(posList, 'posList-----------------');
+            console.log(posList1, 'posList1-----------------');
           }
         });
       });
-  
+
       return {
         register,
         model: modelRef,
@@ -272,15 +289,15 @@
       };
     },
   });
-  </script>
-  <style lang="less" scoped>
+</script>
+<style lang="less" scoped>
   .fiber-modal {
     width: 100%;
     height: 650px;
     display: flex;
     flex-direction: row;
     justify-content: space-between;
-  
+
     .modal-left {
       width: 200px;
       height: 100%;
@@ -288,21 +305,21 @@
       background: #ffffff11;
       padding: 5px;
       border-radius: 5px;
-  
+
       .active-device-title {
         color: aqua;
       }
-  
+
       .link-item {
         position: relative;
         cursor: pointer;
         line-height: 30px;
         padding-left: 30px;
-  
+
         span:hover {
           color: #89ffff;
         }
-  
+
         &::after {
           content: '';
           position: absolute;
@@ -316,16 +333,16 @@
         }
       }
     }
-  
+
     .modal-right {
       width: calc(100% - 220px);
       overflow-y: auto;
-  
+
       .base-title {
         line-height: 32px;
         position: relative;
         padding-left: 20px;
-  
+
         &::after {
           content: '';
           position: absolute;
@@ -338,13 +355,13 @@
           border-radius: 4px;
         }
       }
-  
+
       .right-top {
         display: flex;
         flex-direction: row;
         justify-content: space-between;
         margin-bottom: 10px;
-  
+
         .top-item {
           width: 200px;
           height: 80px;
@@ -355,27 +372,27 @@
           box-shadow: inset 0 0 10px rgba(0, 197, 255, 0.6);
           background: rgba(0, 0, 0, 0.06666666666666667);
           padding-top: 16px;
-  
+
           .icon {
             margin-right: 10px;
             margin-top: 5px;
             color: #fdb146;
           }
-  
+
           .item-container {
             width: 100px;
             display: flex;
             flex-direction: column;
             justify-content: center;
-  
+
             div {
               text-align: center;
             }
-  
+
             .title {
               font-size: 18px;
             }
-  
+
             .value {
               text-shadow: 0 0 25px #00fbfe;
               background: linear-gradient(0deg, #45d3fd, #45d3fd, #61ddb1, #61ddb1);
@@ -388,7 +405,7 @@
               -webkit-text-fill-color: transparent;
               position: relative;
               top: -8px;
-  
+
               span {
                 font-family: Arial, Helvetica, sans-serif;
                 font-size: 18px;
@@ -397,51 +414,51 @@
             }
           }
         }
-  
+
         .warning-box {
           padding-top: 0px;
-  
+
           .icon {
             margin-top: 20px;
-  
+
             .icon-style {
               color: #fdb146;
             }
           }
-  
+
           .warning-value {
             font-size: 18px;
             color: #61ddb1;
           }
         }
       }
-  
+
       .right-center {
         margin-top: 20px;
         display: flex;
         flex-direction: row;
         justify-content: space-between;
-  
+
         .table-box {
           position: relative;
           width: 500px;
           height: 250px;
         }
-  
+
         .warning-box {
           width: calc(100% - 520px);
-  
+
           .warning-container {
             width: 100%;
             height: convert;
             background: #009acd00;
-  
+
             :deep(.dv-scroll-board) {
               .row-item {
                 height: 40px !important;
                 line-height: 40px !important;
               }
-  
+
               .header-item {
                 border-top: 1px solid #91e9fe !important;
                 border-bottom: 1px solid #91e9fe !important;
@@ -450,10 +467,10 @@
           }
         }
       }
-  
+
       .right-bottom {
         margin-top: 20px;
-  
+
         .echarts-box {
           width: 100%;
           height: 230px;
@@ -461,17 +478,16 @@
       }
     }
   }
-  
+
   :deep(.zxm-table-body) {
     border: 1px solid rgba(57, 232, 255, 0.2) !important;
-  
-    .zxm-table-tbody>tr>td {
+
+    .zxm-table-tbody > tr > td {
       border: none !important;
     }
   }
-  
+
   :deep(.zxm-table-cell) {
     border-right: none !important;
   }
-  </style>
-  
+</style>

+ 1 - 1
src/views/vent/monitorManager/deviceMonitor/components/network/network.data.ts

@@ -53,7 +53,7 @@ export const sensorColumns: BasicColumn[] = [
   },
   {
     title: '风量(m³)',
-    dataIndex: 'm³',
+    dataIndex: 'm3',
     width: 100,
     align: 'center',
   },

+ 1 - 3
src/views/vent/monitorManager/deviceMonitor/index.vue

@@ -7,14 +7,12 @@
 </template>
 
 <script setup lang="ts">
-  import { ref, onUnmounted, onMounted, nextTick, watch } from 'vue';
+  import { ref, onMounted, watch } from 'vue';
   import DeviceVue from './components/device/index.vue';
   import Network from './components/network/index.vue';
   import { getActions } from '/@/qiankun/state';
   import { useRoute } from 'vue-router';
-  import { unmountMicroApps, mountMicroApp } from '/@/qiankun';
   import { onBeforeUnmount } from 'vue';
-  import { resetMicroContentWH } from '/@/utils/domUtils';
   import VentModal from '/@/components/vent/micro/ventModal.vue';
 
   const route = useRoute();

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

@@ -47,6 +47,7 @@
         <div class="vent-flex-row" id="fanLocalSelectDom" v-if="!globalConfig?.simulatedPassword && getDictItemsByCode('fanlocaltype')">
           <span style="color: #00f5fe; margin-left: 5px">风机类型:</span>
           <JDictSelectTag
+            style="width: 180px"
             v-model:value="devicekide"
             dictCode="fanlocaltype"
             :showChooseOption="false"

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

@@ -100,7 +100,7 @@
   import HistoryTable from '../comment/HistoryTable.vue';
   import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
   import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
-  import { mountedThree, destroy, setModelType, refreshModal, addFiberText } from './fiber.threejs';
+  import { mountedThree, destroy, setModelType } from './fiber.threejs';
   import { list, getTableList } from './fiber.api';
   import { list as baseList } from '../../deviceManager/windWindowTabel/ventanalyWindow.api';
   import { chartsColumns } from './fiber.data';
@@ -149,11 +149,6 @@
   // 监测数据
   const selectData = reactive(lodash.cloneDeep(initData));
 
-  watch([warningNum, errorNum], ([newWarningNum, newErrorNum]) => {
-    // 刷新
-    refreshModal(newWarningNum, newErrorNum);
-  });
-
   function handleLenChange() {
     //
   }

+ 177 - 167
src/views/vent/monitorManager/fireMonitor/index.vue

@@ -1,164 +1,175 @@
 <template>
-    <div class="vent-home-header">
-        <Decoration5 class="header-icon" :dur="2" :color="['#21437F', '#2CF7FE']" style="width:500px;height:40px;" />
-        <div class="header-text">皮带机监测</div>
-    </div>
-    <div class="fire-box">
-        <div class="fire-top">
-            <div class="top-lr top-left">
-                <div class="lr-item">
-                    <BorderBox1 title="实时网络解算" :color="['#00FFFF']">
-                        <div class="item-top-title">火焰传感器监测</div>
-                        <div class="scroll-box">
-                            <!-- <ScrollBoard :config="hyConfig" ref="hyScrollBoard" style="width:100%;height:calc(100% - 40px)" @mouseover="mouseoverHandler" @click="clickHandler" /> -->
-                        </div>
-                    </BorderBox1>
-                </div>
-                <div class="lr-item">
-                
-                    <BorderBox1 title="实时网络解算" :color="['#00FFFF']">
-                        <div class="item-top-title">烟雾传感器监测</div>
-                        <div class="scroll-box">
-                            <ScrollBoard :config="ywConfig" ref="ywScrollBoard" style="width:100%;height:calc(100% - 40px)" @mouseover="mouseoverHandler" @click="clickHandler" />
-                        </div>
-                    </BorderBox1>
-                </div>
+  <div class="vent-home-header">
+    <Decoration5 class="header-icon" :dur="2" :color="['#21437F', '#2CF7FE']" style="width: 500px; height: 40px" />
+    <div class="header-text">皮带机监测</div>
+  </div>
+  <div class="fire-box">
+    <div class="fire-top">
+      <div class="top-lr top-left">
+        <div class="lr-item">
+          <BorderBox1 title="实时网络解算" :color="['#00FFFF']">
+            <div class="item-top-title">火焰传感器监测</div>
+            <div class="scroll-box">
+              <!-- <ScrollBoard :config="hyConfig" ref="hyScrollBoard" style="width:100%;height:calc(100% - 40px)" @mouseover="mouseoverHandler" @click="clickHandler" /> -->
+            </div>
+          </BorderBox1>
+        </div>
+        <div class="lr-item">
+          <BorderBox1 title="实时网络解算" :color="['#00FFFF']">
+            <div class="item-top-title">烟雾传感器监测</div>
+            <div class="scroll-box">
+              <ScrollBoard
+                :config="ywConfig"
+                ref="ywScrollBoard"
+                style="width: 100%; height: calc(100% - 40px)"
+                @mouseover="mouseoverHandler"
+                @click="clickHandler"
+              />
             </div>
-            <div class="top-lr top-right">
-                <div class="lr-item">
-                    <BorderBox1 title="实时网络解算" :color="['#00FFFF']">
-                        <div class="item-top-title">火焰传感器监测</div>
-                        <div class="scroll-box">
-                            <ScrollBoard :config="hyConfig" ref="hyScrollBoard" style="width:100%;height:calc(100% - 40px)" @mouseover="mouseoverHandler" @click="clickHandler" />
-                        </div>
-                    </BorderBox1>
-                </div>
-                <div class="lr-item">
-                    
-                    <BorderBox1 title="实时网络解算" :color="['#00FFFF']">
-                        <div class="item-top-title">喷淋灭火装置监测</div>
-                        <div class="scroll-box">
-                            <ScrollBoard :config="plConfig" ref="plScrollBoard" style="width:100%;height:calc(100% - 40px)" @mouseover="mouseoverHandler" @click="clickHandler" />
-                        </div>
-                    </BorderBox1>
-                </div>
+          </BorderBox1>
+        </div>
+      </div>
+      <div class="top-lr top-right">
+        <div class="lr-item">
+          <BorderBox1 title="实时网络解算" :color="['#00FFFF']">
+            <div class="item-top-title">火焰传感器监测</div>
+            <div class="scroll-box">
+              <ScrollBoard
+                :config="hyConfig"
+                ref="hyScrollBoard"
+                style="width: 100%; height: calc(100% - 40px)"
+                @mouseover="mouseoverHandler"
+                @click="clickHandler"
+              />
             </div>
+          </BorderBox1>
         </div>
-        <div class="fire-bottom">
-            <BorderBox11 title="光纤测温实时监测" :color="['#00FFFF']">
-                <BarAndLine
-                xAxisPropType="readTime"
-                :dataSource="[]"
-                height="100%"
-                :chartsColumns="[]"
-                chartsType="detail"
-                @refresh="refreshEchatrs"
-                />
-            </BorderBox11>
+        <div class="lr-item">
+          <BorderBox1 title="实时网络解算" :color="['#00FFFF']">
+            <div class="item-top-title">喷淋灭火装置监测</div>
+            <div class="scroll-box">
+              <ScrollBoard
+                :config="plConfig"
+                ref="plScrollBoard"
+                style="width: 100%; height: calc(100% - 40px)"
+                @mouseover="mouseoverHandler"
+                @click="clickHandler"
+              />
+            </div>
+          </BorderBox1>
         </div>
+      </div>
+    </div>
+    <div class="fire-bottom">
+      <BorderBox11 title="光纤测温实时监测" :color="['#00FFFF']">
+        <BarAndLine xAxisPropType="readTime" :dataSource="[]" height="100%" :chartsColumns="[]" chartsType="detail" @refresh="refreshEchatrs" />
+      </BorderBox11>
     </div>
+  </div>
 </template>
 <script setup lang="ts">
-import BarAndLine from '/@/components/chart/BarAndLine.vue';
-import { BorderBox1, ScrollBoard, BorderBox11, Decoration5 } from '@kjgl77/datav-vue3';
-import { ref, reactive, onMounted, onUnmounted } from 'vue'
-import { hyConfigFn, ywConfigFn, plConfigFn } from './fire.data'
-import { list } from './fire.api'
+  import BarAndLine from '/@/components/chart/BarAndLine.vue';
+  import { BorderBox1, ScrollBoard, BorderBox11, Decoration5 } from '@kjgl77/datav-vue3';
+  import { ref, reactive, onMounted, onUnmounted } from 'vue';
+  import { hyConfigFn, ywConfigFn, plConfigFn } from './fire.data';
+  import { list } from './fire.api';
 
-const hyScrollBoard = ref()
-const ywScrollBoard = ref()
-const plScrollBoard = ref()
+  const hyScrollBoard = ref();
+  const ywScrollBoard = ref();
+  const plScrollBoard = ref();
 
-const hyConfig = hyConfigFn()
-const ywConfig = ywConfigFn()
-const plConfig = plConfigFn()
+  const hyConfig = hyConfigFn();
+  const ywConfig = ywConfigFn();
+  const plConfig = plConfigFn();
 
-const wdOption = reactive(
-    {
-        legend: '温度',
-        seriesName: '(℃)',
-        ymax: 50,
-        yname: '℃',
-        linetype: 'bar',
-        yaxispos: 'right',
-        color: '#FC4327',
-        sort: 2,
-        xRotate: 0,
-        dataIndex: 'temperature',
-    },
-)
+  const wdOption = reactive({
+    legend: '温度',
+    seriesName: '(℃)',
+    ymax: 50,
+    yname: '℃',
+    linetype: 'bar',
+    yaxispos: 'right',
+    color: '#FC4327',
+    sort: 2,
+    xRotate: 0,
+    dataIndex: 'temperature',
+  });
 
-function mouseoverHandler(e: any) {
-    console.log(e)
-}
-
-function clickHandler(e: any) {
-    console.log(e)
-}
+  function mouseoverHandler(e: any) {
+    console.log(e);
+  }
 
-let timer: null | NodeJS.Timeout | undefined = null;
-async function getMonitor(flag?) {
-    if(timer === null){
-        timer = setTimeout(async() => {
-            const result = await list({ pagetype: "normal", devicetype: "sys", systemID: "1637983899775242242" })
-            const hyDatas: any[] = [], ywDatas: any[] = [], plDatas: any[] = [], wdDatas: any[] = [];
+  function clickHandler(e: any) {
+    console.log(e);
+  }
 
-            result.forEach(item => {
+  let timer: null | NodeJS.Timeout | undefined = null;
+  async function getMonitor(flag?) {
+    if (timer === null) {
+      timer = setTimeout(
+        async () => {
+          const result = await list({ pagetype: 'normal', devicetype: 'sys', systemID: '1637983899775242242' });
+          const hyDatas: any[] = [],
+            ywDatas: any[] = [],
+            plDatas: any[] = [],
+            wdDatas: any[] = [];
 
-                if (item.msgTxt.type === 'modelsensor_fire') {
-                    item.msgTxt.datalist.forEach((dataObj) => {
-                        hyDatas.push([dataObj.strinstallpos, dataObj.warnFlag, dataObj.readTime?.substring(11)])
-                    })
-                }
-                if (item.msgTxt.type === 'modelsensor_smoke') {
-                    item.msgTxt.datalist.forEach((dataObj) => {
-                        ywDatas.push([dataObj.strinstallpos, dataObj.warnFlag, dataObj.readTime?.substring(11)])
-                    })
-                }
-                if (item.msgTxt.type === 'modelsensor_temperature') {
-                    item.msgTxt.datalist.forEach((dataObj) => {
-                        wdDatas.push([dataObj.strinstallpos, dataObj.warnFlag, dataObj.readTime?.substring(11)])
-                    })
-                }
-                if (item.msgTxt.type === 'modelsensor_fire') {
-                    item.msgTxt.datalist.forEach((dataObj) => {
-                        plDatas.push([dataObj.strinstallpos, dataObj.warnFlag, dataObj.readTime?.substring(11)])
-                    })
-                }
-            })
-            hyScrollBoard.value.updateRows(hyDatas)
-            ywScrollBoard.value.updateRows(ywDatas)
-            plScrollBoard.value.updateRows(plDatas)
-            // hyConfig.data = hyDatas
-            // ywConfig.data = ywDatas
-            // plConfig.data = plDatas
+          result.forEach((item) => {
+            if (item.msgTxt.type === 'modelsensor_fire') {
+              item.msgTxt.datalist.forEach((dataObj) => {
+                hyDatas.push([dataObj.strinstallpos, dataObj.warnFlag, dataObj.readTime?.substring(11)]);
+              });
+            }
+            if (item.msgTxt.type === 'modelsensor_smoke') {
+              item.msgTxt.datalist.forEach((dataObj) => {
+                ywDatas.push([dataObj.strinstallpos, dataObj.warnFlag, dataObj.readTime?.substring(11)]);
+              });
+            }
+            if (item.msgTxt.type === 'modelsensor_temperature') {
+              item.msgTxt.datalist.forEach((dataObj) => {
+                wdDatas.push([dataObj.strinstallpos, dataObj.warnFlag, dataObj.readTime?.substring(11)]);
+              });
+            }
+            if (item.msgTxt.type === 'modelsensor_fire') {
+              item.msgTxt.datalist.forEach((dataObj) => {
+                plDatas.push([dataObj.strinstallpos, dataObj.warnFlag, dataObj.readTime?.substring(11)]);
+              });
+            }
+          });
+          hyScrollBoard.value.updateRows(hyDatas);
+          ywScrollBoard.value.updateRows(ywDatas);
+          plScrollBoard.value.updateRows(plDatas);
+          // hyConfig.data = hyDatas
+          // ywConfig.data = ywDatas
+          // plConfig.data = plDatas
 
-            await getMonitor()
-        }, flag ? 0 : 5000)
+          await getMonitor();
+        },
+        flag ? 0 : 5000
+      );
 
-        if(timer){
-            timer = null
-        }
+      if (timer) {
+        timer = null;
+      }
     }
-}
+  }
 
-async function refreshEchatrs() {
+  async function refreshEchatrs() {
     timer = null;
     await getMonitor(true);
     console.log('echarts 刷新');
-}
+  }
 
-onMounted(async() => {
+  onMounted(async () => {
     await getMonitor(true);
-})
-onUnmounted(() => {
-    timer = undefined
-})
-
+  });
+  onUnmounted(() => {
+    timer = undefined;
+  });
 </script>
 
 <style lang="less" scoped>
-.vent-home-header {
+  .vent-home-header {
     width: 100%;
     height: 100px;
     position: fixed;
@@ -168,55 +179,54 @@ onUnmounted(() => {
     display: flex;
     justify-content: center;
     z-index: 99;
-    .header-icon{
+    .header-icon {
       margin-top: 45px;
     }
-    .header-text{
+    .header-text {
       position: fixed;
       top: 18px;
       color: #fff;
       font-size: 26px;
     }
   }
-.fire-box{
+  .fire-box {
     position: relative;
     z-index: 999;
     width: 100%;
     height: calc(100% - 48px);
     top: 0px;
     pointer-events: none;
-    .fire-top{
-        height: calc(100% - 300px);
+    .fire-top {
+      height: calc(100% - 300px);
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      .top-lr {
+        width: 400px;
+        height: 100%;
+        margin-top: 10px;
         display: flex;
-        flex-direction: row;
-        justify-content: space-between;
-        .top-lr{
-            width: 400px;
-            height: 100%;
-            margin-top: 10px;
-            display: flex;
-            flex-direction: column;
-            .lr-item{
-                flex: 1;
-                margin-top: 20px;
-                .item-top-title{
-                    position: relative;
-                    top: -5px;
-                    color: #fff;
-                }
-            }
-        }
-        .top-right{
-            
+        flex-direction: column;
+        .lr-item {
+          flex: 1;
+          margin-top: 20px;
+          .item-top-title {
+            position: relative;
+            top: -5px;
+            color: #fff;
+          }
         }
+      }
+      .top-right {
+      }
     }
-    
-    .fire-bottom{
-        height: 300px;
+
+    .fire-bottom {
+      height: 300px;
     }
-    .scroll-box{
-        padding: 0 20px;
-        height: 100%;
+    .scroll-box {
+      padding: 0 20px;
+      height: 100%;
     }
-}
-</style>
+  }
+</style>

+ 0 - 180
src/views/vent/monitorManager/groutMonitor/components/groutHomeDlt.vue

@@ -1,180 +0,0 @@
-<template>
-  <div class="monitor-container">
-    <div class="header-box">
-      <div class="header-container">
-        <div class="device-detail">
-          <div class="device-val">注浆站流量计瞬时流量 :</div>
-          <div class="device-val">注浆站流量计累计流量 :</div>
-          <div class="device-val">注浆站流量计运行时间 :</div>
-        </div>
-        <div class="device-detail">
-          <div class="device-val">
-            <span :style="{ color: '#10BC79' }">{{ monitorData['InputFlux'] !== undefined ? monitorData['InputFlux'] : '-' }}</span>
-          </div>
-          <div class="device-val">
-            <span :style="{ color: '#10BC79' }">{{
-              monitorData['CurrentCumulativeFlow'] !== undefined ? monitorData['CurrentCumulativeFlow'] : '-'
-            }}</span>
-          </div>
-          <div class="device-val">
-            <span :style="{ color: '#10BC79' }">{{
-              monitorData['AccumulateRunDuration'] !== undefined ? monitorData['AccumulateRunDuration'] : '-'
-            }}</span>
-          </div>
-        </div>
-        <div class="device-detail">
-          <div class="device-val">
-            <span :style="{ color: '#BFBFBF' }">m³</span>
-          </div>
-          <div class="device-val">
-            <span :style="{ color: '#BFBFBF' }">m³/min</span>
-          </div>
-          <div class="device-val">
-            <span :style="{ color: '#BFBFBF' }">h</span>
-          </div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-
-<script setup lang="ts">
-  import { ref, onMounted, onUnmounted, defineProps } from 'vue';
-  import { mountedThree, destroy, setModelType } from '../grout.threejs';
-  import { list } from '../grout.api';
-
-  const props = defineProps({
-    deviceId: {
-      type: String,
-      require: true,
-    },
-    deviceType: {
-      type: String,
-      require: true,
-    },
-  });
-
-  const loading = ref(false);
-  const monitorData = ref({ InputFlux: undefined });
-
-  // https获取监测数据
-  let timer: null | NodeJS.Timeout = null;
-  function getMonitor(flag?) {
-    if (Object.prototype.toString.call(timer) === '[object Null]') {
-      timer = setTimeout(
-        async () => {
-          await getDataSource();
-          if (timer) {
-            timer = null;
-          }
-          await getMonitor();
-        },
-        flag ? 0 : 1000
-      );
-    }
-  }
-
-  async function getDataSource() {
-    const res = await list({ devicetype: 'pulping_auto', pagetype: 'normal' });
-    if (res.msgTxt && res.msgTxt[0] && res.msgTxt[0].datalist && res.msgTxt[0].datalist[0]) {
-      monitorData.value = Object.assign(res.msgTxt[0].datalist[0], res.msgTxt[0].datalist[0]['readData']);
-    }
-  }
-
-  onMounted(() => {
-    loading.value = true;
-    mountedThree().then(async () => {
-      await setModelType('bertaiBase');
-      loading.value = false;
-      timer = null;
-      await getMonitor(true);
-    });
-  });
-  onUnmounted(() => {
-    destroy();
-    if (timer) {
-      clearTimeout(timer);
-      timer = undefined;
-    }
-  });
-</script>
-<style lang="less" scoped>
-  @import '/@/design/vent/modal.less';
-  @ventSpace: zxm;
-
-  .monitor-container {
-    width: 100%;
-    height: 100%;
-    // height: 550px;
-    // border: 1px solid #fff;
-    margin-top: 40px;
-    display: flex;
-    // justify-content: space-between;
-    justify-content: center;
-    padding: 0 5px;
-
-    .header-box {
-      // width: 100%;
-      margin-top: 50px;
-      .header-container {
-        height: auto;
-        display: flex;
-        flex-direction: row;
-        justify-content: center;
-        color: #fff;
-        box-shadow: 0 0 30px rgb(0, 153, 184) inset;
-      }
-      .device-title {
-        width: 110px;
-        text-align: center;
-        border-top: 1px solid #00baffd4;
-        border-left: 1px solid #00baffd4;
-        line-height: 46px;
-        color: #00e5ff;
-        background-color: #00bbff21;
-      }
-      .device-detail {
-        text-align: center;
-        width: 250px;
-        &:first-child {
-          background-color: #00bbff11;
-        }
-        &:last-child {
-          .device-val,
-          .device-title {
-            border-right: 1px solid #00baffd4;
-          }
-        }
-        .device-val {
-          line-height: 36px;
-          border-top: 1px solid #00baffd4;
-          border-left: 1px solid #00baffd4;
-          &:last-child {
-            border-bottom: 1px solid #00baffd4;
-          }
-        }
-      }
-    }
-  }
-
-  :deep(.@{ventSpace}-tabs-tabpane-active) {
-    overflow: auto;
-  }
-
-  .input-box {
-    display: flex;
-    align-items: center;
-    padding-left: 10px;
-
-    .input-title {
-      color: #73e8fe;
-      width: auto;
-    }
-
-    .@{ventSpace}-input-number {
-      border-color: #ffffff88 !important;
-    }
-
-    margin-right: 10px;
-  }
-</style>

+ 18 - 2
src/views/vent/monitorManager/groutMonitor/grout.data.ts

@@ -1,6 +1,6 @@
-import { reactive } from 'vue';
+import { reactive, defineAsyncComponent } from 'vue';
 import echarts from '/@/utils/lib/echarts';
-import { BasicColumn } from '/@/components/Table';
+import { useGlobSetting } from '/@/hooks/setting';
 
 export const warningConfig = reactive({
   header: ['设备名称', '预警信息', '时间'],
@@ -308,3 +308,19 @@ export const deviceMonitorList = [
     ],
   },
 ];
+
+export function getMonitorComponent() {
+  const { sysOrgCode } = useGlobSetting();
+  let groutHome;
+  switch (sysOrgCode) {
+    case 'sdmtjtjjmk': // 锦界
+      groutHome = defineAsyncComponent(() => import('./components/groutHomeJj.vue'));
+      return groutHome;
+    case 'sdmtjtdltmkhjtj': // 活鸡兔井
+      groutHome = defineAsyncComponent(() => import('./components/groutHomeHjt.vue'));
+      return groutHome;
+    default:
+      groutHome = defineAsyncComponent(() => import('./components/groutHome.vue'));
+      return groutHome;
+  }
+}

+ 3 - 8
src/views/vent/monitorManager/groutMonitor/index.vue

@@ -19,11 +19,7 @@
   <div class="scene-box">
     <customHeader :fieldNames="{ label: 'strinstallpos', value: 'deviceID', options: 'children' }" :options = 'options' @change="getSelectRow" :optionValue="optionValue">智能注浆系统</customHeader>
     <div class="center-container">
-      <!-- <groutHome v-if="activeKey == 'monitor'" :deviceId = 'optionValue' :device-type="currentDeviceType" /> -->
-      <!-- 锦界 -->
-      <!-- <groutHomeJj v-if="activeKey == 'monitor'" :deviceId = 'optionValue' :device-type="currentDeviceType" /> -->
-      <!-- 大柳塔 -->
-      <groutHomeDlt v-if="activeKey == 'monitor'" :deviceId = 'optionValue' :device-type="currentDeviceType" />
+      <groutHome v-if="activeKey == 'monitor'" :deviceId = 'optionValue' :device-type="currentDeviceType" />
       <div v-else class="history-group">
         <div class="history-container">
           <groutHistory v-if="activeKey == 'monitor_history'" :device-type="currentDeviceType" :device-id="optionValue" ref="historyTable" class="vent-margin-t-20"/>
@@ -42,14 +38,13 @@ import customHeader from '/@/views/vent/comment/components/customHeader.vue';
 import { ref, onMounted, onUnmounted, reactive, toRaw } from 'vue';
 import { list } from './grout.api';
 import BottomMenu from '/@/views/vent/comment/components/bottomMenu.vue';
-import groutHome from './components/groutHome.vue';
-import groutHomeJj from './components/groutHomeJj.vue';
-import groutHomeDlt from './components/groutHomeDlt.vue';
+import {getMonitorComponent} from './grout.data'
 import groutHistory from './components/groutHistory.vue';
 import groutHandleHistoryVue from './components/groutHandleHistory.vue';
 import groutAlarmHistory from './components/groutAlarmHistory.vue';
 import { useRouter } from 'vue-router';
 
+const groutHome = getMonitorComponent()
 type DeviceType = { deviceType: string, deviceName: string, datalist: any[] };
 const activeKey = ref('monitor');
 const loading = ref(false);

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

@@ -150,7 +150,7 @@
 
   const { monitorDataGroupArr, preFanMonitorData, preMonitorList, cqgMonitorList, prefix, getSysState, totalData } = getMonitorData();
   const loading = ref(true);
-  const monitorDataGroupFlag = ref(0);
+  const monitorDataGroupFlag = ref(1);
   const monitorDataGroup = ref<Number[]>([]);
   const kyjs = ref<string[]>([]);
   const cqgs = ref<string[]>([]);

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

@@ -48,7 +48,7 @@ import {
   prefix as prefix_YJ,
   getSysState as getSysState_YJ,
   totalData as totalData_YJ,
-} from './nitrogen.dataYJ'; // 窑
+} from './nitrogen.dataYJ'; // 窑
 
 export type State = {
   isRun: boolean;
@@ -90,7 +90,7 @@ export const bottomBtnList = ref([
 export function getMonitorData() {
   const globSetting = useGlobSetting();
   switch (globSetting.sysOrgCode) {
-    case 'yjmdsankuang': // 窑三矿
+    case 'yjmdsankuang': // 窑三矿
       return {
         monitorDataGroupArr: monitorDataGroupArr_YJ,
         preFanMonitorData: preFanMonitorData_YJ,

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

@@ -46,7 +46,7 @@
 
 <script setup lang="ts">
 import { onBeforeMount, ref, onMounted, onUnmounted, reactive, toRaw } from 'vue';
-import { mountedThree, destroy, setModelType, refreshModal } from './tunFace.threejs';
+import { mountedThree, destroy, setModelType } from './tunFace.threejs';
 import { systemList, getTableList } from './tunFace.api';
 import { monitorNav } from './tunFace.data'
 import customHeader from '/@/views/vent/comment/components/customHeader.vue';
@@ -93,7 +93,6 @@ function changeActive(activeValue) {
   activeKey.value = activeValue
   loading.value = true
   if(activeKey.value === 'monitor'){
-    // refreshModal()
     setModelType('tunFace')
     setTimeout(() =>{
       loading.value = false

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

@@ -92,7 +92,8 @@ function changeActive(activeValue) {
   activeKey.value = activeValue
   loading.value = true
   if(activeKey.value === 'monitor'){
-    gasUnitNum.value = Math.ceil(Math.random() * 10)
+    // gasUnitNum.value = Math.ceil(Math.random() * 10)
+    gasUnitNum.value = 4
     setTimeout(() =>{
       loading.value = false
     }, 600)
@@ -171,7 +172,8 @@ function changeModalType(currentData) {
     // 双进双回
     modalType = 'workFace4'
   }
-  gasUnitNum.value = Math.ceil(Math.random() * 10)
+  // gasUnitNum.value = Math.ceil(Math.random() * 4)
+  gasUnitNum.value = 4
   setModelType(modalType, gasUnitNum.value, monitorActive.value == 4 ? true : false)
 }
 
@@ -199,7 +201,8 @@ onMounted(async() => {
   await getSysDataSource()
   loading.value = true;
   mountedThree().then(async () => {
-    gasUnitNum.value = Math.ceil(Math.random() * 10)
+    // gasUnitNum.value = Math.ceil(Math.random() * 10)
+    gasUnitNum.value = 4
     loading.value = false;
     nextTick(() => {
       setModelType(modalType, gasUnitNum.value, monitorActive.value == 4 ? true : false)

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

@@ -17,8 +17,8 @@ const mouseEvent = (event) => {
   if (event.button == 0 && group) {
     model.canvasContainer?.addEventListener('mousemove', mousemove);
     const groud = group.getObjectByName('groud');
-    const intakewind = group.getObjectByName('intakewind01');
-    const returnwind = group.getObjectByName('returnwind');
+    const intakewind = group.getObjectByName('workFace-jin');
+    const returnwind = group.getObjectByName('workFace-hui');
     mouseDownFn(model, [groud, intakewind, returnwind], event);
     console.log('摄像头控制信息', model.orbitControls, model.camera);
   }
@@ -60,7 +60,7 @@ export const clearCss3D = () => {
 };
 
 // 切换风窗类型
-export const setModelType = (type, n = Math.ceil(Math.random() * 10), isShowPlane) => {
+export const setModelType = (type, n = Math.ceil(Math.random() * 4), isShowPlane) => {
   fiberType = type;
   return new Promise((resolve) => {
     if (workFaceObj) {

+ 4 - 5
src/views/vent/performance/comment/DeviceModal.vue

@@ -14,7 +14,7 @@
   </BasicModal>
 </template>
 <script lang="ts" setup>
-  import { computed, unref, inject, reactive } from 'vue';
+  import { unref, reactive } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { onMounted } from 'vue';
   import { useUserStore } from '/@/store/modules/user';
@@ -36,9 +36,8 @@
   let userName = unref(userStore.getUserInfo).username;
   console.log(userId, '用户id');
   console.log(userName, '用户名');
-  const isUpdate = inject('isUpdate');
   const record = reactive({ strtype: '', strname: '' });
-
+  const remoteUrl = import.meta.env.DEV ? 'http://182.92.126.35' : 'http://' + window.location.hostname;
   //表单赋值
   const [registerModal, { setModalProps }] = useModalInner(async (data) => {
     //重置表单
@@ -53,7 +52,7 @@
         height: '100%',
         document: {
           title: '文档管理',
-          url: 'http://182.92.126.35:9999/ventanaly-sharefile/fileServer/onlyOffice/read?id=' + props.editID, //id表示文件id,后端接口用这个id来加载文件
+          url: remoteUrl + ':9999/ventanaly-sharefile/fileServer/onlyOffice/read?id=' + props.editID, //id表示文件id,后端接口用这个id来加载文件
           // url: `${window.location.origin}:9999/ventanaly-sharefile/fileServer/onlyOffice/read?id=${props.editID}`, //id表示文件id,后端接口用这个id来加载文件
           fileType: props.fileType == 'doc' ? 'docx' : props.fileType == 'xls' ? 'xlsx' : props.fileType == 'ppt' ? 'pptx' : props.fileType, //当文件类型为doc、xls、ppt时,对应用docx、xlsx、pptx否则会保存异常。
           key: '',
@@ -68,7 +67,7 @@
         editorConfig: {
           lang: 'zh-CN',
           mode: 'edit', //view:只读且可复制内容,edit:可编辑
-          callbackUrl: 'http://182.92.126.35:9999/ventanaly-sharefile/fileServer/onlyOffice/save?id=' + props.editID, //id表示文件id,后端接口用这个id来加载文件
+          callbackUrl: remoteUrl + ':9999/ventanaly-sharefile/fileServer/onlyOffice/save?id=' + props.editID, //id表示文件id,后端接口用这个id来加载文件
           // callbackUrl: `${window.location.origin}:9999/ventanaly-sharefile/fileServer/onlyOffice/save?id=${props.editID}`, //id表示文件id,后端接口用这个id来加载文件
           coEditing: {
             mode: 'fast',

+ 21 - 18
src/views/vent/reportManager/comment/DeviceModal.vue

@@ -28,10 +28,15 @@
       </a-form>
     </div>
     <!--历史记录 -->
-    <div v-else-if="addOredit=='hisRecord'">
-      <NormalHisTable  :columns="columnsHis" 
-                 :downLoad="hisdownload" :list="hisList" designScope="device-tabel" title="报表历史记录管理"
-                :showTab="false"/>
+    <div v-else-if="addOredit == 'hisRecord'">
+      <NormalHisTable
+        :columns="columnsHis"
+        :downLoad="hisdownload"
+        :list="hisList"
+        designScope="device-tabel"
+        title="报表历史记录管理"
+        :showTab="false"
+      />
     </div>
     <!-- 报表编辑 -->
     <div v-else>
@@ -41,12 +46,12 @@
 </template>
 <script lang="ts" setup>
   import { computed, unref, inject, reactive, ref, watch, defineProps } from 'vue';
-  import NormalHisTable from '../comment/NormalHisTable.vue'
+  import NormalHisTable from '../comment/NormalHisTable.vue';
   import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import { useUserStore } from '/@/store/modules/user';
-  import { hisList ,hisdownload} from '../reportManager.api'
-  import { columnsHis} from '../reportManager.data' ;
+  import { hisList, hisdownload } from '../reportManager.api';
+  import { columnsHis } from '../reportManager.data';
 
   let props = defineProps({
     addOredit: {
@@ -61,17 +66,15 @@
       type: String,
       default: '',
     },
-    reportLogHis:{
-      type:String,
-      default:''
-    }
+    reportLogHis: {
+      type: String,
+      default: '',
+    },
   });
-
+  const remoteUrl = import.meta.env.DEV ? 'http://182.92.126.35' : 'http://' + window.location.hostname;
   const userStore = useUserStore(); //获取用户信息
   let userId = unref(userStore.getUserInfo).id;
   let userName = unref(userStore.getUserInfo).username;
-  console.log(userId, '用户id');
-  console.log(userName, '用户名');
 
   let formState = reactive({
     reportType: '',
@@ -82,8 +85,8 @@
   let title = computed(() => {
     if (props.addOredit == 'add') {
       return '报表新增';
-    }else if(props.addOredit=='hisRecord'){
-      return '历史记录'
+    } else if (props.addOredit == 'hisRecord') {
+      return '历史记录';
     } else {
       return '报表编辑';
     }
@@ -121,7 +124,7 @@
         height: '860px',
         document: {
           title: '文档管理',
-          url: 'http://182.92.126.35:9999/ventanaly-device/safety/reportInfo/onlyOffice/read?id=' + props.editID+'&type='+props.reportLogHis, //id表示文件id,后端接口用这个id来加载文件
+          url: remoteUrl + ':9999/ventanaly-device/safety/reportInfo/onlyOffice/read?id=' + props.editID + '&type=' + props.reportLogHis, //id表示文件id,后端接口用这个id来加载文件
           fileType: props.fileType == 'doc' ? 'docx' : props.fileType == 'xls' ? 'xlsx' : props.fileType == 'ppt' ? 'pptx' : props.fileType, //当文件类型为doc、xls、ppt时,对应用docx、xlsx、pptx否则会保存异常。
           key: '',
           lang: 'zh-CN',
@@ -135,7 +138,7 @@
         editorConfig: {
           lang: 'zh-CN',
           mode: props.reportLogHis ? 'view' : 'edit', //view:只读且可复制内容,edit:可编辑
-          callbackUrl: 'http://182.92.126.35:9999/ventanaly-device/safety/reportInfo/onlyOffice/save?id=' + props.editID+'&type='+ props.reportLogHis, //id表示文件id,后端接口用这个id来加载文件
+          callbackUrl: remoteUrl + ':9999/ventanaly-device/safety/reportInfo/onlyOffice/save?id=' + props.editID + '&type=' + props.reportLogHis, //id表示文件id,后端接口用这个id来加载文件
           coEditing: {
             mode: 'fast',
             change: true,