فهرست منبع

Merge branch 'master' of http://182.92.126.35:3000/msx/Vent-App

lxh 1 هفته پیش
والد
کامیت
57a62fe672
2فایلهای تغییر یافته به همراه386 افزوده شده و 335 حذف شده
  1. 337 307
      pages/home/detail/autodoor/autodoor.vue
  2. 49 28
      pages/warndata/warndata.vue

+ 337 - 307
pages/home/detail/autodoor/autodoor.vue

@@ -206,349 +206,369 @@
             </div>
           </div>
           <div class="flex-container" v-else-if="TabCur == 'fanmain'">
-            <div>主机</div>
-            <div
-              class="itemback"
-              v-for="(item, index) in showColum[TabCur + '_monitor_left']"
-              :key="index"
-              v-show="item.appShow == 1"
-            >
-              <div
-                class="datacardtime"
-                v-if="item.monitorcode == 'readTime' && item.datatype == 1"
-              >
-                <view
-                  class="demo-layout bg-purple-light"
-                  style="padding: 20rpx; color: #3787fe"
+            <div class="monitor-content">
+              <div class="zhuji">
+                <div>主机</div>
+                <div
+                  class="itemback"
+                  v-for="(item, index) in showColum[TabCur + '_monitor_left']"
+                  :key="index"
+                  v-show="item.appShow == 1"
                 >
-                  {{ readTime }}
-                </view>
-              </div>
-              <div class="datacard" v-if="item.monitorcode !== 'readTime'">
-                <div class="left-content">
-                  <view
-                    v-if="item.monitorcode == 'netStatus' && item.datatype == 1"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
-                  >
-                    {{ doorNetStatus == "1" ? "正常" : "异常" }}
-                  </view>
-                  <view
-                    v-else-if="item.datatype == 1"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
+                  <div
+                    class="datacardtime"
+                    v-if="item.monitorcode == 'readTime' && item.datatype == 1"
                   >
-                    {{
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan1")
-                          : item.monitorcode
-                      ] !== undefined &&
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan1")
-                          : item.monitorcode
-                      ] !== null
-                        ? tableData[
+                    <view
+                      class="demo-layout bg-purple-light"
+                      style="padding: 20rpx; color: #3787fe"
+                    >
+                      {{ readTime }}
+                    </view>
+                  </div>
+                  <div class="datacard" v-if="item.monitorcode !== 'readTime'">
+                    <div class="left-content">
+                      <view
+                        v-if="
+                          item.monitorcode == 'netStatus' && item.datatype == 1
+                        "
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{ doorNetStatus == "1" ? "正常" : "异常" }}
+                      </view>
+                      <view
+                        v-else-if="item.datatype == 1"
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{
+                          tableData[
                             item.monitorcode.startsWith("Fan")
                               ? item.monitorcode.replace(/^Fan/, "Fan1")
                               : item.monitorcode
-                          ]
-                        : "-"
-                    }}
-                  </view>
-                  <view
-                    v-else-if="item.datatype == 2"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
-                  >
-                    {{
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan1")
-                          : item.monitorcode
-                      ] !== undefined &&
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan1")
-                          : item.monitorcode
-                      ] !== null
-                        ? tableData[
+                          ] !== undefined &&
+                          tableData[
                             item.monitorcode.startsWith("Fan")
                               ? item.monitorcode.replace(/^Fan/, "Fan1")
                               : item.monitorcode
-                          ]
-                        : "-"
-                    }}
-                  </view>
-                  <div class="spacer"></div>
-                  <!-- 间距 -->
-                  <view
-                    class="demo-layout bg-purple-light"
-                    style="color: #677799"
-                  >
-                    {{ item.des }}
-                  </view>
+                          ] !== null
+                            ? tableData[
+                                item.monitorcode.startsWith("Fan")
+                                  ? item.monitorcode.replace(/^Fan/, "Fan1")
+                                  : item.monitorcode
+                              ]
+                            : "-"
+                        }}
+                      </view>
+                      <view
+                        v-else-if="item.datatype == 2"
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{
+                          tableData[
+                            item.monitorcode.startsWith("Fan")
+                              ? item.monitorcode.replace(/^Fan/, "Fan1")
+                              : item.monitorcode
+                          ] !== undefined &&
+                          tableData[
+                            item.monitorcode.startsWith("Fan")
+                              ? item.monitorcode.replace(/^Fan/, "Fan1")
+                              : item.monitorcode
+                          ] !== null
+                            ? tableData[
+                                item.monitorcode.startsWith("Fan")
+                                  ? item.monitorcode.replace(/^Fan/, "Fan1")
+                                  : item.monitorcode
+                              ]
+                            : "-"
+                        }}
+                      </view>
+                      <div class="spacer"></div>
+                      <!-- 间距 -->
+                      <view
+                        class="demo-layout bg-purple-light"
+                        style="color: #677799"
+                      >
+                        {{ item.des }}
+                      </view>
+                    </div>
+                  </div>
                 </div>
               </div>
