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
efe74c16
Commit
efe74c16
authored
May 05, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ad5e0e7a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
161 additions
and
39 deletions
+161
-39
configurations.example.ts
src/assets/configurations.example.ts
+1
-0
NewManagingUnits.ts
...ingunits/add-new-managingunits-dialog/NewManagingUnits.ts
+28
-1
NewAddArtist.ts
...anagingunits-dialog/add-new-artist-dialog/NewAddArtist.ts
+4
-4
index.vue
...-new-managingunits-dialog/add-new-artist-dialog/index.vue
+29
-8
index.vue
...ents/managingunits/add-new-managingunits-dialog/index.vue
+22
-11
index.ts
src/i18n/vi/index.ts
+17
-6
ManagingUnit.ts
src/pages/don-vi-chu-quan/ManagingUnit.ts
+48
-8
index.vue
src/pages/don-vi-chu-quan/index.vue
+12
-1
No files found.
src/assets/configurations.example.ts
View file @
efe74c16
...
...
@@ -40,4 +40,5 @@ export enum API_PATHS {
getQualificationOptions
=
'/qualification'
,
getWorkOptions
=
'/work'
,
getDetailArtist
=
'/artist/detail'
,
deleteManagingUnits
=
'/artistOwner/delete'
,
}
src/components/managingunits/add-new-managingunits-dialog/NewManagingUnits.ts
View file @
efe74c16
import
{
defineComponent
}
from
'vue'
;
import
{
defineComponent
,
ref
}
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'
export
type
ArtistAddInfoType
=
{
id
:
number
;
nameAdd
:
string
|
null
;
myedityAdd
:
string
|
null
;
timeAdd
:
string
|
null
;
fieldsAdd
:
number
;
statusAdd
:
number
;
};
export
default
defineComponent
({
components
:
{
AddNewArtistDialog
},
props
:
{
showDialog
:
{
type
:
Boolean
,
required
:
true
,
},
nameAdd
:
{
type
:
String
,
required
:
true
},
fieldsAdd
:
{
type
:
Number
,
required
:
true
},
myedityAdd
:
{
type
:
String
,
required
:
true
},
timeAdd
:
{
type
:
String
,
required
:
true
},
fieldsAddOptions
:
{
type
:
Array
,
required
:
true
},
statusAdd
:
{
type
:
Boolean
,
required
:
true
},
managingUnitAddTableRows
:
{
type
:
Array
,
required
:
true
},
managingUnitAddTableColumns
:
{
type
:
Array
,
required
:
true
},
fieldsOptions
:
{
type
:
Array
,
required
:
true
},
...
...
@@ -22,6 +41,12 @@ 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
codeRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
...
...
@@ -63,6 +88,8 @@ export default defineComponent({
i18n
.
global
.
t
(
'managingUnit.validateMessages.requireAddress'
),
];
return
{
openAddArtistDialog
,
addNewManagingUnitsArtist
,
codeRules
,
nameRules
,
representativeRules
,
...
...
src/components/managingunits/add-new-managingunits-dialog/add-new-artist-dialog/NewAddArtist.ts
View file @
efe74c16
...
...
@@ -3,7 +3,7 @@ import { i18n } from 'src/boot/i18n';
export
default
defineComponent
({
props
:
{
show
Dialog
:
{
openAddArtist
Dialog
:
{
type
:
Boolean
,
required
:
true
,
},
...
...
@@ -12,7 +12,7 @@ export default defineComponent({
nameAdd
:
{
type
:
String
,
required
:
true
},
myedityAdd
:
{
type
:
String
,
required
:
true
},
timeAdd
:
{
type
:
String
,
required
:
true
},
status
:
{
type
:
Boolean
,
required
:
true
},
status
Add
:
{
type
:
Boolean
,
required
:
true
},
},
setup
()
{
const
nameAddRules
=
[
...
...
@@ -43,13 +43,13 @@ export default defineComponent({
};
},
emits
:
[
'update:
show
Dialog'
,
'update:
openAddArtist
Dialog'
,
'click:CloseBtn'
,
'update:nameAdd'
,
'update:myedityAdd'
,
'update:fieldsAdd'
,
'update:timeAdd'
,
'update:status'
,
'update:status
Add
'
,
'addNewManagingUnitsArtist'
,
],
});
src/components/managingunits/add-new-managingunits-dialog/add-new-artist-dialog/index.vue
View file @
efe74c16
<
template
>
<q-dialog
persistent
:model-value=
"
show
Dialog"
@
update:model-value=
"$emit('update:
show
Dialog', $event)"
:model-value=
"
openAddArtist
Dialog"
@
update:model-value=
"$emit('update:
openAddArtist
Dialog', $event)"
>
<q-card
style=
"min-width: 700px"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"$emit('addNewManagingUnitsArtist')"
>
...
...
@@ -23,7 +23,7 @@
<q-input
:model-value=
"nameAdd"
@
update:model-value=
"$emit('update:nameAdd', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.nameAdd')"
:label=
"$t('managingUnit
Add
.dialogLabel.fieldLabels.nameAdd')"
:rules=
"nameAddRules"
hide-bottom-space
type=
"text"
...
...
@@ -34,7 +34,9 @@
<q-input
:model-value=
"myedityAdd"
@
update:model-value=
"$emit('update:myedityAdd', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.myedityAdd')"
:label=
"
$t('managingUnitAdd.dialogLabel.fieldLabels.myedityAdd')
"
type=
"text"
class=
"q-my-sm"
outlined
...
...
@@ -47,8 +49,8 @@
$t
(
'managingUnitAdd.dialogLabel.fieldLabels.status'
)
}}
</span
><q-toggle
:model-value=
"status"
@
update:model-value=
"$emit('update:status', $event)"
:model-value=
"status
Add
"
@
update:model-value=
"$emit('update:status
Add
', $event)"
/>
</div>
</div>
...
...
@@ -56,7 +58,7 @@
<q-select
:model-value=
"fieldsAdd"
@
update:model-value=
"$emit('update:fieldsAdd', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.fieldsAdd')"
:label=
"$t('managingUnit
Add
.dialogLabel.fieldLabels.fieldsAdd')"
:options=
"fieldsAddOptions"
:rules=
"fieldsAddRules"
emit-value
...
...
@@ -71,7 +73,7 @@
<q-input
:model-value=
"timeAdd"
@
update:model-value=
"$emit('update:timeAdd', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.timeAdd')"
:label=
"$t('managingUnit
Add
.dialogLabel.fieldLabels.timeAdd')"
class=
"q-my-sm"
type=
"text"
outlined
...
...
@@ -82,6 +84,25 @@
</div>
</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('managingUnitAdd.crudActions.cancel')"
@
click=
"$emit('click:CloseBtn')"
/>
<q-btn
type=
"submit"
color=
"primary"
no-caps
style=
"width: 90px"
:label=
"$t('managingUnitAdd.crudActions.save')"
/>
</div>
</q-card-actions>
</q-form>
</q-card>
</q-dialog>
...
...
src/components/managingunits/add-new-managingunits-dialog/index.vue
View file @
efe74c16
...
...
@@ -10,7 +10,7 @@
<q-item>
<q-item-section>
<q-item-label
class=
"text-h6 text-weight-regular"
>
{{
$t
(
'managingUnit
Add
.dialogLabel.title.add'
)
$t
(
'managingUnit.dialogLabel.title.add'
)
}}
</q-item-label>
</q-item-section>
</q-item>
...
...
@@ -66,15 +66,6 @@
hide-bottom-space
clearable
></q-input>
<div
style=
"padding-left: 8px"
>
<span
class=
"text-body1"
>
{{
$t
(
'managingUnit.dialogLabel.fieldLabels.status'
)
}}
</span
><q-toggle
:model-value=
"status"
@
update:model-value=
"$emit('update:status', $event)"
/>
</div>
</div>
<div
class=
"col-6"
>
<q-input
...
...
@@ -109,12 +100,21 @@
@
update:model-value=
"$emit('update:address', $event)"
:label=
"$t('managingUnit.dialogLabel.fieldLabels.address')"
class=
"q-my-sm"
type=
"text
area
"
type=
"text"
outlined
:rules=
"addressRules"
hide-bottom-space
clearable
></q-input>
<div
class=
"q-pt-sm q-pl-sm"
>
<span
class=
"text-body1"
>
{{
$t
(
'managingUnit.dialogLabel.fieldLabels.status'
)
}}
</span
><q-toggle
:model-value=
"status"
@
update:model-value=
"$emit('update:status', $event)"
/>
</div>
</div>
</div>
</q-card-section>
...
...
@@ -131,10 +131,21 @@
no-caps
:label=
"$t('managingUnitAdd.AddmanagingUnit')"
class=
"q-mr-sm"
@
click=
"openAddArtistDialog = true"
>
</q-btn>
</div>
</div>
<AddNewArtistDialog
v-model:open-add-artist-dialog=
"openAddArtistDialog"
v-model:name-add=
"nameAdd"
v-model:myedity-add=
"myedityAdd"
v-model:fields-add=
"fieldsAdd"
v-model:time-add=
"timeAdd"
:fields-add-options=
"fieldsAddOptions"
@
click:CloseBtn=
"openAddArtistDialog = false"
@
addNewManagingUnitsArtist=
"addNewManagingUnitsArtist"
/>
<q-card-actions>
<div
class=
"col-12 q-mt-sm"
>
...
...
src/i18n/vi/index.ts
View file @
efe74c16
...
...
@@ -171,6 +171,7 @@ export default {
toolTipMessage
:
{
updateInfo
:
'Cập nhật'
,
information
:
'Thông tin'
,
delete
:
'Xóa'
},
crudActions
:
{
save
:
'Lưu'
,
...
...
@@ -187,10 +188,16 @@ export default {
isPhone
:
'Số điện thoại không hợp lệ'
,
requireAddress
:
'Vui lòng nhập Địa chỉ'
,
},
// confirmActionsTitle: {
// },
// actionMessages: {
// },
confirmActionsTitle
:
{
confirmDeleteManagingUnitsTitle
:
'Xác nhận'
,
confirmDeleteManagingUnitsCancelBtnLabel
:
'Huỷ'
,
confirmDeleteManagingUnitsContent
:
'Bạn có chắc muốn xoá Đơn vị chủ quản này?'
,
},
actionMessages
:
{
addNewManagingUnitsAccess
:
'Thêm Đơn vị chủ quản thành công'
,
deleteManagingUnitsAccess
:
'Xoá Đơn vị chủ quản thành công'
,
updateManagingUnitsAccess
:
'Cập nhật thông tin Đơn vị chủ quản thành công'
,
},
},
//Add đơn vị chủ quản
...
...
@@ -230,8 +237,12 @@ export default {
save
:
'Lưu'
,
cancel
:
'Đóng'
,
},
// validateMessages: {
// },
validateMessages
:
{
requireNameAdd
:
'Vui lòng nhập Tên đơn vị'
,
requireMyedityAdd
:
'Vui lòng nhập Nghệ danh'
,
requireFieldsAdd
:
'Vui lòng chọn Lĩnh vực'
,
requireTimeAdd
:
'Vui lòng nhập Thời gian'
,
},
// confirmActionsTitle: {
// },
// actionMessages: {
...
...
src/pages/don-vi-chu-quan/ManagingUnit.ts
View file @
efe74c16
import
{
i18n
}
from
'src/boot/i18n'
;
import
{
defineComponent
,
onMounted
,
ref
,
Ref
}
from
'vue'
;
import
Pagination
from
'components/pagination/index.vue'
;
import
{
Dialog
,
Notify
}
from
'quasar'
;
import
{
API_PATHS
}
from
'src/assets/configurations.example'
;
import
{
AxiosResponse
}
from
'axios'
;
import
{
api
,
BaseResponseBody
}
from
'src/boot/axios'
;
...
...
@@ -29,14 +30,14 @@ export default defineComponent({
},
setup
()
{
const
managingUnitTableColumns
=
[
{
name
:
'index'
,
field
:
'index'
,
required
:
true
,
label
:
'STT'
,
align
:
'center'
,
sortable
:
false
,
},
//
{
//
name: 'index',
//
field: 'index',
//
required: true,
//
label: 'STT',
//
align: 'center',
//
sortable: false,
//
},
{
name
:
'code'
,
field
:
'code'
,
...
...
@@ -255,6 +256,43 @@ export default defineComponent({
void
getListUnits
();
};
const
confirmDeleteManagingUnits
=
(
id
:
number
)
=>
{
Dialog
.
create
({
title
:
i18n
.
global
.
t
(
'managingUnit.confirmActionsTitle.confirmDeleteManagingUnitsTitle'
),
message
:
i18n
.
global
.
t
(
'managingUnit.confirmActionsTitle.confirmDeleteManagingUnitsContent'
),
cancel
:
i18n
.
global
.
t
(
'managingUnit.confirmActionsTitle.confirmDeleteManagingUnitsCancelBtnLabel'
),
color
:
'negative'
,
}).
onOk
(()
=>
{
void
deleteManagingUnits
(
id
);
});
};
const
deleteManagingUnits
=
async
(
id
:
number
)
=>
{
try
{
const
deleteResult
=
(
await
api
({
url
:
API_PATHS
.
deleteManagingUnits
,
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
(
'managingUnit.actionMessages.deleteManagingUnitsAccess'
),
});
void
getListUnits
();
}
}
catch
(
error
)
{}
};
const
openAddManagingUnitsDialog
=
()
=>
{
showDialog
.
value
=
true
;
code
.
value
=
''
;
...
...
@@ -277,6 +315,8 @@ export default defineComponent({
void
getListAddUnit
();
});
return
{
confirmDeleteManagingUnits
,
deleteManagingUnits
,
getListAddUnit
,
openAddManagingUnitsDialog
,
addNewManagingUnits
,
...
...
src/pages/don-vi-chu-quan/index.vue
View file @
efe74c16
...
...
@@ -55,7 +55,7 @@
:no-data-label=
"$t('emptyData')"
hide-pagination
>
<template
v-slot:body-cell-action=
""
>
<template
v-slot:body-cell-action=
"
item
"
>
<q-td
style=
"padding: 0"
class=
"flex flex-center"
>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-information-outline"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
...
...
@@ -67,6 +67,17 @@
$t
(
'managingUnit.toolTipMessage.updateInfo'
)
}}
</q-tooltip>
</q-btn>
<q-btn
flat
round
color=
"primary"
icon=
"mdi-delete"
@
click=
"confirmDeleteManagingUnits(item.row.id)"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
$t
(
'managingUnit.toolTipMessage.delete'
)
}}
</q-tooltip>
</q-btn>
</q-td>
</
template
>
<
template
v-slot:body-cell-status=
"rowData"
>
...
...
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