<template>
  <div class="widget-wisdomWarning">
    <!-- 重点关注预警 -->
    <FocusOnWarning />
    <!-- 预警指标统计 -->
    <StatisticOfWI />
    <!-- 今日预警列表 -->
    <TodayWarningList />
  </div>
</template>

<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator'
import FocusOnWarning from './FocusOnWarning.vue'
import StatisticOfWI from './StatisticOfWI.vue'
import TodayWarningList from './TodayWarningList.vue'
import { getWarnInfoList } from '../../apis'
//智慧预警模块
@Component({
  name: 'wisdomWarning',
  components: { FocusOnWarning, StatisticOfWI, TodayWarningList }
})
export default class wisdomWarning extends Vue {
  mounted() {
    this.getInfoData()
  }
  async getInfoData() {
    const result = await getWarnInfoList({})
    if (!result || !result.result) return
    const filterArr = result.result.filter((e) => e.isShow == '0' && e.isValid == '0')
    this.$store.state.bigScreen.wisdomWarningInfo = filterArr
  }
  destroyed() {
    this.$store.state.bigScreen.wisdomWarningInfo = null
  }
}
</script>

<style></style>