diff --git a/package.json b/package.json index c81da38..1fed2eb 100644 --- a/package.json +++ b/package.json @@ -19,12 +19,14 @@ "axios": "^1.3.0", "dayjs": "^1.11.7", "echarts": "^5.6.0", + "html2canvas": "^1.4.1", "lodash-es": "^4.17.21", "mitt": "^3.0.0", "normalize.css": "^8.0.1", "pinia": "^2.0.29", "sass": "^1.89.2", "swiper": "^11.2.8", + "update": "^0.7.4", "vue": "^3.2.45", "vue-cropper": "^1.1.4", "vue-draggable-plus": "^0.6.0", diff --git a/src/api/all/propertyMarketing.ts b/src/api/all/propertyMarketing.ts index e617401..fd66057 100644 --- a/src/api/all/propertyMarketing.ts +++ b/src/api/all/propertyMarketing.ts @@ -294,12 +294,29 @@ export const getPlacementAccountProjectsTrend = (params = {}) => { export const getPlacementGuide = (params: {}) => { return Http.get(`/v1/placement-account-projects/getGuideList`, params); }; +//查询投放指南历史 +export const getPlacementGuideHistory = (params: {}) => { + return Http.get(`/v1/placement-account-projects/getGuideListHistory`, params); +}; // 前端定时轮询获取ai检测结果 export const getAiResult = (params: {}) => { return Http.get(`/v1/placement-account-projects/getAiResult`, params); }; +export const savePlacementGuide = (params: {}) => { + return Http.post(`/v1/placement-account-projects/saveGuideResult`, params); +}; + +export const getPlacementGuideDetail = (id: string) => { + return Http.get(`/v1/placement-account-projects/historylog/${id}`); +}; + +//删除记录 +export const deleteHistorylog = (id: string) => { + return Http.delete(`/v1/placement-account-projects/historylog/${id}`); +}; + // 投放账号-列表 export const getPlacementAccountsList = (params = {}) => { return Http.get('/v1/placement-accounts/list', params); @@ -309,3 +326,5 @@ export const getPlacementAccountsList = (params = {}) => { export const postPlacementAccountsSync = (id: string) => { return Http.post(`/v1/placement-accounts/${id}/sync-data`); }; + + diff --git a/src/router/routes/modules/propertyMarketing.ts b/src/router/routes/modules/propertyMarketing.ts index d011100..58e5ed4 100644 --- a/src/router/routes/modules/propertyMarketing.ts +++ b/src/router/routes/modules/propertyMarketing.ts @@ -137,13 +137,25 @@ const COMPONENTS: AppRouteRecordRaw[] = [ path: 'investmentGuidelines', name: 'PutAccountInvestmentGuidelines', meta: { - locale: '平台投放指南', + locale: '投放指南', requiresAuth: true, requireLogin: true, roles: ['*'], }, component: () => import('@/views/property-marketing/put-account/investment-guidelines'), }, + { + path: 'detail/:id', + name: 'guideDetail', + meta: { + locale: '投放指南详情', + requiresAuth: true, + hideInMenu: true, + roles: ['*'], + activeMenu: 'PutAccountInvestmentGuidelines', + }, + component: () => import('@/views/property-marketing/put-account/investment-guidelines/detail'), + }, ], }, { diff --git a/src/utils/tools.ts b/src/utils/tools.ts index e2093fc..105d541 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -3,7 +3,6 @@ * @Date: 2025-06-27 17:36:31 */ import dayjs from 'dayjs'; - export function toFixed(num: number | string, n: number): number { return parseFloat(parseFloat(num.toString()).toFixed(n)); } diff --git a/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue b/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue index c4f17da..33f5c71 100644 --- a/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue +++ b/src/views/property-marketing/put-account/account-dashboard/components/echarts-item/index.vue @@ -43,7 +43,6 @@ let chartInstance: echarts.ECharts | null = null; const xAxisData = props.xAxisData; const seriesData = props.seriesData; -console.log(seriesData, 'seriesData'); const initChart = () => { if (!chart.value) return; @@ -53,8 +52,6 @@ const initChart = () => { } chartInstance = echarts.init(chart.value); - console.log('init'); - const option = { tooltip: { trigger: 'axis', @@ -98,9 +95,14 @@ const initChart = () => { }; watch( - () => props.seriesData, - () => { - initChart(); //重新渲染的方法 + () => [props.xAxisData, props.seriesData], + ([newXAxis, newSeries]) => { + if (chartInstance) { + chartInstance.setOption({ + xAxis: newXAxis, + series: newSeries, + }); + } }, { deep: true }, ); diff --git a/src/views/property-marketing/put-account/account-dashboard/index.vue b/src/views/property-marketing/put-account/account-dashboard/index.vue index bbe06bd..b69ad2c 100644 --- a/src/views/property-marketing/put-account/account-dashboard/index.vue +++ b/src/views/property-marketing/put-account/account-dashboard/index.vue @@ -45,7 +45,7 @@
时间筛选 - +
@@ -156,6 +156,7 @@ const query = reactive({ names: '', platform: '', operator_id: '', + data_time: [], }); const xhlEcharts = reactive({}); const getAccountsTrends = async () => { diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/action-guide-distribution/index.vue b/src/views/property-marketing/put-account/investment-guidelines/components/action-guide-distribution/index.vue index 186dbdc..907bd62 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/action-guide-distribution/index.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/action-guide-distribution/index.vue @@ -25,23 +25,12 @@
人群分析 - - - - 18-24岁女性,兴趣为“美妆/穿搭”,一线城市,抖音平台 ROI 3.2 - - - - - 25-34岁男性,兴趣为“数码产品”,二线城市,巨量引擎 ROI 2.8 - - - - - 18-24岁男性,兴趣为“运动/健身”,三线城市,抖音 ROI 2.3 + + {{ item }}
@@ -50,23 +39,12 @@
投放素材 - - - - 图文风格 + 明确福利点,CTR 3.2%、CVR 8.5% - - - - - 场景短视频 + 明确人设定位,CTR 2.7%、CVR 7.1% - - - - - 口播讲解类 + 产品对比,CTR 2.1%、CVR 6.0% + + {{ item }}
@@ -77,23 +55,12 @@
投放时段 - - - - 晚高峰时段(19:00–21:00),ROI 3.1 - - - - - 中午时段(11:30–13:00),ROI 2.5 - - - - - 下午茶时段(15:00–17:00),ROI 2.3 + + {{ item }}
@@ -103,23 +70,12 @@
平台表现 - - - - 抖音 - ROI 3.2,CVR 8.5% - - - - - 聚光平台 - ROI 2.7,CVR 7.3% - - - - - B站 - ROI 2.4,CVR 6.8% + + {{ item }}
@@ -140,23 +96,12 @@
人群建议 - - - - 集中在 18–24 岁女性 + 精准兴趣标签(如“护肤”、“口红”) - - - - - 24–30 岁男性 + 实用类内容受众(如“工具控”、“搞机党”) - - - - - 泛娱乐向受众 + 较大地域分布(兴趣“短剧”、“直播带货”) + + {{ item }}
@@ -167,23 +112,12 @@
素材建议 - - - - 福利明确+钩子强的图文短视频,建议加限时优惠提示 - - - - - 场景代入型视频,突出客户痛点与产品关联 - - - - - 达人口播/测评,搭配标题党封面吸引点击 + + {{ item }}
@@ -195,23 +129,12 @@
投放策略建议 - - - - 预算前置在 ROI 最佳时段和平台,优先抢头部流量 - - - - - 中等预算组合投放 + 高点击素材A/B测试 - - - - - 低预算长周期测试,重点看 CVR,优胜劣汰 + + {{ item }}
@@ -229,7 +152,28 @@ const props = defineProps({ type: Array, default: () => [], }, + tmp: { + type: Number, + default: 0, + }, }); + +const MODEL_PERFORMANCE_ANALYSIS = '表现分析'; +const MODEL_PLACEMENT_SUGGESTION = '新投放建议生成'; + +// 封装通用方法来获取 submodules 的内容 +const getSubmoduleContent = (moduleName: string, submoduleName: string) => { + const module = props.action_guide + .find((item) => item.title === moduleName) + ?.submodules.find((mod) => mod.subtitle === submoduleName); + const content = []; + if (module) { + const content = Object.values(module.content); + return content; + } + return []; +}; + import { getStarIcon } from '../../constants'; import { defineProps } from 'vue'; diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/month-data/index.vue b/src/views/property-marketing/put-account/investment-guidelines/components/month-data/index.vue index c50bd1f..87135fb 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/month-data/index.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/month-data/index.vue @@ -1,36 +1,55 @@ - diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/month-data/style.scss b/src/views/property-marketing/put-account/investment-guidelines/components/month-data/style.scss index 96644a2..746c3e8 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/month-data/style.scss +++ b/src/views/property-marketing/put-account/investment-guidelines/components/month-data/style.scss @@ -1,4 +1,3 @@ -//本月摘要数据-div .month-data-div { align-self: stretch; padding: 16px 30px 16px 16px; @@ -15,7 +14,6 @@ display: flex; } -//本月摘要-蓝色字体 .month-text-blue { color: var(--Brand-Brand-6, #6D4CFE); font-size: 16px; @@ -25,7 +23,6 @@ word-wrap: break-word } -//红色字体 .month-text-red { color: var(--Functional-Danger-6, #F64B31); font-size: 16px; @@ -35,7 +32,6 @@ word-wrap: break-word } -//黑色字体 .month-text-black { color: var(--Text-1, #211F24); font-size: 16px; diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/placement-suggestions/index.vue b/src/views/property-marketing/put-account/investment-guidelines/components/placement-suggestions/index.vue index f2f7fed..4798c52 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/placement-suggestions/index.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/placement-suggestions/index.vue @@ -16,7 +16,7 @@
总体策略 - {{props.optimization?.[0]?.['content']}} + {{ props.optimization?.[0]?.['content'] }}
@@ -24,13 +24,13 @@
预算分配 - {{props.optimization?.[1]?.['content']}} + {{ props.optimization?.[1]?.['content'] }}
时段优化 - {{props.optimization?.[2]?.['content']}} + {{ props.optimization?.[2]?.['content'] }}
@@ -38,14 +38,13 @@
人群包优化 - {{props.optimization?.[3]?.['content']}} + {{ props?.optimization?.[3]?.['content'] }}
素材优化 - {{props.optimization?.[4]['content']}} - + {{ props?.optimization?.[4]?.['content'] }}
@@ -65,6 +64,8 @@ const props = defineProps({ default: () => [], }, }); + +console.log(props.optimization, 'optimization'); diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/placementGuideList.vue b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/placementGuideList.vue index 11aada5..4a21978 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/placementGuideList.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/placementGuideList.vue @@ -3,9 +3,9 @@ - + + diff --git a/src/views/property-marketing/put-account/investment-guidelines/index.vue b/src/views/property-marketing/put-account/investment-guidelines/index.vue index f2b352c..b72fec8 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/index.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/index.vue @@ -1,8 +1,13 @@