update registration event editor
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user