he wei
5 天以前 3c3576d5792bfabcef84979757ee344712e71cd3
src/components/svgDiagram.vue
@@ -133,7 +133,7 @@
];
const state_k1 = ref(true);
const state_k2 = ref(true);
const state_k2 = ref(false);
const state_k3 = ref(true);
const currentCabinetIdx = ref(-1);
const currentLockIdx = ref(-1);
@@ -144,31 +144,47 @@
const viewInfo = ref({});
const props = defineProps({
  state: {
    type: [Number, String],
    default: 3,
  data: {
    type: Object,
    default() { return {}},
  },
  battRt: {
    type: Object,
    default() { return {}},
  },
});
const state = computed(() => {
  return props.data.devWorkstate;
});
const flowList = computed(() => {
  let res = [];
  // 0   直连充电
  // 1   充电测试
  // 2   放电测试
  // 3   停电放电
  // 4   内阻测试
  switch(props.state) {
    // 核容放电
  switch(state.value) {
    // 直连充电
    case 0:
      res = line0;
      res = line2;
      break;
    // 核容充电
    case 1:
      res = line1;
      break;
    // 直连充电
    // 核容放电
    case 2:
      res = line2;
      res = line0;
      break;
    // 停电放电
    case 3:
      res = line3;
      break;
    default:
      console.log('state', state.value, '=============');
      break;
  }
@@ -238,7 +254,6 @@
      ]"
      :color='lineColor'
    ></svg-line>
    <!-- 124 194 -->
    <svg-dot-rect
      :offset="[252, 124]"
      width="124"
@@ -454,12 +469,12 @@
    ></svg-text>
    <svg-text
      :offset="[1100, 150]"
      text="温度:12°C"
      :text="`温度:${data.devTemp}°C`"
      textAnchor="middle"
    ></svg-text>
    <svg-text
      :offset="[918, 240]"
      text="0.2A"
      :text="`${battRt.groupCurr}A`"
      textAnchor="end"
    ></svg-text>
    <svg-line