diff --git a/platform/src/views/accountpool/cursor/components/detail.vue b/platform/src/views/accountpool/cursor/components/detail.vue index 12b22fa..4c7d762 100644 --- a/platform/src/views/accountpool/cursor/components/detail.vue +++ b/platform/src/views/accountpool/cursor/components/detail.vue @@ -1,5 +1,5 @@ -
+
+ + + +
ID
@@ -331,13 +384,13 @@ function copyAll() { 改可用状态 - 改不可用 - + --> diff --git a/platform/src/views/accountpool/cursor/index.vue b/platform/src/views/accountpool/cursor/index.vue index e79edbe..7107fad 100644 --- a/platform/src/views/accountpool/cursor/index.vue +++ b/platform/src/views/accountpool/cursor/index.vue @@ -88,6 +88,7 @@ const total = ref(0); const selectedRows = ref([]); const detailRow = ref(null); const detailRemarkSaving = ref(false); +const detailLoading = ref(false); const probeLoadingId = ref(null); const batchProbeDialogVisible = ref(false); const batchProbePhase = ref("running"); @@ -188,7 +189,11 @@ function handleSelectionChange(rows) { } function openDetail(row) { - loading.value = true; + if (detailVisible.value) { + detailLoading.value = true; + } else { + loading.value = true; + } getAccountPoolDetail(moduleKey, row.id) .then((res) => { if (res?.code !== 200) { @@ -200,6 +205,7 @@ function openDetail(row) { }) .finally(() => { loading.value = false; + detailLoading.value = false; }); } @@ -311,6 +317,26 @@ async function refreshDetailRow(id) { } } +const currentIndex = computed(() => { + if (!detailRow.value || !tableData.value.length) return -1; + return tableData.value.findIndex((item) => item.id === detailRow.value.id); +}); + +const hasPrev = computed(() => currentIndex.value > 0); +const hasNext = computed(() => currentIndex.value > -1 && currentIndex.value < tableData.value.length - 1); + +function handlePrevDetail() { + if (hasPrev.value) { + openDetail(tableData.value[currentIndex.value - 1]); + } +} + +function handleNextDetail() { + if (hasNext.value) { + openDetail(tableData.value[currentIndex.value + 1]); + } +} + async function handleDetailAction(payload) { if (!payload?.id || !payload?.action) return; detailRemarkSaving.value = true; @@ -1098,13 +1124,13 @@ function closeBatchProbeDialog() { - +