เเก้ไข UI detailLeave
comment code retirement
This commit is contained in:
parent
b0cd3af1ad
commit
ee2eba56a1
13 changed files with 470 additions and 266 deletions
|
|
@ -3,7 +3,6 @@ import { onMounted, reactive, ref } from "vue";
|
|||
import { useQuasar } from "quasar";
|
||||
import { useRouter } from "vue-router";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
// import keycloak from "@/plugins/keycloak";
|
||||
|
|
@ -14,10 +13,12 @@ const $q = useQuasar();
|
|||
const router = useRouter();
|
||||
const mixin = useCounterMixin();
|
||||
|
||||
const { messageError, showLoader, hideLoader,dialogConfirm ,success} = mixin;
|
||||
const { messageError, showLoader, hideLoader, dialogConfirm, success } = mixin;
|
||||
|
||||
/**
|
||||
* ฟอร์มคำถาม
|
||||
*/
|
||||
const myForm = ref<QForm | null>(null);
|
||||
|
||||
// set คำถามที่ 1
|
||||
const question1Desc = ref<string>(
|
||||
"เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร (เลือกได้มากกว่า 1 ข้อ)"
|
||||
|
|
@ -59,7 +60,6 @@ const question3Answer = ref<any>([
|
|||
"การพัฒนาอย่างเป็นระบบและต่อเนื่อง",
|
||||
"โอกาสความก้าวหน้า",
|
||||
]);
|
||||
|
||||
// set คำถามที่ 4
|
||||
const question4Desc = ref<string>(
|
||||
"อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง (เลือกได้มากกว่า 1 ข้อ)"
|
||||
|
|
@ -82,18 +82,17 @@ const question4Answer = ref<any>([
|
|||
"การพัฒนาอย่างเป็นระบบและต่อเนื่อง",
|
||||
"โอกาสความก้าวหน้า",
|
||||
]);
|
||||
|
||||
// set คำถามที่ 5
|
||||
const question5Desc = ref<string>(
|
||||
"โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร ?"
|
||||
);
|
||||
const question5Answer = ref<any>([])
|
||||
const question5Answer = ref<any>([]);
|
||||
const question5Score = ref<number>(0);
|
||||
// set คำถามที่ 6
|
||||
const question6Desc = ref<string>(
|
||||
"ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"
|
||||
);
|
||||
const question6Answer = ref<any>([])
|
||||
const question6Answer = ref<any>([]);
|
||||
const question6Score = ref<number>(0);
|
||||
// set คำถามที่ 7
|
||||
const question7Desc = ref<string>(
|
||||
|
|
@ -101,14 +100,12 @@ const question7Desc = ref<string>(
|
|||
);
|
||||
const question7Score = ref<number>(0);
|
||||
const question7Answer = ref<any>(["มี (ระบุ)", "ไม่มี"]);
|
||||
|
||||
// set คำถามที่ 8
|
||||
const question8Desc = ref<string>(
|
||||
"ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่ (ถ้าไม่ โปรดระบุเหตุผล)"
|
||||
);
|
||||
const question8Score = ref<number>(0);
|
||||
const question8Answer = ref<any>(["แนะนำ", "ไม่แนะนำ (ระบุ)"]);
|
||||
|
||||
// set คำถามที่ 9
|
||||
const question9Desc = ref<string>(
|
||||
"หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่ (ถ้าไม่ โปรดระบุเหตุผล)"
|
||||
|
|
@ -117,9 +114,12 @@ const question9Score = ref<number>(0);
|
|||
const question9Answer = ref<any>(["อยาก", "ไม่อยาก (ระบุ)"]);
|
||||
// set คำถามที่ 10
|
||||
const question10Desc = ref<string>("ความคิดเห็นและข้อเสนอแนะอื่น ๆ");
|
||||
const question10Answer = ref<any>([])
|
||||
const question10Answer = ref<any>([]);
|
||||
const question10Score = ref<number>(0);
|
||||
|
||||
/**
|
||||
* ตัวเลือกแบบสอบถาม(จำลอง)
|
||||
*/
|
||||
const exitFactor = ref<any>([]);
|
||||
const reasonWork = ref<any>([]);
|
||||
const adjust = ref<any>([]);
|
||||
|
|
@ -166,6 +166,9 @@ const adjust_option = ref<any>([
|
|||
// { label: "อื่น ๆ (ระบุ) ", value: 15 },
|
||||
]);
|
||||
|
||||
/**
|
||||
* HOOK
|
||||
*/
|
||||
onMounted(async () => {
|
||||
await getData();
|
||||
});
|
||||
|
|
@ -187,26 +190,26 @@ const getData = async () => {
|
|||
question8Score.value = data.question8Score ?? 0;
|
||||
question9Score.value = data.question9Score ?? 0;
|
||||
question10Score.value = data.question10Score ?? 0;
|
||||
question1Desc.value = data.question1Desc
|
||||
question1Answer.value = data.question1Answer
|
||||
question2Desc.value = data.question2Desc
|
||||
question2Answer.value = data.question2Answer
|
||||
question3Desc.value = data.question3Desc
|
||||
question3Answer.value = data.question3Answer
|
||||
question4Desc.value = data.question4Desc
|
||||
question4Answer.value = data.question4Answer
|
||||
question5Desc.value = data.question5Desc
|
||||
question5Answer.value = data.question5Answer
|
||||
question6Desc.value = data.question6Desc
|
||||
question6Answer.value = data.question6Answer
|
||||
question7Desc.value = data.question7Desc
|
||||
question7Answer.value = data.question7Answer
|
||||
question8Desc.value = data.question8Desc
|
||||
question8Answer.value = data.question8Answer
|
||||
question9Desc.value = data.question9Desc
|
||||
question9Answer.value = data.question9Answer
|
||||
question10Desc.value = data.question10Desc
|
||||
question10Answer.value = data.question10Answer
|
||||
question1Desc.value = data.question1Desc;
|
||||
question1Answer.value = data.question1Answer;
|
||||
question2Desc.value = data.question2Desc;
|
||||
question2Answer.value = data.question2Answer;
|
||||
question3Desc.value = data.question3Desc;
|
||||
question3Answer.value = data.question3Answer;
|
||||
question4Desc.value = data.question4Desc;
|
||||
question4Answer.value = data.question4Answer;
|
||||
question5Desc.value = data.question5Desc;
|
||||
question5Answer.value = data.question5Answer;
|
||||
question6Desc.value = data.question6Desc;
|
||||
question6Answer.value = data.question6Answer;
|
||||
question7Desc.value = data.question7Desc;
|
||||
question7Answer.value = data.question7Answer;
|
||||
question8Desc.value = data.question8Desc;
|
||||
question8Answer.value = data.question8Answer;
|
||||
question9Desc.value = data.question9Desc;
|
||||
question9Answer.value = data.question9Answer;
|
||||
question10Desc.value = data.question10Desc;
|
||||
question10Answer.value = data.question10Answer;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -216,53 +219,53 @@ const getData = async () => {
|
|||
});
|
||||
};
|
||||
|
||||
const confirmClick = () =>{
|
||||
dialogConfirm($q,()=>putData())
|
||||
}
|
||||
/**
|
||||
* ฟังก์ชั่นเช็คข้อมูลก่อนคอนเฟริม
|
||||
*/
|
||||
const confirmClick = () => {
|
||||
dialogConfirm($q, () => putData());
|
||||
};
|
||||
const putData = () => {
|
||||
const body = {
|
||||
question1Desc:question1Desc.value,
|
||||
question1Score:question1Score.value,
|
||||
question1Answer:question1Answer.value,
|
||||
question1Desc: question1Desc.value,
|
||||
question1Score: question1Score.value,
|
||||
question1Answer: question1Answer.value,
|
||||
|
||||
question2Desc:question2Desc.value,
|
||||
question2Score:question2Score.value,
|
||||
question2Answer:question2Answer.value,
|
||||
question2Desc: question2Desc.value,
|
||||
question2Score: question2Score.value,
|
||||
question2Answer: question2Answer.value,
|
||||
|
||||
question3Desc:question3Desc.value,
|
||||
question3Score:question3Score.value,
|
||||
question3Answer:question3Answer.value,
|
||||
question3Desc: question3Desc.value,
|
||||
question3Score: question3Score.value,
|
||||
question3Answer: question3Answer.value,
|
||||
|
||||
question4Desc:question4Desc.value,
|
||||
question4Score:question4Score.value,
|
||||
question4Answer:question4Answer.value,
|
||||
question4Desc: question4Desc.value,
|
||||
question4Score: question4Score.value,
|
||||
question4Answer: question4Answer.value,
|
||||
|
||||
question5Desc:question5Desc.value,
|
||||
question5Score:question5Score.value,
|
||||
question5Answer:question5Answer.value,
|
||||
question5Desc: question5Desc.value,
|
||||
question5Score: question5Score.value,
|
||||
question5Answer: question5Answer.value,
|
||||
|
||||
question6Desc:question6Desc.value,
|
||||
question6Score:question6Score.value,
|
||||
question6Answer:question6Answer.value,
|
||||
question6Desc: question6Desc.value,
|
||||
question6Score: question6Score.value,
|
||||
question6Answer: question6Answer.value,
|
||||
|
||||
question7Desc:question7Desc.value,
|
||||
question7Score:question7Score.value,
|
||||
question7Answer:question7Answer.value,
|
||||
|
||||
question8Desc:question8Desc.value,
|
||||
question8Score:question8Score.value,
|
||||
question8Answer:question8Answer.value,
|
||||
|
||||
question9Desc:question9Desc.value,
|
||||
question9Score:question9Score.value,
|
||||
question9Answer:question9Answer.value,
|
||||
|
||||
question10Desc:question10Desc.value,
|
||||
question10Score:question10Score.value,
|
||||
question10Answer:question10Answer.value,
|
||||
question7Desc: question7Desc.value,
|
||||
question7Score: question7Score.value,
|
||||
question7Answer: question7Answer.value,
|
||||
|
||||
question8Desc: question8Desc.value,
|
||||
question8Score: question8Score.value,
|
||||
question8Answer: question8Answer.value,
|
||||
|
||||
question9Desc: question9Desc.value,
|
||||
question9Score: question9Score.value,
|
||||
question9Answer: question9Answer.value,
|
||||
|
||||
question10Desc: question10Desc.value,
|
||||
question10Score: question10Score.value,
|
||||
question10Answer: question10Answer.value,
|
||||
};
|
||||
showLoader();
|
||||
http
|
||||
|
|
@ -274,9 +277,9 @@ const putData = () => {
|
|||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
router.push(`/exit-Interview`)
|
||||
router.push(`/exit-Interview`);
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<div class="toptitle text-dark col-12 row items-center">
|
||||
|
|
@ -926,7 +929,8 @@ const putData = () => {
|
|||
|
||||
<q-card-actions class="text-primary q-pa-md">
|
||||
<q-space />
|
||||
<q-btn unelevated label="บันทึก" color="public" @click="confirmClick"> </q-btn>
|
||||
<q-btn unelevated label="บันทึก" color="public" @click="confirmClick">
|
||||
</q-btn>
|
||||
</q-card-actions>
|
||||
</q-form>
|
||||
</q-card>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue