fix: refresh cached inbound task lists

This commit is contained in:
2026-08-13 19:38:20 +08:00
parent 69a0093d99
commit 5489bff92f
2 changed files with 19 additions and 1 deletions
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
import { computed, onActivated, onBeforeUnmount, onMounted, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import { ClipboardCheck, Eye, Ruler, SearchCheck } from '@lucide/vue'
import { useAccessPreviewStore } from '@/core/access/accessPreview'
@@ -44,6 +44,7 @@ const selectedInbound = ref<InboundOrderSummary | null>(null)
const taskDialogOpen = ref(false)
let requestSerial = 0
let disposed = false
let activatedOnce = false
const isReview = computed(() => props.mode === 'review')
const actionPermission = computed(() => isReview.value
@@ -182,6 +183,13 @@ function handleTaskChanged() {
watch([page, pageSize], () => { void loadTasks() })
onMounted(() => { void loadOptions(); void loadTasks() })
onActivated(() => {
if (!activatedOnce) {
activatedOnce = true
return
}
void loadTasks()
})
onBeforeUnmount(() => { disposed = true; requestSerial += 1 })
</script>