Browse Source

关键路线编辑添加字段、优化内容不显示问题

hongrunxia 1 year ago
parent
commit
a258607cc9
60 changed files with 502 additions and 292 deletions
  1. 1 1
      src/components/Table/src/hooks/useColumnsCache.ts
  2. 0 1
      src/design/vent/comment.less
  3. 5 3
      src/hooks/web/useTitle.ts
  4. 1 1
      src/layouts/default/header/components/Breadcrumb.vue
  5. 25 7
      src/layouts/default/sider/bottomSideder.vue
  6. 3 5
      src/layouts/iframe/useFrameKeepAlive.ts
  7. 3 7
      src/utils/ventutil.ts
  8. 105 13
      src/views/vent/deviceManager/comment/DeviceModal.vue
  9. 10 6
      src/views/vent/deviceManager/comment/NormalTable.vue
  10. 29 16
      src/views/vent/deviceManager/comment/pointTabel/WorkFacePointTable.vue
  11. 0 52
      src/views/vent/deviceManager/comment/pointTabel/point.data.ts
  12. 3 7
      src/views/vent/deviceManager/deviceTable/index.vue
  13. 1 1
      src/views/vent/deviceManager/equipManager/component/normalBtnTable.vue
  14. 1 1
      src/views/vent/monitorManager/balancePressMonitor/components/balancePressHandleHistory.vue
  15. 1 1
      src/views/vent/monitorManager/balancePressMonitor/index.vue
  16. 1 1
      src/views/vent/monitorManager/balancePressMonitor1/index.vue
  17. 1 1
      src/views/vent/monitorManager/beltTunMonitor/components/beltTunAlarmHistory.vue
  18. 1 1
      src/views/vent/monitorManager/beltTunMonitor/components/beltTunHandleHistory.vue
  19. 1 1
      src/views/vent/monitorManager/beltTunMonitor/index.vue
  20. 62 25
      src/views/vent/monitorManager/camera/index.vue
  21. 1 1
      src/views/vent/monitorManager/chamberMonitor/components/chamberAlarmHistory.vue
  22. 2 2
      src/views/vent/monitorManager/chamberMonitor/components/chamberHandleHistory.vue
  23. 1 1
      src/views/vent/monitorManager/chamberMonitor/index.vue
  24. 58 22
      src/views/vent/monitorManager/comment/GroupMonitorTable.vue
  25. 3 0
      src/views/vent/monitorManager/comment/HistoryTable.vue
  26. 1 0
      src/views/vent/monitorManager/comment/MonitorTable.vue
  27. 1 1
      src/views/vent/monitorManager/compressor/components/nitrogenAlarmHistory.vue
  28. 1 1
      src/views/vent/monitorManager/compressor/components/nitrogenHandleHistory.vue
  29. 1 1
      src/views/vent/monitorManager/compressor/index.vue
  30. 1 1
      src/views/vent/monitorManager/compressor/nitrogen.data.ts
  31. 3 0
      src/views/vent/monitorManager/deviceMonitor/components/device/device.data.ts
  32. 74 33
      src/views/vent/monitorManager/deviceMonitor/components/device/index.vue
  33. 6 6
      src/views/vent/monitorManager/deviceMonitor/index.vue
  34. 2 2
      src/views/vent/monitorManager/fanLocalMonitor/index.vue
  35. 1 1
      src/views/vent/monitorManager/fiberMonitor/index.vue
  36. 4 1
      src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpAlarmHistory.vue
  37. 5 2
      src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHandleHistory.vue
  38. 9 9
      src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHome.vue
  39. 2 1
      src/views/vent/monitorManager/gasPumpMonitor/gasPump.threejs.ts
  40. 3 2
      src/views/vent/monitorManager/gasPumpMonitor/gasPump.threejs.under.ts
  41. 11 4
      src/views/vent/monitorManager/gasPumpMonitor/index.vue
  42. 2 2
      src/views/vent/monitorManager/gateMonitor/index.vue
  43. 1 1
      src/views/vent/monitorManager/groutMonitor/components/groutAlarmHistory.vue
  44. 2 2
      src/views/vent/monitorManager/groutMonitor/components/groutHandleHistory.vue
  45. 5 3
      src/views/vent/monitorManager/groutMonitor/index.vue
  46. 2 2
      src/views/vent/monitorManager/mainFanMonitor/index.vue
  47. 1 1
      src/views/vent/monitorManager/nitrogen/components/nitrogenAlarmHistory.vue
  48. 1 1
      src/views/vent/monitorManager/nitrogen/components/nitrogenHandleHistory.vue
  49. 2 2
      src/views/vent/monitorManager/obfurage1Monitor/index.vue
  50. 1 1
      src/views/vent/monitorManager/obfurageMonitor/components/obfurageAlarmHistory.vue
  51. 2 2
      src/views/vent/monitorManager/obfurageMonitor/components/obfurageHandleHistory.vue
  52. 1 1
      src/views/vent/monitorManager/obfurageMonitor/index.vue
  53. 9 4
      src/views/vent/monitorManager/safetyMonitor/index.vue
  54. 1 1
      src/views/vent/monitorManager/sensorMonitor/index.vue
  55. 2 2
      src/views/vent/monitorManager/tunFaceMonitor/components/tunFaceHandleHistory.vue
  56. 1 1
      src/views/vent/monitorManager/tunFaceMonitor/index.vue
  57. 2 2
      src/views/vent/monitorManager/windowMonitor/index.vue
  58. 20 19
      src/views/vent/monitorManager/windrectMonitor/index.vue
  59. 2 2
      src/views/vent/monitorManager/workFaceMonitor/components/workFaceHandleHistory.vue
  60. 1 1
      src/views/vent/monitorManager/workFaceMonitor/index.vue

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

