From de9a5abcd517728a02558bdb6a32806ef294e989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=BF=97=E5=86=9B?= <543024265@qq.com> Date: Mon, 7 Jul 2025 20:59:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(property-marketing):=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=8A=95=E6=94=BE=E6=8C=87=E5=8D=97=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20refactor(property-marketing):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E8=AF=84=E5=88=86=E5=9B=BE=E6=A0=87=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91=20feat(property-marketing):=20=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E6=8A=95=E6=94=BE=E6=8C=87=E5=8D=97=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=93=8D=E4=BD=9C=E5=8A=9F=E8=83=BD=20perf(p?= =?UTF-8?q?roperty-marketing):=20=E4=BC=98=E5=8C=96=E5=9B=BE=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9B=B4=E6=96=B0=E9=80=BB=E8=BE=91=20feat(p?= =?UTF-8?q?roperty-marketing):=20=E6=B7=BB=E5=8A=A0=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD=20=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=8A=95=E6=94=BE=E6=8C=87=E5=8D=97=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=20-=20=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E5=92=8C=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 + src/api/all/propertyMarketing.ts | 19 ++ .../routes/modules/propertyMarketing.ts | 13 +- src/utils/tools.ts | 11 +- .../components/echarts-item/index.vue | 14 +- .../put-account/account-dashboard/index.vue | 3 +- .../action-guide-distribution/index.vue | 185 +++++-------- .../components/month-data/index.vue | 71 +++-- .../components/month-data/style.scss | 4 - .../placement-suggestions/index.vue | 6 +- .../table-data/guideListHistory.vue | 124 +++++---- .../components/table-data/listSearchForm.vue | 261 +++++++++--------- .../table-data/placementGuideList.vue | 44 ++- .../investment-guidelines/constants.ts | 6 +- .../investment-guidelines/detail.vue | 145 ++++++++++ .../investment-guidelines/index.vue | 144 +++++++--- .../investment-guidelines/style.scss | 113 +++++++- 17 files changed, 759 insertions(+), 406 deletions(-) create mode 100644 src/views/property-marketing/put-account/investment-guidelines/detail.vue diff --git a/package.json b/package.json index 6335eea..3b7016a 100644 --- a/package.json +++ b/package.json @@ -20,12 +20,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 4495d02..d4790ef 100644 --- a/src/api/all/propertyMarketing.ts +++ b/src/api/all/propertyMarketing.ts @@ -295,13 +295,32 @@ 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); }; + + diff --git a/src/router/routes/modules/propertyMarketing.ts b/src/router/routes/modules/propertyMarketing.ts index 4e3d6b4..1d3be89 100644 --- a/src/router/routes/modules/propertyMarketing.ts +++ b/src/router/routes/modules/propertyMarketing.ts @@ -129,12 +129,23 @@ const COMPONENTS: AppRouteRecordRaw[] = [ path: 'investmentGuidelines', name: 'PutAccountInvestmentGuidelines', meta: { - locale: '平台投放指南', + locale: '投放指南', requiresAuth: true, roles: ['*'], }, component: () => import('@/views/property-marketing/put-account/investment-guidelines'), }, + { + path: 'detail/:id', + name: 'guideDetail', + meta: { + locale: '投放指南详情', + requiresAuth: true, + hideInMenu: true, + roles: ['*'], + }, + component: () => import('@/views/property-marketing/put-account/investment-guidelines/detail'), + }, ], }, { diff --git a/src/utils/tools.ts b/src/utils/tools.ts index e2093fc..d8c87ca 100644 --- a/src/utils/tools.ts +++ b/src/utils/tools.ts @@ -3,7 +3,7 @@ * @Date: 2025-06-27 17:36:31 */ import dayjs from 'dayjs'; - +import lodash from 'lodash'; export function toFixed(num: number | string, n: number): number { return parseFloat(parseFloat(num.toString()).toFixed(n)); } @@ -106,3 +106,12 @@ export function downloadByUrl(url: string, filename?: string) { a.click(); document.body.removeChild(a); } + +/** + * 检查数据是否为空 + * @param data + */ +export function isEmpty(data: any): boolean { + // 使用 lodash 的 isEmpty 方法检查数据是否为空 + return lodash.isEmpty(data); +} 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..501d586 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 }}
@@ -223,13 +146,37 @@ 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..50df0f5 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..cfc5481 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 @@ -38,13 +38,13 @@
人群包优化 - {{props.optimization?.[3]?.['content']}} + {{props?.optimization?.[3]?.['content']}}
素材优化 - {{props.optimization?.[4]['content']}} + {{props?.optimization?.[4]?.['content']}}
@@ -65,6 +65,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..ebe65dd 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 @@