-            </div>
-            <div>备机</div>
-            <div
-              class="itemback"
-              v-for="(item, index) in showColum[TabCur + '_monitor_left']"
-              :key="index"
-              v-show="item.appShow == 1"
-            >
-              <div
-                class="datacardtime"
-                v-if="item.monitorcode == 'readTime' && item.datatype == 1"
-              >
-                <view
-                  class="demo-layout bg-purple-light"
-                  style="padding: 20rpx; color: #3787fe"
+              <div class="beiji">
+                <div>备机</div>
+                <div
+                  class="itemback"
+                  v-for="(item, index) in showColum[TabCur + '_monitor_left']"
+                  :key="index"
+                  v-show="item.appShow == 1"
                 >
-                  {{ readTime }}
-                </view>
-              </div>
-              <div class="datacard" v-if="item.monitorcode !== 'readTime'">
-                <div class="left-content">
-                  <view
-                    v-if="item.monitorcode == 'netStatus' && item.datatype == 1"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
-                  >
-                    {{ doorNetStatus == "1" ? "正常" : "异常" }}
-                  </view>
-                  <view
-                    v-else-if="item.datatype == 1"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
+                  <div
+                    class="datacardtime"
+                    v-if="item.monitorcode == 'readTime' && item.datatype == 1"
                   >
-                    {{
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan2")
-                          : item.monitorcode
-                      ] !== undefined &&
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan2")
-                          : item.monitorcode
-                      ] !== null
-                        ? tableData[
+                    <view
+                      class="demo-layout bg-purple-light"
+                      style="padding: 20rpx; color: #3787fe"
+                    >
+                      {{ readTime }}
+                    </view>
+                  </div>
+                  <div class="datacard" v-if="item.monitorcode !== 'readTime'">
+                    <div class="left-content">
+                      <view
+                        v-if="
+                          item.monitorcode == 'netStatus' && item.datatype == 1
+                        "
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{ doorNetStatus == "1" ? "正常" : "异常" }}
+                      </view>
+                      <view
+                        v-else-if="item.datatype == 1"
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{
+                          tableData[
                             item.monitorcode.startsWith("Fan")
                               ? item.monitorcode.replace(/^Fan/, "Fan2")
                               : item.monitorcode
-                          ]
-                        : "-"
-                    }}
-                  </view>
-                  <view
-                    v-else-if="item.datatype == 2"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
-                  >
-                    {{
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan2")
-                          : item.monitorcode
-                      ] !== undefined &&
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan2")
-                          : item.monitorcode
-                      ] !== null
-                        ? tableData[
+                          ] !== undefined &&
+                          tableData[
                             item.monitorcode.startsWith("Fan")
                               ? item.monitorcode.replace(/^Fan/, "Fan2")
                               : item.monitorcode
-                          ]
-                        : "-"
-                    }}
-                  </view>
-                  <div class="spacer"></div>
-                  <!-- 间距 -->
-                  <view
-                    class="demo-layout bg-purple-light"
-                    style="color: #677799"
-                  >
-                    {{ item.des }}
-                  </view>
+                          ] !== null
+                            ? tableData[
+                                item.monitorcode.startsWith("Fan")
+                                  ? item.monitorcode.replace(/^Fan/, "Fan2")
+                                  : item.monitorcode
+                              ]
+                            : "-"
+                        }}
+                      </view>
+                      <view
+                        v-else-if="item.datatype == 2"
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{
+                          tableData[
+                            item.monitorcode.startsWith("Fan")
+                              ? item.monitorcode.replace(/^Fan/, "Fan2")
+                              : item.monitorcode
+                          ] !== undefined &&
+                          tableData[
+                            item.monitorcode.startsWith("Fan")
+                              ? item.monitorcode.replace(/^Fan/, "Fan2")
+                              : item.monitorcode
+                          ] !== null
+                            ? tableData[
+                                item.monitorcode.startsWith("Fan")
+                                  ? item.monitorcode.replace(/^Fan/, "Fan2")
+                                  : item.monitorcode
+                              ]
+                            : "-"
+                        }}
+                      </view>
+                      <div class="spacer"></div>
+                      <!-- 间距 -->
+                      <view
+                        class="demo-layout bg-purple-light"
+                        style="color: #677799"
+                      >
+                        {{ item.des }}
+                      </view>
+                    </div>
+                  </div>
                 </div>
               </div>
             </div>
           </div>
           <div class="flex-container" v-else-if="TabCur == 'fanlocal'">
