<template>
  <div>
    <!-- 台账 -->
    <StandingBook v-show="flag && flags" @ViewReport="ViewReport" />
    <!-- 报表 -->
    <reportForm
      v-if="!flag"
      :reportID="reportID"
      @close="
        flag = true;
        flags = true;
      "
    />
    <!-- 报告 -->
    <SteadyStateReport
      v-if="!flags"
      :reportID="reportID"
      @close="
        flag = true;
        flags = true;
      "
    />
  </div>
</template>
<script>
import SteadyStateReport from "./components/SteadyStateReport.vue";
import reportForm from "./components/reportForm.vue";
import StandingBook from "./components/StandingBook.vue";
export default {
  components: { SteadyStateReport, reportForm, StandingBook },
  props: {},
  data() {
    return {
      flag: true,
      flags: true,
      reportID: "",
    };
  },
  created() {},

  methods: {
    ViewReport(id, val) {
      if (val == 0) {
        this.flag = false;
      } else {
        this.flags = false;
      }
      this.reportID = id;
    },
  },

  computed: {},

  watch: {},
};
</script>
<style lang="scss" scoped></style>
