feat: 账号看板增加平台字段
This commit is contained in:
@ -74,7 +74,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="column.dataIndex === 'platform'" #cell="{ record }">
|
<template v-if="column.dataIndex === 'platform'" #cell="{ record }">
|
||||||
{{ record.platform === 0 ? '抖音' : record.platform === 1 ? '小红书' : '-' }}
|
<img :src="getMediaAccountPlatformLogo(record.platform)" width="20" height="20" class="rounded-4px" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="column.dataIndex === 'status'" #cell="{ record }">
|
<template v-else-if="column.dataIndex === 'status'" #cell="{ record }">
|
||||||
<StatusBox :item="record" class="w-fit h-28px" />
|
<StatusBox :item="record" class="w-fit h-28px" />
|
||||||
@ -141,6 +141,7 @@
|
|||||||
<template v-else #cell="{ record }">
|
<template v-else #cell="{ record }">
|
||||||
{{ formatTableField(column, record, true) }}
|
{{ formatTableField(column, record, true) }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column data-index="operation" fixed="right" width="100" title="操作">
|
<a-table-column data-index="operation" fixed="right" width="100" title="操作">
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
@ -165,6 +166,7 @@ import { useRouter } from 'vue-router';
|
|||||||
import { getCustomColumns } from '@/api/all/common';
|
import { getCustomColumns } from '@/api/all/common';
|
||||||
import StatusBox from '@/views/property-marketing/media-account/components/status-select/status-box.tsx';
|
import StatusBox from '@/views/property-marketing/media-account/components/status-select/status-box.tsx';
|
||||||
import { formatTableField, formatNumberShow, exactFormatTime } from '@/utils/tools';
|
import { formatTableField, formatNumberShow, exactFormatTime } from '@/utils/tools';
|
||||||
|
import { getMediaAccountPlatformLogo } from '@/utils/platform';
|
||||||
import { getDefaultColumns, getPropPrefix } from '@/views/property-marketing/media-account/account-dashboard/constants';
|
import { getDefaultColumns, getPropPrefix } from '@/views/property-marketing/media-account/account-dashboard/constants';
|
||||||
import CustomTableColumnModal from '../custom-column-modal';
|
import CustomTableColumnModal from '../custom-column-modal';
|
||||||
|
|
||||||
@ -207,6 +209,7 @@ const dateType = computed(() => (props.query.type === 7 ? 'week' : 'month'));
|
|||||||
const tableColumns = computed(() => {
|
const tableColumns = computed(() => {
|
||||||
const _result = [];
|
const _result = [];
|
||||||
const _columns = getDefaultColumns(dateType.value);
|
const _columns = getDefaultColumns(dateType.value);
|
||||||
|
console.log({_columns})
|
||||||
|
|
||||||
selectedColumns.value.forEach((item) => {
|
selectedColumns.value.forEach((item) => {
|
||||||
const _column = _columns.find((_item) => _item.prop === item);
|
const _column = _columns.find((_item) => _item.prop === item);
|
||||||
|
|||||||
@ -71,6 +71,13 @@ export const getDefaultColumns = (type = 'week') => {
|
|||||||
width: 180,
|
width: 180,
|
||||||
fixed: 'left',
|
fixed: 'left',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '平台',
|
||||||
|
dataIndex: 'platform',
|
||||||
|
prop: 'platform',
|
||||||
|
width: 120,
|
||||||
|
fixed: 'left',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '账号分组',
|
title: '账号分组',
|
||||||
dataIndex: 'group.name',
|
dataIndex: 'group.name',
|
||||||
|
|||||||
@ -88,7 +88,7 @@
|
|||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="field.dataIndex === 'platform'">
|
<template v-else-if="field.dataIndex === 'platform'">
|
||||||
<img :src="detailData.platform === 0 ? icon5 : icon6" width="16" height="16" />
|
<img :src="getMediaAccountPlatformLogo(detailData.platform)" width="16" height="16" class="rounded-4px" />
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="field.dataIndex === 'last_synced_at'">
|
<template v-else-if="field.dataIndex === 'last_synced_at'">
|
||||||
{{ exactFormatTime(detailData.last_synced_at, 'YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD HH:mm:ss') }}
|
{{ exactFormatTime(detailData.last_synced_at, 'YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD HH:mm:ss') }}
|
||||||
@ -133,6 +133,7 @@
|
|||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import { formatTableField, formatNumberShow, exactFormatTime } from '@/utils/tools';
|
import { formatTableField, formatNumberShow, exactFormatTime } from '@/utils/tools';
|
||||||
|
import { getMediaAccountPlatformLogo } from '@/utils/platform';
|
||||||
import { getAccountInfoFields } from '../../constants';
|
import { getAccountInfoFields } from '../../constants';
|
||||||
import { getPropPrefix } from '@/views/property-marketing/media-account/account-dashboard/constants';
|
import { getPropPrefix } from '@/views/property-marketing/media-account/account-dashboard/constants';
|
||||||
import StatusBox from '@/views/property-marketing/media-account/components/status-select/status-box.tsx';
|
import StatusBox from '@/views/property-marketing/media-account/components/status-select/status-box.tsx';
|
||||||
@ -143,8 +144,6 @@ import icon1 from '@/assets/img/media-account/icon5.png';
|
|||||||
import icon2 from '@/assets/img/media-account/icon-warn.png';
|
import icon2 from '@/assets/img/media-account/icon-warn.png';
|
||||||
import icon3 from '@/assets/img/media-account/icon-warn-1.png';
|
import icon3 from '@/assets/img/media-account/icon-warn-1.png';
|
||||||
import icon4 from '@/assets/img/media-account/icon-success.png';
|
import icon4 from '@/assets/img/media-account/icon-success.png';
|
||||||
import icon5 from '@/assets/img/platform/icon-dy.png';
|
|
||||||
import icon6 from '@/assets/img/platform/icon-xhs.png';
|
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const id = route.params.id;
|
const id = route.params.id;
|
||||||
|
|||||||
Reference in New Issue
Block a user