Merge branch 'feature/v1.3_营销资产中台' of ssh://gta.lvfunai.com:42001/ai-team/lingji-work-fe into feature/v1.3_营销资产中台

This commit is contained in:
rd
2025-07-11 16:51:35 +08:00
7 changed files with 26 additions and 7 deletions

View File

@ -9,9 +9,9 @@
</template>
</a-popover>
</template>
<NoData v-if="isChartEmpty" text="暂无数据" />
<div class="chart" ref="chartEl" :style="{ height: height + 'px' }"></div>
<div v-else class="chart" ref="chartEl" :style="{ height: height + 'px' }"></div>
</a-card>
</template>
@ -32,7 +32,11 @@ const chartEl = ref(null);
const chartContainer = ref(null);
let chartInstance = null;
const isChartEmpty = computed(() => isEmpty(props.chartData?.series_data));
// 判断 series_data 是否为空或 undefined/null
const isChartEmpty = computed(() => {
const seriesData = props.chartData?.series_data;
return Array.isArray(seriesData) ? seriesData.length === 0 : !seriesData;
});
console.log(isChartEmpty, 'isChartEmpty');
// 初始化图表

View File

@ -109,6 +109,10 @@ const getAccountsTrends = async () => {
onLoading.value = false;
};
const handleTabClick = (value) => {
accountType.value = value;
handleSearch();
};
const mergeChartData = (apiResponse) => {
console.log(apiResponse, 'apiResponse');
chartConfigs.value = chartConfigs.value.map((config) => {

View File

@ -137,7 +137,8 @@ const handleSelectionChange = (selectedRows) => {
const handleTabClick = (key) => {
activeTab.value = key;
init();
getData();
};
const handleExport = () => {

View File

@ -13,7 +13,8 @@
复制
</span>
</div>
<div class="month-data-div">
<NoData v-if="isEmptyData" style="height: 100px" text="暂无数据" />
<div v-else class="month-data-div">
<div style="align-self: stretch">
<a-space direction="vertical">
<span v-for="(line, index) in formattedText" :key="index" :class="getCss(line.highlight)">
@ -46,6 +47,10 @@ const classMap = {
red: 'month-text-red',
};
const isEmptyData = computed(() => {
return isEmpty(props.overview);
});
const formattedText = computed(() => {
console.log(props.overview, 'props.overview');
const { text, parts } = props.overview;

View File

@ -9,8 +9,9 @@
</template>
</a-popover>
</div>
<NoData v-if="isEmptyData" style="height: 100px" text="暂无数据" />
<div>
<div v-else>
<a-row class="grid-demo" :gutter="{ md: 8, lg: 24, xl: 32 }">
<a-col :span="24">
<div class="overall-strategy">
@ -100,6 +101,10 @@ const props = defineProps({
default: () => [],
},
});
const isEmptyData = computed(() => {
return isEmpty(props.optimization);
});
</script>
<style lang="scss"></style>

View File

@ -46,6 +46,7 @@
</div>
<!-- 投放建议-->
<MonthData v-if="tabData == 'placement_guide'" :overview="aiResult.overview"></MonthData>
<PlacementSuggestions v-if="tabData == 'placement_guide'" :optimization="aiResult.optimization"></PlacementSuggestions>
<div v-if="tabData == 'placement_guide'" class="ignore-export">