<template>
  <div ref="box" class="box" :class="{'nocopy': $route.meta.nocopy}">
    <CaseQualityBox :MED_REC_ID="this.$route.query.id" ref="CaseQualityBoxRef" :width="400" @onUpdate="getCaseQualityResults()"/>
  </div>
</template>

<script>
import CaseQualityBox from './components/CaseQualityBox2.vue';
  export default {
    components: {
      CaseQualityBox
    },
    data() {
      return {
        data: null,
        timer: null
      }
    },
    mounted() {
      if(this.$route.query.id) {
        const self = this
        self.$refs.CaseQualityBoxRef.getTableData(true);
        this.timer = setInterval(() => {
          self.$refs.CaseQualityBoxRef.getTableData(true);
        }, 15000); 
      }
    },
    beforeDestroy() {
      clearInterval(this.timer)
    },
    methods: { }
  }
</script>

<style lang="scss" scoped>
  .app-main{
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    // height: 100% !important;
  }
</style>