index.vue
1.72 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<template>
<Chart :cdata="cdata" />
</template>
<script>
import Chart from "./chart.vue";
export default {
data() {
return {
cdata: {
category: [],
lineData: [],
},
};
},
components: {
Chart,
},
created() {
this.queryClick();
},
mounted() {},
methods: {
queryClick() {
console.log("来了kkksxdx");
// getDataReportPage({ ...this.form, ...this.pageData }).then((res) => {
let data = {
success: true,
message: "操作成功!",
code: 200,
result: [
{
AREACODE: "转移登记",
ywtotal: "2",
},
{
AREACODE: "变更登记",
ywtotal: "4",
},
{
AREACODE: "注销登记",
ywtotal: "6",
},
{
AREACODE: "更正登记",
ywtotal: "2",
},
{
AREACODE: "首次登记",
ywtotal: "11",
},
{
AREACODE: "预告登记",
ywtotal: "5",
},
{
AREACODE: "补证",
ywtotal: "1",
},
{
AREACODE: "换证",
ywtotal: "2",
},
{
AREACODE: "查封登记",
ywtotal: "2",
},
],
timestamp: 1673856701381,
};
if (data.code === 200) {
data.result.filter((item) => {
return (
this.cdata.category.push(item.AREACODE),
this.cdata.lineData.push(item.ywtotal)
);
});
console.log("this.cdata", this.cdata);
}
// });
},
},
};
</script>
<style lang="scss" scoped></style>