fix: 交易圈数据统计对接
This commit is contained in:
parent
a5cbfa84a5
commit
8c4ee30db0
@ -100,6 +100,12 @@ import { getCircleStatistics } from "@/api/circle";
|
||||
import dayjs from "dayjs";
|
||||
export default {
|
||||
components: { LineChart },
|
||||
props: {
|
||||
currentData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {
|
||||
@ -109,7 +115,6 @@ export default {
|
||||
},
|
||||
timeType: 1,
|
||||
time: "",
|
||||
currentData: {},
|
||||
dataList: [],
|
||||
echartOption: {
|
||||
tooltip: {
|
||||
@ -193,12 +198,6 @@ export default {
|
||||
const ret = await getCircleStatistics(this.formInline);
|
||||
if (ret && ret.data) {
|
||||
this.dataList = ret.data;
|
||||
if (
|
||||
!this.formInline.endDate ||
|
||||
this.formInline.endDate === dayjs().format("YYYY-MM-DD")
|
||||
) {
|
||||
this.currentData = ret.data[ret.data.length - 1];
|
||||
}
|
||||
const xAxisData = [];
|
||||
const seriesData = {
|
||||
advisorGroupContent: {
|
||||
|
||||
@ -96,6 +96,12 @@ import { getCircleStatistics } from "@/api/circle";
|
||||
import dayjs from "dayjs";
|
||||
export default {
|
||||
components: { LineChart },
|
||||
props: {
|
||||
currentData: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formInline: {
|
||||
@ -105,7 +111,6 @@ export default {
|
||||
},
|
||||
timeType: 1,
|
||||
time: "",
|
||||
currentData: {},
|
||||
dataList: [],
|
||||
echartOption: {
|
||||
tooltip: {
|
||||
@ -155,28 +160,28 @@ export default {
|
||||
}
|
||||
if (this.formInline.startDate !== null) {
|
||||
this.formInline.startDate = dayjs(this.formInline.startDate).format(
|
||||
"YYYY-MM-DD HH:mm:ss"
|
||||
"YYYY-MM-DD"
|
||||
);
|
||||
}
|
||||
if (this.timeType == 2) {
|
||||
this.formInline.endDate = dayjs(value)
|
||||
.add(1, "year")
|
||||
.format("YYYY-MM-DD HH:mm:ss");
|
||||
.format("YYYY-MM-DD");
|
||||
} else if (this.timeType == 3) {
|
||||
this.formInline.endDate = dayjs(value)
|
||||
.add(1, "month")
|
||||
.format("YYYY-MM-DD HH:mm:ss");
|
||||
.format("YYYY-MM-DD");
|
||||
} else if (this.timeType == 4) {
|
||||
this.formInline.startDate = dayjs(value)
|
||||
.subtract(1, "day")
|
||||
.format("YYYY-MM-DD HH:mm:ss");
|
||||
.format("YYYY-MM-DD");
|
||||
this.formInline.endDate = dayjs(value)
|
||||
.add(6, "day")
|
||||
.format("YYYY-MM-DD HH:mm:ss");
|
||||
.format("YYYY-MM-DD");
|
||||
} else if (this.timeType == 5) {
|
||||
this.formInline.endDate = dayjs(value)
|
||||
.add(1, "day")
|
||||
.format("YYYY-MM-DD HH:mm:ss");
|
||||
.format("YYYY-MM-DD");
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -188,12 +193,6 @@ export default {
|
||||
const ret = await getCircleStatistics(this.formInline);
|
||||
if (ret && ret.data) {
|
||||
this.dataList = ret.data;
|
||||
if (
|
||||
!this.formInline.endDate ||
|
||||
this.formInline.endDate === dayjs().format("YYYY-MM-DD")
|
||||
) {
|
||||
this.currentData = ret.data[ret.data.length - 1];
|
||||
}
|
||||
const xAxisData = [];
|
||||
const seriesData = {
|
||||
totalMembers: {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<memberModule />
|
||||
<contentModule />
|
||||
<memberModule :currentData="currentData" />
|
||||
<contentModule :currentData="currentData" />
|
||||
<studentList />
|
||||
</div>
|
||||
</template>
|
||||
@ -9,7 +9,24 @@
|
||||
import memberModule from "./components/memberModule.vue";
|
||||
import contentModule from "./components/contentModule.vue";
|
||||
import studentList from "./components/studentList";
|
||||
import { getCurrentDayCircleData } from "@/api/circle";
|
||||
export default {
|
||||
components: { memberModule, contentModule, studentList }
|
||||
components: { memberModule, contentModule, studentList },
|
||||
data() {
|
||||
return {
|
||||
currentData: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
async getData() {
|
||||
const ret = await getCurrentDayCircleData({ id: this.$route.query.id });
|
||||
if (ret && ret.data) {
|
||||
this.currentData = ret.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user