he wei
2024-11-13 9862e1be04889c584540abdd3eeb80e1a2d9807b
src/views/test/jhyRtInfo.vue
@@ -1,5 +1,5 @@
<script setup>
import { ref, computed, watch, onMounted } from "vue";
import { ref, computed, watch, onMounted, nextTick } from "vue";
import ycCard from "@/components/ycCard.vue";
import jhyInfo from "./jhyInfo.vue";
import useWebSocket from "@/hooks/useWebSocket.js";
@@ -126,12 +126,17 @@
  changeTab();
});
watch(() => props.onlyOneGroup, (val) => {
  if (battVolChart.value) {
    battVolChart.value[0].resize();
    battVolChart.value[1]?.resize();
watch(
  () => props.onlyOneGroup,
  (val) => {
    nextTick(() => {
      if (battVolChart.value) {
        battVolChart.value[0].resize();
        battVolChart.value[1]?.resize();
      }
    });
  }
});
);
function changeTab() {
  if (infoTab.value == 2) {
@@ -163,7 +168,7 @@
onMounted(() => {
  // console.log('devId,' , props.devId, 'onMounted', '=============');
  let reg = /^2/;
  if (reg.test(props.devId)) {
    sendData(JSON.stringify({ devId: props.devId, devType: 2 }));
@@ -408,10 +413,10 @@
        text-align: center;
        background: #02a7f0;
        &.max {
          background: #d9001b;
          background: #438D29;
        }
        &.min {
          background: #f59a23;
          background: #DBD608;
        }
      }
    }
@@ -445,10 +450,10 @@
        text-align: center;
        background: #02a7f0;
        &.max {
          background: #d9001b;
          background: #438D29;
        }
        &.min {
          background: #f59a23;
          background: #DBD608;
        }
      }
    }
@@ -480,10 +485,10 @@
            padding: 2px 10px;
            border-radius: 6px;
            &.max {
              background: #d9001b;
              background: #438D29;
            }
            &.min {
              background: #f59a23;
              background: #DBD608;
            }
          }
        }