แก้ 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,
|
name: data.groupName,
|
||||||
};
|
};
|
||||||
position.value = data.positions.map((i: any) => i.name);
|
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(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
|
|
@ -228,7 +231,7 @@ function onSubmit() {
|
||||||
const body = {
|
const body = {
|
||||||
kpiGroupId: groupName.value.id,
|
kpiGroupId: groupName.value.id,
|
||||||
positions: position.value,
|
positions: position.value,
|
||||||
kpiCapacityIds: competency.value,
|
kpiCapacityIds: competency.value.map((i:any)=> i.id)
|
||||||
};
|
};
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, () => {
|
||||||
http[editStatus.value ? "put" : "post"](url, body)
|
http[editStatus.value ? "put" : "post"](url, body)
|
||||||
|
|
@ -241,6 +244,7 @@ function onSubmit() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
modal.value = false;
|
modal.value = false;
|
||||||
editStatus.value = false;
|
editStatus.value = false;
|
||||||
|
|
@ -543,7 +547,6 @@ onMounted(async () => {
|
||||||
v-model="competency"
|
v-model="competency"
|
||||||
label="สมรรถนะประจำกลุ่ม"
|
label="สมรรถนะประจำกลุ่ม"
|
||||||
outlined
|
outlined
|
||||||
emit-value
|
|
||||||
multiple
|
multiple
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue