แก้ map
This commit is contained in:
parent
0aea0464dc
commit
15d174a98c
1 changed files with 6 additions and 3 deletions
|
|
@ -214,7 +214,10 @@ function getDataEdit(id: string) {
|
|||
name: data.groupName,
|
||||
};
|
||||
position.value = data.positions.map((i: any) => i.name);
|
||||
competency.value = data.capacitys.map((i: any) => i.id);
|
||||
competency.value = data.capacitys.map((i: any) => ({
|
||||
id:i.id,
|
||||
name:i.name
|
||||
}));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
|
|
@ -228,7 +231,7 @@ function onSubmit() {
|
|||
const body = {
|
||||
kpiGroupId: groupName.value.id,
|
||||
positions: position.value,
|
||||
kpiCapacityIds: competency.value,
|
||||
kpiCapacityIds: competency.value.map((i:any)=> i.id)
|
||||
};
|
||||
dialogConfirm($q, () => {
|
||||
http[editStatus.value ? "put" : "post"](url, body)
|
||||
|
|
@ -241,6 +244,7 @@ function onSubmit() {
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
function close() {
|
||||
modal.value = false;
|
||||
editStatus.value = false;
|
||||
|
|
@ -543,7 +547,6 @@ onMounted(async () => {
|
|||
v-model="competency"
|
||||
label="สมรรถนะประจำกลุ่ม"
|
||||
outlined
|
||||
emit-value
|
||||
multiple
|
||||
map-options
|
||||
option-label="name"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue