
<template>
  <div>
      <ReportEditor :headlineTree="headlineTree" />
  </div>
</template>

<script>
import ReportEditor from "@/components/ReportEditor"
export default {
  components: {
    ReportEditor
  },

  data() {
    return {
      listLoading: true,
     
      headlineTree:[]
    }

  },

  created(){
    this.getHeadlineTree();
  },
  methods: {
    documentEditor() {
      let routeUrl = this.$router.resolve({
        path: "/document/window",
        query: {}
      });
      window.open(routeUrl.href, '_blank');
    },
    getHeadlineTree(){
        this.$api.reportHeadline.getHeadlineTree(1).then(res=>{
          if (res.code === 200){
              this.headlineTree = res.data;
          }else{
            setTimeout(() => {
            that.listLoading = false
          }, 200)
          }
        }).catch(() => {
            that.listLoading = false
          })
    }
  }
}
</script>

<style lang="css">
.report {
  width: 100%;
}
</style>