Bläddra i källkod

新增密闭、跳转对应设备列表

hongrunxia 1 år sedan
förälder
incheckning
026fde3ed7
81 ändrade filer med 2461 tillägg och 770 borttagningar
  1. 7 1
      src/components/Form/src/jeecg/components/MTreeSelect.vue
  2. 2 1
      src/design/vent/modal.less
  3. 1 1
      src/hooks/setting/index.ts
  4. 1 0
      src/hooks/system/useMethods.ts
  5. 23 3
      src/hooks/web/useWebColumns.ts
  6. 4 4
      src/utils/event/index.ts
  7. 1 1
      src/utils/http/axios/axiosCancel.ts
  8. 2 1
      src/utils/threejs/useEvent.ts
  9. 2 2
      src/views/vent/deviceManager/comment/NormalTable.vue
  10. 1 1
      src/views/vent/deviceManager/damperTabel/damper.api.ts
  11. 1 1
      src/views/vent/deviceManager/deviceColumns/columns.api.ts
  12. 1 1
      src/views/vent/deviceManager/deviceTable/device.api.ts
  13. 2 1
      src/views/vent/deviceManager/deviceTable/index.vue
  14. 1 1
      src/views/vent/deviceManager/equipManager/equip.api.ts
  15. 1 1
      src/views/vent/deviceManager/fanTabel/fan.api.ts
  16. 1 1
      src/views/vent/deviceManager/ledTabel/led.api.ts
  17. 1 1
      src/views/vent/deviceManager/mainFanTabel/fan.api.ts
  18. 1 1
      src/views/vent/deviceManager/pointTabel/point.api.ts
  19. 10 0
      src/views/vent/deviceManager/pointTabel/point.data.ts
  20. 1 1
      src/views/vent/deviceManager/sensorTabel/sensor.api.ts
  21. 1 1
      src/views/vent/deviceManager/substationTabel/substation.api.ts
  22. 3 13
      src/views/vent/deviceManager/substationTabel/substation.data.ts
  23. 1 1
      src/views/vent/deviceManager/tableColumns/tableColumns.api.ts
  24. 1 1
      src/views/vent/deviceManager/windWindowTabel/ventanalyWindow.api.ts
  25. 1 1
      src/views/vent/deviceManager/windfindingTabel/windfinding.api.ts
  26. 1 1
      src/views/vent/deviceManager/workingFace/workingFace.api.ts
  27. 3 3
      src/views/vent/monitorManager/balancePressMonitor/components/balancePressHome.vue
  28. 8 3
      src/views/vent/monitorManager/beltTunMonitor/beltTun.api.ts
  29. 44 53
      src/views/vent/monitorManager/beltTunMonitor/beltTun.data.ts
  30. 4 4
      src/views/vent/monitorManager/beltTunMonitor/beltTun.threejs.base.ts
  31. 143 94
      src/views/vent/monitorManager/beltTunMonitor/components/beltTunDustHome.vue
  32. 11 46
      src/views/vent/monitorManager/beltTunMonitor/components/beltTunFireHome.vue
  33. 147 21
      src/views/vent/monitorManager/beltTunMonitor/components/beltTunHome.vue
  34. 32 32
      src/views/vent/monitorManager/beltTunMonitor/components/beltTunVentHome.vue
  35. 7 18
      src/views/vent/monitorManager/beltTunMonitor/index.vue
  36. 4 4
      src/views/vent/monitorManager/chamberMonitor/components/chamberHome.vue
  37. 1 1
      src/views/vent/monitorManager/comment/AlarmHistoryTable.vue
  38. 10 35
      src/views/vent/monitorManager/comment/GroupMonitorTable.vue
  39. 2 1
      src/views/vent/monitorManager/comment/HistoryTable.vue
  40. 6 4
      src/views/vent/monitorManager/comment/MonitorTable.vue
  41. 41 0
      src/views/vent/monitorManager/comment/less/workFace.less
  42. 3 3
      src/views/vent/monitorManager/compressor/components/nitrogenEcharts.vue
  43. 3 3
      src/views/vent/monitorManager/compressor/components/nitrogenHome.vue
  44. 143 129
      src/views/vent/monitorManager/deviceMonitor/components/device/index.vue
  45. 2 2
      src/views/vent/monitorManager/fanLocalMonitor/fanLocal.three.ts
  46. 361 13
      src/views/vent/monitorManager/fanLocalMonitor/index.vue
  47. 2 2
      src/views/vent/monitorManager/fiberMonitor/fiber.belt.threejs.ts
  48. 1 1
      src/views/vent/monitorManager/fiberMonitor/fiber.ds.threejs.ts
  49. 1 1
      src/views/vent/monitorManager/fiberMonitor/fiber.workFace.threejs.ts
  50. 4 4
      src/views/vent/monitorManager/fireMonitor/index.vue
  51. 3 3
      src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHome.vue
  52. 2 2
      src/views/vent/monitorManager/gateMonitor/gate.threejs.three.ts
  53. 2 2
      src/views/vent/monitorManager/gateMonitor/gate.threejs.two.ts
  54. 29 23
      src/views/vent/monitorManager/gateMonitor/index.vue
  55. 17 6
      src/views/vent/monitorManager/mainFanMonitor/index.vue
  56. 3 3
      src/views/vent/monitorManager/nitrogen/components/nitrogenEcharts.vue
  57. 2 2
      src/views/vent/monitorManager/nitrogen/nitrogen.threejs.ts
  58. 25 0
      src/views/vent/monitorManager/obfurageMonitor/components/obfurageAlarmHistory.vue
  59. 26 0
      src/views/vent/monitorManager/obfurageMonitor/components/obfurageHandleHistory.vue
  60. 28 0
      src/views/vent/monitorManager/obfurageMonitor/components/obfurageHistory.vue
  61. 621 0
      src/views/vent/monitorManager/obfurageMonitor/components/obfurageHome.vue
  62. 247 0
      src/views/vent/monitorManager/obfurageMonitor/index.vue
  63. 18 0
      src/views/vent/monitorManager/obfurageMonitor/obfurage.api.ts
  64. 73 0
      src/views/vent/monitorManager/obfurageMonitor/obfurage.data.ts
  65. 59 0
      src/views/vent/monitorManager/obfurageMonitor/obfurage.threejs.base.ts
  66. 98 0
      src/views/vent/monitorManager/obfurageMonitor/obfurage.threejs.ts
  67. 24 92
      src/views/vent/monitorManager/sensorMonitor/index.vue
  68. 9 11
      src/views/vent/monitorManager/tunFaceMonitor/components/tunFaceDustHome.vue
  69. 10 11
      src/views/vent/monitorManager/tunFaceMonitor/components/tunFaceFireHome.vue
  70. 50 21
      src/views/vent/monitorManager/tunFaceMonitor/components/tunFaceHome.vue
  71. 11 42
      src/views/vent/monitorManager/tunFaceMonitor/components/tunFaceVentHome.vue
  72. 2 2
      src/views/vent/monitorManager/tunFaceMonitor/index.vue
  73. 12 1
      src/views/vent/monitorManager/windowMonitor/index.vue
  74. 12 1
      src/views/vent/monitorManager/windrectMonitor/index.vue
  75. 2 2
      src/views/vent/monitorManager/workFaceMonitor/components/workFaceDustHome.vue
  76. 3 2
      src/views/vent/monitorManager/workFaceMonitor/components/workFaceFireHome.vue
  77. 1 1
      src/views/vent/monitorManager/workFaceMonitor/components/workFaceGasHome.vue
  78. 11 17
      src/views/vent/monitorManager/workFaceMonitor/components/workFaceHome.vue
  79. 4 5
      src/views/vent/monitorManager/workFaceMonitor/components/workFaceVentHome.vue
  80. 1 1
      src/views/vent/monitorManager/workFaceMonitor/wokeFace.threejs.ts
  81. 1 1
      src/views/vent/performance/fileDetail/fileDetail.api.ts

+ 7 - 1
src/components/Form/src/jeecg/components/MTreeSelect.vue

@@ -37,6 +37,7 @@
     multiple: propTypes.bool.def(false),
     loadTriggleChange: propTypes.bool.def(false),
     reload: propTypes.number.def(1),
+    isSearch: propTypes.bool.def(true),
   });
   const emit = defineEmits(['change', 'update:value']);
   const { createMessage } = useMessage();
@@ -81,7 +82,12 @@
     } else if (value instanceof Array) {
       emitValue(value.map((item) => item.value).join(','));
     } else {
-      emitValue(value+'*');
+      if(props.isSearch){
+        emitValue(value + '*');
+      }else{
+        emitValue(value);
+      }
+      
     }
     treeValue.value = value;
     console.log(treeValue.value);

+ 2 - 1
src/design/vent/modal.less

@@ -372,6 +372,7 @@
     // padding: 0 10px;
     margin: 0px;
     pointer-events: auto;
+    z-index: 9999;
 
     // &:before {
     //   position: absolute;
