detail.vue 854 Bytes
Newer Older
neogcg's avatar
neogcg committed
1
<template>
neogcg's avatar
neogcg committed
2 3
  <div>
    <type :type="type" :curInfo="curInfo" />
neogcg's avatar
neogcg committed
4 5 6
  </div>
</template>
<script>
neogcg's avatar
neogcg committed
7 8
import { treeBaseInfo } from "../../dashboard/api";
import Type from "../../dashboard/components/index.vue";
neogcg's avatar
neogcg committed
9 10
export default {
  props: [],
neogcg's avatar
neogcg committed
11
  components: { Type },
neogcg's avatar
neogcg committed
12 13
  data() {
    return {
neogcg's avatar
neogcg committed
14
      titleinfo: "",
neogcg's avatar
neogcg committed
15

neogcg's avatar
neogcg committed
16 17 18
      type: 1,
      curInfo: {},
      listData: [],
neogcg's avatar
neogcg committed
19 20
    };
  },
neogcg's avatar
neogcg committed
21
  computed: {},
neogcg's avatar
neogcg committed
22 23
  methods: {
    getParams() {
neogcg's avatar
neogcg committed
24 25 26 27 28 29 30 31 32 33 34 35
      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;
neogcg's avatar
neogcg committed
36 37 38 39
      });
    },
  },
  created() {
neogcg's avatar
neogcg committed
40
  
neogcg's avatar
neogcg committed
41 42 43 44 45
    this.getParams();
  },
  mounted() {},
};
</script>