合并之前缺少部分
This commit is contained in:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user