<template>
  <StationTaskDetails :table-data="viewData.STATION_LEVEL" />
  <SectionTaskDetails :table-data="viewData.DEPARTMENT_LEVEL" />
  <!-- <ClassTaskDetails :table-data="viewData.TEAM_LEVEL" /> -->
</template>

<script setup>
import { reactive } from 'vue';
import {
  StationTaskDetails,
  SectionTaskDetails,
  ClassTaskDetails
} from './index';
import { getExecutionStatusTotal } from '@/api/item/items'
import { useTimeOut } from './useTimeOut'
const viewData = reactive({
  STATION_LEVEL: [], // 站级
  TEAM_LEVEL: [], // 班组级
  DEPARTMENT_LEVEL: [], // 科级
})
useTimeOut(() => {
  getExecutionStatusTotal().then(res => {
    viewData.STATION_LEVEL = (res.data || []).filter(item => item.checkLevel === 'STATION_LEVEL')
    viewData.TEAM_LEVEL = (res.data || []).filter(item => item.checkLevel === 'TEAM_LEVEL')
    viewData.DEPARTMENT_LEVEL = (res.data || []).filter(item => item.checkLevel === 'DEPARTMENT_LEVEL')
  })
})

</script>

<style lang="scss" scoped></style>