-            <div>主机</div>
-            <div
-              class="itemback"
-              v-for="(item, index) in showColum[TabCur + '_monitor_right']"
-              :key="index"
-              v-show="item.appShow == 1"
-            >
-              <div
-                class="datacardtime"
-                v-if="item.monitorcode == 'readTime' && item.datatype == 1"
-              >
-                <view
-                  class="demo-layout bg-purple-light"
-                  style="padding: 20rpx; color: #3787fe"
+            <div class="monitor-content">
+              <div class="zhuji">
+                <div>主机</div>
+                <div
+                  class="itemback"
+                  v-for="(item, index) in showColum[TabCur + '_monitor_right']"
+                  :key="index"
+                  v-show="item.appShow == 1"
                 >
-                  {{ readTime }}
-                </view>
-              </div>
-              <div class="datacard" v-if="item.monitorcode !== 'readTime'">
-                <div class="left-content">
-                  <view
-                    v-if="item.monitorcode == 'netStatus' && item.datatype == 1"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
-                  >
-                    {{ doorNetStatus == "1" ? "正常" : "异常" }}
-                  </view>
-                  <view
-                    v-else-if="item.datatype == 1"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
+                  <div
+                    class="datacardtime"
+                    v-if="item.monitorcode == 'readTime' && item.datatype == 1"
                   >
