统计:处理会员性别统计,存在未知的情况

(cherry picked from commit 2bfc9c3b13)
This commit is contained in:
owen 2023-10-16 13:25:15 +08:00 committed by shizhong
parent eddac7c9be
commit d46adb0683

View File

@ -267,6 +267,7 @@ const getMemberAreaStatisticsList = async () => {
const getMemberSexStatisticsList = async () => {
const list = await MemberStatisticsApi.getMemberSexStatisticsList()
const dictDataList = getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)
dictDataList.push({ label: '未知', value: null } as any)
sexChartOptions.series![0].data = dictDataList.map((dictData: DictDataType) => {
const userCount = list.find((item: MemberSexStatisticsRespVO) => item.sex === dictData.value)
?.userCount