<template style="margin-top: 300px">
  <warn-history
    v-if="lb == '钩载变化异常'"
    ref="warnHistory"
    :jh="jh"
    :date="date"
    :startime="warnTimeRange[0]"
    :endTime="warnTimeRange[1]"
    style="overflow: hidden; height: 551px; margin-bottom: 0px"
  />
  <zj-warn-history
    v-else-if="lb == '泵压变化异常'"
    ref="zjWarnHistory"
    :jh="jh"
    :date="date"
    :startime="warnTimeRange[0]"
    :endTime="warnTimeRange[1]"
    style="overflow: hidden; height: 551px; margin-bottom: 0px"
  ></zj-warn-history>
  <jl-warn-history
    v-else-if="lb == '总池体积变化异常'"
    ref="jlWarnHistory"
    :jh="jh"
    :date="date"
    :startime="warnTimeRange[0]"
    :endTime="warnTimeRange[1]"
    style="overflow: hidden; height: 551px; margin-bottom: 0px"
  ></jl-warn-history>
  <nj-warn-history
    v-else
    ref="njWarnHistory"
    :jh="jh"
    :date="date"
    :startime="warnTimeRange[0]"
    :endTime="warnTimeRange[1]"
    style="overflow: hidden; height: 551px; margin-bottom: 0px"
  ></nj-warn-history>
</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { filterObj } from '@/utils/util'
import vue from 'vue'
import warnHistory from '@/views/part1/warning_table/warnHistory.vue'
import zjWarnHistory from '@/views/part1/warning_table/zjWarnHistory.vue'
import njWarnHistory from '@/views/part1/warning_table/njWarnHistory.vue'
import jlWarnHistory from '@/views/part1/warning_table/jlWarnHistory.vue'
export default {
  name: 'YjTableDialogNew',
  mixins: [JeecgListMixin],
  components: { warnHistory, zjWarnHistory, njWarnHistory, jlWarnHistory },
  props: {
    jh: {
      type: String,
      default: ''
    },
    date: {
      type: String,
      default: ''
    },
    lb: {
      type: String,
      default: '起下钻预警'
    },
    warnTimeRange:{
    type:Array,
    default:[]
    }
  },
  data() {
    return {
      /* table加载状态 */
      detailLoading: false,
    }
  },
  watch: {
  },
  created() {
    console.log('类别:' + this.jh + this.lb)
  },
  mounted() {
  },
  methods: {
    callback(val) {
      console.log(val)
      if (val == 2) {
        this.$refs.warnHistory.init()
      }
    }
  },
  beforeDestroy() {
  }
}
</script>

<style lang="less" scoped>
/deep/ .ant-card-body {
  padding: 7px;
}

.fixHeight {
  height: 100%;
  /deep/ .ant-spin-nested-loading {
    height: calc(100% - 35px);
    .ant-spin-container {
      height: 100%;
      .ant-table {
        height: 100%;
        .ant-table-content {
          height: 100%;
          .ant-table-scroll {
            height: 100%;
            overflow: hidden;
          }
        }
      }
    }
  }
}

/deep/ .high-light-row {
  background: yellow;
  td {
    color: red;
  }
}
</style>
