Merge branch 'develop' into working

This commit is contained in:
Kittapath 2023-10-09 15:56:02 +07:00
commit f4dfa11ce1
7 changed files with 713 additions and 235 deletions

View file

@ -30,6 +30,8 @@ export default {
resignConfirm: (role: String, id: string) => `${retirement}/resign/${role}/confirm/${id}`, resignConfirm: (role: String, id: string) => `${retirement}/resign/${role}/confirm/${id}`,
resignReject: (role: String, id: string) => `${retirement}/resign/${role}/reject/${id}`, resignReject: (role: String, id: string) => `${retirement}/resign/${role}/reject/${id}`,
listExitInterview: () => `${retirement}/resign/questionnaire`, listExitInterview: () => `${retirement}/resign/questionnaire`,
commentExitInterview: (id:string) => `${retirement}/resign/questionnaire/comment/${id}`,
questionExitInterview: () => `${retirement}/resign/questionnaire/question`,
ExitInterviewByid: (id: string) => `${retirement}/resign/questionnaire/${id}`, ExitInterviewByid: (id: string) => `${retirement}/resign/questionnaire/${id}`,
ExitInterviewReport: `${retirement}/resign/questionnaire/report`, ExitInterviewReport: `${retirement}/resign/questionnaire/report`,
AppointInterview: (id: string) => `${retirement}/resign/questionnaire/appoint/${id}`, AppointInterview: (id: string) => `${retirement}/resign/questionnaire/appoint/${id}`,
@ -54,7 +56,10 @@ export default {
fileRetirement: (id: string) => `${retirement}/upload/${id}`, fileRetirement: (id: string) => `${retirement}/upload/${id}`,
checkfileupload: (id: string) => `${retirement}/upload/check/${id}`, checkfileupload: (id: string) => `${retirement}/upload/check/${id}`,
editDetail: (retireId: string) => `${retirement}/detail/${retireId}` editDetail: (retireId: string) => `${retirement}/detail/${retireId}`,
// ตำถาม Exit interview
questionnaireList: () => `${retirement}/resign/questionnaire/question`
}; };

View file

@ -113,6 +113,7 @@ const guidCheck = (id: string) => {
}; };
const fetchData = async () => { const fetchData = async () => {
storePersonal.loading = false;
showLoader(); showLoader();
await http await http
.get(config.API.placementPersonalId(examId.value)) .get(config.API.placementPersonalId(examId.value))
@ -256,8 +257,8 @@ const fetchData = async () => {
รายละเอยดของ {{ personalData.fullName }} รายละเอยดของ {{ personalData.fullName }}
</div> </div>
</div> </div>
<div class="q-pb-lg" v-if="storePersonal.loading"> <div class="q-pb-lg">
<q-card class="row q-pb-lg"> <q-card class="row q-pb-lg" v-if="storePersonal.loading">
<div id="information" name="1" class="col-12 q-pa-sm"> <div id="information" name="1" class="col-12 q-pa-sm">
<Informationvue <Informationvue
v-model:statusEdit="statusEdit" v-model:statusEdit="statusEdit"

View file

@ -30,7 +30,7 @@
round round
color="blue" color="blue"
icon="mdi-download-outline" icon="mdi-download-outline"
@click="downloadData(file.file)" @click="downloadData(file.pathName)"
> >
<q-tooltip>ดาวนโหลดเอกสารหลกฐาน</q-tooltip> <q-tooltip>ดาวนโหลดเอกสารหลกฐาน</q-tooltip>
</q-btn> </q-btn>
@ -43,7 +43,7 @@
color="red" color="red"
icon="mdi-delete-outline" icon="mdi-delete-outline"
v-show="edit" v-show="edit"
@click="deleteData(file.id)" @click="deleteData(file.docId)"
> >
<q-tooltip>ลบเอกสารหลกฐาน</q-tooltip> <q-tooltip>ลบเอกสารหลกฐาน</q-tooltip>
</q-btn> </q-btn>
@ -168,7 +168,7 @@ const emit = defineEmits(["update:statusEdit"]);
const $q = useQuasar(); // show dialog const $q = useQuasar(); // show dialog
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const route = useRoute(); const route = useRoute();
const { success, messageError, showLoader, hideLoader } = mixin; const { success, messageError, showLoader, dialogConfirm } = mixin;
const profileId = ref<string>( const profileId = ref<string>(
route.params.personalId ? route.params.personalId.toString() : "" route.params.personalId ? route.params.personalId.toString() : ""
); );
@ -206,18 +206,25 @@ const getData = async () => {
}; };
const deleteData = async (id: string) => { const deleteData = async (id: string) => {
showLoader(); dialogConfirm(
await http $q,
.delete(config.API.documentDelid(profileId.value, id)) async () => {
.then(() => { showLoader();
success($q, "ลบไฟล์เอกสารสำเร็จ"); await http
}) .delete(config.API.documentDelid(profileId.value, id))
.catch((e) => { .then(() => {
messageError($q, e); success($q, "ลบไฟล์เอกสารสำเร็จ");
}) })
.finally(async () => { .catch((e) => {
await props.fetch(); messageError($q, e);
}); })
.finally(async () => {
await props.fetch();
});
},
"ยืนยันการลบเอกสารหลักฐาน",
"ต้องการยืนยันการลบเอกสารหลักฐานนี้หรือไม่ ?"
);
}; };
const uploadData = async () => { const uploadData = async () => {
@ -228,7 +235,7 @@ const uploadData = async () => {
type: file.value[0].type, type: file.value[0].type,
}); });
const formData = new FormData(); const formData = new FormData();
formData.append("docs", newFile); formData.append("file", newFile);
// formData.append("moss", "newFile"); // formData.append("moss", "newFile");
showLoader(); showLoader();
await http await http
@ -240,11 +247,11 @@ const uploadData = async () => {
messageError($q, e); messageError($q, e);
}) })
.finally(async () => { .finally(async () => {
await props.fetch();
uploader.value.reset(); uploader.value.reset();
name.value = ""; name.value = "";
edit.value = false; edit.value = false;
emit("update:statusEdit", false); emit("update:statusEdit", false);
await props.fetch();
}); });
// } else { // } else {
// // modalError( // // modalError(

