<template>
  <div>
    <!-- 虚警抑制 -->
    <el-table v-if="modelFlag==1" :data="ModelOptions" @current-change="handle">
      <el-table-column label="故障代码" align="center" prop="code" />
      <el-table-column label="抑制判据" align="center" prop="restrainCriteria" />
      <el-table-column label="最少持续时间" align="center" prop="minDuration" />
    </el-table>
    <!-- 深度隔离 -->
    <el-table v-if="modelFlag==2" :data="ModelOptions" @current-change="handle">
      <el-table-column label="维护代码" align="center" prop="code" />
      <el-table-column label="故障方程" align="center" prop="faultEquation" />
      <el-table-column label="故障LRU" align="center" prop="faultLru" />
    </el-table>
    <!-- 地面 -->
    <el-table v-if="modelFlag==3" :data="ModelOptions" @current-change="handle">
      <el-table-column label="事件代码" align="center" prop="code" />
      <el-table-column label="判据" align="center" prop="criteria" />
      <el-table-column label="最少持续时间" align="center" prop="minDuration" />
      <el-table-column label="所属系统" align="center" prop="systemSource" />
      <el-table-column label="所属LRU" align="center" prop="lruSource" />
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'diagnosisTable',
  props: {
    ModelOptions:Array,
    modelFlag:Number,
    callback:Function
  },
  data() {
    return {
      // 遮罩层
      loading: true,
    }
  },
  methods:{
    handle(val) {
      this.callback(val)
    }
  }
}
</script>

<style scoped>
</style>