合并之前缺少部分

This commit is contained in:
muzi
2025-06-17 11:18:39 +08:00
parent a72487fe56
commit 384be13f46
32 changed files with 2394 additions and 220 deletions

View File

@ -1,6 +1,6 @@
<template>
<view>
<topHeader ref="topHeaderRef"></topHeader>
<topHeader ref="topHeaderRef" @search="search"></topHeader>
<a-space style="width: 100%; display: flex">
<a-space direction="vertical" style="background-color: #fff; padding: 24px; flex: 1">
<a-space align="center">
@ -153,19 +153,29 @@ const genderValueData = ref([]);
const ageValueData = ref([]);
const geoList = ref([]);
// 监听筛选条件变化
watch([selectedIndustry, selectedTimePeriod], () => {
watch([selectedIndustry, selectedTimePeriod, selectedSubCategory], () => {
getAgeDistributionsList();
getGeoDistributionsList();
getGenderDistributionsList();
drawChinaMap();
});
const search = () => {
getAgeDistributionsList();
getGeoDistributionsList();
getGenderDistributionsList();
drawChinaMap();
};
// 获取年龄分布列表
const getAgeDistributionsList = async () => {
const params = {
industry_id: selectedIndustry.value,
time_dimension: selectedTimePeriod.value,
};
if (selectedSubCategory.value != 0) {
parms['industry_id'] = selectedSubCategory.value;
}
const res = await fetchAgeDistributionsList(params);
console.log('年龄分布:', res);
ageValueData.value = res;
@ -179,6 +189,9 @@ const getGeoDistributionsList = async () => {
industry_id: selectedIndustry.value,
time_dimension: selectedTimePeriod.value,
};
if (selectedSubCategory.value != 0) {
parms['industry_id'] = selectedSubCategory.value;
}
const res = await fetchGeoDistributionsList(params);
console.log('地理分布:', res);
geoList.value = res;
@ -189,6 +202,9 @@ const getGenderDistributionsList = async () => {
industry_id: selectedIndustry.value,
time_dimension: selectedTimePeriod.value,
};
if (selectedSubCategory.value != 0) {
parms['industry_id'] = selectedSubCategory.value;
}
const res = await fetchGenderDistributionsList(params);
genderData.value = [];
genderData.value = [...res];