update registration event editor

This commit is contained in:
Timi
2026-08-02 00:20:13 +08:00
parent 11c48bf00c
commit 35dff786b1
10 changed files with 376 additions and 215 deletions
+26 -3
View File
@@ -78,6 +78,11 @@ const monthRecords = ref<RegistrationEventRecord[]>([]);
const loading = ref(false);
const calendarLoading = ref(false);
const monthCursor = ref(getMonthStart(new Date()));
const genderColorMap = {
MALE: "#2563eb",
FEMALE: "#db2777",
UNKNOWN: "#64748b"
} as const;
const beginDate = getDateStart(addDays(new Date(), -6));
const endDate = getDateEnd(new Date());
const dateTextList = buildDateTextList(beginDate, endDate);
@@ -305,6 +310,9 @@ function buildRecordTrendOption(): EChartsOption {
function buildEventStructureOption(): EChartsOption {
return {
...buildBaseOption(),
legend: {
show: false
},
xAxis: {
type: "category",
data: registrationEventList.value.map(item => item.name || "未命名事件"),
@@ -345,9 +353,24 @@ function buildGenderStatOption(): EChartsOption {
name: "客户数量",
type: "bar",
data: [
getGenderCount("MALE"),
getGenderCount("FEMALE"),
getGenderCount("UNKNOWN")
{
value: getGenderCount("MALE"),
itemStyle: {
color: genderColorMap.MALE
}
},
{
value: getGenderCount("FEMALE"),
itemStyle: {
color: genderColorMap.FEMALE
}
},
{
value: getGenderCount("UNKNOWN"),
itemStyle: {
color: genderColorMap.UNKNOWN
}
}
]
}]
};