소스 검색

[Mod 0000] 思山岭调节风门bug修复

hongrunxia 19 시간 전
부모
커밋
7da73e5648

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

@@ -74,7 +74,7 @@ class ddFmSsl {
         y: 95,
       },
       {
-        text: `${selectData.OpenDegree ? '开度值(°)' : selectData.forntArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
+        text: `${selectData.OpenDegree ? '开度值(°)' : selectData.frontArea ? '过风面积(㎡)' : '过风面积(㎡)'}:`,
         font: 'normal 30px Arial',
         color: '#009900',
         strokeStyle: '#002200',
@@ -84,8 +84,8 @@ class ddFmSsl {
       {
         text: selectData.OpenDegree
           ? Number(`${selectData.OpenDegree}`).toFixed(2)
-          : selectData.forntArea
-            ? Number(`${selectData.forntArea}`).toFixed(2)
+          : selectData.frontArea
+            ? Number(`${selectData.frontArea}`).toFixed(2)
             : '-',
         font: 'normal 30px Arial',
         color: '#009900',

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

@@ -288,23 +288,21 @@ export function computePlay(data, maxarea, isFirst = false) {
     fmWindow.playWindow(rotationParam, 2);
     fmWindow.playWindow(rotationParam, 3);
     fmWindow.playWindow(rotationParam, 4);
-  } else if (fmType === 'fm_fc_bd' || fmType === 'fm_fc_ssl') {
-    maxarea = 90;
-    rotationParam.frontDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.forntArea);
-    rotationParam.backDeg0 = (90 / maxarea) * Number(isFirst ? 0 : data.rearArea);
-    rotationParam.frontDeg1 = (90 / maxarea) * Number(data.forntArea) || 0;
-    rotationParam.backDeg1 = (90 / maxarea) * Number(data.rearArea) || 0;
-    // rotationParam.frontDeg1 = 50;
-    // rotationParam.backDeg1 = 80;
-    let fmDc;
-    if (fmType === 'fm_fc_bd') {
-      fmDc = fmDcBd;
-    } else if (fmType === 'fm_fc_ssl') {
-      fmDc = fm_fc_ssl;
-    }
-
-    fmDc.playWindow(rotationParam, 1);
-    fmDc.playWindow(rotationParam, 2);
+  } else if (maxarea && fmType === 'fm_fc_bd') {
+    // maxarea = 90;
+    rotationParam.frontDeg0 = (90 / Number(maxarea)) * Number(isFirst ? 0 : data.frontArea);
+    rotationParam.backDeg0 = (90 / Number(maxarea)) * Number(isFirst ? 0 : data.rearArea);
+    rotationParam.frontDeg1 = (90 / Number(maxarea)) * Number(data.frontArea) || 0;
+    rotationParam.backDeg1 = (90 / Number(maxarea)) * Number(data.rearArea) || 0;
+    fmDcBd.playWindow(rotationParam, 1);
+    fmDcBd.playWindow(rotationParam, 2);
+  } else if (fmType === 'fm_fc_ssl') {
+    rotationParam.frontDeg0 = Number(isFirst ? 0 : data.frontPresentValue);
+    rotationParam.backDeg0 = Number(isFirst ? 0 : data.rearPresentValue);
+    rotationParam.frontDeg1 = Number(data.frontPresentValue) || 0;
+    rotationParam.backDeg1 = Number(data.rearPresentValue) || 0;
+    fm_fc_ssl.playWindow(rotationParam, 1);
+    fm_fc_ssl.playWindow(rotationParam, 2);
   }
 }
 

+ 60 - 30
src/views/vent/monitorManager/gateMonitor/index.vue

@@ -38,10 +38,16 @@
           >同时关闭</div
         >
         <template v-if="selectData['gateStyle'] && selectData['gateStyle'].includes('fm_fc')">
-          <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(10)">A窗控制</div>
-          <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(11)">B窗控制</div>
-          <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(12)">C窗控制</div>
-          <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(13)">D窗控制</div>
+          <template v-if="selectData['nwindownum'] == 4">
+            <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(10)">A窗控制</div>
+            <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(11)">B窗控制</div>
+            <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(12)">C窗控制</div>
+            <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(13)">D窗控制</div>
+          </template>
+          <template v-if="selectData['nwindownum'] == 2">
+            <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(14)">前窗控制</div>
+            <div v-if="hasPermission('btn:controlWindow')" class="button-box" @click="playAnimation(15)">后窗控制</div>
+          </template>
         </template>
       </div>
       <!-- 控制模式 -->
@@ -669,34 +675,40 @@
         }
         break;
       case 5: // 打开前后门
-        if (
-          selectData.frontGateOpen == '0' &&
-          selectData.frontGateClose == '1' &&
-          selectData.rearGateOpen == '0' &&
-          selectData.rearGateClose == '1'
-        ) {
-          modalTitle.value = '打开前后门';
-          modalType.value = '5';
-          modalIsShow.value = true;
-        } else {
-          // message.warning('前后门已经打开或正在打开,请勿重新操作');
-          message.warning('没有监测到前门、后门关到位,无法进行指令下发操作');
-        }
+        // if (
+        //   selectData.frontGateOpen == '0' &&
+        //   selectData.frontGateClose == '1' &&
+        //   selectData.rearGateOpen == '0' &&
+        //   selectData.rearGateClose == '1'
+        // ) {
+        //   modalTitle.value = '打开前后门';
+        //   modalType.value = '5';
+        //   modalIsShow.value = true;
+        // } else {
+        //   // message.warning('前后门已经打开或正在打开,请勿重新操作');
+        //   message.warning('没有监测到前门、后门关到位,无法进行指令下发操作');
+        // }
+        modalTitle.value = '打开前后门';
+        modalType.value = '5';
+        modalIsShow.value = true;
         break;
       case 6: // 关闭前后门
-        if (
-          selectData.frontGateOpen == '1' &&
-          selectData.frontGateClose == '0' &&
-          selectData.rearGateOpen == '1' &&
-          selectData.rearGateClose == '0'
-        ) {
-          modalTitle.value = '关闭前后门';
-          modalType.value = '6';
-          modalIsShow.value = true;
-        } else {
-          // message.warning('前后门已经关闭或正在关闭,请勿重新操作');
-          message.warning('没有监测到前门、后门开到位,无法进行指令下发操作');
-        }
+        // if (
+        //   selectData.frontGateOpen == '1' &&
+        //   selectData.frontGateClose == '0' &&
+        //   selectData.rearGateOpen == '1' &&
+        //   selectData.rearGateClose == '0'
+        // ) {
+        //   modalTitle.value = '关闭前后门';
+        //   modalType.value = '6';
+        //   modalIsShow.value = true;
+        // } else {
+        //   // message.warning('前后门已经关闭或正在关闭,请勿重新操作');
+        //   message.warning('没有监测到前门、后门开到位,无法进行指令下发操作');
+        // }
+        modalTitle.value = '关闭前后门';
+        modalType.value = '6';
+        modalIsShow.value = true;
         break;
 
       case 7: // 控制模式切换
@@ -726,6 +738,16 @@
         modalType.value = '13';
         modalIsShow.value = true;
         break;
+      case 14: // 风窗控制
+        modalTitle.value = '前窗控制';
+        modalType.value = '14';
+        modalIsShow.value = true;
+        break;
+      case 15: // 风窗控制
+        modalTitle.value = '后窗控制';
+        modalType.value = '15';
+        modalIsShow.value = true;
+        break;
     }
 
     if (globalConfig?.simulatedPassword) {
@@ -950,6 +972,14 @@
         data.paramcode = 'rearSetValue2';
         data.value = value;
         break;
+      case '14': // 后(B)窗控制
+        data.paramcode = 'frontSetValue';
+        data.value = value;
+        break;
+      case '15': // 后(B)窗控制
+        data.paramcode = 'rearSetValue';
+        data.value = value;
+        break;
     }
 
     if (data.paramcode) {

+ 2 - 6
src/views/vent/monitorManager/gateMonitor/modal.vue

@@ -5,7 +5,7 @@
         <ExclamationCircleFilled style="color: #ffb700; font-size: 30px" />
         <div class="warning-text">您是否要进行{{ title }}操作?</div>
       </div>
-      <div v-if="type == '10' || type == '11' || type == '12' || type == '13'">
+      <div v-if="type == '10' || type == '11' || type == '12' || type == '13' || type == '14' || type == '15'">
         <div class="vent-flex-row input-box">
           <div class="label">风窗开启角度:</div>
           <a-input-number size="small" placeholder="0" :min="0" v-model:value="value" />
@@ -60,11 +60,7 @@
 
   function handleOk() {
     //
-    if (type.value == '10') {
-      emit('handleOk', passWord.value, type.value, value.value);
-    } else {
-      emit('handleOk', passWord.value, type.value, value.value);
-    }
+    emit('handleOk', passWord.value, type.value, value.value);
   }
   function handleCancel() {
     //