Commit cb44aac0 authored by Tình Trương's avatar Tình Trương

update

parent 38f4dc40
...@@ -473,6 +473,7 @@ export type ListConfigSystem = { ...@@ -473,6 +473,7 @@ export type ListConfigSystem = {
id: number; id: number;
namePage: string; namePage: string;
content: string; content: string;
numIndex: number;
url: string; url: string;
createTime?: string; createTime?: string;
createBy?: string; createBy?: string;
...@@ -484,6 +485,7 @@ export type DetailConfigSystem = { ...@@ -484,6 +485,7 @@ export type DetailConfigSystem = {
id: number; id: number;
namePage: string; namePage: string;
content: string; content: string;
numIndex: number;
url: string; url: string;
createTime?: string; createTime?: string;
createBy?: string; createBy?: string;
...@@ -496,6 +498,7 @@ export type UpdateConfigSystem = { ...@@ -496,6 +498,7 @@ export type UpdateConfigSystem = {
namePage: string; namePage: string;
content: string; content: string;
url: string; url: string;
numIndex: number;
createTime?: string; createTime?: string;
createBy?: string; createBy?: string;
updateTime?: string; updateTime?: string;
...@@ -506,10 +509,5 @@ export type AddConfigSystem = { ...@@ -506,10 +509,5 @@ export type AddConfigSystem = {
namePage: string; namePage: string;
content: string; content: string;
url: string; url: string;
}; numIndex: number;
export type EmbelType = {
id: number;
linkEmbed: string;
status: number;
}; };
...@@ -34,6 +34,7 @@ export default defineComponent({ ...@@ -34,6 +34,7 @@ export default defineComponent({
professionOptions: { type: Array, required: true }, professionOptions: { type: Array, required: true },
artistLevelOptions: { type: Array, required: true }, artistLevelOptions: { type: Array, required: true },
workOptions: { type: Array, required: true }, workOptions: { type: Array, required: true },
favoriteScore: { type: Number, required: true },
artistCodeRules: { type: Boolean, required: true }, artistCodeRules: { type: Boolean, required: true },
fullNameRules: { type: Boolean, required: true }, fullNameRules: { type: Boolean, required: true },
artistNameRules: { type: Boolean, required: true }, artistNameRules: { type: Boolean, required: true },
...@@ -173,6 +174,7 @@ export default defineComponent({ ...@@ -173,6 +174,7 @@ export default defineComponent({
'update:nationality', 'update:nationality',
'update:fields', 'update:fields',
'update:works', 'update:works',
'update:favoriteScore',
'update:qualification', 'update:qualification',
'update:artistLevel', 'update:artistLevel',
'update:hidden_img', 'update:hidden_img',
......
...@@ -308,6 +308,23 @@ ...@@ -308,6 +308,23 @@
></q-select> ></q-select>
</div> </div>
</div> </div>
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.favoriteScore') }}
<span style="color: red">*</span>
</div>
<div class="col-8">
<q-input
:model-value="favoriteScore"
@update:model-value="$emit('update:favoriteScore', $event)"
mask="#############"
class="q-my-sm"
outlined
dense
hide-bottom-space
></q-input>
</div>
</div>
</div> </div>
<div class="col-5 q-ml-xl"> <div class="col-5 q-ml-xl">
<div class="row flex-center"> <div class="row flex-center">
...@@ -428,17 +445,7 @@ ...@@ -428,17 +445,7 @@
></q-input> ></q-input>
</div> </div>
</div> </div>
<!-- check_infoBooking -->
<div class="row flex-center"> <div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.infoBooking') }}
</div>
<div class="col-8">
<q-checkbox v-model="check_infoBooking" class="q-my-sm"></q-checkbox>
</div>
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.userAdminister') }} {{ $t('artist.artistInformation.titleDataField.userAdminister') }}
<span style="color: red">*</span> <span style="color: red">*</span>
...@@ -447,7 +454,7 @@ ...@@ -447,7 +454,7 @@
<q-input class="q-my-sm" outlined dense hide-bottom-space></q-input> <q-input class="q-my-sm" outlined dense hide-bottom-space></q-input>
</div> </div>
</div> </div>
<div class="row flex-center" v-if="check_infoBooking"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ {{
$t('artist.artistInformation.titleDataField.phoneNumberAdminister') $t('artist.artistInformation.titleDataField.phoneNumberAdminister')
...@@ -468,7 +475,7 @@ ...@@ -468,7 +475,7 @@
></q-input> ></q-input>
</div> </div>
</div> </div>
<div class="row flex-center" v-if="check_infoBooking"> <div class="row flex-center">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.emailAdminister') }} {{ $t('artist.artistInformation.titleDataField.emailAdminister') }}
<span style="color: red">*</span> <span style="color: red">*</span>
...@@ -486,9 +493,45 @@ ...@@ -486,9 +493,45 @@
></q-input> ></q-input>
</div> </div>
</div> </div>
<!-- check_infoBooking -->
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.infoBooking') }}
</div>
<div class="col-8">
<q-checkbox v-model="check_infoBooking" class="q-my-sm"></q-checkbox>
</div>
</div>
<div class="row flex-center" v-if="check_infoBooking"> <div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.facebookMessage') }} {{ $t('artist.artistInformation.titleDataField.phoneNumberBooking') }}
<span style="color: red">*</span>
</div>
<div class="col-8">
<q-input
mask="##########"
class="q-my-sm"
outlined
dense
hide-bottom-space
></q-input>
</div>
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.emailBooking') }}
<span style="color: red">*</span>
</div>
<div class="col-8">
<q-input outlined class="q-my-sm" dense hide-bottom-space></q-input>
</div>
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium">
{{
$t('artist.artistInformation.titleDataField.facebookMessageBooking')
}}
</div> </div>
<div class="col-8"> <div class="col-8">
<q-input outlined class="q-my-sm" dense></q-input> <q-input outlined class="q-my-sm" dense></q-input>
...@@ -496,7 +539,7 @@ ...@@ -496,7 +539,7 @@
</div> </div>
<div class="row flex-center" v-if="check_infoBooking"> <div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.instagram') }} {{ $t('artist.artistInformation.titleDataField.instagramBooking') }}
</div> </div>
<div class="col-8"> <div class="col-8">
<q-input outlined class="q-my-sm" dense></q-input> <q-input outlined class="q-my-sm" dense></q-input>
...@@ -504,7 +547,7 @@ ...@@ -504,7 +547,7 @@
</div> </div>
<div class="row flex-center" v-if="check_infoBooking"> <div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium"> <div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.whatsapp') }} {{ $t('artist.artistInformation.titleDataField.whatsappBooking') }}
</div> </div>
<div class="col-8"> <div class="col-8">
<q-input outlined class="q-my-sm" dense></q-input> <q-input outlined class="q-my-sm" dense></q-input>
......
...@@ -41,8 +41,33 @@ ...@@ -41,8 +41,33 @@
:rules="namePageRules" :rules="namePageRules"
clearable clearable
></q-input> ></q-input>
<q-input
:model-value="numIndex"
@update:model-value="$emit('update:numIndex', $event)"
:label="$t('listConfigSystem.dialogLabel.fieldLabels.numIndex')"
class="q-my-sm"
type="text"
outlined
clearable
></q-input>
</div> </div>
<div class="col-6"> <div class="col-6">
<q-select
:model-value="nameMenu"
@update:model-value="$emit('update:nameMenu', $event)"
:label="$t('listConfigSystem.dialogLabel.fieldLabels.nameMenu')"
:rules="nameMenuRules"
:options="nameMenuOptions"
multiple
map-options
class="q-my-sm"
option-value="id"
option-label="name"
type="text"
outlined
use-chips
clearable
></q-select>
<q-input <q-input
:model-value="url" :model-value="url"
@update:model-value="$emit('update:url', $event)" @update:model-value="$emit('update:url', $event)"
...@@ -61,7 +86,7 @@ ...@@ -61,7 +86,7 @@
@update:model-value="$emit('update:content', $event)" @update:model-value="$emit('update:content', $event)"
ref="editorRef" ref="editorRef"
placeholder="Nội dung *" placeholder="Nội dung *"
style="min-height: 32rem" style="min-height: 28rem"
toolbar-text-color="white" toolbar-text-color="white"
toolbar-toggle-color="yellow-8" toolbar-toggle-color="yellow-8"
toolbar-bg="primary" toolbar-bg="primary"
...@@ -195,7 +220,10 @@ export default defineComponent({ ...@@ -195,7 +220,10 @@ export default defineComponent({
isUpdate: { type: Boolean, default: false }, isUpdate: { type: Boolean, default: false },
namePage: { type: String, required: true }, namePage: { type: String, required: true },
url: { type: String, required: true }, url: { type: String, required: true },
numIndex: { type: String, required: true },
content: { type: String, required: true }, content: { type: String, required: true },
nameMenu: { type: Number, required: true },
nameMenuOptions: { type: Array, required: true },
}, },
setup() { setup() {
const namePageRules = [ const namePageRules = [
...@@ -208,9 +236,15 @@ export default defineComponent({ ...@@ -208,9 +236,15 @@ export default defineComponent({
(val && val.trim().length) || (val && val.trim().length) ||
i18n.global.t('listConfigSystem.validateMessages.requireUrl'), i18n.global.t('listConfigSystem.validateMessages.requireUrl'),
]; ];
const nameMenuRules = [
(val?: number) =>
val !== undefined ||
i18n.global.t('listConfigSystem.validateMessages.requireNameMenu'),
];
return { return {
namePageRules, namePageRules,
urlRules, urlRules,
nameMenuRules,
ConfigSystemStatus, ConfigSystemStatus,
}; };
}, },
...@@ -218,6 +252,8 @@ export default defineComponent({ ...@@ -218,6 +252,8 @@ export default defineComponent({
'update:isOpened', 'update:isOpened',
'update:namePage', 'update:namePage',
'update:content', 'update:content',
'update:numIndex',
'update:nameMenu',
'update:url', 'update:url',
'click:CloseBtn', 'click:CloseBtn',
'addUpdateConfigSystem', 'addUpdateConfigSystem',
......
...@@ -408,6 +408,7 @@ export default { ...@@ -408,6 +408,7 @@ export default {
work: 'Công việc', work: 'Công việc',
qualification: 'Độ chuyên', qualification: 'Độ chuyên',
artistLevel: 'Xếp hạng', artistLevel: 'Xếp hạng',
favoriteScore: 'Số lượt thích',
action: 'Chức năng', action: 'Chức năng',
}, },
dialogLabel: { dialogLabel: {
...@@ -484,6 +485,7 @@ export default { ...@@ -484,6 +485,7 @@ export default {
work: 'Công việc', work: 'Công việc',
qualification: 'Độ chuyên', qualification: 'Độ chuyên',
artistLevel: 'Xếp hạng', artistLevel: 'Xếp hạng',
favoriteScore: 'Số lượt thích',
phoneNumber: 'Số điện thoại', phoneNumber: 'Số điện thoại',
email: 'Email', email: 'Email',
facebook: 'FB Page', facebook: 'FB Page',
...@@ -494,6 +496,11 @@ export default { ...@@ -494,6 +496,11 @@ export default {
infoBooking: 'Quản lý Booking', infoBooking: 'Quản lý Booking',
phoneNumberAdminister: 'Số điện thoại quản lý', phoneNumberAdminister: 'Số điện thoại quản lý',
emailAdminister: 'Email quản lý', emailAdminister: 'Email quản lý',
phoneNumberBooking: 'Liên hệ số điện thoại booking',
emailBooking: 'Liên hệ Email booking',
facebookMessageBooking: 'Truy cập facebook booking',
instagramBooking: 'Truy cập instagram booking',
whatsappBooking: 'Truy cập whatsapp booking',
}, },
validateMessages: { validateMessages: {
requireEmailAdminister: 'Vui lòng nhập Email người quản lý', requireEmailAdminister: 'Vui lòng nhập Email người quản lý',
...@@ -973,11 +980,10 @@ export default { ...@@ -973,11 +980,10 @@ export default {
titleColumnsTable: { titleColumnsTable: {
stt: 'STT', stt: 'STT',
namePage: 'Tên cấu hình', namePage: 'Tên cấu hình',
title: 'Tiêu đề', nameMenu: 'Tên menu',
url: 'Url target', url: 'Path',
content: 'Nội dung', content: 'Nội dung',
numIndex: 'Vị trí', numIndex: 'Vị trí',
status: 'Trạng thái',
action: 'Chức năng', action: 'Chức năng',
}, },
dialogLabel: { dialogLabel: {
...@@ -985,16 +991,16 @@ export default { ...@@ -985,16 +991,16 @@ export default {
titleUpdate: 'Cập nhập Cấu hình', titleUpdate: 'Cập nhập Cấu hình',
fieldLabels: { fieldLabels: {
namePage: 'Tên cấu hình *', namePage: 'Tên cấu hình *',
title: 'Tiêu đề *', nameMenu: 'Tên menu *',
url: 'Url target *', url: 'Path *',
numIndex: 'Vị trí', numIndex: 'Vị trí',
status: 'Trạng thái', status: 'Trạng thái',
}, },
}, },
validateMessages: { validateMessages: {
requireNamePage: 'Vui lòng nhập Tên Cấu hình', requireNamePage: 'Vui lòng nhập Tên Cấu hình',
requireTitle: 'Vui lòng nhập Tiêu đề', requireNameMenu: 'Vui lòng nhập Tên Cấu hình',
requireUrl: 'Vui lòng nhập Url target', requireUrl: 'Vui lòng nhập Path',
}, },
crudActions: { crudActions: {
save: 'Lưu', save: 'Lưu',
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
<td> <td>
<div class="ellipsis-3-lines"> <div class="ellipsis-3-lines">
<div v-html="!item.row.content ? '' : item.row.content"></div> <div v-html="!item.row.content ? '' : item.row.content"></div>
<q-tooltip :offset="[10, 10]" max-width="30%" <q-tooltip :offset="[10, 10]" max-width="26%"
><div v-html="!item.row.content ? '' : item.row.content"></div ><div v-html="!item.row.content ? '' : item.row.content"></div
></q-tooltip> ></q-tooltip>
</div> </div>
...@@ -123,7 +123,10 @@ ...@@ -123,7 +123,10 @@
v-model:isOpened="showDialogAdd" v-model:isOpened="showDialogAdd"
v-model:namePage="namePage" v-model:namePage="namePage"
v-model:content="content" v-model:content="content"
v-model:numIndex="numIndex"
v-model:url="url" v-model:url="url"
v-model:name-menu="nameMenu"
:nameMenuOptions="nameMenuOptions"
@addUpdateConfigSystem="addConfigSystem" @addUpdateConfigSystem="addConfigSystem"
/> />
...@@ -132,7 +135,10 @@ ...@@ -132,7 +135,10 @@
v-model:isOpened="showDialogUpdate" v-model:isOpened="showDialogUpdate"
v-model:namePage="namePage" v-model:namePage="namePage"
v-model:content="content" v-model:content="content"
v-model:numIndex="numIndex"
v-model:url="url" v-model:url="url"
v-model:name-menu="nameMenu"
:nameMenuOptions="nameMenuOptions"
@addUpdateConfigSystem="updateConfigSystem" @addUpdateConfigSystem="updateConfigSystem"
/> />
</div> </div>
...@@ -177,7 +183,16 @@ export default defineComponent({ ...@@ -177,7 +183,16 @@ export default defineComponent({
required: true, required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.namePage'), label: i18n.global.t('listConfigSystem.titleColumnsTable.namePage'),
align: 'left', align: 'left',
headerStyle: 'text-align: center !important; width: 11%', headerStyle: 'text-align: center !important; width: 12%',
sortable: false,
},
{
name: 'nameMenu',
field: 'nameMenu',
required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.nameMenu'),
align: 'left',
headerStyle: 'text-align: center !important; width: 12%',
sortable: false, sortable: false,
}, },
{ {
...@@ -186,7 +201,16 @@ export default defineComponent({ ...@@ -186,7 +201,16 @@ export default defineComponent({
required: true, required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.url'), label: i18n.global.t('listConfigSystem.titleColumnsTable.url'),
align: 'left', align: 'left',
headerStyle: 'text-align: center !important; width: 14%', headerStyle: 'text-align: center !important; width: 19%',
sortable: false,
},
{
name: 'numIndex',
field: 'numIndex',
required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.numIndex'),
align: 'left',
headerStyle: 'text-align: center !important; width: 10%',
sortable: false, sortable: false,
}, },
{ {
...@@ -194,7 +218,7 @@ export default defineComponent({ ...@@ -194,7 +218,7 @@ export default defineComponent({
field: 'content', field: 'content',
required: true, required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.content'), label: i18n.global.t('listConfigSystem.titleColumnsTable.content'),
headerStyle: 'text-align: center !important; width: 25%', headerStyle: 'text-align: center !important; width: 32%',
align: 'left', align: 'left',
sortable: false, sortable: false,
}, },
...@@ -203,7 +227,7 @@ export default defineComponent({ ...@@ -203,7 +227,7 @@ export default defineComponent({
field: 'action', field: 'action',
required: true, required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.action'), label: i18n.global.t('listConfigSystem.titleColumnsTable.action'),
headerStyle: 'text-align: center !important; width: 12%', headerStyle: 'text-align: center !important; width: 15%',
align: 'center', align: 'center',
sortable: false, sortable: false,
}, },
...@@ -221,8 +245,11 @@ export default defineComponent({ ...@@ -221,8 +245,11 @@ export default defineComponent({
const showDialogAdd = ref(false); const showDialogAdd = ref(false);
const showDialogUpdate = ref(false); const showDialogUpdate = ref(false);
const namePage: Ref<string> = ref(''); const namePage: Ref<string> = ref('');
const nameMenuOptions: Ref<unknown[]> = ref([]);
const nameMenu: Ref<unknown | undefined> = ref();
const url: Ref<string> = ref(''); const url: Ref<string> = ref('');
const content: Ref<string> = ref(''); const content: Ref<string> = ref('');
const numIndex: Ref<number | undefined> = ref(undefined);
const ConfigSystemId: Ref<number | undefined> = ref(undefined); const ConfigSystemId: Ref<number | undefined> = ref(undefined);
const getConfigSystem = async () => { const getConfigSystem = async () => {
...@@ -249,6 +276,8 @@ export default defineComponent({ ...@@ -249,6 +276,8 @@ export default defineComponent({
namePage.value = ''; namePage.value = '';
content.value = ''; content.value = '';
url.value = ''; url.value = '';
numIndex.value = undefined;
nameMenu.value = undefined;
showDialogAdd.value = true; showDialogAdd.value = true;
}; };
...@@ -256,7 +285,9 @@ export default defineComponent({ ...@@ -256,7 +285,9 @@ export default defineComponent({
const data = { const data = {
namePage: namePage.value, namePage: namePage.value,
url: url.value, url: url.value,
numIndex: numIndex.value,
content: content.value, content: content.value,
// nameMenu: { id: nameMenu.value?.id },
}; };
const response = (await api({ const response = (await api({
url: API_PATHS.addConfigSystem, url: API_PATHS.addConfigSystem,
...@@ -292,6 +323,8 @@ export default defineComponent({ ...@@ -292,6 +323,8 @@ export default defineComponent({
ConfigSystemId.value = response.data.data.id; ConfigSystemId.value = response.data.data.id;
namePage.value = response.data.data.namePage; namePage.value = response.data.data.namePage;
url.value = response.data.data.url; url.value = response.data.data.url;
numIndex.value = response.data.data.numIndex;
// nameMenu.value = response.data.data.nameMenu;
content.value = response.data.data.content; content.value = response.data.data.content;
} }
} catch (error) {} } catch (error) {}
...@@ -306,7 +339,9 @@ export default defineComponent({ ...@@ -306,7 +339,9 @@ export default defineComponent({
id: ConfigSystemId.value, id: ConfigSystemId.value,
namePage: namePage.value, namePage: namePage.value,
url: url.value, url: url.value,
numIndex: numIndex.value,
content: content.value, content: content.value,
// nameMenu: { id: nameMenu.value?.id },
}, },
})) as AxiosResponse<BaseResponseBody<UpdateConfigSystem>>; })) as AxiosResponse<BaseResponseBody<UpdateConfigSystem>>;
if (response.data.error.code === config.API_RES_CODE.OK.code) { if (response.data.error.code === config.API_RES_CODE.OK.code) {
...@@ -377,6 +412,9 @@ export default defineComponent({ ...@@ -377,6 +412,9 @@ export default defineComponent({
namePage, namePage,
content, content,
url, url,
numIndex,
nameMenu,
nameMenuOptions,
ConfigSystemId, ConfigSystemId,
showDialogAdd, showDialogAdd,
openAddDialog, openAddDialog,
......
...@@ -327,15 +327,15 @@ export default defineComponent({ ...@@ -327,15 +327,15 @@ export default defineComponent({
align: 'left', align: 'left',
sortable: false, sortable: false,
}, },
{ // {
name: 'favoriteScore', // name: 'favoriteScore',
field: 'favoriteScore', // field: 'favoriteScore',
required: true, // required: true,
label: i18n.global.t('listBooking.titleColumnsTable.favoriteScore'), // label: i18n.global.t('listBooking.titleColumnsTable.favoriteScore'),
headerStyle: 'text-align: center !important; width: 7%', // headerStyle: 'text-align: center !important; width: 7%',
align: 'center', // align: 'center',
sortable: false, // sortable: false,
}, // },
{ {
name: 'status', name: 'status',
field: 'status', field: 'status',
......
...@@ -276,6 +276,15 @@ export default defineComponent({ ...@@ -276,6 +276,15 @@ export default defineComponent({
align: 'left', align: 'left',
sortable: false, sortable: false,
}, },
{
name: 'favoriteScore',
field: 'favoriteScore',
required: true,
label: i18n.global.t('artist.tableColumnsArtist.favoriteScore'),
headerStyle: 'text-align: center !important;',
align: 'center',
sortable: false,
},
{ {
name: 'action', name: 'action',
field: 'action', field: 'action',
......
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