ปรับ ui การลา
This commit is contained in:
parent
e83cec126f
commit
18733051d6
3 changed files with 223 additions and 205 deletions
|
|
@ -62,7 +62,7 @@ const score = reactive([
|
|||
{ no: 9, score: "" },
|
||||
{ no: 10, score: "" },
|
||||
]);
|
||||
const scoreTotal = ref<number|string>('');
|
||||
const scoreTotal = ref<number | string>("");
|
||||
|
||||
const reasonWorkOther = ref("");
|
||||
// const reasonWork_option = ref<any>([
|
||||
|
|
@ -218,7 +218,6 @@ async function fecthquestion() {
|
|||
.get(config.API.questionnaireList())
|
||||
.then((result) => {
|
||||
const data = result.data.result;
|
||||
console.log(data);
|
||||
// คำถามแบบสอบถามหลัก
|
||||
for (let i = 1; i <= 10; i++) {
|
||||
questionDesc[`question${i}Desc`] =
|
||||
|
|
@ -249,18 +248,24 @@ async function fecthquestion() {
|
|||
value: index,
|
||||
})
|
||||
);
|
||||
question7Answer.value = data.question7Answer.map((e: any) => ({
|
||||
label: e,
|
||||
value: e == "ไม่มี" ? false : true,
|
||||
}));
|
||||
question8Answer.value = data.question8Answer.map((e: any) => ({
|
||||
label: e,
|
||||
value: e == "แนะนำ" ? true : false,
|
||||
}));
|
||||
question9Answer.value = data.question9Answer.map((e: any) => ({
|
||||
label: e,
|
||||
value: e == "อยาก" ? true : false,
|
||||
}));
|
||||
question7Answer.value = data.question7Answer.map(
|
||||
(e: any, index: number) => ({
|
||||
label: e,
|
||||
value: index,
|
||||
})
|
||||
);
|
||||
question8Answer.value = data.question8Answer.map(
|
||||
(e: any, index: number) => ({
|
||||
label: e,
|
||||
value: index,
|
||||
})
|
||||
);
|
||||
question9Answer.value = data.question9Answer.map(
|
||||
(e: any, index: number) => ({
|
||||
label: e,
|
||||
value: index,
|
||||
})
|
||||
);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -273,18 +278,20 @@ watch(score, () => {
|
|||
}, 0);
|
||||
});
|
||||
const saveClick = () => {
|
||||
if (comment.value === "" ||
|
||||
score[0].score === "" ||
|
||||
score[1].score === "" ||
|
||||
score[2].score === "" ||
|
||||
score[3].score === "" ||
|
||||
score[4].score === "" ||
|
||||
score[5].score === "" ||
|
||||
score[6].score === "" ||
|
||||
score[7].score === "" ||
|
||||
score[8].score === "" ||
|
||||
score[9].score === "" ||
|
||||
scoreTotal.value === "") {
|
||||
if (
|
||||
comment.value === "" ||
|
||||
score[0].score === "" ||
|
||||
score[1].score === "" ||
|
||||
score[2].score === "" ||
|
||||
score[3].score === "" ||
|
||||
score[4].score === "" ||
|
||||
score[5].score === "" ||
|
||||
score[6].score === "" ||
|
||||
score[7].score === "" ||
|
||||
score[8].score === "" ||
|
||||
score[9].score === "" ||
|
||||
scoreTotal.value === ""
|
||||
) {
|
||||
dialogMessageNotify($q, "กรุณากรอกคะแนน เเละ ความคิดเห็น");
|
||||
} else {
|
||||
dialogConfirm($q, () => putData());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue