create page information-artist

parent 05638fa5
<template>
<div>My component</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
// name: 'ComponentName'
})
</script>
import { defineComponent } from 'vue';
export default defineComponent({});
<template>
<div class="row q-col-gutter-sm">
<q-space></q-space>
<div class="col-5">
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.id') }}
</div>
<div class="col-8">00106</div>
</div>
<div class="row q-mt-md flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.artistCode') }}
</div>
<div class="col-8">00156</div>
</div>
<div class="row q-mt-md flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.fullName') }}
</div>
<div class="col-8">
<q-input outlined dense label="Son Tung"></q-input>
</div>
</div>
<div class="row q-mt-md flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.stageName') }}
</div>
<div class="col-8">
<q-input outlined dense label="Son Tung"></q-input>
</div>
</div>
<div class="row q-mt-md flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.birthday') }}
</div>
<div class="col-8">
<q-select outlined dense label="01/01/1992"></q-select>
</div>
</div>
<div class="row q-mt-md flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.sex') }}
</div>
<div class="col-8">
<q-select outlined dense label="Nam"></q-select>
</div>
</div>
<div class="row q-mt-md flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.nationality') }}
</div>
<div class="col-8">
<q-select outlined dense label="Việt Nam"></q-select>
</div>
</div>
<div class="row q-mt-md flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.address') }}
</div>
<div class="col-8">
<q-input outlined dense label="Tây hồ - Hoàn Kiếm - Hà Nội"></q-input>
</div>
</div>
<div class="row q-mt-md flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.status') }}
</div>
<div class="col-8">
<q-select outlined dense label="Hoạt Động"></q-select>
</div>
</div>
</div>
<q-space></q-space>
<div class="col-5">
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.field') }}
</div>
<div class="col-8">
<q-select outlined dense label="Âm nhạc"></q-select>
</div>
</div>
<div class="row q-mt-sm flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.work') }}
</div>
<div class="col-8">
<q-select outlined dense label="Ca sỹ"></q-select>
</div>
</div>
<div class="row q-mt-sm flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.professionalism') }}
</div>
<div class="col-8">
<q-select outlined dense label="Chuyên nghiệp"></q-select>
</div>
</div>
<div class="row q-mt-sm flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.rating') }}
</div>
<div class="col-8">
<q-select outlined dense label="Xếp hạng"></q-select>
</div>
</div>
<div class="row q-mt-sm flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.phoneNumber') }}
</div>
<div class="col-8">
<q-input outlined dense label="0961051368"></q-input>
</div>
</div>
<div class="row q-mt-sm flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.email') }}
</div>
<div class="col-8">
<q-input outlined dense label="thanhdatwg@gmail.com"></q-input>
</div>
</div>
<div class="row q-mt-sm flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.facebook') }}
</div>
<div class="col-8">
<q-input outlined dense label="abc"></q-input>
</div>
</div>
<div class="row q-mt-sm flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.facebookMessage') }}
</div>
<div class="col-8">
<q-input outlined dense label="Son Tung"></q-input>
</div>
</div>
<div class="row q-mt-sm flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.instagram') }}
</div>
<div class="col-8">
<q-input outlined dense label="Son Tung"></q-input>
</div>
</div>
<div class="row q-mt-sm flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.whatsapp') }}
</div>
<div class="col-8">
<q-input outlined dense label="Son Tung"></q-input>
</div>
</div>
</div>
<q-space></q-space>
</div>
</template>
<script lang="ts" src="./PersonalInformation.ts"></script>
...@@ -42,7 +42,7 @@ export default defineComponent({ ...@@ -42,7 +42,7 @@ export default defineComponent({
}, },
maxPages: { maxPages: {
type: Number, type: Number,
default: 6, default: 5,
}, },
pageSize: { pageSize: {
type: Number, type: Number,
......
...@@ -129,6 +129,7 @@ export default { ...@@ -129,6 +129,7 @@ export default {
updateUserInfo: 'Cập nhật', updateUserInfo: 'Cập nhật',
resetPassword: 'Reset mật khẩu', resetPassword: 'Reset mật khẩu',
deleteUser: 'Xoá', deleteUser: 'Xoá',
informationUser: 'Thông tin',
}, },
}, },
managingUnit: { managingUnit: {
...@@ -143,7 +144,6 @@ export default { ...@@ -143,7 +144,6 @@ export default {
action: 'Chức năng', action: 'Chức năng',
}, },
}, },
artist: { artist: {
tableColumnsArtist: { tableColumnsArtist: {
artistName: 'Tên nghệ sỹ', artistName: 'Tên nghệ sỹ',
...@@ -157,6 +157,35 @@ export default { ...@@ -157,6 +157,35 @@ export default {
ratings: 'Xếp hạng', ratings: 'Xếp hạng',
action: 'Chức năng', action: 'Chức năng',
}, },
artistInformation: {
tabLabel: {
personalInformation: 'Thông tin cá nhân',
vabAccout: 'Tài khoản VAB',
bankAcount: 'Tài khoản ngân hàng thụ hưởng',
hotProduct: 'Sản phẩm nổi bật',
},
titleDataField: {
id: 'ID',
artistCode: 'Mã nghệ sỹ',
fullName: 'Họ tên',
stageName: 'Nghệ danh',
birthday: 'Ngày sinh',
sex: 'Giới tính',
nationality: 'Quốc tịch',
address: 'Địa chỉ',
status: 'Trạng thái',
field: 'Lĩnh vực',
work: 'Công việc',
professionalism: 'Độ chuyên',
rating: 'Xếp hạng',
phoneNumber: 'Số điện thoại',
email: 'Email',
facebook: 'FB Page',
facebookMessage: 'FB Message',
instagram: 'Instagram',
whatsapp: 'Whatsapp',
},
},
}, },
recordPerPage: 'Số bản ghi', recordPerPage: 'Số bản ghi',
}; };
...@@ -11,14 +11,14 @@ export default defineComponent({ ...@@ -11,14 +11,14 @@ export default defineComponent({
}, },
setup() { setup() {
const managingUnitTableColumns = [ const managingUnitTableColumns = [
// { {
// name: 'index', name: 'index',
// field: 'index', field: 'index',
// required: true, required: true,
// label: 'STT', label: 'STT',
// align: 'center', align: 'center',
// sortable: false, sortable: false,
// }, },
{ {
name: 'unitCode', name: 'unitCode',
field: 'unitCode', field: 'unitCode',
......
...@@ -6,7 +6,7 @@ export default defineComponent({ ...@@ -6,7 +6,7 @@ export default defineComponent({
Pagination, Pagination,
}, },
setup() { setup() {
const dataTest = ref([]) const dataTest = ref([]);
const userTableColumnsArtist = [ const userTableColumnsArtist = [
{ {
required: true, required: true,
...@@ -92,22 +92,22 @@ export default defineComponent({ ...@@ -92,22 +92,22 @@ export default defineComponent({
const pageSize = ref(20); const pageSize = ref(20);
const totalPage = ref(10); const totalPage = ref(10);
const fullNameKeyword = ref(''); const fullNameKeyword = ref('');
const fieldOptionsMusic = ref([ const fieldOptions = ref([
{ id: 1, text: 'Thể thao' }, { id: 1, text: 'Thể thao' },
{ id: 2, text: 'Âm nhạc' }, { id: 2, text: 'Âm nhạc' },
]); ]);
const fieldSelectedMusic: Ref<number | undefined> = ref(); const fieldSelected: Ref<number | undefined> = ref();
const fieldOptionsDoChuyen = ref([ const professionOptions = ref([
{ id: 1, text: 'Chuyên nghiệp' }, { id: 1, text: 'Chuyên nghiệp' },
{ id: 2, text: 'Nghiệp dư' }, { id: 2, text: 'Nghiệp dư' },
]); ]);
const fieldSelectedDoChuyen: Ref<number | undefined> = ref(); const professionSelected: Ref<number | undefined> = ref();
const fieldOptionsRatings = ref([ const ratingOptions = ref([
{ id: 1, text: 'VIP_1' }, { id: 1, text: 'VIP_1' },
{ id: 2, text: 'VIP_2' }, { id: 2, text: 'VIP_2' },
]); ]);
const fieldSelectedRatings: Ref<number | undefined> = ref(); const ratingSelected: Ref<number | undefined> = ref();
const getListArtist = () => { const getListArtist = () => {
// const response = (await api({ // const response = (await api({
// url: API_PATHS.getListArtist, // url: API_PATHS.getListArtist,
// method: 'GET', // method: 'GET',
...@@ -118,6 +118,7 @@ export default defineComponent({ ...@@ -118,6 +118,7 @@ export default defineComponent({
// })) as AxiosResponse<BaseResponseBody<unknown>>; // })) as AxiosResponse<BaseResponseBody<unknown>>;
const fakeData: unknown[] = [ const fakeData: unknown[] = [
{ {
id: 1,
artistCode: '0001', artistCode: '0001',
fullName: 'Nguyễn Tùng Dương', fullName: 'Nguyễn Tùng Dương',
stageName: 'Tùng Dương', stageName: 'Tùng Dương',
...@@ -125,43 +126,46 @@ export default defineComponent({ ...@@ -125,43 +126,46 @@ export default defineComponent({
linhvuc: 'Âm nhạc', linhvuc: 'Âm nhạc',
work: 'Ca sĩ', work: 'Ca sĩ',
dochuyen: 'Chuyên nghiệp', dochuyen: 'Chuyên nghiệp',
ratings: 'VIP_1' ratings: 'VIP_1',
}, },
]; ];
userTableRowsArtist.value = fakeData; userTableRowsArtist.value = fakeData;
}; };
const filterListArtist = () => { const filterListArtist = () => {
// const response = (await api({ // const response = (await api({
// url: API_PATHS.filterListArtist, // url: API_PATHS.filterListArtist,
// method: 'GET', // method: 'GET',
// params: { // params: {
// unitName: fullNameKeyword.value, // unitName: fullNameKeyword.value,
// fieldName: fieldSelected.value, // fieldName: fieldSelected.value,
// }, // },
// })) as AxiosResponse<BaseResponseBody<unknown>>; // })) as AxiosResponse<BaseResponseBody<unknown>>;
// userTableRowsArtist.value = userTableRowsArtist.value.filter((item: unknown) => item.fullName = fullNameKeyword) // userTableRowsArtist.value = userTableRowsArtist.value.filter((item: unknown) => item.fullName = fullNameKeyword)
}; };
const changePageSize = () => { const changePageSize = () => {
pageIndex.value = 1; pageIndex.value = 1;
void getListArtist(); void getListArtist();
}; };
onMounted(() => { onMounted(() => {
void getListArtist(); void getListArtist();
}); });
return { userTableColumnsArtist, userTableRowsArtist, getListArtist, return {
pageIndex, userTableColumnsArtist,
pageSize, userTableRowsArtist,
filterListArtist, getListArtist,
dataTest, pageIndex,
totalPage, pageSize,
changePageSize, filterListArtist,
fullNameKeyword, dataTest,
fieldSelectedMusic, totalPage,
fieldOptionsMusic, changePageSize,
fieldSelectedDoChuyen, fullNameKeyword,
fieldOptionsDoChuyen, fieldSelected,
fieldSelectedRatings, fieldOptions,
fieldOptionsRatings, professionSelected,
}; professionOptions,
ratingSelected,
ratingOptions,
};
}, },
}); });
...@@ -11,19 +11,19 @@ ...@@ -11,19 +11,19 @@
</div> </div>
<div class="col-2" dense outlined> <div class="col-2" dense outlined>
<q-select <q-select
v-model="fieldSelectedMusic" v-model="fieldSelected"
:options="fieldOptionsMusic" :options="fieldOptions"
option-label="text" option-label="text"
option-value="id" option-value="id"
label="Lĩnh vực"
dense dense
outlined outlined
label="Lĩnh vực"
></q-select> ></q-select>
</div> </div>
<div class="col-2" dense outlined> <div class="col-2" dense outlined>
<q-select <q-select
v-model="fieldSelectedDoChuyen" v-model="professionSelected"
:options="fieldOptionsDoChuyen" :options="professionOptions"
option-label="text" option-label="text"
option-value="id" option-value="id"
dense dense
...@@ -33,8 +33,8 @@ ...@@ -33,8 +33,8 @@
</div> </div>
<div class="col-2" dense outlined> <div class="col-2" dense outlined>
<q-select <q-select
v-model="fieldSelectedRatings" v-model="ratingSelected"
:options="fieldOptionsRatings" :options="ratingOptions"
option-label="text" option-label="text"
option-value="id" option-value="id"
dense dense
...@@ -62,7 +62,28 @@ ...@@ -62,7 +62,28 @@
:no-data-label="$t('emptyData')" :no-data-label="$t('emptyData')"
row-key="name" row-key="name"
separator="cell" separator="cell"
hide-pagination
> >
<template v-slot:body-cell-action="item">
<q-td style="padding: 0" class="flex flex-center">
<q-btn
:to="`/nghe-sy/thong-tin-nghe-sy/${item.row.id}`"
flat
round
color="primary"
icon="mdi-information-outline"
>
<q-tooltip :offset="[20, 10]">{{
$t('userPage.toolTipMessage.informationUser')
}}</q-tooltip>
</q-btn>
<q-btn flat round color="primary" icon="mdi-account-edit-outline">
<q-tooltip :offset="[20, 10]">{{
$t('userPage.toolTipMessage.updateUserInfo')
}}</q-tooltip>
</q-btn>
</q-td>
</template>
</q-table> </q-table>
<div class="col-12 q-mt-sm"> <div class="col-12 q-mt-sm">
<Pagination <Pagination
......
<template>
<div class="q-mt-sm row q-col-gutter-sm">
<div class="col-12" width="100%">
<q-card>
<q-tabs
v-model="tab"
dense
class="text-grey"
active-color="primary"
indicator-color="primary"
align="justify"
narrow-indicator
>
<q-tab
name="information"
:label="$t('artist.artistInformation.tabLabel.personalInformation')"
/>
<q-tab
name="vabAccount"
:label="$t('artist.artistInformation.tabLabel.vabAccout')"
/>
<q-tab
name="bankAcount"
:label="$t('artist.artistInformation.tabLabel.bankAcount')"
/>
<q-tab
name="hotProduct"
:label="$t('artist.artistInformation.tabLabel.hotProduct')"
/>
</q-tabs>
<q-separator />
<q-tab-panels v-model="tab" animated>
<q-tab-panel name="information">
<PersonalInformation></PersonalInformation>
</q-tab-panel>
<q-tab-panel name="vabAccount">
<div class="text-h6">Alarms</div>
Lorem ipsum dolor sit amet consectetur adipisicing elit.
</q-tab-panel>
<q-tab-panel name="bankAcount">
<div class="text-h6">Movies</div>
Lorem ipsum dolor sit amet consectetur adipisicing elit.
</q-tab-panel>
<q-tab-panel name="hotProduct">
<div class="text-h6">Movies</div>
Lorem ipsum dolor sit amet consectetur adipisicing elit.
</q-tab-panel>
</q-tab-panels>
</q-card>
</div>
</div>
</template>
<script lang="ts" src="./informationArtist.ts"></script>
import { defineComponent, ref } from 'vue';
import PersonalInformation from '../../components/artist-information/personal-information/index.vue';
export default defineComponent({
components: {
PersonalInformation,
},
setup() {
const tab = ref('information');
return { tab };
},
});
...@@ -7,6 +7,7 @@ export enum Pages { ...@@ -7,6 +7,7 @@ export enum Pages {
cmsUser = 'nguoi-dung', cmsUser = 'nguoi-dung',
managingUnit = 'don-vi-chu-quan', managingUnit = 'don-vi-chu-quan',
artist = 'nghe-sy', artist = 'nghe-sy',
informationArtist = 'thong-tin-nghe-sy',
} }
const routes: RouteRecordRaw[] = [ const routes: RouteRecordRaw[] = [
...@@ -44,6 +45,11 @@ const routes: RouteRecordRaw[] = [ ...@@ -44,6 +45,11 @@ const routes: RouteRecordRaw[] = [
component: () => import('pages/nghe-sy/index.vue'), component: () => import('pages/nghe-sy/index.vue'),
name: Pages.artist, name: Pages.artist,
}, },
{
path: '/nghe-sy/thong-tin-nghe-sy/:id',
component: () => import('pages/thong-tin-nghe-sy/index.vue'),
name: Pages.informationArtist,
},
], ],
}, },
......
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