@@ -14,7 +14,7 @@ export function useColumnsCache(opt, setColumns, handleColumnFixed) {
   const { createMessage: $message } = useMessage();
   // 列表配置缓存key
   const cacheKey = computed(() => {
-    const { fullPath } = router.currentRoute.value || router.currentRoute;
+    const { fullPath } = unref(router.currentRoute);
     let key = fullPath.replace(/[\/\\]/g, '_');
     const cacheKey = table.getBindValues.value.tableSetting?.cacheKey;
     if (cacheKey) {

+ 0 - 1
src/design/vent/comment.less

@@ -183,7 +183,6 @@
     border: 1px solid #ffffff22;
     height: 180px;
     width: 320px;
- 
   }
   .video-name{
     font-size: 14px;

+ 5 - 3
src/hooks/web/useTitle.ts

@@ -1,11 +1,12 @@
-import { watch, unref } from 'vue';
+import { watch, unref, ref } from 'vue';
 import { useI18n } from '/@/hooks/web/useI18n';
 import { useTitle as usePageTitle } from '@vueuse/core';
 import { useGlobSetting } from '/@/hooks/setting';
-import { useRouter } from 'vue-router';
+import { useRouter, Route } from 'vue-router';
 import { useLocaleStore } from '/@/store/modules/locale';
 
 import { REDIRECT_NAME } from '/@/router/constant';
+import { Route } from 'ant-design-vue/lib/breadcrumb/Breadcrumb';
 
 /**
  * Listening to page changes and dynamically changing site titles
@@ -17,9 +18,10 @@ export function useTitle() {
   const localeStore = useLocaleStore();
 
   const pageTitle = usePageTitle();
+  const currentRouteObj = ref<Route>(unref(currentRoute));
 
   watch(
-    [() => currentRoute.value.path, () => localeStore.getLocale],
+    [() => currentRouteObj.path, () => localeStore.getLocale],
     () => {
       const route = unref(currentRoute);
 

+ 1 - 1
src/layouts/default/header/components/Breadcrumb.vue

@@ -18,7 +18,7 @@
   import { useRouter } from 'vue-router';
   import type { Menu } from '/@/router/types';
 
-  import { defineComponent, ref, watchEffect } from 'vue';
+  import { defineComponent, ref, watchEffect, unref } from 'vue';
 
   import { Breadcrumb } from 'ant-design-vue';
   import Icon from '/@/components/Icon';

+ 25 - 7
src/layouts/default/sider/bottomSideder.vue

@@ -84,16 +84,29 @@
       function handleMenuClick(path: Menu) {
         if (route.path.startsWith('/micro-')) { 
           if (route.path.startsWith('/micro-vent-3dModal/dashboard/analysis')){
-            if(!path.path.startsWith('/micro-vent-3dModal/dashboard/analysis')){
+            
+            // if(!path.path.startsWith('/micro-vent-3dModal/dashboard/analysis')){
+            //   // window.open(href, '_blank')
+            //   router.replace(path.path)
+            // }else{
+            //   const { query } = router.resolve(path.path)
+            //   if(query){
+            //     const { type, deviceType } = query
+            //     if(type && deviceType)actions.setGlobalState({ pageObj: { pageType: type, deviceType } });
+            //   }
+            //   go(path.path);
+            // }
+            if (!path.path.startsWith('/micro-vent-3dModal/dashboard/analysis')) {
+              // const { href } = router.resolve(path.path)
               // window.open(href, '_blank')
               router.replace(path.path)
-            }else{
+            } else {
+              go(path.path);
               const { query } = router.resolve(path.path)
-              if(query){
-                const { type, deviceType } = query
-                if(type && deviceType)actions.setGlobalState({ pageObj: { pageType: type, deviceType } });
+              const { type, deviceType } = query
+              if(type && deviceType){
+                actions.setGlobalState({ pageObj: { pageType: type, deviceType } });
               }
-              go(path.path);
             }
           }else {
             actions.setGlobalState({ pageObj: { pageType: 'home' } });
@@ -113,7 +126,12 @@
       }
       function geHome() {
         isShowMenu.value = 0;
-        go('/micro-vent-3dModal/dashboard/analysis')
+        if(route.path == '/micro-vent-3dModal/dashboard/analysis'){
+          actions.setGlobalState({ pageObj: { pageType: 'home' } });
+          go('/micro-vent-3dModal/dashboard/analysis')
+        }else{
+          go('/micro-vent-3dModal/dashboard/analysis')
+        }
       }
       function closeMenu() {
         isShowMenu.value = 0;

+ 3 - 5
src/layouts/iframe/useFrameKeepAlive.ts

@@ -11,7 +11,6 @@ import { useMultipleTabSetting } from '/@/hooks/setting/useMultipleTabSetting';
 import { useRouter } from 'vue-router';
 
 export function useFrameKeepAlive() {
-
   const router = useRouter();
   const { currentRoute } = router;
   const { getShowMultipleTab } = useMultipleTabSetting();
@@ -50,15 +49,14 @@ export function useFrameKeepAlive() {
   }
 
   function hasRenderFrame(name: string) {
-
     if (!unref(getShowMultipleTab)) {
-      return router.currentRoute.value.name === name;
+      return unref(router.currentRoute).name === name;
     }
     if (!unref(getOpenTabList)) {
       return unref(getOpenTabList).includes(name);
     }
-    if(router.currentRoute.value.meta.frameSrc){
-      return true
+    if (unref(router.currentRoute).meta.frameSrc) {
+      return true;
     }
   }
 

+ 3 - 7
src/utils/ventutil.ts

@@ -49,9 +49,9 @@ export function cameraInit(dom, rtspUrl) {
   return { webRtcServer };
 }
 
-export function deviceCameraInit(cameraAddrs, player: HTMLElement, webRtcServerList: any[] = []) {
-  console.log('webRtcServerList0--------->', webRtcServerList);
 
+// 模型监测加载视频
+export function deviceCameraInit(cameraAddrs, player: HTMLElement, webRtcServerList: any[] = []) {
   const playerDoms: (HTMLVideoElement | undefined | null)[] = [];
   const webRtcServer: any[] = [];
   let livePlayerDiv: HTMLElement | null = document.getElementById('LivePlayerBox');
@@ -74,7 +74,7 @@ export function deviceCameraInit(cameraAddrs, player: HTMLElement, webRtcServerL
           const promise = new Promise(async (childResolve) => {
             let cameraNameDom: null | HTMLElement = null;
             console.log('摄像头地址--------->', cameraUrl, cameraUrl.addr.startsWith('rtsp://'), livePlayerDiv);
-            if (cameraUrl.addr.startsWith('rtsp://')) {
+            if (cameraUrl.addr && cameraUrl.addr.startsWith('rtsp://')) {
               const server = webRtcServerList.shift();
               if (server) {
                 try {
@@ -206,10 +206,6 @@ export function deviceCameraInit(cameraAddrs, player: HTMLElement, webRtcServerL
         webRtcServerList[i] = undefined;
       }
     }
-
-    console.log('webRtcServerList--------->', webRtcServerList);
-
-    console.log('playerDoms--------->', playerDoms);
     return { webRtcServerList: webRtcServer, playerDoms };
   });
 }

+ 105 - 13
src/views/vent/deviceManager/comment/DeviceModal.vue

@@ -8,6 +8,7 @@
     :showOkBtn="false"
     :footer="null"
     destroyOnClose
+    @cancel="closeModalFn"
   >
     <a-tabs v-if="props.showTab" v-model:activeKey="activeKey">
       <a-tab-pane key="1" tab="基本信息" force-render>
@@ -24,7 +25,7 @@
         />
       </a-tab-pane>
       <a-tab-pane key="3" tab="设备关联" v-if="deviceType == 'managesys'">
-        <WorkFacePointTable :columns="pointColumns" :deviceId="deviceData.id" @save="savePointData" @delete="deletePointById" />
+        <WorkFacePointTable :columns="linkColumns" :deviceId="deviceData.id"  @save="savePointData" @delete="deletePointById" />
       </a-tab-pane>
       <a-tab-pane v-if="deviceType == 'managesys'" key = "4" tab="预警条目管理">
         <ManagerWarningDeviceTable  v-if="activeKey == '4'" :deviceId="deviceData.id" />
@@ -54,7 +55,7 @@
   </BasicModal>
 </template>
 <script lang="ts" setup>
-  import { computed, unref, inject, reactive, ref } from 'vue';
+  import { computed, unref, inject, reactive, ref, watch } from 'vue';
   import { BasicModal, useModalInner } from '/@/components/Modal';
   import EditRowTable from '../../comment/EditRowTable.vue';
   import PointTable from './pointTabel/PointTable.vue';
@@ -65,47 +66,138 @@
   import WorkFacePointTable from './pointTabel/WorkFacePointTable.vue';
   import FormModal from './FormModal.vue';
   import { cloneDeep } from 'lodash-es';
-  import { columns as pointColumns } from './pointTabel/point.data';
+  import { columns as pointColumns, workFaceColumns } from './pointTabel/point.data';
   import { saveOrUpdate as pointSaveOrUpdate, deleteById as pointDeleteById } from './pointTabel/point.api';
   import { columns as cameraColumns } from './cameraTabel/camera.data';
+
   import { list as cameraList, saveOrUpdate as cameraSaveOrUpdate, deleteById as cameraDeleteById } from './cameraTabel/camera.api';
 
   const props = defineProps({
     showTab: { type: Boolean, required: true },
-    deviceType: { type: String },
+    // deviceType: { type: String },
   });
   // 声明Emits
-  const emit = defineEmits(['saveOrUpdate', 'register']);
+  const emit = defineEmits(['saveOrUpdate', 'register', 'closeModal']);
   const isUpdate = inject('isUpdate');
   const deviceData = inject('formData') as any;
+  const deviceType = inject('deviceType') as any;
   const record = reactive({ strtype: '', strname: '' });
   const activeKey = ref('1')
-
+  const linkColumns = ref<any[]>([])
+  
   //表单赋值
-  const [registerModal, { setModalProps }] = useModalInner(async (data) => {
+  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
     //重置表单
     setModalProps({ confirmLoading: false });
     Object.assign(record, data.record);
+    debugger
+    // 判断是否是关键阻力路线
+    
   });
 
   //设置标题
   const title = computed(
     () => {
       if (!unref(isUpdate)) {
-        if (record.strname || record.systemname) {
-          return `新增(${record.strname || record.systemname})`;
+        if (deviceData.strname || deviceData.systemname) {
+          return `新增(${deviceData.strname || deviceData.systemname})`;
         }
         return `新增`;
       } else {
-        if (record.strname || record.systemname) {
-          return `编辑(${record.strname || record.systemname})`;
+        if (deviceData['strtype'] == 'sys_majorpath') {
+          linkColumns.value = [...workFaceColumns, ...[
+          {
+            title: '是否在关键通风路线上',
+            width: 100,
+            dataIndex: 'pathflag',
+            edit: true,
+            editComponent: 'Switch',
+            editValueMap: (value) => {
+              return value ? '是' : '否';
+            },
+          },
+          {
+            title: '传感器类型',
+            width: 100,
+            dataIndex: 'sensorType',
+            edit: true,
+            editComponent: 'Select',
+            editComponentProps: {
+              options: [
+                {
+                  label: '多参',
+                  value: '1',
+                },
+                {
+                  label: '测风',
+                  value: '2',
+                },
+              ],
+            },
+          },
+          {
+            title: '风向',
+            width: 100,
+            dataIndex: 'winddir',
+            edit: true,
+            editComponent: 'Select',
+            editComponentProps: {
+              options: [
+                {
+                  label: '进风',
+                  value: '1',
+                },
+                {
+                  label: '用风',
+                  value: '2',
+                },
+                {
+                  label: '回风',
+                  value: '3',
+                },
+              ],
+            },
+          },
+          {
+            title: '是否总风量',
+            width: 100,
+            dataIndex: 'windflag',
+            edit: true,
+            editComponent: 'Switch',
+            editValueMap: (value) => {
+              return value ? '是' : '否';
+            },
+          },
+          {
+            title: '路线名称',
+            width: 100,
+            dataIndex: 'des',
+            edit: true,
+            editComponent: 'Input',
+          },
+          {
+            title: ' 阻力值',
+            width: 100,
+            dataIndex: 'testDrag',
+            edit: true,
+            editComponent: 'InputNumber',
+          },
+          ]]
+        } else {
+          linkColumns.value = [...workFaceColumns]
+        }
+        if (deviceData.strname || deviceData.systemname) {
+          return `编辑(${deviceData.strname || deviceData.systemname})`;
         }
         return `编辑`;
       }
     }
+  );  
 
-    // !unref(isUpdate) ? `新增(${record.strname || record.systemname})` : `编辑(${record.strname || record.systemname})`
-  );
+  const closeModalFn = () => {
+    closeModal()
+    emit('closeModal')
+  }
 
   const savePointData = (data) => {
     const record = cloneDeep(data.editValueRefs);

+ 10 - 6
src/views/vent/deviceManager/comment/NormalTable.vue

@@ -34,7 +34,8 @@
         <slot name="filterCell" v-bind="{ column, record }"></slot>
       </template>
     </BasicTable>
-    <DeviceModal @register="registerModal" @saveOrUpdate="saveOrUpdateHandler" :showTab="showTab" :deviceType="deviceType" />
+    <!-- <DeviceModal @register="registerModal" @saveOrUpdate="saveOrUpdateHandler" :showTab="showTab" :deviceType="deviceType" /> -->
+    <DeviceModal v-model:visible="modalVisible" @saveOrUpdate="saveOrUpdateHandler" :showTab="showTab"  />
   </div>
 </template>
 
@@ -113,6 +114,7 @@
 
   const isUpdate = ref(false);
   const record = reactive({});
+  const modalVisible = ref(false)
 
   const deviceTypeId = ref('')
   const pageType = ref('')
@@ -173,7 +175,7 @@
   const saveOrUpdateHandler = async (params) => {
     try {
       await props.saveOrUpdate(params, isUpdate.value);
-      !props.showTab ? closeModal() : '';
+      !props.showTab ? modalVisible.value=false : '';
       await doRequest(props.list, { confirm: false });
       emit('submitSuccess', params)
     } catch (error) {
@@ -189,7 +191,8 @@
       delete record[key];
     }
     isUpdate.value = false;
-    openModal(true);
+    // openModal(true);
+    modalVisible.value = true
   }
 
   /**
@@ -198,9 +201,10 @@
   function handleEdit(data) {
     isUpdate.value = true;
     Object.assign(record, toRaw(data));
-    openModal(true, {
-      record,
-    }, false);
+    // openModal(true, {
+    //   record,
+    // }, false);
+    modalVisible.value = true
   }
 
   /**

+ 29 - 16
src/views/vent/deviceManager/comment/pointTabel/WorkFacePointTable.vue

@@ -19,7 +19,7 @@
         <div class="device-button" :class="{ 'device-active': deviceActive == device.type }" v-for="(device, index) in relevanceDeviceData" :key="index" @click="deviceChange(index)">{{ device.typeName }}</div>
       </div>
     </div>
-    <BasicTable ref="editTable" @register="registerTable" :dataSource="dataSource" :columns="workFaceColumns" @edit-change="onEditChange" v-if="refresh">
+    <BasicTable ref="editTable" @register="registerTable" :dataSource="dataSource" :columns="columns" @edit-change="onEditChange" v-if="refresh">
       <template #action="{ record, column }">
         <TableAction :actions="createActions(record, column)" />
       </template>
@@ -34,13 +34,14 @@
   </div>
 </template>
 <script lang="ts">
-  import { defineComponent, ref, nextTick, inject, onMounted } from 'vue';
+  import { defineComponent, ref, nextTick, inject, onMounted, watch } from 'vue';
   import { BasicTable, useTable, TableAction, BasicColumn, ActionItem, EditRecordRow } from '/@/components/Table';
   import { useModal } from '/@/components/Modal';
   import { ApiTreeSelect } from '/@/components/Form';
   import DeviceModalTable from './DeviceModalTable.vue';
-  import { deviceId, workDeviceList, deviceList, list, edit, workDeviceEdit, workRelevanceDeviceTypes, workRelevanceDeviceDelete } from './point.api';
+  import { deviceId, workDeviceList, deviceList, edit, workDeviceEdit, workRelevanceDeviceTypes, workRelevanceDeviceDelete } from './point.api';
   import { workFaceColumns, deviceColumns } from './point.data';
+
   type RelevanceDeviceType = {
     datalist: [],
     type: string,
@@ -51,7 +52,7 @@
     components: { BasicTable, TableAction, DeviceModalTable, ApiTreeSelect },
     props: {
       columns: {
-        type: Array,
+        type: <any>Array,
         requried: true,
       },
       deviceId: {
@@ -79,24 +80,28 @@
       const dataSource = ref<any>([]);
       const selectionRowKeys = ref<any[]>([]);
 
+      const linkColumns = ref(props.columns)
+
       const relevanceDeviceData = ref<RelevanceDeviceType[]>([])
       const deviceNavData = ref<any[]>([]) // 关联设备
       const deviceActive = ref('') // 激活状态下的设备
 
       const [registerModal, { openModal }] = useModal();
 
-      const [registerTable, { insertTableDataRecord, reload }] = useTable({
-        title: '',
-        showIndexColumn: true,
-        showTableSetting: false,
-        tableSetting: { fullScreen: true },
-        actionColumn: {
-          width: 160,
-          title: '操作',
-          dataIndex: 'action',
-          slots: { customRender: 'action' },
-        },
-      });
+      const [registerTable, { insertTableDataRecord, setColumns }] = useTable(
+        {
+          title: '',
+          showIndexColumn: true,
+          showTableSetting: false,
+          tableSetting: { fullScreen: true },
+          actionColumn: {
+            width: 160,
+            title: '操作',
+            dataIndex: 'action',
+            slots: { customRender: 'action' },
+          },
+        }
+      );
 
       async function getDeviceNavData() {
         relevanceDeviceData.value = await workRelevanceDeviceTypes({ id: props.deviceId })
@@ -240,6 +245,13 @@
         // console.log(column, value, record);
       }
 
+      watch(() => props.columns, (columns) => {
+        debugger
+        // linkColumns.value = columns
+        // reload()
+        setColumns(columns)
+      })
+
       onMounted(async () => {
         await getOptions();
         await getDeviceNavData()
@@ -271,6 +283,7 @@
         deviceNavData,
         deviceActive,
         deviceChange,
+        linkColumns
         
         // handleChangeDeviceType,
         // handleChangeLinkCode,

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

@@ -97,58 +97,6 @@ export const workFaceColumns: BasicColumn[] = [
     editComponent: 'InputNumber',
   },
   {
-    title: '是否在关键通风路线上',
-    width: 100,
-    dataIndex: 'pathflag',
-    edit: true,
-    editComponent: 'Switch',
-    editValueMap: (value) => {
-      return value ? '是' : '否';
-    },
-  },
-  {
-    title: '传感器类型',
-    width: 100,
-    dataIndex: 'sensorType',
-    edit: true,
-    editComponent: 'Select',
-    editComponentProps: {
-      options: [
-        {
-          label: '多参',
-          value: '1',
-        },
-        {
-          label: '测风',
-          value: '2',
-        },
-      ],
-    },
-  },
-  {
-    title: '风向',
-    width: 100,
-    dataIndex: 'winddir',
-    edit: true,
-    editComponent: 'Select',
-    editComponentProps: {
-      options: [
-        {
-          label: '进风',
-          value: '1',
-        },
-        {
-          label: '用风',
-          value: '2',
-        },
-        {
-          label: '回风',
-          value: '3',
-        },
-      ],
-    },
-  },
-  {
     title: '是否参与计算风量',
     width: 100,
     dataIndex: 'windflag',

+ 3 - 7
src/views/vent/deviceManager/deviceTable/index.vue

@@ -21,7 +21,7 @@
 
 <script lang="ts" name="system-user" setup>
   //ts语法
-  import { ref, onMounted } from 'vue'
+  import { ref, onMounted, unref } from 'vue'
   import { FormSchema } from '/@/components/Table';
   import NormalTable from '../comment/NormalTable.vue';
   import { searchFormSchema } from './device.data';
@@ -129,12 +129,8 @@
   };
 
   onMounted(() => {
-    const pageType = currentRoute.value.name
-    // if(pageType === 'nitrogen'){
-    //   deviceType.value = 'pressurefan'
-    // }else {
-    //   deviceType.value = pageType
-    // }
+    const route = unref(currentRoute)
+    const pageType = route.name
     deviceType.value = pageType
     searchFormSchema[0].componentProps['dictCode'] =  `${deviceType.value}kind`
     columns.value = getTableHeaderColumns(`${deviceType.value}_list`) || []

+ 1 - 1
src/views/vent/deviceManager/equipManager/component/normalBtnTable.vue

@@ -21,7 +21,7 @@
         </a-dropdown> -->
       </template>
       <template #action="{ record }">
-        <a class="table-action-link" @click="handleEdit(record)">编辑</a>
+        <!-- <a class="table-action-link" @click="handleEdit(record)">编辑</a> -->
         <a class="table-action-link" @click="handleAdds(record)">新增下级</a>
         <a-popconfirm
           title="确定删除?"

+ 1 - 1
src/views/vent/monitorManager/balancePressMonitor/components/balancePressHandleHistory.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="handle-history">
-    <HandlerHistoryTable columns-type="operatorhistory" device-type="sys_surface_caimei"
+    <HandlerHistoryTable columns-type="operator_history" device-type="sys_surface_caimei"
       :device-list-api="getTableList.bind(null, { strtype: 'pressurefan' })" designScope="pressurefan_history" />
   </div>
 </template>

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

@@ -121,7 +121,7 @@ onBeforeMount(() => {
 });
 
 onMounted(async() => {
-  if (currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
+  if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
   await getSysDataSource()
   
 });

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

@@ -88,7 +88,7 @@
           </a-tab-pane>
           <a-tab-pane key="5" tab="操作历史">
             <div class="tab-item" v-if="activeKey === '5' ">
-              <HandlerHistoryTable columns-type="operatorhistory" device-type="sys_surface_junya" :device-list-api="baseList" designScope="alarm-history" />
+              <HandlerHistoryTable columns-type="operator_history" device-type="sys_surface_junya" :device-list-api="baseList" designScope="alarm-history" />
             </div>
           </a-tab-pane>
         </a-tabs>

+ 1 - 1
src/views/vent/monitorManager/beltTunMonitor/components/beltTunAlarmHistory.vue

@@ -4,7 +4,7 @@
       :device-list-api="workFaceDeviceList.bind(null, { id: deviceId })"
       :list="list"
       :sys-id="deviceId"
-      designScope="alarm-history" />
+      designScope="alarm-history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

+ 1 - 1
src/views/vent/monitorManager/beltTunMonitor/components/beltTunHandleHistory.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="handle-history">
-    <HandlerHistoryTable v-if="refresh" columns-type="operatorhistory" :device-type="type" :sys-id="deviceId"
+    <HandlerHistoryTable v-if="refresh" columns-type="operator_history" :device-type="type" :sys-id="deviceId"
       designScope="caimei_history" />
   </div>
 </template>

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

@@ -167,7 +167,7 @@ onBeforeMount(() => {
 });
 
 onMounted(async() => {
-  if (currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
+  if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
   await getSysDataSource()
   await getDeviceList()
   

+ 62 - 25
src/views/vent/monitorManager/camera/index.vue

@@ -1,43 +1,54 @@
 <template>
-  <div class="vent-flex-row-wrap">
-    <div v-for="i in num" :key="i">
-      <video :id="'video'+i" muted autoplay width="400" height="400"></video>
+  <div class="vent-flex-row-wrap camera-box">
+    <div v-for="(item, index) in addrList" :key="index" class="player-box">
+      <div class="player-name">{{ item.name }}</div>
+      <div>
+        <template v-if="item.addr.startsWith('rtsp://')">
+          <video :id="`video${index}`" muted="true" autoplay></video>
+        </template>
+        <template v-else>
+          <LivePlayer :videoUrl="item.addr" muted live loading/>
+        </template>
+      </div>
     </div>
   </div>
   
 </template>
 <script lang="ts" setup>
-  import {onMounted, onUnmounted} from 'vue';
+  import {onMounted, onUnmounted, ref } from 'vue';
+  import { list } from './camera.api'
+  import LivePlayer from '@liveqing/liveplayer-v3';
+
   const webRtcServerList = <any[]>[]
-  const num = 10
-  const urls = [
-    'rtsp://76.75.8.120/axis-media/media.amp',
-    'rtsp://80.90.151.112/axis-media/media.amp',
-    'rtsp://174.6.126.86/axis-media/media.amp',
-    'rtsp://213.34.225.97/axis-media/media.amp',
-    'rtsp://76.75.8.120/axis-media/media.amp',
-    'rtsp://176.65.94.105/axis-media/media.amp',
-    'rtsp://37.157.51.30/axis-media/media.amp',
-    'rtsp://64.187.201.16/axis-media/media.amp',
-    'rtsp://194.32.173.211/axis-media/media.amp',
-    'rtsp://admin:admin12345@192.168.1.64:554/Streaming/Channels/1'
-  ]
+  let addrList = ref<{ name: string, addr: string }[]>([])
+
+  async function getVideoAddrs(){
+    const result = await list({ pageSize: 10000 })
+    if(result && result.records && result.records.length > 0){
+      addrList.value = result.records.map(item => ({ addr: item['addr'], name: item['name'] }))
+    }
+  }
 
   function getVideo() {
     const ip = VUE_APP_URL.webRtcUrl;
-    for(let i =1; i<= num; i++){
-      const webRtcServer = new window['WebRtcStreamer']('video'+i , location.protocol + ip)
-      webRtcServerList.push(webRtcServer)
-      webRtcServer.connect('rtsp://admin:admin12345@192.168.183.64:554/Streaming/Channels/1')
-      // webRtcServer.connect(urls[i])
+    for(let i =1; i<= addrList.value.length; i++){
+      const item = addrList.value[i]
+      if(item.addr.startsWith('rtsp://')){
+        const webRtcServer = new window['WebRtcStreamer']('video' + i, location.protocol + ip)
+        webRtcServerList.push(webRtcServer)
+        // webRtcServer.connect('rtsp://admin:admin12345@192.168.183.64:554/Streaming/Channels/1')
+        webRtcServer.connect(item.addr)
+      }
     }
   }
 
-  onMounted(() => {
+  onMounted(async() => {
+    await getVideoAddrs()
     getVideo()
   })
 
   onUnmounted(() => {
+    const num = webRtcServerList.length
     for (let i = 0; i < num; i++) {
       webRtcServerList[i].disconnect()
       webRtcServerList[i] = null
@@ -46,6 +57,32 @@
 
 </script>
 <style lang="less">
-
-
+  .camera-box{
+    overflow-y: auto;
+    .player-box{
+      width: 314px;
+      height: 208px;
+      padding: 10px;
+      background: url('/@/assets/images/vent/camera_bg.png');
+      background-size: cover;
+      position: relative;
+      margin: 10px;
+      .player-name{
+        font-size: 14px;
+        position: absolute;
+        top: 15px;
+        right: 15px;
+        color: #fff;
+        background-color: hsla(0, 0%, 50%, .5);
+        border-radius: 2px;
+        padding: 1px 5px;
+        max-width: 120px;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+        z-index: 999;
+      }
+    }
+  }
+  
 </style>

+ 1 - 1
src/views/vent/monitorManager/chamberMonitor/components/chamberAlarmHistory.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="alarm-history">
     <AlarmHistoryTable columns-type="alarm" device-type="pressurefan"
-      :device-list-api="getTableList.bind(null, { strtype: 'pressurefan' })" designScope="alarm-history" />
+      :device-list-api="getTableList.bind(null, { strtype: 'pressurefan' })" designScope="alarm-history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

+ 2 - 2
src/views/vent/monitorManager/chamberMonitor/components/chamberHandleHistory.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="handle-history">
-    <HandlerHistoryTable columns-type="operatorhistory" device-type="pressurefan"
-      :device-list-api="getTableList.bind(null, { strtype: 'pressurefan' })" designScope="pressurefan_history" />
+    <HandlerHistoryTable columns-type="operator_history" device-type="pressurefan"
+      :device-list-api="getTableList.bind(null, { strtype: 'pressurefan' })" designScope="pressurefan_history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

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

@@ -139,7 +139,7 @@ onBeforeMount(() => {
 });
 
 onMounted(async() => {
-  if (currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
+  if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
   await getSysDataSource()
   await getDeviceList()
 });

+ 58 - 22
src/views/vent/monitorManager/comment/GroupMonitorTable.vue

@@ -12,6 +12,10 @@
           <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == 0 ? 'default' : 'green'">{{
             record.netStatus == 0 ? '断开' : '连接'
           }}</a-tag>
+          
+        </template>
+        <template #operation="{ column, record }">
+          <slot name="action" v-bind="{ column, record }"></slot>
         </template>
       </a-table>
     </a-radio-group>
@@ -44,13 +48,17 @@
       type: Object,
       default: () => null
     },
+    isAction: {
+      type: Boolean,
+      default: false
+    }
   });
 
   const emits = defineEmits(['selectRow']);
   const dataTableSource = ref<any[]>([]);
   const loading = ref(true);
   const tableScroll = props.scroll.y ? ref({ y: props.scroll.y }) : ref({})
-
+  const columns = ref<any[]>([])
   // 默认初始是第一行
   const selectRowIndex = ref(-1);
 
@@ -68,7 +76,7 @@
   };
 
   /** 定义table Columns */
-  function setColumns() {
+  function setColumns(columnsType) {
     const isCheckColumn = {
       title: '',
       dataIndex: 'isCheck',
@@ -88,8 +96,14 @@
       width: 80,
       align: 'center',
     };
-    let columns: any[] = getTableHeaderColumns(props.columnsType);
-    const strinstallpos = columns.find((item) => {
+
+    columns.value = getTableHeaderColumns(columnsType);
+    console.log('风机columns------------------>', columnsType)
+    if (columns.value && columns.value.length < 1) {
+      columns.value = getTableHeaderColumns(columnsType.split('_')[0] + '_monitor');
+    }
+
+    const strinstallpos = columns.value.find((item) => {
       return item.dataIndex === 'strinstallpos' || item.dataIndex === 'strname';
     });
     if (strinstallpos) {
@@ -101,14 +115,34 @@
         }
       };
     }
-    columns.splice(1, 0, runDevice);
-    columns = [isCheckColumn, ...columns];
+    columns.value.splice(1, 0, runDevice);
+    if(props.isAction){
+       columns.value = [isCheckColumn, ...columns.value, {
+        title: '操作',
+        dataIndex: 'operation',
+        width: 120,
+        slots: { customRender: 'operation' },
+      }];
+    }else{
+      columns.value = [isCheckColumn, ...columns.value];
+    }
+   
    
     return columns;
   }
-  const columns = setColumns();
-  console.log('[ columns ] >', columns);
-
+  
+  watch(
+    () => {
+      return props.columnsType;
+    },
+    (newVal) => {
+      if (!newVal) return
+      setColumns(newVal)
+    },
+    {
+      immediate: true
+    }
+  );
   watch(
     () => {
       return props.dataSource;
@@ -120,16 +154,18 @@
         const resultData1 = {};
         const resultData2 = {};
         // 将主风机、备风机的数据进行拆分
-        columns.forEach((column) => {
+        columns.value.forEach((column) => {
           const columnKey = column.dataIndex;
           // data.f
-          if (columnKey.startsWith('Fan')) {
-            const key1 = columnKey.replace('Fan', 'Fan1');
-            const key2 = columnKey.replace('Fan', 'Fan2');
-            resultData1[columnKey] = data[key1];
-            resultData2[columnKey] = data[key2];
-          } else {
-            resultData1[columnKey] = resultData2[columnKey] = data[columnKey];
+          if(columnKey){
+            if (columnKey.startsWith('Fan')) {
+              const key1 = columnKey.replace('Fan', 'Fan1');
+              const key2 = columnKey.replace('Fan', 'Fan2');
+              resultData1[columnKey] = data[key1];
+              resultData2[columnKey] = data[key2];
+            } else {
+              resultData1[columnKey] = resultData2[columnKey] = data[columnKey];
+            }
           }
         });
         resultData1['deviceID'] = resultData2['deviceID'] = data['deviceID'];
@@ -150,12 +186,12 @@
   );
   
   watch(() => props.scroll.y, (newVal) => {
-    if (newVal) {
-      tableScroll.value = { y: newVal }
-    } else {
-      tableScroll.value = {}
+      if (newVal) {
+        tableScroll.value = { y: newVal }
+      } else {
+        tableScroll.value = {}
+      }
     }
-  }
   )
 
   onMounted(() => {

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

@@ -83,6 +83,7 @@
             return prev
           }
         })
+        console.log('历史记录列表表头------------>', arr[0] + '_monitor')
         columns.value = getTableHeaderColumns(arr[0] + '_history');
       } else {
         columns.value = column
@@ -115,6 +116,7 @@
         bordered: false,
         size: 'small',
         scroll: tableScroll,
+        showIndexColumn: true,
         formConfig: {
           labelAlign: 'left',
           showAdvancedButton: false,
@@ -240,6 +242,7 @@
       bordered: false,
       size: 'small',
       scroll: tableScroll,
+      showIndexColumn: true,
       formConfig: {
         labelAlign: 'left',
         showAdvancedButton: false,

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

@@ -111,6 +111,7 @@
     (newVal) => {
       if(!newVal) return
       const column =  getTableHeaderColumns(newVal)
+      console.log('监测列表表头000------------>', newVal)
       if(column && column.length < 1){
         const arr = newVal.split('_')
         const columnKey =  arr.reduce((prev, cur, index) => {

+ 1 - 1
src/views/vent/monitorManager/compressor/components/nitrogenAlarmHistory.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="alarm-history">
-     <AlarmHistoryTable columns-type="alarm" device-type="nitrogen" :device-list-api="getTableList.bind(null, { devicekind: 'nitrogen' })" designScope="alarm-history" />
+     <AlarmHistoryTable columns-type="alarm" device-type="nitrogen" :device-list-api="getTableList.bind(null, { devicekind: 'nitrogen' })" designScope="alarm-history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

+ 1 - 1
src/views/vent/monitorManager/compressor/components/nitrogenHandleHistory.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="handle-history">
-     <HandlerHistoryTable columns-type="operatorhistory" device-type="nitrogen" :device-list-api="getTableList.bind(null, {devicekind :'nitrogen'})" designScope="nitrogen_history" />
+     <HandlerHistoryTable columns-type="operator_history" device-type="nitrogen" :device-list-api="getTableList.bind(null, {devicekind :'nitrogen'})" designScope="nitrogen_history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

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

@@ -114,7 +114,7 @@ function changeModalType(currentData) {
 }
 
 onMounted(async () => {
-  if (currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
+  if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
   await getSysDataSource()
   getSelectRow(optionValue.value)
 });

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

@@ -5,7 +5,7 @@ export const navList = ref([
   {
     title: '监控界面',
     pathName: 'nitrogen_page',
-    isHover: true,
+    isHover: false,
   },
   {
     title: '历史监测记录',

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

@@ -219,3 +219,6 @@ export const majorColumns: BasicColumn[] = [
     width: 127,
   },
 ];
+
+export const noDetailArr = ['nitrogen', 'forcFan'];
+export const haveDetailArr = ['windrect', 'window', 'gate', 'fanlocal', 'fanmain', 'fiber', 'bundletube', 'dusting', 'pump', 'safetymonitor'];

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

@@ -66,11 +66,29 @@
             </div>
           </div>
         </div>
-
+        <div style="color: #fff;">{{ deviceType }}</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.startsWith('fanlocal') || deviceType.startsWith('fanmain')) && activeKey == '1'">
-              <GroupMonitorTable  ref="MonitorDataTable" :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" :scroll="scroll1"/>
+              <GroupMonitorTable  ref="MonitorDataTable" :dataSource="dataSource" :columnsType="`${deviceType}_monitor`" :scroll="scroll" :isAction="true">
+                <template #action="{ record }">
+                    <TableAction :actions="haveDetailArr.find((item) => deviceType.startsWith(item)) ? [
+                      {
+                        label: '详情',
+                        onClick: goDetail.bind(null, record),
+                      },
+                      {
+                        label: '定位',
+                        onClick: goLocation.bind(null, record),
+                      },
+                    ] : [
+                      {
+                        label: '定位',
+                        onClick: goLocation.bind(null, record),
+                      },
+                    ]" />
+                  </template>
+              </GroupMonitorTable>
             </template>
             <template v-else-if="deviceType == 'majorpath' && activeKey == '1'">
               <a-table :columns="majorColumns" :data-source="dataSource" bordered :scroll="scroll" :pagination="false">
@@ -90,7 +108,7 @@
                 design-scope="device_monitor" :isShowPagination="false" :isShowActionColumn="true" title="设备监测"
                 :scroll="scroll">
                 <template #action="{ record }">
-                  <TableAction :actions="!deviceType.startsWith('nitrogen') ?[
+                  <TableAction :actions="haveDetailArr.find((item) => deviceType.startsWith(item)) ? [
                     {
                       label: '详情',
                       onClick: goDetail.bind(null, record),
@@ -161,6 +179,16 @@
                     :color="record.warnFlag == 0 ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'"> {{
                       record.warnFlag == 0 ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测'
                     }}</a-tag>
+                  <template v-if="column.dataIndex === 'warnLevel'">
+                    <a-tag v-if="record.warnLevel == '101'" color="green">蓝色预警</a-tag>
+                    <a-tag v-else-if="record.warnLevel == '102'" color="#FF5812">黄色预警</a-tag>
+                    <a-tag v-else-if="record.warnLevel == '103'" color="#FF5812">橙色预警</a-tag>
+                    <a-tag v-else-if="record.warnLevel == '104'" color="#FF5812">红色预警</a-tag>
+                    <a-tag v-else-if="record.warnLevel == '201'" color="#FF0000">报警</a-tag>
+                    <a-tag v-else-if="record.warnLevel == '10000'" color="#FF5812">数据超限</a-tag>
+                    <a-tag v-else-if="record.warnLevel == '1001'" color="default">网络中断</a-tag>
+                    <a-tag v-else="record.warnLevel == '1001'" color="green">正常</a-tag>
+                  </template>
                   <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == 0 ? 'default' : 'green'">{{
                     record.netStatus == 0 ? '断开' : '连接'
                   }}</a-tag>
@@ -187,7 +215,7 @@
           <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"
+                columns-type="operator_history" :device-type="deviceType"
                 :device-list-api="getDeviceList.bind(null, { devicekind: deviceType, sysId: systemID })" :scroll="scroll"
                 designScope="operator-history" />
             </div>
@@ -220,7 +248,7 @@ import { SvgIcon } from '/@/components/Icon';
 import { getActions } from '/@/qiankun/state';
 import { useRouter } from 'vue-router';
 import { setDivHeight } from '/@/utils/event';
-import { majorColumns } from  './device.data'
+import { majorColumns, noDetailArr, haveDetailArr } from  './device.data'
 import mainPath from './modal/mainPath.vue'
 // import { BorderBox8 as DvBorderBox8 } from '@kjgl77/datav-vue3';
 
@@ -269,9 +297,6 @@ const expandedKeys = ref<string[]>(['0-0-0-1']);
 const scroll = reactive({
   y: 210
 })
-const scroll1 = reactive({
-  y: 210
-})
 const treeData = ref<TreeProps['treeData']>([]);
 
 //树形菜单选择事件
@@ -293,7 +318,7 @@ const onSelect: TreeProps['onSelect'] = (keys, e) => {
   }
   selectedKeys.value = keys
   treeNodeTitle.value = e.node.title
-
+  debugger
   dataSource.value = []
 };
 
@@ -391,31 +416,39 @@ async function getDataSource() {
     let res = null
     if(systemID.value){
       res = await list({ devicetype: 'sys', types: deviceType.value, systemID: systemID.value })
+      if (res && res.msgTxt) {
+        const result = res.msgTxt;
+        result.forEach(item => {
+          const data = item['datalist'].filter((data: any) => {
+            const readData = data.readData;
+            return Object.assign(data, readData);
+          })
+          if (item.type != 'sys') {
+            if (item.type.startsWith('majorpath') && item.type == deviceType.value) {
+              dataSource.value = item['datalist'][0]['paths']
+              return
+            } else if(item.type == deviceType.value) {
+              dataSource.value = data
+              console.log('关联设备数据--------------->', data)
+              return
+            }
+          }
+        })
+      }
     }else{
       res = await list({ devicetype: deviceType.value, pagetype: 'normal' })
-    }
-    if (res && res.msgTxt) {
-      const result = res.msgTxt;
-      result.forEach(item => {
-        const data = item['datalist'].filter((data: any) => {
-          const readData = data.readData;
-          return Object.assign(data, readData);
-        })
-        if (item.type != 'sys') {
-          if (item.type === 'majorpath') {
-            // deviceArr.unshift({ deviceType: item.type, deviceName: item['typeName'], datalist: item['datalist'][0]['paths'] })
-            dataSource.value = item['datalist'][0]['paths']
-          } else {
-            dataSource.value = data
-          }
+      if (res && res.msgTxt) {
+        const result = res.msgTxt[0];
+        if(result){
+          const data = result['datalist'].filter((data: any) => {
+            const readData = data.readData;
+            return Object.assign(data, readData);
+          })
+          dataSource.value = data
         }
-      })
-      // dataSource.value = res.msgTxt[0].datalist || [];
-      // dataSource.value.filter((data: any) => {
-      //   const readData = data.readData;
-      //   return Object.assign(data, readData);
-      // });
+      }
     }
+    
   }
 }
 
@@ -488,7 +521,10 @@ function goDetail(record?) {
       const newPage = router.resolve({ path: '/monitorChannel/balancePress-home', query: { id: systemID.value } })
       window.open(newPage.href, '_blank')
     }  else if (systemType.value.indexOf("sys_nitrogen") != -1) {
-      const newPage = router.resolve({ path: '/compressor-home', query: { id: systemID.value } })
+      const newPage = router.resolve({ path: '/nitrogen-home', query: { id: systemID.value } })
+      window.open(newPage.href, '_blank')
+    } else if (deviceType.value.indexOf("forcFan") != -1) {
+      const newPage = router.resolve({ path: '/forcFan/home', query: { id: activeID.value } })
       window.open(newPage.href, '_blank')
     } else {
       message.info('待开发。。。')
@@ -1036,6 +1072,10 @@ onUnmounted(() => {
       &:nth-child(15) {
         left: calc(-6px * 15);
       }
+      
+      &:nth-child(16) {
+        left: calc(-6px * 16);
+      }
 
       &:first-child {
         clip-path: polygon(0 0,
@@ -1062,8 +1102,8 @@ onUnmounted(() => {
     color: #fff;
     cursor: pointer;
     position: absolute;
-    right: 100px;
-    top: -6px;
+    right: 20px;
+    top: 35px;
     padding: 5px;
     border-radius: 5px;
     margin-left: 8px;
@@ -1075,6 +1115,7 @@ onUnmounted(() => {
     justify-content: center;
     color: #fff;
     padding: 5px 15px 5px 15px;
+    z-index: 999;
     cursor: pointer;
 
     &:hover {

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

@@ -46,12 +46,12 @@ onMounted(() => {
   }else if(type === 'home'){
     actions.setGlobalState({ pageObj: { pageType: 'home' } });
   }
-  // else if(type === 'tunMonitor') {
-  //   if(deviceType){
-  //     pageData.value = { pageType: deviceType }
-  //     actions.setGlobalState({ pageObj: { pageType: deviceType } });
-  //   }
-  // }
+  else if(type === 'tunMonitor') {
+    if(deviceType){
+      pageData.value = { pageType: deviceType }
+      actions.setGlobalState({ pageObj: { pageType: deviceType } });
+    }
+  }
   actions.onGlobalStateChange((newState) => {
     for (const key in newState) {
       if (key === 'pageObj') {

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

@@ -218,7 +218,7 @@
           </a-tab-pane>
           <a-tab-pane key="5" tab="操作历史">
             <div class="tab-item" v-if="activeKey === '5'">
-              <HandlerHistoryTable columns-type="operatorhistory" device-type="fanlocal" :device-list-api="baseList" designScope="alarm-history" :scroll="scroll" />
+              <HandlerHistoryTable columns-type="operator_history" device-type="fanlocal" :device-list-api="baseList" designScope="alarm-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
         </a-tabs>
@@ -517,7 +517,7 @@
         await getDataSource();
         if (dataSource.value.length > 0 && selectRowIndex.value == -1 && MonitorDataTable.value) {
           // 初始打开页面
-          if (currentRoute.value['query'] && currentRoute.value['query']['id']) {
+          if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
             MonitorDataTable.value.setSelectedRowKeys(currentRoute.value['query']['id'])
           }else{
             MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID'])

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

@@ -81,7 +81,7 @@
         </a-tab-pane>
         <a-tab-pane key="5" tab="操作历史">
           <div class="tab-item">
-            <HandlerHistoryTable columns-type="operatorhistory" device-type="fiber" :device-list-api="baseList"
+            <HandlerHistoryTable columns-type="operator_history" device-type="fiber" :device-list-api="baseList"
               designScope="alarm-history" />
           </div>
         </a-tab-pane>

+ 4 - 1
src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpAlarmHistory.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="alarm-history">
     <AlarmHistoryTable columns-type="alarm" device-type="pressurefan"
-      :device-list-api="getTableList.bind(null, { strtype: 'pressurefan' })" designScope="alarm-history" />
+      :device-list-api="getTableList.bind(null, { strtype: 'pressurefan' })" designScope="alarm-history" :scroll="{ y: 650 }" />
   </div>
 </template>
 <script setup lang="ts">
@@ -20,6 +20,9 @@ const props = defineProps({
 </script>
 <style lang="less" scoped>
 .alarm-history {
+  width: 100%;
   pointer-events: auto;
+  position: absolute;
+  top: 90px;
 }
 </style>

+ 5 - 2
src/views/vent/monitorManager/gasPumpMonitor/components/gasPumpHandleHistory.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="handle-history">
-    <HandlerHistoryTable columns-type="operatorhistory" device-type="pressurefan"
-      :device-list-api="getTableList.bind(null, { strtype: 'pressurefan' })" designScope="pressurefan_history" />
+    <HandlerHistoryTable columns-type="operator_history" device-type="pressurefan"
+      :device-list-api="getTableList.bind(null, { strtype: 'pressurefan' })" designScope="pressurefan_history" :scroll="{ y: 650 }" />
   </div>
 </template>
 <script setup lang="ts">
@@ -21,6 +21,9 @@ import { getTableList } from '../gasPump.api'
 <style lang="less" scoped>
 .handle-history {
   width: 100%;
+  width: 100%;
   pointer-events: auto;
+  position: absolute;
+  top: 90px;
 }
 </style>

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

@@ -1,6 +1,6 @@
 <template>
-  <div id="FlowSensor" class="FlowSensor-box" style="position: absolute; z-index: -1;" v-if="selectData.FlowSensor_InputFlux">
-    <div ref="elementContent" class="elementContent" >
+  <div id="FlowSensor" class="FlowSensor-box" style="position: absolute;" v-if="selectData.FlowSensor_InputFlux">
+    <div class="elementContent" >
       <p style="color: #50c8fc;"><span class="data-title">抽采泵流量(m³):</span>{{ formatNum(selectData.FlowSensor_InputFlux) }}</p>
     </div>
   </div>
@@ -148,7 +148,7 @@
     </div> -->
     </div>
   </div>
-  <DetailModal @register="register"  :deviceType="deviceType" :deviceId="deviceId"/>
+  <DetailModal @register="register" :device-type="deviceType" :device-id="deviceId"/>
   <PasswordModal :modal-is-show="passwordModalIsShow" modal-title="密码检验" :modal-type="handlerType" @handle-ok="handleOK"
       @handle-cancel="handleCancel"/>
 </template>
@@ -157,7 +157,7 @@
 
 import { onBeforeMount, ref, onMounted, onUnmounted, reactive, defineProps, watch } from 'vue';
 import ventBox1 from '/@/components/vent/ventBox1.vue'
-import { mountedThree, destroy, setModelType } from '../gasPump.threejs';
+import { setModelType } from '../gasPump.threejs';
 import { stateHeader, valveState, pumpMonitorData, waterPumpData, dewateringPumpData, pumpCtrlType, valveCtrlType, valveCtrl, PumpCtrlItems, pumpCtrl } from '../gasPump.data'
 import { list } from '../gasPump.api';
 import { SvgIcon } from '/@/components/Icon'
@@ -305,11 +305,11 @@ function handlerDevice(code, data) {
 }
 
 watch(() => props.deviceType, () => {
-  // if(props.deviceType == 'pump_over'){
-  //   setModelType('gasPump')
-  // }else if(props.deviceType == 'pump_under') {
-  //   setModelType('gasPumpUnder')
-  // }
+  if(props.deviceType == 'pump_over'){
+    setModelType('gasPump')
+  }else if(props.deviceType == 'pump_under') {
+    setModelType('gasPumpUnder')
+  }
 })
 
 onBeforeMount(() => {

+ 2 - 1
src/views/vent/monitorManager/gasPumpMonitor/gasPump.threejs.ts

@@ -75,7 +75,7 @@ export const setModelType = (type) => {
         model.scene.remove(gasPumpBaseObj.group);
       }
       group = gasPumpUnderObj.group;
-      gasPumpUnderObj.addCssText();
+
       const oldCameraPosition = { x: 15.9074, y: 5.40264, z: 27.12551 };
       setTimeout(async () => {
         model?.scene?.add(group);
@@ -105,6 +105,7 @@ export const mountedThree = () => {
 
     gasPumpUnderObj = new gasPumpUnder(model);
     await gasPumpUnderObj.mountedThree();
+    gasPumpUnderObj.addCssText();
     addMouseEvent();
     // render();
     model.animate();

+ 3 - 2
src/views/vent/monitorManager/gasPumpMonitor/gasPump.threejs.under.ts

@@ -49,8 +49,9 @@ class gasPumpUnder {
   };
 
   clearCssText = () => {
-    
-  }
+    const fanLocalCSS3D = this.group?.getObjectByName('text1') as THREE.Object3D;
+    this.group?.remove(fanLocalCSS3D);
+  };
 
   mountedThree() {
     return new Promise((resolve) => {

+ 11 - 4
src/views/vent/monitorManager/gasPumpMonitor/index.vue

@@ -2,10 +2,9 @@
   <div class="bg"
     style="width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; overflow: hidden">
     <a-spin :spinning="loading" />
-    <div id="gas3DCSS" v-if="activeKey == 'monitor'" v-show="!loading" style="width: 100%; height: 100%; top:0; left: 0; position: absolute; overflow: hidden;">
-      
+    <div id="gas3DCSS" v-show="activeKey == 'monitor' && !loading && currentDeviceType == 'pump_under'" style="width: 100%; height: 100%; top:0; left: 0; position: absolute; overflow: hidden;">
     </div>
-    <div id="gasPump3D" v-if="activeKey == 'monitor'" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
+    <div id="gasPump3D" v-show="activeKey == 'monitor'" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
     
   </div>
   <div class="scene-box">
@@ -37,6 +36,7 @@ import gasPumpHandleHistoryVue from './components/gasPumpHandleHistory.vue';
 import gasPumpAlarmHistory from './components/gasPumpAlarmHistory.vue';
 import { mountedThree, destroy, setModelType } from './gasPump.threejs';
 import { useRouter } from 'vue-router';
+import { nextTick } from 'vue';
 
 type DeviceType = { deviceType: string, deviceName: string, datalist: any[] };
 
@@ -68,6 +68,13 @@ const selectData = reactive({
 });
 
 function changeActive(activeValue) {
+  if(activeKey.value == 'monitor'){
+    if (currentDeviceType.value == 'pump_over') {
+      setModelType('gasPump')
+    } else if (currentDeviceType.value == 'pump_under') {
+      setModelType('gasPumpUnder')
+    }
+  }
   activeKey.value = activeValue
 }
 
@@ -138,7 +145,7 @@ function getSelectRow(deviceID){
 }
 
 onMounted(async() => {
-  if (currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
+  if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
   mountedThree().then(async () => {
     await getSysDataSource()
     await getDeviceList()

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

@@ -120,7 +120,7 @@
           </a-tab-pane>
           <a-tab-pane key="5" tab="操作历史">
             <div class="tab-item" v-if="activeKey === '5'">
-              <HandlerHistoryTable columns-type="operatorhistory" device-type="gate" :device-list-api="getTableList"
+              <HandlerHistoryTable columns-type="operator_history" device-type="gate" :device-list-api="getTableList"
                 designScope="alarm-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
@@ -234,7 +234,7 @@ async function getMonitor(flag?) {
         });
         if (dataSource.value.length > 0 && selectRowIndex.value == -1) {
           // 初始打开页面
-          if (currentRoute.value['query'] && currentRoute.value['query']['id']) {
+          if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
             MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']])
           } else {
             MonitorDataTable.value.setSelectedRowKeys([dataSource.value[0]['deviceID']])

+ 1 - 1
src/views/vent/monitorManager/groutMonitor/components/groutAlarmHistory.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="alarm-history">
     <AlarmHistoryTable columns-type="alarm" device-type="pulping"
-      :device-list-api="getTableList.bind(null, { devicekind: 'pulping' })" designScope="alarm-history" />
+      :device-list-api="getTableList.bind(null, { devicekind: 'pulping' })" designScope="alarm-history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

+ 2 - 2
src/views/vent/monitorManager/groutMonitor/components/groutHandleHistory.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="handle-history">
-    <HandlerHistoryTable columns-type="operatorhistory" device-type="pulping"
-      :device-list-api="getTableList.bind(null, { devicekind: 'pulping' })" designScope="pulping_history" />
+    <HandlerHistoryTable columns-type="operator_history" device-type="pulping"
+      :device-list-api="getTableList.bind(null, { devicekind: 'pulping' })" designScope="pulping_history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

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

@@ -92,8 +92,10 @@ async function getDeviceList() {
     }
   })
   deviceList.value = deviceArr
-  deviceActive.value = deviceArr[0].deviceType
-  deviceChange(0)
+  if(deviceArr[0]){
+    deviceActive.value = deviceArr[0].deviceType
+    deviceChange(0)
+  }
 };
 
 async function getSysDataSource() {
@@ -132,7 +134,7 @@ function getSelectRow(deviceID) {
 }
 
 onMounted(async() => {
-  if (currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
+  if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
   await getSysDataSource()
   await getDeviceList()
 });

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

@@ -220,7 +220,7 @@
           </a-tab-pane>
           <a-tab-pane key="5" tab="操作历史">
             <div class="tab-item" v-if="activeKey === '5'">
-              <HandlerHistoryTable columns-type="operatorhistory" device-type="fanmain" :device-list-api="baseList" designScope="alarm-history" :scroll="scroll"/>
+              <HandlerHistoryTable columns-type="operator_history" device-type="fanmain" :device-list-api="baseList" designScope="alarm-history" :scroll="scroll"/>
             </div>
           </a-tab-pane>
         </a-tabs>
@@ -426,7 +426,7 @@
         await getDataSource();
         if (dataSource.value.length > 0 && selectRowIndex.value == -1) {
           // 初始打开页面
-          if (currentRoute.value['query'] && currentRoute.value['query']['id']) {
+          if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
             MonitorDataTable.value.setSelectedRowKeys(currentRoute.value['query']['id'])
           } else {
             MonitorDataTable.value.setSelectedRowKeys(dataSource.value[0]['deviceID'])

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

@@ -1,6 +1,6 @@
 <template>
   <div class="alarm-history">
-     <AlarmHistoryTable columns-type="alarm" device-type="pressurefan" :device-list-api="getTableList.bind(null, { devicekind: 'pressurefan' })" designScope="alarm-history" />
+     <AlarmHistoryTable columns-type="alarm" device-type="pressurefan" :device-list-api="getTableList.bind(null, { devicekind: 'pressurefan' })" designScope="alarm-history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

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

@@ -1,6 +1,6 @@
 <template>
   <div class="handle-history">
-     <HandlerHistoryTable columns-type="operatorhistory" device-type="pressurefan" :device-list-api="getTableList.bind(null, {devicekind :'pressurefan'})" designScope="pressurefan_history" />
+     <HandlerHistoryTable columns-type="operator_history" device-type="pressurefan" :device-list-api="getTableList.bind(null, {devicekind :'pressurefan'})" designScope="pressurefan_history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

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

@@ -120,7 +120,7 @@
           </a-tab-pane>
           <a-tab-pane key="5" tab="操作历史">
             <div class="tab-item" v-if="activeKey === '5'">
-              <HandlerHistoryTable columns-type="operatorhistory" device-type="gate" :device-list-api="getTableList"
+              <HandlerHistoryTable columns-type="operator_history" device-type="gate" :device-list-api="getTableList"
                 designScope="alarm-history" :scroll="scroll" />
             </div>
           </a-tab-pane>
@@ -233,7 +233,7 @@ async function getMonitor(flag?) {
         });
         if (dataSource.value.length > 0 && selectRowIndex.value == -1) {
           // 初始打开页面
-          if (currentRoute.value['query'] && currentRoute.value['query']['id']) {
+          if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
             MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']])
           } else {
             MonitorDataTable.value.setSelectedRowKeys([dataSource.value[0]['deviceID']])

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

@@ -1,7 +1,7 @@
 <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" />
+      :device-list-api="getTableList.bind(null, { strtype: 'sys_obfurage' })" designScope="alarm-history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

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

@@ -1,7 +1,7 @@
 <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" />
+    <HandlerHistoryTable columns-type="operator_history" device-type="sys_obfurage"
+      :device-list-api="getTableList.bind(null, { strtype: 'sys_obfurage' })" designScope="sys_obfurage_history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

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

@@ -143,7 +143,7 @@ onBeforeMount(() => {
 });
 
 onMounted(async() => {
-  if (currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
+  if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
   await getSysDataSource()
   await getDeviceList()
 });

+ 9 - 4
src/views/vent/monitorManager/safetyMonitor/index.vue

@@ -123,7 +123,7 @@
       </a-tab-pane>
       <a-tab-pane key="4" tab="操作历史" v-if="deviceType !== 'safetymonitor'">
         <div class="tab-item">
-          <HandlerHistoryTable ref="handlerHistoryTable" v-if="activeKey == '4'" columns-type="operatorhistory"
+          <HandlerHistoryTable ref="handlerHistoryTable" v-if="activeKey == '4'" columns-type="operator_history"
             :device-type="deviceType" :device-list-api="getDeviceList.bind(null, { devicekind: deviceType })"
             designScope="operator-history" />
         </div>
@@ -133,7 +133,7 @@
 </template>
 
 <script setup lang="ts">
-import { ref, onMounted, onUnmounted, shallowRef, defineProps, watch, nextTick } from 'vue'
+import { ref, onMounted, onUnmounted, shallowRef, defineProps, watch, nextTick, unref } from 'vue'
 import BarAndLine from '/@/components/chart/BarAndLine.vue';
 import { list, getDeviceList } from './safety.api'
 import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
@@ -243,8 +243,13 @@ async function getDataSource() {
 
 onMounted(async () => {
   const { currentRoute } = useRouter();
-  deviceType.value = currentRoute.value.path.substring(currentRoute.value.path.lastIndexOf('/') + 1)
-  await getMonitor(true)
+  if(unref(currentRoute)){
+    const path = unref(currentRoute).path
+    if (path) {
+      deviceType.value = path.substring(path.lastIndexOf('/') + 1)
+    }
+    await getMonitor(true)
+  }
 })
 
 onUnmounted(() => {

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

@@ -79,7 +79,7 @@
       </a-tab-pane>
       <a-tab-pane key="4" tab="操作历史">
         <div class="tab-item box-bg">
-          <HandlerHistoryTable columns-type="operatorhistory" device-type="modelsensor" :device-list-api="baseList" designScope="alarm-history" />
+          <HandlerHistoryTable columns-type="operator_history" device-type="modelsensor" :device-list-api="baseList" designScope="alarm-history" />
         </div>
       </a-tab-pane>
     </a-tabs>

+ 2 - 2
src/views/vent/monitorManager/tunFaceMonitor/components/tunFaceHandleHistory.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="handle-history">
-    <HandlerHistoryTable v-if="refresh" columns-type="operatorhistory" :device-type="type"
+    <HandlerHistoryTable v-if="refresh" columns-type="operator_history" :device-type="type"
       :sys-id="deviceId"
-      designScope="juejin_history" />
+      designScope="juejin_history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

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

@@ -167,7 +167,7 @@ onBeforeMount(() => {
 });
 
 onMounted(async() => {
-  if (currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
+  if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
   await getSysDataSource()
   await getDeviceList()
   

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

@@ -107,7 +107,7 @@
           </a-tab-pane>
           <a-tab-pane key="5" tab="操作历史">
             <div class="tab-item" v-if="activeKey === '5'">
-              <HandlerHistoryTable columns-type="operatorhistory" device-type="window" :device-list-api="baseList" designScope="alarm-history" :scroll="scroll"/>
+              <HandlerHistoryTable columns-type="operator_history" device-type="window" :device-list-api="baseList" designScope="alarm-history" :scroll="scroll"/>
             </div>
           </a-tab-pane>
         </a-tabs>
@@ -228,7 +228,7 @@
     });
     if (dataSource.value.length > 0 && selectRowIndex.value == -1) {
       // 初始打开页面
-      if (currentRoute.value['query'] && currentRoute.value['query']['id']) {
+      if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) {
         MonitorDataTable.value.setSelectedRowKeys([currentRoute.value['query']['id']])
       } else {
         MonitorDataTable.value.setSelectedRowKeys([dataSource.value[0]['deviceID']])

+ 20 - 19
src/views/vent/monitorManager/windrectMonitor/index.vue

@@ -231,28 +231,29 @@
     if (timer == null) {
       timer = setTimeout(() => {
         list({ devicetype: 'windrect', pagetype: 'normal' }).then((res) => {
-          dataSource.value = res.msgTxt[0].datalist || [];
-          if(dataSource.value.length > 0){
-            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']])
+          if(res && res.msgTxt[0]){
+            dataSource.value = res.msgTxt[0].datalist || [];
+            if (dataSource.value.length > 0) {
+              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 && 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);
+
+              palyAnimation(selectData)
+
             }
-            const data: any = toRaw(dataSource.value[selectRowIndex.value]); //maxarea
-            Object.assign(selectData, data);
-            addMonitorText(selectData);
-            
-            palyAnimation(selectData)
-            
           }
-          
           if (timer) {
             timer = null;
           }

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

@@ -1,7 +1,7 @@
 <template>
   <div class="handle-history">
-    <HandlerHistoryTable v-if="refresh" columns-type="operatorhistory" :device-type="type" :sys-id="deviceId"
-      designScope="caimei_history" />
+    <HandlerHistoryTable v-if="refresh" columns-type="operator_history" :device-type="type" :sys-id="deviceId"
+      designScope="caimei_history" :scroll="{ y: 650 }"/>
   </div>
 </template>
 <script setup lang="ts">

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

@@ -184,7 +184,7 @@ onBeforeMount(() => {
 });
 
 onMounted(async() => {
-  if (currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
+  if (currentRoute.value && currentRoute.value['query'] && currentRoute.value['query']['id']) optionValue.value = currentRoute.value['query']['id']
   await getSysDataSource()
   loading.value = true;
   mountedThree().then(async () => {