-                    {{
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan1")
-                          : item.monitorcode
-                      ] !== undefined &&
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan1")
-                          : item.monitorcode
-                      ] !== null
-                        ? tableData[
+                    <view
+                      class="demo-layout bg-purple-light"
+                      style="padding: 20rpx; color: #3787fe"
+                    >
+                      {{ readTime }}
+                    </view>
+                  </div>
+                  <div class="datacard" v-if="item.monitorcode !== 'readTime'">
+                    <div class="left-content">
+                      <view
+                        v-if="
+                          item.monitorcode == 'netStatus' && item.datatype == 1
+                        "
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{ doorNetStatus == "1" ? "正常" : "异常" }}
+                      </view>
+                      <view
+                        v-else-if="item.datatype == 1"
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{
+                          tableData[
                             item.monitorcode.startsWith("Fan")
                               ? item.monitorcode.replace(/^Fan/, "Fan1")
                               : item.monitorcode
-                          ]
-                        : "-"
-                    }}
-                  </view>
-                  <view
-                    v-else-if="item.datatype == 2"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
-                  >
-                    {{
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan1")
-                          : item.monitorcode
-                      ] !== undefined &&
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan1")
-                          : item.monitorcode
-                      ] !== null
-                        ? tableData[
+                          ] !== undefined &&
+                          tableData[
                             item.monitorcode.startsWith("Fan")
                               ? item.monitorcode.replace(/^Fan/, "Fan1")
                               : item.monitorcode
-                          ]
-                        : "-"
-                    }}
-                  </view>
-                  <div class="spacer"></div>
-                  <!-- 间距 -->
-                  <view
-                    class="demo-layout bg-purple-light"
-                    style="color: #677799"
-                  >
-                    {{ item.des }}
-                  </view>
+                          ] !== null
+                            ? tableData[
+                                item.monitorcode.startsWith("Fan")
+                                  ? item.monitorcode.replace(/^Fan/, "Fan1")
+                                  : item.monitorcode
+                              ]
+                            : "-"
+                        }}
+                      </view>
+                      <view
+                        v-else-if="item.datatype == 2"
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{
+                          tableData[
+                            item.monitorcode.startsWith("Fan")
+                              ? item.monitorcode.replace(/^Fan/, "Fan1")
+                              : item.monitorcode
+                          ] !== undefined &&
+                          tableData[
+                            item.monitorcode.startsWith("Fan")
+                              ? item.monitorcode.replace(/^Fan/, "Fan1")
+                              : item.monitorcode
+                          ] !== null
+                            ? tableData[
+                                item.monitorcode.startsWith("Fan")
+                                  ? item.monitorcode.replace(/^Fan/, "Fan1")
+                                  : item.monitorcode
+                              ]
+                            : "-"
+                        }}
+                      </view>
+                      <div class="spacer"></div>
+                      <!-- 间距 -->
+                      <view
+                        class="demo-layout bg-purple-light"
+                        style="color: #677799"
+                      >
+                        {{ item.des }}
+                      </view>
+                    </div>
+                  </div>
                 </div>
               </div>
-            </div>
-            <div>备机</div>
-            <div
-              class="itemback"
-              v-for="(item, index) in showColum[TabCur + '_monitor_right']"
-              :key="index"
-              v-show="item.appShow == 1"
-            >
-              <div
-                class="datacardtime"
-                v-if="item.monitorcode == 'readTime' && item.datatype == 1"
-              >
-                <view
-                  class="demo-layout bg-purple-light"
-                  style="padding: 20rpx; color: #3787fe"
+              <div class="beiji">
+                <div>备机</div>
+                <div
+                  class="itemback"
+                  v-for="(item, index) in showColum[TabCur + '_monitor_right']"
+                  :key="index"
+                  v-show="item.appShow == 1"
                 >
-                  {{ readTime }}
-                </view>
-              </div>
-              <div class="datacard" v-if="item.monitorcode !== 'readTime'">
-                <div class="left-content">
-                  <view
-                    v-if="item.monitorcode == 'netStatus' && item.datatype == 1"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
-                  >
-                    {{ doorNetStatus == "1" ? "正常" : "异常" }}
-                  </view>
-                  <view
-                    v-else-if="item.datatype == 1"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
+                  <div
+                    class="datacardtime"
+                    v-if="item.monitorcode == 'readTime' && item.datatype == 1"
                   >
