浏览代码

[Mod] 榆家梁模型监测数据文字修改;韩咀多灾融合预警页面样式修改; 优化风险权重设置echarts

hongrunxia 2 周之前
父节点
当前提交
7d57187319

+ 4 - 4
src/views/vent/monitorManager/alarmMonitor/common/warnGradeEchart.vue

@@ -25,13 +25,13 @@
     (newV, oldV) => {
       let data: any[] = [];
       Object.keys(newV).forEach((el) => {
-        if (el == 'dust') {
+        if (el == 'dust' && newV[el]) {
           data.push({ name: '粉尘', value: newV[el] });
-        } else if (el == 'fire') {
+        } else if (el == 'fire' && newV[el]) {
           data.push({ name: '火灾', value: newV[el] });
-        } else if (el == 'gas') {
+        } else if (el == 'gas' && newV[el]) {
           data.push({ name: '瓦斯', value: newV[el] });
-        } else if (el == 'vent') {
+        } else if (el == 'vent' && newV[el]) {
           data.push({ name: '通风', value: newV[el] });
         }
       });

+ 58 - 63
src/views/vent/monitorManager/alarmMonitor/index1.vue

@@ -253,7 +253,7 @@
             <div class="icon"></div>
             <div class="container">
               <div class="data-box" v-for="(item, index) in fireMonitor1" :key="index">
-                <div class="box-item">
+                <div class="box-item" style="width: 200px">
                   <div
                     :class="{
                       value1: item.warnLevel == '绿色预警',
@@ -265,7 +265,7 @@
                   <div class="title">监测位置</div>
                 </div>
 
-                <div class="box-item">
+                <div class="box-item" style="width: 80px">
                   <div
                     :class="{
                       value1: item.warnLevel == '绿色预警',
@@ -399,12 +399,6 @@
       case 'fire':
         router.push('/fire/warn/home');
         break;
-      case 'dust':
-        router.push('/dust/warn/home');
-        break;
-      case 'gas':
-        router.push('/gas/warn/home');
-        break;
       case 'sbyj':
         // router.push('/device/warn/home');
         router.push('/device/warn/home');
@@ -434,26 +428,32 @@
     console.log(res, '预警数据--------------');
     // fireMonitor1.value.length = 0;
     toggleData = Object.assign({}, res);
-    windData.levels = res.info.sysInfo.ventS.levels;
-    windData.levels['blue'] = warnNumMap.get('vent');
-    if (showToggle.value == 'monitor') {
-      windData.jf = res.ventInfo.zongjinfeng;
-      windData.hf = res.ventInfo.zonghuifeng;
-    } else if (showToggle.value == 'report') {
-      windData.jf = res.ventInfo.totalIntM3;
-      windData.hf = res.ventInfo.totalRetM3;
-    } else {
-      windData.jf = monitor.value ? res.ventInfo.zongjinfeng : res.ventInfo.totalIntM3;
-      windData.hf = monitor.value ? res.ventInfo.zonghuifeng : res.ventInfo.totalRetM3;
+
+    if (res.ventInfo) {
+      if (showToggle.value == 'monitor') {
+        windData.jf = res.ventInfo.zongjinfeng;
+        windData.hf = res.ventInfo.zonghuifeng;
+      } else if (showToggle.value == 'report') {
+        windData.jf = res.ventInfo.totalIntM3;
+        windData.hf = res.ventInfo.totalRetM3;
+      } else {
+        windData.jf = monitor.value ? res.ventInfo.zongjinfeng : res.ventInfo.totalIntM3;
+        windData.hf = monitor.value ? res.ventInfo.zonghuifeng : res.ventInfo.totalRetM3;
+      }
+      windData.xf = res.ventInfo.xufengliang;
+    }
+    if (res.info && res.info.sysInfo) {
+      windData.levels = res.info.sysInfo.ventS.levels;
+      windData.levels['blue'] = warnNumMap.get('vent');
+      dustData.levels = res.info.sysInfo.dustS.levels;
+      dustData.levels['blue'] = warnNumMap.get('dust');
+      centerData.fire = res.info.sysInfo.fireS.maxLevel;
+      centerData.tf = res.info.sysInfo.ventS.maxLevel;
+      centerData.ws = res.info.sysInfo.gasS.maxLevel;
+      centerData.fc = res.info.sysInfo.dustS.maxLevel;
     }
-    windData.xf = res.ventInfo.xufengliang;
-    dustData.levels = res.info.sysInfo.dustS.levels;
-    dustData.levels['blue'] = warnNumMap.get('dust');
-    centerData.fire = res.info.sysInfo.fireS.maxLevel;
-    centerData.tf = res.info.sysInfo.ventS.maxLevel;
-    centerData.ws = res.info.sysInfo.gasS.maxLevel;
-    centerData.sb = res.info.deviceWarnInfo.maxLevel;
-    centerData.fc = res.info.sysInfo.dustS.maxLevel;
+
+    if (res.info && res.info.deviceWarnInfo) centerData.sb = res.info.deviceWarnInfo.maxLevel;
     centerData.riskLevel = res.info.riskLevel;
     Levels = Object.assign({}, await getDisasterProportion());
     centerData.levels =
@@ -1376,61 +1376,58 @@
             margin: 10px auto;
             position: relative;
             background-image: linear-gradient(to right, #39a3ff66, #39a3ff00);
+            padding: 5px 0;
             .box-item {
-              width: 100%;
               height: 100%;
               display: flex;
               flex-direction: column;
               align-items: center;
-              padding: 0 20px;
 
               .value {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 color: #2bdcff;
                 margin-bottom: 5px;
               }
 
               .value1 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
                 color: rgb(145, 230, 9);
               }
 
               .value2 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
-                // color: rgb(0, 242, 255);
                 color: #ffff35;
               }
 
               .value3 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
-                // color: #ffff35;
                 color: #ff0000;
               }
 
               .value4 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
                 color: #ffbe69;
               }
 
               .value5 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
                 color: #ff6f00;
               }
 
               .value6 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
                 color: #ff0000;
               }
