แก้ save knowledges

This commit is contained in:
STW_TTTY\stwtt 2024-08-30 17:42:22 +07:00
parent 02c5b1b7c4
commit bda83218d9

View file

@ -533,6 +533,7 @@ function putDataEdit(id: string) {
});
const know_ledge = knowledge.value.map((item) => ({
id: item ? item.id : null,
level: item ? item.level : null,
}));
@ -684,6 +685,7 @@ function putData(id: string) {
}
});
const know_ledge = knowledge.value.map((item) => ({
id: item ? item.id : null,
level: item ? item.level : null,
}));
@ -807,6 +809,7 @@ function putData(id: string) {
* @param id personal id
*/
async function saveData(id: string) {
const data = putData(id);
dialogConfirm($q, async () => await DataSave(id));
}
@ -857,7 +860,10 @@ async function getAssign() {
chairman.value = data.chairman;
commander.value = data.commander;
knowledge.value = data.knowledges
knowledge.value = data.knowledges.map((opItem: any) => {
return OPknowledge.value.find((dataItem: any) => dataItem.id === opItem.id);
})
knowledgeCount.value = data.knowledges.length;
other_desc.value = data.assign.other_desc;
other4_desc.value = data.assign.other4_desc;