-                    {{
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan2")
-                          : item.monitorcode
-                      ] !== undefined &&
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan2")
-                          : item.monitorcode
-                      ] !== null
-                        ? tableData[
+                    <view
+                      class="demo-layout bg-purple-light"
+                      style="padding: 20rpx; color: #3787fe"
+                    >
+                      {{ readTime }}
+                    </view>
+                  </div>
+                  <div class="datacard" v-if="item.monitorcode !== 'readTime'">
+                    <div class="left-content">
+                      <view
+                        v-if="
+                          item.monitorcode == 'netStatus' && item.datatype == 1
+                        "
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{ doorNetStatus == "1" ? "正常" : "异常" }}
+                      </view>
+                      <view
+                        v-else-if="item.datatype == 1"
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{
+                          tableData[
                             item.monitorcode.startsWith("Fan")
                               ? item.monitorcode.replace(/^Fan/, "Fan2")
                               : item.monitorcode
-                          ]
-                        : "-"
-                    }}
-                  </view>
-                  <view
-                    v-else-if="item.datatype == 2"
-                    class="demo-layout bg-purple-light"
-                    style="margin-top: 60rpx; color: #3787fe"
-                  >
-                    {{
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan2")
-                          : item.monitorcode
-                      ] !== undefined &&
-                      tableData[
-                        item.monitorcode.startsWith("Fan")
-                          ? item.monitorcode.replace(/^Fan/, "Fan2")
-                          : item.monitorcode
-                      ] !== null
-                        ? tableData[
+                          ] !== undefined &&
+                          tableData[
                             item.monitorcode.startsWith("Fan")
                               ? item.monitorcode.replace(/^Fan/, "Fan2")
                               : item.monitorcode
-                          ]
-                        : "-"
-                    }}
-                  </view>
-                  <div class="spacer"></div>
-                  <!-- 间距 -->
-                  <view
-                    class="demo-layout bg-purple-light"
-                    style="color: #677799"
-                  >
-                    {{ item.des }}
-                  </view>
+                          ] !== null
+                            ? tableData[
+                                item.monitorcode.startsWith("Fan")
+                                  ? item.monitorcode.replace(/^Fan/, "Fan2")
+                                  : item.monitorcode
+                              ]
+                            : "-"
+                        }}
+                      </view>
+                      <view
+                        v-else-if="item.datatype == 2"
+                        class="demo-layout bg-purple-light"
+                        style="margin-top: 60rpx; color: #3787fe"
+                      >
+                        {{
+                          tableData[
+                            item.monitorcode.startsWith("Fan")
+                              ? item.monitorcode.replace(/^Fan/, "Fan2")
+                              : item.monitorcode
+                          ] !== undefined &&
+                          tableData[
+                            item.monitorcode.startsWith("Fan")
+                              ? item.monitorcode.replace(/^Fan/, "Fan2")
+                              : item.monitorcode
+                          ] !== null
+                            ? tableData[
+                                item.monitorcode.startsWith("Fan")
+                                  ? item.monitorcode.replace(/^Fan/, "Fan2")
+                                  : item.monitorcode
+                              ]
+                            : "-"
+                        }}
+                      </view>
+                      <div class="spacer"></div>
+                      <!-- 间距 -->
+                      <view
+                        class="demo-layout bg-purple-light"
+                        style="color: #677799"
+                      >
+                        {{ item.des }}
+                      </view>
+                    </div>
+                  </div>
                 </div>
               </div>
             </div>
