Bladeren bron

1. 新增防火门文件
2. 主风机控制逻辑修改

hongrunxia 1 week geleden
bovenliggende
commit
c17945750e

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

@@ -317,9 +317,9 @@
     Object.assign(selectData, initData, selectRow, baseData);
     doorDeviceState = 1; //记录设备状态,为了与下一次监测数据做比较
     let type = 'fireDoor';
-    if (selectData.deviceType == 'door_fire') {
+    if (selectData.modelType == 'bd_qt') {
       type = 'fireDoor';
-    } else if (selectData.deviceType == 'door_fire_h') {
+    } else if (selectData.modelType == 'bd_kj') {
       type = 'fireDoorF';
     }
     await setModelType(type);

+ 45 - 15
src/views/vent/monitorManager/mainFanMonitor/index.vue

@@ -94,15 +94,14 @@
     <div id="main3D" style="width: 100%; height: 100%; position: absolute; overflow: hidden"> </div>
     <FanEchrats id="fan-echarts" :chartData="selectData" style="position: absolute; z-index: -1" />
   </div>
-  <!-- v-if="hasPermission('btn:remote')" -->
-  <div class="top-right">
+  <!-- 控制模式 -->
+  <div v-if="hasPermission('fan:remote')" class="top-right">
     <div class="control-title">控制模式:</div>
     <a-radio-group v-model:value="selectData.autoRoManual">
       <template v-for="(item, index) in modelList" :key="index">
         <a-radio :value="item.value" :disabled="true">{{ item.text }}</a-radio>
       </template>
     </a-radio-group>
-    <!-- <div class="button-box" v-for="(item, index) in modelList" @click="handleOk('remote', item.value)" :key="index">{{ item.text }}</div> -->
     <div
       class="button-box"
       v-for="(item, index) in modelList"
@@ -123,7 +122,6 @@
       </template>
       <!-- <div class="button-box" v-for="(item, index) in modalTypeArr.centerBtnArr" :key="index" @click="showModal(item)">{{ item.value }}</div> -->
     </div>
-    <!-- 控制模式 -->
 
     <div v-if="!faultShow" class="data-show-box">
       <div class="data-item">
@@ -281,6 +279,7 @@
                   <div
                     class="fault-item"
                     v-if="faultItem['valueCode'].startsWith(dataMonitorRowIndex === 0 ? 'faultEqu1_electric1' : 'faultEqu2_electric1')"
+                    :class="{ 'fault-warning': faultItem['warnLevel'] == 104, 'fault-error': faultItem['warnLevel'] == 201 }"
                   >
                     <div class="item" v-for="(item, index) in faultDeviceHeader" :key="index" :style="{ width: item.width }">{{
                       faultItem[item.code]
@@ -292,7 +291,7 @@
           </div>
         </div>
       </div>
-      <div class="data-item">
+      <div class="data-item" style="margin-top: 8px">
         <div class="item-header">二级电机监测</div>
         <div class="item-container">
           <div class="tab">
@@ -313,6 +312,7 @@
                   <div
                     class="fault-item"
                     v-if="faultItem['valueCode'].startsWith(warningMonitorRowIndex === 0 ? 'faultEqu1_electric2' : 'faultEqu2_electric2')"
+                    :class="{ 'fault-warning': faultItem['warnLevel'] == 104, 'fault-error': faultItem['warnLevel'] == 201 }"
                   >
                     <div class="item" v-for="(item, index) in faultDeviceHeader" :key="index" :style="{ width: item.width }">{{
                       faultItem[item.code]
@@ -490,19 +490,32 @@
           </a-radio-group>
         </div>
       </div>
-      <div class="" v-if="modalType == 'startFan'">
+      <div class="" v-if="modalType == 'startFan' && hasPermission('fan:startAndResetFan')">
+        <!-- 不互斥控制 -->
+        <div class="startSmoke-select">
+          <div class="label">主机:</div>
+          <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Open')">开启</div>
+          <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Stop')">停止</div>
+          <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Reset')">复位</div>
+        </div>
+        <div class="startSmoke-select">
+          <div class="label">备机:</div>
+          <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Open')">开启</div>
+          <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Stop')">停止</div>
+          <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Reset')">复位</div>
+        </div>
+      </div>
+      <div class="" v-if="modalType == 'startFan' && hasPermission('fan:startFan')">
         <!-- 不互斥控制 -->
         <div class="startSmoke-select">
           <div class="label">主机:</div>
           <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Open')">开启</div>
           <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Stop')">停止</div>
-          <!-- <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan1Reset')">复位</div> -->
         </div>
         <div class="startSmoke-select">
           <div class="label">备机:</div>
           <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Open')">开启</div>
           <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Stop')">停止</div>
-          <!-- <div :class="{ 'button-box': true, 'button-disable': false }" @click="handleOk('Fan2Reset')">复位</div> -->
         </div>
       </div>
       <!-- 防爆门控制 -->
@@ -549,7 +562,7 @@
       </div>
     </div>
   </a-modal>
-  <!-- 在线监测和故障诊断 -->
+  <!-- 保德在线监测和故障诊断 -->
   <div v-if="sysOrgCode === 'sdmtjtbdmk' && faultData.length > 0" class="monitor-tab" @click="showFault">
     <div class="item" :class="{ 'item-active': !faultShow }">风机监测</div>
     <div class="item" :class="{ 'item-active': faultShow }">在线故障诊断监测</div>
@@ -567,7 +580,7 @@
   import FanDeviceEcharts from '../comment/FanDeviceEcharts.vue';
   import BarAndLine from '../../../../components/chart/BarAndLine.vue';
   import FanEchrats from '/@/views/vent/monitorManager/mainFanMonitor/fanEchrats.vue';
-  import { onBeforeMount, computed, ref, onMounted, inject, onUnmounted, reactive, toRaw, watch, nextTick, defineAsyncComponent } from 'vue';
+  import { onBeforeMount, unref, ref, onMounted, inject, onUnmounted, reactive, toRaw, watch, nextTick, defineAsyncComponent } from 'vue';
   import GroupMonitorTable from '../comment/GroupMonitorTable.vue';
   // // import HistoryTable from '../comment/HistoryTable.vue';
   // import HistoryTable from '../../../vent/comment/history/HistoryTable.vue';
@@ -609,6 +622,7 @@
   const { currentRoute } = useRouter();
   const { createMessage, createConfirm } = useMessage();
   const { sysOrgCode } = useGlobSetting();
+  // const sysOrgCode = 'sdmtjtbdmk';
   const scroll = reactive({
     y: 180,
   });
@@ -803,6 +817,8 @@
         }
       });
     }
+    // const result = await pointMonitor({ ids: '1657545388451663006' });
+    // faultData.value = result['valueList'] || [];
     if (faultDevice) {
       const result = await pointMonitor({ ids: faultDevice.deviceId });
       faultData.value = result['valueList'] || [];
@@ -842,9 +858,10 @@
             if (dataSource.value.length > 0 && dataSource.value[selectRowIndex.value]) {
               Object.assign(selectData, dataSource.value[selectRowIndex.value]);
             }
+            addText();
+            playAnimate(selectData);
           }
-          addText();
-          playAnimate(selectData);
+
           if (timer) {
             timer = null;
           }
@@ -1011,7 +1028,7 @@
     }
   };
 
