he wei
2024-11-13 9862e1be04889c584540abdd3eeb80e1a2d9807b
src/views/test/jhyTestDetails.vue
@@ -29,8 +29,9 @@
});
// TODO  有几组
const onlyOneGroup = ref(false);
const onlyOneGroup = computed(() => {
  return rtDatas.value.devStates[0].batteryCount == 1;
});
const devInfo = ref({});
@@ -115,12 +116,12 @@
  let [res1, res2] = [0, 1].map(
    (v) => states[rtDatas.value.devStates[v].workMode]
  );
  return `组1:${res1}, 组2: ${res2}`;
  return onlyOneGroup.value ? `组1:${res1}` : `组1:${res1}, 组2: ${res2}`;
});
const testStates = computed(() => {
  let [res1, res2] = [0, 1].map((v) => rtDatas.value.devStates[v].moduleStatus);
  return `组1:${res1}, 组2: ${res2}`;
  return onlyOneGroup.value ? `组1:${res1}` : `组1:${res1}, 组2: ${res2}`;
});
function getInfo() {
@@ -253,7 +254,11 @@
        </div>
      </div>
    </yc-card>
    <jhy-rt-info class="p-content" :onlyOneGroup="onlyOneGroup" :devId="devId"></jhy-rt-info>
    <jhy-rt-info
      class="p-content"
      :onlyOneGroup="onlyOneGroup"
      :devId="devId"
    ></jhy-rt-info>
    <!-- 弹窗 -->
    <el-dialog
      title="设置测试参数"
@@ -403,10 +408,10 @@
          text-align: center;
          background: #02a7f0;
          &.max {
            background: #d9001b;
            background: #438D29;
          }
          &.min {
            background: #f59a23;
            background: #DBD608;
          }
        }
      }
@@ -440,10 +445,10 @@
          text-align: center;
          background: #02a7f0;
          &.max {
            background: #d9001b;
            background: #438D29;
          }
          &.min {
            background: #f59a23;
            background: #DBD608;
          }
        }
      }
@@ -475,10 +480,10 @@
              padding: 2px 10px;
              border-radius: 6px;
              &.max {
                background: #d9001b;
                background: #438D29;
              }
              &.min {
                background: #f59a23;
                background: #DBD608;
              }
            }
          }