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

@ -5,6 +5,5 @@ export function checkRoutePermission(routeName: string) {
const allowAccessRoutes = userStore.allowAccessRoutes; const allowAccessRoutes = userStore.allowAccessRoutes;
if (!routeName) return false; if (!routeName) return false;
return allowAccessRoutes.includes(routeName); return allowAccessRoutes.includes(routeName);
} }

View File

@ -9,9 +9,9 @@
</template> </template>
</a-popover> </a-popover>
</template> </template>
<NoData v-if="isChartEmpty" text="暂无数据" />
<div v-else class="chart" ref="chartEl" :style="{ height: height + 'px' }"></div>
<div class="chart" ref="chartEl" :style="{ height: height + 'px' }"></div>
</a-card> </a-card>
</template> </template>
@ -32,7 +32,11 @@ const chartEl = ref(null);
const chartContainer = ref(null); const chartContainer = ref(null);
let chartInstance = 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'); console.log(isChartEmpty, 'isChartEmpty');
// 初始化图表 // 初始化图表

View File

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

View File

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

View File

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

View File

@ -9,8 +9,9 @@
</template> </template>
</a-popover> </a-popover>
</div> </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-row class="grid-demo" :gutter="{ md: 8, lg: 24, xl: 32 }">
<a-col :span="24"> <a-col :span="24">
<div class="overall-strategy"> <div class="overall-strategy">
@ -100,6 +101,10 @@ const props = defineProps({
default: () => [], default: () => [],
}, },
}); });
const isEmptyData = computed(() => {
return isEmpty(props.optimization);
});
</script> </script>
<style lang="scss"></style> <style lang="scss"></style>

View File

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