zmc
2023-11-16 73cb3ec2b1660610e3621d7614ad308f2c19331d
src/sfc/ExceptionType.vue
@@ -33,7 +33,13 @@
                response.data.data.forEach(item => {
                    this.exceptionType.push(item.exceptionType)
                });
                console.log(this.exceptionType);
                // console.log('获取到的异常类型:',this.exceptionType);
                let a = ['0','1','2','3','4','5','6','7']
                a.forEach(item=>{
                  if(this.exceptionType.indexOf(item) == -1){
                    this.exceptionType.push(item)
                  }
                })
            })
        },
        handleCheckAllChange (val) {
@@ -53,7 +59,7 @@
<template>
  <div class="excption">
    <span class="exception-text">异常类型:</span>
    <h1 class="exception-text">异常类型:</h1>
     <el-checkbox
    v-model="checkAll"
    :indeterminate="isIndeterminate"
@@ -64,6 +70,7 @@
    <el-checkbox-group  v-model="checkedList"  @change="handleCheckedExceptionChange">
    <el-checkbox :label="item"  v-for="item in exceptionType" :key="item">
      <template #default>
        <!-- <div style="display: flex; flex-flow: row wrap;">  -->
        <span v-if="item == '0'">断电或断网</span>
        <span v-else-if="item == '1'">数据超低</span>
        <span v-else-if="item == '2'">超标</span>
@@ -72,6 +79,7 @@
        <span v-else-if="item == '5'">临近超标异常</span>
        <span v-else-if="item == '6'">单日超标次数临界异常</span>
        <span v-else-if="item == '7'">滑动平均值突变</span>
      <!-- </div> -->
      </template>
    </el-checkbox>
  </el-checkbox-group>
@@ -83,9 +91,10 @@
    display: flex; 
}
.exception-text {
  font-weight: bold;
  font-size: 14px;
  color: #333333;
  margin-top: 5px;
    margin-right: 7px;
  margin-right: 7px;
}
.el-checkbox-group {
  margin-top: 5px;