From 954e4bc3082522c3035ab2c01146bfe970795f06 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 01/14] =?UTF-8?q?=E6=8F=90=E5=8F=96=E5=85=AC=E5=85=B1?= =?UTF-8?q?=E5=B8=B8=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../put-account/common_constants.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/views/property-marketing/put-account/common_constants.ts 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, + }, +]; From 1d52fda0cdc31463dd6c4f8e5ec2dc70bfca9455 Mon Sep 17 00:00:00 2001 From: rd <1344903914@qq.com> Date: Fri, 4 Jul 2025 14:05:01 +0800 Subject: [PATCH 02/14] =?UTF-8?q?feat:=20=E8=B4=A6=E5=8F=B7=E5=81=A5?= =?UTF-8?q?=E5=BA=B7=E7=8A=B6=E6=80=81=E3=80=81=E7=BB=9F=E4=B8=80=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/all/common.ts | 4 +- src/api/all/propertyMarketing.ts | 15 +- .../custom-table-column-modal/index.vue | 51 +-- .../components/account-table/constants.ts | 303 ++++++++++-------- .../components/account-table/index.vue | 65 +++- .../components/filter-block/index.vue | 23 +- .../account-dashboard/constants.ts | 51 --- .../components/account-table/index.vue | 3 +- .../components/add-account-modal/index.vue | 24 +- .../components/batch-group-modal/index.vue | 3 +- .../components/filter-block/index.vue | 29 +- .../components/status-box/index.vue | 2 +- .../media-account/account-manage/constants.ts | 57 ---- .../media-account/account-manage/index.vue | 66 +++- .../components/group-select/index.vue | 1 - .../operator-select}/index.vue | 12 +- .../components/status-select/constants.ts | 60 ++++ .../components/status-select/index.vue | 60 ++++ .../components/tag-select/index.vue | 0 .../components/board-table/constants.ts | 36 ++- .../components/board-table/index.vue | 43 ++- .../components/filter-block/index.vue | 27 +- .../components/plan-table/constants.ts | 264 +++++++++++++++ .../components/plan-table/index.vue | 253 +++++++++++++++ .../components/plan-table/style.scss | 63 ++++ .../put-account/account-data/constants.ts | 51 --- .../put-account/account-data/index.vue | 14 +- .../components/account-table/index.vue | 4 +- .../components/add-account-modal/index.vue | 2 +- .../components/filter-block/index.vue | 20 +- .../components/status-box/index.vue | 2 +- .../put-account/account-manage/constants.ts | 78 ----- .../put-account/account-manage/index.vue | 61 +++- .../components/operator-select/index.vue | 64 ++++ .../components/status-select/constants.ts | 60 ++++ .../components/status-select/index.vue | 60 ++++ vite.config.ts | 2 +- 37 files changed, 1362 insertions(+), 571 deletions(-) rename src/views/property-marketing/media-account/{account-dashboard => }/components/group-select/index.vue (99%) rename src/views/property-marketing/media-account/{account-manage/components/group-select => components/operator-select}/index.vue (82%) create mode 100644 src/views/property-marketing/media-account/components/status-select/constants.ts create mode 100644 src/views/property-marketing/media-account/components/status-select/index.vue rename src/views/property-marketing/media-account/{account-manage => }/components/tag-select/index.vue (100%) create mode 100644 src/views/property-marketing/put-account/account-data/components/plan-table/constants.ts create mode 100644 src/views/property-marketing/put-account/account-data/components/plan-table/index.vue create mode 100644 src/views/property-marketing/put-account/account-data/components/plan-table/style.scss create mode 100644 src/views/property-marketing/put-account/components/operator-select/index.vue create mode 100644 src/views/property-marketing/put-account/components/status-select/constants.ts create mode 100644 src/views/property-marketing/put-account/components/status-select/index.vue diff --git a/src/api/all/common.ts b/src/api/all/common.ts index 1e19878..9b210da 100644 --- a/src/api/all/common.ts +++ b/src/api/all/common.ts @@ -6,10 +6,10 @@ import Http from '@/api'; // 获取用户自定义列 export const getCustomColumns = (params = {}) => { - return Http.get('/v1/user-custom-columns', params); + return Http.get('/v1/custom-columns', params); }; // 保存用户自定义列 export const updateCustomColumns = (params = {}) => { - return Http.put('/v1/user-custom-columns', params); + return Http.put('/v1/custom-columns', params); }; diff --git a/src/api/all/propertyMarketing.ts b/src/api/all/propertyMarketing.ts index 2a5ae02..c00fd03 100644 --- a/src/api/all/propertyMarketing.ts +++ b/src/api/all/propertyMarketing.ts @@ -19,16 +19,21 @@ export const fetchAccountOperators = (params = {}) => { return Http.get('/v1/media-account-operators/list', params); }; -// 投放账户运营人员分组-列表 -export const fetchPlacementAccountOperators = (params = {}) => { - return Http.get('/v1/placement-account-operators/list', params); -}; - // 媒体账号-分页 export const getMediaAccounts = (params = {}) => { return Http.get('/v1/media-accounts', params); }; +// 媒体账号-健康情况 +export const getMediaAccountsHealth = (params = {}) => { + return Http.get('/v1/media-accounts/health', params); +}; + +// 投放账号-健康情况 +export const getPlacementAccountsHealth = (params = {}) => { + return Http.get('/v1/placement-accounts/health', params); +}; + // 媒体账号-添加 export const postMediaAccounts = (params = {}) => { return Http.post('/v1/media-accounts', params); diff --git a/src/components/custom-table-column-modal/index.vue b/src/components/custom-table-column-modal/index.vue index 675ea98..1125f00 100644 --- a/src/components/custom-table-column-modal/index.vue +++ b/src/components/custom-table-column-modal/index.vue @@ -39,7 +39,7 @@ 已添加({{ checkColumns.length }})
-
+
icon {{ groupName }} @@ -117,48 +117,13 @@ const close = () => { }; const initData = async () => { - const data = { - selected_columns: [], - groups: [ - { - label: '基础信息', - is_require: 1, - columns: [ - { label: '账号名称', value: 'account_name', is_require: 1 }, - { label: '项目分组', value: 'project_group', is_require: 1 }, - { label: '状态', value: 'status', is_require: 1 }, - { label: '运营人员', value: 'operator', is_require: 1 }, - { label: 'AI评价', value: 'ai_score', is_require: 1 }, - ], - }, - { - label: '分析数据', - is_require: 0, - columns: [ - { label: '粉丝量', value: 'fans', is_require: 0 }, - { label: '总赞藏数', value: 'total_likes', is_require: 0 }, - { label: '观看量', value: 'views', is_require: 0 }, - { label: '观看量环比', value: 'views_ratio', is_require: 0 }, - { label: '点赞量', value: 'likes', is_require: 0 }, - { label: '点赞量环比', value: 'likes_ratio', is_require: 0 }, - { label: '最新内容标题/日期', value: 'latest_content', is_require: 0 }, - { label: '最新作品观看数', value: 'latest_views', is_require: 0 }, - { label: '最新作品日增长', value: 'latest_growth', is_require: 0 }, - { label: '次新内容标题/日期', value: 'second_latest_content', is_require: 0 }, - { label: '次新作品观看数', value: 'second_latest_views', is_require: 0 }, - { label: '次新作品日增长', value: 'second_latest_growth', is_require: 0 }, - ], - }, - ], - }; - - // const { code, data } = await getCustomColumns({ type: props.type }); - // if (code === 0) { - const { selected_columns, groups } = data; - dataSource.value = groups; - setDefaultCheckColumns(groups, selected_columns); - allColumns.value = groups.flatMap((group) => group.columns); - // } + const { code, data } = await getCustomColumns({ type: props.type }); + if (code === 200) { + const { selected_columns, groups } = data; + dataSource.value = groups; + setDefaultCheckColumns(groups, selected_columns); + allColumns.value = groups.flatMap((group) => group.columns); + } }; const isCheck = (option) => { diff --git a/src/views/property-marketing/media-account/account-dashboard/components/account-table/constants.ts b/src/views/property-marketing/media-account/account-dashboard/components/account-table/constants.ts index 4bfb578..90b8c90 100644 --- a/src/views/property-marketing/media-account/account-dashboard/components/account-table/constants.ts +++ b/src/views/property-marketing/media-account/account-dashboard/components/account-table/constants.ts @@ -2,152 +2,177 @@ * @Author: RenXiaoDong * @Date: 2025-06-28 10:33:06 */ -export const TABLE_COLUMNS = [ - { - title: '账号名称', - dataIndex: 'name', - width: 180, - fixed: 'left', - }, - { - title: '项目分组', - dataIndex: 'group.name', - width: 180, - fixed: 'left', - }, - { - title: '状态', - dataIndex: 'status', - width: 180, - fixed: 'left', - }, - { - title: '运营人员', - dataIndex: 'operator.name', - width: 180, - }, - { - title: 'AI评价', - dataIndex: 'ai_evaluation', - width: 260, - }, - { - title: '粉丝量', - dataIndex: 'fans_number', - width: 180, - tooltip: '账号当前粉丝总数', - align: 'right', - sortable: { - sortDirections: ['ascend', 'descend'], +export const getDefaultColumns = (type = 'week') => { + const isWeek = type === 'week'; + const viewChain = isWeek ? 'week_view_chain' : 'month_view_chain'; + const likeChain = isWeek ? 'week_like_chain' : 'month_like_chain'; + const viewChainText = isWeek ? '近7天观看量环比' : '近30天观看量环比'; + const likeChainText = isWeek ? '近7天点赞量环比' : '近30天点赞量环比'; + + return [ + { + title: '账号名称', + dataIndex: 'name', + prop: 'name', + width: 180, + fixed: 'left', }, - }, - { - title: '总赞藏数', - dataIndex: 'like_collect_number', - width: 180, - tooltip: '账号所有内容的点赞和收藏总数', - align: 'right', - sortable: { - sortDirections: ['ascend', 'descend'], + { + title: '项目分组', + dataIndex: 'group.name', + prop: 'group', + width: 180, + fixed: 'left', }, - }, - { - title: '观看量', - dataIndex: 'view_number', - width: 180, - tooltip: '账号所有内容的总观看次数', - align: 'right', - sortable: { - sortDirections: ['ascend', 'descend'], + { + title: '状态', + dataIndex: 'status', + prop: 'status', + width: 180, + fixed: 'left', }, - }, - { - title: '观看量环比', - dataIndex: 'view_chain', - width: 180, - tooltip: '相比上一周期的观看量变化百分比', - align: 'right', - suffix: '%', - sortable: { - sortDirections: ['ascend', 'descend'], + { + title: '运营人员', + dataIndex: 'operator.name', + prop: 'operator', + width: 180, }, - }, - { - title: '点赞量', - dataIndex: 'like_number', - width: 180, - tooltip: '账号所有内容的总点赞数', - align: 'right', - sortable: { - sortDirections: ['ascend', 'descend'], + { + title: 'AI评价', + dataIndex: 'ai_evaluate', + prop: 'ai_evaluate', + width: 260, }, - }, - { - title: '点赞量环比', - dataIndex: 'like_chain', - width: 180, - tooltip: '相比上一周期的点赞量变化百分比', - align: 'right', - suffix: '%', - sortable: { - sortDirections: ['ascend', 'descend'], + { + title: '粉丝量', + dataIndex: 'fans_number', + prop: 'fans_number', + width: 180, + tooltip: '账号当前粉丝总数', + align: 'right', + sortable: { + sortDirections: ['ascend', 'descend'], + }, }, - }, - { - title: '最新内容标题/日期', - dataIndex: 'like_chain1', - width: 240, - tooltip: '最新发布内容的标题和发布日期', - }, - { - title: '最新作品观看数', - dataIndex: 'latest_view_number', - width: 180, - tooltip: '最新发布内容的观看次数', - align: 'right', - sortable: { - sortDirections: ['ascend', 'descend'], + { + title: '总赞藏数', + dataIndex: 'like_collect_number', + prop: 'like_collect_number', + width: 180, + tooltip: '账号所有内容的点赞和收藏总数', + align: 'right', + sortable: { + sortDirections: ['ascend', 'descend'], + }, }, - }, - { - title: '最新作品日增长', - dataIndex: 'latest_daily_growth', - width: 180, - tooltip: '最新作品每日观看量的增长情况', - align: 'right', - sortable: { - sortDirections: ['ascend', 'descend'], + { + title: '观看量', + dataIndex: 'view_number', + prop: 'view_number', + width: 180, + tooltip: '账号所有内容的总观看次数', + align: 'right', + sortable: { + sortDirections: ['ascend', 'descend'], + }, }, - }, - { - title: '次新内容标题/日期', - dataIndex: 'like_chain4', - width: 240, - }, - { - title: '次新作品观看数', - dataIndex: 'second_latest_view_number', - width: 180, - tooltip: '倒数第二个发布内容的观看次数', - align: 'right', - sortable: { - sortDirections: ['ascend', 'descend'], + { + title: viewChainText, + dataIndex: viewChain, + prop: viewChain, + width: 180, + tooltip: '相比上一周期的观看量变化百分比', + align: 'right', + suffix: '%', + sortable: { + sortDirections: ['ascend', 'descend'], + }, }, - }, - { - title: '次新作品日增长', - dataIndex: 'second_latest_daily_growth', - width: 180, - tooltip: '倒数第二个作品每日观看量的增长情况', - align: 'right', - sortable: { - sortDirections: ['ascend', 'descend'], + { + title: '点赞量', + dataIndex: 'like_number', + prop: 'like_number', + width: 180, + tooltip: '账号所有内容的总点赞数', + align: 'right', + sortable: { + sortDirections: ['ascend', 'descend'], + }, }, - }, - { - title: '操作', - dataIndex: 'operation', - width: 100, - fixed: 'right', - }, -]; + { + title: likeChainText, + dataIndex: likeChain, + prop: likeChain, + width: 180, + tooltip: '相比上一周期的点赞量变化百分比', + align: 'right', + suffix: '%', + sortable: { + sortDirections: ['ascend', 'descend'], + }, + }, + { + title: '最新内容标题/日期', + dataIndex: 'newest_work_title_and_publish_time', + prop: 'newest_work_title_and_publish_time', + width: 240, + tooltip: '最新发布内容的标题和发布日期', + }, + { + title: '最新作品观看数', + dataIndex: 'newest_work_view_number', + prop: 'newest_work_view_number', + width: 180, + tooltip: '最新发布内容的观看次数', + align: 'right', + sortable: { + sortDirections: ['ascend', 'descend'], + }, + }, + { + title: '最新作品日增长', + dataIndex: 'newest_work_view_grow_number', + prop: 'newest_work_view_grow_number', + width: 180, + tooltip: '最新作品每日观看量的增长情况', + align: 'right', + sortable: { + sortDirections: ['ascend', 'descend'], + }, + }, + { + title: '次新内容标题/日期', + dataIndex: 'second_new_work_title_and_publish_time', + prop: 'second_new_work_title_and_publish_time', + width: 240, + }, + { + title: '次新作品观看数', + dataIndex: 'second_new_work_view_number', + prop: 'second_new_work_view_number', + width: 180, + tooltip: '倒数第二个发布内容的观看次数', + align: 'right', + sortable: { + sortDirections: ['ascend', 'descend'], + }, + }, + { + title: '次新作品日增长', + dataIndex: 'second_new_work_view_grow_number', + prop: 'second_new_work_view_grow_number', + width: 180, + tooltip: '倒数第二个作品每日观看量的增长情况', + align: 'right', + sortable: { + sortDirections: ['ascend', 'descend'], + }, + }, + { + title: '操作', + dataIndex: 'operation', + width: 100, + fixed: 'right', + }, + ]; +}; diff --git a/src/views/property-marketing/media-account/account-dashboard/components/account-table/index.vue b/src/views/property-marketing/media-account/account-dashboard/components/account-table/index.vue index c7b65ac..16fad76 100644 --- a/src/views/property-marketing/media-account/account-dashboard/components/account-table/index.vue +++ b/src/views/property-marketing/media-account/account-dashboard/components/account-table/index.vue @@ -47,7 +47,7 @@