@@ -1441,7 +1438,7 @@
             }
 
             .box-item1 {
-              width: 50%;
+              width: 120px;
               height: 100%;
               display: flex;
               flex-direction: column;
@@ -1449,58 +1446,56 @@
               padding: 0 20px;
 
               .value {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 color: #2bdcff;
                 margin-bottom: 5px;
               }
 
               .value1 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
                 color: rgb(145, 230, 9);
               }
 
               .value2 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
-                // color: rgb(0, 242, 255);
                 color: #ffff35;
               }
 
               .value3 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
-                // color: #ffff35;
                 color: #ff0000;
               }
 
               .value4 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
                 color: #ffbe69;
               }
 
               .value5 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
                 color: #ff6f00;
               }
 
               .value6 {
-                font-size: 16px;
-                font-family: 'douyuFont';
+                font-size: 14px;
+                font-weight: 600;
                 margin-bottom: 5px;
                 color: #ff0000;
               }
 
               .title {
-                font-size: 13px;
+                font-size: 14px;
               }
             }
           }

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

@@ -66,6 +66,7 @@ export function getMonitorComponent() {
     case 'sdmtjtbetmk': //布尔台
       FiberModal = defineAsyncComponent(() => import('./modal/fiber.modal-Gx.vue'));
       break;
+    case 'hnjmypmk': //崖坪 华宁焦煤
     case 'sdmtjtyjlmk': //榆家梁
     case 'sdmtjtcctmk': //榆家梁
     case 'sdmtjtswmk': //上湾

+ 39 - 19
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -245,22 +245,30 @@
           </a-tab-pane>
           <a-tab-pane key="4" tab="报警历史">
             <div class="tab-item" v-if="activeKey === '4'">
-              <AlarmHistoryTable
-                columns-type="alarm"
-                :device-type="deviceType"
-                :device-list-api="getTableList"
-                designScope="alarm-history"
-                :scroll="scroll"
-              >
-                <template #filterCell="{ column, record }">
-                  <a-tag v-if="column.dataIndex === 'warnFlag'" :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'">
-                    {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
-                  >
-                  <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
-                    record.netStatus == '0' ? '断开' : '连接'
-                  }}</a-tag>
-                </template>
-              </AlarmHistoryTable>
+              <template v-if="sysOrgCode != 'zmhjhzmy'">
+                <AlarmHistoryTable
+                  columns-type="alarm"
+                  :device-type="deviceType"
+                  :device-list-api="getTableList"
+                  designScope="alarm-history"
+                  :scroll="scroll"
+                >
+                  <template #filterCell="{ column, record }">
+                    <a-tag
+                      v-if="column.dataIndex === 'warnFlag'"
+                      :color="record.warnFlag == '0' ? 'green' : record.warnFlag == 1 ? '#FF5812' : 'gray'"
+                    >
+                      {{ record.warnFlag == '0' ? '正常' : record.warnFlag == 1 ? '报警' : record.warnFlag == 2 ? '断开' : '未监测' }}</a-tag
+                    >
+                    <a-tag v-if="column.dataIndex === 'netStatus'" :color="record.netStatus == '0' ? '#f00' : 'green'">{{
+                      record.netStatus == '0' ? '断开' : '连接'
+                    }}</a-tag>
+                  </template>
+                </AlarmHistoryTable>
+              </template>
+              <template v-else>
+                <AlarmHistoryTableHj :scroll="scroll" />
+              </template>
             </div>
           </a-tab-pane>
           <a-tab-pane key="5" tab="操作历史">
