Compare commits

...

2 Commits

Author SHA1 Message Date
kaizheng(郑凯)
85e9de2ca5 fix: 修改 2025-02-16 14:54:51 +08:00
kaizheng(郑凯)
8c4ee30db0 fix: 交易圈数据统计对接 2025-02-16 14:53:53 +08:00
5 changed files with 49 additions and 24 deletions

View File

@ -153,3 +153,13 @@ export function getCircleStatistics(data) {
data data
}); });
} }
// 后台查询交易圈当日统计
export function getCurrentDayCircleData(data) {
debugger;
return request({
url: "/admin/group/collect/queryToday",
method: "post",
data
});
}

View File

@ -38,7 +38,7 @@ module.exports = {
/** /**
* 底部文字支持html语法 * 底部文字支持html语法
*/ */
footerTxt: "底部文字支持html语法", footerTxt: "后管系统",
/** /**
* 备案号 * 备案号
*/ */

View File

@ -100,6 +100,12 @@ import { getCircleStatistics } from "@/api/circle";
import dayjs from "dayjs"; import dayjs from "dayjs";
export default { export default {
components: { LineChart }, components: { LineChart },
props: {
currentData: {
type: Object,
default: () => {}
}
},
data() { data() {
return { return {
formInline: { formInline: {
@ -109,7 +115,6 @@ export default {
}, },
timeType: 1, timeType: 1,
time: "", time: "",
currentData: {},
dataList: [], dataList: [],
echartOption: { echartOption: {
tooltip: { tooltip: {
@ -193,12 +198,6 @@ export default {
const ret = await getCircleStatistics(this.formInline); const ret = await getCircleStatistics(this.formInline);
if (ret && ret.data) { if (ret && ret.data) {
this.dataList = 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 xAxisData = [];
const seriesData = { const seriesData = {
advisorGroupContent: { advisorGroupContent: {

View File

@ -96,6 +96,12 @@ import { getCircleStatistics } from "@/api/circle";
import dayjs from "dayjs"; import dayjs from "dayjs";
export default { export default {
components: { LineChart }, components: { LineChart },
props: {
currentData: {
type: Object,
default: () => {}
}
},
data() { data() {
return { return {
formInline: { formInline: {
@ -105,7 +111,6 @@ export default {
}, },
timeType: 1, timeType: 1,
time: "", time: "",
currentData: {},
dataList: [], dataList: [],
echartOption: { echartOption: {
tooltip: { tooltip: {
@ -155,28 +160,28 @@ export default {
} }
if (this.formInline.startDate !== null) { if (this.formInline.startDate !== null) {
this.formInline.startDate = dayjs(this.formInline.startDate).format( this.formInline.startDate = dayjs(this.formInline.startDate).format(
"YYYY-MM-DD HH:mm:ss" "YYYY-MM-DD"
); );
} }
if (this.timeType == 2) { if (this.timeType == 2) {
this.formInline.endDate = dayjs(value) this.formInline.endDate = dayjs(value)
.add(1, "year") .add(1, "year")
.format("YYYY-MM-DD HH:mm:ss"); .format("YYYY-MM-DD");
} else if (this.timeType == 3) { } else if (this.timeType == 3) {
this.formInline.endDate = dayjs(value) this.formInline.endDate = dayjs(value)
.add(1, "month") .add(1, "month")
.format("YYYY-MM-DD HH:mm:ss"); .format("YYYY-MM-DD");
} else if (this.timeType == 4) { } else if (this.timeType == 4) {
this.formInline.startDate = dayjs(value) this.formInline.startDate = dayjs(value)
.subtract(1, "day") .subtract(1, "day")
.format("YYYY-MM-DD HH:mm:ss"); .format("YYYY-MM-DD");
this.formInline.endDate = dayjs(value) this.formInline.endDate = dayjs(value)
.add(6, "day") .add(6, "day")
.format("YYYY-MM-DD HH:mm:ss"); .format("YYYY-MM-DD");
} else if (this.timeType == 5) { } else if (this.timeType == 5) {
this.formInline.endDate = dayjs(value) this.formInline.endDate = dayjs(value)
.add(1, "day") .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); const ret = await getCircleStatistics(this.formInline);
if (ret && ret.data) { if (ret && ret.data) {
this.dataList = 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 xAxisData = [];
const seriesData = { const seriesData = {
totalMembers: { totalMembers: {

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<memberModule /> <memberModule :currentData="currentData" />
<contentModule /> <contentModule :currentData="currentData" />
<studentList /> <studentList />
</div> </div>
</template> </template>
@ -9,7 +9,24 @@
import memberModule from "./components/memberModule.vue"; import memberModule from "./components/memberModule.vue";
import contentModule from "./components/contentModule.vue"; import contentModule from "./components/contentModule.vue";
import studentList from "./components/studentList"; import studentList from "./components/studentList";
import { getCurrentDayCircleData } from "@/api/circle";
export default { 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> </script>