diff --git a/src/views/property-marketing/media-account/account-detail/constants.ts b/src/views/property-marketing/media-account/account-detail/constants.ts index fe6737a..63a5105 100644 --- a/src/views/property-marketing/media-account/account-detail/constants.ts +++ b/src/views/property-marketing/media-account/account-detail/constants.ts @@ -30,7 +30,7 @@ export const getAccountInfoFields = (dateType: string, showMore: boolean) => { { title: '数据更新时间', dataIndex: 'last_synced_at', notDifferentiateDateType: true }, { title: '平台', dataIndex: 'platform', notDifferentiateDateType: true }, { title: '状态', dataIndex: 'status', type: 'status', notDifferentiateDateType: true }, - { title: '账户ID', dataIndex: 'id', notDifferentiateDateType: true }, + { title: '账号ID', dataIndex: 'account_id', notDifferentiateDateType: true }, { title: '手机号码', dataIndex: 'mobile', notDifferentiateDateType: true }, { title: '运营人员', dataIndex: 'operator.name', notDifferentiateDateType: true }, { title: '所属项目', dataIndex: 'group.name', notDifferentiateDateType: true }, diff --git a/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue b/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue index 6a333b6..2c82938 100644 --- a/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue +++ b/src/views/property-marketing/media-account/account-manage/components/account-table/index.vue @@ -28,9 +28,7 @@
数据更新时间 - {{ - exactFormatTime(item.last_synced_at, 'YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD HH:mm:ss') - }} + {{ getLastSyncedAt(item) }}
平台 @@ -144,6 +142,10 @@ const props = defineProps({ type: Array, default: () => [], }, + isLoadingTaskStatus: { + type: Boolean, + default: () => false, + }, }); const emits = defineEmits(['openEdit', 'update', 'selectionChange', 'delete']); @@ -172,6 +174,9 @@ const isSyncing = (item) => { if (!props.syncMediaAccounts.length) return false; const target = props.syncMediaAccounts.find((v) => v.id === item.id); + if(target) { + return target?.status === 0; + } return target?.status === 0; }; @@ -265,6 +270,18 @@ const onDeleteSyncStatus = async (item) => { await deleteSyncStatus(item.id); item.status = 1; }; +const formatTime = (time) => { + return exactFormatTime(time, 'YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD HH:mm:ss'); +}; +const getLastSyncedAt = (item) => { + const target = props.syncMediaAccounts.find((v) => v.id === item.id); + if (props.isLoadingTaskStatus && target) { + if (target?.status !== 0) { + return formatTime(target.last_synced_at); + } + } + return formatTime(item.last_synced_at); +};