@@ -420,7 +421,7 @@
       background: linear-gradient(#0091aa33, #2081ff11);
       // background: radial-gradient(circle at 50% 80%, #3df6ff33, #0038b433);
       backdrop-filter: blur(18px);
-      overflow-y: auto;
+      overflow-y: hidden;
       border-radius: 8px;
       .tabs-box {
         height: 100%;

+ 1 - 1
src/hooks/setting/index.ts

@@ -44,7 +44,7 @@ export const useGlobSetting = (): Readonly<GlobConfig> => {
   }
   if (import.meta.env.DEV) {
     domainUrl = VITE_GLOB_DOMAIN_URL;
-  } else if (import.meta.env.PROD && !domainUrl) {
+  } else if (import.meta.env.PROD) {
     domainUrl = VUE_APP_URL.baseUrl;
   }
   // Take global configuration

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

@@ -57,6 +57,7 @@ export function useMethods() {
    * @param success 成功后的回调
    */
   async function importXls(data, url, success) {
+    debugger
     const isReturn = (fileInfo) => {
       try {
         if (fileInfo.code === 201) {

+ 23 - 3
src/hooks/web/useWebColumns.ts

@@ -1,7 +1,7 @@
 import { computed, ref } from 'vue';
 import { useVentStore } from '/@/store/modules/vent';
 import { BasicColumn } from '/@/components/Table';
-
+import { colors } from '/@/views/vent/monitorManager/alarmMonitor/alarm.data';
 
 const ventStore = useVentStore();
 
@@ -23,7 +23,26 @@ const arrToColumns = (tableHeaderColumns = []) => {
   return columns;
 };
 
-
+const arrToChartColumns = (tableHeaderColumns = []) => {
+  const colors = ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'];
+  const columns: BasicColumn[] = [];
+  tableHeaderColumns.forEach((item: any, i) => {
+    const columnsItem = {
+      legend: item.legend,
+      seriesName: item.unit,
+      ymax: item.ymax,
+      yname: item.yname,
+      linetype: item.linetype,
+      yaxispos: item.yaxispos,
+      color: colors[i],
+      sort: item.sort,
+      xRotate: 0,
+      dataIndex: item.monitorcode,
+    };
+    columns.push(columnsItem);
+  });
+  return columns;
+};
 
 export const getTableHeaderColumns = (webColumnsKey) => {
   const key = webColumnsKey;
@@ -31,13 +50,14 @@ export const getTableHeaderColumns = (webColumnsKey) => {
   if (allTableHeaderColumnArr) {
     const tabelHeaderColumns = allTableHeaderColumnArr[key];
     if (key && key.includes('_chart')) {
-      return tabelHeaderColumns;
+      return arrToChartColumns(tabelHeaderColumns);
     }
     return arrToColumns(tabelHeaderColumns);
   }
   return [];
 };
 
+
 export const getFormSchemaColumns = (webColumnsKey) => {
   const key = webColumnsKey;
   const allTableHeaderColumnArr = ventStore.getAllTableHeaderColumns;

+ 4 - 4
src/utils/event/index.ts

@@ -41,7 +41,7 @@ export function triggerWindowResize() {
   window.dispatchEvent(event);
 }
 
-export function setDivHeight(e: MouseEvent, minHeight, scroll) {
+export function setDivHeight(e: MouseEvent, minHeight, scroll, scrollClientMaxHeight = 175, scrollClientHeight = 100) {
   e.preventDefault();
   e.stopPropagation();
   const divObject = e.currentTarget as HTMLElement;
@@ -64,13 +64,13 @@ export function setDivHeight(e: MouseEvent, minHeight, scroll) {
       if (res.clientY < startY) {
         height = divHeight + distY;
       }
-      if (height > document.body.clientHeight - 175) height = document.body.clientHeight - 175;
+      if (height > document.body.clientHeight - scrollClientMaxHeight) height = document.body.clientHeight - scrollClientMaxHeight;
       divObject.style.height = height + 'px';
     };
     document.onmouseup = function () {
       document.onmousemove = null;
-      if (isMove && scroll.y != height - 100) {
-        scroll.y = height - 100;
+      if (isMove && scroll.y != height - scrollClientHeight) {
+        scroll.y = height - scrollClientHeight;
       }
     };
   }

+ 1 - 1
src/utils/http/axios/axiosCancel.ts

@@ -14,7 +14,7 @@ export class AxiosCanceler {
    */
   public addPending(config: AxiosRequestConfig): void {
     this.removePending(config);
-    const url = getPendingUrl(config) +'_'+ new Date().getTime();
+    const url = getPendingUrl(config)
     const controller = new AbortController();
     config.signal = config.signal || controller.signal;
     if (!pendingMap.has(url)) {

+ 2 - 1
src/utils/threejs/useEvent.ts

@@ -11,6 +11,7 @@ export default function useEvent() {
   const mouseDownFn = (modal: UseThree, group: THREE.Object3D | THREE.Object3D[], event: MouseEvent, callBack?: Function) => {
     event.stopPropagation();
     event.preventDefault();
+
     if (!modal || !modal.canvasContainer || !modal.orbitControls) return;
     const appStore = useAppStore();
 
@@ -43,7 +44,7 @@ export default function useEvent() {
   };
 
   const mousemoveFn = () => {
-    point = null;
+    intersect0 = null;
   };
 
   const mouseUpFn = (modal, minDistance = 5, renderCallBack?) => {

+ 2 - 2
src/views/vent/deviceManager/comment/NormalTable.vue

@@ -153,7 +153,7 @@
         width: 180,
       },
       beforeFetch: (params) => {
-        return Object.assign({ column: 'createTime' }, params);
+        return Object.assign(params, { column: 'createTime', devicekind: props.deviceType });
       },
     },
     exportConfig: {
@@ -204,7 +204,7 @@
    * 删除事件
    */
   async function handleDelete(record) {
-    await props.deleteById({ id: record }, reload);
+    await props.deleteById({id: record.id}, reload);
   }
 
   /**

+ 1 - 1
src/views/vent/deviceManager/damperTabel/damper.api.ts

@@ -36,7 +36,7 @@ export const pointList = (params) => defHttp.get({ url: Api.pointList, params })
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 1 - 1
src/views/vent/deviceManager/deviceColumns/columns.api.ts

@@ -29,7 +29,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params}, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 1 - 1
src/views/vent/deviceManager/deviceTable/device.api.ts

@@ -29,7 +29,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 2 - 1
src/views/vent/deviceManager/deviceTable/index.vue

@@ -4,7 +4,7 @@
       v-if="isRefresh"
       :columns="columns"
       :searchFormSchema="searchFormSchema"
-      :list="list.bind(null, { devicekind: deviceType })"
+      :list="list"
       :getImportUrl="getImportUrl"
       :getExportUrl="getExportUrl"
       :formSchema="formSchema"
@@ -87,6 +87,7 @@
             componentProps: {
               dictCode: item.dict,
               placeholder: '请选择',
+              stringToNumber: true,
             },
           };
         }

+ 1 - 1
src/views/vent/deviceManager/equipManager/equip.api.ts

@@ -30,7 +30,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 1 - 1
src/views/vent/deviceManager/fanTabel/fan.api.ts

@@ -29,7 +29,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 1 - 1
src/views/vent/deviceManager/ledTabel/led.api.ts

@@ -29,7 +29,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 1 - 1
src/views/vent/deviceManager/mainFanTabel/fan.api.ts

@@ -29,7 +29,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 1 - 1
src/views/vent/deviceManager/pointTabel/point.api.ts

@@ -44,7 +44,7 @@ export const selectDevice = (params) => defHttp.get({ url: Api.selectDevice, par
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

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

@@ -204,6 +204,16 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
   },
   {
+    label: '功能码',
+    field: 'fanctionCode',
+    component: 'Input',
+  },
+  {
+    label: '数值解析',
+    field: 'dictset',
+    component: 'Input',
+  },
+  {
     label: '最小值',
     field: 'fmin',
     component: 'InputNumber',

+ 1 - 1
src/views/vent/deviceManager/sensorTabel/sensor.api.ts

@@ -29,7 +29,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 1 - 1
src/views/vent/deviceManager/substationTabel/substation.api.ts

@@ -30,7 +30,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: { id: params.nsubstationid } }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params: { id: params.id } }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 3 - 13
src/views/vent/deviceManager/substationTabel/substation.data.ts

@@ -103,19 +103,9 @@ export const formSchema: FormSchema[] = [
     label: '监测类型',
     field: 'monitorparam',
     component: 'MTreeSelect',
-    colProps: { span: 6 },
-    required: true,
-  },
-  {
-    label: '分站类型',
-    field: 'ntype',
-    component: 'JDictSelectTag',
     componentProps: {
-      dictCode: 'stationtype',
-      placeholder: '请选择分站类型',
-      stringToNumber: true,
+      isSearch: false
     },
-    required: true,
   },
   {
     label: '分站站号',
@@ -138,6 +128,7 @@ export const formSchema: FormSchema[] = [
     label: '读取数据方式',
     field: 'strtype',
     component: 'JDictSelectTag',
+    required: true,
     componentProps: ({ formModel, formActionType, schema }) => {
       return {
         dictCode: 'getdatatype',
@@ -190,12 +181,11 @@ export const formSchema: FormSchema[] = [
     componentProps: {
       dictCode: 'reqtype',
       placeholder: '请选择请求方式',
-      stringToNumber: true,
     },
   },
   {
     label: 'reqHeader请求头',
-    field: 'reqparam',
+    field: 'reqHeader',
     component: 'Input',
     show: false,
   },

+ 1 - 1
src/views/vent/deviceManager/tableColumns/tableColumns.api.ts

@@ -35,7 +35,7 @@ export const selectDevice = (params) => defHttp.get({ url: Api.selectDevice, par
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 1 - 1
src/views/vent/deviceManager/windWindowTabel/ventanalyWindow.api.ts

@@ -29,7 +29,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 1 - 1
src/views/vent/deviceManager/windfindingTabel/windfinding.api.ts

@@ -29,7 +29,7 @@ export const list = (params) => defHttp.get({ url: Api.list, params });
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 1 - 1
src/views/vent/deviceManager/workingFace/workingFace.api.ts

@@ -57,7 +57,7 @@ export const getDeviceIds = (params) => defHttp.get({ url: Api.getDeviceIds, par
  * 删除用户
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };

+ 3 - 3
src/views/vent/monitorManager/balancePressMonitor/components/balancePressHome.vue

@@ -127,7 +127,7 @@ const flvURL1 = () => {
 
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
-function getMonitor() {
+function getMonitor(flag?) {
   if (Object.prototype.toString.call(timer) === '[object Null]') {
     timer = setTimeout(async () => {
       if (props.deviceId) {
@@ -140,7 +140,7 @@ function getMonitor() {
       }
       await getMonitor();
       loading.value = false
-    }, 1000);
+    }, flag ? 0 : 1000);
   }
 };
 
@@ -183,7 +183,7 @@ onMounted(() => {
     await setModelType('balancePressBase');
     loading.value = false;
     timer = null
-    await getMonitor()
+    await getMonitor(true)
     play('startSmoke', 'top', 30, 'open', 0)
   });
 });

+ 8 - 3
src/views/vent/monitorManager/beltTunMonitor/beltTun.api.ts

@@ -1,9 +1,10 @@
 import { defHttp } from '/@/utils/http/axios';
-import { Modal } from 'ant-design-vue';
 
 enum Api {
-  list = '/ventanaly-device/monitor/device',
-  baseList = '/safety/ventanalyDeviceInfo/list',
+  systemList = '/ventanaly-device/monitor/device',
+  list = '/ventanaly-device/monitor/system',
+  baseList = '/safety/ventanalyManageSystem/list',
+  deviceList = '/safety/ventanalyDeviceInfo/list',
 }
 /**
  * 列表接口
@@ -11,8 +12,12 @@ enum Api {
  */
 export const list = (params) => defHttp.post({ url: Api.list, params });
 
+export const systemList = (params) => defHttp.post({ url: Api.systemList, params });
+
 /**
  * 保存或者更新用户
  * @param params
  */
 export const getTableList = (params) => defHttp.get({ url: Api.baseList, params });
+
+export const getDeviceList = (params) => defHttp.get({ url: Api.deviceList, params });

+ 44 - 53
src/views/vent/monitorManager/beltTunMonitor/beltTun.data.ts

@@ -19,10 +19,6 @@ export const monitorNav = [
     title: '防尘监测与管控',
     isShow: false,
   },
-  {
-    title: '瓦斯防治监测与管控',
-    isShow: false,
-  },
 ];
 
 export const echartsOption = reactive({
@@ -125,29 +121,6 @@ export const echartsOption = reactive({
   ],
 });
 
-export const ventParam = [
-  {
-    title: '允许超出风量(m³/min)',
-    value: '',
-    type: 'input',
-  },
-  {
-    title: '瓦斯浓度限值(%)',
-    value: '',
-    type: 'input',
-  },
-  {
-    title: '瓦斯持续超限时间(s)',
-    value: '',
-    type: 'input',
-  },
-  {
-    title: '风量调控策略',
-    value: '1',
-    type: 'radio',
-  },
-];
-
 export const warningConfig = reactive({
   header: ['设备名称', '预警信息', '时间'],
   data: [
@@ -178,7 +151,7 @@ export const locationConfig = reactive({
   align: ['center', 'center', 'center'],
 });
 
-export const sensorColumns: BasicColumn[] = [
+export const dustMonitorColumns: BasicColumn[] = [
   {
     title: '名称',
     dataIndex: 'strname',
@@ -186,15 +159,21 @@ export const sensorColumns: BasicColumn[] = [
     align: 'center',
   },
   {
-    title: '实时值',
+    title: '全尘(mg/m³)',
     dataIndex: 'smokeval',
-    width: 80,
+    width: 70,
     align: 'center',
   },
   {
-    title: '报警',
+    title: '呼尘(mg/m³)',
     dataIndex: 'warnFlag',
-    width: 100,
+    width: 70,
+    align: 'center',
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    width: 50,
     align: 'center',
   },
 ];
@@ -274,27 +253,6 @@ export const windColumns: BasicColumn[] = [
   },
 ];
 
-export const dustColumns: BasicColumn[] = [
-  {
-    title: '名称',
-    dataIndex: 'strname',
-    width: 100,
-    align: 'center',
-  },
-  {
-    title: '链接状态',
-    dataIndex: 'netStatus',
-    width: 80,
-    align: 'center',
-  },
-  {
-    title: '操作',
-    dataIndex: 'action',
-    width: 100,
-    align: 'center',
-  },
-];
-
 export const dustFanParam = [
   {
     title: '输出电流 (A)',
@@ -396,6 +354,39 @@ export const groutColumns = [
   },
 ];
 
+export const dustColumns: BasicColumn[] = [
+  {
+    title: '名称',
+    dataIndex: 'strname',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '压力(Pa)',
+    dataIndex: 'netStatus',
+    width: 80,
+    align: 'center',
+  },
+  {
+    title: '流量(mg/㎡)',
+    dataIndex: 'netStatus',
+    width: 80,
+    align: 'center',
+  },
+  {
+    title: '连接状态',
+    dataIndex: 'netStatus',
+    width: 80,
+    align: 'center',
+  },
+  {
+    title: '操作',
+    dataIndex: 'action',
+    width: 80,
+    align: 'center',
+  },
+];
+
 export const sprayColumns: BasicColumn[] = [
   {
     title: '名称',

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

@@ -8,9 +8,9 @@ import { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPa
 import { GammaCorrectionShader } from 'three/examples/jsm/shaders/GammaCorrectionShader.js';
 import { CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer.js';
 
-import * as dat from 'dat.gui';
-const gui = new dat.GUI();
-gui.domElement.style = 'position:absolute;top:100px;left:10px;z-index:99999999999999';
+// import * as dat from 'dat.gui';
+// const gui = new dat.GUI();
+// gui.domElement.style = 'position:absolute;top:100px;left:10px;z-index:99999999999999';
 
 class WorkFace {
   model;
@@ -220,7 +220,7 @@ class WorkFace {
     pointLines.name = 'pointLines';
     return new Promise((resolve) => {
       new THREE.TextureLoader().load('/model/img/texture-smoke.png', (texture) => {
-        texture.encoding = THREE.sRGBEncoding;
+        texture.colorSpace = THREE.SRGBColorSpace;
         const material = new THREE.PointsMaterial({
           color: '#FFFFFF',
           size: 0.03,

+ 143 - 94
src/views/vent/monitorManager/beltTunMonitor/components/beltTunDustHome.vue

@@ -2,66 +2,75 @@
   <a-spin tip="Loading..." :spinning="loading">
     <div class="monitor-container">
       <div class="lr left-box vent-margin-t-10">
-        <ventBox1 class="vent-margin-t-10">
+        <div class="fire-analysis1">
+          <div class="analysis-item warning3">
+            <div class="title">粉尘风险预警</div>
+            <div class="value">高风险</div>
+          </div>
+        </div>
+        <div class="base-info">
+          <div class="base-item">
+            <div class="title">喷雾总数</div>
+            <div class="value len">20个</div>
+          </div>
+          <div class="base-item">
+            <div class="title">当日粉尘最大值</div>
+            <div class="value">3.2mg/m³</div>
+          </div>
+        </div>
+        <ventBox1 class="vent-margin-t-20">
           <template #title>
-            <div>煤机喷雾参数</div>
+            <div>粉尘监测与分析<a class="a-detail">(详情)</a></div>
           </template>
           <template #container>
-            <div v-for="(item, index) in coalMachineDustParam" class="input-item" style="padding: 4px 8px; margin: 6px 0;"
-              :key="index">
-              <div class="title">{{ item.title }}</div>
-              <div class="value">-</div>
-              <div class="unit">{{ item.unit }}</div>
+            <div class="">
+              <div class="vent-flex-row vent-margin-l-5">
+                <div class="vent-flex-row ">
+                  <SvgIcon class="icon vent-margin-r-5" size="13" name="alarm-temperature" />
+                  <span>是否报警:</span>
+                </div>
+                <div class="vent-flex-row vent-margin-l-10">
+                  <div class="vent-breathe-yc vent-margin-r-8"></div>
+                  <div>正常</div>
+                </div>
+              </div>
+              <div class="warning-state-detail">
+                报警产生于 <span class="state-color">2013-05-24 15:52:42</span> 时刻 <span class="state-color">皮带巷转载点粉尘监测1</span>
+              </div>
             </div>
           </template>
         </ventBox1>
+        <div class="item-box vent-margin-t-10" >
+          <LivePlayer id="fm-player1" style="height: 220px;" ref="player1" :videoUrl="flvURL1()" muted live loading controls />
+        </div>
       </div>
       <div class="lr right-box">
-        <ventBox1>
+        <ventBox1 class="vent-margin-t-10">
           <template #title>
-            <div>除尘风机监测与控制</div>
+            <div>通风参数监测</div>
           </template>
           <template #container>
-            <div class="dust-fan-monitor">
-              <div class="dust-fan-monitor-item" v-for="(item, index) in dustMonitor" :key="index">
-                <div class="title">{{ item.title }}</div>
-                <div class=""><span class="value">-</span> <span class="unit"> {{ item.unit }} </span></div>
-              </div>
-              <div class="dust-fan-monitor-item fault">
-                <div class="title">风机故障诊断</div>
-                <div class=""><span class="value">正常</span></div>
-              </div>
-            </div>
-
-            <div class="parameter-title group-parameter-title vent-margin-t-10">
-              <SvgIcon class="icon" size="20" name="control-setting" /><span>设备基础参数</span>
-            </div>
-            <div class="data-group">
-              <div class="data-item" v-for="(item, index) in dustFanParam" :key="index">
-                <div class="title">{{ item.title }}</div>
-                <div class="value">-</div>
-              </div>
-            </div>
-            <div class="parameter-title group-parameter-title">
-              <SvgIcon class="icon" size="20" name="control-setting" /><span>控制设备</span>
-            </div>
-            <div class="input-item vent-flex-row-between">
-              <div>除尘器控制:</div>
+            <div class="input-item vent-flex-row">
+              <div>设备控制:</div>
               <div class="vent-flex-row btn-box">
-                <div class="btn btn1">启动</div>
-                <div class="btn btn2">停机</div>
-              </div>
-            </div>
-            <div v-for="(item, index) in dustFanSetting" :key="index" class="input-item vent-flex-row-between">
-              <div class="title-auto">{{ item.title }}:</div>
-              <div>
-                <a-input class="input-value" v-model="item.inputNum" placeholder="" />
-                <span class="btn btn1 vent-margin-l-8">保存</span>
+                <div class="btn btn1">一键启动</div>
+                <div class="btn btn2">一键停止</div>
               </div>
             </div>
+            <a-table :columns="dustColumns" :data-source="dustDataSource" :pagination="false" size="small" maxWidth="340"
+              :scroll="{ x: 'max-content', y: 200 }">
+              <template #bodyCell="{ column, record }">
+                <template v-if="column.dataIndex === 'warnFlag'">
+                  <span v-if="record['warnFlag'] == 0" style="color: #00ff00;">链接</span>
+                  <span v-else style="color: #ff0000;"> {{ record.warnDes }}</span>
+                </template>
+                <template v-if="column.dataIndex === 'action'">
+                  <a-switch v-model:checked="openDust" @change="handleDust(record)" />
+                </template>
+              </template>
+            </a-table>
           </template>
         </ventBox1>
-
       </div>
     </div>
   </a-spin>
@@ -73,7 +82,8 @@ import { onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps } fro
 import { list } from '../beltTun.api';
 import ventBox1 from '/@/components/vent/ventBox1.vue'
 import { SvgIcon } from '/@/components/Icon';
-import { dustFanParam, coalMachineDustParam, dustMonitor, dustFanSetting } from '../beltTun.data'
+import { dustColumns, dustMonitorColumns  } from '../beltTun.data'
+import LivePlayer from '@liveqing/liveplayer-v3';
 
 const props = defineProps({
   deviceId: {
@@ -81,22 +91,26 @@ const props = defineProps({
     require: true
   }
 })
-
+const player1 = ref(null)
 const loading = ref(false)
+const flvURL1 = () => {
+  return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
+};
 
 // 默认初始是第一行
 const openDust = ref(false)
-const workFaceSource = ref({});
-const workFaceHistorySource = ref([])
-const gateDataSource = ref([]);
-const windowDataSource = ref([]);
-const windDataSource = ref([]);
-const temperatureDataSource = ref([]);
-const fireDataSource = ref([]);
+const beltTunSource = ref({});
+const beltTunHistorySource = ref([])
+const dustDataSource = ref([]);
 
 // 监测数据
 const selectData = reactive({});
 
+
+function handleDust(record) {
+  //
+}
+
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
 function getMonitor(flag?) {
@@ -116,54 +130,23 @@ function getMonitor(flag?) {
 };
 
 async function getDataSource(systemID) {
-  const res = await list({ devicetype: 'sys', systemID });
-  const result = res.msgTxt;
-  result.forEach(item => {
+  const res = await list({ devicetype: 'sys', systemID, type: 'dustS' });
+  const result = res.deviceInfo;
+  for (const key in result) {
+    const item = result[key]
     // ''.startsWith
-    if (item.type.startsWith('gate')) {
+    if (item.type.startsWith('dust')) {
       // 风门
-      gateDataSource.value = item['datalist'].filter((data: any) => {
+      dustDataSource.value = item['datalist'].filter((data: any) => {
         const readData = data.readData;
         return Object.assign(data, readData);
       })
 
     }
-    if (item.type.startsWith('window')) {
-      // 风窗
-      windowDataSource.value = item['datalist'].filter((data: any) => {
-        const readData = data.readData;
-        return Object.assign(data, readData);
-      })
-    }
-    if (item.type.startsWith('windrect')) {
-      // 测风
-      windDataSource.value = item['datalist'].filter((data: any) => {
-        const readData = data.readData;
-        return Object.assign(data, readData);
-      })
-    }
-    if (item.type === 'modelsensor_temperature') {
-      // 温度
-      temperatureDataSource.value = item['datalist'].filter((data: any) => {
-        const readData = data.readData;
-        return Object.assign(data, readData);
-      })
-    }
-    if (item.type === 'modelsensor_fire') {
-      // 火焰
-      fireDataSource.value = item['datalist'].filter((data: any) => {
-        const readData = data.readData;
-        return Object.assign(data, readData);
-      })
-    }
-    if (item.type === 'sys') {
-      workFaceSource.value = Object.assign(item['datalist'][0], item['datalist'][0].readData);
-    }
-    if (item.type === 'surface_history') {
-      workFaceHistorySource.value = item['datalist'][0]
-    }
-    loading.value = false;
-  })
+  }
+  loading.value = false;
+  beltTunHistorySource.value = res['sysInfo']['history']
+  beltTunSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
 }
 
 function toDetail() {
@@ -195,10 +178,76 @@ onUnmounted(() => {
 @import '../../comment/less/workFace.less';
 @ventSpace: zxm;
 
+.base-info{
+  display: flex;
+  justify-content: space-between;
+  color: #fff;
+  padding: 0 5px;
+  margin-top: 20px;
+  .base-item{
+    width: calc(50% - 8px);
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    font-size: 17px;
+    border: 1px solid ;
+    border-image: linear-gradient(45deg, #00e5ff92, #006fa684, #00e5ff22, #006fa614) 1;
+    .title{
+      width: 100%;
+      background: #00e5ff52;
+      background: linear-gradient(45deg, #006ea652, #00f2ff42);
+      text-align: center;
+      line-height: 45px;
+    }
+    .value{
+      width: 100%;
+      background: #006EA622;
+      text-align: center;
+      line-height: 45px;
+      font-family: 'douyuFont';
+      color: #1bf5fd;
+      padding-top: 5px;
+    }
+  }
+}
+
 .dust-fan-monitor {
   display: flex;
   flex-wrap: wrap;
 }
+.dust-max{
+    flex: 1;
+    display: flex;
+    align-items: center;
+    background-image: linear-gradient( to right, #00f2ff42, #006ea600);
+    border-left: 4px solid #5df7ff88;
+    margin-top: 10px;
+    margin-left: 8px;
+  .icon-style{
+    background: #25536f;
+    padding-left: 6px;
+    margin-right: 10px;
+    padding-right: 6px;
+  }
+  .value{
+    font-family: 'douyuFont';
+    font-weight: 600;
+    font-size: 14px;
+    color: #28DCE4;
+    margin-right: 10px;
+    margin-left: 30px;
+  }
+  .max-data{
+    width: calc(100% - 85px);
+    display: flex;
+    margin-left: 5px;
+    margin-right: 30px;
+    .title{
+      font-size: 16px;
+    }
+    
+  }
+}
 
 .dust-fan-monitor-item {
   width: 152px;

+ 11 - 46
src/views/vent/monitorManager/beltTunMonitor/components/beltTunFireHome.vue

@@ -3,7 +3,7 @@
     <div class="monitor-container">
       <div class="lr left-box vent-margin-t-10">
         <div class="monitor-info item-box">
-          <div class="fire-analysis ">
+          <div class="fire-analysis1 ">
             <div class="analysis-item warning3">
               <div class="title">火灾风险预警</div>
               <div class="value">高风险</div>
@@ -219,8 +219,8 @@ const props = defineProps({
 const loading = ref(false)
 
 // 默认初始是第一行
-const workFaceSource = ref({});
-const workFaceHistorySource = ref([])
+const beltTunSource = ref({});
+const beltTunHistorySource = ref([])
 const sprayDataSource = ref([]);
 const pulpingDataSource = ref([]);
 
@@ -246,9 +246,10 @@ function getMonitor(flag?) {
 };
 
 async function getDataSource(systemID) {
-  const res = await list({ devicetype: 'sys', systemID });
-  const result = res.msgTxt;
-  result.forEach(item => {
+  const res = await list({ devicetype: 'sys', systemID, type: 'fireS' });
+  const result = res.deviceInfo;
+  for (const key in result) {
+    const item = result[key]
     if (item.type.startsWith('spray_auto')) {
       // 喷淋
       sprayDataSource.value = item['datalist'].filter((data: any) => {
@@ -260,14 +261,10 @@ async function getDataSource(systemID) {
       // 注浆
       pulpingDataSource.value = Object.assign(item['datalist'][0], item['datalist'][0]['readData'])
     }
-    if (item.type === 'sys') {
-      workFaceSource.value = Object.assign(item['datalist'][0], item['datalist'][0].readData);
-    }
-    if (item.type === 'surface_history') {
-      workFaceHistorySource.value = item['datalist'][0]
-    }
-    loading.value = false;
-  })
+  }
+  loading.value = false;
+  beltTunHistorySource.value = res['sysInfo']['history']
+  beltTunSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
 }
 
 function toDetail() {
@@ -307,36 +304,4 @@ onUnmounted(() => {
 @import '/@/design/vent/modal.less';
 @import '../../comment/less/workFace.less';
 
-.fire-analysis {
-  display: flex;
-  justify-content: center;
-  .analysis-item {
-    width: 321px;
-    height: 104px;
-    text-align: center;
-    background: url('/@/assets/images/vent/alarm/1.png');
-    color: #ffffffdd;
-    margin: 0 4px;
-
-    .title {
-      margin-top: 46px;
-    }
-
-    .value {
-      margin-top: 7px;
-    }
-  }
-
-  .warning1 {
-    background: url('/@/assets/images/vent/alarm/21.png');
-  }
-
-  .warning2 {
-    background: url('/@/assets/images/vent/alarm/31.png');
-  }
-
-  .warning3 {
-    background: url('/@/assets/images/vent/alarm/41.png');
-  }
-}
 </style>

+ 147 - 21
src/views/vent/monitorManager/beltTunMonitor/components/beltTunHome.vue

@@ -8,7 +8,7 @@
           </template>
           <template #container>
             <div class="vent-param">
-              <div class="light-group">
+              <div class="light-group1">
                 <div class="param-item">
                   <div class="param">
                     <div class="param-icon">
@@ -36,10 +36,10 @@
                 </div>
               </div>
             </div>
-            <div class="item-container">
+            <!-- <div class="item-container">
               <BarAndLineCustom xAxisPropType="time" :chartData="beltTunHistorySource" height="170px"
-                :propTypeArr="['m3', 'va']" :option="echartsOption" />
-            </div>
+                :propTypeArr="['jin', 'hui']" :option="echartsOption" />
+            </div> -->
           </template>
         </ventBox1>
         <ventBox1 class="vent-margin-t-10"> 
@@ -49,25 +49,25 @@
           <template #container>
             <div class="warning-monitor">
               <div class="warning-item">
-                <div class="title">通风</div>
+                <div class="title" :class="{ 'active-title': warningType == 'ventS' }" @click="showWarningList('ventS')">通风</div>
                 <div class="state-box">
                   <span class="signal-round signal-round-blue"></span><span class="state vent-margin-l-8">正常</span>
                 </div>
               </div>
               <div class="warning-item">
-                <div class="title">火灾</div>
+                <div class="title" :class="{ 'active-title': warningType == 'fireS' }" @click="showWarningList('fireS')">火灾</div>
                 <div class="state-box">
                   <span class="signal-round signal-round-blue"></span><span class="state vent-margin-l-8">正常</span>
                 </div>
               </div>
               <div class="warning-item">
-                <div class="title">粉尘</div>
+                <div class="title" :class="{ 'active-title': warningType == 'dustS' }" @click="showWarningList('dustS')">粉尘</div>
                 <div class="state-box">
                   <span class="signal-round signal-round-blue"></span><span class="state vent-margin-l-8">正常</span>
                 </div>
               </div>
               <div class="warning-item">
-                <div class="title">瓦斯</div>
+                <div class="title" :class="{ 'active-title': warningType == 'gasS' }" @click="showWarningList('gasS')">瓦斯</div>
                 <div class="state-box">
                   <span class="signal-round signal-round-blue"></span><span class="state vent-margin-l-8">正常</span>
                 </div>
@@ -167,7 +167,7 @@
 
 <script setup lang="ts">
 
-import { onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps } from 'vue';
+import { onBeforeMount, nextTick, ref, onMounted, onUnmounted, reactive, defineProps } from 'vue';
 import { list } from '../beltTun.api';
 import ventBox1 from '/@/components/vent/ventBox1.vue'
 import { ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
@@ -190,10 +190,24 @@ const beltTunHistorySource = ref([])
 const gateDataSource = ref([]);
 const windowDataSource = ref([]);
 const windDataSource = ref([]);
-
+const warnInfo = reactive({
+  dustS: { warningList: [], dataList: [] },
+  fireS: { warningList: [], dataList: [] },
+  synthesizeS: { warningList: [], dataList: [] },
+  ventS: { warningList: [], dataList: [] },
+})
+const warningType = ref('ventS')
 // 监测数据
 const selectData = reactive({});
 
+function showWarningList(type) {
+  warningType.value = ''
+  nextTick(() => {
+    warningType.value = type
+    warningConfig.data = warnInfo[type]['dataList']
+  })
+}
+
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
 function getMonitor(flag?) {
@@ -213,9 +227,10 @@ function getMonitor(flag?) {
 };
 
 async function getDataSource(systemID) {
-  const res = await list({ devicetype: 'sys', systemID });
-  const result = res.msgTxt;
-  result.forEach(item => {
+  const res = await list({ devicetype: 'sys', systemID, type: 'all' });
+  const result = res.deviceInfo;
+  for (const key in result) {
+    const item = result[key]
     // ''.startsWith
     if (item.type.startsWith('gate')) {
       // 风门
@@ -238,16 +253,24 @@ async function getDataSource(systemID) {
         return Object.assign(data, readData);
       })
     }
-    else if (item.type === 'sys') {
-      beltTunSource.value = Object.assign(item['datalist'][0], item['datalist'][0].readData);
-    }
 
-    else if (item.type === 'surface_history') {
-      beltTunHistorySource.value = item['datalist'][0]
-    }
+  }
+  loading.value = false;
+  beltTunHistorySource.value = res['sysInfo']['history']
+  beltTunSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
+  warnInfo.dustS = { warningList: res['warnInfo']['dustS']['devices'] || [], dataList: initWarningData(res['warnInfo']['dustS']['devices']) }
+  warnInfo.fireS = { warningList: res['warnInfo']['fireS']['devices'] || [], dataList: initWarningData(res['warnInfo']['fireS']['devices']) }
+  warnInfo.synthesizeS = { warningList: res['warnInfo']['synthesizeS']['devices'] || [], dataList: initWarningData(res['warnInfo']['synthesizeS']['devices']) }
+  warnInfo.ventS = { warningList: res['warnInfo']['ventS']['devices'] || [], dataList: initWarningData(res['warnInfo']['ventS']['devices']) }
+}
 
-    loading.value = false;
-  })
+function initWarningData(devices: any[]) {
+  const dataArr = <any[]>[]
+  for (let i = 0; i < devices.length; i++) {
+    const item = devices[i]
+    dataArr.push([item['typeName'], item['warnLevel_str'], item['warnTime']])
+  }
+  return dataArr
 }
 
 /** 智能决策控制 */
@@ -321,5 +344,108 @@ onUnmounted(() => {
       }
     }
   }
+  .light-group1{
+    display: flex;
+    justify-content: space-between;
+    padding: 0 10px;
+    .param-item {
+      width: 150px;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: center;
+      position: reactive;
+      
+      .icon {
+        display: block;
+        position: absolute;
+        top: -5px;
+      }
+
+      .param {
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+
+        .param-icon {
+          width: 121px;
+          height: 69px;
+          background: url('/@/assets/images/vent/vent-param-bg.png');
+          display: flex;
+          flex-direction: column;
+          justify-content: center;
+          align-items: center;
+          position: relative;
+          top: -20px;
+          margin-top: 10px;
+
+          .param-title {
+            position: relative;
+            top: -4px;
+          }
+
+          .param-unit {
+            position: relative;
+            top: -2px;
+            font-size: 12px;
+          }
+        }
+
+        .param-val-box {
+          display: flex;
+          flex-direction: column;
+          justify-content: center;
+          align-items: center;
+          position: relative;
+          top: -20px;
+
+          .param-val-icon {
+            width: 2px;
+            height: 15px;
+            background: #00d8ff;
+            position: relative;
+
+            &::after {
+              content: '';
+              display: block;
+              position: absolute;
+              width: 6px;
+              height: 6px;
+              border-radius: 3px;
+              background: #00d8ff;
+              bottom: -2px;
+              left: -2px;
+            }
+
+          }
+
+          .param-val {
+            position: relative;
+            font-family: 'douyuFont';
+            // color: #20dbfd;
+            text-shadow: 0 0 25px #00d8ff;
+            font-size: 13px;
+            border: 1px solid #40B7F3;
+            padding: 5px 30px 2px 30px;
+            top: 2px;
+
+            &::after {
+              width: calc(100% - 4px);
+              height: calc(100% - 4px);
+              content: '';
+              position: absolute;
+              top: 2px;
+              left: 2px;
+              display: block;
+              border: 1px solid #006EA6;
+            }
+          }
+        }
+
+      }
+    }
+  }
+  
   
 </style>

+ 32 - 32
src/views/vent/monitorManager/beltTunMonitor/components/beltTunVentHome.vue

@@ -39,7 +39,25 @@
         </ventBox1>
       </div>
       <div class="lr right-box">
-        
+        <ventBox1 class="vent-margin-t-10">
+          <template #title>
+            <div>测风监测与控制</div>
+          </template>
+          <template #container>
+            <a-table :columns="windColumns" :data-source="windDataSource" :pagination="false" size="small"
+              maxWidth="340" :scroll="{ x: 'max-content', y: 140 }">
+              <template #bodyCell="{ column, record }">
+                <template v-if="column.dataIndex === 'frontGateOpen'">
+                  <span v-if="record['frontGateOpen'] == 0" >关闭</span>
+                  <span v-else style="color: #00ff00;"> 打开 </span>
+                </template>
+                <template v-if="column.dataIndex === 'action'">
+                  <a class="action-link" @click="toDetail">详情</a>
+                </template>
+              </template>
+            </a-table>
+          </template>
+        </ventBox1>
       </div>
     </div>
   </a-spin>
@@ -50,7 +68,7 @@
 import { onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps } from 'vue';
 import { list } from '../beltTun.api';
 import ventBox1 from '/@/components/vent/ventBox1.vue'
-import { gateColumns, windowColumns, } from '../beltTun.data'
+import { gateColumns, windowColumns, windColumns } from '../beltTun.data'
 
 const props = defineProps({
   deviceId: {
@@ -67,15 +85,13 @@ const beltTunHistorySource = ref([])
 const gateDataSource = ref([]);
 const windowDataSource = ref([]);
 const windDataSource = ref([]);
-const temperatureDataSource = ref([]);
-const fireDataSource = ref([]);
 
 // 监测数据
 const selectData = reactive({});
 
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
-function getMonitor() {
+function getMonitor(flag?) {
   if (Object.prototype.toString.call(timer) === '[object Null]') {
     timer = setTimeout(async () => {
       if (props.deviceId) {
@@ -87,14 +103,15 @@ function getMonitor() {
       }
       await getMonitor();
       loading.value = false
-    }, 1000);
+    }, flag ? 0 : 1000);
   }
 };
 
 async function getDataSource(systemID) {
-  const res = await list({ devicetype: 'sys', systemID });
-  const result = res.msgTxt;
-  result.forEach(item => {
+  const res = await list({ devicetype: 'sys', systemID, type: 'ventS' });
+  const result = res.deviceInfo;
+  for (const key in result) {
+    const item = result[key]
     // ''.startsWith
     if (item.type.startsWith('gate')) {
       // 风门
@@ -118,28 +135,11 @@ async function getDataSource(systemID) {
         return Object.assign(data, readData);
       })
     }
-    if (item.type === 'modelsensor_temperature') {
-      // 温度
-      temperatureDataSource.value = item['datalist'].filter((data: any) => {
-        const readData = data.readData;
-        return Object.assign(data, readData);
-      })
-    }
-    if (item.type === 'modelsensor_fire') {
-      // 火焰
-      fireDataSource.value = item['datalist'].filter((data: any) => {
-        const readData = data.readData;
-        return Object.assign(data, readData);
-      })
-    }
-    if (item.type === 'sys') {
-      beltTunSource.value = Object.assign(item['datalist'][0], item['datalist'][0].readData);
-    }
-    if (item.type === 'surface_history') {
-      beltTunHistorySource.value = item['datalist'][0]
-    }
-    loading.value = false;
-  })
+    
+  }
+  loading.value = false;
+  beltTunHistorySource.value = res['sysInfo']['history']
+  beltTunSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
 }
 
 function toDetail() {
@@ -153,7 +153,7 @@ onBeforeMount(() => {
 onMounted(async () => {
   loading.value = true;
   timer = null
-  await getMonitor()
+  await getMonitor(true)
 });
 onUnmounted(() => {
   if (timer) {

+ 7 - 18
src/views/vent/monitorManager/beltTunMonitor/index.vue

@@ -14,7 +14,7 @@
     <div id="beltTun3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
   </div>
   <div class="scene-box">
-    <customHeader :fieldNames="{ label: 'strinstallpos', value: 'deviceID', options: 'children' }" :options = 'options' @change="getSelectRow" :optionValue="optionValue">皮带巷智能管控</customHeader>
+    <customHeader :fieldNames="{ label: 'systemname', value: 'id', options: 'children' }" :options = 'options' @change="getSelectRow" :optionValue="optionValue">皮带巷智能管控</customHeader>
     <div class="center-container">
       <template v-if="activeKey == 'monitor'">
         <div class="monitor-nav">
@@ -47,7 +47,7 @@
 <script setup lang="ts">
 import { onBeforeMount, ref, onMounted, onUnmounted, reactive, toRaw } from 'vue';
 import { mountedThree, destroy, setModelType, refreshModal } from './beltTun.threejs';
-import { list, getTableList } from './beltTun.api';
+import { list, systemList, getTableList } from './beltTun.api';
 import { monitorNav } from './beltTun.data'
 import customHeader from '/@/views/vent/comment/components/customHeader.vue';
 import BottomMenu from '/@/views/vent/comment/components/bottomMenu.vue';
@@ -110,7 +110,7 @@ function deviceChange(index) {
 
 // 查询关联设备列表
 async function getDeviceList() {
-  const res = await list({ devicetype: 'sys', systemID: optionValue.value });
+  const res = await systemList({ devicetype: 'sys', systemID: optionValue.value });
   const result = res.msgTxt;
   const deviceArr = <DeviceType[]>[]
   result.forEach(item => {
@@ -128,26 +128,15 @@ async function getDeviceList() {
 };
 
 async function getSysDataSource() {
-  const res = await list({ devicetype: 'sys_maintunnel_leather', pagetype: 'normal' });
-  dataSource.value = res.msgTxt[0].datalist || [];
-  dataSource.value.forEach((data: any) => {
-    const readData = data.readData;
-    data = Object.assign(data, readData);
-  });
-
+  const res = await getTableList({ strtype: 'sys_maintunnel_leather', pagetype: 'normal' });
   if (!options.value) {
     // 初始时选择第一条数据
-    options.value = dataSource.value
+    options.value = res.records || [];
     if (!optionValue.value) {
-      optionValue.value = dataSource.value[0]['deviceID']
-      Object.assign(selectData, dataSource.value[0])
-    } else {
-      const currentData = dataSource.value.find(item => item['deviceID'] === optionValue.value) || {}
-      Object.assign(selectData, currentData)
+      optionValue.value = options.value[0]['id']
+      getDeviceList()
     }
   }
-  const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
-  return data;
 };
 
 // 切换检测数据

+ 4 - 4
src/views/vent/monitorManager/chamberMonitor/components/chamberHome.vue

@@ -260,7 +260,7 @@ const flvURL1 = () => {
 
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
-function getMonitor() {
+function getMonitor(flag?) {
   if (Object.prototype.toString.call(timer) === '[object Null]') {
     timer = setTimeout(async () => {
       if (props.deviceId) {
@@ -272,7 +272,7 @@ function getMonitor() {
       }
       await getMonitor();
       loading.value = false
-    }, 1000);
+    }, flag? 0 : 1000);
   }
 };
 
@@ -347,7 +347,7 @@ onMounted(() => {
     await setModelType('chamberBase');
     loading.value = false;
     timer = null
-    await getMonitor()
+    await getMonitor(true)
   });
 });
 
@@ -389,7 +389,7 @@ onUnmounted(() => {
       top: -20px;
     }
     span{
-      left: 20px;
+      left: 24px;
     }
   }
   .item-group{

+ 1 - 1
src/views/vent/monitorManager/comment/AlarmHistoryTable.vue

@@ -131,7 +131,7 @@
         pageSizeOptions: ['5', '10', '20'],
       },
       beforeFetch(params) {
-        params.gdevicetype = props.deviceType + '*';
+        params.devicetype = props.deviceType + '*';
         if (props.sysId) {
           params.sysId = props.sysId;
         }

+ 10 - 35
src/views/vent/monitorManager/comment/GroupMonitorTable.vue

@@ -52,7 +52,7 @@
   const tableScroll = props.scroll.y ? ref({ y: props.scroll.y }) : ref({})
 
   // 默认初始是第一行
-  const selectRowIndex = ref(0);
+  const selectRowIndex = ref(-1);
 
   const setSelectedRowKeys = (target) => {
     console.log(target, Object.prototype.toString.call(target));
@@ -72,7 +72,7 @@
     const isCheckColumn = {
       title: '',
       dataIndex: 'isCheck',
-      width: 60,
+      width: 120,
       align: 'center',
       customCell: (_, index) => {
         if (index % 2 == 0) {
@@ -136,41 +136,12 @@
         resultData2['runDevice'] = '备机';
 
         list.push(resultData1, resultData2);
-
-        // const emptyData = new Object();
-        // for (const key in data) {
-        //   if (
-        //     Object.prototype.hasOwnProperty.call(data, key) &&
-        //     key !== 'deviceID' &&
-        //     key !== 'Fan1StartStatus' &&
-        //     key !== 'Fan2StartStatus' &&
-        //     key !== 'strinstallpos' &&
-        //     key !== 'readTime'
-        //   ) {
-        //     emptyData[key] = '-';
-        //   } else {
-        //     emptyData[key] = data[key];
-        //   }
-        // }
-        // if (data.Fan1StartStatus == 1) {
-        //   // 主风机启动
-        //   data['runDevice'] = '主机';
-        //   emptyData['runDevice'] = '备机';
-        //   list.push(data, emptyData);
-        // } else if (data.Fan2StartStatus == 1) {
-        //   // 备风机启动
-        //   data['runDevice'] = '备机';
-        //   emptyData['runDevice'] = '主机';
-        //   list.push(emptyData, data);
-        // } else {
-        //   list.push({ ...emptyData, runDevice: '主机' }, { ...emptyData, runDevice: '备机' });
-        // }
       });
 
-      if (oldVal.length < 1) {
-        // 第一次
-        setSelectedRowKeys(list[0]['deviceID']);
-      }
+      // if (oldVal.length < 1 && selectRowIndex.value == -1) {
+      //   // 第一次
+      //   setSelectedRowKeys(list[0]['deviceID']);
+      // }
 
       dataTableSource.value = list;
       loading.value = false;
@@ -192,6 +163,10 @@
   });
 
   onUnmounted(() => {});
+
+  defineExpose({
+    setSelectedRowKeys,
+  });
 </script>
 
 <style scoped lang="less">

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

@@ -62,6 +62,7 @@
     },
     (newVal) => {
       if (!newVal) return
+      if(historyTable.value) getForm().resetFields()
       const column = getTableHeaderColumns(newVal + '_history')
       if (column && column.length < 1) {
         const arr = newVal.split('_')
@@ -199,7 +200,7 @@
     },
   });
   //注册table数据
-  const [registerTable, { getDataSource, reload, setLoading }] = tableContext;
+  const [registerTable, { getDataSource, reload, setLoading, getForm }] = tableContext;
 
   watchEffect(() => {
     if (historyTable.value && getDataSource) {

+ 6 - 4
src/views/vent/monitorManager/comment/MonitorTable.vue

@@ -91,7 +91,7 @@
     (newVal, oldVal) => {
       if (oldVal && newVal && oldVal.length < 1 && newVal.length > 0) {
         // 第一次
-        setSelectedRowKeys([newVal[0].deviceID]);
+        if(getSelectRowKeys().length < 1) setSelectedRowKeys([newVal[0].deviceID]);
       }
       const list = <any[]>[];
       newVal.forEach((item) => {
@@ -166,7 +166,7 @@
         pageSizeOptions: ['5', '10', '20'],
       } : false,
       beforeFetch: (params) => {
-        return Object.assign({ column: 'createTime', order: 'desc' }, params);
+        return Object.assign(params, { column: 'createTime' });
       },
     },
   });
@@ -176,7 +176,8 @@
   
   watch(
     selectedRowKeys,
-    (oldKeys, newKeys) => {
+    (newKeys) => {
+      console.log('设置的选中id---------->', newKeys, dataTableSource.value)
       const index = findIndex(dataTableSource.value, (data: any) => {
         return data.deviceID == selectedRowKeys.value[0];
       });
@@ -189,7 +190,8 @@
     doRequest,
     setSelectedRowKeys,
     getSelectRowKeys,
-    setLoading
+    setLoading,
+    reload
   });
 
   onMounted(() => {

+ 41 - 0
src/views/vent/monitorManager/comment/less/workFace.less

@@ -40,6 +40,13 @@
       flex-direction: column;
       justify-content: center;
       align-items: center;
+      .title {
+        cursor: pointer;
+      }
+    
+      .active-title {
+        color: aqua;
+      }
     }
 
     .state-box {
@@ -624,6 +631,40 @@
   cursor: pointer;
 }
 
+.fire-analysis1 {
+  display: flex;
+  justify-content: center;
+
+  .analysis-item {
+    width: 321px;
+    height: 104px;
+    text-align: center;
+    background: url('/@/assets/images/vent/alarm/1.png');
+    color: #ffffffdd;
+    margin: 0 4px;
+
+    .title {
+      margin-top: 46px;
+    }
+
+    .value {
+      margin-top: 7px;
+    }
+  }
+
+  .warning1 {
+    background: url('/@/assets/images/vent/alarm/21.png');
+  }
+
+  .warning2 {
+    background: url('/@/assets/images/vent/alarm/31.png');
+  }
+
+  .warning3 {
+    background: url('/@/assets/images/vent/alarm/41.png');
+  }
+}
+
 :deep(.@{ventSpace}-tabs-tabpane-active) {
   overflow: auto;
 }

+ 3 - 3
src/views/vent/monitorManager/compressor/components/nitrogenEcharts.vue

@@ -159,7 +159,7 @@
     // https获取监测数据
     let timer: null | NodeJS.Timeout = null;
     let count = 0
-    async function getMonitor() {
+    async function getMonitor(flag?) {
       if (Object.prototype.toString.call(timer) === '[object Null]') {
         timer = await setTimeout(async () => {
           await getDataSource();
@@ -167,7 +167,7 @@
             timer = null;
           }
           await getMonitor();
-        }, 1000);
+        }, flag ? 0 : 1000);
       }
     };
 
@@ -195,7 +195,7 @@
     };
 
     onMounted(() => {
-      getMonitor()
+      getMonitor(true)
     })
 
     onUnmounted(() => {

+ 3 - 3
src/views/vent/monitorManager/compressor/components/nitrogenHome.vue

@@ -222,7 +222,7 @@ const monitorData = ref(new Array(3).fill({
 
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
-async function getMonitor() {
+async function getMonitor(flag?) {
   if (Object.prototype.toString.call(timer) === '[object Null]') {
     timer = await setTimeout(async () => {
       await getDataSource();
@@ -230,7 +230,7 @@ async function getMonitor() {
         timer = null;
       }
       await getMonitor();
-    }, 1000);
+    }, flag ? 0 : 1000);
   }
 };
 
@@ -271,7 +271,7 @@ watch(monitorDataGroupNum, (newVal) => {
   }
 })
 onMounted(async () => {
-  await getMonitor()
+  await getMonitor(true)
 })
 
 onUnmounted(() => {

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

@@ -48,127 +48,128 @@
     </div>
     
       <div class="bottom-tabs-box" @mousedown="setDivHeight($event, 230, scroll)" id="monitorBox">
-        <dv-border-box8 :dur="5"  :style="`padding: 5px; height: ${scroll.y + 100}px`" >
-
-        <div class="to-small" @click="toHome"></div>
-        <div class="device-button-group" v-if="deviceList.length > 0">
-          <div class="device-button" :class="{ 'device-active': deviceActive == device.deviceType }"
-            v-for="(device, index) in deviceList" :key="index" @click="monitorChange(index)">{{ device.deviceName }}</div>
-          <div class="enter-detail" @click="goDetail()">
-            <send-outlined />
-            {{ treeNodeTitle }}详情
+        <!-- <dv-border-box8 :dur="5"  :style="`padding: 5px; height: ${scroll.y + 100}px`" > -->
+        <div :style="`padding: 5px; height: ${scroll.y + 100}px`">
+          <div class="to-small" @click="toHome"></div>
+          <div class="device-button-group" v-if="deviceList.length > 0">
+            <div class="device-button" :class="{ 'device-active': deviceActive == device.deviceType }"
+              v-for="(device, index) in deviceList" :key="index" @click="monitorChange(index)">{{ device.deviceName }}</div>
+            <div class="enter-detail" @click="goDetail()">
+              <send-outlined />
+              {{ treeNodeTitle }}详情
+            </div>
           </div>
-        </div>
 
-        <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange" id="tabsBox" v-if="isRefresh">
-          <a-tab-pane key="1" tab="实时监测">
-            <template v-if="deviceType == 'fan' && activeKey == '1'">
-              <GroupMonitorTable :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" />
-            </template>
-            <template v-else-if="activeKey == '1'">
-              <MonitorTable ref="monitorTable" :columnsType="`${deviceType}_monitor`" :dataSource="dataSource"
-                design-scope="device_monitor" :isShowPagination="false" :isShowActionColumn="true" title="设备监测"
-                :scroll="scroll">
-                <template #action="{ record }">
-                  <TableAction :actions="[
-                    {
-                      label: '详情',
-                      onClick: goDetail.bind(null, record),
-                    },
-                    {
-                      label: '定位',
-                      onClick: goLocation.bind(null, record),
-                    },
-                  ]" />
-                </template>
-                <template #filterCell="{ column, record }">
-                  <template v-if="deviceType.startsWith('gate')">
-                    <template v-if="record.frontGateOpenCtrl">
-                      <a-tag
-                        v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
-                        color="red">正在打开</a-tag>
-                      <a-tag v-else-if="column.dataIndex === 'frontGateOpen'" color="processing">打开</a-tag>
-                    </template>
-                    <template v-else>
-                      <a-tag
-                        v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
-                        color="red">正在关闭</a-tag>
-                      <a-tag
-                        v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1"
-                        color="default">关闭</a-tag>
-                      <a-tag
-                        v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0"
-                        color="default">打开</a-tag>
-                    </template>
-                    <template v-if="record.rearGateOpenCtrl">
-                      <a-tag
-                        v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
-                        color="red">正在打开</a-tag>
-                      <a-tag v-else-if="column.dataIndex === 'rearGateOpen'" color="processing">打开</a-tag>
-                    </template>
-                    <template v-else>
-                      <a-tag
-                        v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
-                        color="red">正在关闭</a-tag>
-                      <a-tag
-                        v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1"
-                        color="default">关闭</a-tag>
-                      <a-tag
-                        v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0"
-                        color="default">打开</a-tag>
-                    </template>
+          <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange" id="tabsBox" v-if="isRefresh">
+            <a-tab-pane key="1" tab="实时监测">
+              <template v-if="deviceType == 'fan' && activeKey == '1'">
+                <GroupMonitorTable :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" />
+              </template>
+              <template v-else-if="activeKey == '1'">
+                <MonitorTable ref="monitorTable" :columnsType="`${deviceType}_monitor`" :dataSource="dataSource"
+                  design-scope="device_monitor" :isShowPagination="false" :isShowActionColumn="true" title="设备监测"
+                  :scroll="scroll">
+                  <template #action="{ record }">
+                    <TableAction :actions="[
+                      {
+                        label: '详情',
+                        onClick: goDetail.bind(null, record),
+                      },
+                      {
+                        label: '定位',
+                        onClick: goLocation.bind(null, record),
+                      },
+                    ]" />
                   </template>
-                  <template v-if="deviceType.startsWith('windrect')">
-                    <a-tag v-if="column.dataIndex === 'sign'"
-                      :color="record.sign == 0 ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'"> {{
-                        record.sign == 0 ? '高位' : record.sign == 1 ? '中位' : '低位'
-                      }}</a-tag>
-                    <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
-                      <a-tag v-if="record.isRun == -2 || record.isRun == -1"
-                        :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
-                          record.isRun == -2 ? '空闲' : '等待'
+                  <template #filterCell="{ column, record }">
+                    <template v-if="deviceType.startsWith('gate')">
+                      <template v-if="record.frontGateOpenCtrl">
+                        <a-tag
+                          v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
+                          color="red">正在打开</a-tag>
+                        <a-tag v-else-if="column.dataIndex === 'frontGateOpen'" color="processing">打开</a-tag>
+                      </template>
+                      <template v-else>
+                        <a-tag
+                          v-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 0"
+                          color="red">正在关闭</a-tag>
+                        <a-tag
+                          v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 0 && record.frontGateClose == 1"
+                          color="default">关闭</a-tag>
+                        <a-tag
+                          v-else-if="column.dataIndex === 'frontGateOpen' && record.frontGateOpen == 1 && record.frontGateClose == 0"
+                          color="default">打开</a-tag>
+                      </template>
+                      <template v-if="record.rearGateOpenCtrl">
+                        <a-tag
+                          v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
+                          color="red">正在打开</a-tag>
+                        <a-tag v-else-if="column.dataIndex === 'rearGateOpen'" color="processing">打开</a-tag>
+                      </template>
+                      <template v-else>
+                        <a-tag
+                          v-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 0"
+                          color="red">正在关闭</a-tag>
+                        <a-tag
+                          v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 0 && record.rearGateClose == 1"
+                          color="default">关闭</a-tag>
+                        <a-tag
+                          v-else-if="column.dataIndex === 'rearGateOpen' && record.rearGateOpen == 1 && record.rearGateClose == 0"
+                          color="default">打开</a-tag>
+                      </template>
+                    </template>
+                    <template v-if="deviceType.startsWith('windrect')">
+                      <a-tag v-if="column.dataIndex === 'sign'"
+                        :color="record.sign == 0 ? '#95CF65' : record.sign == 1 ? '#4590EA' : '#9876AA'"> {{
+                          record.sign == 0 ? '高位' : record.sign == 1 ? '中位' : '低位'
                         }}</a-tag>
-                      <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
-                      <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
+                      <template v-if="record && column && column.dataIndex === 'isRun' && record.isRun">
+                        <a-tag v-if="record.isRun == -2 || record.isRun == -1"
+                          :color="record.isRun == -2 ? '#95CF65' : '#ED5700'">{{
+                            record.isRun == -2 ? '空闲' : '等待'
+                          }}</a-tag>
+                        <a-tag v-else-if="record.isRun == 100" color="#4693FF">完成</a-tag>
+                        <Progress v-else :percent="Number(record.isRun)" size="small" status="active" />
+                      </template>
                     </template>
-                  </template>
-                  <a-tag v-if="column.dataIndex === 'warnFlag'"
-                    :color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'"> {{
-                      record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测'
+                    <a-tag v-if="column.dataIndex === 'warnFlag'"
+                      :color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'"> {{
+                        record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测'
+                      }}</a-tag>
+                    <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == 0 ? 'default' : 'green'">{{
+                      record.netStatus == 0 ? '断开' : '连接'
                     }}</a-tag>
-                  <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == 0 ? 'default' : 'green'">{{
-                    record.netStatus == 0 ? '断开' : '连接'
-                  }}</a-tag>
-                </template>
-              </MonitorTable>
-            </template>
-          </a-tab-pane>
-          <a-tab-pane key="2" tab="历史数据">
-            <div class="tab-item">
-              <HistoryTable ref="historyTable" v-if="activeKey == '2'" :sysId="systemID"
-                :columns-type="`${deviceType}`" :device-type="deviceType"
-                :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })"
-                designScope="device-history" :scroll="scroll" />
-            </div>
-          </a-tab-pane>
-          <a-tab-pane key="3" tab="报警历史">
-            <div class="tab-item">
-              <AlarmHistoryTable ref="alarmHistoryTable" v-if="activeKey == '3'" :sysId="systemID"
-                columns-type="alarm" :device-type="deviceType"
-                :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })" :scroll="scroll"
-                designScope="alarm-history" />
-            </div>
-          </a-tab-pane>
-          <a-tab-pane key="4" tab="操作历史">
-            <div class="tab-item">
-              <HandlerHistoryTable ref="handlerHistoryTable" v-if="activeKey == '4'" :sysId="systemID"
-                columns-type="operatorhistory" :device-type="deviceType"
-                :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })" :scroll="scroll"
-                designScope="operator-history" />
-            </div>
-          </a-tab-pane>
-        </a-tabs>
-        </dv-border-box8>
+                  </template>
+                </MonitorTable>
+              </template>
+            </a-tab-pane>
+            <a-tab-pane key="2" tab="历史数据">
+              <div class="tab-item">
+                <HistoryTable ref="historyTable" v-if="activeKey == '2'" :sysId="systemID"
+                  :columns-type="`${deviceType}`" :device-type="deviceType"
+                  :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })"
+                  designScope="device-history" :scroll="scroll" />
+              </div>
+            </a-tab-pane>
+            <a-tab-pane key="3" tab="报警历史">
+              <div class="tab-item">
+                <AlarmHistoryTable ref="alarmHistoryTable" v-if="activeKey == '3'" :sysId="systemID"
+                  columns-type="alarm" :device-type="deviceType"
+                  :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })" :scroll="scroll"
+                  designScope="alarm-history" />
+              </div>
+            </a-tab-pane>
+            <a-tab-pane key="4" tab="操作历史">
+              <div class="tab-item">
+                <HandlerHistoryTable ref="handlerHistoryTable" v-if="activeKey == '4'" :sysId="systemID"
+                  columns-type="operatorhistory" :device-type="deviceType"
+                  :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })" :scroll="scroll"
+                  designScope="operator-history" />
+              </div>
+            </a-tab-pane>
+          </a-tabs>
+        <!-- </dv-border-box8> -->
+        </div>
       </div>
     
     <component v-if="modalVisible" :is="currentModal" v-model:visible="modalVisible" :dataSource="dataSource"
@@ -194,7 +195,7 @@ import { SvgIcon } from '/@/components/Icon';
 import { getActions } from '/@/qiankun/state';
 import { useRouter } from 'vue-router';
 import { setDivHeight } from '/@/utils/event';
-import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
+// import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
 
 
 type DeviceType = { deviceType: string, deviceName: string, datalist: any[] };
@@ -368,44 +369,42 @@ function goLocation(record) {
 function goDetail(record?) {
 
   if (record) {
-    if (deviceType.value.startsWith('fiber')) {
-      activeID.value = record.deviceID
+    activeID.value = record.deviceID
+    if (deviceType.value.startsWith('fiber')) {   
       currentModal.value = FiberModal
       modalVisible.value = true;
     } else if (deviceType.value.startsWith('dusting')) { //bundletube
-      activeID.value = record.deviceID
       currentModal.value = DustModal
       modalVisible.value = true;
     } else if (deviceType.value.startsWith('bundletube')) {
-      activeID.value = record.deviceID
       currentModal.value = BundleModal
       modalVisible.value = true;
     } else if (deviceType.value.indexOf("gate") != -1) {
-      const newPage = router.resolve({ path: '/monitorChannel/monitor-gate' })
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-gate', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
     } else if (deviceType.value.indexOf("window") != -1) {
-      const newPage = router.resolve({ path: '/monitorChannel/monitor-window' })
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-window', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
     } else if (deviceType.value.indexOf("windrect") != -1) {
-      const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect' })
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-windrect', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
     } else if (deviceType.value.indexOf("fanmain") != -1) {
-      const newPage = router.resolve({ path: '/monitorChannel/monitor-fan-main' })
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-fan-main', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
     } else if (deviceType.value.indexOf("fanlocal") != -1) {
-      const newPage = router.resolve({ path: '/monitorChannel/monitor-fan-local' })
+      const newPage = router.resolve({ path: '/monitorChannel/monitor-fan-local', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
     } else if (deviceType.value.indexOf("nitrogen") != -1) {
-      const newPage = router.resolve({ path: '/compressor-home' })
+      const newPage = router.resolve({ path: '/compressor-home', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
     } else if (deviceType.value.indexOf("pulping") != -1) {
-      const newPage = router.resolve({ path: '/grout-home' })
+      const newPage = router.resolve({ path: '/grout-home', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
     } else if (deviceType.value.indexOf("pressurefan") != -1) {
-      const newPage = router.resolve({ path: '/nitrogen/home' })
+      const newPage = router.resolve({ path: '/nitrogen/home', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
     } else if (deviceType.value.indexOf("chamber") != -1) {
-      const newPage = router.resolve({ path: '/chamber-home' })
+      const newPage = router.resolve({ path: '/chamber-home', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
     } else {
       message.info('待开发。。。')
@@ -414,6 +413,21 @@ function goDetail(record?) {
     if (systemType.value.indexOf("sys_dongshi") != -1) {
       const newPage = router.resolve({ path: '/chamber-home', query: { id: systemID.value } })
       window.open(newPage.href, '_blank')
+    }else if (systemType.value.indexOf("sys_obfurage") != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/obfurage-home', query: { id: systemID.value } })
+      window.open(newPage.href, '_blank')
+    } else if (systemType.value.indexOf("sys_surface_caimei") != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/wokerFace-home', query: { id: systemID.value } })
+      window.open(newPage.href, '_blank')
+    } else if (systemType.value.indexOf("sys_surface_juejin") != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/tunFace-home', query: { id: systemID.value } })
+      window.open(newPage.href, '_blank')
+    } else if (systemType.value.indexOf("sys_maintunnel_leather") != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/beltTun-home', query: { id: systemID.value } })
+      window.open(newPage.href, '_blank')
+    } else if (systemType.value.indexOf("sys_surface_junya") != -1) {
+      const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } })
+      window.open(newPage.href, '_blank')
     } else {
       message.info('待开发。。。')
     }

+ 2 - 2
src/views/vent/monitorManager/fanLocalMonitor/fanLocal.three.ts

@@ -137,7 +137,7 @@ export const addText = (selectData) => {
       y: 165,
     },
     {
-      text: `${selectData.frontRearDP}`,
+      text: `${selectData.windQuantity1}`,
       font: 'normal 30px Arial',
       color: '#009900',
       strokeStyle: '#002200',
@@ -153,7 +153,7 @@ export const addText = (selectData) => {
       y: 220,
     },
     {
-      text: ` ${selectData.sourcePressure}`,
+      text: ` ${selectData.windQuantity2}`,
       font: 'normal 30px Arial',
       color: '#009900',
       strokeStyle: '#002200',

+ 361 - 13
src/views/vent/monitorManager/fanLocalMonitor/index.vue

@@ -48,11 +48,131 @@
     <div class="title-text">
       {{ selectData.stationname }}
     </div>
-    <div class="bottom-tabs-box" @mousedown="setDivHeight($event, 240, scroll)">
-      <dv-border-box8 :dur="5"  :style="`padding: 5px; height: ${scroll.y + 100}px`" >
+    <div class="data-show-box">
+      <div class="data-item">
+        <div class="item-header">环境监测</div>
+        <div class="item-container">
+          <div class="tab">
+            <div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 0 }" @click="selectDevice('dataMonitorRowIndex', 0)"
+              >1#风机</div
+            >
+            <div class="tab-item" :class="{ 'tab-item-active-r': dataMonitorRowIndex == 1 }" @click="selectDevice('dataMonitorRowIndex', 1)"
+              >2#风机</div
+            >
+          </div>
+          <div class="container-group container-group-l">
+            <template v-if="deviceType">
+              <div class="container-item" v-for="(data, index) in getTableHeaderColumns(deviceType + '_monitor_left')" :key="index">
+                <div class="item-icon">
+                  <SvgIcon class="icon-style" size="18" name="temperature" />
+                </div>
+                <div class="item-name">{{ data.title }}</div>
+                <div v-if="data.dataIndex.startsWith('Fan')">
+                  <div class="item-value" v-if="dataMonitorRowIndex == 0">{{
+                    selectData[data.dataIndex.replace('Fan', 'Fan1')] ? selectData[data.dataIndex.replace('Fan', 'Fan1')] : '-'
+                  }}</div>
+                  <div class="item-value" v-if="dataMonitorRowIndex == 1">{{
+                    selectData[data.dataIndex.replace('Fan', 'Fan2')] ? selectData[data.dataIndex.replace('Fan', 'Fan2')] : '-'
+                  }}</div>
+                </div>
+                <div v-else>
+                  <div class="item-value">{{ selectData[data.dataIndex] ? selectData[data.dataIndex] : '-' }}</div>
+                </div>
+              </div>
+            </template>
+          </div>
+        </div>
+      </div>
+      <div class="data-item">
+        <div class="item-header">设备状态</div>
+        <div class="item-container">
+          <div class="tab">
+            <div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 0 }" @click="selectDevice('warningMonitorRowIndex', 0)"
+              >1#风机</div
+            >
+            <div class="tab-item" :class="{ 'tab-item-active-r': warningMonitorRowIndex === 1 }" @click="selectDevice('warningMonitorRowIndex', 1)"
+              >2#风机</div
+            >
+          </div>
+          <div class="container-group">
+            <div class="warning-header">
+              <div class="header-item">
+                <div class="header-title">报警总数</div>
+                <div class="header-value">0</div>
+              </div>
+              <div class="header-item">
+                <div class="header-title"> 未处理数</div>
+                <div class="header-value">0</div>
+              </div>
+            </div>
+            <div class="warning-group">
+              <template v-if="deviceType">
+                <div class="warning-item" v-for="(state, index) in getTableHeaderColumns(deviceType + '_monitor_right')" :key="index">
+                  <div class="item-name"><div class="icon"></div> {{ state.title }}</div>
+                  <div v-if="state.dataIndex.startsWith('Fan')">
+                    <div class="signal-item" v-if="warningMonitorRowIndex == 0">
+                      <div
+                        class="signal-round"
+                        :class="{
+                          'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan1')],
+                          'signal-round-warning':
+                            selectData[state.dataIndex.replace('Fan', 'Fan1')] !== undefined && !selectData[state.dataIndex.replace('Fan', 'Fan1')],
+                          'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined,
+                        }"
+                      ></div>
+                      <div class="vent-margin-l-8">{{
+                        selectData[state.dataIndex.replace('Fan', 'Fan1')] === undefined
+                        ? '无状态'
+                        : selectData[state.dataIndex.replace('Fan', 'Fan1')]
+                          ? '正常'
+                          : '异常'
+                      }}</div>
+                    </div>
+                    <div class="signal-item" v-if="warningMonitorRowIndex == 1">
+                      <div
+                        class="signal-round"
+                        :class="{
+                          'signal-round-run': selectData[state.dataIndex.replace('Fan', 'Fan2')],
+                          'signal-round-warning':
+                            selectData[state.dataIndex.replace('Fan', 'Fan2')] !== undefined && !selectData[state.dataIndex.replace('Fan', 'Fan2')],
+                          'signal-round-gry': selectData[state.dataIndex.replace('Fan', 'Fan2')] === undefined,
+                        }"
+                      ></div>
+                      <div class="vent-margin-l-8">{{
+                        selectData[state.dataIndex.replace('Fan', 'Fan2')] === undefined
+                        ? '无状态'
+                        : selectData[state.dataIndex.replace('Fan', 'Fan2')]
+                          ? '正常'
+                          : '异常'
+                      }}</div>
+                    </div>
+                  </div>
+                  <div v-else>
+                    <div class="signal-item">
+                      <div
+                        class="signal-round vent-margin-l-8"
+                        :class="{
+                                'signal-round-run': selectData[state.dataIndex],
+                                'signal-round-warning': selectData[state.dataIndex] !== undefined && !selectData[state.dataIndex],
+                                'signal-round-gry': selectData[state.dataIndex] === undefined,
+                              }"
+                      ></div>
+                      <div class="vent-margin-l-8">{{ selectData[state.dataIndex] === undefined ? '无状态' : selectData[state.dataIndex] ? '正常' : '异常' }}</div>
+                    </div>
+                  </div>
+                </div>
+              </template>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <div class="bottom-tabs-box" @mousedown="setDivHeight($event, 250, scroll, 95)">
+      <dv-border-box8 :dur="5"  :style="`top: 65px; padding: 5px; height: ${scroll.y + 100}px`" >
         <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
           <a-tab-pane key="1" tab="实时监测">
-            <GroupMonitorTable  v-if="activeKey === '1'" :dataSource="dataSource" columnsType="fanlocal_monitor" @selectRow="getSelectRow" :scroll="scroll"/>
+            <GroupMonitorTable  v-if="activeKey === '1'" ref="MonitorDataTable" :dataSource="dataSource" columnsType="fanlocal_monitor" @selectRow="getSelectRow" :scroll="scroll"/>
           </a-tab-pane>
           <a-tab-pane key="2" tab="实时曲线图" force-render>
             <div class="tab-item" v-if="activeKey === '2'">
@@ -187,7 +307,7 @@
 
 <script setup lang="ts">
   import { ExclamationCircleFilled } from '@ant-design/icons-vue';
-  import { onBeforeMount, ref, onMounted, nextTick, toRaw, reactive, onUnmounted } from 'vue';
+  import { onBeforeMount, ref, computed, onMounted, nextTick, toRaw, reactive, onUnmounted } from 'vue';
   import BarSingle from '../../../../components/chart/BarSingle.vue';
   import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
   import HistoryTable from '../comment/HistoryTable.vue';
@@ -203,6 +323,11 @@
   import { message } from 'ant-design-vue';
   import { setDivHeight } from '/@/utils/event';
   import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
+  import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
+  import { SvgIcon } from '/@/components/Icon';
+  import { useRouter } from 'vue-router';
+
+  const { currentRoute } = useRouter();
 
   const modalTypeArr = reactive({
     leftBtnArr: [
@@ -280,9 +405,9 @@
   ]);
 
   const scroll = reactive({
-    y: 240
+    y: 180
   })
-  
+  const MonitorDataTable = ref()
   const modalSensor = ref(null);
   const loading = ref(false);
   const activeKey = ref('1');
@@ -294,7 +419,12 @@
   const mainWindIsShow2 = ref('stop'); // 2#风机默认不启动
   const passWord = ref('');
   // 默认初始是第一行
-  const selectRowIndex = ref(0);
+  const selectRowIndex = ref(-1);
+  const dataMonitorRowIndex = ref(0);
+  // 默认数据右边监测的是1#风机
+  const warningMonitorRowIndex = ref(0);
+
+
   // 设备数据
   const controlType = ref(1);
   const modalType = ref('fm');
@@ -310,6 +440,9 @@
     netStatus: '0', //通信状态
     fault: '气源压力超限',
   };
+
+  const deviceType = computed(() => selectData.deviceType);
+
   const flvURL1 = () => {
     // return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
     return ''
@@ -326,6 +459,14 @@
     // }
   };
 
+  const selectDevice = (key, val) => {
+  if (key === 'dataMonitorRowIndex') {
+    dataMonitorRowIndex.value = val;
+  } else {
+    warningMonitorRowIndex.value = val;
+  }
+};
+
   const dataSource = ref([]);
 
   //
@@ -344,10 +485,18 @@
 
   // https获取监测数据
   let timer: null | NodeJS.Timeout = null;
-  function getMonitor(flag?) {
+  async function getMonitor(flag?) {
     if (Object.prototype.toString.call(timer) === '[object Null]') {
-      timer = setTimeout(async () => {
+      timer = await setTimeout(async () => {
         await getDataSource();
+        if (dataSource.value.length > 0 && selectRowIndex.value == -1) {
+          // 初始打开页面
+          if (currentRoute.value['query'] && currentRoute.value['query']['id']) {
+            MonitorDataTable.value.setSelectedRowKeys(currentRoute.value['query']['id'])
+          }else{
+            MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID'])
+          }
+        }
         Object.assign(selectData, deviceBaseList.value, dataSource.value[selectRowIndex.value]);
         addText(selectData);
         // playAnimation(data, selectData.maxarea);
@@ -369,9 +518,11 @@
 
   // 切换检测数据
   function getSelectRow(id) {
+    console.log('选中的设备id------->', id)
+
     if (!id) return;
     loading.value = true;
-    const baseDataIndex: any = dataSource.value.findIndex((baseData: any) => baseData.deviceID === id);
+    const baseDataIndex: any = dataSource.value.findIndex((baseData: any) => baseData.deviceID == id);
     selectRowIndex.value = baseDataIndex;
     modalType.value = baseDataIndex > 0 ? 'fm' : 'fc';
     setModelType(modalType.value).then(() => {
@@ -497,11 +648,12 @@
   });
 
   onMounted(() => {
+    
     mountedThree(player1.value).then(() => {
-      nextTick(() => {
-        getMonitor(true);
+      nextTick(async() => {
+        await getMonitor(true);
+        
         addCssText();
-
         playSmoke('startSmoke', 'top', frequencyVal.value, 'open');
       });
     });
@@ -521,6 +673,202 @@
   :deep(.@{ventSpace}-tabs-tabpane-active) {
     height: 100%;
   }
+
+  .data-show-box {
+    position: relative;
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    padding: 10px 5px;
+    color: #ffffff;
+    z-index: 999;
+    top: 70px;
+    .data-item {
+      pointer-events: auto;
+      .item-header {
+        width: 374px;
+        background: url('/@/assets/images/vent/lr-top-bg.png') no-repeat;
+        background-size: auto;
+        height: 32px;
+        text-align: center;
+        line-height: 34px;
+        font-size: 15px;
+        font-weight: 600;
+        color: #fafafa;
+      }
+      .item-container {
+        width: 346px;
+        margin: 0 14px;
+        padding: 10px;
+        background: #00377c33;
+        backdrop-filter: blur(2px);
+        .tab {
+          width: 323px;
+          background: url('/@/assets/images/vent/lr-tab-bg.png') no-repeat;
+          display: flex;
+          .tab-item {
+            flex: 1;
+            text-align: center;
+            padding-top: 2px;
+            color: #ffffff99;
+            cursor: pointer;
+            &:hover {
+              color: #ffffff;
+            }
+          }
+          .tab-item-active-l {
+            color: #ffffff;
+            background-image: url('/@/assets/images/vent/l-tab-active.png');
+            background-repeat: no-repeat;
+            background-size: auto;
+            background-position: 6px 3px;
+          }
+          .tab-item-active-r {
+            color: #ffffff;
+            background-image: url('/@/assets/images/vent/r-tab-active.png');
+            background-repeat: no-repeat;
+            background-position: 0 3px;
+          }
+        }
+        .container-group {
+          width: 314px;
+          margin: 0px 4px;
+          padding: 10px 0;
+          min-height: 442px;
+          background: linear-gradient(to right, #00deff22, #2081ff05);
+          max-height: 450px;
+          overflow-y: auto;
+        }
+        .container-group-l {
+          .container-item {
+            width: 100%;
+            height: 63px;
+            display: flex;
+            padding: 10px 0 0 20px;
+            margin-bottom: 5px;
+            position: relative;
+            background: url('/@/assets/images/vent/plane-bottom.png') no-repeat;
+            background-size: auto;
+            background-position: bottom;
+            &::before {
+              content: '';
+              display: block;
+              width: 100%;
+              height: 5px;
+              position: absolute;
+              top: 62px;
+              left: 0;
+              background-color: #73f4ff66;
+              backdrop-filter: blur(5px);
+            }
+            .item-icon {
+              width: 54px;
+              height: 45px;
+              background: url('/@/assets/images/vent/plane-icon-bg.png') no-repeat;
+              background-size: cover;
+              .icon-style {
+                margin: 10px 0 0 18px;
+              }
+            }
+            .item-name {
+              width: 180px;
+              line-height: 60px;
+            }
+            .item-value {
+              position: relative;
+              height: 26px;
+              line-height: 24px;
+              margin: 15px 0;
+              text-align: center;
+              width: 80px;
+              border: 1px solid #00f5fe;
+              border-radius: 13px;
+              background: linear-gradient(to right, #00f5fe44, #0090ff44);
+              &::before {
+                width: 6px;
+                height: 6px;
+                content: '';
+                position: absolute;
+                left: -3px;
+                top: 8px;
+                background: #ffa500;
+                border-radius: 3px;
+              }
+            }
+          }
+        }
+        .warning-header {
+          display: flex;
+          font-size: 14px;
+          .header-item {
+            flex: 1;
+            display: flex;
+            flex-direction: column;
+            margin: 5px 10px;
+            justify-content: center;
+            align-items: center;
+            .header-title {
+              color: #39e7fe;
+            }
+            .header-value {
+              width: 133px;
+              height: 56px;
+              font-weight: 600;
+              font-family: 'douyuFont';
+              font-size: 16px;
+              color: #ffa500;
+              display: flex;
+              justify-content: center;
+              align-items: center;
+              background: url('/@/assets/images/vent/count-header-bg.png') no-repeat;
+            }
+          }
+        }
+        .warning-group {
+          padding: 0 10px;
+          position: relative;
+          &::before {
+            content: '';
+            display: block;
+            width: 1px;
+            height: 100%;
+            position: absolute;
+            left: 12px;
+            background-color: #00f5fe;
+          }
+          .warning-item {
+            display: flex;
+            flex-direction: row;
+            justify-content: space-between;
+            align-items: center;
+            height: 38px;
+            .item-name {
+              .icon {
+                width: 6px;
+                height: 6px;
+                display: inline-block;
+                background-color: #1cd5ff;
+                border-radius: 3px;
+                position: relative;
+                margin-right: 5px;
+                &::before {
+                  content: '';
+                  width: 10px;
+                  height: 10px;
+                  display: block;
+                  border: 1px solid #34edff99;
+                  border-radius: 5px;
+                  position: absolute;
+                  top: -2px;
+                  left: -2px;
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
   .input-box {
     display: flex;
     align-items: center;

+ 2 - 2
src/views/vent/monitorManager/fiberMonitor/fiber.belt.threejs.ts

@@ -113,7 +113,7 @@ class beltFiber {
     const locationTexture = loader.load('/model/img/location.png');
     const warningLocationTexture = loader.load('/model/img/warning-location.png');
     const errorLocationTexture = loader.load('/model/img/error-location.png');
-    locationTexture.encoding = warningLocationTexture.encoding = warningLocationTexture.encoding = THREE.sRGBEncoding;
+    locationTexture.colorSpace = warningLocationTexture.colorSpace = warningLocationTexture.colorSpace = THREE.SRGBColorSpace;
 
     this.locationMaterial = new THREE.MeshPhongMaterial({
       emissive: 0x16ecf4,
@@ -282,7 +282,7 @@ class beltFiber {
     const _this = this;
     return new Promise((resolve) => {
       new THREE.TextureLoader().load('/model/img/texture-smoke.png', (texture) => {
-        texture.encoding = THREE.sRGBEncoding;
+        texture.colorSpace = THREE.SRGBColorSpace;
         const geometry = new THREE.BufferGeometry();
         geometry.setFromPoints(_this.positions);
         const material = new THREE.PointsMaterial({

+ 1 - 1
src/views/vent/monitorManager/fiberMonitor/fiber.ds.threejs.ts

@@ -262,7 +262,7 @@ class GrottoFiber {
     const _this = this;
     return new Promise((resolve) => {
       new THREE.TextureLoader().load('/model/img/texture-smoke.png', (texture) => {
-        texture.encoding = THREE.sRGBEncoding;
+        texture.colorSpace = THREE.SRGBColorSpace;
         const geometry = new THREE.BufferGeometry();
         geometry.setFromPoints(_this.positions);
         const material = new THREE.PointsMaterial({

+ 1 - 1
src/views/vent/monitorManager/fiberMonitor/fiber.workFace.threejs.ts

@@ -278,7 +278,7 @@ class WorkFace {
     pointLines.name = 'pointLines';
     return new Promise((resolve) => {
       new THREE.TextureLoader().load('/model/img/texture-smoke.png', (texture) => {
-        texture.encoding = THREE.sRGBEncoding;
+        texture.colorSpace = THREE.SRGBColorSpace;
         const material = new THREE.PointsMaterial({
           color: '#FFFFAF',
           size: 0.03,

+ 4 - 4
src/views/vent/monitorManager/fireMonitor/index.vue

@@ -97,7 +97,7 @@ function clickHandler(e: any) {
 }
 
 let timer: null | NodeJS.Timeout | undefined = null;
-async function getMonitor() {
+async function getMonitor(flag?) {
     if(timer === null){
         timer = setTimeout(async() => {
             const result = await list({ pagetype: "normal", devicetype: "sys", systemID: "1637983899775242242" })
@@ -134,7 +134,7 @@ async function getMonitor() {
             // plConfig.data = plDatas
 
             await getMonitor()
-        }, 5000)
+        }, flag ? 0 : 5000)
 
         if(timer){
             timer = null
@@ -144,12 +144,12 @@ async function getMonitor() {
 
 async function refreshEchatrs() {
     timer = null;
-    await getMonitor();
+    await getMonitor(true);
     console.log('echarts 刷新');
 }
 
 onMounted(async() => {
-    await getMonitor();
+    await getMonitor(true);
 })
 onUnmounted(() => {
     timer = undefined

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

@@ -190,7 +190,7 @@ const flvURL1 = () => {
 
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
-function getMonitor() {
+function getMonitor(flag?) {
   if (Object.prototype.toString.call(timer) === '[object Null]') {
     timer = setTimeout(async () => {
       if (props.deviceId) {
@@ -202,7 +202,7 @@ function getMonitor() {
       }
       await getMonitor();
       loading.value = false
-    }, 1000);
+    }, flag ? 0 : 1000);
   }
 };
 
@@ -236,7 +236,7 @@ onMounted(() => {
     await setModelType('gasPumpBase');
     loading.value = false;
     timer = null
-    await getMonitor()
+    await getMonitor(true)
   });
 });
 

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

@@ -152,7 +152,7 @@ class Fm2 {
     //
     getTextCanvas(526, 346, textArr, '').then((canvas: HTMLCanvasElement) => {
       const textMap = new THREE.CanvasTexture(canvas); // 关键一步
-      textMap.encoding = THREE.sRGBEncoding;
+      textMap.colorSpace = THREE.SRGBColorSpace;
       const textMaterial = new THREE.MeshBasicMaterial({
         // 关于材质并未讲解 实操即可熟悉                 这里是漫反射类似纸张的材质,对应的就有高光类似金属的材质.
         map: textMap, // 设置纹理贴图
@@ -501,7 +501,7 @@ class Fm2 {
       this.model.clearGroup(this.group);
       this.clipActionArr.backDoor = undefined;
       this.clipActionArr.frontDoor = undefined;
-      this.mixers = undefined
+      this.mixers = undefined;
     }
   }
 }

+ 2 - 2
src/views/vent/monitorManager/gateMonitor/gate.threejs.two.ts

@@ -166,7 +166,7 @@ class Fm1 {
     //
     getTextCanvas(526, 346, textArr, '').then((canvas: HTMLCanvasElement) => {
       const textMap = new THREE.CanvasTexture(canvas); // 关键一步
-      textMap.encoding = THREE.sRGBEncoding;
+      textMap.colorSpace = THREE.SRGBColorSpace;
       const textMaterial = new THREE.MeshBasicMaterial({
         // 关于材质并未讲解 实操即可熟悉                 这里是漫反射类似纸张的材质,对应的就有高光类似金属的材质.
         map: textMap, // 设置纹理贴图
@@ -522,7 +522,7 @@ class Fm1 {
       this.clipActionArr.backDoor = undefined;
       this.clipActionArr.frontDoor = undefined;
 
-      this.mixers = undefined
+      this.mixers = undefined;
 
       // document.getElementById('damper3D').parentElement.remove(document.getElementById('damper3D'))
     }

+ 29 - 23
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -175,8 +175,9 @@
   import lodash from 'lodash';
   import { setDivHeight } from '/@/utils/event';
   import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
+  import { useRouter } from 'vue-router';
 
-
+  const { currentRoute } = useRouter();
   const MonitorDataTable = ref()
 
   const player1 = ref(null);
@@ -196,7 +197,7 @@
   const modalTitle = ref(''); // 模态框标题显示内容,根据设备操作类型决定
   const modalType = ref(''); // 模态框内容显示类型,设备操作类型
 
-  const selectRowIndex = ref(0); // 选中行
+  const selectRowIndex = ref(-1); // 选中行
   const dataSource = ref([]);
 
   const deviceBaseList = ref([]); // 设备基本信息
@@ -252,28 +253,32 @@
 
   // https获取监测数据
   let timer: null | NodeJS.Timeout = null;
-  function getMonitor(flag?){
+  async function getMonitor(flag?){
     if (Object.prototype.toString.call(timer) === '[object Null]') {
-      timer = setTimeout(() => {
-        list({ devicetype: 'gate', pagetype: 'normal' }).then((res) => {
-          if (res.msgTxt && res.msgTxt[0]) {
-            dataSource.value = res.msgTxt[0].datalist || [];
-            dataSource.value.forEach((data: any) => {
-              const readData = data.readData;
-              data = Object.assign(data, readData);
-            });
-            if (dataSource.value.length > selectRowIndex.value) {
-              const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
-              Object.assign(selectData, data);
-              addMonitorText(selectData);
-              monitorAnimation(selectData)
-              if (timer) {
-                timer = null;
-              }
-              getMonitor();
+      timer = await setTimeout(async() => {
+        const res = await list({ devicetype: 'gate', pagetype: 'normal' })
+        if (res.msgTxt && res.msgTxt[0]) {
+          dataSource.value = res.msgTxt[0].datalist || [];
+          dataSource.value.forEach((data: any) => {
+            const readData = data.readData;
+            data = Object.assign(data, readData);
+          });
+          if(dataSource.value.length > 0 && selectRowIndex.value == -1){
+            // 初始打开页面
+            if (currentRoute.value['query'] && currentRoute.value['query']['id']) {
+              MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']])
+            }else{
+              MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID'])
             }
           }
-        });
+          Object.assign(selectData, dataSource.value[selectRowIndex.value]);
+          addMonitorText(selectData);
+          monitorAnimation(selectData)
+          if (timer) {
+            timer = null;
+          }
+          getMonitor();
+        }
       }, flag ? 0 : 1000);
     }
   };
@@ -283,6 +288,7 @@
     if (!selectRow) return;
     loading.value = true;
     selectRowIndex.value = index;
+
     const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
     Object.assign(selectData, initData, selectRow, baseData);
     isFrontRunning = false //开关门动作是否在进行
@@ -593,8 +599,8 @@
 
   onMounted(() => {
     loading.value = true;
-    mountedThree(player1.value, player2.value).then(() => {
-      getMonitor(true);
+    mountedThree(player1.value, player2.value).then(async() => {
+      await getMonitor(true);
       loading.value = false;
     });
     document.body.addEventListener('mousedown', addPlayVideo, false);

+ 17 - 6
src/views/vent/monitorManager/mainFanMonitor/index.vue

@@ -197,11 +197,11 @@
         </div>
       </div>
     </div>
-    <div class="bottom-tabs-box" @mousedown="setDivHeight($event, 250, scroll)">
+    <div class="bottom-tabs-box" @mousedown="setDivHeight($event, 250, scroll, 95)">
       <dv-border-box8 :dur="5"  :style="`padding: 5px; height: ${scroll.y + 100}px`" >
         <a-tabs class="tabs-box" v-model:activeKey="activeKey" @change="tabChange">
           <a-tab-pane key="1" tab="实时监测">
-            <GroupMonitorTable v-if="activeKey === '1'" :dataSource="dataSource" columnsType="fanmain_monitor" @selectRow="getSelectRow" :scroll="scroll"/>
+            <GroupMonitorTable v-if="activeKey === '1'" ref="MonitorDataTable" :dataSource="dataSource" columnsType="fanmain_monitor" @selectRow="getSelectRow" :scroll="scroll"/>
           </a-tab-pane>
           <!-- <a-tab-pane key="2" tab="实时曲线图" force-render>
             <div class="tab-item" v-if="activeKey === '2'">
@@ -327,8 +327,11 @@
   import { setDivHeight } from '/@/utils/event';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
+  import { useRouter } from 'vue-router';
 
-  const isSimulation = true // 是否模拟状态
+  const { currentRoute } = useRouter();
+
+  
 
   const { createMessage } = useMessage();
 
@@ -336,8 +339,8 @@
   const scroll = reactive({
     y: 180
   })
-
-  
+  const isSimulation = true // 是否模拟状态
+  const MonitorDataTable = ref()
   const player1 = ref(null);
   const player2 = ref(null);
   const activeKey = ref('1');
@@ -352,7 +355,7 @@
   const backMonitorIsShow = ref(false); // 存放2#风机临时状态,保存模态框取消时,还需要返回之前的值
   const passWord = ref('');
   // 默认初始是第一行 (默认n%2==0时是主机,n%2==1时是备机)
-  const selectRowIndex = ref(0);
+  const selectRowIndex = ref(-1);
   // 默认数据左边监测的是1#风机
   const dataMonitorRowIndex = ref(0);
   // 默认数据右边监测的是1#风机
@@ -420,6 +423,14 @@
     if (Object.prototype.toString.call(timer) === '[object Null]') {
       timer = setTimeout(async () => {
         await getDataSource();
+        if (dataSource.value.length > 0 && selectRowIndex.value == -1) {
+          // 初始打开页面
+          if (currentRoute.value['query'] && currentRoute.value['query']['id']) {
+            MonitorDataTable.value.setSelectedRowKeys(currentRoute.value['query']['id'])
+          } else {
+            MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID'])
+          }
+        }
         Object.assign(selectData, deviceBaseList.value, dataSource.value[selectRowIndex.value]);
         if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
           frontMonitorIsShow.value = true

+ 3 - 3
src/views/vent/monitorManager/nitrogen/components/nitrogenEcharts.vue

@@ -159,7 +159,7 @@
     // https获取监测数据
     let timer: null | NodeJS.Timeout = null;
     let count = 0
-    async function getMonitor() {
+    async function getMonitor(flag?) {
       if (Object.prototype.toString.call(timer) === '[object Null]') {
         timer = await setTimeout(async () => {
           await getDataSource();
@@ -167,7 +167,7 @@
             timer = null;
           }
           await getMonitor();
-        }, 1000);
+        }, flag ? 0 : 1000);
       }
     };
 
@@ -195,7 +195,7 @@
     };
 
     onMounted(() => {
-      getMonitor()
+      getMonitor(true)
     })
 
     onUnmounted(() => {

+ 2 - 2
src/views/vent/monitorManager/nitrogen/nitrogen.threejs.ts

@@ -86,8 +86,8 @@ export const setModelType = (type) => {
         newCameraPosition = { x: -1.2741159124866441, y: 46.04318455197148, z: 95.25814325750986 };
         newControlsPosition = { x: -1.699431, y: -12.38981, z: -1.699431 };
       } else if (group.children.length == 4) {
-        newCameraPosition = { x: -1.2741159124866441, y: 46.04318455197148, z: 85.25814325750986 };
-        newControlsPosition = { x: -1.699431, y: -12.38981, z: -1.699431 };
+        newCameraPosition = { x: -1.7434040517387115, y: 46.41089142470955, z: 114.33388865672832 };
+        newControlsPosition = { x: -1.6994314417499141, y: -12.38981035037152, z: 10.110013648346193 };
       } else if (group.children.length == 3) {
         newCameraPosition = { x: -1.2741159124866441, y: 46.04318455197148, z: 70.25814325750986 };
         newControlsPosition = { x: -1.699431, y: -12.38981, z: -1.699431 };

+ 25 - 0
src/views/vent/monitorManager/obfurageMonitor/components/obfurageAlarmHistory.vue

@@ -0,0 +1,25 @@
+<template>
+  <div class="alarm-history">
+    <AlarmHistoryTable columns-type="alarm" device-type="sys_obfurage"
+      :device-list-api="getTableList.bind(null, { strtype: 'sys_obfurage' })" designScope="alarm-history" />
+  </div>
+</template>
+<script setup lang="ts">
+import AlarmHistoryTable from '../../comment/AlarmHistoryTable.vue';
+import { getTableList } from '../obfurage.api'
+const props = defineProps({
+  deviceType: {
+    type: String,
+    required: true,
+  },
+  deviceId: {
+    type: String,
+    required: true,
+  }
+})
+</script>
+<style lang="less" scoped>
+.alarm-history {
+  pointer-events: auto;
+}
+</style>

+ 26 - 0
src/views/vent/monitorManager/obfurageMonitor/components/obfurageHandleHistory.vue

@@ -0,0 +1,26 @@
+<template>
+  <div class="handle-history">
+    <HandlerHistoryTable columns-type="operatorhistory" device-type="sys_obfurage"
+      :device-list-api="getTableList.bind(null, { strtype: 'sys_obfurage' })" designScope="sys_obfurage_history" />
+  </div>
+</template>
+<script setup lang="ts">
+import HandlerHistoryTable from '../../comment/HandlerHistoryTable.vue';
+import { getTableList } from '../obfurage.api'
+  const props = defineProps({
+    deviceType: {
+      type: String,
+      required: true,
+    },
+    deviceId: {
+      type: String,
+      required: true,
+    }
+  })
+</script>
+<style lang="less" scoped>
+.handle-history {
+  width: 100%;
+  pointer-events: auto;
+}
+</style>

+ 28 - 0
src/views/vent/monitorManager/obfurageMonitor/components/obfurageHistory.vue

@@ -0,0 +1,28 @@
+<template>
+  <div class="history-box">
+    <HistoryTable :columns-type="`${deviceType}`" :device-type="deviceType" :sysId="deviceId"
+      :device-list-api="getTableList.bind(null, { strtype: deviceType, sysId: deviceId })" designScope="pressurefan_history" />
+  </div>
+</template>
+<script setup lang="ts">
+import { ref, defineProps } from 'vue'
+import HistoryTable from '../../comment/HistoryTable.vue';
+import { getTableList } from '../obfurage.api'
+
+const props = defineProps({
+  deviceType: {
+    type: String,
+    required: true,
+  },
+  deviceId: {
+    type: String,
+    required: true,
+  }
+})
+
+</script>
+<style lang="less" scoped>
+.history-box {
+  pointer-events: auto;
+}
+</style>

+ 621 - 0
src/views/vent/monitorManager/obfurageMonitor/components/obfurageHome.vue

@@ -0,0 +1,621 @@
+<template>
+  <a-spin tip="Loading..." :spinning="loading">
+    <div class="monitor-container">
+      <div class="lr left-box">
+        <div class="warning-group">
+          <div class="fire-analysis1 ">
+            <div class="analysis-item warning3">
+              <div class="title">火灾风险预警</div>
+              <div class="value">高风险</div>
+            </div>
+          </div>
+          <ventBox1 class="vent-margin-t-10">
+            <template #title>
+              <div>近一月报警情况</div>
+            </template>
+            <template #container>
+              <div class="monitor-box">
+                <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="42" name="alarm-icon"/><span>报警信息</span></div>
+                <div class="item-group">
+                  <div class="item-col">
+                    <SvgIcon class="icon" size="24" name="alarm-fire" />
+                    <span class="title">火焰传感器</span>
+                    <span class="value">无</span>
+                  </div>
+                  <div class="item-col">
+                    <SvgIcon class="icon" size="24" name="alarm-smoke" />
+                    <span class="title">烟雾传感器</span>
+                    <span class="value" style="color: #FF3823; font-weight: 600;">15</span>
+                  </div>
+                  <div class="item-col">
+                    <SvgIcon class="icon" size="24" name="alarm-CO" />
+                    <span class="title">CO传感器</span>
+                    <span class="value">无</span>
+                  </div>
+                  <div class="item-col">
+                    <SvgIcon class="icon" size="24" name="alarm-temperature" />
+                    <span class="title">温度传感器</span>
+                    <span class="value">无</span>
+                  </div>
+                </div>
+              </div>
+              <div class="monitor-box">
+                <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="42" name="warning-icon"/><span>预警信息</span></div>
+                <div class="item-group">
+                  <div class="item-col">
+                    <SvgIcon class="icon" size="22" name="warning-fire" />
+                    <span class="title">火焰传感器</span>
+                    <span class="value">无</span>
+                  </div>
+                  <div class="item-col">
+                    <SvgIcon class="icon" size="22" name="warning-smoke" />
+                    <span class="title">烟雾传感器</span>
+                    <span class="value" style="color: #FF9B17; font-weight: 600;">15</span>
+                  </div>
+                  <div class="item-col">
+                    <SvgIcon class="icon" size="22" name="warning-CO" />
+                    <span class="title">CO传感器</span>
+                    <span class="value">无</span>
+                  </div>
+                  <div class="item-col">
+                    <SvgIcon class="icon" size="22" name="warning-temperature" />
+                    <span class="title">温度传感器</span>
+                    <span class="value">无</span>
+                  </div>
+                </div>
+                <div class="alarm-box">
+                  <dv-scroll-board ref="scrollBoard" :config="warningConfig"
+                    style="width: 100%; height: 240px; overflow-y: auto; " />
+                </div>
+              </div>
+            </template>
+          </ventBox1>
+        </div>
+      </div>
+      <div class="lr right-box">
+        <div class="item-box sensor-container">
+          <ventBox1>
+            <template #title>
+              <div>采空区火灾监测预警</div>
+            </template>
+            <template #container>
+              <div class="temperature-box">
+                <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="fiber-title"/><span>光纤测温系统</span></div>
+                <div class="temperature-group">
+                  <div class="light-group">
+                    <div class="light-bg"></div>
+                    <div class="light-item">
+                      <SvgIcon class="icon" size="25" name="aveg-temperature" />
+                      <div class="light">
+                        <div class="light-icon"></div>
+                        <div class="light-title">平均温度</div>
+                        <div class="light-val-box">
+                          <div class="light-val-icon"></div>
+                          <div class="light-val">56.99</div>
+                        </div>
+                      </div>
+                    </div>
+                    <div class="light-item">
+                      <SvgIcon class="icon" size="25" name="max-temperature" />
+                      <div class="light">
+                        <div class="light-icon"></div>
+                        <div class="light-title">最高温度</div>
+                        <div class="light-val-box">
+                          <div class="light-val-icon"></div>
+                          <div class="light-val">56.99</div>
+                        </div>
+                      </div>
+                    </div>
+                    <div class="light-item">
+                      <SvgIcon class="icon" size="25" name="min-temperature" />
+                      <div class="light">
+                        <div class="light-icon"></div>
+                        <div class="light-title">最低温度</div>
+                        <div class="light-val-box">
+                          <div class="light-val-icon"></div>
+                          <div class="light-val">56.99</div>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
+                </div>
+                <div class="warning-state-detail">
+                  最大值产生于 <span class="state-color">2013-05-24 15:52:42</span> 时刻 <span class="state-color">15212胶运顺槽600m</span> 处
+                </div>
+              </div>
+              <div>
+                <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="beamTube-title"/><span>束管监测系统</span></div>
+                <div class="state-item" v-for="(data, index) in beamTubeColumns" :key="index">
+                  <div class="item-col">
+                    <span class="state-title">{{ Object.values(data)[0] }} :</span>
+                    <span class="state-val">{{ (bundleTubeDataSource[Object.keys(data)[0]])
+                      >= 0 ? bundleTubeDataSource[Object.keys(data)[0]] : '-' }}</span>
+                  </div>
+                  <div class="item-col" v-if="Object.keys(data)[1]">
+                    <span class="state-title">{{ Object.values(data)[1] }} :</span>
+                    <span class="state-val">{{ (bundleTubeDataSource[Object.keys(data)[1]])
+                      >= 0 ? bundleTubeDataSource[Object.keys(data)[1]] : '-' }}</span>
+                  </div>
+                </div>
+              </div>
+              <div>
+                <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="pulp-title"/><span>注浆系统</span></div>
+                <div class="state-item" v-for="(data, index) in groutColumns" :key="index">
+                  <div class="item-col">
+                    <span class="state-title">{{ Object.values(data)[0] }} :</span>
+                    <span class="state-val">{{ (pulpingDataSource[Object.keys(data)[0]])
+                      >= 0 ? pulpingDataSource[Object.keys(data)[0]] : '-' }}</span>
+                  </div>
+                  <div class="item-col" v-if="Object.keys(data)[1]">
+                    <span class="state-title">{{ Object.values(data)[1] }} :</span>
+                    <span class="state-val">{{ (pulpingDataSource[Object.keys(data)[1]])
+                      >= 0 ? pulpingDataSource[Object.keys(data)[1]] : '-' }}</span>
+                  </div>
+                </div>
+                <div class="input-item vent-flex-row" style="margin-bottom: 15px;">
+                  <div>设备控制:</div>
+                  <div class="vent-flex-row btn-box">
+                    <div class="btn btn1">一键启动</div>
+                    <div class="btn btn2">一键停止</div>
+                  </div>
+                </div>
+              </div>
+              <div>
+                <div class="parameter-title group-parameter-title"><SvgIcon class="icon" size="14" name="nitrogen-title"/><span>注氮系统</span></div>
+                <div class="state-item" v-for="(data, index) in nitrogenColumns" :key="index">
+                  <div class="item-col">
+                    <span class="state-title">{{ Object.values(data)[0] }} :</span>
+                    <span class="state-val">{{ (nitrogenDataSource[Object.keys(data)[0]])
+                      >= 0 ? nitrogenDataSource[Object.keys(data)[0]] : '-' }}</span>
+                  </div>
+                  <div class="item-col" v-if="Object.keys(data)[1]">
+                    <span class="state-title">{{ Object.values(data)[1] }} :</span>
+                    <span class="state-val">{{ (nitrogenDataSource[Object.keys(data)[1]])
+                      >= 0 ? nitrogenDataSource[Object.keys(data)[1]] : '-' }}</span>
+                  </div>
+                </div>
+                <div class="input-item vent-flex-row">
+                  <div>设备控制:</div>
+                  <div class="vent-flex-row btn-box">
+                    <div class="btn btn1">一键启动</div>
+                    <div class="btn btn2">一键停止</div>
+                  </div>
+                </div>
+              </div>
+            </template>
+          </ventBox1>
+          
+        </div>
+        <!-- <div class="item-box" >
+          <LivePlayer id="fm-player1" style="height: 250px;" ref="player1" :videoUrl="flvURL1()" muted live loading controls />
+        </div> -->
+      </div>
+    </div>
+  </a-spin>
+
+</template>
+
+<script setup lang="ts">
+
+import { onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps, watch } from 'vue';
+// import MonitorTable from '../comment/MonitorTable.vue';
+import { ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
+import ventBox1 from '/@/components/vent/ventBox1.vue'
+import { mountedThree, destroy, addChamberText, setModelType } from '../obfurage.threejs';
+import { SvgIcon } from '/@/components/Icon';
+import FourBorderBg from '/@/components/vent/fourBorderBg.vue';
+import { beamTubeColumns, groutColumns, nitrogenColumns } from '../obfurage.data'
+import { list } from '../obfurage.api';
+import LivePlayer from '@liveqing/liveplayer-v3';
+
+const props = defineProps({
+  deviceId: {
+    type: String,
+    require: true
+  }
+})
+
+const loading = ref(false);
+
+// 默认初始是第一行
+const sprayDataSource = ref([]);
+const bundleTubeDataSource = ref({});
+const pulpingDataSource = ref([]);
+const nitrogenDataSource = ref([]);
+const fiberDataSource = ref([]);
+
+// 监测数据
+const selectData = reactive({});
+
+const flvURL1 = () => {
+  return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
+  // return ''
+};
+
+// https获取监测数据
+let timer: null | NodeJS.Timeout = null;
+function getMonitor(flag?) {
+  if (Object.prototype.toString.call(timer) === '[object Null]') {
+    timer = setTimeout(async () => {
+      if (props.deviceId) {
+        const data = await getDataSource(props.deviceId)
+        Object.assign(selectData, data); 
+      }
+      if (timer) {
+        timer = null;
+      }
+      await getMonitor();
+      loading.value = false
+    }, flag? 0 : 1000);
+  }
+};
+
+async function getDataSource(systemID) {
+  const res = await list({ devicetype: 'sys', systemID });
+  const result = res.msgTxt;
+
+  result.forEach(item => {
+
+    if(item.type.startsWith('spray_auto')) {
+      // 喷淋
+      sprayDataSource.value = item['datalist'].filter((data: any) => {
+        const readData = data.readData;
+        return Object.assign(data, readData);
+      })
+    }
+    if (item.type.startsWith('"bundletube_auto"')) {
+      // 束管
+      bundleTubeDataSource.value = Object.assign(item['datalist'][0], item['datalist'][0]['readData'])
+    }
+    if (item.type === 'pulping_auto') {
+      // 注浆
+      pulpingDataSource.value = Object.assign(item['datalist'][0], item['datalist'][0]['readData'])
+    }
+    if (item.type === 'nitrogen_auto') {
+      // 注氮
+      nitrogenDataSource.value = Object.assign(item['datalist'][0], item['datalist'][0]['readData'])
+    }
+    if (item.type === 'fiber_normal') {
+      // 注氮
+      fiberDataSource.value = Object.assign(item['datalist'][0], item['datalist'][0]['readData'])
+    }
+
+    if (item.type === 'sys') {
+      // 硐室基本
+      // fiberDataSource.value = item.filter((data: any) => {
+      //   const readData = data.readData;
+      //   return Object.assign(data, readData);
+      // })
+    }
+  })
+}
+
+// 喷粉操作
+function handleDust() {
+  //
+}
+
+watch(() => props.deviceId, () => {
+  setModelType('obfurageBase')
+  loading.value = true
+})
+
+onBeforeMount(() => {
+
+});
+
+onMounted(() => {
+  loading.value = true;
+
+  getMonitor(true)
+  // mountedThree().then(async () => {
+  //   await setModelType('obfurageBase');
+  //   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';
+@import '../../comment/less/workFace.less';
+@ventSpace: zxm;
+
+.warning-group {
+  padding: 10px 0;
+}
+.monitor-box {
+  width: 100%;
+  margin-bottom: 20px;
+  .parameter-title{
+    position: relative;
+    width: 100%;
+    height: 16px;
+    margin-top: 10px;
+    margin-bottom: 5px;
+    .icon, span{
+      position: absolute;
+      top: -10px;
+    }
+  }
+  .group-parameter-title{
+    // background-image: linear-gradient(to right, #39a3ff50, #39a3ff00);
+    .icon{
+      left: -12px;
+      top: -20px;
+    }
+    span{
+      left: 24px;
+    }
+  }
+  .item-group{
+    display: flex;
+    flex-wrap: wrap;
+    .item-col{
+      width: calc(50% - 5px);
+      background-image: linear-gradient(to right, #39A3FF00, #39A3FF10);
+      position: relative;
+      // display: flex;
+      // align-items: center;
+      &:nth-child(even){
+        margin-left: 10px;
+      }
+      padding: 2px 0;
+      margin: 3px 0;
+      .title{
+        margin-left: 5px;
+      }
+      .value{
+        position: absolute;
+        right: 10px;
+        top: 5px;
+      }
+    }
+  }
+}
+.alarm-box{
+  margin-top: 10px;
+}
+
+
+// .monitor-container {
+//   width: 100%;
+//   height: 100%;
+//   // height: 550px;
+//   // border: 1px solid #fff;
+//   margin-top: 20px;
+//   padding-top: 20px;
+//   display: flex;
+//   justify-content: space-between;
+
+//   .lr {
+//     width: 350px;
+//     height: 100%;
+//     display: flex;
+//     flex-direction: column;
+//     margin-top: 10px;
+//     pointer-events: auto;
+
+//   }
+
+//   .right-box {
+//     width: 320px;
+//   }
+
+//   .left-box {
+//     margin-top: 30px;
+
+//     .monitor-info {
+//       .temperature-group {
+//         width: 100%;
+//         margin-top: 10px;
+//         .light-group{
+//           display: flex;
+//           flex-direction: row;
+//           justify-content: space-between;
+//           position: relative;
+//           .light-bg{
+//             width: 331px;
+//             height: 42px;
+//             background: url('/@/assets/images/vent/plane-bg.png') no-repeat;
+//             background-size: contain;
+//             position: absolute;
+//             z-index: -1;
+//             top: 44px;
+//           }
+//           .temperature-item {
+//             width: 120px;
+//             display: flex;
+//             flex-direction: column;
+//             justify-content: center;
+//             align-items: center;
+//             position: reactive;
+//             .icon {
+//               display: block;
+//               position: absolute;
+//               top: -5px;
+//             }
+
+//             .temperature {
+//               display: flex;
+//               flex-direction: column;
+//               justify-content: center;
+//               align-items: center;
+//               .temperature-icon{
+//                 width: 90px;
+//                 height: 58px;
+//                 background: url('/@/assets/images/vent/ligth-q.png');
+//               }
+//               .temperature-title{
+//                 position: relative;
+//                 top: -15px;
+//               }
+              
+//               .temperature-val-box{
+//                 display: flex;
+//                 flex-direction: column;
+//                 justify-content: center;
+//                 align-items: center;
+//                 position: relative;
+//                 top: -10px;
+//                 .temperature-val-icon{
+//                   width: 2px;
+//                   height: 18px;
+//                   background: #00d8ff;
+//                   position: relative;
+//                   &::after{
+//                     content: '';
+//                     display: block;
+//                     position: absolute;
+//                     width: 6px;
+//                     height: 6px;
+//                     border-radius: 3px;
+//                     background: #00d8ff;
+//                     bottom: -2px;
+//                     left: -2px;
+//                   }
+
+//                 }
+//                 .temperature-val{
+//                   position: relative;
+//                   font-family: 'douyuFont';
+//                   color: #20dbfd;
+//                   text-shadow: 0 0 25px #00d8ff;
+//                   font-size: 13px;
+//                   border: 1px solid #40B7F3;
+//                   padding: 5px 8px 2px 8px;
+//                   top: 2px;
+//                   &::after{
+//                     width: calc(100% - 4px);
+//                     height: calc(100% - 4px);
+//                     content: '';
+//                     position: absolute;
+//                     top: 2px;
+//                     left: 2px;
+//                     display: block;
+//                     border: 1px solid #006EA6;
+//                   }
+//                 }
+//               }
+              
+//             }
+//           }
+//         }
+
+        
+//       }
+
+//     }
+//     .warning-group {
+//       padding: 10px 0;
+//     }
+//     .monitor-box {
+//       width: 100%;
+//       margin-bottom: 20px;
+//       .parameter-title{
+//         position: relative;
+//         width: 100%;
+//         height: 16px;
+//         margin-top: 10px;
+//         margin-bottom: 5px;
+//         .icon, span{
+//           position: absolute;
+//           top: -10px;
+//         }
+//       }
+//       .group-parameter-title{
+//         background-image: linear-gradient(to right, #39a3ff50, #39a3ff00);
+        
+//         .icon{
+//           left: -12px;
+//           top: -20px;
+//         }
+//         span{
+//           left: 20px;
+//         }
+        
+//       }
+//       .item-group{
+//         display: flex;
+//         flex-wrap: wrap;
+//         .item-col{
+//           width: calc(50% - 5px);
+//           background-image: linear-gradient(to right, #39A3FF00, #39A3FF10);
+//           position: relative;
+//           // display: flex;
+//           // align-items: center;
+//           &:nth-child(even){
+//             margin-left: 10px;
+//           }
+//           padding: 2px 0;
+//           margin: 3px 0;
+//           .title{
+//             margin-left: 5px;
+//           }
+//           .value{
+//             position: absolute;
+//             right: 10px;
+//             top: 5px;
+//           }
+//         }
+//       }
+      
+      
+      
+//     }
+//     .alarm-box{
+//       margin-top: 10px;
+//     }
+//   }
+//   .box-title{
+//     color: #fff;
+//     margin-bottom: 8px;
+//     padding-left: 10px;
+//     position: relative;
+//     font-size: 16px;
+//     &::after{
+//       content: '';
+//       position: absolute;
+//       display: block;
+//       width: 4px;
+//       height: 12px;
+//       top: 7px;
+//       left: 0px;
+//       background: #45d3fd;
+//       border-radius: 4px;
+//     }
+//   }
+
+// }
+
+: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>

+ 247 - 0
src/views/vent/monitorManager/obfurageMonitor/index.vue

@@ -0,0 +1,247 @@
+<template>
+  <div class="bg"
+    style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
+    <a-spin :spinning="loading" />
+    <div id="obfurage3D" v-show="!loading" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
+    <!-- <div id="damper3DCSS" v-show="!loading" style="width: 100%; height: 100%; top:0; left: 0; position: absolute; overflow: hidden;">
+      <div>
+        <div ref="elementContent" class="elementContent">
+          <p><span class="data-title">压力(Pa):</span>{{selectData.frontRearDP}}</p>
+          <p><span class="data-title">动力源压力(MPa):</span>{{selectData.sourcePressure}}</p>
+          <p><span class="data-title">故障诊断:</span>
+            <i
+              :class="{'state-icon': true, 'open': selectData.messageBoxStatus, 'close': !selectData.messageBoxStatus}"
+            ></i>{{selectData.fault}}</p>
+        </div>
+      </div>
+    </div> -->
+  </div>
+  <div class="scene-box">
+    <customHeader :fieldNames="{ label: 'strinstallpos', value: 'deviceID', options: 'children' }" :options = 'options' @change="getSelectRow" :optionValue="optionValue">密闭监测与管控</customHeader>
+    <div class="center-container">
+      <obfurageHome v-if="activeKey == 'monitor'" :deviceId = 'optionValue' />
+      <div v-else class="history-group">
+        <div class="device-button-group" v-if="deviceList.length > 0">
+          <div class="device-button" :class="{ 'device-active': deviceActive == device.deviceType }" v-for="(device, index) in deviceList" :key="index" @click="deviceChange(index)">{{ device.deviceName }}</div>
+        </div>
+        <div class="history-container">
+          <obfurageHistory v-if="activeKey == 'monitor_history'" ref="historyTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="deviceType"/>
+          <obfurageHandleHistoryVue v-if="activeKey == 'handler_history'" ref="alarmHistoryTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="deviceType" />
+          <obfurageAlarmHistory v-if="activeKey == 'faultRecord'" ref="handlerHistoryTable" class="vent-margin-t-20" :deviceId = 'optionValue' :device-type="deviceType"/>
+        </div> 
+      </div>      
+    </div>
+    <BottomMenu @change="changeActive"/>
+  </div>
+  
+</template>
+
+<script setup lang="ts">
+import customHeader from '/@/views/vent/comment/components/customHeader.vue';
+import { onBeforeMount, ref, onMounted, onUnmounted, reactive, toRaw } from 'vue';
+import { list } from './obfurage.api';
+import BottomMenu from '/@/views/vent/comment/components/bottomMenu.vue';
+import obfurageHome from './components/obfurageHome.vue';
+import obfurageHistory from './components/obfurageHistory.vue';
+import obfurageHandleHistoryVue from './components/obfurageHandleHistory.vue';
+import obfurageAlarmHistory from './components/obfurageAlarmHistory.vue';
+import { useRouter } from 'vue-router';
+
+type DeviceType = { deviceType: string, deviceName: string, datalist: any[] };
+
+const { currentRoute } = useRouter();
+const activeKey = ref('monitor');
+const loading = ref(false);
+
+const historyTable = ref()
+const alarmHistoryTable = ref()
+const handlerHistoryTable = ref()
+
+
+//关联设备
+const deviceList = ref<DeviceType[]>([])
+const deviceActive = ref('')
+const deviceType = ref('')
+
+const options = ref()
+// 默认初始是第一行
+const selectRowIndex = ref(0);
+const dataSource = ref([])
+const sprayDataSource = ref([]);
+const bundleTubeDataSource = ref({});
+const pulpingDataSource = ref([]);
+const nitrogenDataSource = ref([]);
+
+const optionValue = ref('')
+
+// 监测数据
+const selectData = reactive({});
+
+function changeActive(activeValue) {
+  activeKey.value = activeValue
+}
+
+function deviceChange(index) {
+  deviceActive.value = deviceType.value = deviceList.value[index].deviceType
+}
+
+// 查询关联设备列表
+async function getDeviceList() {
+  const res = await list({ devicetype: 'sys', systemID: optionValue.value });
+  const result = res.msgTxt;
+  const deviceArr = <DeviceType[]>[]
+  result.forEach(item => {
+    const data = item['datalist'].filter((data: any) => {
+      const readData = data.readData;
+      return Object.assign(data, readData);
+    })
+    if (item.type != 'sys') {
+      deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'] ? item['typeName'] : item['datalist'][0]['typeName'], datalist: data })
+    }
+  })
+  deviceList.value = deviceArr
+  deviceActive.value = deviceArr[0].deviceType
+  deviceChange(0)
+};
+
+async function getSysDataSource () {
+  const res = await list({ devicetype: 'sys_obfurage', pagetype: 'normal' });
+  dataSource.value = res.msgTxt[0].datalist || [];
+  dataSource.value.forEach((data: any) => {
+    const readData = data.readData;
+    data = Object.assign(data, readData);
+  });
+  
+  if(!options.value) {
+    // 初始时选择第一条数据
+    options.value = dataSource.value
+    if(!optionValue.value){
+      optionValue.value = dataSource.value[0]['deviceID']
+      Object.assign(selectData, dataSource.value[0])
+    }else{
+      const currentData = dataSource.value.find(item => item['deviceID'] === optionValue.value) || {}
+      Object.assign(selectData, currentData)
+    }
+  }
+  const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
+  return data;
+};
+
+// 切换检测数据
+function getSelectRow(deviceID){
+  const currentData = dataSource.value.find((item: any) => {
+    return item.deviceID == deviceID
+  })
+  if(currentData){
+    optionValue.value = currentData['deviceID']
+    Object.assign(selectData, currentData)
+  }
+}
+
+onBeforeMount(() => {
+
+});
+
+onMounted(async() => {
+  if (currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
+  await getSysDataSource()
+  await getDeviceList()
+});
+
+onUnmounted(() => {
+ 
+});
+</script>
+<style lang="less" scoped>
+@import '/@/design/vent/modal.less';
+@ventSpace: zxm;
+.scene-box{
+  pointer-events: none;
+  .history-group{
+    padding: 0 20px;
+    .history-container{
+      position: relative;
+      background: #6195af1a;
+      width: calc(100% + 10px);
+      top: 0px;
+      left: -10px;
+      border: 1px solid #00fffd22;
+      padding: 10px 0;
+      box-shadow: 0 0 20px #44b4ff33 inset;
+    }
+  }
+  .device-button-group{
+    // margin: 0 20px;
+    display: flex;
+    pointer-events: auto;
+    position: relative;
+    margin-top: 90px;
+    &::after{
+      position:absolute;
+      content: '';
+      width: calc(100% + 10px);
+      height: 2px;
+      top: 30px;
+      left: -10px;
+      border-bottom: 1px solid #0efcff;
+    }
+    .device-button{
+      padding: 4px 15px;
+      position: relative;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 14px;
+      
+      color: #fff;
+      cursor: pointer;
+      margin: 0 3px;
+
+      &::before{
+        content: '';
+        position: absolute;
+        top: 0;
+        right: 0;
+        bottom: 0;
+        left: 0;
+        border: 1px solid #6176AF;
+        transform: skewX(-38deg);
+        background-color: rgba(0, 77, 103,85%);
+        z-index: -1;
+      }
+    }
+    .device-active{
+      // color: #0efcff;
+      &::before{
+        border-color: #0efcff;
+        box-shadow: 1px 1px 3px 1px #0efcff inset;
+      }
+    }
+  }
+}
+.center-container{
+  width: 100%;
+  height: calc(100% - 200px);
+}
+
+: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 - 0
src/views/vent/monitorManager/obfurageMonitor/obfurage.api.ts

@@ -0,0 +1,18 @@
+import { defHttp } from '/@/utils/http/axios';
+import { Modal } from 'ant-design-vue';
+
+enum Api {
+  list = '/ventanaly-device/monitor/device',
+  baseList = '/safety/ventanalyDeviceInfo/list',
+}
+/**
+ * 列表接口
+ * @param params
+ */
+export const list = (params) => defHttp.post({ url: Api.list, params });
+
+/**
+ * 保存或者更新用户
+ * @param params
+ */
+export const getTableList = (params) => defHttp.get({ url: Api.baseList, params });

+ 73 - 0
src/views/vent/monitorManager/obfurageMonitor/obfurage.data.ts

@@ -0,0 +1,73 @@
+import { reactive } from 'vue';
+import { BasicColumn } from '/@/components/Table';
+
+export const warningConfig = reactive({
+  header: ['设备名称', '预警信息', '时间'],
+  data: [
+    ['火焰6', '严重报警', '03-05'],
+    ['测点43', '一般预警', '03-05'],
+    ['CO23', '一版预警', '03-05'],
+    ['测点6', '超高预警', '03-05'],
+    ['测点65', '超高预警', '03-05'],
+    ['温度4', '一般预警', '03-05'],
+    ['测点61', '一般预警', '03-05'],
+    ['测点87', '一般信息', '03-05'],
+  ],
+  index: false,
+  // columnWidth: [150, 80, 150, 150],
+  headerBGC: '#3d9dd45d',
+  oddRowBGC: '#009acd10',
+  evenRowBGC: '#009acd05',
+  align: ['center', 'center', 'center'],
+});
+
+export const beamTubeColumns = [
+  {
+    gasval: '甲烷(%)',
+    ch2val: '乙烯(ppm)',
+  },
+  {
+    o2val: '氧气(%)',
+    chval: '乙炔(ppm)',
+  },
+  {
+    coval: '一氧化碳(ppm)',
+    co2val: '二氧化碳(%)',
+  },
+];
+
+export const groutColumns = [
+  {
+    flowRate: '流量(m³/min)',
+    pressure: '压力(Pa)',
+  },
+];
+
+export const nitrogenColumns = [
+  {
+    cumulativeFlow: '流量(m³/min)',
+    nitrogenPressure: '压力(Pa)',
+  },
+];
+
+export const sprayColumns: BasicColumn[] = [
+  {
+    title: '名称',
+    dataIndex: 'strname',
+    width: 100,
+    align: 'center',
+  },
+  {
+    title: '连接状态',
+    dataIndex: 'netStatus',
+    width: 80,
+    align: 'center',
+  },
+  {
+    title: '启停',
+    dataIndex: 'action',
+    width: 80,
+    align: 'center',
+  },
+];
+

+ 59 - 0
src/views/vent/monitorManager/obfurageMonitor/obfurage.threejs.base.ts

@@ -0,0 +1,59 @@
+import * as THREE from 'three';
+// import * as dat from 'dat.gui';
+// const gui = new dat.GUI();
+// gui.domElement.style = 'position:absolute;top:100px;left:10px;z-index:99999999999999';
+
+class ChamberBase {
+  model;
+  modelName = 'obfurage';
+  group: THREE.Object3D | null = null;
+
+  constructor(model) {
+    this.model = model;
+  }
+
+  addLight() {
+    const directionalLight = new THREE.DirectionalLight(0xffffff, 1.2);
+    directionalLight.position.set(15, 69, -39);
+    this.group?.add(directionalLight);
+    directionalLight.target = this.group as THREE.Object3D;
+
+    // gui.add(directionalLight.position, 'x', -100, 100);
+    // gui.add(directionalLight.position, 'y', -100, 100);
+    // gui.add(directionalLight.position, 'z', -100, 100);
+
+    // gui.add(spotLight.position, 'x', -600, 600).onChange(function (value) {
+    //   spotLight.position.x = Number(value);
+    //   _this.render();
+    // });
+    // gui.add(spotLight.position, 'y', -600, 800).onChange(function (value) {
+    //   spotLight.position.y = Number(value);
+    //   _this.render();
+    // });
+    // gui.add(spotLight.position, 'z', -500, 1000).onChange(function (value) {
+    //   spotLight.position.z = Number(value);
+    //   _this.render();
+    // });
+  }
+
+  mountedThree() {
+    return new Promise((resolve) => {
+      this.model.setGLTFModel([this.modelName]).then((gltf) => {
+        this.group = gltf[0];
+        if (this.group) {
+          this.group?.scale.set(0.1, 0.1, 0.1);
+          this.group.position.y += 40;
+          resolve(null);
+          this.addLight();
+        }
+      });
+    });
+  }
+
+  destroy() {
+    this.model.clearGroup(this.group);
+    this.model = null;
+    this.group = null;
+  }
+}
+export default ChamberBase;

+ 98 - 0
src/views/vent/monitorManager/obfurageMonitor/obfurage.threejs.ts

@@ -0,0 +1,98 @@
+import * as THREE from 'three';
+import UseThree from '../../../../utils/threejs/useThree';
+import ChamberBase from './obfurage.threejs.base';
+import { animateCamera, setModalCenter } from '/@/utils/threejs/util';
+import useEvent from '../../../../utils/threejs/useEvent';
+
+// 模型对象、 文字对象
+let model: UseThree | undefined,
+  obfurageBaseObj: ChamberBase | undefined,
+  group: THREE.Object3D | undefined,
+  obfurageType = 'obfurageBase';
+
+const { mouseDownFn } = useEvent();
+
+// 鼠标点击事件
+const mouseEvent = (event) => {
+  if (event.button == 0) {
+    mouseDownFn(<UseThree>model, <THREE.Object3D>group, event, (intersects) => {
+      if (obfurageType === 'obfurageBase') {
+        // obfurageBaseObj.mousedownModel.call(obfurageBaseObj, intersects);
+      }
+    });
+    console.log('摄像头控制信息', model?.orbitControls, model?.camera);
+  }
+};
+
+const addMouseEvent = () => {
+  // 定义鼠标点击事件
+  model?.canvasContainer?.addEventListener('mousedown', mouseEvent.bind(null));
+};
+
+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();
+  }
+};
+
+export const addChamberText = (selectData) => {
+  if (obfurageType === 'obfurageBase') {
+    // return obfurageBaseObj.addChamberText.call(obfurageBaseObj, selectData);
+  }
+};
+
+// 切换模型类型
+export const setModelType = (type) => {
+  obfurageType = type;
+  return new Promise((resolve) => {
+    if (obfurageType === 'obfurageBase' && obfurageBaseObj && obfurageBaseObj.group) {
+      group = obfurageBaseObj.group;
+      const oldCameraPosition = { x: 124.736, y: 63.486, z: 103.337 };
+      model?.scene?.add(obfurageBaseObj.group);
+      setModalCenter(model?.scene);
+      model?.camera?.position.set(0, 0, 300);
+      setTimeout(async () => {
+        await animateCamera(
+          oldCameraPosition,
+          { x: 0, y: 0, z: 0 },
+          { x: 11.19, y: 400.13, z: 344.2 },
+          { x: 10.446, y: 0.875, z: -0.993 },
+          model,
+          0.8
+        );
+      }, 300);
+
+      resolve(null);
+    }
+  });
+};
+
+export const mountedThree = () => {
+  return new Promise(async (resolve) => {
+    model = new UseThree('#obfurage3D');
+    model.setEnvMap('test1');
+    model.renderer.toneMappingExposure = 1.0;
+
+    obfurageBaseObj = new ChamberBase(model);
+    await obfurageBaseObj.mountedThree();
+
+    addMouseEvent();
+    // render();
+    model.animate();
+    resolve(null);
+  });
+};
+
+export const destroy = () => {
+  if (model) {
+    model.isRender = false;
+    console.log('场景销毁前信息----------->', model.renderer?.info);
+    obfurageBaseObj?.destroy();
+    obfurageBaseObj = undefined;
+    group = undefined;
+    model.destroy();
+    model = undefined;
+  }
+};

+ 24 - 92
src/views/vent/monitorManager/sensorMonitor/index.vue

@@ -15,7 +15,7 @@
           ></Select>
           <MonitorTable
             ref="SensorMonitorRef"
-            columnsType="modelsensor_monitor"
+            :columnsType="deviceKind+'_monitor'"
             :dataSource="dataSource"
             design-scope="modelsensor_monitor"
             @select-row="getSelectRow"
@@ -100,6 +100,7 @@
   import { list, getTableList } from './sensor.api';
   import { list as baseList } from '../../deviceManager/sensorTabel/sensor.api';
   import { deviceList } from '../../deviceManager/comment/pointTabel/point.api';
+  import { getTableHeaderColumns } from '/@/hooks/web/useWebColumns';
 
   const SensorMonitorRef = ref();
   const deviceBaseList = ref([]);
@@ -161,7 +162,7 @@
 
   // https获取监测数据
   let timer: null | NodeJS.Timeout = null;
-  const getMonitor = () => {
+  const getMonitor = (flag?) => {
     if (Object.prototype.toString.call(timer) === '[object Null]') {
       timer = setTimeout(async () => {
         await getDataSource(deviceKind.value);
@@ -169,7 +170,7 @@
           timer = null;
         }
         getMonitor();
-      }, 1000);
+      }, flag? 0 :1000);
     }
   };
 
@@ -185,9 +186,9 @@
     const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
     Object.assign(selectData, data);
 
-    if (chartsColumns.value.length <= 0 && selectData.deviceType) {
-      handleChange(selectData.deviceType);
-    }
+    // if (chartsColumns.value.length <= 0 && selectData.deviceType) {
+    //   handleChange(selectData.deviceType);
+    // }
 
     // 如果当前为监测tab
     if (activeKey.value === '1') {
@@ -211,10 +212,10 @@
     const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
     Object.assign(selectData, selectRow, baseData);
     if (selectData.deviceType) {
-      if (timer) {
-        clearTimeout(timer);
-        timer = undefined;
-      }
+      // if (timer) {
+      //   clearTimeout(timer);
+      //   timer = undefined;
+      // }
       if (activeKey.value === '1') detailDataSource.value = [];
       if (activeKey.value === '2') historyDataSource.value = [];
       handleChange(selectData.deviceType);
@@ -229,99 +230,27 @@
   };
 
   function handleChange(type) {
-    if (type === 'modelsensor_multi') {
-      chartsColumns.value = [
-        {
-          legend: '气压值',
-          seriesName: '(Pa)',
-          ymax: 50,
-          yname: 'Pa',
-          linetype: 'bar',
-          yaxispos: 'left',
-          color: '#37BCF2',
-          sort: 1,
-          xRotate: 0,
-          dataIndex: 'pa',
-        },
-        {
-          legend: '温度',
-          seriesName: '(℃)',
-          ymax: 50,
-          yname: '℃',
-          linetype: 'bar',
-          yaxispos: 'right',
-          color: '#FC4327',
-          sort: 2,
-          xRotate: 0,
-          dataIndex: 'temperature',
-        },
-      ];
-    } else if (type === 'modelsensor_smoke') {
-      chartsColumns.value = [
-        {
-          legend: '烟雾浓度',
-          seriesName: '(%)',
-          ymax: 20,
-          yname: '%',
-          linetype: 'bar',
-          yaxispos: 'left',
-          color: '#37BCF2',
-          sort: 1,
-          xRotate: 0,
-          dataIndex: 'windSpeed',
-        },
-      ];
-    } else if (type === 'modelsensor_speed') {
-      chartsColumns.value = [
-        {
-          legend: '风速',
-          seriesName: '(m/s)',
-          ymax: 20,
-          yname: 'm/s',
-          linetype: 'bar',
-          yaxispos: 'left',
-          color: '#37BCF2',
-          sort: 1,
-          xRotate: 0,
-          dataIndex: 'windSpeed',
-        },
-      ];
-    } else if (type === 'modelsensor_gas') {
-      chartsColumns.value = [
-        {
-          legend: '甲烷',
-          seriesName: '(%)',
-          ymax: 20,
-          yname: '%',
-          linetype: 'bar',
-          yaxispos: 'left',
-          color: '#37BCF2',
-          sort: 1,
-          xRotate: 0,
-          dataIndex: 'windSpeed',
-        },
-      ];
-    }
-
+    chartsColumns.value = getTableHeaderColumns(type+'_chart')
     console.log('[ type ] >', type, chartsColumns.value);
   }
 
   function handleSensorChange(type) {
+    if (timer) {
+      clearTimeout(timer);
+      timer = undefined;
+    }
     setTimeout(() => {
       handleChange(type);
-      if (timer) {
-        clearTimeout(timer);
-        timer = null;
-      }
+      timer = null;
       dataSource.value = [];
       detailDataSource.value = [];
-      getMonitor();
-    }, 50);
+      getMonitor(true);
+    }, 500);
   }
 
   function refreshEchatrs() {
     timer = null;
-    getMonitor();
+    getMonitor(true);
     console.log('echarts 刷新');
   }
   function historyDataSourceChange(dataSource) {
@@ -334,10 +263,13 @@
   });
 
   onMounted(async () => {
-    getMonitor();
     const res = await deviceList({ devicetype: 'modelsensor' });
     const obj = res.find((item) => item.itemValue === 'modelsensor');
     deviceTypeOption.value = obj ? obj.children : [];
+    deviceKind.value = deviceTypeOption.value[0]['itemValue'] || 'modelsensor_monitor'
+    handleChange(deviceKind.value)
+    await getMonitor(true);
+
   });
   onUnmounted(() => {
     if (timer) {

+ 9 - 11
src/views/vent/monitorManager/tunFaceMonitor/components/tunFaceDustHome.vue

@@ -111,9 +111,10 @@ function getMonitor(flag?) {
 };
 
 async function getDataSource(systemID) {
-  const res = await list({ devicetype: 'sys', systemID });
-  const result = res.msgTxt;
-  result.forEach(item => {
+  const res = await list({ devicetype: 'sys', systemID, type: 'dustS' });
+  const result = res.deviceInfo;
+  for (const key in result) {
+    const item = result[key]
     // ''.startsWith
     if (item.type.startsWith('gate')) {
       // 风门
@@ -151,14 +152,11 @@ async function getDataSource(systemID) {
         return Object.assign(data, readData);
       })
     }
-    if (item.type === 'sys') {
-      workFaceSource.value = Object.assign(item['datalist'][0], item['datalist'][0].readData);
-    }
-    if (item.type === 'surface_history') {
-      workFaceHistorySource.value = item['datalist'][0]
-    }
-    loading.value = false;
-  })
+    
+  }
+  loading.value = false;
+  workFaceHistorySource.value = res['sysInfo']['history']
+  workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
 }
 
 function toDetail() {

+ 10 - 11
src/views/vent/monitorManager/tunFaceMonitor/components/tunFaceFireHome.vue

@@ -203,9 +203,10 @@ function getMonitor(flag?) {
 };
 
 async function getDataSource(systemID) {
-  const res = await list({ devicetype: 'sys', systemID });
-  const result = res.msgTxt;
-  result.forEach(item => {
+  const res = await list({ devicetype: 'sys', systemID, type: 'fireS' });
+  const result = res.deviceInfo;
+  for (const key in result) {
+    const item = result[key]
     if (item.type.startsWith('spray_auto')) {
       // 喷淋
       sprayDataSource.value = item['datalist'].filter((data: any) => {
@@ -225,14 +226,11 @@ async function getDataSource(systemID) {
       // 注氮
       nitrogenDataSource.value = Object.assign(item['datalist'][0], item['datalist'][0]['readData'])
     }
-    if (item.type === 'sys') {
-      workFaceSource.value = Object.assign(item['datalist'][0], item['datalist'][0].readData);
-    }
-    if (item.type === 'surface_history') {
-      workFaceHistorySource.value = item['datalist'][0]
-    }
-    loading.value = false;
-  })
+    
+  }
+  loading.value = false;
+  workFaceHistorySource.value = res['sysInfo']['history']
+  workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
 }
 
 function toDetail() {
@@ -246,6 +244,7 @@ function changeType(e:Event, item) {
 function handlerDevice(param: string | Object) {
 
 }
+
 // 喷粉操作
 function handleSpray() {
   //

+ 50 - 21
src/views/vent/monitorManager/tunFaceMonitor/components/tunFaceHome.vue

@@ -18,7 +18,7 @@
 
                     <div class="param-val-box">
                       <div class="param-val-icon"></div>
-                      <div class="param-val">3000</div>
+                      <div class="param-val">{{ workFaceSource['jin'] || '-' }}</div>
                     </div>
                   </div>
                 </div>
@@ -30,7 +30,7 @@
                     </div>
                     <div class="param-val-box">
                       <div class="param-val-icon"></div>
-                      <div class="param-val">3500</div>
+                      <div class="param-val">{{ workFaceSource['hui']  || '-' }}</div>
                     </div>
                   </div>
                 </div>
@@ -42,7 +42,7 @@
                     </div>
                     <div class="param-val-box">
                       <div class="param-val-icon"></div>
-                      <div class="param-val">2800</div>
+                      <div class="param-val">-</div>
                     </div>
                   </div>
                 </div>
@@ -59,25 +59,25 @@
           <template #container>
             <div class="warning-monitor">
               <div class="warning-item">
-                <div class="title">通风</div>
+                <div class="title" :class="{ 'active-title': warningType == 'ventS' }" @click="showWarningList('ventS')">通风</div>
                 <div class="state-box">
                   <span class="signal-round signal-round-blue"></span><span class="state vent-margin-l-8">正常</span>
                 </div>
               </div>
               <div class="warning-item">
-                <div class="title">火灾</div>
+                <div class="title" :class="{ 'active-title': warningType == 'fireS' }" @click="showWarningList('fireS')">火灾</div>
                 <div class="state-box">
                   <span class="signal-round signal-round-blue"></span><span class="state vent-margin-l-8">正常</span>
                 </div>
               </div>
               <div class="warning-item">
-                <div class="title">粉尘</div>
+                <div class="title" :class="{ 'active-title': warningType == 'dustS' }" @click="showWarningList('dustS')">粉尘</div>
                 <div class="state-box">
                   <span class="signal-round signal-round-blue"></span><span class="state vent-margin-l-8">正常</span>
                 </div>
               </div>
               <div class="warning-item">
-                <div class="title">瓦斯</div>
+                <div class="title" :class="{ 'active-title': warningType == 'gasS' }" @click="showWarningList('gasS')">瓦斯</div>
                 <div class="state-box">
                   <span class="signal-round signal-round-blue"></span><span class="state vent-margin-l-8">正常</span>
                 </div>
@@ -159,7 +159,7 @@
                 <div class="">0</div>
               </div>
               <div style="height: 180px; overflow-y: auto; position: relative;">
-                <dv-scroll-board ref="scrollBoard" :config="locationConfig" style="width: 100%; height: 200px; overflow-y: auto; " />
+                <dv-scroll-board v-if="warningType" ref="scrollBoard" :config="locationConfig" style="width: 100%; height: 200px; overflow-y: auto; " />
               </div>
             </template>
           </ventBox1>
@@ -174,7 +174,7 @@
 
 <script setup lang="ts">
 
-import { onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps } from 'vue';
+import { nextTick, onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps } from 'vue';
 import { list } from '../tunFace.api';
 import ventBox1 from '/@/components/vent/ventBox1.vue'
 import { ScrollBoard as DvScrollBoard } from '@kjgl77/datav-vue3';
@@ -189,7 +189,7 @@ const props = defineProps({
     require: true
   }
 })
-
+const player1 = ref(null)
 const loading = ref(false)
 
 // 默认初始是第一行
@@ -201,12 +201,29 @@ const compressorMode = ref(1)
 
 // 监测数据
 const selectData = reactive({});
+const warnInfo = reactive({
+  dustS: { warningList: [], dataList: [] },
+  fireS: { warningList: [], dataList: [] },
+  gasS: { warningList: [], dataList: [] },
+  synthesizeS: { warningList: [], dataList: [] },
+  ventS: { warningList: [], dataList: [] },
+})
+const warningType = ref('ventS')
 
 
 const flvURL1 = () => {
   return `https://sf1-hscdn-tos.pstatp.com/obj/media-fe/xgplayer_doc_video/flv/xgplayer-demo-360p.flv`;
 };
 
+function showWarningList(type) {
+  warningType.value = ''
+  nextTick(() => {
+    warningType.value = type
+    warningConfig.data = warnInfo[type]['dataList']
+  })
+
+}
+
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
 function getMonitor(flag?) {
@@ -226,17 +243,12 @@ function getMonitor(flag?) {
 };
 
 async function getDataSource(systemID) {
-  const res = await list({ devicetype: 'sys', systemID });
-  const result = res.msgTxt;
-  result.forEach(item => {
+  const res = await list({ devicetype: 'sys', systemID, type: 'all' });
+  const result = res.deviceInfo;
+  for (const key in result) {
+    const item = result[key]
     // ''.startsWith
-    if (item.type === 'sys') {
-      workFaceSource.value = Object.assign(item['datalist'][0], item['datalist'][0].readData);
-    }
-    else if (item.type === 'surface_history') {
-      workFaceHistorySource.value = item['datalist'][0]
-    }
-    else if (item.type === 'location_normal') {
+    if (item.type === 'location') {
       const locationData = <any[]>[]
       item['datalist'].filter((data: any) => {
         locationData.push([data['strname'], data['strinstallpos'], data['readData']['flen']])
@@ -246,9 +258,26 @@ async function getDataSource(systemID) {
       locationConfig.data = locationData
     }
     loading.value = false;
-  })
+  }
+  workFaceHistorySource.value = res['sysInfo']['history']
+  workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
+  warnInfo.dustS = { warningList: res['warnInfo']['dustS']['devices'] || [], dataList: initWarningData(res['warnInfo']['dustS']['devices']) }
+  warnInfo.fireS = { warningList: res['warnInfo']['fireS']['devices'] || [], dataList: initWarningData(res['warnInfo']['fireS']['devices']) }
+  warnInfo.gasS = { warningList: res['warnInfo']['gasS']['devices'] || [], dataList: initWarningData(res['warnInfo']['gasS']['devices']) }
+  warnInfo.synthesizeS = { warningList: res['warnInfo']['synthesizeS']['devices'] || [], dataList: initWarningData(res['warnInfo']['synthesizeS']['devices']) }
+  warnInfo.ventS = { warningList: res['warnInfo']['ventS']['devices'] || [], dataList: initWarningData(res['warnInfo']['ventS']['devices']) }
 }
 
+function initWarningData(devices: any[]) {
+  const dataArr = <any[]>[]
+  for (let i = 0; i < devices.length; i++) {
+    const item = devices[i]
+    dataArr.push([item['typeName'], item['warnLevel_str'], item['warnTime']])
+  }
+  return dataArr
+}
+
+
 function toDetail() {
 
 }

+ 11 - 42
src/views/vent/monitorManager/tunFaceMonitor/components/tunFaceVentHome.vue

@@ -221,12 +221,12 @@ const loading = ref(false)
 const compressorMode = ref(1)
 
 // 默认初始是第一行
-const openDust = ref(false)
 const workFaceSource = ref({});
 const workFaceHistorySource = ref([])
 const gateDataSource = ref([]);
 const windowDataSource = ref([]);
 const windDataSource = ref([]);
+
 const frequencyVal = ref(0)
 const windLockVal = ref(0)
 const gasLockVal = ref(0)
@@ -240,7 +240,7 @@ const selectData = reactive({});
 
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
-function getMonitor() {
+function getMonitor(flag?) {
   if (Object.prototype.toString.call(timer) === '[object Null]') {
     timer = setTimeout(async () => {
       if (props.deviceId) {
@@ -252,14 +252,15 @@ function getMonitor() {
       }
       await getMonitor();
       loading.value = false
-    }, 1000);
+    }, flag ? 0 : 1000);
   }
 };
 
 async function getDataSource(systemID) {
-  const res = await list({ devicetype: 'sys', systemID });
-  const result = res.msgTxt;
-  result.forEach(item => {
+  const res = await list({ devicetype: 'sys', systemID, type: 'ventS' });
+  const result = res.deviceInfo;
+  for (const key in result) {
+    const item = result[key]
     // ''.startsWith
     if (item.type.startsWith('gate')) {
       // 风门
@@ -283,48 +284,16 @@ async function getDataSource(systemID) {
         return Object.assign(data, readData);
       })
     }
-    if (item.type === 'modelsensor_temperature') {
-      // 温度
-      temperatureDataSource.value = item['datalist'].filter((data: any) => {
-        const readData = data.readData;
-        return Object.assign(data, readData);
-      })
-    }
-    if (item.type === 'modelsensor_fire') {
-      // 火焰
-      fireDataSource.value = item['datalist'].filter((data: any) => {
-        const readData = data.readData;
-        return Object.assign(data, readData);
-      })
-    }
-    if (item.type === 'sys') {
-      workFaceSource.value = Object.assign(item['datalist'][0], item['datalist'][0].readData);
-    }
-    if (item.type === 'surface_history') {
-      workFaceHistorySource.value = item['datalist'][0]
-    }
+    workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
+    workFaceHistorySource.value = res['sysInfo']['history']
     loading.value = false;
-  })
+  }
 }
 
 function toDetail() {
 
 }
 
-function handleChange(value) {
-  const disasterParamVal = disasterParam.value.filter(item => {
-    if (item.title === '烟雾报警持续时间(s)') {
-      item.value = value
-    }
-    return item
-  })
-  disasterParam.value = disasterParamVal
-}
-
-function changeType(e: Event, item) {
-  item.value = e.target?.value
-}
-
 
 onBeforeMount(() => {
 
@@ -333,7 +302,7 @@ onBeforeMount(() => {
 onMounted(async () => {
   loading.value = true;
   timer = null
-  await getMonitor()
+  await getMonitor(true)
 });
 onUnmounted(() => {
   if (timer) {

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

@@ -14,7 +14,7 @@
     <div id="tunFace3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
   </div>
   <div class="scene-box">
-    <customHeader :fieldNames="{ label: 'strinstallpos', value: 'deviceID', options: 'children' }" :options = 'options' @change="getSelectRow" :optionValue="optionValue">掘进工作面智能管控</customHeader>
+    <customHeader :fieldNames="{ label: 'systemname', value: 'id', options: 'children' }" :options = 'options' @change="getSelectRow" :optionValue="optionValue">掘进工作面智能管控</customHeader>
     <div class="center-container">
       <template v-if="activeKey == 'monitor'">
         <div class="monitor-nav">
@@ -128,7 +128,7 @@ async function getDeviceList() {
 };
 
 async function getSysDataSource() {
-  const res = await getTableList({ devicetype: 'sys_surface_juejin', pagetype: 'normal' });
+  const res = await getTableList({ strtype: 'sys_surface_juejin', pagetype: 'normal' });
   if (!options.value) {
     // 初始时选择第一条数据
     options.value = res.records || [];

+ 12 - 1
src/views/vent/monitorManager/windowMonitor/index.vue

@@ -139,6 +139,9 @@
   import LivePlayer from '@liveqing/liveplayer-v3';
   import { setDivHeight } from '/@/utils/event';
   import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
+  import { useRouter } from 'vue-router';
+
+  const { currentRoute } = useRouter();
 
   const MonitorDataTable = ref()
 
@@ -167,7 +170,7 @@
   };
 
   // 默认初始是第一行
-  const selectRowIndex = ref(0);
+  const selectRowIndex = ref(-1);
   const dataSource = ref([]);
 
   // webSocket 请求
@@ -243,6 +246,14 @@
       const readData = data.readData;
       data = Object.assign(data, readData);
     });
+    if (dataSource.value.length > 0 && selectRowIndex.value == -1) {
+      // 初始打开页面
+      if (currentRoute.value['query'] && currentRoute.value['query']['id']) {
+        MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']])
+      } else {
+        MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID'])
+      }
+    }
     const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
     return data;
   };

+ 12 - 1
src/views/vent/monitorManager/windrectMonitor/index.vue

@@ -162,6 +162,9 @@
   import { chartsColumns } from './windrect.data';
   import { setDivHeight } from '/@/utils/event';
   import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
+  import { useRouter } from 'vue-router';
+
+  const { currentRoute } = useRouter();
 
   const MonitorDataTable = ref()
 
@@ -178,7 +181,7 @@
   const activeKey = ref('1');
   const loading = ref(false);
   // 默认初始是第一行
-  const selectRowIndex = ref(0);
+  const selectRowIndex = ref(-1);
   // 监测数据
   const selectData = reactive({
     deviceID: '',
@@ -240,6 +243,14 @@
               const readData = data.readData;
               data = Object.assign(data, readData);
             });
+            if (dataSource.value.length > 0 && selectRowIndex.value == -1) {
+              // 初始打开页面
+              if (currentRoute.value['query'] && currentRoute.value['query']['id']) {
+                MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']])
+              } else {
+                MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID'])
+              }
+            }
             const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
             Object.assign(selectData, data);
             addMonitorText(selectData);

+ 2 - 2
src/views/vent/monitorManager/workFaceMonitor/components/workFaceDustHome.vue

@@ -203,9 +203,9 @@ async function getDataSource(systemID) {
         return Object.assign(data, readData);
       })
     }
-    loading.value = false;
   }
-  workFaceHistorySource.value = res['surface_history'][0]
+  loading.value = false;
+  workFaceHistorySource.value = res['sysInfo']['history']
   workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
 }
 

+ 3 - 2
src/views/vent/monitorManager/workFaceMonitor/components/workFaceFireHome.vue

@@ -362,9 +362,10 @@ async function getDataSource(systemID) {
       // 注氮
       nitrogenDataSource.value = Object.assign(item['datalist'][0], item['datalist'][0]['readData'])
     }
-    loading.value = false;
+    
   }
-  workFaceHistorySource.value = res['surface_history'][0]
+  loading.value = false;
+  workFaceHistorySource.value = res['sysInfo']['history']
   workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
 }
 

+ 1 - 1
src/views/vent/monitorManager/workFaceMonitor/components/workFaceGasHome.vue

@@ -202,7 +202,7 @@ async function getDataSource(systemID) {
     loading.value = false;
   }
 
-  workFaceHistorySource.value = res['surface_history'][0]
+  workFaceHistorySource.value = res['sysInfo']['history']
   workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
 }
 

+ 11 - 17
src/views/vent/monitorManager/workFaceMonitor/components/workFaceHome.vue

@@ -18,7 +18,7 @@
 
                     <div class="param-val-box">
                       <div class="param-val-icon"></div>
-                      <div class="param-val">{{ workFaceSource['jin'] }}</div>
+                      <div class="param-val">{{ workFaceSource['jin'] || '-' }}</div>
                     </div>
                   </div>
                 </div>
@@ -30,7 +30,7 @@
                     </div>
                     <div class="param-val-box">
                       <div class="param-val-icon"></div>
-                      <div class="param-val">{{ workFaceSource['hui'] }}</div>
+                      <div class="param-val">{{ workFaceSource['hui']|| '-' }}</div>
                     </div>
                   </div>
                 </div>
@@ -62,7 +62,7 @@
             <div class="input-box">
               <div v-for="(item, index) in compressorMonitor" class="input-item" :key="index">
                 <div class="title">{{ item.title }}:</div>
-                <div class="value">{{ junyaInfo[item.code] }}</div>
+                <div class="value">{{ junyaInfo && junyaInfo[item.code]  ? junyaInfo[item.code] : '-' }}</div>
                 <div class="unit">{{ item.unit }}</div>
               </div>
             </div>
@@ -197,7 +197,7 @@ function showWarningList(type) {
 
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
-function getMonitor(flag) {
+function getMonitor(flag?) {
   if (Object.prototype.toString.call(timer) === '[object Null]') {
     timer = setTimeout(async () => {
       if (props.deviceId) {
@@ -207,7 +207,7 @@ function getMonitor(flag) {
       if (timer) {
         timer = null;
       }
-      await getMonitor({});
+      await getMonitor();
       loading.value = false
     }, flag ? 0 : 1000);
   }
@@ -267,14 +267,14 @@ async function getDataSource(systemID) {
   }
 
   junyaInfo.value = res['junyaInfo']
-  workFaceHistorySource.value = res['surface_history'][0]
+  workFaceHistorySource.value = res['sysInfo']['history']
   workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
   
-  warnInfo.dustS = { warningList: res['warnInfo']['dustS']['devices'] || [], dataList: initWarningData(res['warnInfo']['dustS']['devices']) }
-  warnInfo.fireS = { warningList: res['warnInfo']['fireS']['devices'] || [], dataList: initWarningData(res['warnInfo']['fireS']['devices']) }
-  warnInfo.gasS = {warningList: res['warnInfo']['gasS']['devices'] || [], dataList: initWarningData(res['warnInfo']['gasS']['devices']) }
-  warnInfo.synthesizeS = {warningList: res['warnInfo']['synthesizeS']['devices'] || [], dataList: initWarningData(res['warnInfo']['synthesizeS']['devices']) }
-  warnInfo.ventS = {warningList: res['warnInfo']['ventS']['devices'] || [], dataList: initWarningData(res['warnInfo']['ventS']['devices']) }
+  if(res['warnInfo']['dustS']) warnInfo.dustS = { warningList: res['warnInfo']['dustS']['devices'] || [], dataList: initWarningData(res['warnInfo']['dustS']['devices']) }
+  if (res['warnInfo']['fireS']) warnInfo.fireS = { warningList: res['warnInfo']['fireS']['devices'] || [], dataList: initWarningData(res['warnInfo']['fireS']['devices']) }
+  if (res['warnInfo']['gasS']) warnInfo.gasS = {warningList: res['warnInfo']['gasS']['devices'] || [], dataList: initWarningData(res['warnInfo']['gasS']['devices']) }
+  if (res['warnInfo']['warnInfo']) warnInfo.synthesizeS = {warningList: res['warnInfo']['synthesizeS']['devices'] || [], dataList: initWarningData(res['warnInfo']['synthesizeS']['devices']) }
+  if (res['warnInfo']['ventS']) warnInfo.ventS = {warningList: res['warnInfo']['ventS']['devices'] || [], dataList: initWarningData(res['warnInfo']['ventS']['devices']) }
 }
 
 function initWarningData(devices: any[]) {
@@ -341,12 +341,6 @@ onUnmounted(() => {
         position: relative;
         top: -5px;
       }
-      .title{
-        cursor: pointer;
-      }
-      .active-title{
-        color: aqua;
-      }
     }
   }
   

+ 4 - 5
src/views/vent/monitorManager/workFaceMonitor/components/workFaceVentHome.vue

@@ -231,7 +231,7 @@ function saveVentData(data) {
 
 // https获取监测数据
 let timer: null | NodeJS.Timeout = null;
-function getMonitor() {
+function getMonitor(flag?) {
   if (Object.prototype.toString.call(timer) === '[object Null]') {
     timer = setTimeout(async () => {
       if (props.deviceId) {
@@ -243,7 +243,7 @@ function getMonitor() {
       }
       await getMonitor();
       loading.value = false
-    }, 1000);
+    }, flag? 0 : 1000);
   }
 };
 
@@ -291,9 +291,8 @@ async function getDataSource(systemID) {
     }
 
     workFaceSource.value = Object.assign(res['sysInfo'], res['sysInfo']['readData']);
-    workFaceHistorySource.value = res['surface_history'][0]
+    workFaceHistorySource.value = res['sysInfo']['history']
     loading.value = false;
-    
   }
 
 }
@@ -324,7 +323,7 @@ onBeforeMount(() => {
 onMounted(async () => {
   loading.value = true;
   timer = null
-  await getMonitor()
+  await getMonitor(true)
 });
 onUnmounted(() => {
   if (timer) {

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

@@ -25,9 +25,9 @@ const mouseEvent = (event) => {
 
 const mouseUp = () => {
   if (!model) return;
+  model.canvasContainer?.removeEventListener('mousemove', mousemove);
   mouseUpFn(model, 0.2);
   workFaceObj?.mouseUpModel.call(workFaceObj);
-  model.canvasContainer?.removeEventListener('mousemove', mousemove);
 };
 
 const mousemove = () => {

+ 1 - 1
src/views/vent/performance/fileDetail/fileDetail.api.ts

@@ -54,7 +54,7 @@ export const downLoad = (params) => defHttp.post({ url: Api.downLoad, params, re
  * 删除文件/文件夹
  */
 export const deleteById = (params, handleSuccess) => {
-  return defHttp.delete({ url: Api.deleteById, params: params.id }, { joinParamsToUrl: true }).then(() => {
+  return defHttp.delete({ url: Api.deleteById, params }, { joinParamsToUrl: true }).then(() => {
     handleSuccess();
   });
 };