Commit 15a56e72 authored by hong-IT-99's avatar hong-IT-99

update code

parent 34d7178c
<template> <template>
<div class="row q-col-gutter-sm"> <div class="row q-col-gutter-sm" style="max-height: 750px">
<div class="col-12 text-uppercase text-weight-medium">Tài khoản VAB</div> <div class="col-12 text-uppercase text-weight-medium">Tài khoản VAB</div>
<br /> <br />
<div class="col-auto flex flex-center justify-start"> <div class="col-auto flex flex-center justify-start">
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</div> </div>
<div class="col-12 q-mt-sm"> <div class="col-12 q-mt-sm">
<div class="row q-col-gutter-lg"> <div class="row q-col-gutter-lg">
<div class="col-7" style="height: 100%"> <div class="col-12" style="height: 100%">
<q-carousel <q-carousel
v-if="banners.length" v-if="banners.length"
v-model="slide" v-model="slide"
...@@ -43,12 +43,15 @@ ...@@ -43,12 +43,15 @@
arrows arrows
navigation navigation
infinite infinite
height="600px"
style="border: 2px solid #f1f1f1"
> >
<q-carousel-slide <q-carousel-slide
v-for="(bannerInfo, bannerIdx) in banners" v-for="(bannerInfo, bannerIdx) in banners"
:key="bannerIdx" :key="bannerIdx"
:name="bannerIdx" :name="bannerIdx"
:img-src="bannerInfo.bannerUrl || bannerInfo.url" :img-src="bannerInfo.bannerUrl || bannerInfo.url"
style="height: 500px; aspect-ratio: 1/5"
> >
<template v-slot:default> <template v-slot:default>
<div align="right"> <div align="right">
...@@ -70,7 +73,7 @@ ...@@ -70,7 +73,7 @@
></UploadImage> ></UploadImage>
<UploadImage v-else @selectedFile="uploadBanner"></UploadImage> <UploadImage v-else @selectedFile="uploadBanner"></UploadImage>
</div> </div>
<div class="col-5"> <div class="col-12">
<q-editor <q-editor
:model-value="shortDescription" :model-value="shortDescription"
@update:model-value="$emit('update:shortDescription', $event)" @update:model-value="$emit('update:shortDescription', $event)"
...@@ -88,12 +91,6 @@ ...@@ -88,12 +91,6 @@
list: 'only-icons', list: 'only-icons',
options: ['left', 'center', 'right', 'justify'], options: ['left', 'center', 'right', 'justify'],
}, },
{
label: $q.lang.editor.align,
icon: $q.iconSet.editor.align,
fixedLabel: true,
options: ['left', 'center', 'right', 'justify'],
},
], ],
[ [
'bold', 'bold',
...@@ -195,7 +192,7 @@ ...@@ -195,7 +192,7 @@
</div> </div>
<q-card <q-card
class="my-card q-mt-sm flex flex-center" class="my-card q-mt-sm flex flex-center"
style="height: 300px" :style="socialEmbedded !== null ? 'height: 83%;' : 'height: 90.5%'"
bordered bordered
> >
<iframe <iframe
...@@ -233,8 +230,8 @@ ...@@ -233,8 +230,8 @@
> >
</div> </div>
<q-card <q-card
class="my-card flex q-mt-xs flex-center" class="my-card flex q-mt-sm flex-center"
style="height: 100%" :style="stories.length ? 'height: 100%' : 'height: 90.6%;'"
bordered bordered
v-if="!stories.length" v-if="!stories.length"
> >
...@@ -254,16 +251,20 @@ ...@@ -254,16 +251,20 @@
arrows arrows
navigation navigation
infinite infinite
style="height: 100%"
> >
<q-carousel-slide <q-carousel-slide
v-for="(story, storyIdx) in stories" v-for="(story, storyIdx) in stories"
:key="storyIdx" :key="storyIdx"
:name="storyIdx" :name="storyIdx"
class="q-pt-sm" class="q-pt-sm"
style="height: 230px"
> >
<q-card class="my-card"> <q-card class="my-card">
<q-img fit="contain" :src="story.imageUrl" /> <q-img
fit="contain"
style="max-height: 230px"
:src="story.imageUrl"
/>
<q-icon <q-icon
name="mdi-close-circle" name="mdi-close-circle"
color="red" color="red"
......
...@@ -3,6 +3,7 @@ import { i18n } from 'src/boot/i18n'; ...@@ -3,6 +3,7 @@ import { i18n } from 'src/boot/i18n';
import { isEmail } from '../../../boot/functions'; import { isEmail } from '../../../boot/functions';
import { isMobilePhone } from '../../../boot/functions'; import { isMobilePhone } from '../../../boot/functions';
import UploadImage from '../../upload-image/index.vue'; import UploadImage from '../../upload-image/index.vue';
import moment from 'moment';
export default defineComponent({ export default defineComponent({
props: { props: {
id: { type: Number, required: true }, id: { type: Number, required: true },
...@@ -36,6 +37,7 @@ export default defineComponent({ ...@@ -36,6 +37,7 @@ export default defineComponent({
UploadImage, UploadImage,
}, },
setup(_, context) { setup(_, context) {
const BirthdayDatePicker = ref(moment().format('YYYY/MM/DD'))
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]));
...@@ -144,6 +146,12 @@ export default defineComponent({ ...@@ -144,6 +146,12 @@ export default defineComponent({
console.log('object'); console.log('object');
context.emit('deleteAvatar'); context.emit('deleteAvatar');
}; };
const selectDatePicker =(value:string) =>{
context.emit('UpdateBirtday',fomatDatePicker(value))
}
const fomatDatePicker=(value:string)=>{
return moment(value).format('DD/MM/YYYY')
}
return { return {
artistCodeRules, artistCodeRules,
fullNameRules, fullNameRules,
...@@ -162,6 +170,9 @@ export default defineComponent({ ...@@ -162,6 +170,9 @@ export default defineComponent({
uploadBanner, uploadBanner,
selectedFile, selectedFile,
deleteAvatar, deleteAvatar,
BirthdayDatePicker,
selectDatePicker,
fomatDatePicker
}; };
}, },
emits: [ emits: [
...@@ -187,5 +198,6 @@ export default defineComponent({ ...@@ -187,5 +198,6 @@ export default defineComponent({
'addNewArtist', 'addNewArtist',
'SetAvatar', 'SetAvatar',
'deleteAvatar', 'deleteAvatar',
'UpdateBirtday'
], ],
}); });
...@@ -92,11 +92,24 @@ ...@@ -92,11 +92,24 @@
@update:model-value="$emit('update:birthday', $event)" @update:model-value="$emit('update:birthday', $event)"
:rules="birthdayRules" :rules="birthdayRules"
class="q-my-sm" class="q-my-sm"
type="date" readonly
outlined outlined
dense dense
hide-bottom-space hide-bottom-space
> >
<template v-slot:default>
<q-menu
transition-show="flip-right"
transition-hide="flip-left"
auto-close
>
<q-date
v-model="BirthdayDatePicker"
first-day-of-week="1"
@update:model-value="selectDatePicker($event)"
></q-date>
</q-menu>
</template>
</q-input> </q-input>
</div> </div>
</div> </div>
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
:work-options="workOptions" :work-options="workOptions"
@SetAvatar="setAvatar($event)" @SetAvatar="setAvatar($event)"
@deleteAvatar="deleteAvatar" @deleteAvatar="deleteAvatar"
@UpdateBirtday="UpdateBirtday($event)"
></PersonalInformation> ></PersonalInformation>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="vabAccount"> <q-tab-panel name="vabAccount">
......
...@@ -406,7 +406,10 @@ export default defineComponent({ ...@@ -406,7 +406,10 @@ export default defineComponent({
// }); // });
// } catch (error) {} // } catch (error) {}
// }; // };
const UpdateBirtday = (value: string) => {
// console.log(value);
birthday.value = value;
};
const updateInformationArtist = async () => { const updateInformationArtist = async () => {
try { try {
const response = (await api({ const response = (await api({
...@@ -417,7 +420,8 @@ export default defineComponent({ ...@@ -417,7 +420,8 @@ export default defineComponent({
avatar: avatar.value, avatar: avatar.value,
artistCode: artistCode.value, artistCode: artistCode.value,
artistName: artistName.value, artistName: artistName.value,
birthday: birthday.value, // eslint-disable-next-line @typescript-eslint/restrict-plus-operands
birthday: birthday.value + ' 00:00:00',
sex: sex.value, sex: sex.value,
address: address.value, address: address.value,
phoneNumber: phoneNumber.value, phoneNumber: phoneNumber.value,
...@@ -558,6 +562,7 @@ export default defineComponent({ ...@@ -558,6 +562,7 @@ export default defineComponent({
isOpenAddStory, isOpenAddStory,
addStory, addStory,
deleteStory, deleteStory,
UpdateBirtday,
}; };
}, },
}); });
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment