Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
netvs-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scc-net
netvs
netvs-core
Commits
65aebb71
Commit
65aebb71
authored
4 months ago
by
Sebastian Böckelmann
Browse files
Options
Downloads
Patches
Plain Diff
Use PaginatorTable for BldgList
parent
c2d8dc95
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/PaginatorTable.vue
+7
-1
7 additions, 1 deletion
src/components/PaginatorTable.vue
src/components/nd/BldgList.vue
+8
-13
8 additions, 13 deletions
src/components/nd/BldgList.vue
with
15 additions
and
14 deletions
src/components/PaginatorTable.vue
+
7
−
1
View file @
65aebb71
...
...
@@ -9,7 +9,7 @@
<div
class=
"pagination_container"
>
<slot
name=
"content_skeleton_item"
v-if=
"!items || items.length === 0"
></slot>
<b-table
:filter=
"filterValue"
:items=
"items"
v-bind=
"$attrs"
:current-page=
"current_page"
@
filtered=
"onFiltered"
:busy=
"isBusy"
@
filtered=
"onFiltered"
:busy=
"isBusy"
:sort-by=
"sortBy"
:per-page=
"items_per_page"
>
<template
v-for=
"(_, slot) of $scopedSlots"
v-slot:[slot]=
"scope"
>
<slot
:name=
"slot"
v-bind=
"scope"
/>
...
...
@@ -122,6 +122,12 @@ export default {
default
()
{
return
false
}
},
sortBy
:
{
type
:
String
,
default
()
{
return
null
}
}
},
watch
:
{
...
...
This diff is collapsed.
Click to expand it.
src/components/nd/BldgList.vue
+
8
−
13
View file @
65aebb71
<
template
>
<div>
<FilterInput
v-model=
"filter"
></FilterInput>
<b-pagination
v-if=
"bldgs && bldgs.length > per_page && filter === ''"
:total-rows=
"bldgs.length"
:per-page=
"per_page"
v-model=
"current_page"
align=
"center"
></b-pagination>
<b-card
no-body
class=
"shadow"
>
<
b-t
able
responsive
:fi
lter=
"filter"
:per-page=
"filter === '' ? per_page : null
"
:current-page=
"filter === '' ? current_page : null"
:fields=
"site_list_fields"
:busy=
"bldgs === null
"
:items=
"bldgs"
:sort-by=
"sort_by || default_sort_by"
>
<
PaginatorT
able
responsive
:fi
elds=
"site_list_fields"
:is-busy=
"bldgs === null"
:hide-filter=
"bldgs.length
<
10
"
:hide-top-pagination=
"bldgs.length
<
25"
:sort-by=
"sort_by || default_sort_by
"
:items=
"bldgs"
>
<template
v-slot:cell(name)=
"data"
>
<b-link
class=
"nowrap"
:to=
"'/netdoc/sites/'+data.item.site_fq_name+'/'+data.item.number"
><b>
{{
data
.
value
}}
</b></b-link>
</
template
>
<
template
v-slot:cell(number)=
"data"
>
<b-link
class=
"nowrap"
:to=
"'/netdoc/sites/'+data.item.site_fq_name+'/'+data.item.number"
><b>
{{
data
.
value
}}
</b></b-link>
</
template
>
</
b-t
able>
</
PaginatorT
able>
<div
v-if=
"bldgs && bldgs.length === 0"
class=
"font-italic text-center mb-3"
>
{{ $t('components.bcd_list.no_bldgs_available') }}
</div>
<b-pagination
v-if=
"bldgs && bldgs.length > per_page && filter === ''"
:total-rows=
"bldgs.length"
:per-page=
"per_page"
v-model=
"current_page"
align=
"center"
></b-pagination>
</b-card>
</div>
</template>
<
script
>
import
FilterInput
from
'
@/components/FilterInput
'
import
PaginatorTable
from
'
@/components/PaginatorTable.vue
'
export
default
{
name
:
'
BldgList
'
,
components
:
{
FilterInput
},
components
:
{
PaginatorTable
},
watch
:
{
filter
:
{
immediate
:
true
,
...
...
@@ -52,7 +48,7 @@ export default {
},
computed
:
{
site_list_fields
()
{
const
result
=
[
return
[
{
label
:
this
.
$t
(
'
views.nd.bldg.number
'
),
key
:
'
number
'
,
...
...
@@ -74,7 +70,6 @@ export default {
sortable
:
true
},
]
return
result
}
},
props
:
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment