Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quasar-web-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyễn Hải Sơn
quasar-web-base
Commits
7fabab04
Commit
7fabab04
authored
Apr 27, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
done don-vi-chu-quan page
parent
f76fae5e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
2 deletions
+36
-2
index.vue
src/components/pagination/index.vue
+2
-1
ManagingUnit.ts
src/pages/don-vi-chu-quan/ManagingUnit.ts
+19
-0
index.vue
src/pages/don-vi-chu-quan/index.vue
+15
-1
No files found.
src/components/pagination/index.vue
View file @
7fabab04
...
...
@@ -18,6 +18,7 @@
<q-pagination
:model-value=
"currentPage"
:max=
"totalPage"
:max-pages=
"maxPages"
direction-links
boundary-links
unelevated
...
...
@@ -41,7 +42,7 @@ export default defineComponent({
},
maxPages
:
{
type
:
Number
,
default
:
5
,
default
:
10
,
},
pageSize
:
{
type
:
Number
,
...
...
src/pages/don-vi-chu-quan/ManagingUnit.ts
View file @
7fabab04
...
...
@@ -4,6 +4,7 @@ import Pagination from 'components/pagination/index.vue';
import
{
API_PATHS
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
export
default
defineComponent
({
components
:
{
Pagination
,
...
...
@@ -93,6 +94,7 @@ export default defineComponent({
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
1
,
text
:
'Thể thao'
},
]);
const
totalPage
=
ref
(
10
);
const
fieldSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
getListUnits
=
()
=>
{
// const response = (await api({
...
...
@@ -116,6 +118,20 @@ export default defineComponent({
];
managingUnitTableRows
.
value
=
fakeData
;
};
const
filterListUnit
=
()
=>
{
// const response = (await api({
// url: API_PATHS.filterListUnit,
// method: 'GET',
// params: {
// unitName: unitNameKeyword.value,
// fieldName: fieldSelected.value,
// },
// })) as AxiosResponse<BaseResponseBody<unknown>>;
};
const
changePageSize
=
()
=>
{
pageIndex
.
value
=
1
;
void
getListUnits
();
};
onMounted
(()
=>
{
void
getListUnits
();
});
...
...
@@ -128,6 +144,9 @@ export default defineComponent({
unitNameKeyword
,
fieldOptions
,
fieldSelected
,
filterListUnit
,
totalPage
,
changePageSize
,
};
},
});
src/pages/don-vi-chu-quan/index.vue
View file @
7fabab04
...
...
@@ -20,7 +20,12 @@
></q-select>
</div>
<div
class=
"col-auto"
>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.search')"
>
</q-btn>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.search')"
@
click=
"filterListUnit"
></q-btn>
</div>
<div
class=
"col-auto"
>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.add')"
>
</q-btn>
...
...
@@ -37,6 +42,15 @@
>
</q-table>
</div>
<div
class=
"col-12 q-mt-sm"
>
<Pagination
v-model:currentPage=
"pageIndex"
v-model:pageSize=
"pageSize"
:totalPage=
"totalPage"
@
update:pageSize=
"changePageSize"
@
update:currentPage=
"getListUnits"
/>
</div>
</div>
</
template
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment