Forráskód Böngészése

[Wip 0000] 三道沟均压修改

houzekong 4 napja
szülő
commit
60cea041e0

+ 13 - 19
src/views/vent/monitorManager/balancePressMonitor/balancePress.data.ts

@@ -185,38 +185,32 @@ export const settingParam3 = [
 ];
 export const settingParam4 = [
   {
-    title: '一氧化碳浓度上限',
-    code: 'coMaxVal',
+    title: '两端头水柱计压差上限',
+    code: 'waterPressureMax',
     value: '',
-    unit: 'ppm',
+    unit: 'pa',
   },
   {
-    title: '甲烷浓度上限',
-    code: 'ch4MaxVal',
+    title: '两端头水柱计压差下限',
+    code: 'waterPressureMin',
     value: '',
-    unit: '%',
-  },
-  {
-    title: '氧气浓度下限',
-    code: 'o2MinVal',
-    value: '',
-    unit: '%',
+    unit: 'pa',
   },
   {
-    title: '漏风量上限',
-    code: 'windLeakMax',
+    title: '大气压变化值',
+    code: 'pressureDiffMax',
     value: '',
-    unit: 'm³/min',
+    unit: 'pa',
   },
   {
-    title: '漏风量下限',
-    code: 'windLeakMin',
+    title: '氧气上限',
+    code: 'o2MaxVal',
     value: '',
     unit: 'm³/min',
   },
   {
-    title: '需风量',
-    code: 'windDemand',
+    title: '氧气下限',
+    code: 'o2MinVal',
     value: '',
     unit: 'm³/min',
   },

+ 41 - 7
src/views/vent/monitorManager/balancePressMonitor/components/balancePressHomeBD.vue

@@ -14,6 +14,13 @@
                 <a-radio value="2">开启</a-radio>
               </a-radio-group>
             </div>
+            <div class="vent-flex-row-between auto-control mt-10px mb-10px">
+              <div class="title">调节类型:</div>
+              <a-radio-group :value="avePressSetting.controlType" name="radioGroup" @change="changeIsAutoControl">
+                <a-radio value="1">氧气</a-radio>
+                <a-radio value="2">压差</a-radio>
+              </a-radio-group>
+            </div>
             <div class="input-box">
               <!-- <div class="divider-line">开始条件</div>
               <div v-for="(item, index) in settingParam1" class="input-item" :key="index">
@@ -90,6 +97,15 @@
     </div>
     <PasswordModal :modal-is-show="modalVisible" modal-title="提交" @handle-ok="handleResolve" @handle-cancel="handleReject" />
     <UpdatePassword @register="updatePwdRegister" @submit="handleChangePassword" />
+    <BasicModal @register="warnRegister1">
+      {{ warnModalText1 }}
+    </BasicModal>
+    <BasicModal @register="warnRegister2">
+      {{ warnModalText2 }}
+    </BasicModal>
+    <BasicModal @register="warnRegister3">
+      {{ warnModalText3 }}
+    </BasicModal>
   </a-spin>
 </template>
 <script setup lang="ts">
@@ -104,7 +120,7 @@
   import ventBox1 from '/@/components/vent/ventBox1.vue';
   import PasswordModal from '../../comment/components/PasswordModal.vue';
   import UpdatePassword from '../../comment/components/UpdatePassword.vue';
-  import { useModal } from '/@/components/Modal';
+  import { BasicModal, useModal } from '/@/components/Modal';
   import { connectWebSocket, onWebSocket } from '/@/hooks/web/useWebSocket';
   import { getToken } from '/@/utils/auth';
   import { useUserStore } from '/@/store/modules/user';
@@ -199,6 +215,9 @@
   const { configs, fetchConfigs } = useInitConfigs();
 
   const [updatePwdRegister, { openModal, closeModal, setModalProps }] = useModal();
+  const [warnRegister1, warnModal1] = useModal();
+  const [warnRegister2, warnModal2] = useModal();
+  const [warnRegister3, warnModal3] = useModal();
 
   function handleChangePassword(values) {
     setModalProps({ confirmLoading: true });
@@ -258,6 +277,10 @@
     resolver = null;
   }
 
+  const warnModalText1 = ref('');
+  const warnModalText2 = ref('');
+  const warnModalText3 = ref('');
+
   // 初始化 WebSocket
   function initWebSocket() {
     const token = getToken();
@@ -267,12 +290,23 @@
     const url = `${glob.wsUrl?.replace('https://', 'wss://').replace('http://', 'ws://')}/websocket/${userStore.getUserInfo.id}?token=${token}`;
     connectWebSocket(url);
     onWebSocket((data: any) => {
-      console.error('NO ERROR HERE! ', data);
-      notification.open({
-        message: data.title,
-        description: JSON.parse(data.content).info,
-        placement: 'topRight',
-      });
+      if (data.cmd === 'topic') {
+        if (data.msgTxt) {
+          const { info = '' } = JSON.parse(data.msgTxt);
+          if (info.includes('局扇')) {
+            warnModalText3.value = info;
+            warnModal3.openModal();
+          }
+          if (info.includes('风门')) {
+            warnModalText2.value = info;
+            warnModal2.openModal();
+          }
+          if (info.includes('压差')) {
+            warnModalText1.value = info;
+            warnModal1.openModal();
+          }
+        }
+      }
     });
   }
 

+ 4 - 1
src/views/vent/monitorManager/balancePressMonitor/hooks/useControl.ts

@@ -26,8 +26,11 @@ export function usePressControl() {
       subList2({
         strType: 'sdg_gate_to_gate',
       }),
+      // subList({
+      //   strType: 'sdg_gas_monitor',
+      // }),
       subList({
-        strType: 'sdg_gas_monitor',
+        strType: 'sdg_pressure_to_window',
       }),
     ]).then(([linkageData, gateData, settingData]) => {
       avePressLinkage.value = get(linkageData, '[0]', {});