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
238791c1
Commit
238791c1
authored
May 08, 2021
by
hong-IT-99
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update code
parent
4889b415
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
27 deletions
+42
-27
noavatar.png
src/assets/noavatar.png
+0
-0
PersonalInformation.ts
...t-information/personal-information/PersonalInformation.ts
+5
-3
index.vue
...ponents/artist-information/personal-information/index.vue
+24
-20
index.vue
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
+1
-0
updateInformationArtist.ts
...ges/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
+12
-4
No files found.
src/assets/noavatar.png
0 → 100644
View file @
238791c1
5.33 KB
src/components/artist-information/personal-information/PersonalInformation.ts
View file @
238791c1
...
@@ -35,10 +35,11 @@ export default defineComponent({
...
@@ -35,10 +35,11 @@ export default defineComponent({
components
:
{
components
:
{
UploadImage
,
UploadImage
,
},
},
setup
()
{
setup
(
_
,
context
)
{
const
selectedFile
=
(
value
:
FileList
)
=>
{
const
selectedFile
=
(
value
:
FileList
)
=>
{
console
.
log
(
value
);
// console.log(value);
console
.
log
(
URL
.
createObjectURL
(
value
[
0
]));
// console.log(URL.createObjectURL(value[0]));
context
.
emit
(
'SetAvatar'
,{
file
:
value
[
0
],
url
:
URL
.
createObjectURL
(
value
[
0
])})
};
};
const
upload
=
ref
(
null
);
const
upload
=
ref
(
null
);
const
uploadBanner
=
()
=>
{
const
uploadBanner
=
()
=>
{
...
@@ -176,5 +177,6 @@ export default defineComponent({
...
@@ -176,5 +177,6 @@ export default defineComponent({
'update:artistLevel'
,
'update:artistLevel'
,
'update:status'
,
'update:status'
,
'addNewArtist'
,
'addNewArtist'
,
'SetAvatar'
],
],
});
});
src/components/artist-information/personal-information/index.vue
View file @
238791c1
...
@@ -3,29 +3,33 @@
...
@@ -3,29 +3,33 @@
<q-space></q-space>
<q-space></q-space>
<div
class=
"col-5"
>
<div
class=
"col-5"
>
<div
class=
"row q-mt-sm flex-center"
>
<div
class=
"row q-mt-sm flex-center"
>
<div
class=
"col-3 text-weight-medium"
>
<div
class=
"col-3 text-weight-medium"
></div>
<q-card
style=
"max-width: 65%"
@
click=
"uploadBanner"
>
<!-- -->
<div
align=
"center"
class=
"flex flex-center q-py-xs"
>
<q-icon
name=
"mdi-plus-circle-outline"
:size=
"'xs'"
></q-icon>
<div
class=
"q-mt-xs"
>
{{
$t
(
'uploadImage.uploadBanner'
)
}}
</div>
</div>
<input
ref=
"upload"
hidden
@
change=
"selectedFile($event.target.files)"
type=
"file"
accept=
"image/png, image/jpeg"
/>
<!-- / @change="$emit('selectedFile', $event.target.files)" -->
</q-card>
</div>
<div
class=
"col-8 flex flex-center"
>
<div
class=
"col-8 flex flex-center"
>
<div
style=
"width: 100%"
>
<div>
<q-img
:src=
"avatar"
style=
"max-width: 120px"
></q-img>
<q-card
style=
"margin-bottom: 8px"
v-if=
"avatar !== null"
>
<q-img
:src=
"avatar"
style=
"height: 180px; width: 135px"
></q-img>
</q-card>
<q-card
v-else
style=
"margin-bottom: 8px"
>
<q-img
src=
"~/assets/noavatar.png"
style=
"height: 180px; width: 135px"
></q-img>
</q-card>
<q-card
@
click=
"uploadBanner"
>
<div
align=
"center"
class=
"flex flex-center q-py-xs"
>
<q-icon
name=
"mdi-plus-circle-outline"
:size=
"'xs'"
></q-icon>
<div
class=
"q-mt-xs"
>
{{
$t
(
'uploadImage.uploadBanner'
)
}}
</div>
</div>
<input
ref=
"upload"
hidden
@
change=
"selectedFile($event.target.files)"
type=
"file"
accept=
"image/png, image/jpeg"
/>
</q-card>
</div>
</div>
</div>
</div>
<!-- @selectedFile="uploadAvatar" -->
</div>
</div>
<div
class=
"row q-mt-sm flex-center"
>
<div
class=
"row q-mt-sm flex-center"
>
<div
class=
"col-3 text-weight-medium"
>
<div
class=
"col-3 text-weight-medium"
>
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/index.vue
View file @
238791c1
...
@@ -58,6 +58,7 @@
...
@@ -58,6 +58,7 @@
:profession-options=
"professionOptions"
:profession-options=
"professionOptions"
:artist-level-options=
"artistLevelOptions"
:artist-level-options=
"artistLevelOptions"
:work-options=
"workOptions"
:work-options=
"workOptions"
@
SetAvatar=
"setAvatar($event)"
></PersonalInformation>
></PersonalInformation>
</q-tab-panel>
</q-tab-panel>
<q-tab-panel
name=
"vabAccount"
>
<q-tab-panel
name=
"vabAccount"
>
...
...
src/pages/cap-nhat-thong-tin-nghe-sy/updateInformationArtist.ts
View file @
238791c1
...
@@ -35,6 +35,10 @@ import {
...
@@ -35,6 +35,10 @@ import {
TypeCardType
,
TypeCardType
,
}
from
'src/assets/type'
;
}
from
'src/assets/type'
;
export
type
AvatarType
=
{
file
?:
File
,
url
?:
string
|
null
}
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
PersonalInformation
,
PersonalInformation
,
...
@@ -47,6 +51,7 @@ export default defineComponent({
...
@@ -47,6 +51,7 @@ export default defineComponent({
UpdateHotProduct
,
UpdateHotProduct
,
UploadEmbedDialog
,
UploadEmbedDialog
,
},
},
setup
()
{
setup
()
{
const
route
=
useRoute
();
const
route
=
useRoute
();
const
tab
=
ref
(
'information'
);
const
tab
=
ref
(
'information'
);
...
@@ -122,10 +127,7 @@ export default defineComponent({
...
@@ -122,10 +127,7 @@ export default defineComponent({
console
.
log
(
response
,
'Artist Detail Info'
);
console
.
log
(
response
,
'Artist Detail Info'
);
const
ArtistInformation
=
response
.
data
.
data
;
const
ArtistInformation
=
response
.
data
.
data
;
id
.
value
=
ArtistInformation
.
id
;
id
.
value
=
ArtistInformation
.
id
;
// avatar.value = ArtistInformation.avatar
avatar
.
value
=
ArtistInformation
.
avatar
;
avatar
.
value
=
'https://static2.yan.vn/YanNews/2167221/201911/son-tung-mtp-so-huu-3-cong-ty-giai-tri-o-tuoi-25-cdm-qua-gioi-f53bb404.jpg'
;
account
.
value
=
ArtistInformation
.
account
;
account
.
value
=
ArtistInformation
.
account
;
artistCode
.
value
=
ArtistInformation
.
artistCode
;
artistCode
.
value
=
ArtistInformation
.
artistCode
;
fullName
.
value
=
ArtistInformation
.
fullName
;
fullName
.
value
=
ArtistInformation
.
fullName
;
...
@@ -164,6 +166,11 @@ export default defineComponent({
...
@@ -164,6 +166,11 @@ export default defineComponent({
);
);
}
}
};
};
const
setAvatar
=
(
value
:
BannerType
)
=>
{
console
.
log
(
value
);
avatar
.
value
=
value
.
url
as
string
};
const
getFieldOptions
=
async
()
=>
{
const
getFieldOptions
=
async
()
=>
{
const
response
=
(
await
api
({
const
response
=
(
await
api
({
url
:
API_PATHS
.
getFieldOptions
,
url
:
API_PATHS
.
getFieldOptions
,
...
@@ -443,6 +450,7 @@ export default defineComponent({
...
@@ -443,6 +450,7 @@ export default defineComponent({
getTypeCardOptions
,
getTypeCardOptions
,
rowDataAccBank
,
rowDataAccBank
,
avatar
,
avatar
,
setAvatar
};
};
},
},
});
});
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