-  const handleOk = () => {
+  const handleOk = (flag?) => {
     if (passWord.value == '') {
       createMessage.warning('请输入密码!');
       return;
@@ -1020,10 +1037,10 @@
       iconType: 'warning',
       title: '控制',
       content: '您确定要控制吗?',
-      onOk: () => handerFn(),
+      onOk: () => handerFn(flag),
     });
 
-    const handerFn = () => {
+    const handerFn = (flag?) => {
       if (modalType.value == 'startSmoke') {
         if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
           start('CtrlFan2Start')
@@ -1048,6 +1065,7 @@
           backMonitorIsShow.value = false;
         }
       } else if (modalType.value == 'changeDirection') {
+        // 红柳林矿一键反风操作是倒机+反风,如主机运行,一件反风后,备机启动并风向与原来相反
         if (selectData['Fan1StartStatus'] == 1 && selectData['Fan2StartStatus'] == 0) {
           // 主机一键反风
           if (isSimulation) {
@@ -1322,6 +1340,8 @@
   });
 
   onMounted(async () => {
+    const { query } = unref(currentRoute);
+    if (query['deviceType']) deviceType.value = query['deviceType'] as string;
     loading.value = true;
     modelList.value = await getDictItems('mainFanModel');
     mountedThree(player1.value).then(async () => {
@@ -1632,6 +1652,16 @@
         }
         .fault-container-group {
           overflow: hidden;
+          .fault-warning {
+            color: #ff7b00;
+            font-weight: 600px;
+            font-size: 16px;
+          }
+          .fault-error {
+            color: #ff3410;
+            font-weight: 600px;
+            font-size: 16px;
+          }
         }
         .warning-group {
           padding: 0 10px;

+ 7 - 2
src/views/vent/monitorManager/mainFanMonitor/main.data.ts

@@ -341,12 +341,12 @@ export const faultDeviceHeader = [
   },
   {
     title: '预警限值',
-    code: 'warnMax_104',
+    code: 'warnMin_104',
     width: '110px',
   },
   {
     title: '报警限值',
-    code: 'warnMax_201',
+    code: 'warnMin_201',
     width: '110px',
   },
 ];
@@ -377,6 +377,11 @@ export const modalTypeArr = {
       permission: 'fan:startFan',
     },
     {
+      key: 'startFan',
+      value: '启动/停止',
+      permission: 'fan:startAndResetFan',
+    },
+    {
       key: 'resetFan',
       value: '一键复位',
       permission: 'fan:resetFan',