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
4765c90f
Commit
4765c90f
authored
May 07, 2021
by
Tình Trương
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
40cd2886
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
137 additions
and
88 deletions
+137
-88
NewManagingUnits.ts
...ingunits/add-new-managingunits-dialog/NewManagingUnits.ts
+58
-21
index.vue
...ents/managingunits/add-new-managingunits-dialog/index.vue
+3
-5
NewUpdateArtist.ts
...gunits-dialog/update-new-artist-dialog/NewUpdateArtist.ts
+36
-22
index.vue
...w-managingunits-dialog/update-new-artist-dialog/index.vue
+36
-34
ManagingUnit.ts
src/pages/don-vi-chu-quan/ManagingUnit.ts
+4
-5
index.vue
src/pages/don-vi-chu-quan/index.vue
+0
-1
No files found.
src/components/managingunits/add-new-managingunits-dialog/NewManagingUnits.ts
View file @
4765c90f
...
...
@@ -32,17 +32,52 @@ export default defineComponent({
status
:
{
type
:
Boolean
,
required
:
true
},
},
setup
()
{
//update
const
managingUnitUpdateTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
openUpdateArtistDialog
=
ref
(
false
);
const
UpdateArtistDialog
=
(
item
:
{
row
:
{
id
:
number
;
name
:
string
;
fullName
:
string
;
artistName
:
string
;
field
:
string
;
timeAdd
:
string
;
};
})
=>
{
console
.
log
(
item
,
'aa'
);
fieldsUpdate
.
value
.
name
=
item
.
row
.
field
;
nameUpdate
.
value
.
fullName
=
item
.
row
.
fullName
;
openUpdateArtistDialog
.
value
=
true
;
};
const
updateNewManagingUnitsArtist
=
(
timeUpdateTo
:
string
,
timeUpdateForm
:
string
)
=>
{
managingUnitUpdateTableRows
.
value
.
push
({
contractFrom
:
timeUpdateForm
,
contractTo
:
timeUpdateTo
,
timeAdd
:
timeUpdateTo
+
' - '
+
timeUpdateForm
,
status
:
statusUpdate
,
artistId
:
nameAdd
.
value
.
id
,
artistName
:
nameAdd
.
value
.
artistName
,
fullName
:
nameAdd
.
value
.
fullName
,
field
:
nameAdd
.
value
.
field
,
});
};
//add
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
:
timeAdd
Form
+
' - '
+
timeAddTo
,
timeAdd
:
timeAdd
To
+
' - '
+
timeAddForm
,
status
:
statusAdd
,
artistId
:
nameAdd
.
value
.
id
,
artistName
:
nameAdd
.
value
.
artistName
,
...
...
@@ -50,12 +85,7 @@ export default defineComponent({
field
:
nameAdd
.
value
.
field
,
});
};
const
openUpdateArtistDialog
=
ref
(
false
);
const
updateNewManagingUnitsArtist
=
()
=>
{
//gọi api cập nhật
try
{
}
catch
(
error
)
{}
};
const
codeRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
...
...
@@ -114,16 +144,24 @@ export default defineComponent({
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
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'
},
]);
const
nameUpdate
:
Ref
<
{
id
:
number
;
name
:
string
;
fullName
:
string
;
artistName
:
string
;
field
:
string
;
}
>
=
ref
({
id
:
1
,
name
:
''
,
fullName
:
''
,
artistName
:
''
,
field
:
''
,
});
const
fieldsUpdate
:
Ref
<
{
id
:
number
;
name
:
string
}
>
=
ref
({
id
:
0
,
name
:
''
,
});
const
statusUpdate
:
Ref
<
number
>
=
ref
(
1
);
watch
(
()
=>
fieldsAdd
.
value
,
...
...
@@ -178,15 +216,14 @@ export default defineComponent({
});
return
{
UpdateArtistDialog
,
managingUnitUpdateTableRows
,
managingUnitAddTableRows
,
getFieldOptions
,
getArtistDicitionaryOptions
,
nameUpdate
,
timeUpdateTo
,
statusUpdate
,
fieldsUpdate
,
timeUpdate
,
nameUpdateOptions
,
openAddArtistDialog
,
addNewManagingUnitsArtist
,
openUpdateArtistDialog
,
...
...
src/components/managingunits/add-new-managingunits-dialog/index.vue
View file @
4765c90f
...
...
@@ -150,12 +150,10 @@
<UpdateNewArtistDialog
v-model:open-update-artist-dialog=
"openUpdateArtistDialog"
v-model:name-update=
"nameUpdate"
v-model:time-update-to=
"timeUpdateTo"
v-model:fields-update=
"fieldsUpdate"
v-model:time-update=
"timeUpdate"
v-model:status-update=
"statusUpdate"
:fields-add-options=
"fieldsAddOptions"
:name-
update-options=
"nameUpdate
Options"
:name-
add-options=
"nameAdd
Options"
@
click:CloseBtn=
"openUpdateArtistDialog = false"
@
updateNewManagingUnitsArtist=
"updateNewManagingUnitsArtist"
/>
...
...
@@ -169,7 +167,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-delete-outline"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
...
...
@@ -181,7 +179,7 @@
round
color=
"primary"
icon=
"mdi-account-edit-outline"
@
click=
"
openUpdateArtistDialog = true
"
@
click=
"
UpdateArtistDialog(item)
"
>
<q-tooltip
:offset=
"[20, 10]"
>
{{
$t
(
'managingUnitAdd.toolTipMessage.updateInfo'
)
...
...
src/components/managingunits/add-new-managingunits-dialog/update-new-artist-dialog/NewUpdateArtist.ts
View file @
4765c90f
import
{
defineComponent
}
from
'vue'
;
import
{
defineComponent
,
Ref
,
ref
,
watch
}
from
'vue'
;
import
{
i18n
}
from
'src/boot/i18n'
;
export
default
defineComponent
({
...
...
@@ -7,40 +7,54 @@ export default defineComponent({
type
:
Boolean
,
required
:
true
,
},
nameUpdateOptions
:
{
type
:
Array
,
required
:
true
},
nameAddOptions
:
{
type
:
Array
,
required
:
true
},
fieldsAddOptions
:
{
type
:
Array
,
required
:
true
},
fieldsUpdate
:
{
type
:
Number
,
required
:
true
},
nameUpdate
:
{
type
:
Number
,
required
:
true
},
fieldsAddOptions
:
{
type
:
Array
,
required
:
true
},
fieldsUpdate
:
{
type
:
Number
,
required
:
true
},
timeUpdateTo
:
{
type
:
String
,
required
:
true
},
timeUpdate
:
{
type
:
String
,
required
:
true
},
statusUpdate
:
{
type
:
Boolean
,
required
:
true
},
statusUpdate
:
{
type
:
Number
,
required
:
true
},
},
setup
()
{
setup
(
props
,
context
)
{
watch
(
()
=>
props
.
openUpdateArtistDialog
,
(
value
)
=>
{
if
(
!
value
)
{
context
.
emit
(
'update:nameUpdate'
,
undefined
);
timeUpdateForm
.
value
=
''
;
timeUpdateTo
.
value
=
''
;
context
.
emit
(
'update:fieldsUpdate'
,
undefined
);
context
.
emit
(
'update:statusUpdate'
,
1
);
}
}
);
const
timeUpdateForm
:
Ref
<
string
|
undefined
>
=
ref
();
const
timeUpdateTo
:
Ref
<
string
|
undefined
>
=
ref
();
const
nameUpdateRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'managingUnitAdd.validateMessages.requireNameUpdate'
),
];
const
timeUpdateToRules
=
[
const
fieldsUpdateRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'managingUnitAdd.validateMessages.requireFieldsUpdate'
),
];
const
timeUpdateFormRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'managingUnitAdd.validateMessages.requireTimeUpdate
To
'
),
i18n
.
global
.
t
(
'managingUnitAdd.validateMessages.requireTimeUpdate
Form
'
),
];
const
fieldsUpdateRules
=
[
(
val
?:
number
)
=>
val
!==
undefined
||
i18n
.
global
.
t
(
'managingUnitAdd.validateMessages.requireFieldsUpdate'
),
];
const
timeUpdateRules
=
[
const
timeUpdateToRules
=
[
(
val
?:
string
)
=>
(
val
&&
val
.
trim
().
length
)
||
i18n
.
global
.
t
(
'managingUnitAdd.validateMessages.requireTimeUpdate'
),
i18n
.
global
.
t
(
'managingUnitAdd.validateMessages.requireTimeUpdate
To
'
),
];
return
{
nameUpdateRules
,
timeUpdateToRules
,
fieldsUpdateRules
,
timeUpdateRules
,
nameUpdateRules
,
fieldsUpdateRules
,
timeUpdateFormRules
,
timeUpdateToRules
,
timeUpdateForm
,
timeUpdateTo
,
};
},
emits
:
[
...
...
@@ -48,8 +62,8 @@ export default defineComponent({
'click:CloseBtn'
,
'update:nameUpdate'
,
'update:timeUpdateTo'
,
'update:timeUpdateForm'
,
'update:fieldsUpdate'
,
'update:timeUpdate'
,
'update:statusUpdate'
,
'updateNewManagingUnitsArtist'
,
],
...
...
src/components/managingunits/add-new-managingunits-dialog/update-new-artist-dialog/index.vue
View file @
4765c90f
...
...
@@ -5,7 +5,13 @@
@
update:model-value=
"$emit('update:openUpdateArtistDialog', $event)"
>
<q-card
style=
"min-width: 700px"
bordered
>
<q-form
greedy
@
submit
.
prevent=
"$emit('updateNewManagingUnitsArtist')"
>
<q-form
greedy
@
submit
.
prevent=
"
$emit('updateNewManagingUnitsArtist', timeUpdateForm, timeUpdateTo);
$emit('click:CloseBtn');
"
>
<q-card-section>
<q-item>
<q-item-section>
...
...
@@ -28,36 +34,31 @@
"
:options=
"fieldsAddOptions"
:rules=
"fieldsUpdateRules"
emit-value
map-options
option-value=
"id"
option-label=
"name"
class=
"q-my-sm"
outlined
hide-bottom-space
clearable
></q-select>
<q-input
:model-value=
"timeUpdate"
@
update:model-value=
"$emit('update:timeUpdate', $event)"
:model-value=
"timeUpdate
Form
"
@
update:model-value=
"$emit('update:timeUpdate
Form
', $event)"
:label=
"
$t('managingUnitAdd.dialogLabel.fieldLabels.timeUpdate')
$t('managingUnitAdd.dialogLabel.fieldLabels.timeUpdate
Form
')
"
class=
"q-my-sm"
mask=
"date"
outlined
:rules=
"timeUpdateRules"
:rules=
"timeUpdate
Form
Rules"
readonly
>
<template
v-slot:append
>
><template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"timeUpdate"
>
<q-date
v-model=
"timeUpdate
Form"
mask=
"DD/MM/YYYY
"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
...
...
@@ -68,34 +69,46 @@
</div>
</q-date>
</q-popup-proxy>
</q-icon>
</
template
>
</q-input>
</q-icon>
</
template
></q-input>
<div>
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
><q-toggle
:model-value=
"statusUpdate"
:true-value=
"1"
:false-value=
"2"
@
update:model-value=
"$emit('update:statusUpdate', $event)"
/>
</div>
</div>
<div
class=
"col-6"
>
<div>
<q-select
:model-value=
"nameUpdate"
:disable=
"!fieldsUpdate"
@
update:model-value=
"$emit('update:nameUpdate', $event)"
:label=
"
$t('managingUnitAdd.dialogLabel.fieldLabels.nameUpdate')
"
:options=
"nameUpdateOptions"
:disable=
"!fieldsUpdate"
:options=
"nameAddOptions"
:rules=
"nameUpdateRules"
hide-bottom-space
emit-value
map-options
emit-value
option-value=
"id"
option-label=
"
text
"
option-label=
"
fullName
"
class=
"q-my-sm"
outlined
clearable
></q-select>
<q-tooltip
v-if=
"!fieldsUpdate"
>
</q-select
><q-tooltip
v-if=
"!fieldsUpdate"
>
Vui lòng chọn Lĩnh vực
</q-tooltip
>
</div>
<q-input
:model-value=
"timeUpdateTo"
@
update:model-value=
"$emit('update:timeUpdateTo', $event)"
...
...
@@ -103,19 +116,17 @@
$t('managingUnitAdd.dialogLabel.fieldLabels.timeUpdateTo')
"
class=
"q-my-sm"
mask=
"date"
outlined
:rules=
"timeUpdateToRules"
readonly
>
<
template
v-slot:append
>
><
template
v-slot:append
>
<q-icon
name=
"event"
class=
"cursor-pointer"
>
<q-popup-proxy
ref=
"qDateProxy"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-date
v-model=
"timeUpdateTo"
>
<q-date
v-model=
"timeUpdateTo"
mask=
"DD/MM/YYYY"
>
<div
class=
"row items-center justify-end"
>
<q-btn
v-close-popup
...
...
@@ -129,15 +140,6 @@
</q-icon>
</
template
>
</q-input>
<div
class=
"q-pr-sm"
>
<span
class=
"text-body1"
>
{{
$t('managingUnitAdd.dialogLabel.fieldLabels.status')
}}
</span
><q-toggle
:model-value=
"statusUpdate"
@
update:model-value=
"$emit('update:statusUpdate', $event)"
/>
</div>
</div>
</div>
</q-card-section>
...
...
src/pages/don-vi-chu-quan/ManagingUnit.ts
View file @
4765c90f
...
...
@@ -184,7 +184,7 @@ export default defineComponent({
// },
{
name
:
'nameAdd'
,
field
:
'
nameAdd
'
,
field
:
'
fullName
'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.nameAdd'
),
headerStyle
:
'text-align: center !important;'
,
...
...
@@ -193,7 +193,7 @@ export default defineComponent({
},
{
name
:
'myedityAdd'
,
field
:
'
myedityAdd
'
,
field
:
'
artistName
'
,
required
:
true
,
label
:
i18n
.
global
.
t
(
'managingUnitAdd.tableColumns.myedityAdd'
),
headerStyle
:
'text-align: center !important;'
,
...
...
@@ -202,7 +202,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;'
,
...
...
@@ -239,7 +239,7 @@ export default defineComponent({
];
const
managingUnitTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
managingUnitUpdateTableRows
:
Ref
<
unknown
[]
>
=
ref
([]);
const
getListAddUnit
=
()
=>
{
// const response = (await api({
// url: API_PATHS.getListArtist,
...
...
@@ -468,7 +468,6 @@ export default defineComponent({
getFieldOptions
,
getListUpdateUnit
,
showDialogUpdate
,
managingUnitUpdateTableRows
,
managingUnitUpdateTableColumns
,
updateNewManagingUnits
,
confirmUpdateManagingUnits
,
...
...
src/pages/don-vi-chu-quan/index.vue
View file @
4765c90f
...
...
@@ -138,7 +138,6 @@
v-model:phone-number=
"phoneNumber"
v-model:status=
"status"
v-model:fields=
"fields"
v-model:managing-unit-update-table-rows=
"managingUnitUpdateTableRows"
v-model:managing-unit-update-table-columns=
"
managingUnitUpdateTableColumns
"
...
...
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