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
13f24b20
Commit
13f24b20
authored
Nov 29, 2022
by
Nguyễn Đức Thắng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c8126d40
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
393 additions
and
18 deletions
+393
-18
index.vue
...ponents/artist-information/personal-information/index.vue
+1
-0
index.vue
src/components/configSystem/index.vue
+1
-4
index.vue
...components/units-manager/add-update-unit-dialog/index.vue
+84
-12
index.vue
...s/units-manager/them-danh-sach-nghe-si-tru-quan/index.vue
+281
-0
index.vue
...components/units-manager/unit-add-update-artist/index.vue
+3
-2
index.vue
src/pages/don-vi-chu-quan/index.vue
+23
-0
No files found.
src/components/artist-information/personal-information/index.vue
View file @
13f24b20
...
...
@@ -186,6 +186,7 @@
style=
"width: 100%"
v-model=
"BirthdayDatePicker"
first-day-of-week=
"1"
locale=
"vi"
></q-date>
<q-card-actions
align=
"right"
>
...
...
src/components/configSystem/index.vue
View file @
13f24b20
...
...
@@ -419,8 +419,7 @@ export default defineComponent({
},
},
setup
()
{
const
selectedFile
=
()
=>
{
const
selectedFile
=
()
=>
{
// eslint-disable-next-line
// @ts-ignore
// eslint-disable-next-line
...
...
@@ -460,7 +459,6 @@ export default defineComponent({
(val && val.trim().length) ||
i18n.global.t('listConfigSystem.validateMessages.requireUrl'),
];
return {
namePageRules,
...
...
@@ -472,7 +470,6 @@ export default defineComponent({
};
},
emits: [
'update:isOpened',
'update:namePage',
...
...
src/components/units-manager/add-update-unit-dialog/index.vue
View file @
13f24b20
...
...
@@ -32,7 +32,7 @@
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-6"
>
<q-input
:model-value=
"userName"
:model-value=
"userName"
@
update:model-value=
"$emit('update:userName', $event)"
:label=
"`$
{$t('loginPage.usernameInputLabel')} *`"
:rules="usernameInputRules"
...
...
@@ -44,7 +44,7 @@
<q-input
:model-value=
"password"
@
update:model-value=
"$emit('update:password', $event)"
@
update:model-value=
"$emit('update:password', $event)"
:label=
"`$
{$t('loginPage.passwordInputLabel')} *`"
:rules="passwordInputRules"
class="q-my-sm"
...
...
@@ -59,7 +59,6 @@
@
click=
"isPwd = !isPwd"
/>
</
template
>
</q-input>
<q-input
...
...
@@ -128,12 +127,12 @@
:rules=
"addressRules"
clearable
></q-input>
<q-select
:model-value=
"fields"
@
update:model-value=
"$emit('update:fields', $event)"
label=
"Phân loại"
:options=
"fieldsOptions"
map-options
option-value=
"id"
option-label=
"name"
...
...
@@ -171,6 +170,15 @@
</div>
<q-space></q-space>
<div
class=
"col-auto"
>
<!-- <q-btn
color="primary"
no-caps
label="Thêm nghệ sỹ từ danh sách"
class="q-mr-sm"
@click="openAddListArtistDialog"
>
</q-btn> -->
<q-btn
color=
"primary"
no-caps
...
...
@@ -347,10 +355,17 @@
v-model:contractTimeTo=
"contractTimeTo"
:artistOptions=
"artistOptions"
:fieldOptions=
"fieldsOptions"
:fieldsAddOptions=
"fieldsAddOptions"
isUpdate
@
saveArtistInfo=
"addNewArtist"
/>
<UnitAddListUpdateArtistDialog
@
saveConfigListArtist=
"saveConfigListArtist"
v-model:isOpened=
"addListArtistDialogIsOpened"
@
toggle=
"addListArtistDialogIsOpened = !addListArtistDialogIsOpened"
/>
<UnitAddUpdateArtistDialog
v-model:isOpened=
"updateArtistDialogIsOpened"
v-model:artistField=
"artistField"
...
...
@@ -360,6 +375,7 @@
v-model:contractTimeTo=
"contractTimeTo"
:artistOptions=
"artistOptions"
:fieldOptions=
"fieldsOptions"
:fieldsAddOptions=
"fieldsAddOptions"
@
saveArtistInfo=
"updateArtistContract"
/>
...
...
@@ -400,8 +416,14 @@ import { isMobilePhone } from '../../../boot/functions';
import
{
API_PATHS
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
FieldType
,
ArtistInfoType
,
Contract
,
ClassificationOptions
}
from
'src/assets/type'
;
import
{
FieldType
,
ArtistInfoType
,
Contract
,
ClassificationOptions
,
}
from
'src/assets/type'
;
import
{
config
}
from
'src/assets/configurations.example'
;
import
UnitAddListUpdateArtistDialog
from
'../them-danh-sach-nghe-si-tru-quan/index.vue'
;
import
UnitAddUpdateArtistDialog
from
'../unit-add-update-artist/index.vue'
;
import
UnitAddUpdateBankAccountDialog
from
'../unit-add-update-bank-account/index.vue'
;
import
moment
from
'moment'
;
...
...
@@ -534,7 +556,11 @@ const bankAccountTableColumns = [
];
export
default
defineComponent
({
components
:
{
UnitAddUpdateArtistDialog
,
UnitAddUpdateBankAccountDialog
},
components
:
{
UnitAddUpdateArtistDialog
,
UnitAddUpdateBankAccountDialog
,
UnitAddListUpdateArtistDialog
,
},
props
:
{
isOpened
:
{
type
:
Boolean
,
...
...
@@ -543,6 +569,8 @@ export default defineComponent({
check_artistList
:
{
type
:
Boolean
,
required
:
true
},
isUpdate
:
{
type
:
Boolean
,
default
:
false
},
fieldsOptions
:
{
type
:
Array
,
required
:
true
},
fieldsAddOptions
:
{
type
:
Array
,
required
:
true
},
fields
:
{
type
:
Number
,
required
:
true
},
code
:
{
type
:
String
,
required
:
true
},
name
:
{
type
:
String
,
required
:
true
},
...
...
@@ -555,13 +583,15 @@ export default defineComponent({
status
:
{
type
:
Number
,
required
:
true
},
artistList
:
{
type
:
Array
as
PropType
<
unknown
[]
>
,
required
:
true
},
bankAccountList
:
{
type
:
Array
as
PropType
<
unknown
[]
>
,
required
:
true
},
},
setup
(
props
,
context
)
{
const
addArtistDialogIsOpened
=
ref
(
false
);
const
addListArtistDialogIsOpened
=
ref
(
false
);
const
updateArtistDialogIsOpened
=
ref
(
false
);
const
fieldsAddOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
fieldsOptions
:
Ref
<
ClassificationOptions
[]
>
=
ref
([]);
const
fieldsOptions
:
Ref
<
ClassificationOptions
[]
>
=
ref
([]);
const
artistOptions
:
Ref
<
ArtistInfoType
[]
>
=
ref
([]);
const
artistField
:
Ref
<
{
id
:
number
;
name
:
string
}
|
undefined
>
=
ref
(
undefined
);
...
...
@@ -687,7 +717,7 @@ export default defineComponent({
}
);
//gọi api lĩnh vực
//gọi api lĩnh vực
const
getClassificationOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getClassificationOptions
,
...
...
@@ -699,6 +729,19 @@ export default defineComponent({
}
};
const
getFieldOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getFieldOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
FieldType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
fieldsAddOptions
.
value
=
response
.
data
.
data
;
}
};
//gọi api nghệ sỹ
const
getArtistDicitionaryOptions
=
async
(
data
:
{
...
...
@@ -738,6 +781,27 @@ export default defineComponent({
// console.log(Object);
};
const
saveConfigListArtist
=
(
item
:
[])
=>
{
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const
artistList
=
[];
for
(
let
i
=
0
;
i
<
item
.
length
;
i
++
)
{
// artistList.push({
// // contractFrom: `${contractTimeFrom.value} 00:00:00`,
// // contractTo: `${contractTimeTo.value} 00:00:00`,
// // timeAdd: `${contractTimeFrom.value} - ${contractTimeTo.value}`,
// // status: artistStatus.value,
// // artistId: artistName.value?.id,
// // artistName: artistName.value?.artistName,
// // artistFullName: artistName.value?.fullName,
// // field: artistField.value?.name,
// });
console
.
log
(
item
[
i
],
'item[i]'
)
}
// console.log(artistList, 'artistList')
};
const
updateNewBankAccount
=
()
=>
{
// console.log(Object);
};
...
...
@@ -751,6 +815,10 @@ export default defineComponent({
contractTimeFrom
.
value
=
''
;
contractTimeTo
.
value
=
''
;
};
// danh sách nghệ sỹ
const
openAddListArtistDialog
=
()
=>
{
addListArtistDialogIsOpened
.
value
=
true
;
};
const
openUpdateArtistDialog
=
(
artist
:
Contract
,
index
:
number
)
=>
{
selectedContract
.
value
=
{
artist
,
index
};
...
...
@@ -793,6 +861,7 @@ export default defineComponent({
const
addNewArtist
=
()
=>
{
const
newArtistList
=
[...
props
.
artistList
];
newArtistList
.
push
({
contractFrom
:
`
${
contractTimeFrom
.
value
}
00:00:00`
,
contractTo
:
`
${
contractTimeTo
.
value
}
00:00:00`
,
...
...
@@ -804,6 +873,7 @@ export default defineComponent({
field
:
artistField
.
value
?.
name
,
});
context
.
emit
(
'update:artistList'
,
[...
newArtistList
]);
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
...
...
@@ -841,12 +911,15 @@ export default defineComponent({
onMounted
(()
=>
{
void
getClassificationOptions
();
void
getFieldOptions
()
});
return
{
getFieldOptions
,
getClassificationOptions
,
getArtistDicitionaryOptions
,
addArtistDialogIsOpened
,
addListArtistDialogIsOpened
,
codeRules
,
nameRules
,
representativeRules
,
...
...
@@ -863,6 +936,7 @@ export default defineComponent({
contractTimeTo
,
addNewArtist
,
openAddArtistDialog
,
openAddListArtistDialog
,
updateArtistContract
,
updateArtistDialogIsOpened
,
openUpdateArtistDialog
,
...
...
@@ -879,15 +953,13 @@ export default defineComponent({
bankOptions
,
cardTypeOptions
,
addNewBankAccount
,
saveConfigListArtist
,
openAddBankAccountDialog
,
updateBankAccountDialogIsOpened
,
updateNewBankAccount
,
usernameInputRules
,
passwordInputRules
,
isPwd
:
ref
(
true
),
};
},
emits
:
[
...
...
src/components/units-manager/them-danh-sach-nghe-si-tru-quan/index.vue
0 → 100644
View file @
13f24b20
<
template
>
<q-dialog
persistent
:model-value=
"isOpened"
@
update:model-value=
"$emit('update:isOpened', $event)"
>
<q-card
class=
"full-width"
style=
"max-width: 85.71rem"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"
$emit('saveConfigListArtist', selected);
$emit('update:isOpened', false);
"
>
<q-card-section
class=
"q-pa-none"
>
<q-item>
<q-item-section>
<q-item-label
class=
"text-h6 text-weight-regular"
>
Danh sách nhân sự
</q-item-label>
</q-item-section>
</q-item>
</q-card-section>
<q-separator
/>
<q-card-section
class=
"overflow-auto"
style=
"max-height: calc(100vh - 10rem)"
>
<div
class=
"col-12 q-mt-sm"
>
<q-table
:rows=
"userTableRowsArtist"
:columns=
"userTableColumnsArtist"
row-key=
"id"
:no-data-label=
"$t('emptyData')"
:rows-per-page-label=
"$t('recordPerPage')"
:pagination=
"
{
rowsPerPage: 0,
}"
wrap-cells
hide-pagination
class="sticky-header-table"
:selected-rows-label="getSelectedString"
selection="multiple"
v-model:selected="selected"
>
<template
v-slot:body-cell-stt=
"item"
>
<q-td
:item=
"item"
style=
"text-align: center"
>
{{
1
+
item
.
rowIndex
+
pageSize
*
(
pageIndex
-
1
)
}}
</q-td>
</
template
>
<
template
v-slot:body-cell-avatar=
"avatar"
>
<q-td
style=
"padding: auto; height: 100%; text-align: center"
>
<q-img
style=
"width: 5rem; height: 6rem"
:src=
"
avatar.row.avatar
? configImg.API_IMAGE_ENDPOINT + avatar.row.avatar
: avatar.row.avatar
"
></q-img>
</q-td>
</
template
>
</q-table>
</div>
<div
class=
"col-12 q-mt-sm"
>
<Pagination
v-model:currentPage=
"pageIndex"
v-model:pageSize=
"pageSize"
:totalPage=
"totalPage"
@
update:pageSize=
"changePageSize"
@
update:currentPage=
"getListArtists"
/>
</div>
</q-card-section>
<q-card-actions
align=
"right"
>
<div>
<q-btn
color=
"grey"
no-caps
style=
"width: 90px"
class=
"q-mr-sm"
:label=
"$t('managingUnit.crudActions.cancel')"
@
click=
"$emit('update:isOpened', false)"
/>
<q-btn
type=
"submit"
color=
"primary"
no-caps
style=
"width: 90px"
:label=
"$t('managingUnit.crudActions.save')"
/>
</div>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
Ref
,
ref
,
onMounted
,
watch
,
PropType
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
API_PATHS
,
config
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
PaginationResponse
,
ArtistInfoType
}
from
'src/assets/type'
;
const
userTableColumnsArtist
=
[
{
name
:
'stt'
,
field
:
'stt'
,
required
:
true
,
label
:
'STT'
,
align
:
'center'
,
sortable
:
false
,
},
{
name
:
'artistCode'
,
field
:
'artistCode'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'artist.tableColumnsArtist.artistCode'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'accountName'
,
field
:
'accountName'
,
required
:
true
,
label
:
'Tên đăng nhập'
,
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'fullName'
,
field
:
'fullName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'artist.tableColumnsArtist.fullName'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'artistName'
,
field
:
'artistName'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'artist.tableColumnsArtist.artistName'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'avatar'
,
field
:
'avatar'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'artist.tableColumnsArtist.avatar'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'field'
,
field
:
'field'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'artist.tableColumnsArtist.field'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'work'
,
field
:
'work'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'artist.tableColumnsArtist.work'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
{
name
:
'qualification'
,
field
:
'qualification'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'artist.tableColumnsArtist.qualification'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'left'
,
sortable
:
false
,
},
// {
// name: 'artistLevel',
// field: 'artistLevel',
// required: true,
// label: i18n.global.t('artist.tableColumnsArtist.artistLevel'),
// headerStyle: 'text-align: center !important;',
// align: 'left',
// sortable: false,
// },
{
name
:
'favoriteScore'
,
field
:
'favoriteScore'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'artist.tableColumnsArtist.favoriteScore'
),
headerStyle
:
'text-align: center !important;'
,
align
:
'center'
,
sortable
:
false
,
},
];
export
default
defineComponent
({
components
:
{
Pagination
,
},
props
:
{
isOpened
:
{
type
:
Boolean
,
required
:
true
,
},
},
setup
()
{
const
selected
=
ref
([]);
const
userTableRowsArtist
:
Ref
<
unknown
[]
>
=
ref
([]);
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
totalPage
=
ref
(
0
);
const
configImg
=
config
;
const
getSelectedString
=
()
=>
{
return
selected
.
value
.
length
===
0
?
''
:
`
${
selected
.
value
.
length
}
nhân sự đã được chọn `
;
};
const
getListArtists
=
async
()
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getListArtists
,
method
:
'GET'
,
params
:
{
pageIndex
:
pageIndex
.
value
,
pageSize
:
pageSize
.
value
,
name
:
null
,
field
:
null
,
qualification
:
null
,
address
:
null
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
PaginationResponse
<
ArtistInfoType
>>
>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
userTableRowsArtist
.
value
=
response
.
data
.
data
.
data
;
totalPage
.
value
=
response
.
data
.
data
.
totalPages
;
}
}
catch
(
error
)
{}
};
const
changePageSize
=
()
=>
{
pageIndex
.
value
=
1
;
void
getListArtists
();
};
onMounted
(()
=>
{
void
getListArtists
();
});
return
{
configImg
,
userTableRowsArtist
,
userTableColumnsArtist
,
pageIndex
,
pageSize
,
totalPage
,
selected
,
// function
getListArtists
,
changePageSize
,
getSelectedString
,
};
},
emits
:
[
'update:isOpened'
,
'saveConfigListArtist'
],
});
</
script
>
src/components/units-manager/unit-add-update-artist/index.vue
View file @
13f24b20
...
...
@@ -31,13 +31,14 @@
>
<div
class=
"row q-col-gutter-sm"
>
<div
class=
"col-6"
>
<q-select
:model-value=
"artistField"
@
update:model-value=
"$emit('update:artistField', $event)"
:label=
"
$t('managingUnitAdd.dialogLabel.fieldLabels.artistField')
"
:options=
"fieldOptions"
:options=
"field
sAdd
Options"
:rules=
"artistFieldRules"
map-options
option-value=
"id"
...
...
@@ -194,7 +195,7 @@ export default defineComponent({
},
isUpdate
:
{
type
:
Boolean
,
default
:
false
},
artistOptions
:
{
type
:
Array
,
required
:
true
},
fieldOptions
:
{
type
:
Array
,
required
:
true
},
field
sAdd
Options
:
{
type
:
Array
,
required
:
true
},
artistField
:
{
type
:
Number
,
required
:
true
},
artistName
:
{
type
:
Object
as
PropType
<
ArtistInfoType
>
,
required
:
true
},
artistStatus
:
{
type
:
Number
,
required
:
true
},
...
...
src/pages/don-vi-chu-quan/index.vue
View file @
13f24b20
...
...
@@ -137,6 +137,7 @@
v-model:email=
"unitEmail"
v-model:fields=
"unitField"
v-model:fieldsOptions=
"fieldsOptions"
v-model:fieldsAddOptions=
"fieldsAddOptions"
v-model:name=
"unitName"
v-model:userName=
"unitUserName"
v-model:password=
"unitPassword"
...
...
@@ -156,6 +157,7 @@
v-model:email=
"unitEmail"
v-model:fields=
"unitField"
v-model:fieldsOptions=
"fieldsOptions"
v-model:fieldsAddOptions=
"fieldsAddOptions"
v-model:name=
"unitName"
v-model:userName=
"unitUserName"
v-model:password=
"unitPassword"
...
...
@@ -285,6 +287,7 @@ export default defineComponent({
const
totalPage
=
ref
(
0
);
const
unitNameKeyword
=
ref
(
''
);
const
fieldsOptions
:
Ref
<
ClassificationOptions
[]
>
=
ref
([]);
const
fieldsAddOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
fieldSelected
:
Ref
<
FieldType
|
undefined
>
=
ref
();
const
addUnitDialogIsOpened
=
ref
(
false
);
...
...
@@ -416,6 +419,23 @@ export default defineComponent({
};
//gọi api lĩnh vực
const
getFieldAddOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getFieldOptions
,
method
:
'GET'
,
params
:
{},
}))
as
AxiosResponse
<
BaseResponseBody
<
FieldType
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
fieldsAddOptions
.
value
=
response
.
data
.
data
;
}
};
const
getFieldOptions
=
async
()
=>
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getClassificationOptions
,
...
...
@@ -503,6 +523,7 @@ export default defineComponent({
onMounted
(()
=>
{
void
getListUnits
();
void
getFieldOptions
();
void
getFieldAddOptions
()
});
return
{
check_artistList
,
...
...
@@ -513,7 +534,9 @@ export default defineComponent({
updateNewUnit
,
confirmDeleteManagingUnits
,
deleteManagingUnits
,
getFieldAddOptions
,
fieldsOptions
,
fieldsAddOptions
,
status
,
managingUnitTableColumns
,
...
...
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