|
|
|
|
@ -4,8 +4,9 @@
|
|
|
|
|
<map-component @mapClick="$emit('mapClick', $event)" />
|
|
|
|
|
</va-card>
|
|
|
|
|
<va-card class="content-container">
|
|
|
|
|
<va-data-table :items="items" :columns="columns" :hoverable="true" :clickable="true"
|
|
|
|
|
@row:click="(e) => $router.push(`/items/${e.item.id}`)" />
|
|
|
|
|
<va-data-table :items="items" :columns="columns" :hoverable="true" :clickable="true" :per-page="perPage"
|
|
|
|
|
:current-page="currentPage" @row:click="(e) => $router.push(`/items/${e.item.id}`)" />
|
|
|
|
|
<va-pagination v-model="currentPage" :pages="pages" input />
|
|
|
|
|
</va-card>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -27,9 +28,19 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {}
|
|
|
|
|
return {
|
|
|
|
|
perPage: 10,
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {},
|
|
|
|
|
computed: {
|
|
|
|
|
pages(){
|
|
|
|
|
return (this.perPage && this.perPage !== 0)
|
|
|
|
|
? Math.ceil(this.items.length / this.perPage)
|
|
|
|
|
: this.items.length
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|