浏览代码

注氮提交新版本

lxh 1 年之前
父节点
当前提交
c9bf39556f
共有 1 个文件被更改,包括 28 次插入8 次删除
  1. 28 8
      src/views/vent/monitorManager/compressor/components/nitrogenHome1.vue

+ 28 - 8
src/views/vent/monitorManager/compressor/components/nitrogenHome1.vue

@@ -38,7 +38,7 @@
               ><span class="val">{{
                 monitorData[groupNum - 1]['AirCompressor_RunTime'] ? monitorData[groupNum - 1]['AirCompressor_RunTime'] : '-'
               }}</span
-              ><span class="unit">-</span></span
+              ><span class="unit">h</span></span
             >
           </div>
           <div class="monitor-item">
@@ -47,7 +47,7 @@
               ><span class="val">{{
                 monitorData[groupNum - 1]['AirCompressor_LoadTime'] ? monitorData[groupNum - 1]['AirCompressor_LoadTime'] : '-'
               }}</span
-              ><span class="unit">-</span></span
+              ><span class="unit">h</span></span
             >
           </div>
         </fourBorderBg>
@@ -127,14 +127,32 @@
                 <div class="control-item" v-for="(groupNum, index) in monitorDataGroupNum" :key="groupNum">
                   <div class="control-item-title">{{ monitorData[groupNum - 1]['strname'] }}</div>
                   <div class="control-item-state">
-                    <a-switch
+                    <!-- <a-switch
                       v-model="airCompressorState[groupNum - 1][`compressRunSigF1`]"
                       size="small"
                       checked-children="开启"
                       un-checked-children="关闭"
                       :disabled="airCompressorState[groupNum - 1][`controlModel`]"
                       @change="handlerDevice(airCompressorState[groupNum - 1], index)"
-                    />
+                    /> -->
+                    <a-button v-if="index==0" size="small"  type="text" style="color: #fff;" @click="handlerDevice(airCompressorState[groupNum - 1], index,true)">一键启停</a-button>
+                    <a-button v-else size="small"  type="text" style="color: #fff;" @click="handlerDevice(airCompressorState[groupNum - 1], index, true)">一键复位</a-button>
+                 
+                  </div>
+                </div>
+                <div class="control-item" v-for="(groupNum, index) in monitorDataGroupNum" :key="groupNum">
+                  <div class="control-item-title">{{ monitorData[groupNum - 1]['strname'] }}</div>
+                  <div class="control-item-state">
+                    <!-- <a-switch
+                      v-model="airCompressorState[groupNum - 1][`compressRunSigF1`]"
+                      size="small"
+                      checked-children="开启"
+                      un-checked-children="关闭"
+                      :disabled="airCompressorState[groupNum - 1][`controlModel`]"
+                      @change="handlerDevice(airCompressorState[groupNum - 1], index)"
+                    /> -->
+                    <a-button v-if="index==0" size="small"  type="text" style="color: #fff;" @click="handlerDevice(airCompressorState[groupNum - 1], index,false)">一键启停</a-button>
+                    <a-button v-else size="small"  type="text" style="color: #fff;" @click="handlerDevice(airCompressorState[groupNum - 1], index,false)">一键复位</a-button>
                   </div>
                 </div>
               </div>
@@ -293,7 +311,6 @@
               id: v.deviceID,
               deviceType:v.deviceType,
               compressRunSigF1: false,
-              controlModel: false,
             });
           });
         }
@@ -303,20 +320,22 @@
     }
   }
 
-  function handlerDevice(data, index) {
+  function handlerDevice(data, index,bol) {
     console.log(index,'index-------')
+    console.log(bol,'bol-------')
     kzParam.data = data;
     kzParam.activeIndex = index;
+    console.log(kzParam,'kz--------')
     if (index == 1) {
       modalTitle.value = '一键复位';
       modalType.value = '1';
       modalIsShow.value = true;
-      kzParam.data.compressRunSigF1 = !kzParam.data.compressRunSigF1;
+      kzParam.data.compressRunSigF1 = bol ? true : false
     } else {
       modalTitle.value = '一键启停';
       modalType.value = '2';
       modalIsShow.value = true;
-      kzParam.data.compressRunSigF1 = !kzParam.data.compressRunSigF1;
+      kzParam.data.compressRunSigF1 = bol ? true : false;
     }
   }
   function handleOK(passWord, handlerState) {
@@ -623,6 +642,7 @@
             flex-wrap: wrap;
 
             .control-item {
+              width: 50%;//lxh
               display: flex;
               flex-direction: column;
               justify-content: center;