Explorar el Código

[Mod 0000]保德注氮断网时bug修复;新增大气压是否显示配置

hongrunxia hace 3 semanas
padre
commit
344c8c6d14

+ 1 - 0
public/js/config.js

@@ -19,4 +19,5 @@ const VENT_PARAM = {
   safetyCrlPlatformUrl: '', // 神东要求安全监控跳转至安全监控管控平台,这里填写上生产管控地址后(例如填写:"https://www.baidu.com/"),就可以跳转了
   gasControlMock : true, // 项目关于瓦斯自主调控,是否模拟演示, true: 真实调控; false 模拟调控
   historyIsMultiple: false, // 设备历史数据是否支持多选
+  isShowQy: true, // 是否显示气压
 }

+ 9 - 3
src/layouts/default/header/index.vue

@@ -9,8 +9,9 @@
       ...getHeaderClass,
       {
         'vent-header': currentRoute.path.startsWith('/monitorChannel/monitor-'),
-        'normal-header': !currentRoute.path.startsWith('/monitorChannel/monitor-'),
+        'normal-header': !currentRoute.path.startsWith('/monitorChannel/monitor-') && !currentRoute.path.startsWith('/shuizai'),
         'no-header': currentRoute.path.endsWith('home'),
+        'zaihai-header': currentRoute.path.startsWith('/shuizai'),
       },
     ]"
     style="z-index: 1"
@@ -57,7 +58,7 @@
   <div :class="`${prefixCls}-action`" style="position: fixed; top: 30px; right: 20px; z-index: 999999">
     <div class="right-position">
       <!-- 公司端不显示语音播报功能 weatherBroadcast.vue-->
-      <WeatherBroadcast v-if="sysOrgCode != 'sdmtjtgsd' && hasPermission('btn:weatherBroadcast')" />
+      <WeatherBroadcast v-if="sysOrgCode != 'sdmtjtgsd' && isShowQy" />
       <VoiceBroadcast v-if="sysOrgCode != 'sdmtjtgsd'" />
       <VoiceBroadcastGsd v-if="sysOrgCode == 'sdmtjtgsd'" />
       <UserDropDown v-if="showUserDropdown" :theme="getHeaderTheme" />
@@ -135,7 +136,7 @@
       const { currentRoute } = useRouter();
       console.log(currentRoute);
       const { hasPermission } = usePermission();
-
+      const isShowQy = VENT_PARAM['isShowQy'];
       const { getShowTopMenu, getShowHeaderTrigger, getSplit, getIsMixMode, getMenuWidth, getIsMixSidebar } = useMenuSetting();
       const { getUseErrorHandle, getShowSettingButton, getSettingButtonPosition } = useRootSetting();
       const { title, sysOrgCode, homePath } = useGlobSetting();
@@ -265,6 +266,7 @@
         sysOrgCode,
         homePath,
         hasPermission,
+        isShowQy,
       };
     },
   });
@@ -327,6 +329,10 @@
     height: 0px !important;
     display: none !important;
   }
+  .zaihai-header {
+    position: absolute;
+    background: transparent !important;
+  }
 
   .header-nav-title {
     background-image: linear-gradient(#ffffff 50%, #60f4ff);

+ 19 - 17
src/views/vent/monitorManager/compressor/components/nitrogenHome_bd.vue

@@ -788,24 +788,26 @@
           });
           console.log(monitorData, 'monitorData.value---===');
           console.log(airCompressorState, 'airCompressorState--------');
-          const airCompressor = { readTime: monitorData.value[0]['readTime'].substring(11) };
-          const dataArr = lodash.cloneDeep(echartData.value);
-          //图表数据
-          if (dataArr.length < 4) {
-            monitorData.value.forEach((el, index) => {
-              airCompressor['flow'] = el['flow'] || 0;
-            });
-            dataArr.push(airCompressor);
-          } else {
-            dataArr.shift();
-            // dataArr.push(airCompressor)
-            monitorData.value.forEach((el, index) => {
-              airCompressor['flow'] = el['flow'] || 0;
-            });
-            dataArr.push(airCompressor);
-            // console.log(dataArr,'dataArr---------')
+          if (monitorData.value.length > 0 && monitorData.value[0]['readTime']) {
+            const airCompressor = { readTime: monitorData.value[0]['readTime'].substring(11) };
+            const dataArr = lodash.cloneDeep(echartData.value);
+            //图表数据
+            if (dataArr.length < 4) {
+              monitorData.value.forEach((el, index) => {
+                airCompressor['flow'] = el['flow'] || 0;
+              });
+              dataArr.push(airCompressor);
+            } else {
+              dataArr.shift();
+              // dataArr.push(airCompressor)
+              monitorData.value.forEach((el, index) => {
+                airCompressor['flow'] = el['flow'] || 0;
+              });
+              dataArr.push(airCompressor);
+              // console.log(dataArr,'dataArr---------')
+            }
+            echartData.value = dataArr;
           }
-          echartData.value = dataArr;
         }
       });
       // monitorDataGroupNum.value = monitorData.value.length;