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 1/5] =?UTF-8?q?feat(property-marketing):=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=8A=95=E6=94=BE=E6=8C=87=E5=8D=97=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E9=A1=B5=E5=8A=9F=E8=83=BD=20refactor(property-marketing):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AF=84=E5=88=86=E5=9B=BE=E6=A0=87=E6=98=A0?= =?UTF-8?q?=E5=B0=84=E9=80=BB=E8=BE=91=20feat(property-marketing):=20?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=8A=95=E6=94=BE=E6=8C=87=E5=8D=97=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=AE=B0=E5=BD=95=E6=93=8D=E4=BD=9C=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=20perf(property-marketing):=20=E4=BC=98=E5=8C=96=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8=E6=95=B0=E6=8D=AE=E6=9B=B4=E6=96=B0=E9=80=BB=E8=BE=91?= =?UTF-8?q?=20feat(property-marketing):=20=E6=B7=BB=E5=8A=A0=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD=20=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E4=BF=9D=E5=AD=98=E6=8A=95=E6=94=BE=E6=8C=87=E5=8D=97?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=20-=20=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=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 @@
本月摘要。
- -本月摘要。
+ +