From 514081aea8b0129ba33fb5bcd8018aeb6ecf6bde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=BF=97=E5=86=9B?= <543024265@qq.com> Date: Fri, 4 Jul 2025 10:35:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E5=8F=96=E5=85=AC=E5=85=B1=E5=B8=B8?= =?UTF-8?q?=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/all/propertyMarketing.ts | 24 ++ .../put-account/account-dashboard/index.vue | 362 ++++++++++-------- .../put-account/common_constants.ts | 21 + .../components/table-data/listSearchForm.vue | 46 ++- .../investment-guidelines/index.vue | 58 ++- 5 files changed, 331 insertions(+), 180 deletions(-) create mode 100644 src/views/property-marketing/put-account/common_constants.ts diff --git a/src/api/all/propertyMarketing.ts b/src/api/all/propertyMarketing.ts index 2a5ae02..a1e6c6b 100644 --- a/src/api/all/propertyMarketing.ts +++ b/src/api/all/propertyMarketing.ts @@ -274,3 +274,27 @@ export const batchMediaAccounts = (params = {}, config = {}) => { export const getMediaAccountsAuthorizedStatus = (id: string) => { return Http.get(`/v1/media-accounts/${id}/status`); }; + +// 投放账号-趋势 +export const getPlacementAccountsTrend = (params = {}) => { + return Http.get(`/v1/placement-accounts/trend`); +}; + +// 投放账号数据-趋势 +export const getPlacementAccountsList = (id: string) => { + return Http.get(`/v1/placement-accounts/list`); +}; +// 投放账号计划数据-趋势 +export const getPlacementAccountProjectsTrend = (id: string) => { + return Http.get(`/v1/placement-account-projects/trend`); +}; + +// 投放指南查询 +export const getPlacementGuide = (params: {}) => { + return Http.get(`/v1/placement-guide/getGuideList`,params); +}; + +// 前端定时轮询获取ai检测结果 +export const getAiResult = (params: {}) => { + return Http.get(`/v1/placement-guide/getAiResult`); +}; 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 d5cc31e..91685ed 100644 --- a/src/views/property-marketing/put-account/account-dashboard/index.vue +++ b/src/views/property-marketing/put-account/account-dashboard/index.vue @@ -1,37 +1,45 @@ diff --git a/src/views/property-marketing/put-account/common_constants.ts b/src/views/property-marketing/put-account/common_constants.ts new file mode 100644 index 0000000..4986d1f --- /dev/null +++ b/src/views/property-marketing/put-account/common_constants.ts @@ -0,0 +1,21 @@ +import icon1 from '@/assets/img/media-account/icon-jl.png'; +import icon2 from '@/assets/img/media-account/icon-jg.png'; +import icon3 from '@/assets/img/media-account/icon-bili.png'; + +export const PLATFORM_LIST = [ + { + label: '巨量', + value: 0, + icon: icon1, + }, + { + label: '聚光', + value: 1, + icon: icon2, + }, + { + label: 'B站', + value: 2, + icon: icon3, + }, +]; diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/listSearchForm.vue b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/listSearchForm.vue index 21f6c88..e42a26a 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/listSearchForm.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/listSearchForm.vue @@ -6,11 +6,18 @@ 账户 - - Beijing - Shanghai - Guangzhou - + + + @@ -26,10 +33,18 @@ 平台 - - Beijing - Shanghai - Guangzhou + + + {{ item.label }} + @@ -44,7 +59,6 @@ :time-picker-props="{ defaultValue: ['00:00:00', '00:00:00'], }" - @change="onChange" @select="onSelect" style="width: 380px" /> @@ -72,8 +86,20 @@ 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 57d91bd..e5e3044 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/index.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/index.vue @@ -10,19 +10,21 @@ - + - - + + + - - - + + + +
@@ -50,20 +52,48 @@ import GuideListHistory from './components/table-data/guideListHistory.vue'; import MonthData from './components/month-data/index.vue'; import PlacementSuggestions from './components/placement-suggestions/index.vue'; import ActionGuideDistribution from './components/action-guide-distribution'; +import FilterBlock from '@/views/property-marketing/put-account/account-data/components/filter-block/index.vue'; +import { + getAiResult, + getPlacementAccountData, + getPlacementAccountDataList, + getPlacementGuide, +} from '@/api/all/propertyMarketing'; const tabData = ref('placement_guide'); -const listQuery = reactive({ - project_id: ref(''), - platform: ref(''), - page: ref(1), - name: ref(''), - page_size: ref('10'), +const query = reactive({ + platform: '', }); + +const loading = ref(false); +const queryResult = reactive({ + search_key: '', +}); + +const getData = async () => { + console.log(query, 'query'); + const { code, data } = await getPlacementGuide(query); + if (code === 200) { + } +}; + +const getSyncAiResult = async () => { + const { code, data } = await getAiResult(query); + if (code === 200) { + //成功或者失败清除定时任务 + if ((data.status && data.status === 3) || data.status === 2) { + clearInterval(timer); + loading.value = false; + } + } +}; +// 定时任务请求接口 +const timer = setInterval(() => { + getSyncAiResult(); +}, 5000);