View file

@ -6,11 +6,13 @@ import type { Information } from "@/modules/05_placement/components/PersonalDeta
export const usePersonalDataStore = defineStore("personal-detail", () => { export const usePersonalDataStore = defineStore("personal-detail", () => {
const dataMain = ref<any>([]) const dataMain = ref<any>([])
const loading = ref<boolean>(false) const loading = ref<boolean>(false)
function fecthDataInformation(data: Information) { function fecthDataInformation(data: Information) {
dataMain.value = data dataMain.value = data
dataMain.value.length !== 0 ? loading.value = true : loading.value = false if (dataMain.value) {
loading.value = true
} else {
loading.value = false
}
} }
return { return {

View file

@ -4,8 +4,8 @@ import { useQuasar } from "quasar";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
// import http from "@/plugins/http"; import http from "@/plugins/http";
// import config from "@/app.config"; import config from "@/app.config";
// import keycloak from "@/plugins/keycloak"; // import keycloak from "@/plugins/keycloak";
import type { QForm } from "quasar"; import type { QForm } from "quasar";
@ -14,7 +14,7 @@ const $q = useQuasar();
const router = useRouter(); const router = useRouter();
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const { messageError, showLoader, hideLoader } = mixin; const { messageError, showLoader, hideLoader,dialogConfirm ,success} = mixin;
const myForm = ref<QForm | null>(null); const myForm = ref<QForm | null>(null);
@ -22,28 +22,14 @@ const myForm = ref<QForm | null>(null);
const question1Desc = ref<string>( const question1Desc = ref<string>(
"เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร (เลือกได้มากกว่า 1 ข้อ)" "เหตุใดท่านจึงตัดสินใจร่วมงานกับกรุงเทพมหานคร (เลือกได้มากกว่า 1 ข้อ)"
); );
const question1Score = ref<number>(5); const question1Score = ref<number>(0);
const question1Answer = ref<any>([ const question1Answer = ref<any>([]);
"ความมั่นคงในการทำงาน",
"สิทธิประโยชน์/สวัสดิการ",
"อัตราเงินเดือน",
"ลักษณะงาน",
"วัฒนธรรมการทำงานของข้าราชการ",
"นโยบายของหน่วยงาน",
"ระบบการทำงาน",
"สมดุลชีวิตการทำงาน",
"บรรยากาศในการทำงาน",
"การพัฒนาในสายอาชีพ",
"โอกาสความก้าวหน้า",
"การได้รับการยอมรับจากสังคม",
// " ()",
]);
// set 2 // set 2
const question2Desc = ref<string>( const question2Desc = ref<string>(
"สำหรับการลาออกในครั้งนี ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด" "สำหรับการลาออกในครั้งนี ท่านได้คิดทบทวนอย่างจริงจังเป็นระยะเวลานานเท่าใด"
); );
const question2Score = ref<number>(5); const question2Score = ref<number>(0);
const question2Answer = ref<any>([ const question2Answer = ref<any>([
"น้อยกว่า 2 สัปดาห์", "น้อยกว่า 2 สัปดาห์",
"1 เดือน - 3 เดือน", "1 เดือน - 3 เดือน",
@ -55,7 +41,7 @@ const question2Answer = ref<any>([
const question3Desc = ref<string>( const question3Desc = ref<string>(
"ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ (เลือกได้มากกว่า 1 ข้อ)" "ปัจจัยใดที่ทำให้ท่านตัดสินใจลาออกจากราชการ (เลือกได้มากกว่า 1 ข้อ)"
); );
const question3Score = ref<number>(5); const question3Score = ref<number>(0);
const question3Answer = ref<any>([ const question3Answer = ref<any>([
"อัตราเงินเดือน", "อัตราเงินเดือน",
"สวัสดิการ", "สวัสดิการ",
@ -78,7 +64,7 @@ const question3Answer = ref<any>([
const question4Desc = ref<string>( const question4Desc = ref<string>(
"อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง (เลือกได้มากกว่า 1 ข้อ)" "อะไรคือสิ่งที่ท่านเห็นว่าควรปรับปรุง (เลือกได้มากกว่า 1 ข้อ)"
); );
const question4Score = ref<number>(5); const question4Score = ref<number>(0);
const question4Answer = ref<any>([ const question4Answer = ref<any>([
"อัตราเงินเดือน ", "อัตราเงินเดือน ",
"สวัสดิการ", "สวัสดิการ",
@ -101,35 +87,38 @@ const question4Answer = ref<any>([
const question5Desc = ref<string>( const question5Desc = ref<string>(
"โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร ?" "โปรดระบุสาเหตุที่แท้จริง ที่ทำให้ท่านตัดสินใจลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร ?"
); );
const question5Score = ref<number>(5); const question5Answer = ref<any>([])
const question5Score = ref<number>(0);
// set 6 // set 6
const question6Desc = ref<string>( const question6Desc = ref<string>(
"ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร" "ปัจจัยใดที่จะช่วยทำให้ท่านเปลี่ยนใจ ไม่อยากลาออกจากการปฏิบัติราชการกับกรุงเทพมหานคร"
); );
const question6Score = ref<number>(5); const question6Answer = ref<any>([])
const question6Score = ref<number>(0);
// set 7 // set 7
const question7Desc = ref<string>( const question7Desc = ref<string>(
"ท่านมีงานใหม่หรือไม่ ถ้ามี (โปรดระบุ ชื่อบริษัทเอกชน/หน่วยงานภาครัฐ) และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร" "ท่านมีงานใหม่หรือไม่ ถ้ามี (โปรดระบุ ชื่อบริษัทเอกชน/หน่วยงานภาครัฐ) และอะไรคือสิ่งที่ที่ทำงานใหม่ให้กับท่าน ซึ่งท่านรู้สึกว่าเป็นที่น่าพอใจมากกว่าการปฏิบัติราชการกับกรุงเทพมหานคร"
); );
const question7Score = ref<number>(5); const question7Score = ref<number>(0);
const question7Answer = ref<any>(["มี (ระบุ)", "ไม่มี"]); const question7Answer = ref<any>(["มี (ระบุ)", "ไม่มี"]);
// set 8 // set 8
const question8Desc = ref<string>( const question8Desc = ref<string>(
"ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่ (ถ้าไม่ โปรดระบุเหตุผล)" "ท่านจะแนะนำเพื่อนให้มาร่วมงานกับกรุงเทพมหานครหรือไม่ (ถ้าไม่ โปรดระบุเหตุผล)"
); );
const question8Score = ref<number>(5); const question8Score = ref<number>(0);
const question8Answer = ref<any>(["แนะนำ", "ไม่แนะนำ (ระบุ)"]); const question8Answer = ref<any>(["แนะนำ", "ไม่แนะนำ (ระบุ)"]);
// set 9 // set 9
const question9Desc = ref<string>( const question9Desc = ref<string>(
"หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่ (ถ้าไม่ โปรดระบุเหตุผล)" "หากท่านมีโอกาสในอนาคต ท่านอยากกลับมาร่วมงานกับกรุงเทพมหานครหรือไม่ (ถ้าไม่ โปรดระบุเหตุผล)"
); );
const question9Score = ref<number>(5); const question9Score = ref<number>(0);
const question9Answer = ref<any>(["อยาก", "ไม่อยาก (ระบุ)"]); const question9Answer = ref<any>(["อยาก", "ไม่อยาก (ระบุ)"]);
// set 10 // set 10
const question10Desc = ref<string>("ความคิดเห็นและข้อเสนอแนะอื่น ๆ"); const question10Desc = ref<string>("ความคิดเห็นและข้อเสนอแนะอื่น ๆ");
const question10Score = ref<number>(5); const question10Answer = ref<any>([])
const question10Score = ref<number>(0);
const exitFactor = ref<any>([]); const exitFactor = ref<any>([]);
const reasonWork = ref<any>([]); const reasonWork = ref<any>([]);
@ -183,41 +172,111 @@ onMounted(async () => {
// //
const getData = async () => { const getData = async () => {
// showLoader(); showLoader();
// await http await http
// .get(config.API.xxx) .get(config.API.questionExitInterview())
// .then((res: any) => { .then((res: any) => {
// const data = res.data.result; const data = res.data.result;
// avata.value = data.avatar ?? ""; question1Score.value = data.question1Score ?? 0;
// Position.value = data.position ?? ""; question2Score.value = data.question2Score ?? 0;
// PositionLevel.value = data.positionLevel ?? ""; question3Score.value = data.question3Score ?? 0;
// Org.value = data.org ?? ""; question4Score.value = data.question4Score ?? 0;
// fullname.value = data.fullname ?? ""; question5Score.value = data.question5Score ?? 0;
// prefix.value = data.prefix ?? ""; question6Score.value = data.question6Score ?? 0;
// reasonWork.value = data.reasonWork ?? []; question7Score.value = data.question7Score ?? 0;
// reasonWorkOther.value = data.reasonWorkOther ?? ""; question8Score.value = data.question8Score ?? 0;
// timeThink.value = data.TimeThink ?? 0; question9Score.value = data.question9Score ?? 0;
// exitFactor.value = data.exitFactor ?? []; question10Score.value = data.question10Score ?? 0;
// exitFactorOther.value = data.exitFactorOther ?? 0; question1Desc.value = data.question1Desc
// adjust.value = data.adjust ?? []; question1Answer.value = data.question1Answer
// adjustOther.value = data.adjustOther ?? ""; question2Desc.value = data.question1Desc
// realReason.value = data.realReason ?? ""; question2Answer.value = data.question1Answer
// notExitFactor.value = data.notExitFactor ?? ""; question3Desc.value = data.question1Desc
// haveJob.value = data.havejob ?? null; question3Answer.value = data.question1Answer
// haveJobReason.value = data.havejobReason ?? ""; question4Desc.value = data.question1Desc
// suggestFriends.value = data.suggestFriends ?? null; question4Answer.value = data.question1Answer
// suggestFriendsReason.value = data.suggestFriendsReason ?? ""; question5Desc.value = data.question1Desc
// futureWork.value = data.futureWork ?? null; question5Answer.value = data.question1Answer
// futureWorkReason.value = data.futureWorkReason ?? ""; question6Desc.value = data.question1Desc
// suggestion.value = data.suggestion ?? ""; question6Answer.value = data.question1Answer
// }) question7Desc.value = data.question1Desc
// .catch((e) => { question7Answer.value = data.question1Answer
// messageError($q, e); question8Desc.value = data.question1Desc
// }) question8Answer.value = data.question1Answer
// .finally(() => { question9Desc.value = data.question1Desc
// hideLoader(); question9Answer.value = data.question1Answer
// }); question10Desc.value = data.question1Desc
question10Answer.value = data.question1Answer
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}; };
const confirmClick = () =>{
dialogConfirm($q,()=>putData())
}
const putData = () => {
const body = {
question1Desc:question1Desc.value,
question1Score:question1Score.value,
question1Answer:question1Answer.value,
question2Desc:question2Desc.value,
question2Score:question2Score.value,
question2Answer:question2Answer.value,
question3Desc:question3Desc.value,
question3Score:question3Score.value,
question3Answer:question3Answer.value,
question4Desc:question4Desc.value,
question4Score:question4Score.value,
question4Answer:question4Answer.value,
question5Desc:question5Desc.value,
question5Score:question5Score.value,
question5Answer:question5Answer.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,
};
showLoader();
http
.put(config.API.questionExitInterview(), body)
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
router.push(`/exit-Interview`)
});
}
</script> </script>
<template> <template>
<div class="toptitle text-dark col-12 row items-center"> <div class="toptitle text-dark col-12 row items-center">
@ -867,7 +926,7 @@ const getData = async () => {
<q-card-actions class="text-primary q-pa-md"> <q-card-actions class="text-primary q-pa-md">
<q-space /> <q-space />
<q-btn unelevated label="บันทึก" color="public" @click=""> </q-btn> <q-btn unelevated label="บันทึก" color="public" @click="confirmClick"> </q-btn>
</q-card-actions> </q-card-actions>
</q-form> </q-form>
</q-card> </q-card>

View file

@ -4,6 +4,11 @@ import { useQuasar } from "quasar";
import { useRoute, useRouter } from "vue-router"; import { useRoute, useRouter } from "vue-router";
import { useCounterMixin } from "@/stores/mixin"; import { useCounterMixin } from "@/stores/mixin";
import type {
OptionQuestions,
OptionQuestions2,
} from "@/modules/06_retirement/interface/request/Main";
import http from "@/plugins/http"; import http from "@/plugins/http";
import config from "@/app.config"; import config from "@/app.config";
import keycloak from "@/plugins/keycloak"; import keycloak from "@/plugins/keycloak";
@ -16,7 +21,14 @@ const router = useRouter();
const mixin = useCounterMixin(); const mixin = useCounterMixin();
const dataId = route.params.id.toString(); const dataId = route.params.id.toString();
const { messageError, showLoader, hideLoader } = mixin; const {
messageError,
showLoader,
hideLoader,
dialogConfirm,
success,
dialogMessageNotify,
} = mixin;
const myForm = ref<QForm | null>(null); const myForm = ref<QForm | null>(null);
const roleAdmin = ref<boolean>(false); const roleAdmin = ref<boolean>(false);
@ -39,100 +51,101 @@ const futureWork = ref<any>();
const suggestion = ref<any>(""); const suggestion = ref<any>("");
const comment = ref<string>(""); const comment = ref<string>("");
const score = reactive([ const score = reactive([
{ no: 1, score: 0 }, { no: 1, score: "" },
{ no: 2, score: 0 }, { no: 2, score: "" },
{ no: 3, score: 0 }, { no: 3, score: "" },
{ no: 4, score: 0 }, { no: 4, score: "" },
{ no: 5, score: 0 }, { no: 5, score: "" },
{ no: 6, score: 0 }, { no: 6, score: "" },
{ no: 7, score: 0 }, { no: 7, score: "" },
{ no: 8, score: 0 }, { no: 8, score: "" },
{ no: 9, score: 0 }, { no: 9, score: "" },
{ no: 10, score: 0 }, { no: 10, score: "" },
]); ]);
const scoreTotal = ref<number>(0); const scoreTotal = ref<number|string>('');
const reasonWorkOther = ref(""); const reasonWorkOther = ref("");
const reasonWork_option = ref<any>([ // const reasonWork_option = ref<any>([
{ label: "ความมั่นคงในการทำงาน ", value: 0 }, // { label: " ", value: 0 },
{ label: "สิทธิประโยชน์/สวัสดิการ", value: 1 }, // { label: "/", value: 1 },
{ label: "อัตราเงินเดือน ", value: 2 }, // { label: " ", value: 2 },
{ label: "ลักษณะงาน ", value: 3 }, // { label: " ", value: 3 },
{ label: "วัฒนธรรมการทำงานของข้าราชการ ", value: 4 }, // { label: " ", value: 4 },
{ label: "นโยบายของหน่วยงาน ", value: 5 }, // { label: " ", value: 5 },
{ label: "ระบบการทำงาน", value: 6 }, // { label: "", value: 6 },
{ label: "สมดุลชีวิตการทำงาน ", value: 7 }, // { label: " ", value: 7 },
{ label: "บรรยากาศในการทำงาน ", value: 8 }, // { label: " ", value: 8 },
{ label: "การพัฒนาในสายอาชีพ ", value: 9 }, // { label: " ", value: 9 },
{ label: "โอกาสความก้าวหน้า ", value: 10 }, // { label: " ", value: 10 },
{ label: "การได้รับการยอมรับจากสังคม ", value: 11 }, // { label: " ", value: 11 },
{ label: "อื่น ๆ (ระบุ) ", value: 12 }, // { label: " () ", value: 12 },
]); // ]);
const exitFactorOther = ref(""); const exitFactorOther = ref("");
const exitFactor_option = ref<any>([ // const exitFactor_option = ref<any>([
{ label: "อัตราเงินเดือน ", value: 0 }, // { label: " ", value: 0 },
{ label: "สวัสดิการ", value: 1 }, // { label: "", value: 1 },
{ label: "ลักษณะงาน ", value: 2 }, // { label: " ", value: 2 },
{ label: "ระบบการทำงาน ", value: 3 }, // { label: " ", value: 3 },
{ label: "ระบบสนับสนุนการปฏิบัติงาน ", value: 4 }, // { label: " ", value: 4 },
{ label: "การมอบหมายงานที่ชัดเจนและเหมาะสม ", value: 5 }, // { label: " ", value: 5 },
{ label: "การบริหารงานของผู้บังคับบัญชา", value: 6 }, // { label: "", value: 6 },
{ label: "การทำงานเป็นทีมกับเพื่อนร่วมงาน ", value: 7 }, // { label: " ", value: 7 },
{ label: "ระบบบริหารงานภายในหน่วยงาน ", value: 8 }, // { label: " ", value: 8 },
{ label: "บรรยากาศในการทำงาน ", value: 9 }, // { label: " ", value: 9 },
{ label: "การปฏิบัติอย่างเป็นธรรม ", value: 10 }, // { label: " ", value: 10 },
{ label: "การยอมรับความแตกต่างหลากหลาย ", value: 11 }, // { label: " ", value: 11 },
{ label: "การดูแลและให้ความช่วยเหลือในช่วงเริ่มต้นปฏิบัติงาน ", value: 12 }, // { label: " ", value: 12 },
{ label: "การพัฒนาอย่างเป็นระบบและต่อเนื่อง ", value: 13 }, // { label: " ", value: 13 },
{ label: "โอกาสความก้าวหน้า ", value: 14 }, // { label: " ", value: 14 },
{ label: "อื่น ๆ (ระบุ) ", value: 15 }, // { label: " () ", value: 15 },
]); // ]);
const suggestFriendsReason = ref(""); const suggestFriendsReason = ref("");
const suggestFriends_option = ref<any>([ // const suggestFriends_option = ref<any>([
{ label: "แนะนำ ", value: true }, // { label: " ", value: true },
{ label: "ไม่แนะนำ (ระบุ)", value: false }, // { label: " ()", value: false },
]); // ]);
const timeThink_option = ref<any>([ // const timeThink_option = ref<any>([
{ label: "น้อยกว่า 2 สัปดาห์ ", value: 0 }, // { label: " 2 ", value: 0 },
{ label: "1 เดือน - 3 เดือน", value: 1 }, // { label: "1 - 3 ", value: 1 },
{ label: "3 เดือน - 6 เดือน ", value: 2 }, // { label: "3 - 6 ", value: 2 },
{ label: "6 เดือนขึ้นไป ", value: 3 }, // { label: "6 ", value: 3 },
]); // ]);
const haveJobReason = ref<any>(""); const haveJobReason = ref<any>("");
const haveJob_option = ref<any>([ // const haveJob_option = ref<any>([
{ label: "มี (ระบุ) ", value: true }, // { label: " () ", value: true },
{ label: "ไม่มี", value: false }, // { label: "", value: false },
]); // ]);
const futureWorkReason = ref<any>(""); const futureWorkReason = ref<any>("");
const futureWork_option = ref<any>([ // const futureWork_option = ref<any>([
{ label: "อยาก ", value: true }, // { label: "", value: true },
{ label: "ไม่อยาก (ระบุ)", value: false }, // { label: " ()", value: false },
]); // ]);
const adjustOther = ref(""); const adjustOther = ref("");
const adjust_option = ref<any>([ // const adjust_option = ref<any>([
{ label: "อัตราเงินเดือน ", value: 0 }, // { label: " ", value: 0 },
{ label: "สวัสดิการ", value: 1 }, // { label: "", value: 1 },
{ label: "ลักษณะงาน ", value: 2 }, // { label: " ", value: 2 },
{ label: "ระบบการทำงาน ", value: 3 }, // { label: " ", value: 3 },
{ label: "ระบบสนับสนุนการปฏิบัติงาน ", value: 4 }, // { label: " ", value: 4 },
{ label: "การมอบหมายงานที่ชัดเจนและเหมาะสม ", value: 5 }, // { label: " ", value: 5 },
{ label: "การบริหารงานของผู้บังคับบัญชา", value: 6 }, // { label: "", value: 6 },
{ label: "การทำงานเป็นทีมกับเพื่อนร่วมงาน ", value: 7 }, // { label: " ", value: 7 },
{ label: "ระบบบริหารงานภายในหน่วยงาน ", value: 8 }, // { label: " ", value: 8 },
{ label: "บรรยากาศในการทำงาน ", value: 9 }, // { label: " ", value: 9 },
{ label: "การปฏิบัติอย่างเป็นธรรม ", value: 10 }, // { label: " ", value: 10 },
{ label: "การยอมรับความแตกต่างหลากหลาย ", value: 11 }, // { label: " ", value: 11 },
{ label: "การดูแลและให้ความช่วยเหลือในช่วงเริ่มต้นปฏิบัติงาน ", value: 12 }, // { label: " ", value: 12 },
{ label: "การพัฒนาอย่างเป็นระบบและต่อเนื่อง ", value: 13 }, // { label: " ", value: 13 },
{ label: "โอกาสความก้าวหน้า ", value: 14 }, // { label: " ", value: 14 },
{ label: "อื่น ๆ (ระบุ) ", value: 15 }, // { label: " () ", value: 15 },
]); // ]);
onMounted(async () => { onMounted(async () => {
if (keycloak.tokenParsed != null) { if (keycloak.tokenParsed != null) {
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1"); roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
} }
await getData(); await getData();
await fecthquestion();
}); });
// //
@ -164,6 +177,12 @@ const getData = async () => {
futureWork.value = data.futureWork ?? null; futureWork.value = data.futureWork ?? null;
futureWorkReason.value = data.futureWorkReason ?? ""; futureWorkReason.value = data.futureWorkReason ?? "";
suggestion.value = data.suggestion ?? ""; suggestion.value = data.suggestion ?? "";
score.forEach((item, index) => {
const scoreKey = `score${item.no}`;
item.score = data[scoreKey] ?? 0;
scoreTotal.value = data.scoreTotal ?? 0;
comment.value = data.comment;
});
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
@ -172,16 +191,146 @@ const getData = async () => {
hideLoader(); hideLoader();
}); });
}; };
//
const questionDesc = reactive<any>([
{
question1Desc: "",
question2Desc: "",
question3Desc: "",
question4Desc: "",
question5Desc: "",
question6Desc: "",
question7Desc: "",
question8Desc: "",
question9Desc: "",
question10Desc: "",
},
]);
const question1Answer = ref<OptionQuestions[]>([]);
const question2Answer = ref<OptionQuestions[]>([]);
const question3Answer = ref<OptionQuestions[]>([]);
const question4Answer = ref<OptionQuestions[]>([]);
const question7Answer = ref<OptionQuestions2[]>([]);
const question8Answer = ref<OptionQuestions2[]>([]);
const question9Answer = ref<OptionQuestions2[]>([]);
async function fecthquestion() {
await http
.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`] =
`${i}.` + " " + data[`question${i}Desc`];
}
//
question1Answer.value = data.question1Answer.map(
(e: any, index: number) => ({
label: e,
value: index,
})
);
question2Answer.value = data.question2Answer.map(
(e: any, index: number) => ({
label: e,
value: index,
})
);
question3Answer.value = data.question3Answer.map(
(e: any, index: number) => ({
label: e,
value: index,
})
);
question4Answer.value = data.question4Answer.map(
(e: any, index: number) => ({
label: e,
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,
}));
})
.catch((err) => {
messageError($q, err);
});
}
watch(score, () => { watch(score, () => {
scoreTotal.value = score.reduce((accumulator, object) => { scoreTotal.value = score.reduce((accumulator, object) => {
return accumulator + Number(object.score); return accumulator + Number(object.score);
}, 0); }, 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 === "") {
dialogMessageNotify($q, "กรุณากรอกคะแนน เเละ ความคิดเห็น");
} else {
dialogConfirm($q, () => putData());
}
};
const putData = () => {
const body = {
score1: Number(score[0].score),
score2: Number(score[1].score),
score3: Number(score[2].score),
score4: Number(score[3].score),
score5: Number(score[4].score),
score6: Number(score[5].score),
score7: Number(score[6].score),
score8: Number(score[7].score),
score9: Number(score[8].score),
score10: Number(score[9].score),
scoreTotal: scoreTotal.value,
comment: comment.value,
};
showLoader();
http
.put(config.API.commentExitInterview(dataId), body)
.then((res) => {
success($q, "บันทึกข้อมูลสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
router.push(`/exit-Interview`);
});
};
</script> </script>
<template> <template>
<div class="toptitle text-dark col-12 row items-center"> <div class="toptitle text-dark col-12 row items-center">
<q-btn icon="mdi-arrow-left" unelevated round dense flat color="primary" class="q-mr-sm" @click="router.go(-1)" /> <q-btn
icon="mdi-arrow-left"
unelevated
round
dense
flat
color="primary"
class="q-mr-sm"
@click="router.go(-1)"
/>
รายละเอยด Exit interview ของ {{ prefix }} {{ fullname }} รายละเอยด Exit interview ของ {{ prefix }} {{ fullname }}
</div> </div>
<q-card bordered class="row col-12 text-dark"> <q-card bordered class="row col-12 text-dark">
@ -238,180 +387,418 @@ watch(score, () => {
<div class="col-12 row q-col-gutter-md q-pa-md"> <div class="col-12 row q-col-gutter-md q-pa-md">
<div class="col-xs-12 col-sm-12"> <div class="col-xs-12 col-sm-12">
<q-card bordered flat> <q-card bordered flat>
<div class="q-pa-xs bg-grey-2 row items-center q-py-sm q-px-md justify-center text-bold"> <div
class="q-pa-xs bg-grey-2 row items-center q-py-sm q-px-md justify-center text-bold"
>
แบบสอบถาม แบบสอบถาม
</div> </div>
<q-separator /> <q-separator />
<div class="col-12 row q-pa-sm q-col-gutter-sm"> <div class="col-12 row q-pa-sm q-col-gutter-sm">
<div class="col-10 text-top0 items-center"> <div class="col-10 text-top0 items-center">
1. เหตใดทานจงตดสนใจรวมงานกบกรงเทพมหานคร (เลอกไดมากกว <!-- 1. เหตใดทานจงตดสนใจรวมงานกบกรงเทพมหานคร (เลอกไดมากกว
1 ) 1 ) -->
{{ questionDesc.question1Desc }}
</div> </div>
<div class="col-2 text-top0 items-center"> <div class="col-2 text-top0 items-center">
<q-input dense outlined v-model="score[0].score" label="คะแนนข้อ 1" type="number" /> <q-input
dense
outlined
v-model="score[0].score"
label="คะแนนข้อ 1"
type="number"
lazy-rules
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
/>
</div> </div>
<q-option-group :options="reasonWork_option" type="checkbox" v-model="reasonWork" disable /> <q-option-group
:options="question1Answer"
type="checkbox"
v-model="reasonWork"
disable
/>
<div class="col-12 text-top0 items-center"> <div class="col-12 text-top0 items-center">
<q-item-label> <q-item-label>
<q-input v-if="reasonWork.includes(12)" v-model="reasonWorkOther" disable label="กรอกข้อความ" dense <q-input
lazy-rules type="text" autogrow hide-bottom-space outlined class="bg-white" :rules="[ v-if="reasonWork.includes(12)"
v-model="reasonWorkOther"
disable
label="กรอกข้อความ"
dense
lazy-rules
type="text"
autogrow
hide-bottom-space
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ', (val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]" /> ]"
/>
</q-item-label> </q-item-label>
</div> </div>
<div class="col-10 text-top0 items-center"> <div class="col-10 text-top0 items-center">
2. สำหรบการลาออกในครงน <!-- 2. สำหรบการลาออกในครงน
านไดดทบทวนอยางจรงจงเปนระยะเวลานานเทาใด านไดดทบทวนอยางจรงจงเปนระยะเวลานานเทาใด -->
{{ questionDesc.question2Desc }}
</div> </div>
<div class="col-2 text-top0 items-center"> <div class="col-2 text-top0 items-center">
<q-input dense outlined v-model="score[1].score" label="คะแนนข้อ 2" type="number" /> <q-input
dense
outlined
v-model="score[1].score"
label="คะแนนข้อ 2"
type="number"
lazy-rules
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
/>
</div> </div>
<div class="col-12"> <div class="col-12">
<q-option-group :options="timeThink_option" type="radio" v-model="timeThink" disable /> <q-option-group
:options="question2Answer"
type="radio"
v-model="timeThink"
disable
/>
</div> </div>
<div class="col-10 text-top0 items-center"> <div class="col-10 text-top0 items-center">
3. จจยใดททำใหานตดสนใจลาออกจากราชการ (เลอกไดมากกว 1 <!-- 3. จจยใดททำใหานตดสนใจลาออกจากราชการ (เลอกไดมากกว 1
) ) -->
{{ questionDesc.question3Desc }}
</div> </div>
<div class="col-2 text-top0 items-center"> <div class="col-2 text-top0 items-center">
<q-input dense outlined v-model="score[2].score" label="คะแนนข้อ 3" type="number" /> <q-input
dense
outlined
v-model="score[2].score"
label="คะแนนข้อ 3"
type="number"
lazy-rules
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
/>
</div> </div>
<q-option-group :options="exitFactor_option" type="checkbox" v-model="exitFactor" disable /> <q-option-group
:options="question3Answer"
type="checkbox"
v-model="exitFactor"
disable
/>
<div class="col-12 text-top0 items-center"> <div class="col-12 text-top0 items-center">
<q-item-label> <q-item-label>
<q-input v-if="exitFactor.includes(15)" v-model="exitFactorOther" label="กรอกข้อความ" dense disable <q-input
lazy-rules type="text" autogrow hide-bottom-space outlined class="bg-white" :rules="[ v-if="exitFactor.includes(15)"
v-model="exitFactorOther"
label="กรอกข้อความ"
dense
disable
lazy-rules
type="text"
autogrow
hide-bottom-space
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ', (val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]" /> ]"
/>
</q-item-label> </q-item-label>
</div> </div>
<div class="col-10 text-top0 items-center"> <div class="col-10 text-top0 items-center">
4. อะไรคอสงทานเหนวาควรปรบปร (เลอกไดมากกว 1 ) <!-- 4. อะไรคอสงทานเหนวาควรปรบปร (เลอกไดมากกว 1 ) -->
{{ questionDesc.question4Desc }}
</div> </div>
<div class="col-2 text-top0 items-center"> <div class="col-2 text-top0 items-center">
<q-input dense outlined v-model="score[3].score" label="คะแนนข้อ 4" type="number" /> <q-input
dense
outlined
v-model="score[3].score"
label="คะแนนข้อ 4"
type="number"
lazy-rules
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
/>
</div> </div>
<q-list> <q-list>
<q-option-group :options="adjust_option" type="checkbox" v-model="adjust" disable /> <q-option-group
:options="question4Answer"
type="checkbox"
v-model="adjust"
disable
/>
</q-list> </q-list>
<div class="col-12 text-top0 items-center"> <div class="col-12 text-top0 items-center">
<q-item-label> <q-item-label>
<q-input v-if="adjust.includes(15)" v-model="adjustOther" label="กรอกอื่นๆ" dense disable lazy-rules <q-input
type="text" autogrow hide-bottom-space outlined class="bg-white" :rules="[ v-if="adjust.includes(15)"
v-model="adjustOther"
label="กรอกอื่นๆ"
dense
disable
lazy-rules
type="text"
autogrow
hide-bottom-space
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ', (val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]" /> ]"
/>
</q-item-label> </q-item-label>
</div> </div>
<div class="col-10 text-top0 items-center"> <div class="col-10 text-top0 items-center">
5. โปรดระบสาเหตแทจร <!-- 5. โปรดระบสาเหตแทจร
ทำใหานตดสนใจลาออกจากการปฏราชการกบกรงเทพมหานคร ? ทำใหานตดสนใจลาออกจากการปฏราชการกบกรงเทพมหานคร ? -->
{{ questionDesc.question5Desc }}
</div> </div>
<div class="col-2 text-top0 items-center"> <div class="col-2 text-top0 items-center">
<q-input dense outlined v-model="score[4].score" label="คะแนนข้อ 5" type="number" /> <q-input
dense
outlined
v-model="score[4].score"
label="คะแนนข้อ 5"
type="number"
lazy-rules
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
/>
</div> </div>
<q-input class="col-12" dense disable outlined v-model="realReason" label=" " type="textarea" /> <q-input
class="col-12"
dense
disable
outlined
v-model="realReason"
label=" "
type="textarea"
/>
<div class="col-10 text-top0 items-center"> <div class="col-10 text-top0 items-center">
6. จจยใดทจะชวยทำใหานเปลยนใจ <!-- 6. จจยใดทจะชวยทำใหานเปลยนใจ
ไมอยากลาออกจากการปฏราชการกบกรงเทพมหานคร ไมอยากลาออกจากการปฏราชการกบกรงเทพมหานคร -->
{{ questionDesc.question6Desc }}
</div> </div>
<div class="col-2 text-top0 items-center"> <div class="col-2 text-top0 items-center">
<q-input dense outlined v-model="score[5].score" label="คะแนนข้อ 6" type="number" /> <q-input
dense
outlined
v-model="score[5].score"
label="คะแนนข้อ 6"
type="number"
lazy-rules
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
/>
</div> </div>
<q-input class="col-12" dense outlined disable v-model="notExitFactor" label=" " type="textarea" /> <q-input
class="col-12"
dense
outlined
disable
v-model="notExitFactor"
label=" "
type="textarea"
/>
<div class="col-10 text-top0 items-center"> <div class="col-10 text-top0 items-center">
7. านมงานใหมหรอไม าม (โปรดระบ <!-- 7. านมงานใหมหรอไม าม (โปรดระบ
อบรทเอกชน/หนวยงานภาคร) อบรทเอกชน/หนวยงานภาคร)
และอะไรคอสงททำงานใหมใหบทาน และอะไรคอสงททำงานใหมใหบทาน
งทานรกวาเปนทาพอใจมากกวาการปฏราชการกบกรงเทพมหานคร งทานรกวาเปนทาพอใจมากกวาการปฏราชการกบกรงเทพมหานคร -->
{{ questionDesc.question7Desc }}
</div> </div>
<div class="col-2 text-top0 items-center"> <div class="col-2 text-top0 items-center">
<q-input dense outlined v-model="score[6].score" label="คะแนนข้อ 7" type="number" /> <q-input
dense
outlined
v-model="score[6].score"
label="คะแนนข้อ 7"
type="number"
lazy-rules
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
/>
</div> </div>
<q-option-group :options="haveJob_option" type="radio" v-model="haveJob" disable /> <q-option-group
:options="question7Answer"
type="radio"
v-model="haveJob"
disable
/>
<div class="col-12 text-top0 items-center"> <div class="col-12 text-top0 items-center">
<q-item-label> <q-item-label>
<q-input v-if="haveJob === true" v-model="haveJobReason" label="กรอกอื่นๆ" dense disable lazy-rules <q-input
type="text" autogrow hide-bottom-space outlined class="bg-white" :rules="[ v-if="haveJob === true"
v-model="haveJobReason"
label="กรอกอื่นๆ"
dense
disable
lazy-rules
type="text"
autogrow
hide-bottom-space
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ', (val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]" /> ]"
/>
</q-item-label> </q-item-label>
</div> </div>
<div class="col-10 text-top0 items-center"> <div class="col-10 text-top0 items-center">
8. านจะแนะนำเพอนใหมารวมงานกบกรงเทพมหานครหรอไม (าไม <!-- 8. านจะแนะนำเพอนใหมารวมงานกบกรงเทพมหานครหรอไม (าไม
โปรดระบเหตผล) โปรดระบเหตผล) -->
{{ questionDesc.question8Desc }}
</div> </div>
<div class="col-2 text-top0 items-center"> <div class="col-2 text-top0 items-center">
<q-input dense outlined v-model="score[7].score" label="คะแนนข้อ 8" type="number" /> <q-input
dense
outlined
v-model="score[7].score"
label="คะแนนข้อ 8"
type="number"
lazy-rules
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
/>
</div> </div>
<q-option-group :options="suggestFriends_option" type="radio" v-model="suggestFriends" disable /> <q-option-group
:options="question8Answer"
type="radio"
v-model="suggestFriends"
disable
/>
<div class="col-12 text-top0 items-center"> <div class="col-12 text-top0 items-center">
<q-item-label> <q-item-label>
<q-input v-if="suggestFriends === false" v-model="suggestFriendsReason" label="กรอกข้อความ" dense <q-input
lazy-rules disable type="text" autogrow hide-bottom-space outlined class="bg-white" :rules="[ v-if="suggestFriends === false"
v-model="suggestFriendsReason"
label="กรอกข้อความ"
dense
lazy-rules
disable
type="text"
autogrow
hide-bottom-space
outlined
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ', (val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]" /> ]"
/>
</q-item-label> </q-item-label>
</div> </div>
<div class="col-10 text-top0 items-center"> <div class="col-10 text-top0 items-center">
9. หากทานมโอกาสในอนาคต <!-- 9. หากทานมโอกาสในอนาคต
านอยากกลบมารวมงานกบกรงเทพมหานครหรอไม (าไม านอยากกลบมารวมงานกบกรงเทพมหานครหรอไม (าไม
โปรดระบเหตผล) โปรดระบเหตผล) -->
{{ questionDesc.question9Desc }}
</div> </div>
<div class="col-2 text-top0 items-center"> <div class="col-2 text-top0 items-center">
<q-input dense outlined v-model="score[8].score" label="คะแนนข้อ 9" type="number" /> <q-input
dense
outlined
v-model="score[8].score"
label="คะแนนข้อ 9"
type="number"
lazy-rules
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
/>
</div> </div>
<q-option-group
<q-option-group :options="futureWork_option" type="radio" v-model="futureWork" disable /> :options="question9Answer"
type="radio"
v-model="futureWork"
disable
/>
<div class="col-12 text-top0 items-center"> <div class="col-12 text-top0 items-center">
<q-item-label> <q-item-label>
<q-input v-if="futureWork === false" v-model="futureWorkReason" label="กรอกข้อความ" dense lazy-rules <q-input
type="text" autogrow hide-bottom-space outlined disable class="bg-white" :rules="[ v-if="futureWork === false"
v-model="futureWorkReason"
label="กรอกข้อความ"
dense
lazy-rules
type="text"
autogrow
hide-bottom-space
outlined
disable
class="bg-white"
:rules="[
(val) => (val && val.length > 0) || 'กรุณากรอกข้อความ', (val) => (val && val.length > 0) || 'กรุณากรอกข้อความ',
]" /> ]"
/>
</q-item-label> </q-item-label>
</div> </div>
<div class="col-10 text-top0 items-center"> <div class="col-10 text-top0 items-center">
10. ความคดเหนและขอเสนอแนะอ <!-- 10. ความคดเหนและขอเสนอแนะอ -->
{{ questionDesc.question10Desc }}
</div> </div>
<div class="col-2 text-top0 items-center"> <div class="col-2 text-top0 items-center">
<q-input dense outlined v-model="score[9].score" label="คะแนนข้อ 10" type="number" /> <q-input
dense
outlined
v-model="score[9].score"
label="คะแนนข้อ 10"
type="number"
lazy-rules
:rules="[(val) => val !== '' || 'กรุณากรอกคะเเนน']"
/>
</div> </div>
<q-input class="col-12" dense disable outlined v-model="suggestion" label=" " type="textarea" /> <q-input
class="col-12"
dense
disable
outlined
v-model="suggestion"
label=" "
type="textarea"
/>
</div> </div>
</q-card> </q-card>
<q-card bordered flat class="q-mt-md"> <q-card bordered flat class="q-mt-md">
<div class="q-pa-xs bg-grey-2 row items-center q-py-sm q-px-md justify-center text-bold"> <div
class="q-pa-xs bg-grey-2 row items-center q-py-sm q-px-md justify-center text-bold"
>
ความคดเห ความคดเห
</div> </div>
<q-separator /> <q-separator />
<div class="col-12 row q-pa-sm q-col-gutter-sm"> <div class="col-12 row q-pa-sm q-col-gutter-sm">
<div class="row col-12 q-pa-sm q-col-gutter-sm"> <div class="row col-12 q-pa-sm q-col-gutter-sm">
<div class="col-10"> <div class="col-10">
<q-input dense outlined v-model="comment" label="กรอกความคิดเห็น" type="textarea" /> <q-input
dense
lazy-rules
outlined
v-model="comment"
label="กรอกความคิดเห็น"
type="textarea"
:rules="[(val) => !!val || 'กรุณากรอกความคิดเห็น']"
/>
</div> </div>
<div class="col-2 text-top0"> <div class="col-2 text-top0">
<q-input dense outlined v-model="scoreTotal" label="คะแนนรวม" /> <q-input
dense
outlined
readonly
v-model="scoreTotal"
label="คะแนนรวม"
type="number"
/>
</div> </div>
</div> </div>
@ -419,10 +806,14 @@ watch(score, () => {
<q-card-actions class="col-12 text-primary q-pa-md"> <q-card-actions class="col-12 text-primary q-pa-md">
<q-space /> <q-space />
<q-btn unelevated label="บันทึก" color="public" @click=""> <q-btn
unelevated
label="บันทึก"
color="public"
@click="saveClick"
>
</q-btn> </q-btn>
</q-card-actions> </q-card-actions>
</div> </div>
</q-card> </q-card>
</div> </div>

View file

@ -1 +1,14 @@
export type {}; interface OptionQuestions {
label: string;
value: number;
}
interface OptionQuestions2 {
label: string;
value: boolean;
}
export type {
OptionQuestions,
OptionQuestions2
};