<template>
  <div>
    <type :type="type" :curInfo="curInfo" />
  </div>
</template>
<script>
import { treeBaseInfo } from "../../dashboard/api";
import Type from "../../dashboard/components/index.vue";
export default {
  props: [],
  components: { Type },
  data() {
    return {
      titleinfo: "",

      type: 1,
      curInfo: {},
      listData: [],
    };
  },
  computed: {},
  methods: {
    getParams() {
      this.type = this.$route.query.type;
      let params = {
        id: this.$route.query.id,
        type: this.type,
      };

      treeBaseInfo(params).then((res) => {
        let controlLimit = res.controlLimit;
        controlLimit.map((item) => {
          res[`type${item.type}`] = item.sum;
        });
        this.curInfo = res;
      });
    },
  },
  created() {
  
    this.getParams();
  },
  mounted() {},
};
</script>