1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<template>
<div>
<type :type="type" :curInfo="curInfo" />
</div>
</template>
<script>
import { treeBaseInfo } from "../../dashboard/api";
import Type from "../../dashboard/components/index.vue";
export default {
components: { Type },
data() {
return {
titleinfo: "",
type: 1,
curInfo: {},
};
},
created() {
this.getParams();
},
methods: {
getParams() {
this.type = this.$route.query.type;
let params = {
id: this.$route.query.id,
type: this.type,
name: this.$route.query.name
};
treeBaseInfo(params).then((res) => {
let controlLimit = res.controlLimit || []
if (controlLimit) {
controlLimit.map(item => {
res[`type${item.type}`] = item.sum
})
}
this.curInfo = res;
});
},
},
};
</script>