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,6 +126,18 @@
  changeTab();
});
watch(
  () => props.onlyOneGroup,
  (val) => {
    nextTick(() => {
      if (battVolChart.value) {
        battVolChart.value[0].resize();
        battVolChart.value[1]?.resize();
      }
    });
  }
);
function changeTab() {
  if (infoTab.value == 2) {
    updateChart();
@@ -155,7 +167,12 @@
}
onMounted(() => {
  // sendData(JSON.stringify({ devId: props.devId, devType: 1 }));
  // console.log('devId,' , props.devId, 'onMounted', '=============');
  let reg = /^2/;
  if (reg.test(props.devId)) {
    sendData(JSON.stringify({ devId: props.devId, devType: 2 }));
  }
});
</script>
@@ -396,10 +413,10 @@
        text-align: center;
        background: #02a7f0;
        &.max {
          background: #d9001b;
          background: #438D29;
        }
        &.min {
          background: #f59a23;
          background: #DBD608;
        }
      }
    }
@@ -433,10 +450,10 @@
        text-align: center;
        background: #02a7f0;
        &.max {
          background: #d9001b;
          background: #438D29;
        }
        &.min {
          background: #f59a23;
          background: #DBD608;
        }
      }
    }
@@ -468,10 +485,10 @@
            padding: 2px 10px;
            border-radius: 6px;
            &.max {
              background: #d9001b;
              background: #438D29;
            }
            &.min {
              background: #f59a23;
              background: #DBD608;
            }
          }
        }