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
8bd97005
Commit
8bd97005
authored
May 10, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
fc9bde04
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
18 deletions
+62
-18
type.ts
src/assets/type.ts
+9
-1
PersonalInformation.ts
...t-information/personal-information/PersonalInformation.ts
+4
-4
app.scss
src/css/app.scss
+25
-0
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+22
-13
index.vue
src/pages/nghe-sy/index.vue
+2
-0
No files found.
src/assets/type.ts
View file @
8bd97005
...
...
@@ -7,7 +7,15 @@ export type PaginationResponse<DataType> = {
endIndex
:
number
;
data
:
DataType
[];
};
export
type
FileUploadType
=
{
byteSize
:
number
;
createTime
:
string
;
fileName
:
string
;
filePath
:
string
;
folder
:
string
;
id
:
number
;
isDeleted
:
number
;
};
export
type
UserObject
=
{
id
:
number
;
userName
:
string
;
...
...
src/components/artist-information/personal-information/PersonalInformation.ts
View file @
8bd97005
...
...
@@ -76,7 +76,7 @@ export default defineComponent({
];
const
birthdayRules
=
[
(
val
?:
string
)
=>
val
!==
undefined
||
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireBirthday'
),
...
...
@@ -147,9 +147,9 @@ export default defineComponent({
context
.
emit
(
'deleteAvatar'
);
};
const
selectDatePicker
=
(
value
:
string
)
=>
{
context
.
emit
(
'UpdateBirtday'
,
fomatDatePicker
(
value
));
context
.
emit
(
'UpdateBirtday'
,
fo
r
matDatePicker
(
value
));
};
const
fomatDatePicker
=
(
value
:
string
)
=>
{
const
fo
r
matDatePicker
=
(
value
:
string
)
=>
{
return
moment
(
value
).
format
(
'DD/MM/YYYY'
);
};
const
openDialog
:
Ref
<
boolean
>
=
ref
(
false
);
...
...
@@ -183,7 +183,7 @@ export default defineComponent({
deleteAvatar
,
BirthdayDatePicker
,
selectDatePicker
,
fomatDatePicker
,
fo
r
matDatePicker
,
openDialog
,
onOKClick
,
onCancelClick
,
...
...
src/css/app.scss
View file @
8bd97005
// app global css in SCSS form
.sticky-header-table
{
// / height or max-height is important /
max-height
:
calc
(
100vh
-
11rem
);
.q-table__top
,
.q-table__bottom
,
thead
tr
:first-child
th
{
// / bg color is important for th; just specify one /
background-color
:
#c1f4cd
;
}
thead
tr
th
{
position
:
sticky
;
z-index
:
1
;
}
thead
tr
:first-child
th
{
top
:
0
;
}
// / this is when the loading indicator appears /
&
.q-table--loading
thead
tr
:last-child
th
{
// / height of all previous header rows /
top
:
48px
;
}
}
\ No newline at end of file
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
8bd97005
...
...
@@ -34,6 +34,7 @@ import {
SchedulesType
,
CardBankType
,
TypeCardType
,
FileUploadType
,
}
from
'src/assets/type'
;
export
type
AvatarType
=
{
...
...
@@ -90,7 +91,7 @@ export default defineComponent({
const
artistCode
:
Ref
<
string
>
=
ref
(
''
);
const
fullName
:
Ref
<
string
>
=
ref
(
''
);
const
artistName
:
Ref
<
string
|
null
|
undefined
>
=
ref
();
const
birthday
:
Ref
<
string
|
null
|
undefined
>
=
ref
(
'29/04/2021'
);
const
birthday
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
sex
:
Ref
<
number
|
undefined
>
=
ref
();
const
nationality
:
Ref
<
NationalityType
|
null
>
=
ref
(
null
);
const
qualification
:
Ref
<
QualificationType
|
null
>
=
ref
(
null
);
...
...
@@ -142,7 +143,7 @@ export default defineComponent({
birthday
.
value
=
moment
(
ArtistInformation
.
birthday
,
'DD/MM/YYYY HH:mm:ss'
).
format
(
'
YYYY-MM-DD
'
);
).
format
(
'
DD/MM/YYYY
'
);
address
.
value
=
ArtistInformation
.
address
;
status
.
value
=
ArtistInformation
.
status
;
phoneNumber
.
value
=
ArtistInformation
.
phoneNumber
;
...
...
@@ -342,7 +343,7 @@ export default defineComponent({
DataUpdateHotProduct
.
value
=
value
;
};
const
setAvatar
=
(
value
:
BannerType
)
=>
{
console
.
log
(
value
);
console
.
log
(
value
,
'avatarFile'
);
avatarFile
.
value
=
value
.
file
as
File
;
avatar
.
value
=
value
.
url
as
string
;
};
...
...
@@ -397,21 +398,29 @@ export default defineComponent({
stories
.
value
.
splice
(
idx
,
1
);
});
};
// const callApiUploadImage = async (file: File) => {
// try {
// const response = await api({
// url: API_PATHS.uploadImage,
// method: 'GET',
// params: {},
// });
// } catch (error) {}
// };
const
UpdateBirtday
=
(
value
:
string
)
=>
{
// console.log(value);
console
.
log
(
value
,
'birthdayyyy'
);
birthday
.
value
=
value
;
};
// const callApiUploadImage = async (file: File) => {
// try {
// const bodyFormData = new FormData();
// bodyFormData.append('file', file);
// const response = (await api({
// headers: { 'Content-Type': 'multipart/form-data' },
// url: 'http://cms.vab.xteldev.com/file/upload',
// method: 'POST',
// data: bodyFormData,
// })) as AxiosResponse<BaseResponseBody<FileUploadType>>;
// if (response.data.error.code === config.API_RES_CODE.OK.code) {
// }
// } catch (error) {}
// };
const
updateInformationArtist
=
async
()
=>
{
try
{
// await callApiUploadImage(avatarFile.value as File);
const
response
=
(
await
api
({
url
:
API_PATHS
.
updateArtist
,
method
:
'POST'
,
...
...
@@ -420,7 +429,7 @@ export default defineComponent({
avatar
:
avatar
.
value
,
artistCode
:
artistCode
.
value
,
artistName
:
artistName
.
value
,
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
birthday
:
birthday
.
value
+
' 00:00:00'
,
sex
:
sex
.
value
,
address
:
address
.
value
,
...
...
src/pages/nghe-sy/index.vue
View file @
8bd97005
...
...
@@ -67,7 +67,9 @@
:no-data-label=
"$t('emptyData')"
row-key=
"name"
separator=
"cell"
:pagination=
"
{ rowsPerPage: pageSize }"
hide-pagination
class="sticky-header-table"
>
<template
v-slot:body-cell-STT=
"item"
>
<q-td
style=
"padding: 0; height: 100%"
>
...
...
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