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
f76fae5e
Commit
f76fae5e
authored
Apr 27, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update managinUnit Page
parent
90a2026a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
103 additions
and
48 deletions
+103
-48
configurations.example.ts
src/assets/configurations.example.ts
+1
-0
ManagingUnit.ts
src/pages/don-vi-chu-quan/ManagingUnit.ts
+83
-36
index.vue
src/pages/don-vi-chu-quan/index.vue
+18
-12
index.vue
src/pages/nguoi-dung/index.vue
+1
-0
No files found.
src/assets/configurations.example.ts
View file @
f76fae5e
...
...
@@ -32,4 +32,5 @@ export enum API_PATHS {
resetPassword
=
'/user/resetPass'
,
getUserDetail
=
'/user/detail'
,
updateUser
=
'/user/update'
,
getListUnits
=
'/unit/list'
,
}
src/pages/don-vi-chu-quan/ManagingUnit.ts
View file @
f76fae5e
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
ref
,
Ref
}
from
'vue'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
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
,
},
setup
()
{
const
user
TableColumns
=
[
const
managingUnit
TableColumns
=
[
{
name
:
'
userName
'
,
field
:
'
userName
'
,
name
:
'
STT
'
,
field
:
'
STT
'
,
required
:
true
,
label
:
'STT'
,
align
:
'
left
'
,
sortable
:
tru
e
,
align
:
'
center
'
,
sortable
:
fals
e
,
},
{
name
:
'u
serNam
e'
,
field
:
'u
serNam
e'
,
name
:
'u
nitCod
e'
,
field
:
'u
nitCod
e'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.unit'
),
align
:
'
left
'
,
sortable
:
tru
e
,
align
:
'
center
'
,
sortable
:
fals
e
,
},
{
name
:
'
full
Name'
,
field
:
'
full
Name'
,
name
:
'
unit
Name'
,
field
:
'
unit
Name'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.unitName'
),
align
:
'
left
'
,
sortable
:
tru
e
,
align
:
'
center
'
,
sortable
:
fals
e
,
},
{
name
:
'
email
'
,
field
:
'
email
'
,
name
:
'
deputy
'
,
field
:
'
deputy
'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.deputy'
),
align
:
'
left
'
,
sortable
:
tru
e
,
align
:
'
center
'
,
sortable
:
fals
e
,
},
{
name
:
'
phoneNumber
'
,
field
:
'
phoneNumber
'
,
name
:
'
field
'
,
field
:
'
field
'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.field'
),
align
:
'
left
'
,
sortable
:
tru
e
,
align
:
'
center
'
,
sortable
:
fals
e
,
},
{
name
:
'
unit
'
,
field
:
'
unit
'
,
name
:
'
email
'
,
field
:
'
email
'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.email'
),
align
:
'
left
'
,
sortable
:
tru
e
,
align
:
'
center
'
,
sortable
:
fals
e
,
},
{
name
:
'
unit
'
,
field
:
'
unit
'
,
name
:
'
phoneNumber
'
,
field
:
'
phoneNumber
'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.phoneNumber'
),
align
:
'
left
'
,
sortable
:
tru
e
,
align
:
'
center
'
,
sortable
:
fals
e
,
},
{
name
:
'status'
,
field
:
'status'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.status'
),
align
:
'
left
'
,
sortable
:
tru
e
,
align
:
'
center
'
,
sortable
:
fals
e
,
},
{
name
:
'action'
,
field
:
'action'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnit.tableColumns.action'
),
align
:
'
left
'
,
sortable
:
tru
e
,
align
:
'
center
'
,
sortable
:
fals
e
,
},
];
const
userTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
return
{
userTableColumns
,
userTableRows
};
const
managingUnitTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
unitNameKeyword
=
ref
(
''
);
const
fieldOptions
=
ref
([
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
1
,
text
:
'Thể thao'
},
]);
const
fieldSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
getListUnits
=
()
=>
{
// const response = (await api({
// url: API_PATHS.getListUnits,
// method: 'GET',
// params: {
// pageIndex: pageIndex.value,
// pageSize: pageSize.value,
// },
// })) as AxiosResponse<BaseResponseBody<unknown>>;
const
fakeData
:
unknown
[]
=
[
{
unitCode
:
'0001'
,
unitName
:
'MTP Entertainment'
,
deputy
:
'Sơn Tùng MTP'
,
field
:
'Giải trí'
,
email
:
'sontung@gmail.com'
,
phoneNumber
:
'0899999999'
,
status
:
1
,
},
];
managingUnitTableRows
.
value
=
fakeData
;
};
onMounted
(()
=>
{
void
getListUnits
();
});
return
{
managingUnitTableColumns
,
managingUnitTableRows
,
getListUnits
,
pageIndex
,
pageSize
,
unitNameKeyword
,
fieldOptions
,
fieldSelected
,
};
},
});
src/pages/don-vi-chu-quan/index.vue
View file @
f76fae5e
...
...
@@ -6,28 +6,34 @@
dense
outlined
:label=
"$t('managingUnit.tableColumns.unitName')"
v-model=
"unitNameKeyword"
></q-input>
</div>
<div
class=
"col-2"
><q-select
dense
outlined
></q-select></div>
<div
class=
"col-2"
>
<q-select
v-model=
"fieldSelected"
:options=
"fieldOptions"
option-label=
"text"
option-value=
"id"
dense
outlined
></q-select>
</div>
<div
class=
"col-auto"
>
<q-btn
color=
"primary"
class=
"text-none"
:label=
"$t('crudActions.search')"
>
</q-btn>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.search')"
>
</q-btn>
</div>
<div
class=
"col-auto"
>
<q-btn
color=
"primary"
class=
"text-none"
:label=
"$t('crudActions.add')"
>
</q-btn>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.add')"
>
</q-btn>
</div>
<div
class=
"col-12 q-mt-sm"
>
<q-table
:rows=
"
user
TableRows"
:columns=
"
user
TableColumns"
row-key=
"
nam
e"
:rows=
"
managingUnit
TableRows"
:columns=
"
managingUnit
TableColumns"
row-key=
"
unitCod
e"
separator=
"cell"
:no-data-label=
"$t('emptyData')"
hide-pagination
>
</q-table>
</div>
...
...
src/pages/nguoi-dung/index.vue
View file @
f76fae5e
...
...
@@ -7,6 +7,7 @@
row-key=
"name"
separator=
"cell"
hide-pagination
:no-data-label=
"$t('emptyData')"
>
<template
v-slot:top
>
<q-th
class=
"full-width"
>
...
...
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