feat: páginas de órgãos, concorrentes e contratos
This commit is contained in:
43
front-end/app/pages/gestao/orgaos.vue
Normal file
43
front-end/app/pages/gestao/orgaos.vue
Normal file
@@ -0,0 +1,43 @@
|
||||
<!-- front-end/app/pages/gestao/orgaos.vue -->
|
||||
<script setup lang="ts">
|
||||
import { orgaos } from '~/data/mock/orgaos'
|
||||
|
||||
const esferaLabel = { federal: 'Federal', estadual: 'Estadual', municipal: 'Municipal' }
|
||||
const columns = [
|
||||
{ key: 'nome', label: 'Órgão' },
|
||||
{ key: 'esfera', label: 'Esfera' },
|
||||
{ key: 'estado', label: 'UF' },
|
||||
{ key: 'totalParticipacoes', label: 'Participações' },
|
||||
{ key: 'totalVitorias', label: 'Vitórias' },
|
||||
{ key: 'taxaVitoria', label: 'Taxa' },
|
||||
]
|
||||
|
||||
const dados = computed(() => orgaos.map(o => ({
|
||||
...o,
|
||||
taxaVitoria: o.totalParticipacoes > 0 ? `${Math.round((o.totalVitorias / o.totalParticipacoes) * 100)}%` : '0%',
|
||||
})))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page">
|
||||
<AppTopbar title="Órgãos Públicos" breadcrumb="Gestão · Órgãos">
|
||||
<template #actions>
|
||||
<UButton size="sm" class="btn-primary">+ Adicionar Órgão</UButton>
|
||||
</template>
|
||||
</AppTopbar>
|
||||
<div class="content">
|
||||
<div class="card">
|
||||
<UTable :data="dados" :columns="columns">
|
||||
<template #esfera-cell="{ row }">{{ esferaLabel[row.original.esfera] }}</template>
|
||||
</UTable>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.page { display: flex; flex-direction: column; height: 100vh; }
|
||||
.content { padding: 20px 22px; flex: 1; overflow-y: auto; }
|
||||
.card { background: white; border-radius: 11px; border: 1px solid #e2e8f0; overflow: hidden; }
|
||||
.btn-primary { background: linear-gradient(135deg, #667eea, #764ba2) !important; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user