@@ -306,6 +314,7 @@
   import HistoryTable from '../comment/HistoryTable.vue';
   import AlarmHistoryTable from '../comment/AlarmHistoryTable.vue';
   import HandlerHistoryTable from '../comment/HandlerHistoryTable.vue';
+  import AlarmHistoryTableHj from './components/AlarmHistoryTableHj.vue';
   import HandleModal from './modal.vue';
   import DeviceBaseInfo from '../comment/components/DeviceBaseInfo.vue';
   import { mountedThree, addMonitorText, play, destroy, setModelType, computePlay, playWindow } from './gate.threejs';
@@ -322,9 +331,11 @@
   import { usePermission } from '/@/hooks/web/usePermission';
   import { getDictItems } from '/@/api/common/api';
   import { render } from '/@/utils/common/renderUtils';
+  import { useGlobSetting } from '/@/hooks/setting';
 
   const { hasPermission } = usePermission();
-
+  // const { sysOrgCode } = useGlobSetting();
+  const sysOrgCode = 'zmhjhzmy';
   const globalConfig = inject('globalConfig');
 
   const { currentRoute } = useRouter();
@@ -985,8 +996,17 @@
     loading.value = true;
     const playerDom = document.getElementById('fm-player1')?.getElementsByClassName('vjs-tech')[0];
     mountedThree(playerDom).then(async () => {
-      await getMonitor(true);
-      loading.value = false;
+      if (sysOrgCode != 'zmhjhzmy') {
+        await getMonitor(true);
+        loading.value = false;
+      } else {
+        // 韩咀无风门设备,只有报警历史数据,无其他数据
+        setModelType('fm1').then(async () => {
+          loading.value = false;
+          dataSource.value = [];
+          addMonitorText(selectData);
+        });
+      }
     });
   });
 

+ 10 - 4
src/views/vent/monitorManager/windowMonitor/components/modal.vue

@@ -13,19 +13,19 @@
       </template>
       <template v-if="type == '7'">
         <div class="vent-flex-row input-box">
-          <div class="label">前窗目标风量:</div>
+          <div class="label">前窗目标风量(m³/min):</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
       <template v-if="type == '8'">
         <div class="vent-flex-row input-box">
-          <div class="label">后窗目标风量:</div>
+          <div class="label">后窗目标风量(m³/min):</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
       <template v-if="type == 'ldkzStart'">
         <div class="vent-flex-row input-box">
