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
Expand all
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
This diff is collapsed.
Click to expand it.
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