Răsfoiți Sursa

[Mod 0000] 优化历史导出提示,红庆梁隐藏注氮、光纤详情按钮

hongrunxia 3 zile în urmă
părinte
comite
de31ead895

+ 30 - 8
src/hooks/system/useMethods.ts

@@ -27,7 +27,7 @@ export function useMethods() {
     // 显示loading,duration:0 表示不自动关闭
     message.loading({ content: '正在导出文件,请稍等...', key: loadingKey, duration: 0 });
     try {
-      const data = await defHttp.get({ url: url, params: params, responseType: 'blob', timeout: 1000 * 1000 }, { isTransformResponse: false });
+      const data = await defHttp.get({ url: url, params: params, responseType: 'blob', timeout: 5 * 60 * 1000 }, { isTransformResponse: false });
       if (!data) {
         createMessage.warning('文件下载失败');
         return;
@@ -57,8 +57,15 @@ export function useMethods() {
       // 导出成功提示
       message.success({ content: '文件导出成功!', key: loadingKey, duration: 2 });
     } catch (error) {
-      createMessage.error('文件导出失败!');
-      console.error('导出失败:', error);
+      if (error && error['code'] == 'ECONNABORTED') {
+        if (url.includes('/export/historydata') || url.includes('/ventanalyAlarmLog/exportXls')) {
+          createMessage.error('导出的数据量太大,请选择合理的时间范围和间隔时间分批导出!');
+        } else {
+          createMessage.error('导出的数据量太大,导出失败!');
+        }
+      } else {
+        createMessage.error('文件导出失败!');
+      }
     } finally {
       message.destroy(loadingKey);
     }
@@ -73,7 +80,7 @@ export function useMethods() {
     const loadingKey = 'export-xls-post';
     message.loading({ content: '正在导出,请稍等...', key: loadingKey, duration: 0 });
     defHttp
-      .post({ url: url, params: params, timeout: 1000 * 1000 }, { isTransformResponse: false })
+      .post({ url: url, params: params, timeout: 5 * 60 * 1000 }, { isTransformResponse: false })
       .then((data) => {
         if (data.code == 200 && data.result) {
           const messageArr = data.result.split('/');
@@ -102,8 +109,16 @@ export function useMethods() {
           message.error({ content: '下载失败!', key: loadingKey, duration: 2 });
         }
       })
-      .catch(() => {
-        message.error({ content: '下载失败!', key: loadingKey, duration: 2 });
+      .catch((error) => {
+        if (error && error['code'] == 'ECONNABORTED') {
+          if (url.includes('/export/historydata') || url.includes('/ventanalyAlarmLog/exportXls')) {
+            createMessage.error('导出的数据量太大,请选择合理的时间范围和间隔时间分批导出!');
+          } else {
+            createMessage.error('导出的数据量太大,导出失败!');
+          }
+        } else {
+          message.error({ content: '下载失败!', key: loadingKey, duration: 2 });
+        }
       })
       .finally(() => {
         message.destroy(loadingKey);
@@ -144,8 +159,15 @@ export function useMethods() {
       }
       message.success({ content: '文件导出成功!', key: loadingKey, duration: 2 });
     } catch (error) {
-      createMessage.error('文件导出失败!');
-      console.error('导出失败:', error);
+      if (error && error['code'] == 'ECONNABORTED') {
+        if (url.includes('/export/historydata') || url.includes('/ventanalyAlarmLog/exportXls')) {
+          createMessage.error('导出的数据量太大,请选择合理的时间范围和间隔时间分批导出!');
+        } else {
+          createMessage.error('导出的数据量太大,导出失败!');
+        }
+      } else {
+        message.error({ content: '下载失败!', key: loadingKey, duration: 2 });
+      }
     } finally {
       message.destroy(loadingKey);
     }

+ 4 - 4
src/layouts/page/index.vue

@@ -17,13 +17,13 @@
         <!--      >-->
         <keep-alive v-if="openCache" :include="getCaches">
           <Suspense>
-            <!-- <component :is="Component" :key="route.fullPath" /> -->
-            <component :is="Component" :key="route.path" />
+            <component :is="Component" :key="route.fullPath" />
+            <!-- <component :is="Component" :key="route.path" /> -->
           </Suspense>
         </keep-alive>
         <Suspense v-else>
-          <!-- <component :is="Component" :key="route.fullPath" /> -->
-          <component :is="Component" :key="route.path" />
+          <component :is="Component" :key="route.fullPath" />
+          <!-- <component :is="Component" :key="route.path" /> -->
         </Suspense>
 
         <!--      </transition>-->

+ 2 - 1
src/utils/http/axios/index.ts

@@ -320,7 +320,8 @@ function createAxios(opt?: Partial<CreateAxiosOptions>) {
         // authentication schemes,e.g: Bearer
         // authenticationScheme: 'Bearer',
         authenticationScheme: '',
-        timeout: 10 * 1000,
+        // timeout: 5 * 60 * 1000,
+        timeout: 1000,
         // 基础接口地址
         // baseURL: globSetting.apiUrl,
         headers: { 'Content-Type': ContentTypeEnum.JSON },

+ 7 - 7
src/views/vent/home/configurable/configurable.data.ts

@@ -181,7 +181,7 @@ export const testConfigVentSsl: Config[] = [
       complex_list: [],
       gallery_list: [],
       preset: [],
-      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate_xinJianFuXieJin',
+      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate',
     },
     showStyle: {
       size: 'width:420px;height:280px;',
@@ -291,7 +291,7 @@ export const testConfigVentSsl: Config[] = [
       complex_list: [],
       gallery_list: [],
       preset: [],
-      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate_xinJianFuXieJin',
+      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate',
     },
     showStyle: {
       size: 'width:420px;height:280px;',
@@ -636,7 +636,7 @@ export const testConfigVent: Config[] = [
   //         readFrom: 'device',
   //       },
   //     ],
-  //     to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate_xinJianFuXieJin',
+  //     to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate',
   //   },
   //   showStyle: {
   //     size: 'width:390px;height:260px;',
@@ -2886,7 +2886,7 @@ export const testConfigVentRealtime: Config[] = [
           readFrom: 'device',
         },
       ],
-      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate_xinJianFuXieJin',
+      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate',
     },
     showStyle: {
       size: 'width:470px;height:280px;',
@@ -4008,7 +4008,7 @@ export const testConfigVentNew: Config[] = [
         //  },
         //},
       },
-      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate_xinJianFuXieJin',
+      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate',
     },
     showStyle: {
       size: 'width:440px;height:280px;',
@@ -5039,7 +5039,7 @@ export const testConfigWarnMonitor: Config[] = [
   },
 ];
 
-export let menuList: any[] = [
+export const menuList: any[] = [
   { name: '灾害预警', MenuItemList: [] },
   { name: '通风预警', MenuItemList: [] },
   { name: '火灾预警', MenuItemList: [] },
@@ -6508,7 +6508,7 @@ export const testConfigVent182: Config[] = [
       complex_list: [],
       gallery_list: [],
       preset: [],
-      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate_xinJianFuXieJin',
+      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate',
     },
     showStyle: {
       size: 'width:420px;height:280px;',

+ 1 - 1
src/views/vent/home/configurable/configurable.data.wz.ts

@@ -830,7 +830,7 @@ export const testConfigSY: Config[] = [
       complex_list: [],
       gallery_list: [],
       preset: [],
-      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate_xinJianFuXieJin',
+      to: '/micro-vent-3dModal/dashboard/analysis?type=tunMonitor&deviceType=gate',
     },
     showStyle: {
       size: 'width:450px;height:280px;',

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

@@ -503,29 +503,56 @@ export const vehicleFormConfig = {
     span: 4,
   },
 };
+
 const { sysOrgCode } = useGlobSetting();
 export const noDetailArr = ['nitrogen', 'forcFan']; // 前端详情的,
 // 棋盘井球阀监测数据只有温度
-export const haveDetailArr = [
-  'windrect',
-  'window',
-  'gate',
-  'fanlocal',
-  'fanmain',
-  'fiber',
-  'bundletube',
-  'gaspatrol',
-  // 'dusting', // 保德要求去掉
-  // 'ballvalve',
-  'pump',
-  'safetymonitor',
-  'nitrogen',
-  'atomizing',
-  'firemon',
-  'forcFan',
-  'pulping',
-  'door',
-];
+export const haveDetailArr = () => {
+  if (sysOrgCode == 'hhnyhql') {
+    return [
+      'windrect',
+      'window',
+      'gate',
+      'fanlocal',
+      'fanmain',
+      // 'fiber', // 光纤不显示详情
+      'bundletube',
+      'gaspatrol',
+      // 'dusting', // 保德要求去掉
+      // 'ballvalve',
+      'pump',
+      'safetymonitor',
+      // 'nitrogen', // 注氮不显示详情
+      'atomizing',
+      'firemon',
+      'forcFan',
+      'pulping',
+      'door',
+    ];
+  } else {
+    return [
+      'windrect',
+      'window',
+      'gate',
+      'fanlocal',
+      'fanmain',
+      'fiber',
+      'bundletube',
+      'gaspatrol',
+      // 'dusting', // 保德要求去掉
+      // 'ballvalve',
+      'pump',
+      'safetymonitor',
+      'nitrogen',
+      'atomizing',
+      'firemon',
+      'forcFan',
+      'pulping',
+      'door',
+    ];
+  }
+};
+
 // 有操作记录的设备类型
 export const haveHandlerArr = [
   'windrect',

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

@@ -194,7 +194,7 @@
                 <template #action="{ record }">
                   <TableAction
                     :actions="
-                      haveDetailArr.find((item) => deviceType.startsWith(item))
+                      haveDetailArr().find((item) => deviceType.startsWith(item))
                         ? [
                             {
                               label: '详情',
@@ -235,7 +235,7 @@
                 <template #action="{ record }">
                   <TableAction
                     :actions="
-                      haveDetailArr.find((item) => deviceType.startsWith(item))
+                      haveDetailArr().find((item) => deviceType.startsWith(item))
                         ? [
                             {
                               label: '详情',
@@ -416,7 +416,7 @@
                 <template #action="{ record }">
                   <TableAction
                     :actions="
-                      haveDetailArr.find((item) => deviceType.startsWith(item))
+                      haveDetailArr().find((item) => deviceType.startsWith(item))
                         ? [
                             {
                               label: '详情',

+ 103 - 103
src/views/vent/monitorManager/gateMonitor/components/CarDamageTable.vue

@@ -6,8 +6,7 @@
           <div class="area-item">
             <div class="item-text">风门状态:</div>
             <a-select ref="select" v-model:value="type" style="width: 240px" placeholder="请选择风门状态">
-              <a-select-option v-for="(item, index) in typeList" :key="item.value" :value="item.value">{{
-                item.label }}</a-select-option>
+              <a-select-option v-for="(item, index) in typeList" :key="item.value" :value="item.value">{{ item.label }}</a-select-option>
             </a-select>
           </div>
         </a-col>
@@ -18,148 +17,149 @@
               <a-select-option v-for="(item, index) in typeList" :key="item.value" :value="item.value">{{
                 item.label }}</a-select-option>
             </a-select> -->
-            <a-date-picker v-model:value="startTime" style="width:240px" show-time
-              valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" />
+            <a-date-picker v-model:value="startTime" style="width: 240px" show-time valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" />
           </div>
         </a-col>
-          <a-col :span="5">
+        <a-col :span="5">
           <div class="area-item">
             <div class="item-text">结束时间:</div>
-            <a-date-picker v-model:value="endTime" style="width:240px" show-time
-                            valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" />
+            <a-date-picker v-model:value="endTime" style="width: 240px" show-time valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" />
           </div>
         </a-col>
         <a-col :span="5">
-          <a-button type="primary" preIcon="ant-design:search-outlined" style="margin-left: 10px"
-            @click="getSearch">查询</a-button>
+          <a-button type="primary" preIcon="ant-design:search-outlined" style="margin-left: 10px" @click="getSearch">查询</a-button>
           <a-button preIcon="ant-design:sync-outlined" style="margin: 0px 15px" @click="getReset">重置</a-button>
         </a-col>
       </a-row>
     </div>
     <div class="content-area">
-      <a-table size="small" :dataSource="dataSource" :columns="carColumns" :pagination="pagination"
-        :scroll="{ y: 200, }" @change="pageChange">
+      <a-table size="small" :dataSource="dataSource" :columns="carColumns" :pagination="pagination" :scroll="{ y: 200 }" @change="pageChange">
         <template #bodyCell="{ column, text }">
           <template
-            v-if="column.dataIndex == 'carNo' || column.dataIndex == 'distance' || column.dataIndex == 'photo' || column.dataIndex == 'captureTime'">
+            v-if="column.dataIndex == 'carNo' || column.dataIndex == 'distance' || column.dataIndex == 'photo' || column.dataIndex == 'captureTime'"
+          >
             <div>{{ text ? text : '-' }}</div>
           </template>
           <template v-if="column.dataIndex == 'type'">
-            <div>{{ text == '0' ? '正常开闭' : text == '1' ? '风门常开' : text == '2' ? '风门关闭不严' : text == '3' ? '疑似车辆撞击' : '--' }}
-            </div>
+            <div>{{ text == '0' ? '正常开闭' : text == '1' ? '风门常开' : text == '2' ? '风门关闭不严' : text == '3' ? '疑似车辆撞击' : '--' }} </div>
           </template>
           <template v-if="column.dataIndex == 'photoC'">
-            <img :src="text" alt="" class="photo_zp" @click="preViewImg(text)">
+            <img :src="text" alt="" class="photo_zp" @click="preViewImg(text)" />
           </template>
         </template>
       </a-table>
     </div>
     <!-- 预览抓拍图像 -->
     <a-modal v-model:visible="visiblePhoto" width="850px" :title="titlePhoto" :footer="null" centered destroyOnClose>
-      <img :src="imgSrc" alt="">
+      <img :src="imgSrc" alt="" />
     </a-modal>
   </div>
 </template>
 
 <script setup lang="ts">
-import { ref, reactive, onMounted } from 'vue'
-import { carColumns, typeList } from '../gate.data'
-
-let props = defineProps({
-  deviceListApi: {
-    type: Function,
-    required: true,
-  },
-  gateId: {
-    type: String,
-    default: ''
-  }
-})
-
-let type = ref('0')
-let startTime=ref('')
-let endTime=ref('')
-let dataSource = ref<any[]>([])
-//分页参数配置
-let pagination = reactive({
-  current: 1, // 当前页码
-  pageSize: 10, // 每页显示条数
-  total: 0, // 总条目数,后端返回
-  // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
-  showSizeChanger: true, // 是否可改变每页显示条数
-  pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
-});
-let visiblePhoto = ref(false)
-let titlePhoto = ref('抓拍图像预览')
-let imgSrc = ref('')//抓拍图像路径
+  import { ref, reactive, onMounted } from 'vue';
+  import { carColumns, typeList } from '../gate.data';
 
+  let props = defineProps({
+    deviceListApi: {
+      type: Function,
+      required: true,
+    },
+    gateId: {
+      type: String,
+      default: '',
+    },
+  });
 
+  let type = ref('0');
+  let startTime = ref('');
+  let endTime = ref('');
+  let dataSource = ref<any[]>([]);
+  //分页参数配置
+  let pagination = reactive({
+    current: 1, // 当前页码
+    pageSize: 10, // 每页显示条数
+    total: 0, // 总条目数,后端返回
+    // showTotal: (total, range) => `${range[0]}-${range[1]} 条,总共 ${total} 条`, // 分页右下角显示信息
+    showSizeChanger: true, // 是否可改变每页显示条数
+    pageSizeOptions: ['10', '20', '50'], // 可选的每页显示条数
+  });
+  let visiblePhoto = ref(false);
+  let titlePhoto = ref('抓拍图像预览');
+  let imgSrc = ref(''); //抓拍图像路径
 
-//查询列表
-async function getCarList() {
-  let res = await props.deviceListApi({ gateIds: props.gateId, type: type.value,startTime:startTime.value,endTime:endTime.value,  pageNo: pagination.current, pageSize: pagination.pageSize })
-  const remoteUrl = import.meta.env.DEV ? 'http://182.92.126.35' : 'http://' + window.location.hostname;
-  dataSource.value = res.records.map(el => {
-    return {
-      photoC: `${remoteUrl}:9999/sys/common/static/${el.photo.substring(el.photo.indexOf('/gate_monitor'))}`,
-      ...el
-    }
-  })
-  pagination.total = res.total
-}
-function pageChange(val) {
-  pagination.current = val.current;
-  pagination.pageSize = val.pageSize;
-  getCarList()
-}
-//查询
-function getSearch() {
-  pagination.current = 1
-  getCarList()
-}
-//重置
-function getReset() {
-  type.value = '0'
-  startTime.value=''
-  endTime.value=''
-  pagination.current = 1
-  getCarList()
-}
-//预览抓拍图像
-function preViewImg(img) {
-  visiblePhoto.value = true
-  imgSrc.value = img
-}
-onMounted(() => {
-  getCarList()
-})
+  //查询列表
+  async function getCarList() {
+    let res = await props.deviceListApi({
+      gateIds: props.gateId,
+      type: type.value,
+      startTime: startTime.value,
+      endTime: endTime.value,
+      pageNo: pagination.current,
+      pageSize: pagination.pageSize,
+    });
+    const remoteUrl = import.meta.env.DEV ? 'http://182.92.126.35' : 'http://' + window.location.hostname;
+    dataSource.value = res.records.map((el) => {
+      return {
+        photoC: `${remoteUrl}:9999/sys/common/static/${el.photo.substring(el.photo.indexOf('/gate_monitor'))}`,
+        ...el,
+      };
+    });
+    pagination.total = res.total;
+  }
+  function pageChange(val) {
+    pagination.current = val.current;
+    pagination.pageSize = val.pageSize;
+    getCarList();
+  }
+  //查询
+  function getSearch() {
+    pagination.current = 1;
+    getCarList();
+  }
+  //重置
+  function getReset() {
+    type.value = '0';
+    startTime.value = '';
+    endTime.value = '';
+    pagination.current = 1;
+    getCarList();
+  }
+  //预览抓拍图像
+  function preViewImg(img) {
+    visiblePhoto.value = true;
+    imgSrc.value = img;
+  }
+  onMounted(() => {
+    getCarList();
+  });
 </script>
 
 <style lang="less" scoped>
-.car-damage {
-  .search-area {
-    margin: 15px;
+  .car-damage {
+    .search-area {
+      margin: 15px;
 
-    .area-item {
-      display: flex;
-      align-items: center;
+      .area-item {
+        display: flex;
+        align-items: center;
 
-      .item-text {
-        color: #fff;
+        .item-text {
+          color: #fff;
+        }
       }
     }
-  }
 
-  .zxm-picker,
-  .zxm-input {
-    border: 1px solid #3ad8ff77;
-    background-color: #ffffff00;
-    color: #fff;
-  }
+    .zxm-picker,
+    .zxm-input {
+      border: 1px solid #3ad8ff77;
+      background-color: #ffffff00;
+      color: #fff;
+    }
 
-  .photo_zp {
-    width: 120px;
-    cursor: pointer;
+    .photo_zp {
+      width: 120px;
+      cursor: pointer;
+    }
   }
-}
 </style>

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

@@ -844,7 +844,7 @@ const loadModel = (code): Promise<any> => {
   return import('./gate.threejs.yy').then((r) => r.default);
 };
 
-export const mountedThree = (playerDom) => {
+export const mountedThree = () => {
   // const { sysOrgCode } = useGlobSetting();
   // const sysOrgCode = 'gsgszdek';
   return new Promise(async (resolve) => {
@@ -860,12 +860,12 @@ export const mountedThree = (playerDom) => {
           case 'fmXr':
             const FmXR = await loadModel('FmXR');
             fmXr = new FmXR(model);
-            fmXr.mountedThree(playerDom);
+            fmXr.mountedThree();
             break;
           case 'fmYy':
             const Fm1 = await loadModel('Fm1');
             fm1 = new Fm1(model);
-            fm1.mountedThree(playerDom);
+            fm1.mountedThree();
             break;
           case 'gate_qd':
             const Fm3 = await loadModel('Fm3');
@@ -943,24 +943,24 @@ export const mountedThree = (playerDom) => {
     } else {
       const Fm3 = await loadModel('Fm3');
       fm3 = new Fm3(model);
-      fm3.mountedThree(playerDom);
+      fm3.mountedThree();
       const FmTwoSs = await loadModel('FmTwoSs');
       fmTwoSs = new FmTwoSs(model);
-      fmTwoSs.mountedThree(playerDom);
+      fmTwoSs.mountedThree();
       const Fm2 = await loadModel('Fm2');
       fm2 = new Fm2(model);
-      fm2.mountedThree(playerDom);
+      fm2.mountedThree();
       // 三道门
       const FmThreeTl = await loadModel('FmThreeTl');
       fmThreeTl = new FmThreeTl(model);
-      if (fmThreeTl) fmThreeTl.mountedThree(playerDom);
+      if (fmThreeTl) fmThreeTl.mountedThree();
       const FmXR = await loadModel('FmXR');
       fmXr = new FmXR(model);
-      fmXr.mountedThree(playerDom);
+      fmXr.mountedThree();
       // 液压风门
       const Fm1 = await loadModel('Fm1');
       fm1 = new Fm1(model);
-      fm1.mountedThree(playerDom);
+      fm1.mountedThree();
       resolve(null);
     }
 

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

@@ -74,8 +74,8 @@ class FmXR {
     const screenDownText = VENT_PARAM['modalText']
       ? VENT_PARAM['modalText']
       : History_Type['type'] == 'remote'
-      ? `国能神东煤炭集团监制`
-      : '煤科通安(北京)智控科技有限公司研制';
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
 
     const screenDownTextX = 80 - (screenDownText.length - 10) * 9;
     const textArr = [
@@ -490,7 +490,7 @@ class FmXR {
     }
   }
 
-  mountedThree(playerDom) {
+  mountedThree() {
     this.group = new THREE.Object3D();
     this.group.name = this.modelName;
     return new Promise((resolve) => {

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

@@ -76,8 +76,8 @@ class Fm1 {
     const screenDownText = VENT_PARAM['modalText']
       ? VENT_PARAM['modalText']
       : History_Type['type'] == 'remote'
-      ? `国能神东煤炭集团监制`
-      : '煤科通安(北京)智控科技有限公司研制';
+        ? `国能神东煤炭集团监制`
+        : '煤科通安(北京)智控科技有限公司研制';
 
     const screenDownTextX = 80 - (screenDownText.length - 11) * 9;
     const textArr = [
@@ -447,7 +447,7 @@ class Fm1 {
     }
   }
 
-  mountedThree(playerDom) {
+  mountedThree() {
     this.group = new THREE.Object3D();
     this.group.name = this.modelName;
     return new Promise((resolve) => {

+ 7 - 6
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -610,7 +610,7 @@
     if (!selectRow) return;
     loading.value = true;
     selectRowIndex.value = index;
-    gateId.value=selectRow.deviceID
+    gateId.value = selectRow.deviceID;
     const baseData: any = deviceBaseList.value.find((baseData: any) => baseData.id === selectRow.deviceID);
     Object.assign(selectData, initData, selectRow, baseData);
     isFrontOpenRunning = false; //开关门动作是否在进行
@@ -738,7 +738,7 @@
       password: passWord || globalConfig?.simulatedPassword,
       masterComputer: selectData.masterComputer,
     };
-    let handler = () => { };
+    let handler = () => {};
 
     switch (handlerState) {
       case '1': // 打开前门
@@ -983,9 +983,8 @@
       await getMonitor(true);
     } else {
       loading.value = true;
-      const playerDom = document.getElementById('fm-player1')?.getElementsByClassName('vjs-tech')[0];
-
-      mountedThree(playerDom)
+      // const playerDom = document.getElementById('fm-player1')?.getElementsByClassName('vjs-tech')[0];
+      mountedThree()
         .then(async () => {
           if (sysOrgCode != 'zmhjhzmy') {
             await getMonitor(true);
@@ -999,7 +998,9 @@
             });
           }
         })
-        .catch(() => { });
+        .catch((e) => {
+          console.log(e);
+        });
     }
   });