-          <div class="label">瓦斯超限浓度:</div>
+          <div class="label">瓦斯超限浓度(%):</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
@@ -35,6 +35,12 @@
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
         </div>
       </template>
+      <template v-if="type.startsWith('air')">
+        <div class="vent-flex-row input-box">
+          <div class="label">风窗过风量(m³/min):</div>
+          <a-input-number size="small" placeholder="0" :min="0" v-model:value="data" />
+        </div>
+      </template>
       <div v-if="!globalConfig?.simulatedPassword" class="vent-flex-row input-box">
         <div class="label">操作密码:</div>
         <a-input size="small" type="password" v-model:value="passWord" />
@@ -104,7 +110,7 @@
   @ventSpace: zxm;
 
   .label {
-    width: 110px;
+    min-width: 110px;
   }
   .@{ventSpace}-input,
   .@{ventSpace}-input-number {

+ 1 - 1
src/views/vent/monitorManager/windowMonitor/dandaoFcBd3.threejs.ts

@@ -159,7 +159,7 @@ class ddFc_7 {
         const planeMesh = new THREE.Mesh(planeGeometry, textMaterial);
         planeMesh.name = 'monitorText';
         planeMesh.scale.set(0.003, 0.0034, 0.004);
-        planeMesh.position.set(4.25, 0.44, -0.27);
+        planeMesh.position.set(4.25, 0.41, -0.27);
         this.group?.add(planeMesh);
       }
     });

+ 1 - 1
src/views/vent/monitorManager/windowMonitor/dandaoFcYjl.threejs.ts

@@ -54,7 +54,7 @@ class ddFc_1 {
         y: 95,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(°)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        text: `${selectData.OpenDegree ? '设定开度值(°)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',

+ 10 - 0
src/views/vent/monitorManager/windowMonitor/index.vue

@@ -39,6 +39,7 @@
           <div class="button-box" @click="setControl('frontSetValue3', '后窗1面积设置')">后窗1面积</div>
           <div class="button-box" @click="setControl('frontSetValue4', '后窗2面积设置')">后窗2面积</div>
         </div>
+
         <div class="row" v-if="Number(selectData.nwindow) == 1">
           <div v-if="hasPermission('window:AreaControl')" class="button-box" @click="setArea(1)">设定风窗面积</div>
           <div v-if="hasPermission('window:showAngle')" class="button-box" @click="setAngle(1)">设定风窗角度</div>
@@ -49,6 +50,12 @@
         <div v-if="hasPermission('window:gasldkz')" class="button-box" @click="setArea('ldkzStart')">瓦斯超限调控开启</div>
         <div v-if="hasPermission('window:controlFull')" class="button-box" @click="setArea(5)">一键全开</div>
         <div v-if="hasPermission('window:controlFull')" class="button-box" @click="setArea(6)">一键全关</div>
+        <div class="row" v-if="hasPermission('window:fourFlControl')">
+          <div class="button-box" @click="setControl('air1', '前窗1风量设置')">设定前窗1风量</div>
+          <div class="button-box" @click="setControl('air2', '前窗2风量设置')">设定前窗2风量</div>
+          <div class="button-box" @click="setControl('air3', '后窗1风量设置')">设定后窗1风量</div>
+          <div class="button-box" @click="setControl('air4', '后窗2风量设置')">设定后窗2风量</div>
+        </div>
         <!-- 展会功能 -->
         <!-- <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea('ldkzStart')">自主联动控制开启</div>
         <div v-if="hasPermission('window:ldkz')" class="button-box" @click="setArea('ldkzStop')">自主联动控制停止</div> -->
@@ -514,6 +521,9 @@
       } else if (handlerState.startsWith('frontSetValue')) {
         data.paramcode = handlerState;
         data.value = value;
+      } else {
+        data.paramcode = handlerState;
+        data.value = value;
       }
       deviceControlApi(handlerState == 3 ? params : data)
         .then((res) => {