เเก้ ดาต้าเป็น null เเล้วปุ่มบันทึกไม่มา
This commit is contained in:
parent
b25fab71a4
commit
c1935a0c6b
1 changed files with 5 additions and 12 deletions
|
|
@ -49,16 +49,6 @@ onMounted(() => {
|
||||||
getSurveyData();
|
getSurveyData();
|
||||||
});
|
});
|
||||||
|
|
||||||
const saveEdit = (id: string) => {
|
|
||||||
dialogConfirm($q, () => console.log("save"));
|
|
||||||
};
|
|
||||||
const edit = () => {
|
|
||||||
status.value = true;
|
|
||||||
};
|
|
||||||
const cancel = () => {
|
|
||||||
status.value = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
const getSurveyData = async () => {
|
const getSurveyData = async () => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.summarySurveyDetail(assignId.value))
|
.get(config.API.summarySurveyDetail(assignId.value))
|
||||||
|
|
@ -68,8 +58,8 @@ const getSurveyData = async () => {
|
||||||
answer1.value = data.answer1;
|
answer1.value = data.answer1;
|
||||||
answer2.value = data.answer2;
|
answer2.value = data.answer2;
|
||||||
answer3.value = data.answer3;
|
answer3.value = data.answer3;
|
||||||
|
status.value = false;
|
||||||
}
|
}
|
||||||
status.value = false;
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
|
@ -92,7 +82,10 @@ const save = async () => {
|
||||||
})
|
})
|
||||||
.catch((e: any) => {
|
.catch((e: any) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
});
|
})
|
||||||
|
.finally(()=>{
|
||||||
|
getSurveyData()
|
||||||
|
})
|
||||||
});
|
});
|
||||||
} else if (answer3.value == 0) {
|
} else if (answer3.value == 0) {
|
||||||
classBordered.value = "border_custom";
|
classBordered.value = "border_custom";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue