Merge remote-tracking branch 'origin/main' into feature/0710_下载中心_rxd

This commit is contained in:
rd
2025-07-18 18:14:14 +08:00
9 changed files with 43 additions and 19 deletions

View File

@ -28,9 +28,7 @@
</div>
<div class="field-row">
<span class="label">数据更新时间</span>
<span class="cts num">{{
exactFormatTime(item.last_synced_at, 'YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD HH:mm:ss')
}}</span>
<span class="cts num">{{ getLastSyncedAt(item) }}</span>
</div>
<div class="field-row">
<span class="label">平台</span>
@ -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);
};
</script>
<style scoped lang="scss">