From 3ed801ddc33e3c613d7dfd7e5934b9fe3ec3b2e5 Mon Sep 17 00:00:00 2001
From: rd <1344903914@qq.com>
Date: Fri, 18 Jul 2025 16:11:57 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=89=B9=E9=87=8F=E6=9B=B4=E6=96=B0?=
=?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=BB=93=E6=9D=9F=E5=90=8Eupdate=E6=9B=B4?=
=?UTF-8?q?=E6=96=B0=E6=97=B6=E9=97=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/account-table/index.vue | 23 ++++++++++++++++---
.../media-account/account-manage/index.vue | 11 +++++----
2 files changed, 26 insertions(+), 8 deletions(-)
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);
+};