合并之前缺少部分

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" @click="search"></topHeader>
<!-- 重点品牌列表 -->
<a-space direction="vertical" style="background-color: #fff; width: 100%; padding: 24px; margin: 24px 0">
<a-space align="center">
@ -107,11 +107,18 @@ const selectedTimePeriod = computed(() => topHeaderRef.value?.selectedTimePeriod
const dataList = ref([]);
const otherList = ref([]);
const search = () => {
getFocusBrandsList();
getEventDynamicsList();
};
const getFocusBrandsList = async () => {
const params = {
industry_id: selectedIndustry.value,
time_dimension: selectedTimePeriod.value,
};
if (selectedSubCategory.value != 0) {
params['industry_id'] = selectedSubCategory.value;
}
const res = await fetchFocusBrandsList(params);
// 这里需要根据API返回的数据结构处理成tagRows需要的格式
dataList.value = res;
@ -122,6 +129,9 @@ const getEventDynamicsList = async () => {
industry_id: selectedIndustry.value,
time_dimension: selectedTimePeriod.value,
};
if (selectedSubCategory.value != 0) {
params['industry_id'] = selectedSubCategory.value;
}
const res = await fetchEventDynamicsList(params);
// 这里需要根据API返回的数据结构处理成tagRows需要的格式
otherList.value = res;
@ -132,10 +142,15 @@ onMounted(() => {
getEventDynamicsList();
});
// 监听筛选条件变化
watch([selectedIndustry, selectedTimePeriod], () => {
watch([selectedTimePeriod, selectedSubCategory], () => {
getFocusBrandsList();
getEventDynamicsList();
});
watch(selectedIndustry, () => {
selectedSubCategory.value = 0;
getFocusBrandsList();
getEventDynamicsList;
});
</script>
<style scoped>