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
d32877b5
Commit
d32877b5
authored
May 04, 2021
by
Võ Quang Thành Đạt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
a4742087
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
248 additions
and
121 deletions
+248
-121
NewArtistDialog.ts
...tist-information/add-new-artist-dialog/NewArtistDialog.ts
+98
-55
index.vue
...onents/artist-information/add-new-artist-dialog/index.vue
+43
-41
index.ts
src/i18n/vi/index.ts
+17
-0
artist.ts
src/pages/nghe-sy/artist.ts
+64
-23
index.vue
src/pages/nghe-sy/index.vue
+26
-2
No files found.
src/components/artist-information/add-new-artist-dialog/NewArtistDialog.ts
View file @
d32877b5
...
@@ -14,110 +14,153 @@ export default defineComponent({
...
@@ -14,110 +14,153 @@ export default defineComponent({
artistName
:
{
type
:
String
,
required
:
true
},
artistName
:
{
type
:
String
,
required
:
true
},
birthday
:
{
type
:
String
,
required
:
true
},
birthday
:
{
type
:
String
,
required
:
true
},
sex
:
{
type
:
Number
,
required
:
true
},
sex
:
{
type
:
Number
,
required
:
true
},
nationality
:
{
type
:
String
,
required
:
true
},
nationality
:
{
type
:
Number
,
required
:
true
},
status
:
{
type
:
Number
,
required
:
true
},
status
:
{
type
:
Number
,
required
:
true
},
address
:
{
type
:
String
,
required
:
true
},
address
:
{
type
:
String
,
required
:
true
},
field
:
{
type
:
String
,
required
:
true
},
field
:
{
type
:
Number
,
required
:
true
},
work
:
{
type
:
String
,
required
:
true
},
work
:
{
type
:
Number
,
required
:
true
},
qualification
:
{
type
:
String
,
required
:
true
},
qualification
:
{
type
:
Number
,
required
:
true
},
artistLevel
:
{
type
:
String
,
required
:
true
},
artistLevel
:
{
type
:
Number
,
required
:
true
},
phoneNumber
:
{
type
:
String
,
required
:
true
},
phoneNumber
:
{
type
:
String
,
required
:
true
},
email
:
{
type
:
String
,
required
:
true
},
email
:
{
type
:
String
,
required
:
true
},
facebook
:
{
type
:
String
,
required
:
true
},
facebook
:
{
type
:
String
,
required
:
true
},
facebookMessage
:
{
type
:
String
,
required
:
true
},
facebookMessage
:
{
type
:
String
,
required
:
true
},
instagram
:
{
type
:
String
,
required
:
true
},
instagram
:
{
type
:
String
,
required
:
true
},
whatsapp
:
{
type
:
String
,
required
:
true
},
whatsapp
:
{
type
:
String
,
required
:
true
},
sexOptions
:
{
type
:
Array
,
required
:
true
},
fieldOptions
:
{
type
:
Array
,
required
:
true
},
nationalityOptions
:
{
type
:
Array
,
required
:
true
},
professionOptions
:
{
type
:
Array
,
required
:
true
},
artistLevelOptions
:
{
type
:
Array
,
required
:
true
},
workOptions
:
{
type
:
Array
,
required
:
true
},
},
},
setup
()
{
setup
()
{
const
userNam
eRules
=
[
const
artistCod
eRules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customer.validateMessages.requireUserName'
),
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireArtistCode'
),
];
];
const
customer
NameRules
=
[
const
full
NameRules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customer.validateMessages.requireCustomerName'
),
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireFullName'
),
];
];
const
business
NameRules
=
[
const
artist
NameRules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customer.validateMessages.requireBusinessName'
),
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireArtistName'
),
];
];
const
taxCode
Rules
=
[
const
birthday
Rules
=
[
(
val
?:
number
)
=>
(
val
?:
string
)
=>
val
!==
undefined
||
val
!==
undefined
||
i18n
.
global
.
t
(
'customer.validateMessages.requireTaxCode'
),
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireBirthday'
),
];
];
const
phone
Rules
=
[
const
email
Rules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'
customer.validateMessages.requirePhone
'
),
i18n
.
global
.
t
(
'
artist.artistInformation.validateMessages.requireEmail
'
),
(
val
:
string
)
=>
(
val
:
string
)
=>
is
MobilePhone
(
val
)
||
is
Email
(
val
)
||
i18n
.
global
.
t
(
'
customer.validateMessages.isPhone
'
),
i18n
.
global
.
t
(
'
artist.artistInformation.validateMessages.isEmail
'
),
];
];
const
email
Rules
=
[
const
address
Rules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customer.validateMessages.requireEmail'
),
i18n
.
global
.
t
(
(
val
:
string
)
=>
'artist.artistInformation.validateMessages.requireAddress'
isEmail
(
val
)
||
i18n
.
global
.
t
(
'customer.validateMessages.isEmail'
),
),
];
];
const
address
Rules
=
[
const
phoneNumber
Rules
=
[
(
val
?:
string
)
=>
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'customer.validateMessages.requireAddress'
),
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requirePhoneNumber'
),
(
val
:
string
)
=>
isMobilePhone
(
val
)
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.isPhone'
),
];
];
const
businessType
Rules
=
[
const
sex
Rules
=
[
(
val
?:
number
)
=>
(
val
?:
number
)
=>
val
!==
undefined
||
val
!==
undefined
||
i18n
.
global
.
t
(
'
customer.validateMessages.requireBusinessType
'
),
i18n
.
global
.
t
(
'
artist.artistInformation.validateMessages.requireSex
'
),
];
];
const
ratings
Rules
=
[
const
nationality
Rules
=
[
(
val
?:
number
)
=>
(
val
?:
number
)
=>
val
!==
undefined
||
val
!==
undefined
||
i18n
.
global
.
t
(
'customer.validateMessages.requireRatings'
),
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireNationality'
),
];
];
const
representative
Rules
=
[
const
field
Rules
=
[
(
val
?:
string
)
=>
(
val
?:
number
)
=>
(
val
&&
val
.
trim
().
length
)
||
val
!==
undefined
||
i18n
.
global
.
t
(
'
customer.validateMessages.requireRepresentative
'
),
i18n
.
global
.
t
(
'
artist.artistInformation.validateMessages.requireField
'
),
];
];
const
positionRules
=
[
const
workRules
=
[
(
val
?:
string
)
=>
(
val
?:
number
)
=>
(
val
&&
val
.
trim
().
length
)
||
val
!==
undefined
||
i18n
.
global
.
t
(
'customer.validateMessages.requiredPosition'
),
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requiredWork'
),
];
const
qualificationRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireQualification'
),
];
const
artistLevelRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'artist.artistInformation.validateMessages.requireArtistLevel'
),
];
];
return
{
return
{
userNam
eRules
,
artistCod
eRules
,
customer
NameRules
,
full
NameRules
,
business
NameRules
,
artist
NameRules
,
taxCode
Rules
,
birthday
Rules
,
emailRules
,
emailRules
,
ratingsRules
,
addressRules
,
addressRules
,
businessTypeRules
,
phoneNumberRules
,
representativeRules
,
sexRules
,
positionRules
,
nationalityRules
,
phoneRules
,
fieldRules
,
workRules
,
qualificationRules
,
artistLevelRules
,
};
};
},
},
emits
:
[
emits
:
[
'update:isOpenNewArtistDialog'
,
'update:isOpenNewArtistDialog'
,
'click:CloseBtn'
,
'click:CloseBtn'
,
'update:
userNam
e'
,
'update:
artistCod
e'
,
'update:
customer
Name'
,
'update:
full
Name'
,
'update:
business
Name'
,
'update:
artist
Name'
,
'update:
taxCode
'
,
'update:
birthday
'
,
'update:email'
,
'update:email'
,
'update:ratings'
,
'update:facebook'
,
'update:facebookMessage'
,
'update:instagram'
,
'update:whatsapp'
,
'update:address'
,
'update:address'
,
'update:businessType'
,
'update:phoneNumber'
,
'update:representative'
,
'update:sex'
,
'update:position'
,
'update:nationality'
,
'update:phone'
,
'update:field'
,
'update:work'
,
'update:qualification'
,
'update:artistLevel'
,
'update:status'
,
'update:status'
,
'addNew
Customer
'
,
'addNew
Artist
'
,
],
],
});
});
src/components/artist-information/add-new-artist-dialog/index.vue
View file @
d32877b5
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
@
update:model-value=
"$emit('update:isOpenNewArtistDialog', $event)"
@
update:model-value=
"$emit('update:isOpenNewArtistDialog', $event)"
>
>
<q-card
style=
"min-width: 900px"
bordered
>
<q-card
style=
"min-width: 900px"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"$emit('addNew
Customer
')"
>
<q-form
greedy
@
submit
.
prevent=
"$emit('addNew
Artist
')"
>
<q-card-section>
<q-card-section>
<q-item>
<q-item>
<q-item-section>
<q-item-section>
...
@@ -22,22 +22,22 @@
...
@@ -22,22 +22,22 @@
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-input
<q-input
:model-value=
"artistCode"
:model-value=
"artistCode"
@
update:model-value=
"$emit('update:
businessNam
e', $event)"
@
update:model-value=
"$emit('update:
artistCod
e', $event)"
:label=
"
:label=
"
$t('artist.artistInformation.titleDataField.artistCode')
$t('artist.artistInformation.titleDataField.artistCode')
"
"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"
businessNam
eRules"
:rules=
"
artistCod
eRules"
hide-bottom-space
hide-bottom-space
clearable
clearable
></q-input>
></q-input>
<q-input
<q-input
:model-value=
"fullName"
:model-value=
"fullName"
@
update:model-value=
"$emit('update:
user
Name', $event)"
@
update:model-value=
"$emit('update:
full
Name', $event)"
:label=
"$t('artist.artistInformation.titleDataField.fullName')"
:label=
"$t('artist.artistInformation.titleDataField.fullName')"
:rules=
"
user
NameRules"
:rules=
"
full
NameRules"
hide-bottom-space
hide-bottom-space
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
...
@@ -46,82 +46,78 @@
...
@@ -46,82 +46,78 @@
></q-input>
></q-input>
<q-input
<q-input
:model-value=
"artistName"
:model-value=
"artistName"
@
update:model-value=
"$emit('update:
customer
Name', $event)"
@
update:model-value=
"$emit('update:
artist
Name', $event)"
:label=
"
:label=
"
$t('artist.artistInformation.titleDataField.artistName')
$t('artist.artistInformation.titleDataField.artistName')
"
"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"
customer
NameRules"
:rules=
"
artist
NameRules"
hide-bottom-space
hide-bottom-space
clearable
clearable
></q-input>
></q-input>
<q-input
<q-input
:model-value=
"birthday"
:model-value=
"birthday"
@
update:model-value=
"$emit('update:
customerName
', $event)"
@
update:model-value=
"$emit('update:
birthday
', $event)"
:label=
"$t('artist.artistInformation.titleDataField.birthday')"
:label=
"$t('artist.artistInformation.titleDataField.birthday')"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"
customerName
Rules"
:rules=
"
birthday
Rules"
hide-bottom-space
hide-bottom-space
clearable
clearable
></q-input>
></q-input>
<q-input
<q-input
:model-value=
"email"
:model-value=
"email"
@
update:model-value=
"$emit('update:
customerName
', $event)"
@
update:model-value=
"$emit('update:
email
', $event)"
:label=
"$t('artist.artistInformation.titleDataField.email')"
:label=
"$t('artist.artistInformation.titleDataField.email')"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"
customerName
Rules"
:rules=
"
email
Rules"
hide-bottom-space
hide-bottom-space
clearable
clearable
></q-input>
></q-input>
<q-input
<q-input
:model-value=
"facebook"
:model-value=
"facebook"
@
update:model-value=
"$emit('update:
customerName
', $event)"
@
update:model-value=
"$emit('update:
facebook
', $event)"
:label=
"$t('artist.artistInformation.titleDataField.facebook')"
:label=
"$t('artist.artistInformation.titleDataField.facebook')"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"customerNameRules"
hide-bottom-space
hide-bottom-space
clearable
clearable
></q-input>
></q-input>
<q-input
<q-input
:model-value=
"facebookMessage"
:model-value=
"facebookMessage"
@
update:model-value=
"$emit('update:
customerNam
e', $event)"
@
update:model-value=
"$emit('update:
facebookMessag
e', $event)"
:label=
"
:label=
"
$t('artist.artistInformation.titleDataField.facebookMessage')
$t('artist.artistInformation.titleDataField.facebookMessage')
"
"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"customerNameRules"
hide-bottom-space
hide-bottom-space
clearable
clearable
></q-input>
></q-input>
<q-input
<q-input
:model-value=
"instagram"
:model-value=
"instagram"
@
update:model-value=
"$emit('update:
customerName
', $event)"
@
update:model-value=
"$emit('update:
instagram
', $event)"
:label=
"$t('artist.artistInformation.titleDataField.instagram')"
:label=
"$t('artist.artistInformation.titleDataField.instagram')"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"customerNameRules"
hide-bottom-space
hide-bottom-space
clearable
clearable
></q-input>
></q-input>
<q-input
<q-input
:model-value=
"whatsapp"
:model-value=
"whatsapp"
@
update:model-value=
"$emit('update:
customerName
', $event)"
@
update:model-value=
"$emit('update:
whatsapp
', $event)"
:label=
"$t('artist.artistInformation.titleDataField.whatsapp')"
:label=
"$t('artist.artistInformation.titleDataField.whatsapp')"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"customerNameRules"
hide-bottom-space
hide-bottom-space
clearable
clearable
></q-input>
></q-input>
...
@@ -130,37 +126,38 @@
...
@@ -130,37 +126,38 @@
<div
class=
"col-6"
>
<div
class=
"col-6"
>
<q-input
<q-input
:model-value=
"address"
:model-value=
"address"
@
update:model-value=
"$emit('update:
customerName
', $event)"
@
update:model-value=
"$emit('update:
address
', $event)"
:label=
"$t('artist.artistInformation.titleDataField.address')"
:label=
"$t('artist.artistInformation.titleDataField.address')"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"
customerName
Rules"
:rules=
"
address
Rules"
hide-bottom-space
hide-bottom-space
clearable
clearable
></q-input>
></q-input>
<q-input
<q-input
:model-value=
"phoneNumber"
:model-value=
"phoneNumber"
@
update:model-value=
"$emit('update:
customerName
', $event)"
@
update:model-value=
"$emit('update:
phoneNumber
', $event)"
:label=
"
:label=
"
$t('artist.artistInformation.titleDataField.phoneNumber')
$t('artist.artistInformation.titleDataField.phoneNumber')
"
"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
:rules=
"
customerName
Rules"
:rules=
"
phoneNumber
Rules"
hide-bottom-space
hide-bottom-space
clearable
clearable
></q-input>
></q-input>
<q-select
<q-select
:model-value=
"sex"
:model-value=
"sex"
@
update:model-value=
"$emit('update:
businessType
', $event)"
@
update:model-value=
"$emit('update:
sex
', $event)"
:label=
"$t('artist.artistInformation.titleDataField.sex')"
:label=
"$t('artist.artistInformation.titleDataField.sex')"
:rules=
"businessTypeRules"
:rules=
"sexRules"
:options=
"sexOptions"
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
...
@@ -169,15 +166,16 @@
...
@@ -169,15 +166,16 @@
></q-select>
></q-select>
<q-select
<q-select
:model-value=
"nationality"
:model-value=
"nationality"
@
update:model-value=
"$emit('update:
businessType
', $event)"
@
update:model-value=
"$emit('update:
nationality
', $event)"
:label=
"
:label=
"
$t('artist.artistInformation.titleDataField.nationality')
$t('artist.artistInformation.titleDataField.nationality')
"
"
:rules=
"businessTypeRules"
:options=
"nationalityOptions"
:rules=
"nationalityRules"
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
...
@@ -186,13 +184,14 @@
...
@@ -186,13 +184,14 @@
></q-select>
></q-select>
<q-select
<q-select
:model-value=
"field"
:model-value=
"field"
@
update:model-value=
"$emit('update:
businessType
', $event)"
@
update:model-value=
"$emit('update:
field
', $event)"
:label=
"$t('artist.artistInformation.titleDataField.field')"
:label=
"$t('artist.artistInformation.titleDataField.field')"
:rules=
"businessTypeRules"
:rules=
"fieldRules"
:options=
"fieldOptions"
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
...
@@ -201,13 +200,14 @@
...
@@ -201,13 +200,14 @@
></q-select>
></q-select>
<q-select
<q-select
:model-value=
"work"
:model-value=
"work"
@
update:model-value=
"$emit('update:
businessType
', $event)"
@
update:model-value=
"$emit('update:
work
', $event)"
:label=
"$t('artist.artistInformation.titleDataField.work')"
:label=
"$t('artist.artistInformation.titleDataField.work')"
:rules=
"businessTypeRules"
:rules=
"workRules"
:options=
"workOptions"
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
...
@@ -216,15 +216,16 @@
...
@@ -216,15 +216,16 @@
></q-select>
></q-select>
<q-select
<q-select
:model-value=
"qualification"
:model-value=
"qualification"
@
update:model-value=
"$emit('update:
businessType
', $event)"
@
update:model-value=
"$emit('update:
qualification
', $event)"
:label=
"
:label=
"
$t('artist.artistInformation.titleDataField.qualification')
$t('artist.artistInformation.titleDataField.qualification')
"
"
:rules=
"businessTypeRules"
:rules=
"qualificationRules"
:options=
"professionOptions"
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
...
@@ -233,15 +234,16 @@
...
@@ -233,15 +234,16 @@
></q-select>
></q-select>
<q-select
<q-select
:model-value=
"artistLevel"
:model-value=
"artistLevel"
@
update:model-value=
"$emit('update:
businessType
', $event)"
@
update:model-value=
"$emit('update:
artistLevel
', $event)"
:label=
"
:label=
"
$t('artist.artistInformation.titleDataField.artistLevel')
$t('artist.artistInformation.titleDataField.artistLevel')
"
"
:rules=
"businessTypeRules"
:rules=
"artistLevelRules"
:options=
"artistLevelOptions"
emit-value
emit-value
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
type=
"text"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
...
...
src/i18n/vi/index.ts
View file @
d32877b5
...
@@ -269,6 +269,23 @@ export default {
...
@@ -269,6 +269,23 @@ export default {
instagram
:
'Instagram'
,
instagram
:
'Instagram'
,
whatsapp
:
'Whatsapp'
,
whatsapp
:
'Whatsapp'
,
},
},
validateMessages
:
{
requireArtistCode
:
'Vui lòng nhập mã nghệ sỹ'
,
requireFullName
:
'Vui lòng nhập họ tên nghệ sỹ'
,
requireArtistName
:
'Vui lòng nhập nghệ danh'
,
requireBirthday
:
'Vui lòng chọn ngày sinh'
,
requireEmail
:
'Vui lòng nhập email'
,
isEmail
:
'Email không hợp lệ'
,
requireAddress
:
'Vui lòng nhập địa chỉ'
,
requirePhoneNumber
:
'Vui lòng nhập số điện thoại'
,
isPhone
:
'Số điện thoại không hợp lệ'
,
requireSex
:
'Vui lòng chọn giới tính'
,
requireNationality
:
'Vui lòng chọn quốc tịch'
,
requireField
:
'Vui lòng chọn lĩnh vực'
,
requiredWork
:
'Vui lòng chọn công việc'
,
requireQualification
:
'Vui lòng chọn độ chuyên'
,
requireArtistLevel
:
'Vui lòng chọn xếp hạng'
,
},
},
},
bankAccount
:
{
bankAccount
:
{
tableColumnsBank
:
{
tableColumnsBank
:
{
...
...
src/pages/nghe-sy/artist.ts
View file @
d32877b5
...
@@ -114,17 +114,17 @@ export default defineComponent({
...
@@ -114,17 +114,17 @@ 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
sexOptions
=
ref
([
{
id
:
1
,
name
:
'Nam'
},
{
id
:
2
,
name
:
'Nữ'
},
]);
const
fieldOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
fieldOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
nationalityOptions
:
Ref
<
NationalityType
[]
>
=
ref
([]);
const
professionOptions
:
Ref
<
QualificationType
[]
>
=
ref
([]);
const
artistLevelOptions
:
Ref
<
ArtistLevelType
[]
>
=
ref
([]);
const
workOptions
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
fieldSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
fieldSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
professionOptions
=
ref
([
{
id
:
1
,
text
:
'Chuyên nghiệp'
},
{
id
:
2
,
text
:
'Nghiệp dư'
},
]);
const
professionSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
professionSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
artistLevelOptions
=
ref
([
{
id
:
1
,
text
:
'VIP_1'
},
{
id
:
2
,
text
:
'VIP_2'
},
]);
const
artistLevelSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
artistLevelSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
isOpenNewArtistDialog
=
ref
(
false
);
const
isOpenNewArtistDialog
=
ref
(
false
);
...
@@ -134,13 +134,13 @@ export default defineComponent({
...
@@ -134,13 +134,13 @@ export default defineComponent({
const
artistName
:
Ref
<
string
|
undefined
>
=
ref
();
const
artistName
:
Ref
<
string
|
undefined
>
=
ref
();
const
birthday
:
Ref
<
string
|
undefined
>
=
ref
();
const
birthday
:
Ref
<
string
|
undefined
>
=
ref
();
const
sex
:
Ref
<
number
|
undefined
>
=
ref
();
const
sex
:
Ref
<
number
|
undefined
>
=
ref
();
const
nationality
:
Ref
<
string
|
undefined
>
=
ref
();
const
nationality
:
Ref
<
number
|
undefined
>
=
ref
();
const
address
:
Ref
<
string
|
undefined
>
=
ref
();
const
address
:
Ref
<
string
|
undefined
>
=
ref
();
const
status
:
Ref
<
number
>
=
ref
(
1
);
const
status
:
Ref
<
number
>
=
ref
(
1
);
const
field
:
Ref
<
string
|
undefined
>
=
ref
();
const
field
:
Ref
<
number
|
undefined
>
=
ref
();
const
work
:
Ref
<
string
|
undefined
>
=
ref
();
const
work
:
Ref
<
number
|
undefined
>
=
ref
();
const
qualification
:
Ref
<
string
|
undefined
>
=
ref
();
const
qualification
:
Ref
<
number
|
undefined
>
=
ref
();
const
artistLevel
:
Ref
<
string
|
undefined
>
=
ref
();
const
artistLevel
:
Ref
<
number
|
undefined
>
=
ref
();
const
phoneNumber
:
Ref
<
string
|
undefined
>
=
ref
();
const
phoneNumber
:
Ref
<
string
|
undefined
>
=
ref
();
const
email
:
Ref
<
string
|
undefined
>
=
ref
();
const
email
:
Ref
<
string
|
undefined
>
=
ref
();
const
facebook
:
Ref
<
string
|
undefined
>
=
ref
();
const
facebook
:
Ref
<
string
|
undefined
>
=
ref
();
...
@@ -194,19 +194,53 @@ export default defineComponent({
...
@@ -194,19 +194,53 @@ export default defineComponent({
}
}
};
};
// const getNationalityOptions = async () => {
const
getNationalityOptions
=
async
()
=>
{
// const response = (await api({
const
response
=
(
await
api
({
// url: API_PATHS.getFieldOptions,
url
:
API_PATHS
.
getNationalityOptions
,
// method: 'GET',
method
:
'GET'
,
// params: {},
params
:
{},
// })) as AxiosResponse<BaseResponseBody<NationalityType[]>>;
}))
as
AxiosResponse
<
BaseResponseBody
<
NationalityType
[]
>>
;
// if (response.data.error.code === config.API_RES_CODE.OK.code) {
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
// fieldOptions.value = response.data.data;
nationalityOptions
.
value
=
response
.
data
.
data
;
// }
}
// };
};
const
getArtistLevelOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getArtistLevelOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
ArtistLevelType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
artistLevelOptions
.
value
=
response
.
data
.
data
;
}
};
const
getQualificationOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getQualificationOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
QualificationType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
professionOptions
.
value
=
response
.
data
.
data
;
}
};
const
getWorkOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getWorkOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
WorkType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
workOptions
.
value
=
response
.
data
.
data
;
}
};
onMounted
(()
=>
{
onMounted
(()
=>
{
void
getListArtists
();
void
getListArtists
();
void
getFieldOptions
();
void
getFieldOptions
();
void
getNationalityOptions
();
void
getArtistLevelOptions
();
void
getQualificationOptions
();
void
getWorkOptions
();
});
});
return
{
return
{
userTableColumnsArtist
,
userTableColumnsArtist
,
...
@@ -234,6 +268,7 @@ export default defineComponent({
...
@@ -234,6 +268,7 @@ export default defineComponent({
facebookMessage
,
facebookMessage
,
instagram
,
instagram
,
whatsapp
,
whatsapp
,
sexOptions
,
filterListArtist
,
filterListArtist
,
totalPage
,
totalPage
,
changePageSize
,
changePageSize
,
...
@@ -245,6 +280,12 @@ export default defineComponent({
...
@@ -245,6 +280,12 @@ export default defineComponent({
artistLevelSelected
,
artistLevelSelected
,
artistLevelOptions
,
artistLevelOptions
,
getFieldOptions
,
getFieldOptions
,
nationalityOptions
,
getNationalityOptions
,
workOptions
,
getArtistLevelOptions
,
getQualificationOptions
,
getWorkOptions
,
};
};
},
},
});
});
src/pages/nghe-sy/index.vue
View file @
d32877b5
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<q-select
<q-select
v-model=
"professionSelected"
v-model=
"professionSelected"
:options=
"professionOptions"
:options=
"professionOptions"
option-label=
"
text
"
option-label=
"
name
"
option-value=
"id"
option-value=
"id"
dense
dense
outlined
outlined
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<q-select
<q-select
v-model=
"artistLevelSelected"
v-model=
"artistLevelSelected"
:options=
"artistLevelOptions"
:options=
"artistLevelOptions"
option-label=
"
text
"
option-label=
"
name
"
option-value=
"id"
option-value=
"id"
dense
dense
outlined
outlined
...
@@ -101,6 +101,30 @@
...
@@ -101,6 +101,30 @@
</div>
</div>
<AddNewArtistDialog
<AddNewArtistDialog
v-model:is-open-new-artist-dialog=
"isOpenNewArtistDialog"
v-model:is-open-new-artist-dialog=
"isOpenNewArtistDialog"
artistCode
v-model:full-name=
"fullName"
v-model:artist-name=
"artistName"
v-model:birthday=
"birthday"
v-model:sex=
"sex"
v-model:nationality=
"nationality"
v-model:status=
"status"
v-model:address=
"address"
v-model:field=
"field"
v-model:work=
"work"
v-model:qualification=
"qualification"
v-model:artist-level=
"artistLevel"
v-model:phone-number=
"phoneNumber"
v-model:email=
"email"
v-model:facebook=
"facebook"
v-model:facebook-message=
"facebookMessage"
v-model:instagram=
"instagram"
v-model:whatsapp=
"whatsapp"
:sex-options=
"sexOptions"
:field-options=
"fieldOptions"
:nationality-options=
"nationalityOptions"
:profession-options=
"professionOptions"
:artist-level-options=
"artistLevelOptions"
:work-options=
"workOptions"
@
click:CloseBtn=
"isOpenNewArtistDialog = false"
@
click:CloseBtn=
"isOpenNewArtistDialog = false"
></AddNewArtistDialog>
></AddNewArtistDialog>
</div>
</div>
...
...
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