| | |
| | | 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) { |
| | |
| | | |
| | | <template> |
| | | <div class="excption"> |
| | | <span class="exception-text">异常类型:</span> |
| | | <h1 class="exception-text">异常类型:</h1> |
| | | <el-checkbox |
| | | v-model="checkAll" |
| | | :indeterminate="isIndeterminate" |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | 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; |