@@ -707,14 +727,20 @@ export default {
               this.showColum = showlist;
               const key = this.TabCur + "_monitor";
               const key1 = this.deviceType + "_monitor";
-              if (
-                this.showColum[key1].length &&
-                this.showColum[key1].length > 0
-              ) {
+              // if (
+              //   this.showColum[key1].length &&
+              //   this.showColum[key1].length > 0
+              // ) {
+              //   this.deviceShowList = this.showColum[key1];
+              // } else {
+              //   this.deviceShowList = this.showColum[key] || [];
+              // }
+              if (this.showColum?.[key1]?.length > 0) {
                 this.deviceShowList = this.showColum[key1];
               } else {
-                this.deviceShowList = this.showColum[key] || [];
+                this.deviceShowList = this.showColum[key] ?? [];
               }
+
               // this.deviceShowList = this.showColum[key];
             } else {
               resolve(response);
@@ -1110,4 +1136,8 @@ div.window_new_5 {
 .passArea {
   border-color: red;
 }
+.monitor-content {
+  display: flex;
+  flex-direction: column;
+}
 </style>

+ 49 - 28
pages/warndata/warndata.vue

@@ -67,18 +67,27 @@
           <view class="title">
             <span class="firetext">内因火灾</span>
           </view>
-          <view class="firecard fire-style">
+          <view class="fire-style">
             <view
               v-for="(item, index) in internalInfo"
               :key="index"
-              class="fire-item"
+              class="fire-item1"
               v-if="item && Object.keys(item).length > 0"
             >
-              <view style="margin-top: 20rpx">
+              <view class="firecard">
                 <text
                   :class="item.Maxlevel > 0 ? 'red-text-style' : 'text-style1'"
-                  >{{ item.value }}</text
-                >
+                  >{{ item.value
+                  }}{{
+                    item.code === "o2val" ||
+                    item.code === "co2val" ||
+                    item.code === "ch4val"
+                      ? "(%)"
+                      : item.code === "fmax" || item.code === "temperature"
+                      ? "(℃)"
+                      : "(ppm)"
+                  }}
+                </text>
                 <view style="margin-top: 10rpx">{{ item.name }}</view>
               </view>
             </view>
@@ -88,17 +97,26 @@
           <view class="title">
             <span class="firetext">外因火灾</span>
           </view>
-          <view class="firecard fire-style">
+          <view class="fire-style">
             <view
               v-for="(item, index) in externalInfo"
               :key="index"
-              class="fire-item"
+              class="fire-item1"
             >
-              <view style="margin-top: 20rpx">
+              <view class="firecard">
                 <text
                   :class="item.Maxlevel > 0 ? 'red-text-style' : 'text-style1'"
-                  >{{ item.value }}</text
-                >
+                  >{{ item.value
+                  }}{{
+                    item.code === "o2val" ||
+                    item.code === "co2val" ||
+                    item.code === "ch4val"
+                      ? "(%)"
+                      : item.code === "fmax" || item.code === "temperature"
+                      ? "(℃)"
+                      : "(ppm)"
+                  }}
+                </text>
                 <view style="margin-top: 10rpx">{{ item.name }}</view>
               </view>
             </view>
@@ -330,19 +348,19 @@ export default {
       this.isShowDetail = true;
     },
     //跳转监测详情
-    // getDetail(data) {
-    //   const componentMap = {
-    //     vent: { title: "通风监测预警", component: ventDetail },
-    //     device: { title: "设备监测预警", component: deviceDetail },
-    //     fire: { title: "火灾监测预警", component: fireDetail },
-    //     dust: { title: "粉尘监测预警", component: dustDetail },
-    //     gas: { title: "瓦斯监测预警", component: gasDetail },
-    //   };
-    //   const config = componentMap[data] || {};
-    //   this.titleName = config.title;
-    //   this.isShowDetail = false;
-    //   this.detailComponent = config.component;
-    // },
+    getDetail(data) {
+      const componentMap = {
+        vent: { title: "通风监测预警", component: ventDetail },
+        device: { title: "设备监测预警", component: deviceDetail },
+        fire: { title: "火灾监测预警", component: fireDetail },
+        dust: { title: "粉尘监测预警", component: dustDetail },
+        gas: { title: "瓦斯监测预警", component: gasDetail },
+      };
+      const config = componentMap[data] || {};
+      this.titleName = config.title;
+      this.isShowDetail = false;
+      this.detailComponent = config.component;
+    },
     toggleIsShow1() {
       this.isShow1 = !this.isShow1; // 切换 isShow 的值
     },
@@ -444,11 +462,10 @@ export default {
 
 .firecard {
   width: 100%;
-  margin: 1px;
+  padding: 10px;
   float: left;
   text-align: center;
   border-radius: 10px;
-  margin-top: 10px;
   background: linear-gradient(
     to right,
     rgba(55, 135, 254, 0.08),
@@ -485,13 +502,13 @@ export default {
 .text-style1 {
   color: #3787fe;
   font-weight: bold;
-  font-size: large;
+  font-size: 16px;
 }
 
 .red-text-style1 {
   color: #ff0000;
   font-weight: bold;
-  font-size: large;
+  font-size: 16px;
 }
 
 .firecontainer {
@@ -508,7 +525,11 @@ export default {
   margin: 16rpx;
   box-sizing: border-box;
 }
-
+.fire-item1 {
+  width: 45%;
+  margin: 16rpx;
+  box-sizing: border-box;
+}
 .gascontainer {
   display: flex;
 }