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
a7ebee48
Commit
a7ebee48
authored
May 04, 2022
by
Nguyễn Đức Thắng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
49c03dc8
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
545 additions
and
22 deletions
+545
-22
configurations.example.ts
src/assets/configurations.example.ts
+2
-0
type.ts
src/assets/type.ts
+11
-1
PersonalInformation.ts
...t-information/personal-information/PersonalInformation.ts
+5
-1
index.vue
...ponents/artist-information/personal-information/index.vue
+10
-5
index.vue
src/pages/nghe-sy/index.vue
+50
-9
AddArtist.ts
src/pages/them-nghe-sy/AddArtist.ts
+39
-6
index.vue
src/pages/them-nghe-sy/index.vue
+2
-0
index.vue
src/pages/xep-hang-nghe-sy/index.vue
+419
-0
routes.ts
src/router/routes.ts
+7
-0
No files found.
src/assets/configurations.example.ts
View file @
a7ebee48
...
@@ -20,6 +20,7 @@ export const config = {
...
@@ -20,6 +20,7 @@ export const config = {
export
enum
API_PATHS
{
export
enum
API_PATHS
{
login
=
'/user/login'
,
login
=
'/user/login'
,
getUserGroups
=
'/group/get_list'
,
getUserGroups
=
'/group/get_list'
,
getListPages
=
'/user/page/list'
,
getListPages
=
'/user/page/list'
,
getListGroupUsers
=
'/user/group/list'
,
getListGroupUsers
=
'/user/group/list'
,
...
@@ -38,6 +39,7 @@ export enum API_PATHS {
...
@@ -38,6 +39,7 @@ export enum API_PATHS {
getFieldOptions
=
'/field'
,
getFieldOptions
=
'/field'
,
getNationalityOptions
=
'/nationality'
,
getNationalityOptions
=
'/nationality'
,
getProvinceOptions
=
'/common/province'
,
getProvinceOptions
=
'/common/province'
,
getMusicTypeOptions
=
'/common/musicType'
,
getArtistLevelOptions
=
'/artistLevel'
,
getArtistLevelOptions
=
'/artistLevel'
,
getQualificationOptions
=
'/qualification'
,
getQualificationOptions
=
'/qualification'
,
getWorkOptions
=
'/work'
,
getWorkOptions
=
'/work'
,
...
...
src/assets/type.ts
View file @
a7ebee48
import
{
type
}
from
"os"
;
export
type
PaginationResponse
<
DataType
>
=
{
export
type
PaginationResponse
<
DataType
>
=
{
pageIndex
:
null
|
number
;
pageIndex
:
null
|
number
;
pageSize
:
null
|
number
;
pageSize
:
null
|
number
;
...
@@ -76,11 +78,19 @@ export type ArtistInfoType = {
...
@@ -76,11 +78,19 @@ export type ArtistInfoType = {
favoriteScore
:
number
;
favoriteScore
:
number
;
};
};
export
type
ProvinceType
=
{
export
type
ProvinceType
=
{
nam
:
string
,
nam
e
:
string
,
fullname
:
string
,
fullname
:
string
,
code
:
string
,
code
:
string
,
level
:
string
,
level
:
string
,
};
};
export
type
MusicType
=
{
id
:
number
,
name
:
string
,
status
:
number
,
code
:
string
,
numIndex
:
number
,
};
export
type
FieldType
=
{
export
type
FieldType
=
{
id
:
number
;
id
:
number
;
name
:
string
;
name
:
string
;
...
...
src/components/artist-information/personal-information/PersonalInformation.ts
View file @
a7ebee48
...
@@ -23,8 +23,9 @@ export default defineComponent({
...
@@ -23,8 +23,9 @@ export default defineComponent({
sex
:
{
type
:
Number
,
required
:
true
},
sex
:
{
type
:
Number
,
required
:
true
},
nationality
:
{
type
:
Object
as
PropType
<
NationalityType
>
,
required
:
true
},
nationality
:
{
type
:
Object
as
PropType
<
NationalityType
>
,
required
:
true
},
status
:
{
type
:
Number
,
required
:
true
},
status
:
{
type
:
Number
,
required
:
true
},
address
:
{
type
:
String
,
required
:
true
},
address
:
{
type
:
String
,
required
:
true
},
fields
:
{
type
:
Object
as
PropType
<
FieldType
>
,
required
:
true
},
fields
:
{
type
:
Object
as
PropType
<
FieldType
>
,
required
:
true
},
musics
:
{
type
:
String
,
required
:
true
},
works
:
{
type
:
Number
,
required
:
true
},
works
:
{
type
:
Number
,
required
:
true
},
qualification
:
{
type
:
Number
,
required
:
true
},
qualification
:
{
type
:
Number
,
required
:
true
},
artistLevel
:
{
type
:
Number
,
required
:
true
},
artistLevel
:
{
type
:
Number
,
required
:
true
},
...
@@ -43,6 +44,7 @@ export default defineComponent({
...
@@ -43,6 +44,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
},
musicOptions
:
{
type
:
Array
,
required
:
true
},
favoriteScore
:
{
type
:
Number
,
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
},
...
@@ -56,6 +58,7 @@ export default defineComponent({
...
@@ -56,6 +58,7 @@ export default defineComponent({
sexRules
:
{
type
:
Boolean
,
required
:
true
},
sexRules
:
{
type
:
Boolean
,
required
:
true
},
nationalityRules
:
{
type
:
Boolean
,
required
:
true
},
nationalityRules
:
{
type
:
Boolean
,
required
:
true
},
fieldRules
:
{
type
:
Boolean
,
required
:
true
},
fieldRules
:
{
type
:
Boolean
,
required
:
true
},
musicsRules
:
{
type
:
Boolean
,
required
:
true
},
workRules
:
{
type
:
Boolean
,
required
:
true
},
workRules
:
{
type
:
Boolean
,
required
:
true
},
qualificationRules
:
{
type
:
Boolean
,
required
:
true
},
qualificationRules
:
{
type
:
Boolean
,
required
:
true
},
artistLevelRules
:
{
type
:
Boolean
,
required
:
true
},
artistLevelRules
:
{
type
:
Boolean
,
required
:
true
},
...
@@ -207,6 +210,7 @@ export default defineComponent({
...
@@ -207,6 +210,7 @@ export default defineComponent({
'update:mnFbmess'
,
'update:mnFbmess'
,
'update:mnIns'
,
'update:mnIns'
,
'update:mnWhatsapp'
,
'update:mnWhatsapp'
,
'update:musics'
,
'addNewArtist'
,
'addNewArtist'
,
'SetAvatar'
,
'SetAvatar'
,
'deleteAvatar'
,
'deleteAvatar'
,
...
...
src/components/artist-information/personal-information/index.vue
View file @
a7ebee48
...
@@ -282,16 +282,21 @@
...
@@ -282,16 +282,21 @@
{{ $t('artist.artistInformation.titleDataField.type') }}
{{ $t('artist.artistInformation.titleDataField.type') }}
<span
style=
"color: red"
>
*
</span>
<span
style=
"color: red"
>
*
</span>
</div>
</div>
<!-- :model-value="types"
@update:model-value="$emit('update:types', $event)
"
<!-- :error="musicsRules
"
:error
="typeRules"
:error
-message="errorMessTypes" -->
:error-message="errorMessTypes"
:options="typeOptions" -->
<div
class=
"col-8"
>
<div
class=
"col-8"
>
<q-select
<q-select
:model-value=
"musics"
@
update:model-value=
"$emit('update:musics', $event)"
:options=
"musicOptions"
multiple
map-options
map-options
option-value=
"id"
option-value=
"id"
option-label=
"name"
option-label=
"name"
type=
"text"
class=
"q-my-sm"
class=
"q-my-sm"
outlined
outlined
hide-bottom-space
hide-bottom-space
...
...
src/pages/nghe-sy/index.vue
View file @
a7ebee48
...
@@ -35,18 +35,18 @@
...
@@ -35,18 +35,18 @@
clearable
clearable
></q-select>
></q-select>
</div>
</div>
<
!--
<
div
class=
"col-2"
dense
outlined
>
<div
class=
"col-2"
dense
outlined
>
<q-select
<q-select
v-model=
"
artistLevel
Selected"
v-model=
"
province
Selected"
:options=
"
artistLevel
Options"
:options=
"
province
Options"
option-label=
"
n
ame"
option-label=
"
fullN
ame"
option-value=
"
id
"
option-value=
"
name
"
dense
dense
outlined
outlined
label=
"
Xếp hạng
"
label=
"
Địa chỉ
"
clearable
clearable
></q-select>
></q-select>
</div>
-->
</div>
<div
class=
"col-auto"
>
<div
class=
"col-auto"
>
<q-btn
<q-btn
color=
"primary"
color=
"primary"
...
@@ -191,6 +191,8 @@ import {
...
@@ -191,6 +191,8 @@ import {
ArtistLevelType
,
ArtistLevelType
,
QualificationType
,
QualificationType
,
WorkType
,
WorkType
,
ProvinceType
,
MusicType
}
from
'src/assets/type'
;
}
from
'src/assets/type'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
...
@@ -319,10 +321,13 @@ export default defineComponent({
...
@@ -319,10 +321,13 @@ export default defineComponent({
const
nationalityOptions
:
Ref
<
NationalityType
[]
>
=
ref
([]);
const
nationalityOptions
:
Ref
<
NationalityType
[]
>
=
ref
([]);
const
professionOptions
:
Ref
<
QualificationType
[]
>
=
ref
([]);
const
professionOptions
:
Ref
<
QualificationType
[]
>
=
ref
([]);
const
artistLevelOptions
:
Ref
<
ArtistLevelType
[]
>
=
ref
([]);
const
artistLevelOptions
:
Ref
<
ArtistLevelType
[]
>
=
ref
([]);
const
provinceOptions
:
Ref
<
ProvinceType
[]
>
=
ref
([]);
const
musicOptions
:
Ref
<
MusicType
[]
>
=
ref
([]);
const
workOptions
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
workOptions
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
fieldSelected
:
Ref
<
FieldType
|
null
>
=
ref
(
null
);
const
fieldSelected
:
Ref
<
FieldType
|
null
>
=
ref
(
null
);
const
professionSelected
:
Ref
<
QualificationType
|
null
>
=
ref
(
null
);
const
professionSelected
:
Ref
<
QualificationType
|
null
>
=
ref
(
null
);
const
artistLevelSelected
:
Ref
<
ArtistLevelType
|
null
>
=
ref
(
null
);
const
artistLevelSelected
:
Ref
<
ArtistLevelType
|
null
>
=
ref
(
null
);
const
provinceSelected
:
Ref
<
ProvinceType
|
null
>
=
ref
(
null
);
const
isOpenNewArtistDialog
=
ref
(
false
);
const
isOpenNewArtistDialog
=
ref
(
false
);
const
id
:
Ref
<
number
>
=
ref
(
0
);
const
id
:
Ref
<
number
>
=
ref
(
0
);
const
artistCode
:
Ref
<
string
>
=
ref
(
''
);
const
artistCode
:
Ref
<
string
>
=
ref
(
''
);
...
@@ -364,7 +369,7 @@ export default defineComponent({
...
@@ -364,7 +369,7 @@ export default defineComponent({
name
:
fullNameKeyword
.
value
,
name
:
fullNameKeyword
.
value
,
field
:
fieldSelected
.
value
?.
id
,
field
:
fieldSelected
.
value
?.
id
,
qualification
:
professionSelected
.
value
?.
id
,
qualification
:
professionSelected
.
value
?.
id
,
a
rtistLevel
:
artistLevelSelected
.
value
?.
id
,
a
ddress
:
provinceSelected
.
value
?.
name
},
},
}))
as
AxiosResponse
<
}))
as
AxiosResponse
<
BaseResponseBody
<
PaginationResponse
<
ArtistInfoType
>>
BaseResponseBody
<
PaginationResponse
<
ArtistInfoType
>>
...
@@ -400,7 +405,8 @@ export default defineComponent({
...
@@ -400,7 +405,8 @@ export default defineComponent({
}
}
};
};
/// xếp hạng
const
getArtistLevelOptions
=
async
()
=>
{
const
getArtistLevelOptions
=
async
()
=>
{
const
response
=
(
await
api
({
const
response
=
(
await
api
({
url
:
API_PATHS
.
getArtistLevelOptions
,
url
:
API_PATHS
.
getArtistLevelOptions
,
...
@@ -411,6 +417,34 @@ export default defineComponent({
...
@@ -411,6 +417,34 @@ export default defineComponent({
artistLevelOptions
.
value
=
response
.
data
.
data
;
artistLevelOptions
.
value
=
response
.
data
.
data
;
}
}
};
};
// thể loại
const
getMusicTypeOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getMusicTypeOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
MusicType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
musicOptions
.
value
=
response
.
data
.
data
}
};
const
getProvinceOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getProvinceOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
ProvinceType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
){
provinceOptions
.
value
=
response
.
data
.
data
}
}
const
getQualificationOptions
=
async
()
=>
{
const
getQualificationOptions
=
async
()
=>
{
const
response
=
(
await
api
({
const
response
=
(
await
api
({
url
:
API_PATHS
.
getQualificationOptions
,
url
:
API_PATHS
.
getQualificationOptions
,
...
@@ -475,6 +509,8 @@ export default defineComponent({
...
@@ -475,6 +509,8 @@ export default defineComponent({
void
getArtistLevelOptions
();
void
getArtistLevelOptions
();
void
getQualificationOptions
();
void
getQualificationOptions
();
void
getWorkOptions
();
void
getWorkOptions
();
void
getProvinceOptions
();
void
getMusicTypeOptions
();
});
});
return
{
return
{
...
@@ -521,11 +557,16 @@ export default defineComponent({
...
@@ -521,11 +557,16 @@ export default defineComponent({
professionSelected
,
professionSelected
,
professionOptions
,
professionOptions
,
artistLevelSelected
,
artistLevelSelected
,
provinceSelected
,
artistLevelOptions
,
artistLevelOptions
,
provinceOptions
,
getProvinceOptions
,
getMusicTypeOptions
,
getFieldOptions
,
getFieldOptions
,
nationalityOptions
,
nationalityOptions
,
getNationalityOptions
,
getNationalityOptions
,
workOptions
,
workOptions
,
musicOptions
,
getArtistLevelOptions
,
getArtistLevelOptions
,
getQualificationOptions
,
getQualificationOptions
,
getWorkOptions
,
getWorkOptions
,
...
...
src/pages/them-nghe-sy/AddArtist.ts
View file @
a7ebee48
...
@@ -26,6 +26,7 @@ import {
...
@@ -26,6 +26,7 @@ import {
ArtistLevelType
,
ArtistLevelType
,
QualificationType
,
QualificationType
,
WorkType
,
WorkType
,
MusicType
,
BankAccountType
,
BankAccountType
,
ProductType
,
ProductType
,
BannerType
,
BannerType
,
...
@@ -34,7 +35,7 @@ import {
...
@@ -34,7 +35,7 @@ import {
CardBankType
,
CardBankType
,
TypeCardType
,
TypeCardType
,
FileUploadType
,
FileUploadType
,
ProvinceType
ProvinceType
,
}
from
'src/assets/type'
;
}
from
'src/assets/type'
;
export
type
AvatarType
=
{
export
type
AvatarType
=
{
...
@@ -81,6 +82,7 @@ export default defineComponent({
...
@@ -81,6 +82,7 @@ export default defineComponent({
const
cardBankOptions
:
Ref
<
CardBankType
[]
>
=
ref
([]);
const
cardBankOptions
:
Ref
<
CardBankType
[]
>
=
ref
([]);
const
typeBankOptions
:
Ref
<
TypeCardType
[]
>
=
ref
([]);
const
typeBankOptions
:
Ref
<
TypeCardType
[]
>
=
ref
([]);
const
workOptions
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
workOptions
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
musicOptions
:
Ref
<
MusicType
[]
>=
ref
([]);
const
provinceOptions
:
Ref
<
ProvinceType
[]
>
=
ref
([]);
const
provinceOptions
:
Ref
<
ProvinceType
[]
>
=
ref
([]);
const
sexOptions
=
ref
([
const
sexOptions
=
ref
([
{
id
:
1
,
name
:
'Nam'
},
{
id
:
1
,
name
:
'Nam'
},
...
@@ -111,9 +113,10 @@ export default defineComponent({
...
@@ -111,9 +113,10 @@ export default defineComponent({
const
mnEmail
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
mnEmail
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
qualification
:
Ref
<
QualificationType
|
null
>
=
ref
(
null
);
const
qualification
:
Ref
<
QualificationType
|
null
>
=
ref
(
null
);
const
artistLevel
:
Ref
<
ArtistLevelType
|
null
>
=
ref
(
null
);
const
artistLevel
:
Ref
<
ArtistLevelType
|
null
>
=
ref
(
null
);
const
address
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
address
:
Ref
<
ProvinceType
|
null
>
=
ref
(
null
);
const
status
:
Ref
<
number
>
=
ref
(
1
);
const
status
:
Ref
<
number
>
=
ref
(
1
);
const
fields
:
Ref
<
FieldType
|
null
>
=
ref
(
null
);
const
fields
:
Ref
<
FieldType
|
null
>
=
ref
(
null
);
const
musics
:
Ref
<
MusicType
|
null
>
=
ref
(
null
);
const
works
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
works
:
Ref
<
WorkType
[]
>
=
ref
([]);
const
phoneNumber
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
phoneNumber
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
email
:
Ref
<
string
|
null
>
=
ref
(
null
);
const
email
:
Ref
<
string
|
null
>
=
ref
(
null
);
...
@@ -162,6 +165,7 @@ export default defineComponent({
...
@@ -162,6 +165,7 @@ export default defineComponent({
const
nationalityRules
=
ref
(
false
);
const
nationalityRules
=
ref
(
false
);
const
fieldRules
=
ref
(
false
);
const
fieldRules
=
ref
(
false
);
const
workRules
=
ref
(
false
);
const
workRules
=
ref
(
false
);
const
musicRules
=
ref
(
false
);
const
qualificationRules
=
ref
(
false
);
const
qualificationRules
=
ref
(
false
);
const
artistLevelRules
=
ref
(
false
);
const
artistLevelRules
=
ref
(
false
);
const
errorMessEmail
=
ref
(
const
errorMessEmail
=
ref
(
...
@@ -235,7 +239,7 @@ export default defineComponent({
...
@@ -235,7 +239,7 @@ export default defineComponent({
}
}
);
);
watch
(
watch
(
()
=>
address
.
value
,
()
=>
address
,
(
value
)
=>
{
(
value
)
=>
{
if
(
value
)
{
if
(
value
)
{
addressRules
.
value
=
false
;
addressRules
.
value
=
false
;
...
@@ -298,6 +302,14 @@ export default defineComponent({
...
@@ -298,6 +302,14 @@ export default defineComponent({
}
}
}
}
);
);
watch
(
()
=>
musics
.
value
,
(
value
)
=>
{
if
(
value
)
{
musicRules
.
value
=
false
;
}
}
);
watch
(
watch
(
()
=>
qualification
.
value
,
()
=>
qualification
.
value
,
(
value
)
=>
{
(
value
)
=>
{
...
@@ -344,7 +356,6 @@ export default defineComponent({
...
@@ -344,7 +356,6 @@ export default defineComponent({
params
:
{},
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
ProvinceType
[]
>>
;
}))
as
AxiosResponse
<
BaseResponseBody
<
ProvinceType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
){
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
){
provinceOptions
.
value
=
response
.
data
.
data
provinceOptions
.
value
=
response
.
data
.
data
}
}
}
}
...
@@ -381,6 +392,20 @@ export default defineComponent({
...
@@ -381,6 +392,20 @@ export default defineComponent({
workOptions
.
value
=
response
.
data
.
data
;
workOptions
.
value
=
response
.
data
.
data
;
}
}
};
};
// thể loại
const
getMusicTypeOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getMusicTypeOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
MusicType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
musicOptions
.
value
=
response
.
data
.
data
}
};
const
getBankOptions
=
async
()
=>
{
const
getBankOptions
=
async
()
=>
{
const
response
=
(
await
api
({
const
response
=
(
await
api
({
url
:
API_PATHS
.
bankOptions
,
url
:
API_PATHS
.
bankOptions
,
...
@@ -765,14 +790,15 @@ export default defineComponent({
...
@@ -765,14 +790,15 @@ export default defineComponent({
url
:
API_PATHS
.
addArtist
,
url
:
API_PATHS
.
addArtist
,
method
:
'POST'
,
method
:
'POST'
,
data
:
{
data
:
{
musicTypeDto
:
musics
.
value
,
id
:
route
.
params
.
id
,
id
:
route
.
params
.
id
,
avatar
:
avatarUploaded
.
value
,
avatar
:
avatarUploaded
.
value
,
artistCode
:
artistCode
.
value
,
artistCode
:
artistCode
.
value
,
artistName
:
artistName
.
value
,
artistName
:
artistName
.
value
,
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
birthday
:
birthday
.
value
+
'
00:00:00'
,
birthday
:
birthday
.
value
+
'00:00:00'
,
sex
:
sex
.
value
,
sex
:
sex
.
value
,
address
:
address
.
value
,
address
:
address
.
value
?.
name
,
phoneNumber
:
phoneNumber
.
value
,
phoneNumber
:
phoneNumber
.
value
,
email
:
email
.
value
,
email
:
email
.
value
,
facebook
:
facebook
.
value
,
facebook
:
facebook
.
value
,
...
@@ -841,6 +867,7 @@ export default defineComponent({
...
@@ -841,6 +867,7 @@ export default defineComponent({
void
getBankOptions
();
void
getBankOptions
();
void
getTypeCardOptions
();
void
getTypeCardOptions
();
void
getProvinceOptions
();
void
getProvinceOptions
();
void
getMusicTypeOptions
()
});
});
return
{
return
{
hidden_img
,
hidden_img
,
...
@@ -857,6 +884,8 @@ export default defineComponent({
...
@@ -857,6 +884,8 @@ export default defineComponent({
status
,
status
,
fields
,
fields
,
works
,
works
,
musics
,
qualification
,
qualification
,
artistLevel
,
artistLevel
,
phoneNumber
,
phoneNumber
,
...
@@ -884,6 +913,8 @@ export default defineComponent({
...
@@ -884,6 +913,8 @@ export default defineComponent({
professionOptions
,
professionOptions
,
artistLevelOptions
,
artistLevelOptions
,
workOptions
,
workOptions
,
musicOptions
,
getFieldOptions
,
getFieldOptions
,
getNationalityOptions
,
getNationalityOptions
,
getArtistLevelOptions
,
getArtistLevelOptions
,
...
@@ -947,6 +978,7 @@ export default defineComponent({
...
@@ -947,6 +978,7 @@ export default defineComponent({
nationalityRules
,
nationalityRules
,
fieldRules
,
fieldRules
,
workRules
,
workRules
,
musicRules
,
qualificationRules
,
qualificationRules
,
artistLevelRules
,
artistLevelRules
,
errorMessEmail
,
errorMessEmail
,
...
@@ -956,6 +988,7 @@ export default defineComponent({
...
@@ -956,6 +988,7 @@ export default defineComponent({
check_infoBooking
,
check_infoBooking
,
getProvinceOptions
,
getProvinceOptions
,
provinceOptions
,
provinceOptions
,
getMusicTypeOptions
,
};
};
},
},
});
});
src/pages/them-nghe-sy/index.vue
View file @
a7ebee48
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
v-model:status=
"status"
v-model:status=
"status"
v-model:address=
"address"
v-model:address=
"address"
v-model:fields=
"fields"
v-model:fields=
"fields"
v-model:musics=
"musics"
v-model:works=
"works"
v-model:works=
"works"
v-model:qualification=
"qualification"
v-model:qualification=
"qualification"
v-model:artist-level=
"artistLevel"
v-model:artist-level=
"artistLevel"
...
@@ -89,6 +90,7 @@
...
@@ -89,6 +90,7 @@
:profession-options=
"professionOptions"
:profession-options=
"professionOptions"
:artist-level-options=
"artistLevelOptions"
:artist-level-options=
"artistLevelOptions"
:work-options=
"workOptions"
:work-options=
"workOptions"
:music-options=
"musicOptions"
@
SetAvatar=
"setAvatar($event)"
@
SetAvatar=
"setAvatar($event)"
@
deleteAvatar=
"deleteAvatar"
@
deleteAvatar=
"deleteAvatar"
@
UpdateBirtday=
"UpdateBirtday($event)"
@
UpdateBirtday=
"UpdateBirtday($event)"
...
...
src/pages/xep-hang-nghe-sy/index.vue
0 → 100644
View file @
a7ebee48
<
template
>
<div
class=
"row q-col-gutter-sm flex-center q-mt-sm"
>
<div
class=
"col-auto text-h6 text-weight-regular flex flex-center q-mr-md"
>
{{
$t
(
'customerRank.title'
)
}}
<q-separator
vertical
spaced
/>
</div>
<q-space></q-space>
<div
class=
"col-2"
>
<q-input
v-model=
"codeCustomerRank"
type=
"text"
dense
outlined
label=
"Mã xếp hạng"
clearable
></q-input>
</div>
<div
class=
"col-2"
>
<q-input
v-model=
"nameCustomerRank"
type=
"text"
dense
outlined
label=
"Tên xếp hạng"
clearable
></q-input>
</div>
<div
class=
"col-2"
>
<q-input
v-model=
"levelCustomerRank"
type=
"number"
dense
outlined
label=
"Loại xếp hạng"
clearable
></q-input>
</div>
<div
class=
"col-auto"
>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.search')"
@
click=
"getListCustomerRank"
style=
"width: 7.14rem"
></q-btn>
</div>
<div
class=
"col-auto"
>
<q-btn
color=
"primary"
no-caps
:label=
"$t('crudActions.add')"
style=
"width: 7.14rem"
@
click=
"openAddCustomerRankDialog"
>
</q-btn>
</div>
<div
class=
"col-12 q-mt-sm"
>
<q-table
:rows=
"customerRankTableRows"
:columns=
"customerRankTableColumns"
row-key=
"customerRankCode"
separator=
"cell"
:no-data-label=
"$t('emptyData')"
:rows-per-page-label=
"$t('recordPerPage')"
:pagination=
"
{
rowsPerPage: 0,
}"
wrap-cells
hide-pagination
class="sticky-header-table"
>
<template
v-slot:body-cell-stt=
"item"
>
<q-td
:item=
"item"
>
{{
1
+
item
.
rowIndex
+
pageSize
*
(
pageIndex
-
1
)
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-action=
"item"
>
<q-td
style=
"padding: 0"
class=
"flex flex-center"
>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-account-edit-outline"
@
click=
"openUpdateCustomerRankDialog(item.row.id)"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
$t
(
'customerRank.toolTipMessage.updateCustomerRankInfo'
)
}}
</q-tooltip>
</q-btn>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-delete-outline"
@
click=
"confirmDeleteCustomerRank(item.row.id)"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
$t
(
'customerRank.toolTipMessage.deleteCustomerRank'
)
}}
</q-tooltip>
</q-btn>
</q-td>
</
template
>
<
template
v-slot:body-cell-status=
"rowData"
>
<q-td>
<div
align=
"center"
>
<q-chip
:color=
"
rowData.value === CustomerRankStatus.active
? 'positive'
: 'orange'
"
text-color=
"white"
size=
"sm"
>
{{
rowData
.
value
===
CustomerRankStatus
.
active
?
$t
(
'customerRank.statusLabel.active'
)
:
$t
(
'customerRank.statusLabel.inactive'
)
}}
</q-chip>
</div>
</q-td>
</
template
>
</q-table>
</div>
<AddUpdateCustomerRankDialog
v-model:isOpened=
"addCustomerRankDialogIsOpened"
v-model:code=
"code"
v-model:name=
"name"
v-model:level=
"level"
v-model:status=
"status"
isUpdate
@
saveCustomerRankInfo=
"addNewCustomer"
/>
<AddUpdateCustomerRankDialog
v-model:isOpened=
"updateCustomerRankDialogIsOpened"
v-model:code=
"code"
v-model:name=
"name"
v-model:level=
"level"
v-model:status=
"status"
@
saveCustomerRankInfo=
"updateNewCustomer"
/>
</div>
</template>
<
script
lang=
"ts"
>
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
{
API_PATHS
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
CustomerRank
,
AddCustomerRank
,
DetailCustomerRank
,
UpdateCustomerRank
,
}
from
'src/assets/type'
;
import
{
config
}
from
'src/assets/configurations.example'
;
import
{
CustomerRankStatus
}
from
'src/assets/enums'
;
import
AddUpdateCustomerRankDialog
from
'components/add-update-customer-rank/index.vue'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
export
default
defineComponent
({
components
:
{
AddUpdateCustomerRankDialog
,
},
setup
()
{
const
customerRankTableColumns
=
[
{
name
:
'stt'
,
field
:
'stt'
,
required
:
true
,
label
:
'STT'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'code'
,
field
:
'code'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customerRank.tableColumnsCustomerRank.code'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'name'
,
field
:
'name'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customerRank.tableColumnsCustomerRank.name'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'level'
,
field
:
'level'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customerRank.tableColumnsCustomerRank.level'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'status'
,
field
:
'status'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customerRank.tableColumnsCustomerRank.status'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'action'
,
field
:
'action'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'customerRank.tableColumnsCustomerRank.action'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'center'
,
sortable
:
false
,
},
];
const
customerRankTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
addCustomerRankDialogIsOpened
=
ref
(
false
);
const
updateCustomerRankDialogIsOpened
=
ref
(
false
);
const
code
=
ref
(
''
);
const
name
=
ref
(
''
);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
totalPage
=
ref
(
0
);
const
level
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
status
:
Ref
<
number
>
=
ref
(
CustomerRankStatus
.
active
);
const
customerRankId
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
nameCustomerRank
=
ref
(
''
);
const
levelCustomerRank
:
Ref
<
number
|
undefined
>
=
ref
(
undefined
);
const
codeCustomerRank
=
ref
(
''
);
const
changePageSize
=
()
=>
{
pageIndex
.
value
=
1
;
void
getListCustomerRank
();
};
//gọi api ds
const
getListCustomerRank
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getListCustomersRank
,
method
:
'GET'
,
params
:
{
name
:
nameCustomerRank
.
value
,
level
:
levelCustomerRank
.
value
,
code
:
codeCustomerRank
.
value
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
CustomerRank
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
customerRankTableRows
.
value
=
response
.
data
.
data
;
}
};
const
confirmDeleteCustomerRank
=
(
id
:
number
)
=>
{
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
'customerRank.confirmActionsTitle.confirmDeleteCustomerRankTitle'
),
message
:
i18n
.
global
.
t
(
'customerRank.confirmActionsTitle.confirmDeleteCustomerRankContent'
),
cancel
:
i18n
.
global
.
t
(
'customerRank.confirmActionsTitle.confirmDeleteCustomerRankCancelBtnLabel'
),
color
:
'negative'
,
}).
onOk
(()
=>
{
void
deleteCustomerRank
(
id
);
});
};
//gói api xóa
const
deleteCustomerRank
=
async
(
id
:
number
)
=>
{
try
{
const
deleteResult
=
(
await
api
({
url
:
API_PATHS
.
deleteCustomerRank
,
method
:
'GET'
,
params
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
unknown
>>
;
if
(
deleteResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'customerRank.actionMessages.deleteCustomerRankAccess'
),
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
void
getListCustomerRank
();
}
}
catch
(
error
)
{}
};
const
openAddCustomerRankDialog
=
()
=>
{
code
.
value
=
''
;
name
.
value
=
''
;
level
.
value
=
undefined
;
status
.
value
=
CustomerRankStatus
.
active
;
addCustomerRankDialogIsOpened
.
value
=
true
;
};
//gọi api add
const
addNewCustomer
=
async
()
=>
{
const
data
=
{
name
:
name
.
value
,
code
:
code
.
value
,
level
:
level
.
value
,
status
:
status
.
value
,
};
const
response
=
(
await
api
({
url
:
API_PATHS
.
addCustomerRank
,
method
:
'POST'
,
data
,
}))
as
AxiosResponse
<
BaseResponseBody
<
AddCustomerRank
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
addCustomerRankDialogIsOpened
.
value
=
false
;
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'customerRank.actionMessages.addNewCustomerRankAccess'
),
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
void
getListCustomerRank
();
}
};
const
openUpdateCustomerRankDialog
=
(
id
:
number
)
=>
{
void
getDetailCustomerRank
(
id
);
updateCustomerRankDialogIsOpened
.
value
=
true
;
};
//gọi api detail
const
getDetailCustomerRank
=
async
(
id
:
number
)
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getDetailCustomerRank
,
method
:
'GET'
,
params
:
{
id
:
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
DetailCustomerRank
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
customerRankId
.
value
=
response
.
data
.
data
.
id
;
name
.
value
=
response
.
data
.
data
.
name
;
code
.
value
=
response
.
data
.
data
.
code
;
level
.
value
=
response
.
data
.
data
.
level
;
status
.
value
=
response
.
data
.
data
.
status
;
}
}
catch
(
error
)
{}
};
//gọi api update
const
updateNewCustomer
=
async
()
=>
{
const
data
=
{
id
:
customerRankId
.
value
,
name
:
name
.
value
,
code
:
code
.
value
,
level
:
level
.
value
,
status
:
status
.
value
,
};
const
response
=
(
await
api
({
url
:
API_PATHS
.
updateCustomerRank
,
method
:
'POST'
,
data
,
}))
as
AxiosResponse
<
BaseResponseBody
<
UpdateCustomerRank
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
updateCustomerRankDialogIsOpened
.
value
=
false
;
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'customerRank.actionMessages.updateCustomerRankAccess'
),
actions
:
[{
icon
:
'close'
,
color
:
'white'
}],
});
void
getListCustomerRank
();
}
};
onMounted
(()
=>
{
void
getListCustomerRank
();
});
return
{
pageSize
,
totalPage
,
changePageSize
,
pageIndex
,
addCustomerRankDialogIsOpened
,
updateCustomerRankDialogIsOpened
,
customerRankTableColumns
,
customerRankTableRows
,
getListCustomerRank
,
CustomerRankStatus
,
openAddCustomerRankDialog
,
code
,
name
,
level
,
status
,
addNewCustomer
,
confirmDeleteCustomerRank
,
deleteCustomerRank
,
openUpdateCustomerRankDialog
,
getDetailCustomerRank
,
updateNewCustomer
,
nameCustomerRank
,
levelCustomerRank
,
codeCustomerRank
,
};
},
});
</
script
>
src/router/routes.ts
View file @
a7ebee48
...
@@ -7,10 +7,12 @@ export enum Pages {
...
@@ -7,10 +7,12 @@ 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
=
'cap-nhat-thong-tin-nghe-sy'
,
informationArtist
=
'cap-nhat-thong-tin-nghe-sy'
,
customer
=
'khach-hang'
,
customer
=
'khach-hang'
,
addArtist
=
'them-nghe-sy'
,
addArtist
=
'them-nghe-sy'
,
customerRank
=
'xep-hang-khach-hang'
,
customerRank
=
'xep-hang-khach-hang'
,
artistRank
=
'Xep-hang-nghi-sy'
,
field
=
'linh-vuc-hoat-dong'
,
field
=
'linh-vuc-hoat-dong'
,
post
=
'bai-viet'
,
post
=
'bai-viet'
,
postCategory
=
'danh-muc-bai-viet'
,
postCategory
=
'danh-muc-bai-viet'
,
...
@@ -70,6 +72,11 @@ const routes: RouteRecordRaw[] = [
...
@@ -70,6 +72,11 @@ const routes: RouteRecordRaw[] = [
component
:
()
=>
import
(
'pages/them-nghe-sy/index.vue'
),
component
:
()
=>
import
(
'pages/them-nghe-sy/index.vue'
),
name
:
Pages
.
addArtist
,
name
:
Pages
.
addArtist
,
},
},
{
path
:
'/xep-hang-nghe-sy'
,
component
:
()
=>
import
(
'pages/xep-hang-nghe-sy/index.vue'
),
name
:
Pages
.
artistRank
},
{
{
path
:
'/khach-hang'
,
path
:
'/khach-hang'
,
component
:
()
=>
import
(
'pages/khach-hang/index.vue'
),
component
:
()
=>
import
(
'pages/khach-hang/index.vue'
),
...
...
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