feat(property-marketing): 重构AI分析结果处理逻辑并优化页面交互
refactor(property-marketing): 拆分投放指南和历史指南组件逻辑 feat(property-marketing): 添加AI检测结果状态枚举 perf(property-marketing): 优化定时任务处理逻辑和错误处理 style(property-marketing): 调整页面样式和布局结构
This commit is contained in:
@ -49,33 +49,13 @@
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a-spin :loading="loading" tip="数据分析中">
|
||||
<div>
|
||||
<!-- 本月摘要-->
|
||||
<MonthData></MonthData>
|
||||
|
||||
<!-- <!– 投放建议–>-->
|
||||
<PlacementSuggestions :optimization="detailData?.ai_result?.optimization?.modules"></PlacementSuggestions>
|
||||
<!-- <!– 投放行动指南–>-->
|
||||
<ActionGuideDistribution :action_guide="detailData?.ai_result.action_guide?.modules"></ActionGuideDistribution>
|
||||
</div>
|
||||
</a-spin>
|
||||
<div>
|
||||
<a-space class="down-btn">
|
||||
<a-button type="outline" @click="onSearch">
|
||||
<template #icon>
|
||||
<icon-download />
|
||||
</template>
|
||||
<template #default>下载</template>
|
||||
</a-button>
|
||||
<a-button type="primary" @click="handleSave">
|
||||
<template #icon>
|
||||
<icon-drive-file />
|
||||
</template>
|
||||
<template #default>保存</template>
|
||||
</a-button>
|
||||
</a-space>
|
||||
<MonthData :overview="aiResult.overview"></MonthData>
|
||||
|
||||
<!-- 投放建议-->
|
||||
<PlacementSuggestions :optimization="aiResult.optimization"></PlacementSuggestions>
|
||||
<!-- 投放行动指南-->
|
||||
<ActionGuideDistribution :action_guide="aiResult.action_guide"></ActionGuideDistribution>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -90,54 +70,31 @@ import { PLATFORM_LIST } from '@/views/property-marketing/put-account/common_con
|
||||
import { getPlacementGuideDetail } from '@/api/all/propertyMarketing';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
const tabData = ref('placement_guide');
|
||||
|
||||
const query = reactive({
|
||||
platform: '',
|
||||
date_time: '',
|
||||
sort_column: '',
|
||||
sort_order: '',
|
||||
page_size: 20,
|
||||
page: 1,
|
||||
});
|
||||
|
||||
const handleUpdateQuery = (payload) => {
|
||||
payload.order = payload.order === 'ascend' ? 'asc' : 'desc';
|
||||
query.sort_column = payload.column;
|
||||
query.sort_order = payload.order;
|
||||
};
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
const saveForm = reactive({
|
||||
account: [],
|
||||
plan: [],
|
||||
platform: [],
|
||||
const aiResult = reactive({
|
||||
optimization: [], // 投放建议优化
|
||||
action_guide: [], // 新投放建议生成
|
||||
overview: [], // 新投放建议生成
|
||||
});
|
||||
|
||||
const detailData = reactive({
|
||||
created_at: '',
|
||||
account: '',
|
||||
platform: [],
|
||||
ai_result: {},
|
||||
});
|
||||
|
||||
const route = useRoute();
|
||||
const id = route.params.id;
|
||||
const getDetail = async () => {
|
||||
const { code, data } = await getPlacementGuideDetail(id);
|
||||
console.log(data, 'data');
|
||||
console.log(code, 'code');
|
||||
if (code === 200) {
|
||||
Object.assign(aiResult, data.ai_result);
|
||||
Object.assign(detailData, data);
|
||||
console.log(aiResult, 'aiResult');
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getDetail();
|
||||
});
|
||||
// 定时任务请求接口
|
||||
// const timer = setInterval(() => {
|
||||
// getSyncAiResult();
|
||||
// }, 5000);
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user