no message

This commit is contained in:
STW_TTTY\stwtt 2024-04-22 11:35:33 +07:00
parent 304168f337
commit 4ffde198d6
2 changed files with 130 additions and 23 deletions

View file

@ -74,13 +74,7 @@ const positionOp = ref<DataOption[]>([]);
const positionMainOp = ref<DataOption[]>([]);
/** Option รอบการประเมิน*/
const roundOp = ref<DataOption[]>([
{ id: "APR", name: "รอบเมษายน" },
{
id: "OCT",
name: "รอบตุลาคม",
},
]);
const roundOp = ref<DataOption[]>([]);
/**
* function นหาขอมลของ Option
@ -245,7 +239,41 @@ function updateSelected(data: any) {
form.orgRevisionId = data.orgRevisionId;
}
function getRound() {
showLoader();
http
.get(
config.API.kpiPeriod +
`?year=${form.year}`
)
.then((res) => {
const data = res.data.result.data;
roundOp.value = data.map((item: any) => ({
id: item.id,
name: statusTothai(item.durationKPI),
}))
console.log(roundOp.value)
})
.finally(() => {
hideLoader()
});
}
function statusTothai(val: string) {
switch (val) {
case "SPECIAL":
return "รอบพิเศษ";
case "APR":
return "รอบเมษายน";
case "OCT":
return "รอบตุลาคม";
default:
return "-";
}
}
onMounted(() => {
getRound()
fetchActive();
getOptions();
if (id.value !== "") {
@ -319,7 +347,7 @@ onMounted(() => {
hide-bottom-space
outlined
:model-value="
form.year === 0 ? null : Number(form.year) + 543
form.year === null ? null : Number(form.year) + 543
"
:label="`${'ปีงบประมาณ'}`"
>