ปรับ โค้ด ทดลองงาน

This commit is contained in:
STW_TTTY\stwtt 2024-08-16 14:42:11 +07:00
parent 51707646e7
commit 46af20233f
16 changed files with 167 additions and 339 deletions

View file

@ -20,7 +20,6 @@ const {
showLoader,
hideLoader,
dialogConfirm,
dialogMessageNotify,
} = mixin;
const personalId = route.params.personalId as string;
const assignId = ref<string>(route.params.form as string);
@ -421,23 +420,10 @@ async function getcompetency(id: string) {
main3.value = data[2];
main4.value = data[3];
main5.value = data[4];
console.log(main.value);
})
.catch((err) => {
messageError($q, err);
});
// await http.get(config.API.competencyOptions(id)).then((res: any) => {
// const data = res.data.data;
// console.log(data);
// OPmain.value = data;
// main.value = data[0];
// main2.value = data[1];
// main3.value = data[2];
// main4.value = data[3];
// main5.value = data[4];
// });
}
/**
@ -446,7 +432,6 @@ async function getcompetency(id: string) {
*/
const assign_competencyGroupMain = ref<any>();
async function getCompetencyGroup(id: string) {
console.log(position.value);
http
.get(config.API.kpiCapacity + `/group?positionName=${position.value}`)
.then((res) => {
@ -820,17 +805,8 @@ function putData(id: string) {
* @param id personal id
*/
async function saveData(id: string) {
console.log("tests");
const data = putData(id);
console.log("data==>", data);
// await myForm.value.validate().then((result: boolean) => {
// if (result) {
dialogConfirm($q, async () => await DataSave(id));
// } else {
// dialogMessageNotify($q, "");
// }
// });
}
/**

View file

@ -8,12 +8,12 @@ import http from "@/plugins/http";
import config from "@/app.config";
import criterion from "@/modules/05_placement/components/Other/Criterion.vue";
import type { ListDataText } from "@/modules/05_placement/interface/index/Main";
const router = useRouter();
const routeName = router.currentRoute.value.name;
const $q = useQuasar();
const probationStore = useProbationDataStore();
const { ratingColors } = probationStore;
const mixin = useCounterMixin();
const {
date2Thai,
@ -30,7 +30,6 @@ const route = useRoute();
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
const assignId = ref<string>(route.params.form.toString());
const { assign } = probationStore;
const personalId = ref<string>(route.params.personalId.toString());
const Autherise = ref<any>(null);
const dateAutherise = ref<any>(new Date());
const option = ref<any>([]);

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, onMounted, watch, computed } from "vue";
import { ref, onMounted, watch, computed } from "vue";
import { useQuasar } from "quasar";
import { useProbationDataStore } from "@/modules/05_placement/storeProbation";
import { useCounterMixin } from "@/stores/mixin";
@ -11,11 +11,9 @@ import type { ListDataText } from "@/modules/05_placement/interface/index/Main";
const $q = useQuasar();
const probationStore = useProbationDataStore();
const { ratingColors } = probationStore;
const mixin = useCounterMixin();
const {
date2Thai,
notifyError,
messageError,
showLoader,
hideLoader,
@ -78,32 +76,6 @@ const list2_1 = probationStore.behavior_no1;
const list2_2 = probationStore.behavior_no2;
const list2_3 = probationStore.behavior_no3;
/**
* get ประเม
* @param id
*/
async function fecthAssign(id: string) {
showLoader();
await http
.get(config.API.evaluateCreate(id))
.then(async (res: any) => {
person.value = res.data.data.person;
assign.value = res.data.data.assign;
// option.value.push(res.data.data.commander);
Autherise.value = res.data.data.director;
evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date;
round.value = res.data.data.evaluate_no;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
/** part 3 */
const alerts = Array(20)
.fill(null)
@ -128,9 +100,6 @@ const behavio_inproveRules = [
(val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลสิ่งที่ควรปรับปรุง",
];
const knowledge_level = ref<number>(0);
const knowledge_levelRules = [
(val: any) => (val && val.length > 0) || "กรุณากรอกข้อมูลสิ่งที่ควรปรับปรุง",
];
const ArrayCountbotton = [orientation, self_learning, training_seminar];
const variablesToWatch = [
knowledge_level,
@ -140,7 +109,8 @@ const variablesToWatch = [
apply_level,
success_level,
];
const savaForm = () => {
function savaForm(){
let hasError = false;
behavio_strengthRef.value.validate();
if (
@ -198,6 +168,31 @@ const savaForm = () => {
}
};
/**
* get ประเม
* @param id
*/
async function fecthAssign(id: string) {
showLoader();
await http
.get(config.API.evaluateCreate(id))
.then(async (res: any) => {
person.value = res.data.data.person;
assign.value = res.data.data.assign;
Autherise.value = res.data.data.director;
evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date;
round.value = res.data.data.evaluate_no;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
}
/** ฟังชั่น post data*/
function putformData() {
const data = {

View file

@ -21,7 +21,6 @@ const router = useRouter();
const routeName = router.currentRoute.value.name;
const $q = useQuasar();
const probationStore = useProbationDataStore();
const { ratingColors } = probationStore;
const { assign } = probationStore;
const mixin = useCounterMixin();
const {
@ -45,9 +44,6 @@ const evaluate_id = ref<string>("");
const start_date = ref<Date>(new Date());
const date_finish = ref<Date>(new Date());
const status = ref<boolean>(true);
// const chairman = ref<any>([]);
// const commander = ref<any>([]);
// const mentors = ref<any>([{ name: "" }, { name: "" }]);
const dataArr = ref<any>();
const props = defineProps({
tab: String,
@ -98,105 +94,6 @@ const develop_result_option = ref<any>([
{ name: "ไม่ผ่าน (ต่ำกว่าร้อยละ 60)", value: 0 },
]);
/**set true */
function edit() {
status.value = true;
}
/** set false */
function cancel() {
status.value = false;
fecthAssign();
}
/** get ข้อมูล */
async function fecthAssign() {
showLoader();
await http
.get(config.API.evaluateChairman(assignId.value))
.then(async (res: any) => {
// if (props.action == "add") {
assign.value = res.data.data.assign;
evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date;
// chairman.value = res.data.data.chairman;
// commander.value = res.data.data.commander;
// mentors.value = res.data.data.mentors;
// }
director_id.value = res.data.data.chairman;
director_id2.value = res.data.data.commander;
if (res.data.data.mentors.length != 0) {
director_id3.value = res.data.data.mentors[0];
}
// dateAutherise.value = res.data.data.chairman_dated;
// director1_dated.value = res.data.data.director1_dated;
// director2_dated.value = res.data.data.director2_dated;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
if (props.action == "edit") {
fetchEvaluate();
}
hideLoader();
});
}
/** เอาค่าจ่าก ดาต้า เก็บไว้ที่ตัวเเปร */
async function fetchEvaluate() {
try {
let data = await dataArr.value;
evaluate_id.value = data.id;
start_date.value = data.date_start;
date_finish.value = data.date_finish;
learn_level.value = data.knowledge_level;
apply_level.value = data.apply_level;
success_level.value = data.success_level;
achievement_other.value.text = data.achievement_other_desc;
achievement_other.value.level = data.achievement_other_level;
conduct_level.value[0] = data.conduct1_level;
conduct_level.value[1] = data.conduct2_level;
conduct_level.value[2] = data.conduct3_level;
conduct_level.value[3] = data.conduct4_level;
moral_level.value[0] = data.moral1_level;
moral_level.value[1] = data.moral2_level;
moral_level.value[2] = data.moral3_level;
discipline_level.value[0] = data.discipline1_level;
discipline_level.value[1] = data.discipline2_level;
discipline_level.value[2] = data.discipline3_level;
discipline_level.value[3] = data.discipline4_level;
discipline_level.value[4] = data.discipline5_level;
behavio_orther.value.text = data.behavior_other_desc;
behavio_orther.value.level = data.behavior_other_level;
orientation.value = data.develop_orientation_score;
self_learning.value = data.develop_self_learning_score;
training_seminar.value = data.develop_training_seminar_score;
other_training.value = data.develop_other_training_score;
orientation_percent.value = data.develop_orientation_percent;
self_learning_percent.value = data.develop_self_learning_percent;
training_seminar_percent.value = data.develop_training_seminar_percent;
other_training_percent.value = data.develop_other_training_percent;
develop_result.value = data.develop_result;
evaluate_result.value = data.evaluate_result;
dateAutherise.value = data.chairman_dated;
director1_dated.value = data.director1_dated;
director2_dated.value = data.director2_dated;
if (
data.achievement_other_desc !== "" &&
data.achievement_other_level !== null
) {
etc.value = true;
} else etc.value = false;
if (data.behavior_other_desc !== "" && data.behavior_other_level !== null) {
etc2.value = true;
} else etc2.value = false;
status.value = false;
} catch (error) {}
}
// score
const score1 = computed(() => {
if (
@ -304,6 +201,96 @@ const score5 = computed(() => {
);
});
/**set true */
function edit() {
status.value = true;
}
/** set false */
function cancel() {
status.value = false;
fecthAssign();
}
/** get ข้อมูล */
async function fecthAssign() {
showLoader();
await http
.get(config.API.evaluateChairman(assignId.value))
.then(async (res: any) => {
assign.value = res.data.data.assign;
evaluate_no.value = res.data.data.evaluate_no;
start_date.value = res.data.data.start_date;
date_finish.value = res.data.data.end_date;
director_id.value = res.data.data.chairman;
director_id2.value = res.data.data.commander;
if (res.data.data.mentors.length != 0) {
director_id3.value = res.data.data.mentors[0];
}
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
if (props.action == "edit") {
fetchEvaluate();
}
hideLoader();
});
}
/** เอาค่าจ่าก ดาต้า เก็บไว้ที่ตัวเเปร */
async function fetchEvaluate() {
try {
let data = await dataArr.value;
evaluate_id.value = data.id;
start_date.value = data.date_start;
date_finish.value = data.date_finish;
learn_level.value = data.knowledge_level;
apply_level.value = data.apply_level;
success_level.value = data.success_level;
achievement_other.value.text = data.achievement_other_desc;
achievement_other.value.level = data.achievement_other_level;
conduct_level.value[0] = data.conduct1_level;
conduct_level.value[1] = data.conduct2_level;
conduct_level.value[2] = data.conduct3_level;
conduct_level.value[3] = data.conduct4_level;
moral_level.value[0] = data.moral1_level;
moral_level.value[1] = data.moral2_level;
moral_level.value[2] = data.moral3_level;
discipline_level.value[0] = data.discipline1_level;
discipline_level.value[1] = data.discipline2_level;
discipline_level.value[2] = data.discipline3_level;
discipline_level.value[3] = data.discipline4_level;
discipline_level.value[4] = data.discipline5_level;
behavio_orther.value.text = data.behavior_other_desc;
behavio_orther.value.level = data.behavior_other_level;
orientation.value = data.develop_orientation_score;
self_learning.value = data.develop_self_learning_score;
training_seminar.value = data.develop_training_seminar_score;
other_training.value = data.develop_other_training_score;
orientation_percent.value = data.develop_orientation_percent;
self_learning_percent.value = data.develop_self_learning_percent;
training_seminar_percent.value = data.develop_training_seminar_percent;
other_training_percent.value = data.develop_other_training_percent;
develop_result.value = data.develop_result;
evaluate_result.value = data.evaluate_result;
dateAutherise.value = data.chairman_dated;
director1_dated.value = data.director1_dated;
director2_dated.value = data.director2_dated;
if (
data.achievement_other_desc !== "" &&
data.achievement_other_level !== null
) {
etc.value = true;
} else etc.value = false;
if (data.behavior_other_desc !== "" && data.behavior_other_level !== null) {
etc2.value = true;
} else etc2.value = false;
status.value = false;
} catch (error) {}
}
/** ฟังชั่นเช็คค่าไม่ว่าง */
function savaForm() {
let hasError = false;

View file

@ -1,4 +1,5 @@
<script setup lang="ts">
import { ref, defineAsyncComponent, computed, onMounted, watch } from "vue";
import { useQuasar, QForm } from "quasar";
import { useProbationDataStore } from "@/modules/05_placement/storeProbation";

View file

@ -42,7 +42,6 @@ const reson52 = ref<string>("");
const chairman_dated = ref<Date>();
const director1_dated = ref<any>("");
const director2_dated = ref<any>("");
// const fullname = ref<string>("");
const director_id = ref<any>(null);
const director_id2 = ref<any>(null);
const director_id3 = ref<any>(null);

View file

@ -352,7 +352,6 @@ onMounted(async () => {
if (props.tab && props.action == "edit") {
evaluate_no.value = Number(props.tab.charAt(4));
dataArr.value = await props.data;
console.log("🚀 ~ onMounted ~ props.data:", props.data);
fecthFormdata();
}
});

View file

@ -27,7 +27,6 @@ const {
dialogMessageNotify,
} = mixin;
const { ratingColors } = probationStore;
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.id.toString());
@ -46,12 +45,7 @@ const list2_3 = probationStore.behavior_no3;
const option = ref<any>([]);
const achievement_strengthRef = ref<any>(null);
const achievement_inproveRef = ref<any>(null);
const behavio_strengthRef = ref<any>(null);
const behavio_inproveRef = ref<any>(null);
const dateToday = ref<Date>(new Date("10-10-2023"));
const dateEnd = ref<Date>(new Date("12-10-2023"));
const period = ref<number>(1);
// part 1
const evaluate_expenct_level = ref<any>([]);

View file

@ -32,7 +32,7 @@ const {
hideLoader,
dialogConfirm,
} = mixin;
const { ratingColors } = probationStore;
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());

View file

@ -30,7 +30,7 @@ const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError } = mixin;
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
// const fullname = ref<string>("");
const tab = ref<string>("save1");
const dataArrayNumber = ref<number>();
const dataRole = ref<string>("mentor");
@ -44,9 +44,6 @@ async function fecthAssign(id: string) {
.get(config.API.formevaluate(id))
.then(async (res: any) => {
await fecthdataAssign(res.data.data);
// fullname.value = res.data.data.experimentee
// ? res.data.data.experimentee.name
// : "";
dataArrayNumber.value = 1;
})
.catch((e: any) => {

View file

@ -30,15 +30,10 @@ const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError } = mixin;
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
// const fullname = ref<string>("");
const tab = ref<string>("save1");
const dataArrayNumber = ref<number>();
const dataRole = ref<string>("mentor");
onMounted(async () => {
await fecthAssign(assignId.value);
});
/**
* get data
* @param id person id
@ -135,6 +130,10 @@ function addData() {
`/probation/detail/addevaluacommander/${personalId.value}/${assignId.value}`
);
}
onMounted(async () => {
await fecthAssign(assignId.value);
});
</script>
<template>

View file

@ -30,7 +30,6 @@ const probationStore = useProbationDataStore();
const { fecthdataAssign } = probationStore;
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
// const fullname = ref<string>("");
const tab = ref<string>("save1");
const tabs = ref<any>([]);
const dataArrayNumber = ref<number>(1);
@ -45,10 +44,6 @@ function changeTab(tabVal: string) {
dataArrayNumber.value = Number(tabVal.charAt(4));
}
onMounted(() => {
fecthAssign(assignId.value);
});
/**
* get data
* @param id person id
@ -114,6 +109,10 @@ function addData() {
`/probation/detail/addevalua/${personalId.value}/${assignId.value}`
);
}
onMounted(() => {
fecthAssign(assignId.value);
});
</script>
<template>
@ -147,17 +146,16 @@ function addData() {
/>
</q-tab-panel>
</q-tab-panels>
<!-- <q-page-container v-if="tabs.length > 0">
<FormEvaluate
:tab="tab"
:data="evaluate.find((x: any) => x.no === dataArrayNumber)"
action="edit"
/>
</q-page-container> -->
<div v-else class="q-gutter-md">
<div class="flex justify-center items-center q-my-md q-gutter-md">
<q-btn v-if="!checkRoutePermisson" outline color="primary" label="สร้างแบบประเมิน" @click="addData" />
<q-btn
v-if="!checkRoutePermisson"
outline
color="primary"
label="สร้างแบบประเมิน"
@click="addData"
/>
</div>
</div>
</template>

View file

@ -131,13 +131,6 @@ const changeTab = (tabVal: string) => {
/>
</q-tab-panel>
</q-tab-panels>
<!-- <q-page-container v-if="tabs.length > 0">
<FormEvaluateScore
:tab="tab"
:data="evaluate.find((x: any) => x.no === dataArrayNumber)"
action="edit"
/>
</q-page-container> -->
<div class="q-gutter-md" v-if="tabs.length === 0">
<div class="flex justify-center items-center q-my-md q-gutter-md">

View file

@ -7,9 +7,7 @@ import type { QTableProps } from "quasar";
import type {
FormMainProbation,
FormMainProbation2,
mapData,
OpfillterType,
CriteriaType,
} from "@/modules/05_placement/interface/request/Main";
import DialogHeader from "@/modules/04_registry/components/DialogHeader.vue";
@ -20,33 +18,36 @@ import config from "@/app.config";
import { checkPermission } from "@/utils/permissions";
const $q = useQuasar(); // noti quasar
const rows = ref<FormMainProbation[]>([]);
const rows2 = ref<FormMainProbation2[]>([]);
const modal = ref<boolean>(false);
const attrs = ref<any>(useAttrs());
const paging = ref<boolean>(true);
const fillter = ref<number | null>(0);
const paging2 = ref<boolean>(true);
const Opfillter = ref<OpfillterType[]>([{ id: 0, value: "ทั้งหมด" }]);
const filterRef = ref<any>(null);
const filterRef2 = ref<any>(null);
const dataUpdate = ref<FormMainProbation[]>([]);
const probationlist = ref<any>([]);
const filterKeyword = ref<string>("");
const fillterStatus = ref<any>([]);
const filterKeyword2 = ref<string>("");
const Opfillter2 = ref<OpfillterType[]>([{ id: 0, value: "ทั้งหมด" }]);
const storeFn = useTransferDataStore();
const mixin = useCounterMixin();
const { statusProbationMain } = storeFn;
const { messageError, success, showLoader, hideLoader, dialogConfirm } = mixin;
const filterRef = ref<any>(null);
const modal = ref<boolean>(false);
const paging = ref<boolean>(true);
const filterRef2 = ref<any>(null);
const attrs = ref<any>(useAttrs());
const paging2 = ref<boolean>(true);
const fillterStatus = ref<any>([]);
const fillter = ref<number | null>(0);
const filterKeyword = ref<string>("");
const filterKeyword2 = ref<string>("");
const rows = ref<FormMainProbation[]>([]);
const rows2 = ref<FormMainProbation2[]>([]);
const dataUpdate = ref<FormMainProbation[]>([]);
const Opfillter = ref<OpfillterType[]>([{ id: 0, value: "ทั้งหมด" }]);
const Opfillter2 = ref<OpfillterType[]>([{ id: 0, value: "ทั้งหมด" }]);
const formProbation = reactive({ keyword: "", pageSize: 10, page: 1 });
const maxPage = ref<number>(1);
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
});
const pagination2 = ref({
sortBy: "desc",
descending: false,
@ -269,9 +270,6 @@ async function getpersonalList() {
});
}
const formProbation = reactive({ keyword: "", pageSize: 10, page: 1 });
const maxPage = ref<number>(1);
async function onclickAddProbation() {
modal.value = true;
modal.value && showLoader();
@ -289,10 +287,6 @@ async function onclickAddProbation() {
});
}
watch([() => formProbation.page, () => formProbation.pageSize], () => {
onclickAddProbation();
});
/**
* function updatePagination
* @param newPagination อม Pagination ใหม
@ -306,81 +300,9 @@ async function filterKeyword2Fn(page: number) {
page !== 1 ? (formProbation.page = 1) : await onclickAddProbation();
}
/** fecth profile */
// async function fecthlistPersonal() {
// showLoader();
// await http
// .get(config.API.profileOrganizRoot)
// .then((res) => {
// const id = res.data.result[0].id;
// if (id !== "") {
// findlist(id);
// }
// })
// .catch((e) => {
// messageError($q, e);
// })
// .finally(() => {});
// }
/**
* งขอมลเพ res
* @param id string
* @param data type
*/
// async function fecthlistProbation(id: string, data: any) {
// try {
// probationlist.value = [];
// const res = await http.post(
// config.API.profileSearchNewOcIdType(id, "officer"),
// {
// criterias: data,
// }
// );
// return res.data.result;
// } catch (err) {
// messageError($q, err);
// } finally {
// hideLoader();
// }
// }
/**
* นหาขอมลตามไอด
* @param id string
*/
// async function findlist(id: string) {
// let data: CriteriaType[] = [
// { criteriaType: "is_retire", criteriaValue: "false" },
// { criteriaType: "is_probation", criteriaValue: "true" },
// ];
// let data2: CriteriaType[] = [
// { criteriaType: "is_retire", criteriaValue: "false" },
// { criteriaType: "is_probation", criteriaValue: "false" },
// ];
// let response1 = await fecthlistProbation(id, data);
// let response2 = await fecthlistProbation(id, data2);
// response1.forEach((e: any) =>
// probationlist.value.push({ ...e, probation: true })
// );
// response2.forEach((e: any) =>
// probationlist.value.push({ ...e, probation: false })
// );
// rows2.value = probationlist.value.map((e: mapData) => ({
// id: e.id,
// fullname: e.fullname,
// position: e.position,
// level: e.positionEmployeeLevel,
// organizationOrganization: e.oc,
// status: e.probation,
// }));
// modal.value = true;
// }
/**
* เพมขอม ทดลองปฏหนาทราชการ
* @param id personal id
* @param data personal data
*/
function clickAdd(data: any) {
dialogConfirm(
@ -460,6 +382,10 @@ function filterFn(val: string, update: any) {
}
}
watch([() => formProbation.page, () => formProbation.pageSize], () => {
onclickAddProbation();
});
/** get ค่า เมื่อโหลดหน้า */
onMounted(async () => {
getpersonalList();
@ -593,9 +519,7 @@ onMounted(async () => {
color="info"
icon="mdi-eye"
@click="
router.push(
`/probation/detail/${props.row.personal_id}`
)
router.push(`/probation/detail/${props.row.personal_id}`)
"
>
<q-tooltip>รายละเอยด</q-tooltip>

View file

@ -6,30 +6,16 @@ import { useRoute, useRouter } from "vue-router";
import http from "@/plugins/http";
import config from "@/app.config";
const $q = useQuasar();
const myForm = ref<QForm>();
const mixin = useCounterMixin();
const router = useRouter();
const {
date2Thai,
notifyError,
messageError,
success,
showLoader,
hideLoader,
dialogConfirm,
} = mixin;
const route = useRoute();
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
const assignId = ref<string>(route.params.form.toString());
const action = ref<string>("edit");
const status = ref<boolean>(false);
const score1 = ref<number>(0);
const score2 = ref<number>(0);
const score3 = ref<number>(0);
const Allscore = ref<number>(0);
const develop_orientation_score = ref<number>();
const develop_self_learning_score = ref<number>();
const develop_training_seminar_score = ref<number>();

View file

@ -16,44 +16,25 @@ const optionText = ref<ListDataText[]>([
{ value: "4", label: "สูงว่าความคาดหวังค่อนข้างมาก (4)" },
{ value: "5", label: "สูงกว่าความคาดหวังมาก (5)" },
]);
const probationStore = useProbationDataStore();
const { ratingColors } = probationStore;
const $q = useQuasar();
const myForm = ref<QForm>();
const mixin = useCounterMixin();
const router = useRouter();
const {
date2Thai,
notifyError,
messageError,
success,
showLoader,
hideLoader,
dialogConfirm,
} = mixin;
const route = useRoute();
const checkRoutePermisson = ref<boolean>(route.name == "probationFormDetail");
const assignId = ref<string>(route.params.form.toString());
const action = ref<string>("edit");
const status = ref<boolean>(true);
const score1 = ref<number>(0);
const score2 = ref<number>(0);
const score3 = ref<number>(0);
const Allscore = ref<number>(0);
const answer1 = ref<string>("");
const answer2 = ref<string>("");
const answer3 = ref<number>(0);
const result = ref<any>();
const result_option = ref<any>([
{ name: "ผ่าน", value: 1 },
{ name: "ไม่ผ่าน", value: 0 },
]);
const note = ref<string>("");
const date = ref<Date>(new Date());
const classBordered = ref<string>("");
/** ดึง ข้อมูลแบบสำรวจ */