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
0ddb3867
Commit
0ddb3867
authored
May 06, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
32dc7933
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
330 additions
and
167 deletions
+330
-167
configurations.example.ts
src/assets/configurations.example.ts
+2
-0
type.ts
src/assets/type.ts
+37
-0
NewManagingUnits.ts
...ingunits/add-new-managingunits-dialog/NewManagingUnits.ts
+139
-73
NewAddArtist.ts
...anagingunits-dialog/add-new-artist-dialog/NewAddArtist.ts
+20
-6
index.vue
...-new-managingunits-dialog/add-new-artist-dialog/index.vue
+23
-20
index.vue
...ents/managingunits/add-new-managingunits-dialog/index.vue
+2
-4
NewUpdateArtist.ts
...gunits-dialog/update-new-artist-dialog/NewUpdateArtist.ts
+1
-1
index.vue
...w-managingunits-dialog/update-new-artist-dialog/index.vue
+3
-3
UpdateNewManagingUnits.ts
...update-new-managingunits-dialog/UpdateNewManagingUnits.ts
+28
-12
index.vue
...-new-managingunits-dialog/add-new-artist-dialog/index.vue
+2
-2
index.vue
...s/managingunits/update-new-managingunits-dialog/index.vue
+2
-2
NewUpdateArtist.ts
...gunits-dialog/update-new-artist-dialog/NewUpdateArtist.ts
+1
-1
index.vue
...w-managingunits-dialog/update-new-artist-dialog/index.vue
+3
-3
ManagingUnit.ts
src/pages/don-vi-chu-quan/ManagingUnit.ts
+66
-38
index.vue
src/pages/don-vi-chu-quan/index.vue
+1
-2
No files found.
src/assets/configurations.example.ts
View file @
0ddb3867
...
...
@@ -42,4 +42,6 @@ export enum API_PATHS {
getDetailArtist
=
'/artist/detail'
,
deleteManagingUnits
=
'/artistOwner/delete'
,
deleteArtist
=
'/artist/delete'
,
getArtistDicitionaryOptions
=
'artist/dictionary'
,
artistOwnerAdd
=
'artistOwner/add'
,
}
src/assets/type.ts
View file @
0ddb3867
...
...
@@ -159,3 +159,40 @@ export type ContractType = {
artistFullName
:
string
;
field
:
string
;
};
export
type
ArtistDicitionary
=
{
id
:
number
;
name
:
string
;
qualification
:
string
;
artistLevel
:
string
;
field
:
number
;
};
export
type
ArtistOwnerAdd
=
{
code
:
string
|
undefined
,
name
:
string
|
undefined
,
representative
:
string
|
undefined
,
address
:
string
|
undefined
,
email
:
string
|
undefined
,
phoneNumber
:
string
|
undefined
,
status
:
number
,
fields
:
Array
<
[
{
id
:
number
,
name
:
string
,
status
:
number
,
numIndex
:
number
}
]
>
contracts
:
Array
<
[
{
contractFrom
:
string
,
contractTo
:
string
,
status
:
number
,
artistId
:
number
,
artistName
:
string
,
artistFullName
:
string
,
field
:
string
},
]
>
};
src/components/managingunits/add-new-managingunits-dialog/NewManagingUnits.ts
View file @
0ddb3867
import
{
defineComponent
,
Ref
,
ref
}
from
'vue'
;
import
{
defineComponent
,
Ref
,
ref
,
onMounted
,
watch
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
import
AddNewArtistDialog
from
'components/managingunits/add-new-managingunits-dialog/add-new-artist-dialog/index.vue'
import
UpdateNewArtistDialog
from
'components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/index.vue'
import
AddNewArtistDialog
from
'components/managingunits/add-new-managingunits-dialog/add-new-artist-dialog/index.vue'
;
import
UpdateNewArtistDialog
from
'components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/index.vue'
;
import
{
API_PATHS
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
FieldType
,
ArtistDicitionary
}
from
'src/assets/type'
;
import
{
config
}
from
'src/assets/configurations'
;
export
default
defineComponent
({
components
:
{
AddNewArtistDialog
,
UpdateNewArtistDialog
UpdateNewArtistDialog
,
},
props
:
{
showDialog
:
{
type
:
Boolean
,
required
:
true
,
},
managingUnitAddTableRows
:
{
type
:
Array
,
required
:
true
},
managingUnitAddTableColumns
:
{
type
:
Array
,
required
:
true
},
fieldsOptions
:
{
type
:
Array
,
required
:
true
},
fields
:
{
type
:
Number
,
required
:
true
},
managingUnitAddTableColumns
:
{
type
:
Array
,
required
:
true
},
fieldsOptions
:
{
type
:
Array
,
required
:
true
},
fields
:
{
type
:
Number
,
required
:
true
},
code
:
{
type
:
String
,
required
:
true
},
name
:
{
type
:
String
,
required
:
true
},
representative
:
{
type
:
String
,
required
:
true
},
...
...
@@ -28,13 +32,25 @@ export default defineComponent({
status
:
{
type
:
Boolean
,
required
:
true
},
},
setup
()
{
const
openAddArtistDialog
=
ref
(
false
)
const
addNewManagingUnitsArtist
=
()
=>
{
//gọi api thêm mới
try
{
}
catch
(
error
)
{}
const
managingUnitAddTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
openAddArtistDialog
=
ref
(
false
);
const
addNewManagingUnitsArtist
=
(
timeAddTo
:
string
,
timeAddForm
:
string
)
=>
{
console
.
log
(
nameAdd
.
value
);
managingUnitAddTableRows
.
value
.
push
({
contractFrom
:
timeAddForm
,
contractTo
:
timeAddTo
,
timeAdd
:
timeAddForm
+
' - '
+
timeAddTo
,
status
:
statusAdd
,
artistId
:
nameAdd
.
value
.
id
,
artistName
:
nameAdd
.
value
.
artistName
,
fullName
:
nameAdd
.
value
.
fullName
,
field
:
nameAdd
.
value
.
field
,
});
};
const
openUpdateArtistDialog
=
ref
(
false
)
const
openUpdateArtistDialog
=
ref
(
false
)
;
const
updateNewManagingUnitsArtist
=
()
=>
{
//gọi api cập nhật
try
{
...
...
@@ -81,44 +97,96 @@ export default defineComponent({
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireAddress'
),
];
const
nameAdd
:
Ref
<
number
|
undefined
>
=
ref
()
const
timeAddTo
:
Ref
<
string
|
undefined
>
=
ref
()
const
fieldsAdd
:
Ref
<
number
|
undefined
>
=
ref
();
const
statusAdd
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
timeAdd
:
Ref
<
string
|
undefined
>
=
ref
();
const
fieldsAddOptions
=
ref
([
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
3
,
text
:
'Thể thao'
},
]);
const
nameAddOptions
=
ref
([
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
{
id
:
3
,
text
:
'Nguyễn Sơn Tùng'
},
]);
const
nameUpdate
:
Ref
<
number
|
undefined
>
=
ref
()
const
timeUpdateTo
:
Ref
<
string
|
undefined
>
=
ref
()
const
nameAdd
:
Ref
<
{
id
:
number
;
name
:
string
;
fullName
:
string
;
artistName
:
string
;
field
:
string
;
}
>
=
ref
({
id
:
1
,
name
:
''
,
fullName
:
''
,
artistName
:
''
,
field
:
''
,
});
const
fieldsAdd
:
Ref
<
{
id
:
number
;
name
:
string
}
|
undefined
>
=
ref
();
const
statusAdd
:
Ref
<
number
>
=
ref
(
1
);
const
fieldsAddOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
nameAddOptions
:
Ref
<
ArtistDicitionary
[]
>
=
ref
([]);
const
nameUpdate
:
Ref
<
number
|
undefined
>
=
ref
();
const
timeUpdateTo
:
Ref
<
string
|
undefined
>
=
ref
();
const
fieldsUpdate
:
Ref
<
number
|
undefined
>
=
ref
();
const
statusUpdate
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
timeUpdate
:
Ref
<
string
|
undefined
>
=
ref
();
const
fieldsUpdateOptions
=
ref
([
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
3
,
text
:
'Thể thao'
},
]);
const
nameUpdateOptions
=
ref
([
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
{
id
:
3
,
text
:
'Nguyễn Sơn Tùng'
},
]);
watch
(
()
=>
fieldsAdd
.
value
,
(
value
)
=>
{
if
(
value
)
{
if
(
value
)
{
void
getArtistDicitionaryOptions
(
value
);
}
}
}
);
//gọi api lĩnh vực
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
:
{
id
:
number
;
name
:
string
;
})
=>
{
nameAddOptions
.
value
=
[];
nameAdd
.
value
=
{
id
:
1
,
name
:
''
,
fullName
:
''
,
artistName
:
''
,
field
:
''
,
};
const
response
=
(
await
api
({
url
:
API_PATHS
.
getArtistDicitionaryOptions
,
method
:
'GET'
,
params
:
{
field
:
data
.
id
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
ArtistDicitionary
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
nameAddOptions
.
value
=
response
.
data
.
data
;
}
};
onMounted
(()
=>
{
void
getFieldOptions
();
});
return
{
managingUnitAddTableRows
,
getFieldOptions
,
getArtistDicitionaryOptions
,
nameUpdate
,
timeUpdateTo
,
statusUpdate
,
fieldsUpdate
,
timeUpdate
,
nameUpdateOptions
,
fieldsUpdateOptions
,
openAddArtistDialog
,
addNewManagingUnitsArtist
,
openUpdateArtistDialog
,
...
...
@@ -131,9 +199,7 @@ export default defineComponent({
emailRules
,
fieldsRules
,
nameAdd
,
timeAddTo
,
fieldsAdd
,
timeAdd
,
statusAdd
,
fieldsAddOptions
,
nameAddOptions
,
...
...
src/components/managingunits/add-new-managingunits-dialog/add-new-artist-dialog/NewAddArtist.ts
View file @
0ddb3867
import
{
defineComponent
}
from
'vue'
;
import
{
defineComponent
,
Ref
,
ref
,
watch
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
export
default
defineComponent
({
...
...
@@ -11,11 +11,23 @@ export default defineComponent({
fieldsAddOptions
:
{
type
:
Array
,
required
:
true
},
fieldsAdd
:
{
type
:
Number
,
required
:
true
},
nameAdd
:
{
type
:
Number
,
required
:
true
},
timeAdd
:
{
type
:
String
,
required
:
true
},
timeAddTo
:
{
type
:
String
,
required
:
true
},
statusAdd
:
{
type
:
Boolean
,
required
:
true
},
statusAdd
:
{
type
:
Number
,
required
:
true
},
},
setup
()
{
setup
(
props
,
context
)
{
watch
(
()
=>
props
.
openAddArtistDialog
,
(
value
)
=>
{
if
(
!
value
)
{
context
.
emit
(
'update:nameAdd'
,
undefined
)
timeAddForm
.
value
=
''
timeAddTo
.
value
=
''
context
.
emit
(
'update:fieldsAdd'
,
undefined
)
context
.
emit
(
'update:statusAdd'
,
1
)
}
}
);
const
timeAddForm
:
Ref
<
string
|
undefined
>
=
ref
()
const
timeAddTo
:
Ref
<
string
|
undefined
>
=
ref
()
const
nameAddRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
...
...
@@ -41,6 +53,8 @@ export default defineComponent({
timeAddToRules
,
fieldsAddRules
,
timeAddRules
,
timeAddForm
,
timeAddTo
,
};
},
emits
:
[
...
...
@@ -48,8 +62,8 @@ export default defineComponent({
'click:CloseBtn'
,
'update:nameAdd'
,
'update:timeAddTo'
,
'update:fieldsAdd'
,
'update:timeAdd'
,
'update:fieldsAdd'
,
'update:statusAdd'
,
'addNewManagingUnitsArtist'
,
],
...
...
src/components/managingunits/add-new-managingunits-dialog/add-new-artist-dialog/index.vue
View file @
0ddb3867
...
...
@@ -5,7 +5,13 @@
@
update:model-value=
"$emit('update:openAddArtistDialog', $event)"
>
<q-card
style=
"min-width: 700px"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"$emit('addNewManagingUnitsArtist')"
>
<q-form
greedy
@
submit
.
prevent=
"
$emit('addNewManagingUnitsArtist', timeAddForm, timeAddTo);
$emit('click:CloseBtn');
"
>
<q-card-section>
<q-item>
<q-item-section>
...
...
@@ -26,20 +32,17 @@
:label=
"$t('managingUnitAdd.dialogLabel.fieldLabels.fieldsAdd')"
:options=
"fieldsAddOptions"
:rules=
"fieldsAddRules"
emit-value
map-options
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
outlined
hide-bottom-space
clearable
></q-select>
<q-input
:model-value=
"timeAdd"
:model-value=
"timeAdd
Form
"
@
update:model-value=
"$emit('update:timeAdd', $event)"
:label=
"$t('managingUnitAdd.dialogLabel.fieldLabels.timeAdd')"
mask=
"date"
class=
"q-my-sm"
outlined
:rules=
"timeAddRules"
...
...
@@ -51,7 +54,7 @@
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"timeAdd"
>
<q-date
v-model=
"timeAdd
Form"
mask=
"DD/MM/YYYY
"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
...
...
@@ -64,6 +67,17 @@
</q-popup-proxy>
</q-icon>
</
template
></q-input>
<div>
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
><q-toggle
:model-value=
"statusAdd"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"$emit('update:statusAdd', $event)"
/>
</div>
</div>
<div
class=
"col-6"
>
<div>
...
...
@@ -75,10 +89,9 @@
:options=
"nameAddOptions"
:rules=
"nameAddRules"
hide-bottom-space
emit-value
map-options
option-value=
"id"
option-label=
"
text
"
option-label=
"
fullName
"
class=
"q-my-sm"
outlined
clearable
...
...
@@ -92,7 +105,6 @@
@
update:model-value=
"$emit('update:timeAddTo', $event)"
:label=
"$t('managingUnitAdd.dialogLabel.fieldLabels.timeAddTo')"
class=
"q-my-sm"
mask=
"date"
outlined
:rules=
"timeAddToRules"
readonly
...
...
@@ -103,7 +115,7 @@
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"timeAddTo"
>
<q-date
v-model=
"timeAddTo"
mask=
"DD/MM/YYYY"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
...
...
@@ -117,15 +129,6 @@
</q-icon>
</
template
>
</q-input>
<div
class=
"q-pt-sm q-pl-sm"
>
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
><q-toggle
:model-value=
"statusAdd"
@
update:model-value=
"$emit('update:statusAdd', $event)"
/>
</div>
</div>
</div>
</q-card-section>
...
...
src/components/managingunits/add-new-managingunits-dialog/index.vue
View file @
0ddb3867
...
...
@@ -89,7 +89,7 @@
emit-value
map-options
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
outlined
hide-bottom-space
...
...
@@ -139,9 +139,7 @@
<AddNewArtistDialog
v-model:open-add-artist-dialog=
"openAddArtistDialog"
v-model:name-add=
"nameAdd"
v-model:time-add-to=
"timeAddTo"
v-model:fields-add=
"fieldsAdd"
v-model:time-add=
"timeAdd"
v-model:status-add=
"statusAdd"
:fields-add-options=
"fieldsAddOptions"
:name-add-options=
"nameAddOptions"
...
...
@@ -156,7 +154,7 @@
v-model:fields-update=
"fieldsUpdate"
v-model:time-update=
"timeUpdate"
v-model:status-update=
"statusUpdate"
:fields-
update-options=
"fieldsUpdate
Options"
:fields-
add-options=
"fieldsAdd
Options"
:name-update-options=
"nameUpdateOptions"
@
click:CloseBtn=
"openUpdateArtistDialog = false"
@
updateNewManagingUnitsArtist=
"updateNewManagingUnitsArtist"
...
...
src/components/managingunits/add-new-managingunits-dialog/update-new-artist-dialog/NewUpdateArtist.ts
View file @
0ddb3867
...
...
@@ -9,7 +9,7 @@ export default defineComponent({
},
nameUpdateOptions
:
{
type
:
Array
,
required
:
true
},
nameUpdate
:
{
type
:
Number
,
required
:
true
},
fields
Update
Options
:
{
type
:
Array
,
required
:
true
},
fields
Add
Options
:
{
type
:
Array
,
required
:
true
},
fieldsUpdate
:
{
type
:
Number
,
required
:
true
},
timeUpdateTo
:
{
type
:
String
,
required
:
true
},
timeUpdate
:
{
type
:
String
,
required
:
true
},
...
...
src/components/managingunits/add-new-managingunits-dialog/update-new-artist-dialog/index.vue
View file @
0ddb3867
...
...
@@ -26,12 +26,12 @@
:label=
"
$t('managingUnitAdd.dialogLabel.fieldLabels.fieldsUpdate')
"
:options=
"fields
Update
Options"
:options=
"fields
Add
Options"
:rules=
"fieldsUpdateRules"
emit-value
map-options
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
outlined
hide-bottom-space
...
...
@@ -129,7 +129,7 @@
</q-icon>
</
template
>
</q-input>
<div
class=
"q-p
t-sm q-p
r-sm"
>
<div
class=
"q-pr-sm"
>
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
...
...
src/components/managingunits/update-new-managingunits-dialog/UpdateNewManagingUnits.ts
View file @
0ddb3867
import
{
defineComponent
,
ref
,
Ref
}
from
'vue'
;
import
{
defineComponent
,
ref
,
Ref
,
onMounted
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
isEmail
}
from
'../../../boot/functions'
;
import
{
isMobilePhone
}
from
'../../../boot/functions'
;
import
NewArtistDialog
from
'components/managingunits/update-new-managingunits-dialog/add-new-artist-dialog/index.vue'
import
UpdateNewArtistDialog
from
'components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/index.vue'
import
{
API_PATHS
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
import
{
FieldType
,
}
from
'src/assets/type'
;
import
{
config
}
from
'src/assets/configurations'
;
export
default
defineComponent
({
components
:
{
...
...
@@ -85,11 +93,7 @@ export default defineComponent({
const
fieldsAdd
:
Ref
<
number
|
undefined
>
=
ref
();
const
statusAdd
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
timeAdd
:
Ref
<
string
|
undefined
>
=
ref
();
const
fieldsAddOptions
=
ref
([
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
1
,
text
:
'Thể thao'
},
]);
const
fieldsAddOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
nameAddOptions
=
ref
([
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
...
...
@@ -101,23 +105,35 @@ export default defineComponent({
const
fieldsUpdate
:
Ref
<
number
|
undefined
>
=
ref
();
const
statusUpdate
:
Ref
<
boolean
|
number
>
=
ref
(
true
);
const
timeUpdate
:
Ref
<
string
|
undefined
>
=
ref
();
const
fieldsUpdateOptions
=
ref
([
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
1
,
text
:
'Thể thao'
},
]);
const
nameUpdateOptions
=
ref
([
{
id
:
1
,
text
:
'Ưng Hoàng Phúc'
},
{
id
:
2
,
text
:
'Nguyễn Tùng Dương'
},
{
id
:
3
,
text
:
'Nguyễn Sơn Tùng'
},
]);
//gọi api lĩnh vực
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
;
}
};
onMounted
(()
=>
{
void
getFieldOptions
();
});
return
{
getFieldOptions
,
nameUpdate
,
timeUpdateTo
,
fieldsUpdate
,
statusUpdate
,
timeUpdate
,
fieldsUpdateOptions
,
nameUpdateOptions
,
openUpdateArtistDialog
,
updateUpdateNewManagingUnitsArtist
,
...
...
src/components/managingunits/update-new-managingunits-dialog/add-new-artist-dialog/index.vue
View file @
0ddb3867
...
...
@@ -29,7 +29,7 @@
emit-value
map-options
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
outlined
hide-bottom-space
...
...
@@ -118,7 +118,7 @@
</q-icon>
</
template
>
</q-input>
<div
style=
"padding-left: 8px
"
>
<div
class=
"q-pr-sm
"
>
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
...
...
src/components/managingunits/update-new-managingunits-dialog/index.vue
View file @
0ddb3867
...
...
@@ -89,7 +89,7 @@
emit-value
map-options
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
outlined
hide-bottom-space
...
...
@@ -156,7 +156,7 @@
v-model:fields-update=
"fieldsUpdate"
v-model:time-update=
"timeUpdate"
v-model:status-update=
"statusUpdate"
:fields-
update-options=
"fieldsUpdate
Options"
:fields-
add-options=
"fieldsAdd
Options"
:name-update-options=
"nameUpdateOptions"
@
click:CloseBtn=
"openUpdateArtistDialog = false"
@
updateNewManagingUnitsArtist=
"updateNewManagingUnitsArtist"
...
...
src/components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/NewUpdateArtist.ts
View file @
0ddb3867
...
...
@@ -7,7 +7,7 @@ export default defineComponent({
type
:
Boolean
,
required
:
true
,
},
fields
Update
Options
:
{
type
:
Array
,
required
:
true
},
fields
Add
Options
:
{
type
:
Array
,
required
:
true
},
fieldsUpdate
:
{
type
:
Number
,
required
:
true
},
nameUpdate
:
{
type
:
Number
,
required
:
true
},
nameUpdateOptions
:
{
type
:
Array
,
required
:
true
},
...
...
src/components/managingunits/update-new-managingunits-dialog/update-new-artist-dialog/index.vue
View file @
0ddb3867
...
...
@@ -29,12 +29,12 @@
:label=
"
$t('managingUnitAdd.dialogLabel.fieldLabels.fieldsUpdate')
"
:options=
"fields
Update
Options"
:options=
"fields
Add
Options"
:rules=
"fieldsUpdateRules"
emit-value
map-options
option-value=
"id"
option-label=
"
text
"
option-label=
"
name
"
class=
"q-my-sm"
outlined
hide-bottom-space
...
...
@@ -129,7 +129,7 @@
</q-popup-proxy>
</q-icon>
</
template
></q-input>
<div
style=
"padding-left: 8px
"
>
<div
class=
"q-pr-sm
"
>
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
...
...
src/pages/don-vi-chu-quan/ManagingUnit.ts
View file @
0ddb3867
...
...
@@ -8,6 +8,8 @@ import { api, BaseResponseBody } from 'src/boot/axios';
import
{
PaginationResponse
,
ArtistOwner
,
FieldType
,
ArtistOwnerAdd
,
}
from
'src/assets/type'
;
import
{
config
}
from
'src/assets/configurations'
;
import
AddNewManagingUnitsDialogComponent
from
'../../components/managingunits/add-new-managingunits-dialog/index.vue'
;
...
...
@@ -17,10 +19,9 @@ export default defineComponent({
components
:
{
Pagination
,
AddNewManagingUnitsDialogComponent
,
UpdateNewManagingUnitsDialogComponent
UpdateNewManagingUnitsDialogComponent
,
},
setup
()
{
//DS đơn vị chủ quản
const
managingUnitTableColumns
=
[
// {
...
...
@@ -107,17 +108,17 @@ export default defineComponent({
//Add nghệ sỹ
const
managingUnitAddTableColumns
=
[
{
name
:
'sttAdd'
,
field
:
'sttAdd'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.sttAdd'
),
align
:
'center'
,
sortable
:
false
,
},
//
{
//
name: 'sttAdd',
//
field: 'sttAdd',
//
required: true,
//
label: i18n.global.t('managingUnitAdd.tableColumns.sttAdd'),
//
align: 'center',
//
sortable: false,
//
},
{
name
:
'nameAdd'
,
field
:
'
nameAdd
'
,
field
:
'
fullName
'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.nameAdd'
),
headerStyle
:
'text-align: center !important;'
,
...
...
@@ -126,7 +127,7 @@ export default defineComponent({
},
{
name
:
'myedityAdd'
,
field
:
'
myedityAdd
'
,
field
:
'
artistName
'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.myedityAdd'
),
headerStyle
:
'text-align: center !important;'
,
...
...
@@ -135,7 +136,7 @@ export default defineComponent({
},
{
name
:
'fieldsAdd'
,
field
:
'field
sAdd
'
,
field
:
'field'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.fieldsAdd'
),
headerStyle
:
'text-align: center !important;'
,
...
...
@@ -173,14 +174,14 @@ export default defineComponent({
//Update nghệ sỹ
const
managingUnitUpdateTableColumns
=
[
{
name
:
'sttAdd'
,
field
:
'sttAdd'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.sttAdd'
),
align
:
'center'
,
sortable
:
false
,
},
//
{
//
name: 'sttAdd',
//
field: 'sttAdd',
//
required: true,
//
label: i18n.global.t('managingUnitAdd.tableColumns.sttAdd'),
//
align: 'center',
//
sortable: false,
//
},
{
name
:
'nameAdd'
,
field
:
'nameAdd'
,
...
...
@@ -238,7 +239,6 @@ export default defineComponent({
];
const
managingUnitTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
managingUnitAddTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
managingUnitUpdateTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
getListAddUnit
=
()
=>
{
// const response = (await api({
...
...
@@ -299,14 +299,10 @@ export default defineComponent({
const
pageIndex
=
ref
(
1
);
const
pageSize
=
ref
(
20
);
const
unitNameKeyword
=
ref
(
''
);
const
fieldsOptions
=
ref
([
{
id
:
1
,
text
:
'Giải trí'
},
{
id
:
2
,
text
:
'Âm nhạc'
},
{
id
:
1
,
text
:
'Thể thao'
},
]);
const
fieldsOptions
:
Ref
<
FieldType
[]
>
=
ref
([]);
const
totalPage
=
ref
(
10
);
const
fieldSelected
:
Ref
<
number
|
undefined
>
=
ref
();
const
getListUnits
=
async
()
=>
{
const
getListUnits
=
async
()
=>
{
try
{
const
response
=
(
await
api
({
url
:
API_PATHS
.
getListUnits
,
...
...
@@ -315,9 +311,7 @@ export default defineComponent({
pageIndex
:
pageIndex
.
value
,
pageSize
:
pageSize
.
value
,
},
}))
as
AxiosResponse
<
BaseResponseBody
<
PaginationResponse
<
ArtistOwner
>>
>
;
}))
as
AxiosResponse
<
BaseResponseBody
<
PaginationResponse
<
ArtistOwner
>>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
managingUnitTableRows
.
value
=
response
.
data
.
data
.
data
;
totalPage
.
value
=
response
.
data
.
data
.
totalPages
;
...
...
@@ -370,7 +364,9 @@ export default defineComponent({
if
(
deleteResult
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
Notify
.
create
({
type
:
'positive'
,
message
:
i18n
.
global
.
t
(
'managingUnit.actionMessages.deleteManagingUnitsAccess'
),
message
:
i18n
.
global
.
t
(
'managingUnit.actionMessages.deleteManagingUnitsAccess'
),
});
void
getListUnits
();
}
...
...
@@ -389,9 +385,28 @@ export default defineComponent({
phoneNumber
.
value
=
''
;
};
const
addNewManagingUnits
=
()
=>
{
//gọi api thêm mới
const
addNewManagingUnits
=
async
()
=>
{
try
{
const
data
:
ArtistOwnerAdd
=
{
code
:
code
.
value
,
name
:
name
.
value
,
representative
:
representative
.
value
,
address
:
address
.
value
,
email
:
''
,
phoneNumber
:
''
,
status
:
1
,
fields
:
[],
contracts
:
[],
};
const
response
=
(
await
api
({
url
:
API_PATHS
.
artistOwnerAdd
,
method
:
'POST'
,
data
,
}))
as
AxiosResponse
<
BaseResponseBody
<
ArtistOwnerAdd
[]
>>
;
if
(
response
.
data
.
error
.
code
===
config
.
API_RES_CODE
.
OK
.
code
)
{
}
try
{
}
catch
(
error
)
{}
}
catch
(
error
)
{}
};
...
...
@@ -425,6 +440,18 @@ export default defineComponent({
// Tương tự các biến còn lại
};
//gọi api lĩnh vực
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
)
{
fieldsOptions
.
value
=
response
.
data
.
data
;
}
};
const
updateNewManagingUnits
=
()
=>
{
//gọi api update
try
{
...
...
@@ -435,8 +462,10 @@ export default defineComponent({
void
getListUnits
();
void
getListAddUnit
();
void
getListUpdateUnit
();
void
getFieldOptions
();
});
return
{
getFieldOptions
,
getListUpdateUnit
,
showDialogUpdate
,
managingUnitUpdateTableRows
,
...
...
@@ -461,7 +490,6 @@ export default defineComponent({
managingUnitTableColumns
,
managingUnitTableRows
,
managingUnitAddTableColumns
,
managingUnitAddTableRows
,
getListUnits
,
pageIndex
,
pageSize
,
...
...
src/pages/don-vi-chu-quan/index.vue
View file @
0ddb3867
...
...
@@ -19,7 +19,7 @@
v-model=
"fieldSelected"
:options=
"fieldsOptions"
label=
"Lĩnh vực"
option-label=
"
text
"
option-label=
"
name
"
option-value=
"id"
dense
outlined
...
...
@@ -123,7 +123,6 @@
v-model:phone-number=
"phoneNumber"
v-model:status=
"status"
v-model:fields=
"fields"
v-model:managing-unit-add-table-rows=
"managingUnitAddTableRows"
v-model:managing-unit-add-table-columns=
"managingUnitAddTableColumns"
:fields-options=
"fieldsOptions"
@
click:CloseBtn=
"showDialog = false"
...
...
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