/* * @Author: RenXiaoDong * @Date: 2025-07-04 15:50:37 */ import { CUSTOM_FIELDS } from '@/views/property-marketing/media-account/common_constants'; import icon1 from '@/assets/img/media-account/icon1.png'; import icon2 from '@/assets/img/media-account/icon2.png'; import icon3 from '@/assets/img/media-account/icon3.png'; import icon4 from '@/assets/img/media-account/icon4.png'; export const CARD_FIELDS = [ { label: '账号总数', prop: 'total_number', icon: icon1, }, { label: '总粉丝数', prop: 'total_fans_number', icon: icon2, tooltip: '总粉丝数', }, { label: '总赞藏数', prop: 'total_like_number', icon: icon3, tooltip: '总赞藏数', }, { label: '近7日观看数', prop: 'seven_view_number', icon: icon4, tooltip: '近7日观看数', }, ]; export const INITIAL_QUERY = { name: '', status: '', operator_id: '', group_ids: [], type: 7, column: '', order: '', }; export const getPropPrefix = (type: string) => { return type === 'week' ? 'seven_' : 'thirty_'; }; export function getPeriodColumns(type = 'week') { const prefix = getPropPrefix(type); const labelPrefix = type === 'week' ? '近7天' : '近30天'; return CUSTOM_FIELDS.map((item) => ({ ...item, dataIndex: `${prefix}${item.dataIndex}`, title: `${labelPrefix}${item.title}`, prop: `${prefix}${item.prop}`, tooltip: `${labelPrefix}${item.tooltip}`, })); } export const getDefaultColumns = (type = 'week') => { return [ { title: '账号名称', dataIndex: 'name', prop: 'name', width: 180, fixed: 'left', }, { title: '项目分组', dataIndex: 'group.name', prop: 'group', width: 180, fixed: 'left', }, { title: '状态', dataIndex: 'status', prop: 'status', width: 180, fixed: 'left', }, { title: '运营人员', dataIndex: 'operator.name', prop: 'operator', width: 180, }, { title: 'AI评价', dataIndex: 'ai_evaluate', prop: 'ai_evaluate', width: 260, }, { title: '粉丝量', dataIndex: 'fans_number', prop: 'fans_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'], }, }, ...getPeriodColumns(type), { title: '最新内容标题/日期', dataIndex: 'newest_work_title', prop: 'newest_work_title', 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_like_number', prop: 'newest_work_like_number', width: 180, tooltip: '最新发布内容的点赞数', align: 'right', sortable: { sortDirections: ['ascend', 'descend'], }, }, { title: '最新作品收藏数', dataIndex: 'newest_work_collect_number', prop: 'newest_work_collect_number', width: 180, tooltip: '最新发布内容的收藏数', align: 'right', sortable: { sortDirections: ['ascend', 'descend'], }, }, { title: '最新作品评论数', dataIndex: 'newest_work_comment_number', prop: 'newest_work_comment_number', width: 180, tooltip: '最新发布内容的评论数', align: 'right', sortable: { sortDirections: ['ascend', 'descend'], }, }, { title: '最新作品分享数', dataIndex: 'newest_work_share_number', prop: 'newest_work_share_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', prop: 'second_new_work_title', 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_like_number', prop: 'second_new_work_like_number', width: 180, tooltip: '倒数第二个发布内容的点赞数', align: 'right', sortable: { sortDirections: ['ascend', 'descend'], }, }, { title: '次新作品评论数', dataIndex: 'second_new_work_comment_number', prop: 'second_new_work_comment_number', width: 180, tooltip: '倒数第二个发布内容的评论数', align: 'right', sortable: { sortDirections: ['ascend', 'descend'], }, }, { title: '次新作品分享数', dataIndex: 'second_new_work_share_number', prop: 'second_new_work_share_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', // }, ]; };