|
|
|
@ -35,7 +35,7 @@ async function loadAudits(page: number, limit: number) {
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
audits = list |
|
|
|
|
totalRows = pageInfo.totalRows ?? 0 |
|
|
|
|
totalRows = 100 |
|
|
|
|
} catch (e) { |
|
|
|
|
console.error(e) |
|
|
|
|
} finally { |
|
|
|
@ -46,7 +46,7 @@ async function loadAudits(page: number, limit: number) {
|
|
|
|
|
onMounted(async () => { |
|
|
|
|
if (audits === null) { |
|
|
|
|
await loadProject(projectId) |
|
|
|
|
await loadAudits(page.value, limit.value) |
|
|
|
|
await loadAudits(currentPage.value, currentLimit.value) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -84,10 +84,7 @@ const columns = [
|
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<div class="flex flex-col items-center gap-4 w-full"> |
|
|
|
|
<a-table class="w-full" :data-source="audits ?? []" :columns="columns" :pagination="false" :loading="isLoading" /> |
|
|
|
|
|
|
|
|
|
<div class="flex flex-wrap items-center justify-center gap-4"> |
|
|
|
|
<div class="flex flex-col gap-4 w-full"> |
|
|
|
|
<a-button class="self-start" @click="loadAudits"> |
|
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
|
<MdiReload :class="{ 'animate-infinite animate-spin !text-success': isLoading }" /> |
|
|
|
@ -95,6 +92,8 @@ const columns = [
|
|
|
|
|
</div> |
|
|
|
|
</a-button> |
|
|
|
|
|
|
|
|
|
<a-table class="w-full" :data-source="audits ?? []" :columns="columns" :pagination="false" :loading="isLoading" /> |
|
|
|
|
|
|
|
|
|
<a-pagination |
|
|
|
|
v-model:current="currentPage" |
|
|
|
|
:page-size="currentLimit" |
|
|
|
@ -103,5 +102,4 @@ const columns = [
|
|
|
|
|
@change="loadAudits" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|